Developer Documentation
Properties::PropertyT< T > Class Template Reference

A container storing a single property for all objects. More...

#include <Type-Skeleton/ObjectTypes/Skeleton/Properties.hh>

Inheritance diagram for Properties::PropertyT< T >:
Properties::BaseProperty

Public Member Functions

 PropertyT (unsigned long _size=0)
 Creates a new property with the given size. More...
 
virtual ~PropertyT ()
 Destructor.
 
T & operator[] (int _index)
 Direct access to the value with the given index. More...
 

Protected Member Functions

Synchronization

Called by the Properties container to keep the indices in sync.

void insert_at (int _index)
 Insert element.
 
void remove_at (int _index)
 Remove element.
 
void clear ()
 Clear the property.
 
Synchronization

Called by the Properties container to keep the indices in sync.

Protected Attributes

std::vector< T > values_
 Stores a property for every object in the class derived from the Properties class. Access by index.
 

Friends

class Properties
 

Detailed Description

template<typename T>
class Properties::PropertyT< T >

A container storing a single property for all objects.

The template type is determined by the property handle PropertyHandleT used to add it to the Properties container.

Definition at line 127 of file Properties.hh.

Constructor & Destructor Documentation

◆ PropertyT()

template<typename T >
Properties::PropertyT< T >::PropertyT ( unsigned long  _size = 0)
explicit

Creates a new property with the given size.

If a property is created when the derived class is already holding objects, it is of course not in sync with regard to the number of stored values (e.g. see Properties::PropertyT::insert_at). The _size parameter allocates the memory to get the new property in sync.

Definition at line 235 of file PropertiesT_impl.hh.

Member Function Documentation

◆ operator[]()

template<typename T >
T & Properties::PropertyT< T >::operator[] ( int  _index)
inline

Direct access to the value with the given index.

This method is used by the Properties class to gain access to the Properties values

Definition at line 259 of file PropertiesT_impl.hh.


The documentation for this class was generated from the following files: