Shape/Instances. |
typedef NLMISC::CSmartPtr<
IShape> | PShape |
typedef std::map<std::string,
PShape> | TShapeMap |
typedef std::multimap<std::string,
IShape*> | TWaitingShapesMMap |
TShapeMap | ShapeMap |
TWaitingShapesMMap | WaitingShapes |
CAsyncFileManager | asyncFileManager |
IDriver* | _pDriver |
Shape/Caches. |
typedef std::map<std::string,
std::string> | TShapeCacheNameMap |
typedef std::map<std::string,
CShapeCache> | TShapeCacheMap |
typedef std::map<IShape*,CShapeInfo> | TShapeInfoMap |
std::string* | getShapeNameFromShapePtr (IShape* pShp) |
IShape* | getShapePtrFromShapeName (const std::string &pShpName) |
CShapeCache* | getShapeCachePtrFromShapePtr (IShape* pShp) |
CShapeCache* | getShapeCachePtrFromShapeCacheName (const std::string &shapeCacheName) |
CShapeCache* | getShapeCachePtrFromShapeName (const std::string &shapeName) |
void | checkShapeCache (CShapeCache* pShpCache) |
void | updateShapeInfo (IShape* pShp, CShapeCache* pShpCache) |
TShapeCacheNameMap | ShapeNameToShapeCacheName |
TShapeCacheMap | ShapeCacheNameToShapeCache |
TShapeInfoMap | ShapePtrToShapeInfo |
Public Methods |
| CShapeBank () |
| ~CShapeBank () |
|
IShape* | addRef (const std::string &shapeName) |
| Add a reference to a shape and return the instance created. More...
|
void | release (IShape* pShp) |
| Release a reference to a shape by its instance. More...
|
bool | isPresent (const std::string &shapeName) |
| Return TRUE if the shape is present in the bank. Process the waiting shapes. More...
|
void | load (const std::string &shapeName) |
| Load the corresponding file from disk and add it to the bank. More...
|
void | loadAsync (const std::string &shapeName, IDriver *pDriver) |
| Load the corresponding file from disk asynchronously and add it to the bank. More...
|
void | add (const std::string &shapeName, IShape* shape) |
| Add directly a shape to the bank. If the shape name is already used do nothing. More...
|
|
void | addShapeCache (const std::string &shapeCacheName) |
| Add a new ShapeCache. If already exist do nothing. More...
|
void | removeShapeCache (const std::string &shapeCacheName) |
| Remove a ShapeCache. More...
|
void | reset () |
| Remove all ShapeCache and suppress all links (even the link to the default cache are removed). More...
|
void | setShapeCacheSize (const std::string &shapeCacheName, sint32 maxSize) |
| Set the shapeCache shapeCacheName the new size.(delete shapes if maxsize<shapeCacheSize). More...
|
void | linkShapeToShapeCache (const std::string &shapeName, const std::string &shapeCacheName) |
| Link a shape to a ShapeCache. The ShapeCache must exist and must not contains the shape. More...
|
There is a default cache. If the shape is not linked explicitly to any cache it is linked to the default cache. The comportement of this cache is to not do any cache. When the release is called on the last reference to a shape linked to this cache, the shape is removed instantly. This is the behavior of all newly created cache before we call the setShapeCacheSize method.