VR-Forces 4.1 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
include
vrfmsgs
ifEntityResourceResponse.h
Go to the documentation of this file.
1
/*******************************************************************************
2
** Copyright (c) 2004 MAK Technologies, Inc.
3
** All rights reserved.
4
*******************************************************************************/
5
/*******************************************************************************
6
** $RCSfile: ifEntityResourceResponse.h,v $ $Revision: 1.9 $ $State: Exp $
7
*******************************************************************************/
8
11
17
18
19
#ifndef DtIfEntityResourceResponse_H_
20
#define DtIfEntityResourceResponse_H_
21
22
#include <vlutil/vlString.h>
23
#include <
vrfExtProtocol/ifaceCont.h
>
24
#include <vlutil/vlNetTypes.h>
25
#include <vl/hostStructs.h>
26
27
#include <list>
28
29
class
DtSimResource
;
30
35
36
#include "
vrfmsgs/vrfmsgsDefines.h
"
37
class
DT_DLL_vrfmsgs
DtResource
38
{
39
public
:
40
DtResource
() {};
41
DtResource
& operator=(
const
DtResource
& res)
42
{
43
myResourceName = res.
myResourceName
;
44
myResourceType = res.
myResourceType
;
45
myCurrentAmount = res.
myCurrentAmount
;
46
myFullAmount = res.
myFullAmount
;
47
myResourceEntityType = res.
myResourceEntityType
;
48
49
return
*
this
;
50
};
51
52
DtNetFloat64 myCurrentAmount;
53
DtNetFloat64
myFullAmount
;
54
DtString
myResourceName
;
55
DtString
myResourceType
;
59
DtEntityType
myResourceEntityType
;
60
};
61
62
typedef
std::list<DtResource>
DtEntityResourceList
;
63
66
class
DT_DLL_vrfmsgs
DtIfEntityResourceResponse
:
public
DtSimInterfaceContent
67
{
68
69
public
:
71
DtIfEntityResourceResponse
();
72
74
DtIfEntityResourceResponse
(
const
DtIfEntityResourceResponse
& orig);
75
77
const
DtIfEntityResourceResponse
&
operator=
(
const
DtIfEntityResourceResponse
& orig);
78
79
virtual
~
DtIfEntityResourceResponse
();
80
82
virtual
int
type
()
const
;
83
84
virtual
DtSimInterfaceContent
*
clone
()
const
;
85
86
virtual
int
netRepSize
()
const
;
87
virtual
bool
setFromNet
(
const
char
* contentBuffer,
88
unsigned
contentSize);
89
virtual
bool
setToNet
();
90
virtual
bool
setToNet
(
char
* buffer);
91
92
virtual
void
printDataToString
(
DtString
& str);
93
94
static
DtSimInterfaceContent
* creator();
95
96
public
:
97
virtual
void
setObjectName(
const
DtString
& name);
98
const
DtString
&
objectName
()
const
{
return
myObjectName; };
99
100
virtual
void
addResource(
const
DtSimResource
* resource,
const
DtString
& fullName);
101
const
DtEntityResourceList
&
resources
()
const
{
return
myResources; };
102
105
virtual
bool
resourceInformation(
const
DtString
& resource,
106
DtResource
& resourceInfo)
const
;
107
108
protected
:
109
virtual
int
sizeOfResourceEntry(
const
DtResource
& entry)
const
;
110
virtual
char
*
setToNet
(
char
* buffer,
const
DtResource
& entry);
111
virtual
const
char
*
setFromNet
(
const
char
* buffer,
DtResource
& entry);
112
113
protected
:
114
DtString
myObjectName
;
115
DtEntityResourceList
myResources
;
116
};
117
118
#endif
Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (
www.mak.com
)