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);
PropertyHandleT(int _idx=-1)
Constructs a new property handle.
void insert_at(int _index)
Insert element.
void clear()
Clear the property.
std::vector< BaseProperty * > properties_
A vector holding the properties.
A container storing a single property for all objects.
T & operator[](int _index)
Direct access to the value with the given index.
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.
virtual ~PropertyHandleT()
Destructor.
unsigned long size_
The number of fields in each property, used when new properties have to be created.
bool get_property(PropertyHandleT< T > &_hProp, std::string _name)
Initiates the property handle.
void remove_at(int _index)
Remove element.
PropertyT(unsigned long _size=0)
Creates a new property with the given size.
int idx_
The properties index.
The property handle, use it to access the properties.
std::map< std::string, int > property_names_
The property names, key holding the name, value the properties index in Properties::properties_.
bool add_property(PropertyHandleT< T > &_hProp, std::string _name)
Adds a new property.
virtual ~PropertyT()
Destructor.
bool isValid()
Returns true if the handle is valid, false otherwise.