Free Electron
Public Member Functions | Protected Attributes | List of all members
fe::BaseAccessor Class Reference

Type inspecific Accessor. More...

#include <Accessor.h>

Inheritance diagram for fe::BaseAccessor:
Inheritance graph
[legend]

Public Member Functions

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)
 

Protected Attributes

FE_UWORD m_index
 
hp< Scopem_hpScope
 
TypeInfo m_typeInfo
 
WeakRecord m_optional_record
 

Detailed Description

Type inspecific Accessor.

An accessor is a type of functor that is bound to a particular attribute. It is useful for attribute specific operations, most notably accessing a attribute within a record. An accessor can also be used to check if a attribute exists in a Record, RecordArray, Bag, or Layout. An accessor is also a convienient way to setup attributes in a Scope.

Member Function Documentation

◆ attribute()

sp< Attribute > fe::BaseAccessor::attribute ( void  ) const

◆ bind()

void fe::BaseAccessor::bind ( const WeakRecord a_record)
inline

optionally bind to a record

◆ check() [1/14]

bool fe::BaseAccessor::check ( const RecordSB r) const
inline

Return true if record has attribute.

◆ check() [2/14]

bool fe::BaseAccessor::check ( const WeakRecordSB r) const
inline

Return true if record has attribute.

◆ check() [3/14]

bool fe::BaseAccessor::check ( RecordSB pR) const
inline

Return true if record has attribute.

◆ check() [4/14]

bool fe::BaseAccessor::check ( sp< RecordArraySB > &  rspRA) const
inline

Return true if spRA has attribute.

◆ check() [5/14]

bool fe::BaseAccessor::check ( RecordArraySB rRA) const
inline

Return true if rRA has attribute.

◆ check() [6/14]

bool fe::BaseAccessor::check ( sp< LayoutSB > &  rspL) const
inline

Return true if spL has attribute.

◆ check() [7/14]

bool fe::BaseAccessor::check ( LayoutSB rL) const
inline

Return true if L has attribute.

◆ check() [8/14]

bool fe::BaseAccessor::check ( const RecordAV r) const
inline

Return true if record has attribute.

◆ check() [9/14]

bool fe::BaseAccessor::check ( const WeakRecordAV r) const
inline

Return true if record has attribute.

◆ check() [10/14]

bool fe::BaseAccessor::check ( RecordAV pR) const
inline

Return true if record has attribute.

◆ check() [11/14]

bool fe::BaseAccessor::check ( sp< RecordArrayAV > &  rspRA) const
inline

Return true if spRA has attribute.

◆ check() [12/14]

bool fe::BaseAccessor::check ( RecordArrayAV rRA) const
inline

Return true if rRA has attribute.

◆ check() [13/14]

bool fe::BaseAccessor::check ( sp< LayoutAV > &  rspL) const
inline

Return true if spL has attribute.

◆ check() [14/14]

bool fe::BaseAccessor::check ( LayoutAV rL) const
inline

Return true if L has attribute.

◆ initialize() [1/3]

void fe::BaseAccessor::initialize ( sp< Scope scope,
const String attribute 
)

initialize functions setup the accessor but do not setup anything with the Scope.

References attribute().

◆ initialize() [2/3]

void fe::BaseAccessor::initialize ( Scope pScope,
const String attribute 
)

initialize functions setup the accessor but do not setup anything with the Scope.

References fe::Scope::findAttribute().

◆ initialize() [3/3]

void fe::BaseAccessor::initialize ( sp< Scope scope,
sp< Attribute spAttribute 
)

initialize functions setup the accessor but do not setup anything with the Scope.

Todo:
get index via Scope::attributeIndex once that is optimized

References initialize().

Referenced by initialize().

◆ populate()

void fe::BaseAccessor::populate ( sp< Scope spScope,
const String layout,
const String attribute 
)

setup the accessor and populate the named Layout, creating the Layout if neccessary

◆ setup() [1/2]

void fe::BaseAccessor::setup ( sp< Scope spScope,
const String attribute 
)

setup functions setup the accessor and also setup the Scope.

Referenced by fe::ext::RecordView::add().

◆ setup() [2/2]

void fe::BaseAccessor::setup ( sp< Scope scope,
const String attribute,
const String attributetype 
)

setup functions setup the accessor and also setup the Scope.

References fe::Scope::findAttribute(), and fe::Scope::support().


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