TR: [xsd-users] Problem with substition groups

FLACHET Nicolas Nicolas.FLACHET at cstb.fr
Tue Dec 12 04:36:22 EST 2017


Hello,

With the _clone() method, it works.

Thanks !

-----Message d'origine-----
De : Boris Kolpackov [mailto:boris at codesynthesis.com] 
Envoyé : lundi 11 décembre 2017 16:43
À : FLACHET Nicolas
Cc : xsd-users at codesynthesis.com
Objet : Re: TR: [xsd-users] Problem with substition groups

FLACHET Nicolas <Nicolas.FLACHET at cstb.fr> writes:

> core::AbstractCityObjectType::_GenericApplicationPropertyOfCityObject_
> sequence gapSequence; ade::poly_Truitost aTruitos(10); 
> gapSequence.push_back(aTruitos);
> 
> And to read it back : 
> for (int i = 0; i < b->_ gapSequence ().size(); ++i) {
>    ade::poly_Truitost  *test = dynamic_cast< ade::poly_Truitost *>(& 
> gapSequence .at(i) ); }

This should work. Try to step through push_back() code in the debugger. There it should use _clone() to polymorphically copy aTruitos into the sequence.

Boris




More information about the xsd-users mailing list