Hi,

On Thu, 2010-02-04 at 19:06 -0600, Carsten Neumann wrote: 
>       Hello Gerrit,
> 
> I need to implement a field that essentially stores a
> map<std::string, FieldContainer *> and works in the cluster. I've seen 
> that you have something similar for SFChunkBlockPtrMap and 
> SFMaterialPtrMap that aims to make the map field in AttachmentContainer 
> less "magical", i.e. it should not be the only thing that gets special 
> treatment by loaders.

slightly confused, you start with cluster and now you are with the 
loaders.

> However, I can't seem to find any container that actually contains a 
> SFChunkBlockPtrMap?

ChunkOverrideGroup/VariantMaterial, but they come in through the
MapCacheHandlerMixin parent.

> Additionally there is the MapHelper container, that sounds as if it was 
> related but I also can not really find any use of it.

a little, that one is to work around the vrml style syntax we use to
load osg files, e.g. Examples/CSM/SimpleVariantMat/scene.osg. It is
hard to encode the map keys if one does not want to modify and analyse 
the strings parsed as ids. 

> Should I follow the SFChunkBlockPtrMap (implement FieldTraits and 
> Get/EditHandle specializations) or is there a better example to follow? 

for a simple map AttachmentMap should actually be fine. The ChunkBlock
and Material maps are more complex as their keys are not just a single
value but a combination (|) of base keys. Also the base keys are
supposed to be  defined symbolically by name (string) and will only be
mapped to numbers internally at runtime so there has to be some
translation for storage, which unfortunately make the cluster
transmission a little cumbersome as it uses the same xxToBin functions
as the loader.
Overall they should not be too different from the AttachmentMap.

> Is the MapHelper thing dead? If not, what is it for?

no. It is just a helper for the osg acsii loader.

In general I have to check again how these two map go through the binary
interface IIRC I checked it and it worked.

In general I did not meant them to be a generic form for map fields. It
was just something I needed and it is not finished yet.

kind regards
  gerrit



------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Opensg-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-core

Reply via email to