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 PropertyHandleT(int _idx=-1)
Constructs a new property handle.
std::vector< T > values_
Stores a property for every object in the class derived from the Properties class. Access by index.
std::vector< BaseProperty * > properties_
A vector holding the properties.
A container storing a single property for all objects.
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.
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.
The properties storage class.
bool get_property(PropertyHandleT< T > &_hProp, std::string _name)
Initiates the property handle.
The base class for all property template instances.
bool has_property(std::string _name)
Returns true if a property with the given name exists.
int idx_
The properties index.
The property handle, use it to access the properties.
void remove_property_at(int _index)
Removes a property for an object that is being deleted from the derived class.
std::map< std::string, int > property_names_
The property names, key holding the name, value the properties index in Properties::properties_.
void insert_property_at(int _index)
Inserts a property for a new object at the given index.
bool add_property(PropertyHandleT< T > &_hProp, std::string _name)
Adds a new property.
void clear_properties()
Deletes all properties, including their values.
bool isValid()
Returns true if the handle is valid, false otherwise.