VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
rwAffectableEngineeringObject.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2014 MaK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
9 
10 #pragma once
11 
12 #include "vrfutil/vrfutilDefines.h"
15 #include <vrfutil/rwEntityType.h>
16 #include <readerWriter/rwReal.h>
17 #include <readerWriter/rwString.h>
18 #include <readerWriter/rwList.h>
19 
23 {
24 public:
25  DtRwAffectableEngineeringObject(const DtString& name = DtString::nullString(),
26  DtReaderWriterRegistry* const parentRegistry = NULL);
27 
29  virtual ~DtRwAffectableEngineeringObject() override;
30 
33  const DtString& name = DtString::nullString(),
34  DtReaderWriterRegistry* parentRegistry = NULL);
35 
38 
40  {
41  return (myObjectType < rhs.myObjectType);
42  }
43 
44  bool operator<(const DtEntityType& rhs)
45  {
46  return (myObjectType < rhs);
47  }
48 
50  {
51  return (DtReaderWriter::operator==(rhs) && (myObjectType == rhs.myObjectType) &&
52  (myTimeToComplete == rhs.myTimeToComplete) &&
53  (myTimeToSetup == rhs.myTimeToSetup) &&
54  (myRange == rhs.myRange) &&
55  (myDestructionResource == rhs.myDestructionResource) &&
56  (myDestructionResourceAmount == rhs.myDestructionResourceAmount) &&
57  (myCreateScriptId == rhs.myCreateScriptId) &&
58  (myImproveScriptId == rhs.myImproveScriptId) &&
59  (myDestroyScriptId == rhs.myDestroyScriptId) &&
60  (myProhibitedTerrainQueryName == rhs.myProhibitedTerrainQueryName));
61  }
62 
66  virtual const char* readerWriterType() const override;
67 
69  static const char* theXmlType();
70 
71  virtual const char* xmlType() const override
72  {
73  return theXmlType();
74  }
75 
78  virtual const DtEntityType& objectType() const;
79  virtual void setObjectType(const DtEntityType&);
81 
84  virtual double timeToComplete() const;
85  virtual void setTimeToComplete(double);
87 
90  virtual double timeToSetup() const;
91  virtual void setTimeToSetup(double);
93 
96  virtual double range() const;
97  virtual void setRange(double);
99 
102  virtual const DtString& destructionResource() const;
103  virtual void setDestructionResource(const DtString&);
105 
109  virtual double destructionResourceAmount() const;
110  virtual void setDestructionResourceAmount(double);
112 
115  virtual const DtString& createScriptId() const;
116  virtual void setCreateScriptId(const DtString&);
118 
121  virtual const DtString& improveScriptId() const;
122  virtual void setImproveScriptId(const DtString&);
124 
127  virtual const DtString& destroyScriptId() const;
128  virtual void setDestroyScriptId(const DtString&);
130 
134  virtual const DtString& prohibitedTerrainQueryName() const;
135  virtual void setProhibitedTerrainQueryName(const DtString&);
137 
138 protected:
149 };
150 
152 
153 
virtual const char * readerWriterType() const
Used to supply a string type that this reader writer type is. This can be used in place of dynamic-ca...
DtRwString myDestroyScriptId
Definition: rwAffectableEngineeringObject.h:147
DtRwString myCreateScriptId
Definition: rwAffectableEngineeringObject.h:145
Definition: readerWriter.h:85
Description: Readable, Writable DtString Variable substitutions are done on this object when it is re...
Definition: rwString.h:20
Definition: readerWriterRegistry.h:39
bool operator==(const DtRwAffectableEngineeringObject &rhs) const
Definition: rwAffectableEngineeringObject.h:49
DtRwString myDestructionResource
Definition: rwAffectableEngineeringObject.h:143
bool operator<(const DtRwAffectableEngineeringObject &rhs)
Definition: rwAffectableEngineeringObject.h:39
DtRwReal myTimeToComplete
Definition: rwAffectableEngineeringObject.h:140
DtRwString myProhibitedTerrainQueryName
Definition: rwAffectableEngineeringObject.h:148
DtRwReal myTimeToSetup
Definition: rwAffectableEngineeringObject.h:141
DtRwString myImproveScriptId
Definition: rwAffectableEngineeringObject.h:146
Description: Readable, Writable DtReal (double)
Definition: rwReal.h:27
File: rwEntType.h.
Definition: rwEntityType.h:26
bool operator<(const DtEntityType &rhs)
Definition: rwAffectableEngineeringObject.h:44
DtRwReal myRange
Definition: rwAffectableEngineeringObject.h:142
#define DT_DLL_vrfutil
This file is used to determine how to build Disable inconsistent dll linkage warning Visual Studio 6...
Definition: vrfutilDefines.h:34
virtual const char * xmlType() const override
Definition: rwAffectableEngineeringObject.h:71
DtRwAffectableEngineeringObject holds a the information needed to know how a unit may create a type o...
Definition: rwAffectableEngineeringObject.h:22
DtRwEntityType myObjectType
Definition: rwAffectableEngineeringObject.h:139
const DtReaderWriter & operator=(const DtReaderWriter &orig)
assignment operator
DtRwReal myDestructionResourceAmount
Definition: rwAffectableEngineeringObject.h:144
static const char * theXmlType()
The type that is used when archiving to an XML stream.
DtRwTemplatedListPtr< DtRwAffectableEngineeringObject, true > DtRwAffectableEngineeringObjectList
Definition: rwAffectableEngineeringObject.h:151

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)