#include <CTiglShapeCache.h>
Public Types | |
| typedef std::map< std::string, TopoDS_Shape > | ShapeContainer |
Public Member Functions | |
| TIGL_EXPORT void | Clear () |
| Empties the cache. | |
| TIGL_EXPORT | CTiglShapeCache () |
| TIGL_EXPORT ShapeContainer & | GetContainer () |
| Returns the underlying map for direct access. | |
| TIGL_EXPORT unsigned int | GetNShape () const |
| Returns total number of shapes in map. | |
| TIGL_EXPORT TopoDS_Shape & | GetShape (const std::string &id) |
| Returns the shape with the given id. If the shape is not found, a nullshape/empty shape is returned. | |
| TIGL_EXPORT bool | HasShape (const std::string &id) |
| Returns true, if the shape with id is in the cache. | |
| TIGL_EXPORT void | Insert (const TopoDS_Shape &shape, const std::string &id) |
| Inserts a shape with the given id into the cache. | |
| TIGL_EXPORT void | Remove (const std::string &id) |
| Removes alles shapes with the given id from the cache. | |
Private Member Functions | |
| void | Reset () |
Private Attributes | |
| TopoDS_Shape | nullShape |
| ShapeContainer | shapeContainer |
| typedef std::map<std::string, TopoDS_Shape> tigl::CTiglShapeCache::ShapeContainer |
| TIGL_EXPORT tigl::CTiglShapeCache::CTiglShapeCache | ( | ) |
| TIGL_EXPORT void tigl::CTiglShapeCache::Clear | ( | ) |
Empties the cache.
| TIGL_EXPORT ShapeContainer & tigl::CTiglShapeCache::GetContainer | ( | ) |
Returns the underlying map for direct access.
| TIGL_EXPORT unsigned int tigl::CTiglShapeCache::GetNShape | ( | ) | const |
Returns total number of shapes in map.
| TIGL_EXPORT TopoDS_Shape & tigl::CTiglShapeCache::GetShape | ( | const std::string & | id | ) |
Returns the shape with the given id. If the shape is not found, a nullshape/empty shape is returned.
| TIGL_EXPORT bool tigl::CTiglShapeCache::HasShape | ( | const std::string & | id | ) |
Returns true, if the shape with id is in the cache.
| TIGL_EXPORT void tigl::CTiglShapeCache::Insert | ( | const TopoDS_Shape & | shape, |
| const std::string & | id ) |
Inserts a shape with the given id into the cache.
| TIGL_EXPORT void tigl::CTiglShapeCache::Remove | ( | const std::string & | id | ) |
Removes alles shapes with the given id from the cache.
|
private |
|
private |
|
private |