132 explicit PropertyT(
unsigned long _size = 0);
136 inline T &operator[](
int _index);
144 void insert_at(
int _index)
override;
145 void remove_at(
int _index)
override;
146 void clear()
override;
163 template<
typename T>
bool add_property(
PropertyHandleT<T> &_hProp, std::string _name);
164 template<
typename T>
bool get_property(
PropertyHandleT<T> &_hProp, std::string _name);
165 bool has_property(std::string _name);
167 void clear_properties();
184 void insert_property_at(
int _index);
185 void remove_property_at(
int _index);
186 void clean_properties();
207#if defined(INCLUDE_TEMPLATES) && !defined(PROPERTIES_C)
208#define PROPERTIES_TEMPLATES
209#include "PropertiesT_impl.hh"
The base class for all property template instances.
virtual void remove_at(int _index)=0
Called by Properties as objects are deleted in the derived class.
virtual void insert_at(int _index)=0
Called by Properties as new objects are inserted in the derived class.
virtual void clear()=0
Called if all values have to be erased from this property.
A container storing a single property for all objects.
std::vector< T > values_
Stores a property for every object in the class derived from the Properties class....
The properties storage class.
unsigned long size_
The number of fields in each property, used when new properties have to be created.
std::map< std::string, int > property_names_
The property names, key holding the name, value the properties index in Properties::properties_.
std::vector< BaseProperty * > properties_
A vector holding the properties.
The property handle, use it to access the properties.
bool isValid()
Returns true if the handle is valid, false otherwise.
virtual ~PropertyHandleT()
Destructor.
int idx_
The properties index.