114 virtual void insert_at(
int _index) = 0;
115 virtual void remove_at(
int _index) = 0;
116 virtual void clear() = 0;
132 explicit PropertyT(
unsigned long _size = 0);
136 inline T &operator[](
int _index);
144 void insert_at(
int _index);
145 void remove_at(
int _index);
207 #if defined(INCLUDE_TEMPLATES) && !defined(PROPERTIES_C) 208 #define PROPERTIES_TEMPLATES 209 #include "PropertiesT_impl.hh" 212 #endif // PROPERTIES_HH defined bool isValid()
Returns true if the handle is valid, false otherwise.
std::vector< T > values_
Stores a property for every object in the class derived from the Properties class. Access by index.
unsigned long size_
The number of fields in each property, used when new properties have to be created.
void clean_properties()
While preserving the properties themself, all values in the property are deleted. ...
T & property(PropertyHandleT< T > &_hProp, int _index)
Direct access to the properties values.
The base class for all property template instances.
PropertyHandleT(int _idx=-1)
Constructs a new property handle.
std::vector< BaseProperty * > properties_
A vector holding the properties.
void remove_property_at(int _index)
Removes a property for an object that is being deleted from the derived class.
virtual ~PropertyHandleT()
Destructor.
std::map< std::string, int > property_names_
The property names, key holding the name, value the properties index in Properties::properties_.
bool remove_property(PropertyHandleT< T > &_hProp)
Deletes a property including all values.
int idx_
The properties index.
void insert_property_at(int _index)
Inserts a property for a new object at the given index.
The properties storage class.
bool get_property(PropertyHandleT< T > &_hProp, std::string _name)
Initiates the property handle.
A container storing a single property for all objects.
The property handle, use it to access the properties.
bool has_property(std::string _name)
Returns true if a property with the given name exists.
bool add_property(PropertyHandleT< T > &_hProp, std::string _name)
Adds a new property.
void clear_properties()
Deletes all properties, including their values.