Free Electron
Public Member Functions | Private Member Functions | List of all members
fe::ext::RecordView::Functor< T > Class Template Reference

Bound accessor in a RecordView. More...

#include <RecordView.h>

Inheritance diagram for fe::ext::RecordView::Functor< T >:
Inheritance graph
[legend]

Public Member Functions

T & operator() (void)
 
const T operator() (void) const
 
T & operator() (const Record &r)
 
const T operator() (const Record &r) const
 
T & operator() (const WeakRecord &r)
 
const T operator() (const WeakRecord &r) const
 
T & operator() (sp< RecordArray > &rspRA, FE_UWORD index)
 
const T & operator() (sp< RecordArray > &rspRA, FE_UWORD index) const
 
BWORD check (void) const
 
BWORD check (sp< RecordArray > &rspRA) const
 
BWORD check (const Record &r) const
 
safeGet (void)
 Get the value, checking first. More...
 
void safeSet (T value)
 Set the value, checking first. More...
 
void call (void)
 Call the attribute as a method. More...
 
void createAndSetComponent (String componentName)
 Create a named component for the attribute. More...
 
void createAndSetRecordGroup (void)
 Create a RecordGroup for the attribute. More...
 
const Stringname (void) const
 
T & operator() (void)
 
const T operator() (void) const
 
T & operator() (const Record &r)
 
const T operator() (const Record &r) const
 
T & operator() (const WeakRecord &r)
 
const T operator() (const WeakRecord &r) const
 
T & operator() (sp< RecordArray > &rspRA, FE_UWORD index)
 
const T & operator() (sp< RecordArray > &rspRA, FE_UWORD index) const
 
BWORD check (void) const
 
BWORD check (sp< RecordArray > &rspRA) const
 
BWORD check (const Record &r) const
 
safeGet (void)
 Get the value, checking first. More...
 
void safeSet (T value)
 Set the value, checking first. More...
 
void call (void)
 Call the attribute as a method. More...
 
void createAndSetComponent (String componentName)
 Create a named component for the attribute. More...
 
void createAndSetRecordGroup (void)
 Create a RecordGroup for the attribute. More...
 
const Stringname (void) const
 
template<>
WeakRecordoperator() (void)
 
template<>
const WeakRecord operator() (void) const
 
template<>
WeakRecordoperator() (void)
 
template<>
const WeakRecord operator() (void) const
 
- Public Member Functions inherited from fe::ext::RecordView::RecordHolder
RecordHolderoperator= (const RecordHolder &rRecordHolder)
 NOP: RecordView will handle copying. More...
 
void bind (WeakRecord &rWeakRecord)
 
RecordHolderoperator= (const RecordHolder &rRecordHolder)
 NOP: RecordView will handle copying. More...
 
void bind (sp< RecordArray > &rspRecordArray, WeakRecord &rWeakRecord, U32 &rIndex)
 
- Public Member Functions inherited from fe::Accessor< T >
 Accessor (sp< Scope > scope, const String &attribute)
 
 Accessor (const Accessor< T > &other)
 
Accessor< T > & operator= (const Accessor< T > &other)
 
T & operator() (const RecordSB &r)
 Return the attribute. More...
 
const T operator() (const RecordSB &r) const
 Return the attribute. More...
 
T & operator() (const WeakRecordSB &r)
 Return the attribute. More...
 
const T operator() (const WeakRecordSB &r) const
 Return the attribute. More...
 
T & operator() (RecordSB *record)
 Return the attribute. More...
 
T & operator() (sp< RecordArraySB > &rspRA, FE_UWORD index)
 Return the attribute. More...
 
const T & operator() (sp< RecordArraySB > &rspRA, FE_UWORD index) const
 Return the attribute. More...
 
T & operator() (hp< RecordArraySB > &rhpRA, FE_UWORD index)
 Return the attribute. More...
 
T & operator() (const RecordSB &r, const char *message)
 Return the attribute. More...
 
bool queryAttribute (const RecordSB &r, T *&data)
 Return true if the attribute exists in record. More...
 
bool queryAttribute (const WeakRecordSB r, T *&data)
 Return true if the attribute exists in record. More...
 
T * queryAttribute (const RecordSB &r)
 
T * queryAttribute (const WeakRecordSB r)
 Return a pointer to the attribute if it exists in record. More...
 
T * queryAttribute (RecordSB *pR)
 Return a pointer to the attribute if it exists in record. More...
 
T * queryAttribute (sp< RecordArraySB > &rspRA, FE_UWORD index)
 Return a pointer to the attribute if it exists in record indexed into the RecordArraySB. More...
 
T & operator() (const RecordAV &r)
 Return the attribute. More...
 
const T operator() (const RecordAV &r) const
 Return the attribute. More...
 
T & operator() (const WeakRecordAV &r)
 Return the attribute. More...
 
const T operator() (const WeakRecordAV &r) const
 Return the attribute. More...
 
T & operator() (RecordAV *record)
 Return the attribute. More...
 
T & operator() (sp< RecordArrayAV > &rspRA, FE_UWORD index)
 Return the attribute. More...
 
const T & operator() (sp< RecordArrayAV > &rspRA, FE_UWORD index) const
 Return the attribute. More...
 
T & operator() (hp< RecordArrayAV > &rhpRA, FE_UWORD index)
 Return the attribute. More...
 
T & operator() (const RecordAV &r, const char *message)
 Return the attribute. More...
 
bool queryAttribute (const RecordAV &r, T *&data)
 Return true if the attribute exists in record. More...
 
bool queryAttribute (const WeakRecordAV r, T *&data)
 Return true if the attribute exists in record. More...
 
T * queryAttribute (const RecordAV &r)
 
T * queryAttribute (const WeakRecordAV r)
 Return a pointer to the attribute if it exists in record. More...
 
T * queryAttribute (RecordAV *pR)
 Return a pointer to the attribute if it exists in record. More...
 
T * queryAttribute (sp< RecordArrayAV > &rspRA, FE_UWORD index)
 Return a pointer to the attribute if it exists in record indexed into the RecordArrayAV. More...
 
bool operator() (const RecordAV &record, T &data)
 
bool operator() (const WeakRecordAV &record, T &data)
 
bool operator() (const RecordSB &record, T &data)
 
bool operator() (const WeakRecordSB &record, T &data)
 
void registerDefault (T *pT)
 
T * operator() (const sp< LayoutAV > &spLayout)
 
Accessor< T > & operator= (const T &a_value)
 
T * operator* (void)
 
 operator T & ()
 
T & c_val (void)
 
- Public Member Functions inherited from fe::BaseAccessor
void initialize (sp< Scope > scope, const String &attribute)
 initialize functions setup the accessor but do not setup anything with the Scope. More...
 
void initialize (Scope *pScope, const String &attribute)
 initialize functions setup the accessor but do not setup anything with the Scope. More...
 
void initialize (sp< Scope > scope, sp< Attribute > spAttribute)
 initialize functions setup the accessor but do not setup anything with the Scope. More...
 
void setup (sp< Scope > spScope, const String &attribute)
 setup functions setup the accessor and also setup the Scope. More...
 
void setup (sp< Scope > scope, const String &attribute, const String &attributetype)
 setup functions setup the accessor and also setup the Scope. More...
 
void populate (sp< Scope > spScope, const String &layout, const String &attribute)
 setup the accessor and populate the named Layout, creating the Layout if neccessary More...
 
sp< Scopescope (void) const
 
bool operator== (const BaseAccessor &other) const
 
bool operator< (const BaseAccessor &other) const
 
BaseAccessoroperator= (const BaseAccessor &other)
 
 operator FE_UWORD () const
 
FE_UWORD index (void) const
 
bool check (const RecordSB &r) const
 Return true if record has attribute. More...
 
bool check (const WeakRecordSB &r) const
 Return true if record has attribute. More...
 
bool check (RecordSB *pR) const
 Return true if record has attribute. More...
 
bool check (sp< RecordArraySB > &rspRA) const
 Return true if spRA has attribute. More...
 
bool check (RecordArraySB &rRA) const
 Return true if rRA has attribute. More...
 
bool check (sp< LayoutSB > &rspL) const
 Return true if spL has attribute. More...
 
bool check (LayoutSB &rL) const
 Return true if L has attribute. More...
 
bool check (const RecordAV &r) const
 Return true if record has attribute. More...
 
bool check (const WeakRecordAV &r) const
 Return true if record has attribute. More...
 
bool check (RecordAV *pR) const
 Return true if record has attribute. More...
 
bool check (sp< RecordArrayAV > &rspRA) const
 Return true if spRA has attribute. More...
 
bool check (RecordArrayAV &rRA) const
 Return true if rRA has attribute. More...
 
bool check (sp< LayoutAV > &rspL) const
 Return true if spL has attribute. More...
 
bool check (LayoutAV &rL) const
 Return true if L has attribute. More...
 
bool check (sp< Layout > &rspL) const
 
bool check (Layout &rL) const
 
sp< Attributeattribute (void) const
 Return the attribute this accessor is for. More...
 
const Stringname (void) const
 
void bind (const WeakRecord &a_record)
 optionally bind to a record More...
 
void typeCheck (const String &attribute)
 

Private Member Functions

void checkRecordExists (void) const
 
void checkWeakRecord (const WeakRecord &r) const
 
void checkRecordExists (void) const
 
void checkWeakRecord (const WeakRecord &r) const
 

Additional Inherited Members

- Protected Member Functions inherited from fe::ext::RecordView::RecordHolder
WeakRecordweakRecord (void) const
 
sp< RecordArray > & array (void) const
 
WeakRecordweakRecord (void) const
 
U32 arrayIndex (void) const
 
- Protected Attributes inherited from fe::ext::RecordView::RecordHolder
WeakRecordm_pWeakRecord
 
sp< RecordArray > * m_pspRecordArray
 
U32 * m_pIndex
 
- Protected Attributes inherited from fe::BaseAccessor
FE_UWORD m_index
 
hp< Scopem_hpScope
 
TypeInfo m_typeInfo
 
WeakRecord m_optional_record
 

Detailed Description

template<typename T>
class fe::ext::RecordView::Functor< T >

Bound accessor in a RecordView.

Member Function Documentation

◆ call() [1/2]

template<typename T>
void fe::ext::RecordView::Functor< T >::call ( void  )
inline

Call the attribute as a method.

If the attribute cannot be cast to HandlerI, nothing occurs. If the cast is successful, the currently indexed Record is passed to the HandlerI using handle().

Trying to call an attribute whose content is not derived from Counted or similar may cause a compiler error.

References fe::ext::RecordView::record().

◆ call() [2/2]

template<typename T>
void fe::ext::RecordView::Functor< T >::call ( void  )
inline

Call the attribute as a method.

If the attribute cannot be cast to HandlerI, nothing occurs. If the cast is successful, the currently indexed Record is passed to the HandlerI using handle().

Trying to call an attribute whose content is not derived from Counted or similar may cause a compiler error.

References fe::ext::RecordView::record().

◆ createAndSetComponent() [1/2]

template<typename T>
void fe::ext::RecordView::Functor< T >::createAndSetComponent ( String  componentName)
inline

Create a named component for the attribute.

The created component is placed in the attribute. If the attribute is not a component, a compile error should occur.

Referenced by fe::ext::Recordable::finalizeRecord(), fe::ext::SurfaceModel::finalizeRecord(), and fe::ext::Theater::initializeRecord().

◆ createAndSetComponent() [2/2]

template<typename T>
void fe::ext::RecordView::Functor< T >::createAndSetComponent ( String  componentName)
inline

Create a named component for the attribute.

The created component is placed in the attribute. If the attribute is not a component, a compile error should occur.

◆ createAndSetRecordGroup() [1/2]

template<typename T>
void fe::ext::RecordView::Functor< T >::createAndSetRecordGroup ( void  )
inline

Create a RecordGroup for the attribute.

The RecordGroup is placed in the attribute. If the attribute is not a RecordGroup, a compile error should occur.

Referenced by fe::ext::Surveillance::initializeRecord(), fe::ext::Stratum::initializeRecord(), fe::ext::Arena::initializeRecord(), and fe::ext::SurfaceModel::initializeRecord().

◆ createAndSetRecordGroup() [2/2]

template<typename T>
void fe::ext::RecordView::Functor< T >::createAndSetRecordGroup ( void  )
inline

Create a RecordGroup for the attribute.

The RecordGroup is placed in the attribute. If the attribute is not a RecordGroup, a compile error should occur.

◆ safeGet() [1/2]

template<typename T>
T fe::ext::RecordView::Functor< T >::safeGet ( void  )
inline

Get the value, checking first.

If the bound Record does not support the attribute, zero is returned, cast to the attribute type.

◆ safeGet() [2/2]

template<typename T>
T fe::ext::RecordView::Functor< T >::safeGet ( void  )
inline

Get the value, checking first.

If the bound Record does not support the attribute, zero is returned, cast to the attribute type.

◆ safeSet() [1/2]

template<typename T>
void fe::ext::RecordView::Functor< T >::safeSet ( value)
inline

Set the value, checking first.

If the bound Record does not support the attribute, nothing occurs.

◆ safeSet() [2/2]

template<typename T>
void fe::ext::RecordView::Functor< T >::safeSet ( value)
inline

Set the value, checking first.

If the bound Record does not support the attribute, nothing occurs.


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