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