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

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
 
- 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.

◆ 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.

◆ 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.


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