13#ifndef ML_PROPERTY_INDEX_H
14#define ML_PROPERTY_INDEX_H
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.
const PropertyManager * getManager() const
boost::intrusive_ptr< const type > ConstPointerType
PropertyManager * getManager()
SmartPropertyIndex(const PropertyManager::Pointer &manager, const std::string &propertyName)
const std::string & getName() const
SmartPropertyIndex(const SmartPropertyIndex &other)
boost::intrusive_ptr< type > PointerType
#define ML_BAD_PARAMETER
A bad/invalid parameter (or even an inappropriate image) has been passed to a module or an algorithm;...
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
#define VESSELGRAPH_END_NAMESPACE
#define VESSELGRAPH_BEGIN_NAMESPACE