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;
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.
void remove_property_at(int _index)
Removes a property for an object that is being deleted from the derived class.
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.
bool get_property(PropertyHandleT< T > &_hProp, std::string _name)
Initiates the property handle.
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_.
void insert_property_at(int _index)
Inserts a property for a new object at the given index.
std::vector< BaseProperty * > properties_
A vector holding the properties.
void clear_properties()
Deletes all properties, including their values.
void clean_properties()
While preserving the properties themself, all values in the property are deleted.
bool add_property(PropertyHandleT< T > &_hProp, std::string _name)
Adds a new property.
bool has_property(std::string _name)
Returns true if a property with the given name exists.
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.
PropertyHandleT(int _idx=-1)
Constructs a new property handle.