Darc Library  2012.11
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
darc::core::CR_AttributeManager Class Reference

Manager class to store, Read and Write single or array attributes. More...

#include <cr_attribute.h>

List of all members.

Public Member Functions

 CR_AttributeManager ()
 CR_AttributeManager (UInt _nAttribute)
 CR_AttributeManager (const CR_AttributeManager &_src)
 ~CR_AttributeManager ()
CR_AttributeManageroperator= (const CR_AttributeManager &_src)
UInt GetSize () const
template<typename T >
void SetValue (UInt _i, const T &_value)
 Template setter method. Creates, recreates or modifies a single attribute.
template<typename T >
const T * GetValue (UInt _i) const
 Template getter method without type checking.
template<typename T , UInt N>
void SetArray (UInt _i, const T *_value)
 Template setter method. Creates, recreates or modifies multiple attributes.
template<typename T , UInt N>
const T * GetArray (UInt _i) const
 Template getter method without type checking.
template<typename T , UInt N>
const T * GetArrayValue (UInt _i, UInt _j) const
 Template getter method without type checking.
CR_PIAttribute GetAttribute (UInt _i) const
DCR Write (const char *_file)
DCR Read (const char *_file)
UInt GetNBytes ()
 Returns the accumulated size of all attributes in bytes.

Friends

CR_API std::ostream & operator<< (std::ostream &_o, const CR_AttributeManager &_obj)

Detailed Description

Manager class to store, Read and Write single or array attributes.

Attributes support arrays of values by default. For single values, use the respective getter and setter functions for N = 1.


Constructor & Destructor Documentation


Member Function Documentation

template<typename T , UInt N>
const T* darc::core::CR_AttributeManager::GetArray ( UInt  _i) const [inline]

Template getter method without type checking.

The function returns the pointer to the attribute array or NULL if it's undefined.

Template Parameters:
TCR_Attribute_TN type.
template<typename T , UInt N>
const T* darc::core::CR_AttributeManager::GetArrayValue ( UInt  _i,
UInt  _j 
) const [inline]

Template getter method without type checking.

The function returns the pointer to the attribute array or NULL if it's undefined.

Template Parameters:
TCR_Attribute_TN type.
Parameters:
_iCR_Attribute_TN index.
_jCR_Attribute_TN array index.

Returns the accumulated size of all attributes in bytes.

template<typename T >
const T* darc::core::CR_AttributeManager::GetValue ( UInt  _i) const [inline]

Template getter method without type checking.

The function returns the pointer to the attribute value or NULL if it's undefined.

Template Parameters:
TCR_Attribute_TN type.
CR_AttributeManager& darc::core::CR_AttributeManager::operator= ( const CR_AttributeManager _src) [inline]

Operator "Assignment".

DCR darc::core::CR_AttributeManager::Read ( const char *  _file)
template<typename T , UInt N>
void darc::core::CR_AttributeManager::SetArray ( UInt  _i,
const T *  _value 
) [inline]

Template setter method. Creates, recreates or modifies multiple attributes.

Template Parameters:
TCR_Attribute_TN type.
NNumber of attributes.
template<typename T >
void darc::core::CR_AttributeManager::SetValue ( UInt  _i,
const T &  _value 
) [inline]

Template setter method. Creates, recreates or modifies a single attribute.

Template Parameters:
TCR_Attribute_TN type.

Friends And Related Function Documentation

CR_API std::ostream& operator<< ( std::ostream &  _o,
const CR_AttributeManager _obj 
) [friend]

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