MAK Data Logger API Documentation for HLA
Home
Modules
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
examples
stateObserver
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 <
lgrDriver.h
>
15
#include <
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
30
class
DT_DLL_STATEOBSERVER
DtStateObserverModel
:
public
MAKLogger::DtLgrCommandHandler
31
{
32
public
:
33
35
DtStateObserverModel
(
DtStateObserverController
*,
36
MAKLogger::DtLgrSystemDriver
& driver);
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
97
typedef
MAKLogger::DtObserverFunctor
<
DtStateObserverModel
,
\
98
MAKLogger::DtMessageState
>
MessageStateObserverFunctor
;
99
100
MessageStateObserverFunctor
myPostUpdateObserver
;
101
MessageStateObserverFunctor
myActivateObserver
;
102
MessageStateObserverFunctor
myDeactivateObserver
;
103
MessageStateObserverFunctor
myEndDiffObserver
;
104
105
std::set<DtU64>
myActiveObjects
;
106
107
int
myTotalCount
;
108
int
myTotalAliveCount
;
109
int
myTotalDeadCount
;
110
int
myEntityCount
;
111
int
myAggregateCount
;
112
int
myEnvProcCount
;
113
114
DtStateObserverController
*
myController
;
115
116
bool
myActivateObserverFlag
;
117
};
118
}
119
Document ID: Generated on Sun Dec 15 18:04:30 EST 2013 from SVN revision 134418
Copyright © 2005-2012 VT MÄK. All Rights Reserved (
www.mak.com
)