Allocator to customize Value internal map.
Below is an example of a simple implementation (default implementation actually use memory pool for speed).
class DefaultValueMapAllocator : public ValueMapAllocator
{
public:
virtual ValueInternalMap *
newMap()
{
return new ValueInternalMap();
}
virtual ValueInternalMap *
newMapCopy(
const ValueInternalMap &other )
{
return new ValueInternalMap( other );
}
{
delete map;
}
{
return new ValueInternalLink[size];
}
{
delete [] links;
}
{
return new ValueInternalLink();
}
{
delete link;
}
};
virtual ValueInternalLink * allocateMapBuckets(unsigned int size)=0
virtual ValueInternalMap * newMapCopy(const ValueInternalMap &other)=0
virtual void releaseMapBuckets(ValueInternalLink *links)=0
virtual void releaseMapLink(ValueInternalLink *link)=0
virtual ValueInternalMap * newMap()=0
virtual void destructMap(ValueInternalMap *map)=0
virtual ValueInternalLink * allocateMapLink()=0
Definition at line 582 of file value.h.