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()) {
const T & get(const PropertyContainer &container) const
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 PropertyValue & property(size_t index) const
Get the property with index index as PropertyValue.
const PropertyManager * getPropertyManager() const
Get read-only access to the associated property manager.
boost::intrusive_ptr< type > Pointer
size_t createProperty(const std::string &name, const PropertyValue &defaultValue)
A self-updating index for efficient name-based access of properties.
#define VESSELGRAPH_END_NAMESPACE
#define VESSELGRAPH_BEGIN_NAMESPACE