3.4.0
tigl::CTiglShapeCache Class Reference

#include <CTiglShapeCache.h>

Public Types

typedef std::map< std::string, TopoDS_Shape > ShapeContainer
 

Public Member Functions

TIGL_EXPORT void Clear ()
 Empties the cache. More...
 
TIGL_EXPORT CTiglShapeCache ()
 
TIGL_EXPORT ShapeContainerGetContainer ()
 Returns the underlying map for direct access. More...
 
TIGL_EXPORT unsigned int GetNShape () const
 Returns total number of shapes in map. More...
 
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. More...
 
TIGL_EXPORT bool HasShape (const std::string &id)
 Returns true, if the shape with id is in the cache. More...
 
TIGL_EXPORT void Insert (const TopoDS_Shape &shape, const std::string &id)
 Inserts a shape with the given id into the cache. More...
 
TIGL_EXPORT void Remove (const std::string &id)
 Removes alles shapes with the given id from the cache. More...
 

Private Member Functions

void Reset ()
 

Private Attributes

TopoDS_Shape nullShape
 
ShapeContainer shapeContainer
 

Member Typedef Documentation

◆ ShapeContainer

typedef std::map<std::string, TopoDS_Shape> tigl::CTiglShapeCache::ShapeContainer

Constructor & Destructor Documentation

◆ CTiglShapeCache()

TIGL_EXPORT tigl::CTiglShapeCache::CTiglShapeCache ( )

Member Function Documentation

◆ Clear()

TIGL_EXPORT void tigl::CTiglShapeCache::Clear ( )

Empties the cache.

◆ GetContainer()

TIGL_EXPORT ShapeContainer& tigl::CTiglShapeCache::GetContainer ( )

Returns the underlying map for direct access.

◆ GetNShape()

TIGL_EXPORT unsigned int tigl::CTiglShapeCache::GetNShape ( ) const

Returns total number of shapes in map.

◆ GetShape()

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.

◆ HasShape()

TIGL_EXPORT bool tigl::CTiglShapeCache::HasShape ( const std::string &  id)

Returns true, if the shape with id is in the cache.

◆ Insert()

TIGL_EXPORT void tigl::CTiglShapeCache::Insert ( const TopoDS_Shape &  shape,
const std::string &  id 
)

Inserts a shape with the given id into the cache.

◆ Remove()

TIGL_EXPORT void tigl::CTiglShapeCache::Remove ( const std::string &  id)

Removes alles shapes with the given id from the cache.

◆ Reset()

void tigl::CTiglShapeCache::Reset ( )
private

Field Documentation

◆ nullShape

TopoDS_Shape tigl::CTiglShapeCache::nullShape
private

◆ shapeContainer

ShapeContainer tigl::CTiglShapeCache::shapeContainer
private

The documentation for this class was generated from the following file: