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. More...
 
T & operator[] (int _index)
 Direct access to the value with the given index. More...
 

Friends

class Properties
 

Synchronization

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

std::vector< T > values_
 Stores a property for every object in the class derived from the Properties class. Access by index. More...
 
void insert_at (int _index) override
 Insert element. More...
 
void remove_at (int _index) override
 Remove element. More...
 
void clear () override
 Clear the property. More...
 

Additional Inherited Members

Synchronization

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

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.

◆ ~PropertyT()

template<typename T >
Properties::PropertyT< T >::~PropertyT ( )
virtual

Destructor.

Definition at line 247 of file PropertiesT_impl.hh.

Member Function Documentation

◆ clear()

template<typename T >
void Properties::PropertyT< T >::clear ( void  )
overrideprotectedvirtual

Clear the property.

Implements Properties::BaseProperty.

Definition at line 298 of file PropertiesT_impl.hh.

◆ insert_at()

template<typename T >
void Properties::PropertyT< T >::insert_at ( int  _index)
overrideprotectedvirtual

Insert element.

Implements Properties::BaseProperty.

Definition at line 272 of file PropertiesT_impl.hh.

◆ 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.

◆ remove_at()

template<typename T >
void Properties::PropertyT< T >::remove_at ( int  _index)
overrideprotectedvirtual

Remove element.

Implements Properties::BaseProperty.

Definition at line 285 of file PropertiesT_impl.hh.

Friends And Related Function Documentation

◆ Properties

template<typename T >
friend class Properties
friend

Definition at line 129 of file Properties.hh.

Member Data Documentation

◆ values_

template<typename T >
std::vector<T> Properties::PropertyT< T >::values_
protected

Stores a property for every object in the class derived from the Properties class. Access by index.

Definition at line 150 of file Properties.hh.


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