VR-Link API Documentation for DIS
Home
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
include
vl
stateEncoder.h
Go to the documentation of this file.
1
/*********************************************************************
2
** Copyright (c) 1992-2010 VT MAK
3
** All rights reserved.
4
*********************************************************************/
5
9
10
#ifndef stateEncoder_H_
11
#define stateEncoder_H_
12
13
#if DtDIS
14
15
#include <
vlutil/vlMachineTypes.h
>
16
#include <
vl/pduEncoder.h
>
17
18
#define DtStateChange_FORCE 0x0001
19
#define DtStateChange_OTHER 0x0002
20
#define DtStateChange_ATTRIBUTES 0x0004
21
22
class
DtEntityIdentifier
;
23
class
DtPdu
;
24
class
DtStateRepository
;
25
26
#define DtCLONE_ENCODER(encoderClass) \
27
virtual DtPduEncoder* clone() const \
28
{ \
29
return new encoderClass(*this); \
30
}
31
33
class
DT_DLL_VL
DtStateEncoder
:
public
DtPduEncoder
34
{
35
public
:
37
DtStateEncoder
();
38
40
virtual
~
DtStateEncoder
();
41
43
DtStateEncoder
(
const
DtStateEncoder
& orig);
44
46
DtStateEncoder
& operator=(
const
DtStateEncoder
& orig);
47
49
virtual
void
setSendNeeded();
50
51
virtual
DtU32
changedState
()
const
{
return
myChangedState; }
52
virtual
void
clearChangedState
() { myChangedState = 0; }
53
virtual
bool
isChangedStateBit
(
DtU32
st)
const
{
return
myChangedState & st; }
54
virtual
void
resetChangedStateBit
(
DtU32
st) { myChangedState &= ~st; }
55
virtual
void
setChangedStateBit
(
DtU32
st) { myChangedState |= st; }
56
59
virtual
DtPduEncoder
*
clone
()
const
= 0;
60
62
virtual
void
encode
(
DtPdu
* pdu);
63
66
virtual
void
fillOutAttributeRecords(
67
const
DtStateRepository
& stateRep,
68
DtPduWithAttributeRecordSets
* pdu,
69
const
DtEntityIdentifier
&
id
,
bool
clearBeforeAdding =
true
);
70
73
virtual
bool
sendNeededAttributeRecords(
74
const
DtStateRepository
& stateRep,
75
const
DtStateRepository
& asSeenByRemote);
76
77
protected
:
78
bool
myForceSendNeeded
;
79
DtU32
myChangedState
;
80
};
81
82
#endif
83
#endif
Document ID: Generated on Mon Jun 22 21:18:40 EDT 2020 from SVN revision 213785
Copyright © 2005-2018 MAK Technologies. All Rights Reserved (
www.mak.com
)