33 #ifndef CXREPCONTAINER_H 34 #define CXREPCONTAINER_H 36 #include "cxResourceVisualizationExport.h" 46 typedef boost::shared_ptr<class Rep>
RepPtr;
48 typedef std::map<QString, RepPtr>
RepMap;
68 for (
unsigned i = 0; i < mReps.size(); ++i)
70 boost::shared_ptr<REP> rep = boost::dynamic_pointer_cast<REP>(mReps[i]);
71 if (rep && rep->hasTool(tool))
76 return boost::shared_ptr<REP>();
82 for (
unsigned i = 0; i < mReps.size(); ++i)
84 boost::shared_ptr<REP> rep = boost::dynamic_pointer_cast<REP>(mReps[i]);
85 if (rep && rep->hasData(data))
88 return boost::shared_ptr<REP>();
94 for (
unsigned i = 0; i < mReps.size(); ++i)
96 boost::shared_ptr<REP> rep = boost::dynamic_pointer_cast<REP>(mReps[i]);
100 return boost::shared_ptr<REP>();
104 static std::vector<boost::shared_ptr<REP> >
findReps(std::vector<RepPtr> reps)
106 std::vector<boost::shared_ptr<REP> > retval;
107 for (
unsigned i = 0; i < reps.size(); ++i)
109 boost::shared_ptr<REP> rep = boost::dynamic_pointer_cast<REP>(reps[i]);
111 retval.push_back(rep);
119 for (
unsigned i = 0; i < mReps.size(); ++i)
121 boost::shared_ptr<REP> rep = boost::dynamic_pointer_cast<REP>(mReps[i]);
127 return boost::shared_ptr<REP>();
131 std::vector<RepPtr> mReps;
137 #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)