MAK Data Logger API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
stateObModel.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include "stateObserver.h"
13 
14 #include <lgrCore/lgrDriver.h>
15 #include <lgrUtil/observe.h>
16 #include <set>
17 
18 namespace MAKLogger
19 {
20  class DtCommand;
21  class DtLgrSystemDriver;
22  class DtMessageState;
23  class DtStateObject;
24  class DtStateObserverController;
25 
31  {
32  public:
33 
37 
39  virtual ~DtStateObserverModel();
40 
42  void connect(MAKLogger::DtMessageState*);
43 
45  int totalObjects() const;
46 
48  int totalAliveObjects() const;
49 
51  int totalDeadObjects() const;
52 
54  int entityCount() const;
55 
57  int aggregateCount() const;
58 
60  int envProcCount() const;
61 
62  //DtLgrCommandHandler Interface
63  // Tick the driver, cause it to do anything on a regular basis.
64  virtual void tick();
65 
66  // These are no-ops since this Handler doesn't use the pipeline.
67  virtual bool releasePipeline();
68  virtual bool getPipeline();
69  virtual bool hasPipeline() const;
70 
72  virtual DtResponse handleUpdateRequest(const DtCommand&);
73 
75  virtual void enableObservers();
76 
78  virtual void disableObservers();
79 
80  protected:
81 
83  static bool equals(const MAKLogger::DtStateObject* object,DtU64 id);
84 
86  virtual void updateState(const MAKLogger::DtMessageState&);
87 
89  virtual void activate(const MAKLogger::DtMessageState&);
90 
92  virtual void deactivate(const MAKLogger::DtMessageState&);
93 
95  virtual void endDiff(const MAKLogger::DtMessageState& state);
96 
98  MAKLogger::DtMessageState> MessageStateObserverFunctor;
99 
104 
105  std::set<DtU64> myActiveObjects;
106 
113 
115 
117  };
118 }
119 
The logger command which contains the command type and its parameters.
Definition: lgrCommand.h:109
MessageStateObserverFunctor myPostUpdateObserver
Definition: stateObModel.h:100
MessageStateObserverFunctor myActivateObserver
Definition: stateObModel.h:101
DtStateObserverController * myController
Definition: stateObModel.h:114
The implementation of the system logic of the State Observer.
Definition: stateObModel.h:30
MessageStateObserverFunctor myDeactivateObserver
Definition: stateObModel.h:102
This class provides the base interface for DtLgrCommandHandler.
Definition: lgrDriver.h:35
std::set< DtU64 > myActiveObjects
Definition: stateObModel.h:105
int myEnvProcCount
Definition: stateObModel.h:112
DtBoost::shared_ptr< const DtCommand > DtResponse
Definition: lgrCommand.h:174
A generic object that has state.
Definition: stateObject.h:27
int myTotalCount
Definition: stateObModel.h:107
MAKLogger::DtObserverFunctor< DtStateObserverModel, MAKLogger::DtMessageState > MessageStateObserverFunctor
Definition: stateObModel.h:98
int myAggregateCount
Definition: stateObModel.h:111
int myEntityCount
Definition: stateObModel.h:110
Contains MAKLogger::DtObserver and MAKLogger::DtObserverCallback and MAKLogger::DtObserverFunctor cla...
The implementation of the control logic for the state observer.
Definition: stateObController.h:26
ObserverFunctor is an observer implemented via Functor object which will call an object&#39;s member func...
Definition: observe.h:92
MessageStateObserverFunctor myEndDiffObserver
Definition: stateObModel.h:103
int myTotalDeadCount
Definition: stateObModel.h:109
int myTotalAliveCount
Definition: stateObModel.h:108
#define DT_DLL_STATEOBSERVER
Definition: stateObserver.h:19
bool myActivateObserverFlag
Definition: stateObModel.h:116
Contains the IMPORT/EXPORT macros.
The Abstract message state maintained by the logger.
Definition: messageState.h:33
Contains MAKLogger::DtLgrCommandHandler class.
DtLgrSystemDrive defines the lowest level driver which controls the logger.
Definition: lgrSystemDriver.h:43

Document ID: Generated on Thu Jul 14 15:45:33 EDT 2022 from SVN revision 244827
Copyright © 2021 MAK Technologies. All Rights Reserved (www.mak.com)