80 std::vector<BaseProperty*>::iterator it;
121 _hProp.
idx_ = f->second;
151 if(it->second == _hProp.
idx_)
243 for(
unsigned long i = 0; i < _size; ++i)
244 values_.push_back(T());
267 assert(_index >= 0 && _index < (
int)values_.size());
269 return values_[_index];
280 assert(_index >= 0 && _index <= (
int)values_.size());
282 values_.insert(values_.begin() + _index, T());
293 assert(_index >= 0 && _index < (
int)values_.size());
295 values_.erase(values_.begin() + _index);
T & operator[](int _index)
Direct access to the value with the given index.
std::vector< BaseProperty * > properties_
A vector holding the properties.
bool get_property(PropertyHandleT< T > &_hProp, std::string _name)
Initiates the property handle.
bool isValid()
Returns true if the handle is valid, false otherwise.
unsigned long size_
The number of fields in each property, used when new properties have to be created.
PropertyHandleT(int _idx=-1)
Constructs a new property handle.
void insert_at(int _index)
Insert element.
bool add_property(PropertyHandleT< T > &_hProp, std::string _name)
Adds a new property.
PropertyT(unsigned long _size=0)
Creates a new property with the given size.
T & property(PropertyHandleT< T > &_hProp, int _index)
Direct access to the properties values.
void clear()
Clear the property.
A container storing a single property for all objects.
int idx_
The properties index.
bool remove_property(PropertyHandleT< T > &_hProp)
Deletes a property including all values.
std::map< std::string, int > property_names_
The property names, key holding the name, value the properties index in Properties::properties_.
void remove_at(int _index)
Remove element.
virtual ~PropertyT()
Destructor.
virtual ~PropertyHandleT()
Destructor.
The property handle, use it to access the properties.