#pragma warning (disable: 4786) #include #include #include #include #include #include "../include/test_reg_goose.h" #include "../include/test_bottle.h" using namespace xParam; using namespace std; int main(void) { xparam_init(); ParamSet ps; pair p; map str_map; map bot_map; map bot_ptr_map; map bot_cptr_map; vector v; vector vp; vector vcp; list l; list lp; list lcp; try { ps << ioParamVar(p,"p") << ioParamVar(v,"v") << ioParamVar(vp,"vp") << ioParamVar(vcp,"vcp") << ioParamVar(l,"l") << ioParamVar(lp,"lp") << ioParamVar(lcp,"lcp") << ioParamVar(str_map,"str_map") << ioParamVar(bot_map,"bot_map") << ioParamVar(bot_ptr_map,"bot_ptr_map") << ioParamVar(bot_cptr_map,"bot_cptr_map"); const char* input[]={"test13","p=pair(groucho,3.1) " "v=[0, 3, 4] " "vp=[1, groucho] " "vcp=[0, 5] " "l=1, 2, 3 " "lp=0, 4 ,5 " "lcp=[11] " "str_map={ groucho => one, 5 => two} " "bot_map={ 0 => three } " "bot_ptr_map= { 4 => 4, 5 => 5 } " "bot_cptr_map = {6=>6, 7=>7}" }; ps.input(2,input); ps.output(); const char* input2[]={"test13","p=pair(groucho,3.1) " "v=vector(3,3) " "vp=vector(1,1) " "vcp=vector(0,0) " "l=list(0,0) " "lp=list(3,NULL) " "lcp=list(4,1) " "str_map=map({ groucho => one, 5 => two}) " "bot_map={} " "bot_ptr_map= { 4 => NULL, 5 => NULL } " "bot_cptr_map = {6=>6, 7=>7}" }; ps.input(2,input2); ps.output(); } catch (Error e) { cout << "Unexpected error - " << endl << e.what() << endl; } return 0; }