VR-Link API Documentation for HLA 1.3
Home
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
include
vl
hResRecInter.h
Go to the documentation of this file.
1
/*********************************************************************
2
** Copyright (c) 1992-2010 VT MAK
3
** All rights reserved.
4
*********************************************************************/
5
6
7
#ifndef hResRecInter_H_
8
#define hResRecInter_H_
9
10
#if DtHLA
11
12
#include "
hIntWEncDec.h
"
13
#include "
hostStructs.h
"
14
#include <
matrix/vlMath.h
>
15
#include "
packets/logisticsP.h
"
16
17
18
22
23
#define DtSUPPLY_VALID 1
24
#define DtSUPPLY_BAD_INDEX 0
25
26
class
DT_DLL_VL
DtResupplyRecInteraction
;
27
class
DT_DLL_VL
DtExerciseConn
;
28
29
31
typedef
void (*
DtResupplyRecInteractionCb
)
32
(
DtResupplyRecInteraction
* inter,
void
* usr);
33
34
39
40
class
DT_DLL_VL
DtResupplyRecInteraction
:
public
DtInteractionWithEncDec
41
{
42
public
:
43
45
DtResupplyRecInteraction
();
46
48
virtual
~
DtResupplyRecInteraction
();
49
51
DtResupplyRecInteraction
(
const
DtResupplyRecInteraction
& orig);
52
54
DtResupplyRecInteraction
&
operator=
(
const
DtResupplyRecInteraction
& orig);
55
57
virtual
void
printData
()
const
;
58
60
virtual
void
printDataToStream
(std::ostream& stream)
const
;
61
63
virtual
void
setReceivingId(
const
DtGlobalObjectDesignator
&requester);
64
virtual
const
DtGlobalObjectDesignator
&receivingId()
const
;
65
67
virtual
void
setSupplyingId(
const
DtGlobalObjectDesignator
&servicer);
68
virtual
const
DtGlobalObjectDesignator
&supplyingId()
const
;
69
71
virtual
void
setSupplies(
const
void
* data,
int
numBytes);
72
virtual
const
void
* supplies()
const
;
73
75
virtual
void
setNumSupplyTypes(
int
numTypes);
76
virtual
int
numSupplyTypes()
const
;
77
78
virtual
void
setNthSupply(
int
supplyIndex,
const
DtEntityType
&supply,
79
float
quantity,
int
*retCode = NULL);
80
virtual
const
DtEntityType
&nthSupply(
int
supplyIndex,
81
float
*quantity = NULL,
82
int
*retCode = NULL)
const
;
83
84
virtual
float
supplyQuantity(
const
DtEntityType
&supply)
const
;
85
86
virtual
void
changeSuppliesSize(
int
newSize);
87
88
virtual
int
indexInBounds(
int
ind)
const
;
89
91
virtual
const
char
*
name
()
const
;
92
93
public
:
94
97
static
DtInteraction
* create();
98
101
static
void
addCallback
(
DtExerciseConn
* conn,
102
DtResupplyRecInteractionCb
cb,
void
* usr,
103
DtDDMRegionSP
region =
DtDDMRegionSP
());
104
static
void
removeCallback
(
DtExerciseConn
* conn,
105
DtResupplyRecInteractionCb
cb,
void
* usr,
106
DtDDMRegionSP
region =
DtDDMRegionSP
());
107
108
protected
:
109
110
DtGlobalObjectDesignator
myReceivingObject
;
111
DtGlobalObjectDesignator
mySupplyingObject
;
112
int
myNumSupplyTypes
;
113
DtNetSupplyQuantity
*
mySupplies
;
114
DtEntityType
myNthSupply
;
115
};
116
117
inline
const
DtGlobalObjectDesignator
&
DtResupplyRecInteraction::
118
receivingId
()
const
119
{
120
return
myReceivingObject
;
121
}
122
123
inline
const
DtGlobalObjectDesignator
&
DtResupplyRecInteraction::
124
supplyingId
()
const
125
{
126
return
mySupplyingObject
;
127
}
128
129
inline
void
DtResupplyRecInteraction::setReceivingId
(
130
const
DtGlobalObjectDesignator
&
id
)
131
{
132
myReceivingObject
= id;
133
}
134
135
inline
void
DtResupplyRecInteraction::setSupplyingId
(
136
const
DtGlobalObjectDesignator
&
id
)
137
{
138
mySupplyingObject
= id;
139
}
140
141
inline
const
char
*
DtResupplyRecInteraction::name
()
const
142
{
143
return
"DtResupplyRecInteraction"
;
144
}
145
146
#endif
147
#endif
148
Document ID: Generated on Wed Aug 14 15:35:11 EDT 2013 from SVN revision 130445
Copyright © 2005-2013 VT MÄK. All Rights Reserved (
www.mak.com
)