VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
artPartsAdmin.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2019 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
13 #include "vrftasks/adminContent.h"
14 #include <list>
15 
20 {
21 public:
22 
24  {
25  double current;
26  double min;
27  double max;
28  };
29 
30  typedef std::map<int, CurrentMinAndMax> ParamInfo;
31  typedef std::map<int, ParamInfo> PartParamInfo;
32 
35 
37  DtArtPartsAdmin(const DtArtPartsAdmin & orig);
38 
40  const DtArtPartsAdmin & operator=(const DtArtPartsAdmin & orig);
41 
43  virtual ~DtArtPartsAdmin();
44 
46  static DtAdminContent* create();
47 
49  virtual bool init();
50 
52  virtual const DtAdminContentMessageType& type() const;
53 
55 
56  virtual const PartParamInfo& artParts() const;
57  virtual PartParamInfo& artParts();
59 
61  virtual void addArtPart(int partType);
62 
64 
65  virtual const ParamInfo& artPartParams(int partType) const;
66  virtual ParamInfo& artPartParams(int partType);
68 
70  virtual void setArtPartParam(int partType, int paramType, double current,
71  double min, double max);
72 
74  virtual void clearArtParts();
75 
78  virtual DtAdminContent * clone() const;
79 
81  virtual DtString stringRep() const;
82 
84  virtual int netRepSize() const;
85 
87  virtual bool setFromNet(const char* contentBuffer,
88  unsigned contentSize);
89 
91  virtual bool setToNet();
92 
93 protected:
94 
97 };
98 
99 #ifdef _MSC_VER
100 namespace DtBufferSerialize
101 {
102 #endif
103  DT_DLL_vrftasks char *encode(const DtArtPartsAdmin::CurrentMinAndMax& val, char *buffer);
104  DT_DLL_vrftasks const char *decode(DtArtPartsAdmin::CurrentMinAndMax& val, const char *buffer);
106 #ifdef _MSC_VER
107 }
108 #endif
109 
virtual bool setFromNet(const char *contentBuffer, unsigned contentSize)
Sets the contents of this set request based on the network buffer. Base class does nothing and return...
std::map< int, CurrentMinAndMax > ParamInfo
Definition: artPartsAdmin.h:30
DT_DLL_readerWriter int getSize(const DtString &val)
The number of bytes required to encode the value.
virtual int netRepSize() const
double max
Definition: artPartsAdmin.h:27
virtual DtAdminContent * clone() const =0
Make a copy of this content. Returns a pointer to a newly created copy of this class. Derived classes must override this function to create and return an instance of the derived type.
Definition: vrfObjectMessageTypeTemplate.h:24
double min
Definition: artPartsAdmin.h:26
const DtAdminContent & operator=(const DtAdminContent &orig)
assignment operator; same as copy costructor.
double current
Definition: artPartsAdmin.h:25
Admin content which contains the list of art parts, their parameters, and limits for a particular ent...
Definition: artPartsAdmin.h:19
DT_DLL_readerWriter char * encode(const DtFilename &val, char *buffer)
Serializes the provided value val into buffer. buffer must have at least the number of bytes returned...
std::map< int, ParamInfo > PartParamInfo
Definition: artPartsAdmin.h:31
#define DT_DLL_vrftasks
This file is used to determine how to build.
Definition: vrftasksDefines.h:26
Definition: artPartsAdmin.h:23
virtual bool init()
Base class init does nothing, but this will be called by create, in case any other deriving class nee...
DtAdminContent.
Definition: adminContent.h:23
virtual const DtAdminContentMessageType & type() const =0
virtual bool setToNet()
Sets netRep buffer to the contents of this set request. Base class does nothing and returns true...
DT_DLL_readerWriter const char * decode(DtString &val, const char *buffer)
Decodes a value from buffer and places the result in val of the type specified by val...
virtual DtString stringRep() const =0
Get a readable string representation of this content. Derived classes must implement this function...
PartParamInfo myArtPartParams
The list of available parts and their parameters.
Definition: artPartsAdmin.h:96

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)