VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
modelSetEntry.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #pragma once
7 
8 #include <vlutil/vlString.h>
11 #include <readerWriter/rwBoolean.h>
12 #include <readerWriter/rwString.h>
13 #include "vrfutil/rwForces.h"
18 #include "mtl/envValue.h"
19 #include "vrfXmlTypes.h"
20 
25 {
26 public:
29 
31  DtModelSetEntry(const DtString& name, DtReaderWriterRegistry* const parentRegistry = NULL);
32 
34  DtModelSetEntry(const DtModelSetEntry& orig, DtReaderWriterRegistry* const parentRegistry = NULL);
35 
38 
39  virtual ~DtModelSetEntry();
40 
41  virtual DtModelSetEntry* clone();
42 
43  virtual const char* readerWriterType();
44 
45  static DtModelSetEntry* create(const DtString& name, DtReaderWriterRegistry* const parentRegistry = NULL);
46 
47  DtString label() const;
48  void setLabel(const DtString&);
49 
50  DtString platform() const;
51  void setPlatform(const DtString&);
52 
53  DtString uniqueID() const;
54  void setUniqueID(const DtString&);
55 
58  void setIsRandomized(bool);
59  bool isRandomized() const;
60 
61  bool canCreate() const;
62  void setCanCreate(bool);
63 
64  bool canAggregate() const;
65  void setCanAggregate(bool);
66 
67  void setObjectType(const DtObjectType&);
68  const DtObjectType& objectType() const;
69 
72  void setMatchType(const DtObjectType&);
73  const DtObjectType& matchType() const;
74 
75  DtString menuIcon() const;
76  void setMenuIcon(const DtString&);
77 
78  void setKeywords(const DtString&);
79  DtString keywords() const;
80 
83  void setIncludeInBVSPCalcs(bool);
84  bool includeInBVSPCalcs() const;
85 
86  void setForces(const DtRwForces&);
87  const DtRwForces& forces() const;
88  DtRwForces& forces();
89 
90  void setCategories(const DtRwNLengthStringVector&);
91  const DtRwNLengthStringVector& categories() const;
92 
93  void addOnPalette(const DtString&);
94  void removeOnPalette(const DtString&);
95  void setOnlyOnPalette(const DtString&);
96 
97  void setOnPalettes(const DtRwNLengthStringVector&);
98  const DtRwNLengthStringVector& onPalettes() const;
99 
100  void setDefaultOverlayLayer(const DtString&);
101  DtString defaultOverlayLayer() const;
102 
103  void setDeployableCountries(const DtRwNLengthStringVector&);
104  const DtRwNLengthStringVector& deployableCountries() const;
105 
108  const DtRwStringAttributeList& iconLists() const;
109  DtRwStringAttributeList& iconLists();
110  void setIconLists(const DtRwStringAttributeList&);
111  void setIconForList(const DtString&, const DtString&);
112  DtString iconForList(const DtString&) const;
113 
114  virtual bool operator==(const DtModelSetEntry&) const;
115  virtual bool operator!=(const DtModelSetEntry&) const;
116 
117  virtual void getSelf(DtlObjPtr args,
119  const DtVariableBindingsList& variableBindings = nullVariableReference());
120 
124  virtual void readFromEnvironment(DtEnvironmentSP, DtEnvValueSP objectNode);
125 
128  virtual void writeToEnvironment(DtEnvironmentSP, DtEnvValueSP objectNode) const;
129 
130  virtual void updateImageData(char from, char to) const;
131 
132 protected:
149 
151 };
152 
154 {
155  return myIconLists;
156 }
157 
159 {
160  return myIconLists;
161 }
162 
164 {
165  myIconLists = l;
166 }
167 
168 inline void DtModelSetEntry::setIconForList(const DtString& icon, const DtString& list)
169 {
171  DtRwStringAttribute atr(list, list, icon);
173 }
174 
176 {
177  return myIconLists.value(key);
178 }
179 
180 inline void DtModelSetEntry::setLabel(const DtString& s)
181 {
182  myLabel = s;
183 }
184 
186 {
187  return myLabel;
188 }
189 
191 {
192  myPlatform = s;
193 }
194 
196 {
197  return myPlatform;
198 }
199 
201 {
202  myMenuIcon = s;
203 }
204 
206 {
207  return myMenuIcon;
208 }
209 
211 {
212  myKeywords = s;
213 }
214 
216 {
217  return myKeywords;
218 }
219 
221 {
223 }
224 
226 {
227  return myDefaultOverlayLayer;
228 }
229 
231 {
232  myUniqueID = s;
233 }
234 
236 {
237  return myUniqueID;
238 }
239 
240 inline void DtModelSetEntry::setCanCreate(bool b)
241 {
242  myCanCreate = b;
243 }
244 
245 inline bool DtModelSetEntry::canCreate() const
246 {
247  return myCanCreate;
248 }
249 
251 {
252  myCanAggregate = b;
253 }
254 
255 inline bool DtModelSetEntry::canAggregate() const
256 {
257  return myCanAggregate;
258 }
259 
261 {
262  myObjectType = o;
263 }
264 
266 {
267  return myObjectType;
268 }
269 
271 {
272  myMatchType = o;
273 }
274 
276 {
277  return myMatchType;
278 }
279 
281 {
282  myForces = f;
283 }
284 
285 inline const DtRwForces& DtModelSetEntry::forces() const
286 {
287  return myForces;
288 }
289 
291 {
292  return myForces;
293 }
294 
296 {
297  myCategories = c;
298 }
299 
301 {
302  return myCategories;
303 }
304 
306 {
307  myOnPalettes = c;
308 }
309 
311 {
312  return myOnPalettes;
313 }
314 
316 {
318 }
319 
321 {
322  return myDeployableCountries;
323 }
324 
326 {
328 }
329 
331 {
332  return myIncludeInBVSPCalcs;
333 }
334 
336 {
337  myIsRandomized = b;
338 }
339 
340 inline bool DtModelSetEntry::isRandomized() const
341 {
342  return myIsRandomized;
343 }
bool operator==(const DtReaderWriter &) const
Equivalence operator.
DtRwNLengthStringVector myDeployableCountries
Definition: modelSetEntry.h:144
virtual DtString value(const DtString &) const
Given the key, return the value.
**virtual void setObjectType(const DtObjectType &)
virtual const char * readerWriterType() const
Used to supply a string type that this reader writer type is.
bool canAggregate() const
Definition: modelSetEntry.h:255
void setDefaultOverlayLayer(const DtString &)
Definition: modelSetEntry.h:220
const DtRwForces & forces() const
Definition: modelSetEntry.h:285
void setCategories(const DtRwNLengthStringVector &)
Definition: modelSetEntry.h:295
void setIncludeInBVSPCalcs(bool)
Whether or not to include in bounding volume or support point calcs from the entity editor...
Definition: modelSetEntry.h:325
DtRwString myUniqueID
Definition: modelSetEntry.h:136
bool canCreate() const
Definition: modelSetEntry.h:245
void setIconForList(const DtString &, const DtString &)
Definition: modelSetEntry.h:168
DtRwBoolean myCanAggregate
Definition: modelSetEntry.h:134
class DtRwObjectType:
Definition: rwObjectType.h:18
#define DT_DLL_vrfobjparam
This file is used to determine how to build.
Definition: vrfobjparamDefines.h:28
DtRwNLengthStringVector is a named, readable/writable vector of strings of arbitrary length...
Definition: rwNLengthStringVector.h:28
DtRwString myKeywords
Definition: modelSetEntry.h:137
void setDeployableCountries(const DtRwNLengthStringVector &)
Definition: modelSetEntry.h:315
void setPlatform(const DtString &)
Definition: modelSetEntry.h:190
DtRwNLengthStringVector myCategories
Definition: modelSetEntry.h:143
DT_DLL_readerWriter DtBoost::shared_ptr< DtEnvironment > DtEnvironmentSP
Definition: readerWriter.h:30
DtRwBoolean myIncludeInBVSPCalcs
Definition: modelSetEntry.h:146
DtString defaultOverlayLayer() const
Definition: modelSetEntry.h:225
void setObjectType(const DtObjectType &)
Definition: modelSetEntry.h:260
DtRwString myMenuIcon
Definition: modelSetEntry.h:138
const DtRwNLengthStringVector & categories() const
Definition: modelSetEntry.h:300
void setUniqueID(const DtString &)
Definition: modelSetEntry.h:230
DtRwForces myForces
Definition: modelSetEntry.h:141
Definition: readerWriter.h:85
Description: Readable, Writable DtString Variable substitutions are done on this object when it is re...
Definition: rwString.h:20
bool isRandomized() const
Definition: modelSetEntry.h:340
*virtual const DtObjectType & objectType() const
DtString label() const
Definition: modelSetEntry.h:185
DtRwBoolean myCanCreate
Definition: modelSetEntry.h:133
Definition: readerWriterRegistry.h:39
DtRwObjectType myObjectType
Definition: modelSetEntry.h:140
const DtObjectType & objectType() const
Definition: modelSetEntry.h:265
void setKeywords(const DtString &)
Definition: modelSetEntry.h:210
DtString keywords() const
Definition: modelSetEntry.h:215
void setCanAggregate(bool)
Definition: modelSetEntry.h:250
DtRwStringAttributeList myIconLists
Definition: modelSetEntry.h:145
Definition: objectType.h:27
DtString menuIcon() const
Definition: modelSetEntry.h:205
Description: A model is a set of items that defines a model to create in the back-end from the front-...
Definition: modelSetEntry.h:24
const DtObjectType & matchType() const
Definition: modelSetEntry.h:275
void setMatchType(const DtObjectType &)
The match type is a second entry that can be used to match against an object type.
Definition: modelSetEntry.h:270
DtObjectType myMatchType
Definition: modelSetEntry.h:150
std::list< const DtRwVariableBindings * > DtVariableBindingsList
Definition: readerWriterRegistry.h:29
void setMenuIcon(const DtString &)
Definition: modelSetEntry.h:200
std::vector< DtFilename > SearchPaths
Definition: readerWriter.h:92
const DtRwStringAttributeList & iconLists() const
Accesor/mutator for list icons that can be applied to a category of list selected.
Definition: modelSetEntry.h:153
DtString platform() const
Definition: modelSetEntry.h:195
DtString uniqueID() const
Definition: modelSetEntry.h:235
virtual void getSelf(DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &variableBindings=nullVariableReference())
Top level to read itself from an input stream.
Description: A readable, writable list of DtForceType.
Definition: rwForces.h:34
static const DtVariableBindingsList & nullVariableReference()
void setOnPalettes(const DtRwNLengthStringVector &)
Definition: modelSetEntry.h:305
class DtRwStringAttribute:
Definition: rwStringAttribute.h:19
DtRwNLengthStringVector myOnPalettes
Definition: modelSetEntry.h:142
Description: Readable, Writable bool.
Definition: rwBoolean.h:26
virtual void removeStringAttribute(const DtString &key)
bool includeInBVSPCalcs() const
Definition: modelSetEntry.h:330
const DtRwNLengthStringVector & deployableCountries() const
Definition: modelSetEntry.h:320
virtual DtRwStringAttribute * addStringAttribute(const DtRwStringAttribute &stringAttribute)
const DtReaderWriter & operator=(const DtReaderWriter &orig)
assignment operator
void setIsRandomized(bool)
Whether or not this model represents a randomized object type.
Definition: modelSetEntry.h:335
DtString iconForList(const DtString &) const
Definition: modelSetEntry.h:175
bool operator!=(const DtReaderWriter &rhs)
Definition: readerWriter.h:121
void setIconLists(const DtRwStringAttributeList &)
Definition: modelSetEntry.h:163
DtRwString myLabel
Definition: modelSetEntry.h:135
DtRwString myDefaultOverlayLayer
Definition: modelSetEntry.h:139
void setForces(const DtRwForces &)
Definition: modelSetEntry.h:280
void setLabel(const DtString &)
Definition: modelSetEntry.h:180
const DtRwNLengthStringVector & onPalettes() const
Definition: modelSetEntry.h:310
void setCanCreate(bool)
Definition: modelSetEntry.h:240
class DtRwStringAttributeList:
Definition: rwStringAttributeList.h:29
DtRwBoolean myIsRandomized
Definition: modelSetEntry.h:148
DtString myPlatform
Definition: modelSetEntry.h:147

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)