VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes
makVrf::DtAggregateRollUpManager Class Reference

This class will manage rolling up of subordinate data data information into container psuedo aggregate classes and send notifications when those psuedo aggregates have been changed due to subordinate data changing. More...

Inheritance diagram for makVrf::DtAggregateRollUpManager:
Inheritance graph
[legend]

Classes

struct  MonitorStruct

Public Types

enum  UpdateFlags { StructureChanged = 0x00000001, DataChanged = 0x00000002 }
typedef std::set< const
makVrv::DtStateView
< DtVrlinkSimulatedAggregateState > * > 
Leafs
typedef std::map< std::string,
DtRollUpFunction
RollUpRules

Public Member Functions

 DtAggregateRollUpManager (makVrv::DtDe &)
virtual ~DtAggregateRollUpManager ()
virtual bool hasStateProperties (makVrv::DtUniqueID) const
 Returns true if the aggregate with the given unique ID has any subordinates with valid state properties.
virtual void parameterData (makVrv::DtStateView< makVrv::DtVrlinkSimulatedBaseState > *, DtRwProperties &) const
 Given the state, if the state is an aggregate and has subordinates, return a total of all the parameter properties for numerical items found within.
virtual void parameterData (const std::vector< makVrv::DtSimEntry * > &, DtRwProperties &) const
virtual void parameterData (const std::vector< makVrv::DtUniqueID > &, DtRwProperties &) const
virtual void parameterData (makVrv::DtUniqueID, DtRwProperties &) const
virtual void leafNodes (const makVrv::DtStateView< DtVrlinkSimulatedAggregateState > *, Leafs &, bool includePseudoAggregates=false) const
 Given a root, returns all the leaf nodes from the given aggregate.
virtual void leafNodes (makVrv::DtUniqueID, Leafs &, bool includePseudoAggregates=false) const
virtual void statePropertiesFor (const makVrv::DtStateView< makVrv::DtVrlinkSimulatedBaseState > *, DtRwProperties &) const
 Returns the rolled up state properties or the state properties for the individual (if this is not a psuedo aggregate)
virtual void statePropertiesFor (const std::vector< makVrv::DtSimEntry * > &, DtRwProperties &) const
virtual void statePropertiesFor (const std::vector< makVrv::DtUniqueID > &, DtRwProperties &) const
virtual void statePropertiesFor (makVrv::DtUniqueID, DtRwProperties &) const
virtual void statePropertiesFor (const Leafs &states, DtRwProperties &) const
 Given the states, return a total of all the state properties for numerical items found within.
virtual bool isMonitorable (const makVrv::DtStateView< makVrv::DtVrlinkSimulatedBaseState > *) const
 Returns true if this is a psuedo aggregate and can be monitored for resource updates.
virtual bool isMonitorable (makVrv::DtUniqueID) const
virtual void monitor (makVrv::DtUniqueID, bool)
 Call to start/stop monitoring a particular aggregate.
virtual void startMonitoring (makVrv::DtUniqueID)
virtual void stopMonitoring (makVrv::DtUniqueID)
virtual void installCustomRules ()
virtual void setUpdateRate (makVrv::DtSimEntryUpdater::UpdateRate newRate)
 Set update rate for current and future monitored items. Default is 8 seconds.
virtual
makVrv::DtSimEntryUpdater::UpdateRate 
updateRate () const
 Returns current update rate.
virtual makVrv::DtUniqueID superior (makVrv::DtUniqueID) const
 Given the particular element, returns the superior of this element or 0 if there is no superior.
- Public Member Functions inherited from makVrv::DtVirtualBaseClass
 DtVirtualBaseClass ()
 Do nothing constructor.
virtual ~DtVirtualBaseClass ()
 Virtual do nothing destructor.

Static Public Member Functions

static DtAggregateRollUpManagerinstance (makVrv::DtDe &de)
 Returns instance of the messager.
static void registerInstance (makVrv::DtDe &, DtAggregateRollUpManager *)

Public Attributes

boost::signal< void(makVrv::DtUniqueID,
int)> 
signal_aggregateUpdated
 Signal sent when something about the aggregate has been updated.

Protected Types

typedef std::map
< makVrv::DtUniqueID,
MonitorStruct
Monitoring

Protected Member Functions

virtual bool hasStateProperties (const std::vector< std::string > &) const
 Returns true if the list of items (global ids) has state properties as part of their aggregate state.
virtual void leafNodes (const std::vector< std::string > &, Leafs &, bool includePseudoAggregates=false) const
 Given a root, returns all the leaf nodes from the given aggregate.
virtual void slot_aggregateStateUpdated (makVrv::DtStateView< DtVrlinkSimulatedAggregateState > *)
virtual void slot_aggregateRootStateUpdated (makVrv::DtStateView< DtVrlinkSimulatedAggregateState > *)
virtual void slot_onStateViewAboutToBeRemoved (const makVrv::DtStateView< makVrv::DtVrlinkSimulatedBaseState > &)
virtual void startMonitoring (const makVrv::DtStateView< DtVrlinkSimulatedAggregateState > *, makVrv::DtUniqueID parent)

Protected Attributes

makVrv::DtDemyDe
Monitoring myMonitoring
makVrv::DtSignalConnectionManager myConnections
DtTrueAggregateRollUpHelper myTrueAggregateRollUpHelper
makVrv::DtSimEntryUpdater::UpdateRate myUpdateRate

Detailed Description

This class will manage rolling up of subordinate data data information into container psuedo aggregate classes and send notifications when those psuedo aggregates have been changed due to subordinate data changing.

Manage requests for monitoring and being notified of changes by calling the monitorAggregate method (true or false). Call stateProperties() for the aggregate in question to do a one time roll up. Call parameterData() to roll up the parameter (base) properties for the aggereate and its subordinates

Member Typedef Documentation

Member Enumeration Documentation

Enumerator:
StructureChanged 
DataChanged 

Constructor & Destructor Documentation

makVrf::DtAggregateRollUpManager::DtAggregateRollUpManager ( makVrv::DtDe )
virtual makVrf::DtAggregateRollUpManager::~DtAggregateRollUpManager ( )
virtual

Member Function Documentation

static DtAggregateRollUpManager& makVrf::DtAggregateRollUpManager::instance ( makVrv::DtDe de)
static

Returns instance of the messager.

Referenced by makVrf::DtSetStatePropertyDialog::setupGui().

static void makVrf::DtAggregateRollUpManager::registerInstance ( makVrv::DtDe ,
DtAggregateRollUpManager  
)
static
virtual bool makVrf::DtAggregateRollUpManager::hasStateProperties ( makVrv::DtUniqueID  ) const
virtual

Returns true if the aggregate with the given unique ID has any subordinates with valid state properties.

Referenced by makVrf::DtSetStatePropertyDialog::setupGui().

virtual void makVrf::DtAggregateRollUpManager::parameterData ( makVrv::DtStateView< makVrv::DtVrlinkSimulatedBaseState > *  ,
DtRwProperties  
) const
virtual

Given the state, if the state is an aggregate and has subordinates, return a total of all the parameter properties for numerical items found within.

String values that have the same value will be kept. Those that have differing values will be removed If the item is not an aggregate simply the parameter properties related to the entity type will be returned

Referenced by makVrf::DtSetStatePropertyDialog::setupGui().

virtual void makVrf::DtAggregateRollUpManager::parameterData ( const std::vector< makVrv::DtSimEntry * > &  ,
DtRwProperties  
) const
virtual
virtual void makVrf::DtAggregateRollUpManager::parameterData ( const std::vector< makVrv::DtUniqueID > &  ,
DtRwProperties  
) const
virtual
virtual void makVrf::DtAggregateRollUpManager::parameterData ( makVrv::DtUniqueID  ,
DtRwProperties  
) const
virtual
virtual void makVrf::DtAggregateRollUpManager::leafNodes ( const makVrv::DtStateView< DtVrlinkSimulatedAggregateState > *  ,
Leafs ,
bool  includePseudoAggregates = false 
) const
virtual

Given a root, returns all the leaf nodes from the given aggregate.

Leaf nodes are considered those that do not have children

virtual void makVrf::DtAggregateRollUpManager::leafNodes ( makVrv::DtUniqueID  ,
Leafs ,
bool  includePseudoAggregates = false 
) const
virtual
virtual void makVrf::DtAggregateRollUpManager::statePropertiesFor ( const makVrv::DtStateView< makVrv::DtVrlinkSimulatedBaseState > *  ,
DtRwProperties  
) const
virtual

Returns the rolled up state properties or the state properties for the individual (if this is not a psuedo aggregate)

Referenced by makVrf::DtSetStatePropertyDialog::setupGui().

virtual void makVrf::DtAggregateRollUpManager::statePropertiesFor ( const std::vector< makVrv::DtSimEntry * > &  ,
DtRwProperties  
) const
virtual
virtual void makVrf::DtAggregateRollUpManager::statePropertiesFor ( const std::vector< makVrv::DtUniqueID > &  ,
DtRwProperties  
) const
virtual
virtual void makVrf::DtAggregateRollUpManager::statePropertiesFor ( makVrv::DtUniqueID  ,
DtRwProperties  
) const
virtual
virtual void makVrf::DtAggregateRollUpManager::statePropertiesFor ( const Leafs states,
DtRwProperties  
) const
virtual

Given the states, return a total of all the state properties for numerical items found within.

Boolean and string values that have the same value will be kept. Those that have differing values will be marked as readOnly

virtual bool makVrf::DtAggregateRollUpManager::isMonitorable ( const makVrv::DtStateView< makVrv::DtVrlinkSimulatedBaseState > *  ) const
virtual

Returns true if this is a psuedo aggregate and can be monitored for resource updates.

virtual bool makVrf::DtAggregateRollUpManager::isMonitorable ( makVrv::DtUniqueID  ) const
virtual
virtual void makVrf::DtAggregateRollUpManager::monitor ( makVrv::DtUniqueID  ,
bool   
)
virtual

Call to start/stop monitoring a particular aggregate.

Will keep a reference counter for each aggregate monitored and only stop monitoring when reference is 0. If something about the aggregate changes the signal_aggregateUpdated signal will be sent

virtual void makVrf::DtAggregateRollUpManager::startMonitoring ( makVrv::DtUniqueID  )
virtual
virtual void makVrf::DtAggregateRollUpManager::stopMonitoring ( makVrv::DtUniqueID  )
virtual
virtual void makVrf::DtAggregateRollUpManager::installCustomRules ( )
virtual
virtual void makVrf::DtAggregateRollUpManager::setUpdateRate ( makVrv::DtSimEntryUpdater::UpdateRate  newRate)
virtual

Set update rate for current and future monitored items. Default is 8 seconds.

virtual makVrv::DtSimEntryUpdater::UpdateRate makVrf::DtAggregateRollUpManager::updateRate ( ) const
virtual

Returns current update rate.

virtual makVrv::DtUniqueID makVrf::DtAggregateRollUpManager::superior ( makVrv::DtUniqueID  ) const
virtual

Given the particular element, returns the superior of this element or 0 if there is no superior.

virtual bool makVrf::DtAggregateRollUpManager::hasStateProperties ( const std::vector< std::string > &  ) const
protectedvirtual

Returns true if the list of items (global ids) has state properties as part of their aggregate state.

virtual void makVrf::DtAggregateRollUpManager::leafNodes ( const std::vector< std::string > &  ,
Leafs ,
bool  includePseudoAggregates = false 
) const
protectedvirtual

Given a root, returns all the leaf nodes from the given aggregate.

Leaf nodes are considered those that do not have children

virtual void makVrf::DtAggregateRollUpManager::slot_aggregateStateUpdated ( makVrv::DtStateView< DtVrlinkSimulatedAggregateState > *  )
protectedvirtual
virtual void makVrf::DtAggregateRollUpManager::slot_aggregateRootStateUpdated ( makVrv::DtStateView< DtVrlinkSimulatedAggregateState > *  )
protectedvirtual
virtual void makVrf::DtAggregateRollUpManager::slot_onStateViewAboutToBeRemoved ( const makVrv::DtStateView< makVrv::DtVrlinkSimulatedBaseState > &  )
protectedvirtual
virtual void makVrf::DtAggregateRollUpManager::startMonitoring ( const makVrv::DtStateView< DtVrlinkSimulatedAggregateState > *  ,
makVrv::DtUniqueID  parent 
)
protectedvirtual

Member Data Documentation

boost::signal<void (makVrv::DtUniqueID, int)> makVrf::DtAggregateRollUpManager::signal_aggregateUpdated

Signal sent when something about the aggregate has been updated.

makVrv::DtDe& makVrf::DtAggregateRollUpManager::myDe
protected
Monitoring makVrf::DtAggregateRollUpManager::myMonitoring
protected
makVrv::DtSignalConnectionManager makVrf::DtAggregateRollUpManager::myConnections
protected
DtTrueAggregateRollUpHelper makVrf::DtAggregateRollUpManager::myTrueAggregateRollUpHelper
protected
makVrv::DtSimEntryUpdater::UpdateRate makVrf::DtAggregateRollUpManager::myUpdateRate
protected

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

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)