VR-Link API Documentation for HLA 1.3
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
resupplyOfferInteraction.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 resupplyOfferInteraction_H_
8
#define resupplyOfferInteraction_H_
9
10
#if DtHLA
11
12
#include "
interactionWithEncDec.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
DtResupplyOfferInteraction
;
27
class
DT_DLL_VL
DtExerciseConn
;
28
29
31
typedef
void (*
DtResupplyOfferInteractionCb
)
32
(
DtResupplyOfferInteraction
* inter,
void
* usr);
33
34
39
40
41
class
DT_DLL_VL
DtResupplyOfferInteraction
:
public
DtInteractionWithEncDec
42
{
43
public
:
44
46
DtResupplyOfferInteraction
();
47
49
virtual
~
DtResupplyOfferInteraction
();
50
52
DtResupplyOfferInteraction
(
const
DtResupplyOfferInteraction
& orig);
53
55
DtResupplyOfferInteraction
&
operator=
(
56
const
DtResupplyOfferInteraction
& orig);
57
59
virtual
void
printData
()
const
;
60
62
virtual
void
printDataToStream
(std::ostream& stream)
const
;
63
65
virtual
void
setReceivingId(
const
DtGlobalObjectDesignator
&receiver);
66
virtual
const
DtGlobalObjectDesignator
&receivingId()
const
;
67
69
virtual
void
setSupplyingId(
const
DtGlobalObjectDesignator
&supplier);
70
virtual
const
DtGlobalObjectDesignator
&supplyingId()
const
;
71
73
virtual
void
setSupplies(
const
void
* data,
int
numBytes);
74
virtual
const
void
* supplies()
const
;
75
77
virtual
void
setNumSupplyTypes(
int
numTypes);
78
virtual
int
numSupplyTypes()
const
;
79
80
virtual
void
setNthSupply(
int
supplyIndex,
const
DtEntityType
&supply,
81
float
quantity,
int
*retCode = NULL);
82
83
virtual
const
DtEntityType
&nthSupply(
int
supplyIndex,
84
float
*quantity = NULL,
85
int
*retCode = NULL)
const
;
86
87
virtual
float
supplyQuantity(
const
DtEntityType
&supply)
const
;
88
89
virtual
void
changeSuppliesSize(
int
newSize);
90
91
virtual
int
indexInBounds(
int
ind)
const
;
92
93
95
virtual
const
char
*
name
()
const
;
96
97
public
:
98
101
static
DtInteraction
* create();
102
105
static
void
addCallback
(
DtExerciseConn
* conn,
106
DtResupplyOfferInteractionCb
cb,
void
* usr,
107
DtDDMRegionSP
region =
DtDDMRegionSP
());
108
static
void
removeCallback
(
DtExerciseConn
* conn,
109
DtResupplyOfferInteractionCb
cb,
void
* usr,
110
DtDDMRegionSP
region =
DtDDMRegionSP
());
111
112
protected
:
113
114
DtGlobalObjectDesignator
myReceivingObject
;
115
DtGlobalObjectDesignator
mySupplyingObject
;
116
int
myNumSupplyTypes
;
117
DtNetSupplyQuantity
*
mySupplies
;
118
DtEntityType
myNthSupply
;
119
};
120
121
inline
const
DtGlobalObjectDesignator
&
DtResupplyOfferInteraction::
122
receivingId
()
const
123
{
124
return
myReceivingObject
;
125
}
126
127
inline
const
DtGlobalObjectDesignator
&
DtResupplyOfferInteraction::
128
supplyingId
()
const
129
{
130
return
mySupplyingObject
;
131
}
132
133
inline
void
DtResupplyOfferInteraction::setReceivingId
(
134
const
DtGlobalObjectDesignator
&receiver)
135
{
136
myReceivingObject
= receiver;
137
}
138
139
inline
void
DtResupplyOfferInteraction::setSupplyingId
(
140
const
DtGlobalObjectDesignator
&supplier)
141
{
142
mySupplyingObject
= supplier;
143
}
144
145
inline
const
char
*
DtResupplyOfferInteraction::name
()
const
146
{
147
return
"DtResupplyOfferInteraction"
;
148
}
149
150
#endif
151
#endif
152
Document ID: Generated on Fri Dec 2 02:42:08 EST 2016 from SVN revision 171416
Copyright © 2005-2016 VT MÄK. All Rights Reserved (
www.mak.com
)