Free Electron
Public Member Functions | Private Attributes | Friends | List of all members
fe::StateCatalog::Snapshot Class Reference

A fixed copy of state from a StateCatalog. More...

#include <StateCatalog.h>

Inheritance diagram for fe::StateCatalog::Snapshot:
Inheritance graph
[legend]

Public Member Functions

Result getTypeName (String a_name, String &a_rTypeName) const
 Get state without any need for locking (default property) More...
 
Result getTypeName (String a_name, String a_property, String &a_rTypeName) const
 Get state without any need for locking. More...
 
template<class T >
Result getState (String a_name, T &a_rValue) const
 Get historical state without any need for locking. More...
 
template<class T >
Result getState (String a_name, String a_property, T &a_rValue) const
 Get historical state without any need for locking. More...
 
void dump (void) const
 Print all the values in the snapshot. More...
 
void dumpUpdates (void) const
 Print new state changes since the snapshot. More...
 
I32 serial (void) const
 Get the change count from when the snapshot was made. More...
 
I32 flushCount (void) const
 Get the count of incoming updates from when the snapshot was made. More...
 
- 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 Attributes

I32 m_serial
 
I32 m_flushCount
 
sp< Catalogm_spSnapshotCatalog
 
sp< Catalogm_spUpdateCatalog
 

Friends

class StateCatalog
 

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::Counted
int releaseInternal (void)
 Decrement the reference count. More...
 
void suppressReport (void)
 

Detailed Description

A fixed copy of state from a StateCatalog.

The state of a snapshot is frozen and can not be changed. Unlike the Atomic, a Snapshot does not lock the StateCatalog.

Member Function Documentation

◆ dump()

void fe::StateCatalog::Snapshot::dump ( void  ) const
inline

Print all the values in the snapshot.

◆ dumpUpdates()

void fe::StateCatalog::Snapshot::dumpUpdates ( void  ) const
inline

Print new state changes since the snapshot.

◆ flushCount()

I32 fe::StateCatalog::Snapshot::flushCount ( void  ) const
inline

Get the count of incoming updates from when the snapshot was made.

An increment of the flushCount corresponds to one flush() call at the sender. Multiple states can be updated on one flush.

◆ getState() [1/2]

template<class T >
Result fe::StateCatalog::Snapshot::getState ( String  a_name,
T &  a_rValue 
) const
inline

Get historical state without any need for locking.

◆ getState() [2/2]

template<class T >
Result fe::StateCatalog::Snapshot::getState ( String  a_name,
String  a_property,
T &  a_rValue 
) const
inline

Get historical state without any need for locking.

◆ getTypeName() [1/2]

Result fe::StateCatalog::Snapshot::getTypeName ( String  a_name,
String a_rTypeName 
) const
inline

Get state without any need for locking (default property)

◆ getTypeName() [2/2]

Result fe::StateCatalog::Snapshot::getTypeName ( String  a_name,
String  a_property,
String a_rTypeName 
) const

Get state without any need for locking.

◆ serial()

I32 fe::StateCatalog::Snapshot::serial ( void  ) const
inline

Get the change count from when the snapshot was made.

The StateCatalog keeps an serial count of how many state changes have occured. Each Snapshot taken stores this serial number, which can be used to compare to other snapshots of the same StateCatalog.

Referenced by fe::StateCatalog::snapshot().


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