13 #ifndef ML_PROPERTY_INDEX_H
14 #define ML_PROPERTY_INDEX_H
34 _manager(manager), _propertyName(propertyName) { _manager->_register(
this);
update(); };
37 _manager(other._manager), _propertyName(other._propertyName), _currentIndex(other._currentIndex),
38 _valid(other._valid) { _manager->_register(
this); }
44 void update()
const { _valid = _manager->hasProperty(_propertyName);
if (_valid) _currentIndex = _manager->getPropertyIndex(_propertyName); }
48 const std::string&
getName()
const {
return _propertyName; }
55 const std::string _propertyName;
56 mutable size_t _currentIndex;
A base-class enabling the use of boost::intrusive_ptr in derived classes.
boost::intrusive_ptr< type > Pointer
A self-updating index for efficient name-based access of properties.
boost::intrusive_ptr< const type > ConstPointerType
SmartPropertyIndex(const PropertyManager::Pointer &manager, const std::string &propertyName)
PropertyManager * getManager()
SmartPropertyIndex(const SmartPropertyIndex &other)
const PropertyManager * getManager() const
boost::intrusive_ptr< type > PointerType
const std::string & getName() const
#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