VR-Forces 4.3.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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/simInterfaceContent.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"
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;
59  DtEntityType myResourceEntityType;
60 };
61 
62 typedef std::list<DtResource> DtEntityResourceList;
63 
67 {
68 
69 public:
72 
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:
116 };
117 
118 #endif

Document ID: Generated on Wed Jul 29 00:55:00 EDT 2015 from SVN revision 155257
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)