13 #ifndef ML_PROPERTY_ACCESSOR_H
14 #define ML_PROPERTY_ACCESSOR_H
27 #include <boost/mem_fn.hpp>
28 #include <boost/type_traits/add_const.hpp>
29 #include <boost/type_traits/add_reference.hpp>
30 #include <boost/type_traits/remove_const.hpp>
34 #pragma warning( push )
35 #pragma warning( disable : 4344 )
48 _index(manager, propertyName), _defaultValue(defaultValue) {};
67 if (!_index.isValid()) {
79 if (_index.isValid()) {
91 #pragma warning( pop )
Project global and OS specific declarations.
DefaultPropertyAccessor(const PropertyManager::Pointer &manager, const std::string &propertyName, const T &defaultValue)
DefaultPropertyAccessor< T > type
T & operator()(PropertyContainer &container) const
boost::intrusive_ptr< type > PointerType
boost::intrusive_ptr< const type > ConstPointerType
void set(PropertyContainer &container, const T &value) const
const T & get(const PropertyContainer &container) const
A base-class enabling the use of boost::intrusive_ptr in derived classes.
const PropertyManager * getPropertyManager() const
Get read-only access to the associated property manager.
const PropertyValue & property(size_t index) const
Get the property with index index as PropertyValue.
boost::intrusive_ptr< type > Pointer
size_t createProperty(const std::string &name, const PropertyValue &defaultValue)
Create property with name name and return its' index.
A self-updating index for efficient name-based access of properties.
#define ML_BAD_PARAMETER
A bad/invalid parameter (or even an inappropriate image) has been passed to a module or an algorithm,...
#define VESSELGRAPH_END_NAMESPACE
#define VESSELGRAPH_BEGIN_NAMESPACE