Json::ValueMapAllocator Class Reference
Allocator to customize Value internal map. Below is an example of a simple implementation (default implementation actually use memory pool for speed).
More...
#include <value.h>
Inherited by Json::DefaultValueMapAllocator, and Json::DefaultValueMapAllocator.
List of all members.
Detailed Description
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 );
}
virtual void destructMap( ValueInternalMap *map )
{
delete map;
}
virtual ValueInternalLink *allocateMapBuckets( unsigned int size )
{
return new ValueInternalLink[size];
}
virtual void releaseMapBuckets( ValueInternalLink *links )
{
delete [] links;
}
virtual ValueInternalLink *allocateMapLink()
{
return new ValueInternalLink();
}
virtual void releaseMapLink( ValueInternalLink *link )
{
delete link;
}
};
Constructor & Destructor Documentation
Json::ValueMapAllocator::~ValueMapAllocator |
( |
|
) |
[virtual] |
Member Function Documentation
virtual void Json::ValueMapAllocator::destructMap |
( |
ValueInternalMap * |
map |
) |
[pure virtual] |
virtual ValueInternalLink* Json::ValueMapAllocator::allocateMapBuckets |
( |
unsigned int |
size |
) |
[pure virtual] |
virtual void Json::ValueMapAllocator::releaseMapBuckets |
( |
ValueInternalLink * |
links |
) |
[pure virtual] |
virtual ValueInternalLink* Json::ValueMapAllocator::allocateMapLink |
( |
|
) |
[pure virtual] |
virtual void Json::ValueMapAllocator::releaseMapLink |
( |
ValueInternalLink * |
link |
) |
[pure virtual] |
The documentation for this class was generated from the following files: