[xsd-users] argument mismatch in the generated code

Wahid hamishagi at yahoo.com
Mon Mar 19 23:10:19 EDT 2012


Hello everyone,

suppose that I have a XML shema with the following hierarchy:

 <RoadNetwork_t>
                    <Links>
                            <Link_t>

I define a type map file as :

namespace http://www.smart.mit.edu/geo {

include "Link.hpp";

Link void sim_mob::Link*;

}

this means that the ONLY desirable modification in the generated code is RoadNetwork_t::Links() to get One argument: RoadNetwork_t::Links(sim_mob::Link*)
before i continue, is this a valid expectation at all? or I have a wrong assumption!?)

I generate the code using the following command:
xsd cxx-parser  --generate-print-impl --generate-test-driver --root-element-last --type-map geoConverter.map  simple.xsd

when I compile the code using gcc  -I.../lib  -c *.cxx

I get the following error:

simple-pskel.cpp: In member function ‘virtual bool geo::RoadNetwork_t_pskel::_end_element_impl(const ro_string&, const ro_string&)’:
simple-pskel.cpp:211:22: error: no matching function for call to ‘geo::RoadNetwork_t_pskel::Links()’
simple-pskel.cpp:211:22: note: candidate is:
simple-pskel.cpp:166:8: note: virtual void geo::RoadNetwork_t_pskel::Links(sim_mob::Link*)
simple-pskel.cpp:166:8: note:   candidate expects 1 argument, 0 provided

Could you please help me why I am getting this, and how to solve it?

thank you

vahid



More information about the xsd-users mailing list