12 #ifndef CXREPCONTAINER_H 13 #define CXREPCONTAINER_H 15 #include "cxResourceVisualizationExport.h" 25 typedef boost::shared_ptr<class Rep>
RepPtr;
27 typedef std::map<QString, RepPtr>
RepMap;
47 for (
unsigned i = 0; i < mReps.size(); ++i)
49 boost::shared_ptr<REP> rep = boost::dynamic_pointer_cast<REP>(mReps[i]);
50 if (rep && rep->hasTool(tool))
55 return boost::shared_ptr<REP>();
61 for (
unsigned i = 0; i < mReps.size(); ++i)
63 boost::shared_ptr<REP> rep = boost::dynamic_pointer_cast<REP>(mReps[i]);
64 if (rep && rep->hasData(data))
67 return boost::shared_ptr<REP>();
73 for (
unsigned i = 0; i < mReps.size(); ++i)
75 boost::shared_ptr<REP> rep = boost::dynamic_pointer_cast<REP>(mReps[i]);
79 return boost::shared_ptr<REP>();
83 static std::vector<boost::shared_ptr<REP> >
findReps(std::vector<RepPtr> reps)
85 std::vector<boost::shared_ptr<REP> > retval;
86 for (
unsigned i = 0; i < reps.size(); ++i)
88 boost::shared_ptr<REP> rep = boost::dynamic_pointer_cast<REP>(reps[i]);
90 retval.push_back(rep);
98 for (
unsigned i = 0; i < mReps.size(); ++i)
100 boost::shared_ptr<REP> rep = boost::dynamic_pointer_cast<REP>(mReps[i]);
106 return boost::shared_ptr<REP>();
110 std::vector<RepPtr> mReps;
116 #endif // CXREPCONTAINER_H std::map< QString, RepPtr > RepMap
boost::shared_ptr< REP > findFirst()
boost::shared_ptr< class Data > DataPtr
boost::shared_ptr< REP > findManualToolRep()
boost::shared_ptr< REP > findFirst(ToolPtr tool)
std::map< QString, VolumetricBaseRepPtr > VolumetricRepMap
boost::shared_ptr< REP > findFirst(DataPtr data)
static std::vector< boost::shared_ptr< REP > > findReps(std::vector< RepPtr > reps)
boost::shared_ptr< class Rep > RepPtr
Namespace for all CustusX production code.
boost::shared_ptr< class Tool > ToolPtr
RepContainer(std::vector< RepPtr > reps)