122 virtual void insert_at(
int _index) = 0;
123 virtual void remove_at(
int _index) = 0;
124 virtual void clear() = 0;
144 inline T &operator[](
int _index);
152 void insert_at(
int _index);
153 void remove_at(
int _index);
215 #if defined(INCLUDE_TEMPLATES) && !defined(PROPERTIES_C)
216 #define PROPERTIES_TEMPLATES
217 #include "PropertiesT.cc"
220 #endif // PROPERTIES_HH defined
std::vector< BaseProperty * > properties_
A vector holding the properties.
bool get_property(PropertyHandleT< T > &_hProp, std::string _name)
Initiates the property handle.
The base class for all property template instances.
The properties storage class.
bool isValid()
Returns true if the handle is valid, false otherwise.
void insert_property_at(int _index)
Inserts a property for a new object at the given index.
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.
bool add_property(PropertyHandleT< T > &_hProp, std::string _name)
Adds a new property.
void remove_property_at(int _index)
Removes a property for an object that is being deleted from the derived class.
T & property(PropertyHandleT< T > &_hProp, int _index)
Direct access to the properties values.
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. Access by index.
int idx_
The properties index.
void clean_properties()
While preserving the properties themself, all values in the property are deleted. ...
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_.
bool has_property(std::string _name)
Returns true if a property with the given name exists.
virtual ~PropertyHandleT()
Destructor.
void clear_properties()
Deletes all properties, including their values.
The property handle, use it to access the properties.