Hi,

this mail assumes that
fieldType.getContentType().isDerivedFrom(FieldTraits<FieldContainerPtr>::getType())
should return true in OpenSG 2. If that assumption is not correct
everything below is moot.

I've identified a couple of problems with this:

- There is no FieldTraits<FieldContainerAttachmentPtr> specialization
and hence no _type member that would establish the inheritance
relationship to FieldContainerPtr. Attached patch adds this, please
review it. I'm especially interested if this is sufficient or if
additionally specializations of FieldDescription<>::cloneValues /
shareValues would be needed ?

- The type objects for containers are initialized by the
FieldContainerFactory, with which they are registered. This does not
happen for type objects registered only with TypeFactory (among others
these are those for all the {ContainerName}Ptr objects).
It looks as if TypeFactory has to be equipped with a list of pending
types and process them in initializePendingElements. (The most tricky
part here is code reuse - it is all there but in the
ContainerFactoryMixins which are not really available for TypeFactory).

- In OSGContainerTypeInst.cpp the parent types for NodePtr and
NodeCorePtr are "FieldContainerPtr". This seems to skip
AttachmentContainerPtr, i.e. the type systems view of Ptr inheritance
does not match the containers inheritance relationship. This looks like
a bug to me.

        Happy weekend,
                Carsten

PS: I think I can get this fixed, but I'd appreciate some hints/comments
for the above problems.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Opensg-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-core

Reply via email to