Hello Carsten, > > Andreas Halm wrote: > > I have a problem using a field container derived class. For > simplicity > > let's just name my classes type1 and type2, both defined using fcd > > files. Now type2 needs to have a multifield of type1. > > hm, FieldContainer do not support value semantics (there is too much > happening behind the scenes to allow copies to be created just because > (for example) an FC is put into a std::vector<>). Does type1 have to be > a FC (that also makes it quite a bit larger than the 5 floats you claim > below). >
Yes and no. I did use the fcd approach as someone told me about a month ago to always use it if I want synchronization, so I did that and the docs said the parent class must be derived from FieldContainer .... > right, only fields of pointers to a container exist. If you want to > store a type that has value semantics in a MF you need a suitable > specialization of FieldTraits<T> (examples can be found for example in > Source/System/NodeCores/Drawables/Particles/OSGParticleBSP.h). > Thanks, I will have a look at that. > the include problem should be fixed in r2011, I split the header > attribute into fieldHeader (header that defines the field type, e.g. > MFFoo) and typeHeader (header that defines the type stored in the > field, > e.g. Foo) - wiki is updated as well. > Ok now that I have the answers how I could get either approach to work, which one should I choose? Or should I use a simple struct instead and create the copyToBin etc. methods myself for synchronization? Aloha, Andi ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
