36 #ifndef CELLPROPERTYCOLLECTION_HPP_
37 #define CELLPROPERTYCOLLECTION_HPP_
40 #include <boost/shared_ptr.hpp>
43 #include <boost/serialization/shared_ptr.hpp>
44 #include <boost/serialization/set.hpp>
46 #include "AbstractCellProperty.hpp"
47 #include "CellPropertyRegistry.hpp"
81 template<
class Archive>
82 void serialize(Archive & archive,
const unsigned int version)
99 void AddProperty(
const boost::shared_ptr<AbstractCellProperty>& rProp);
118 bool HasProperty(
const boost::shared_ptr<AbstractCellProperty>& rProp)
const;
126 template<
typename CLASS>
131 if ((*it)->IsType<CLASS>())
145 template<
typename BASECLASS>
150 if ((*it)->IsSubType<BASECLASS>())
161 template<
typename CLASS>
166 if ((*it)->IsType<CLASS>())
172 EXCEPTION(
"Collection does not contain the given property type.");
180 void RemoveProperty(
const boost::shared_ptr<AbstractCellProperty>& rProp);
207 boost::shared_ptr<AbstractCellProperty>
GetProperty()
const;
213 template<
typename CLASS>
219 if ((*it)->IsType<CLASS>())
231 template<
typename BASECLASS>
237 if ((*it)->IsSubType<BASECLASS>())
friend class boost::serialization::access
CollectionType::iterator IteratorType
CollectionType mProperties
CollectionType::iterator Iterator
std::set< boost::shared_ptr< AbstractCellProperty > > CollectionType
boost::shared_ptr< AbstractCellProperty > GetProperty() const
#define EXCEPTION(message)
CellPropertyRegistry * mpCellPropertyRegistry
CellPropertyCollection GetPropertiesType() const
bool HasPropertyType() const
CellPropertyCollection GetProperties() const
CollectionType::const_iterator ConstIteratorType
void SetCellPropertyRegistry(CellPropertyRegistry *pRegistry)
void AddProperty(const boost::shared_ptr< AbstractCellProperty > &rProp)
CellPropertyRegistry * GetCellPropertyRegistry()
void serialize(Archive &archive, const unsigned int version)