33 #ifndef CXREPMANAGER_H_
34 #define CXREPMANAGER_H_
36 #include "org_custusx_core_view_Export.h"
45 typedef boost::shared_ptr<class Rep>
RepPtr;
51 typedef std::map<QString, RepPtr>
RepMap;
72 class org_custusx_core_view_EXPORT
RepManager:
public QObject
78 static void destroyInstance();
96 for (RepMultiMap::iterator iter = mRepCache.begin(); iter != mRepCache.end(); ++iter)
98 if (iter->first != uid)
100 int uc = iter->second.use_count();
107 boost::shared_ptr<REP> retval = boost::dynamic_pointer_cast<REP>(iter->second);
116 boost::shared_ptr<REP> retval = REP::New(uid);
117 mRepCache.insert(std::make_pair(uid, retval));
std::map< QString, RepPtr > RepMap
Rep caching and utilities.
static RepManager * mTheInstance
the only instance of this class
boost::shared_ptr< REP > getCachedRep(QString uid="")
std::multimap< QString, RepPtr > RepMultiMap
std::map< QString, VolumetricBaseRepPtr > VolumetricRepMap
boost::shared_ptr< class Rep > RepPtr