Free Electron
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
fe::RecordGroup Class Reference

A heterogenous collection of records. More...

#include <RecordGroup.h>

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

Classes

class  iterator
 STL style iterator. More...
 

Public Member Functions

 RecordGroup (const RecordGroup &other)
 
virtual RecordGroupoperator= (const RecordGroup &other)
 
virtual void add (const Record &record)
 Add record to the collection. More...
 
virtual void add (sp< RecordArray > &records)
 Add records to the collection. More...
 
virtual void add (sp< RecordGroup > &records)
 Add records to the collection. More...
 
virtual bool remove (const Record &record)
 Remove record from the collection. More...
 
virtual void remove (sp< RecordGroup > &records)
 Remove records from the collection. More...
 
virtual void clear (void)
 Clear the collection. More...
 
virtual FE_UWORD size (void)
 Return the number of RecordArray (Layouts). More...
 
virtual FE_UWORD count (void)
 Return the the total count of records. More...
 
virtual sp< ScopegetFirstScope (void)
 Return the scope of the first RecordArray within. More...
 
virtual sp< Scopescope (void)
 
virtual void removeReferences (const Record &record, bool recurse=false, Info *info=NULL)
 Remove all references to the given record with contained records. More...
 
virtual void all (RecordOperation &op)
 Perform the RecordOperation op on all records. More...
 
virtual bool find (const Record &record)
 Return true if record is in the record group. More...
 
virtual sp< RecordArraygetArray (sp< Layout > l_query)
 
virtual sp< RecordArraygetArray (const String layout)
 
template<class T >
sp< RecordMap< T > > lookupMap (Accessor< T > accessor)
 
template<class T >
Record lookup (Accessor< T > accessor, const T &value)
 
void setWeak (BWORD weak)
 Choose weak referencing. More...
 
BWORD isWeak (void) const
 Return TRUE if using weak referencing. More...
 
void prune (void)
 Remove any invalid weak references. More...
 
iterator begin (void)
 
iterator begin (Array< BaseAccessor > filters)
 
iterator end (void)
 
void watcherAdd (const Record &record)
 
void watcherRemove (const Record &record)
 
- Public Member Functions inherited from fe::Handled< RecordGroup >
const hp< RecordGroup > & getHandle (void) const
 Get a safe handle to this object. More...
 
- Public Member Functions inherited from fe::Protectable
virtual I32 protection (void) const
 
virtual void protect (void)
 
virtual void unprotect (void)
 
virtual Protectableclone (Protectable *pInstance=NULL)
 
- Public Member Functions inherited from fe::Counted
virtual void acquire (void)
 Increment the reference count. More...
 
virtual void acquire (int &rCount)
 Increment the reference count (and get the count) More...
 
virtual void release (void)
 Decrement the reference count. More...
 
virtual void abandon (void)
 Decrement the reference count. More...
 
int count (void) const
 Return the count of references. More...
 
void setName (const String &)
 
void trackReference (void *pReference, String what)
 
void untrackReference (void *pReference)
 
void registerRegion (void *pT, U32 bytes)
 

Private Member Functions

virtual void removeReferencesFromRecord (Record &from, const Record &record, bool recurse=false, Info *info=NULL)
 
void rebuildArrays (void)
 

Private Attributes

t_layout_ra m_raMap
 
t_attribute_watcher m_indices
 
t_watchers m_watchers
 
BWORD m_weak
 
BWORD m_locking
 

Additional Inherited Members

- Static Public Member Functions inherited from fe::Counted
static String reportTracker (void)
 
static U32 trackerCount (void)
 
- Protected Member Functions inherited from fe::Handled< RecordGroup >
void abandonHandle (void)
 
- Protected Member Functions inherited from fe::Counted
int releaseInternal (void)
 Decrement the reference count. More...
 
void suppressReport (void)
 

Detailed Description

A heterogenous collection of records.

From a membership management point of view this is a collection of Records. From an iteration point of view this is a collection of RecordArrays. Each of these RecordArrays contains Records of a single Layout.

Member Function Documentation

◆ add() [1/3]

void fe::RecordGroup::add ( const Record record)
virtual

Add record to the collection.

◆ add() [2/3]

void fe::RecordGroup::add ( sp< RecordArray > &  records)
virtual

Add records to the collection.

◆ add() [3/3]

void fe::RecordGroup::add ( sp< RecordGroup > &  records)
virtual

Add records to the collection.

◆ all()

void fe::RecordGroup::all ( RecordOperation op)
virtual

Perform the RecordOperation op on all records.

◆ clear()

void fe::RecordGroup::clear ( void  )
inlinevirtual

Clear the collection.

◆ count()

FE_UWORD fe::RecordGroup::count ( void  )
virtual

Return the the total count of records.

◆ find()

bool fe::RecordGroup::find ( const Record record)
inlinevirtual

Return true if record is in the record group.

Otherwise return false.

◆ getFirstScope()

sp< Scope > fe::RecordGroup::getFirstScope ( void  )
virtual

Return the scope of the first RecordArray within.

◆ isWeak()

BWORD fe::RecordGroup::isWeak ( void  ) const
inline

Return TRUE if using weak referencing.

◆ prune()

void fe::RecordGroup::prune ( void  )
inline

Remove any invalid weak references.

◆ remove() [1/2]

bool fe::RecordGroup::remove ( const Record record)
virtual

Remove record from the collection.

Returns false if record was not present.

◆ remove() [2/2]

void fe::RecordGroup::remove ( sp< RecordGroup > &  records)
virtual

Remove records from the collection.

◆ removeReferences()

void fe::RecordGroup::removeReferences ( const Record record,
bool  recurse = false,
Info *  info = NULL 
)
virtual

Remove all references to the given record with contained records.

◆ setWeak()

void fe::RecordGroup::setWeak ( BWORD  weak)
inline

Choose weak referencing.

Usually, this should only occur immediately after construction before any Records are added.

Changing this value with existing records incurs the overhead of rebuilding all the underlying arrays.

◆ size()

FE_UWORD fe::RecordGroup::size ( void  )
inlinevirtual

Return the number of RecordArray (Layouts).

◆ watcherAdd()

void fe::RecordGroup::watcherAdd ( const Record record)

◆ watcherRemove()

void fe::RecordGroup::watcherRemove ( const Record record)

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