VR-Forces 4.10 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 
129  virtual void writeToEnvironment(DtEnvironmentSP, DtEnvValueSP objectNode, std::vector<DtString>* = nullptr, DtModelSetEntry* = nullptr) const;
130 
131  virtual void updateImageData(char from, char to) const;
132 
133 protected:
150 
152 };
153 
155 {
156  return myIconLists;
157 }
158 
160 {
161  return myIconLists;
162 }
163 
165 {
166  myIconLists = l;
167 }
168 
169 inline void DtModelSetEntry::setIconForList(const DtString& icon, const DtString& list)
170 {
172  DtRwStringAttribute atr(list, list, icon);
174 }
175 
177 {
178  return myIconLists.value(key);
179 }
180 
181 inline void DtModelSetEntry::setLabel(const DtString& s)
182 {
183  myLabel = s;
184 }
185 
187 {
188  return myLabel;
189 }
190 
192 {
193  myPlatform = s;
194 }
195 
197 {
198  return myPlatform;
199 }
200 
202 {
203  myMenuIcon = s;
204 }
205 
207 {
208  return myMenuIcon;
209 }
210 
212 {
213  myKeywords = s;
214 }
215 
217 {
218  return myKeywords;
219 }
220 
222 {
224 }
225 
227 {
228  return myDefaultOverlayLayer;
229 }
230 
232 {
233  myUniqueID = s;
234 }
235 
237 {
238  return myUniqueID;
239 }
240 
241 inline void DtModelSetEntry::setCanCreate(bool b)
242 {
243  myCanCreate = b;
244 }
245 
246 inline bool DtModelSetEntry::canCreate() const
247 {
248  return myCanCreate;
249 }
250 
252 {
253  myCanAggregate = b;
254 }
255 
256 inline bool DtModelSetEntry::canAggregate() const
257 {
258  return myCanAggregate;
259 }
260 
262 {
263  myObjectType = o;
264 }
265 
267 {
268  return myObjectType;
269 }
270 
272 {
273  myMatchType = o;
274 }
275 
277 {
278  return myMatchType;
279 }
280 
282 {
283  myForces = f;
284 }
285 
286 inline const DtRwForces& DtModelSetEntry::forces() const
287 {
288  return myForces;
289 }
290 
292 {
293  return myForces;
294 }
295 
297 {
298  myCategories = c;
299 }
300 
302 {
303  return myCategories;
304 }
305 
307 {
308  myOnPalettes = c;
309 }
310 
312 {
313  return myOnPalettes;
314 }
315 
317 {
319 }
320 
322 {
323  return myDeployableCountries;
324 }
325 
327 {
329 }
330 
332 {
333  return myIncludeInBVSPCalcs;
334 }
335 
337 {
338  myIsRandomized = b;
339 }
340 
341 inline bool DtModelSetEntry::isRandomized() const
342 {
343  return myIsRandomized;
344 }
bool operator==(const DtReaderWriter &) const
Equivalence operator.
DtRwNLengthStringVector myDeployableCountries
Definition: modelSetEntry.h:145
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:256
void setDefaultOverlayLayer(const DtString &)
Definition: modelSetEntry.h:221
const DtRwForces & forces() const
Definition: modelSetEntry.h:286
void setCategories(const DtRwNLengthStringVector &)
Definition: modelSetEntry.h:296
void setIncludeInBVSPCalcs(bool)
Whether or not to include in bounding volume or support point calcs from the entity editor...
Definition: modelSetEntry.h:326
DtRwString myUniqueID
Definition: modelSetEntry.h:137
bool canCreate() const
Definition: modelSetEntry.h:246
void setIconForList(const DtString &, const DtString &)
Definition: modelSetEntry.h:169
DtRwBoolean myCanAggregate
Definition: modelSetEntry.h:135
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:138
void setDeployableCountries(const DtRwNLengthStringVector &)
Definition: modelSetEntry.h:316
void setPlatform(const DtString &)
Definition: modelSetEntry.h:191
DtRwNLengthStringVector myCategories
Definition: modelSetEntry.h:144
DT_DLL_readerWriter DtBoost::shared_ptr< DtEnvironment > DtEnvironmentSP
Definition: readerWriter.h:30
DtRwBoolean myIncludeInBVSPCalcs
Definition: modelSetEntry.h:147
DtString defaultOverlayLayer() const
Definition: modelSetEntry.h:226
void setObjectType(const DtObjectType &)
Definition: modelSetEntry.h:261
DtRwString myMenuIcon
Definition: modelSetEntry.h:139
const DtRwNLengthStringVector & categories() const
Definition: modelSetEntry.h:301
void setUniqueID(const DtString &)
Definition: modelSetEntry.h:231
DtRwForces myForces
Definition: modelSetEntry.h:142
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:341
*virtual const DtObjectType & objectType() const
DtString label() const
Definition: modelSetEntry.h:186
DtRwBoolean myCanCreate
Definition: modelSetEntry.h:134
Definition: readerWriterRegistry.h:39
DtRwObjectType myObjectType
Definition: modelSetEntry.h:141
const DtObjectType & objectType() const
Definition: modelSetEntry.h:266
void setKeywords(const DtString &)
Definition: modelSetEntry.h:211
DtString keywords() const
Definition: modelSetEntry.h:216
void setCanAggregate(bool)
Definition: modelSetEntry.h:251
DtRwStringAttributeList myIconLists
Definition: modelSetEntry.h:146
Definition: objectType.h:27
DtString menuIcon() const
Definition: modelSetEntry.h:206
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:276
void setMatchType(const DtObjectType &)
The match type is a second entry that can be used to match against an object type.
Definition: modelSetEntry.h:271
DtObjectType myMatchType
Definition: modelSetEntry.h:151
std::list< const DtRwVariableBindings * > DtVariableBindingsList
Definition: readerWriterRegistry.h:29
void setMenuIcon(const DtString &)
Definition: modelSetEntry.h:201
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:154
DtString platform() const
Definition: modelSetEntry.h:196
DtString uniqueID() const
Definition: modelSetEntry.h:236
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:306
class DtRwStringAttribute:
Definition: rwStringAttribute.h:19
DtRwNLengthStringVector myOnPalettes
Definition: modelSetEntry.h:143
Description: Readable, Writable bool.
Definition: rwBoolean.h:26
virtual void removeStringAttribute(const DtString &key)
bool includeInBVSPCalcs() const
Definition: modelSetEntry.h:331
const DtRwNLengthStringVector & deployableCountries() const
Definition: modelSetEntry.h:321
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:336
DtString iconForList(const DtString &) const
Definition: modelSetEntry.h:176
bool operator!=(const DtReaderWriter &rhs)
Definition: readerWriter.h:121
void setIconLists(const DtRwStringAttributeList &)
Definition: modelSetEntry.h:164
DtRwString myLabel
Definition: modelSetEntry.h:136
DtRwString myDefaultOverlayLayer
Definition: modelSetEntry.h:140
void setForces(const DtRwForces &)
Definition: modelSetEntry.h:281
void setLabel(const DtString &)
Definition: modelSetEntry.h:181
const DtRwNLengthStringVector & onPalettes() const
Definition: modelSetEntry.h:311
void setCanCreate(bool)
Definition: modelSetEntry.h:241
class DtRwStringAttributeList:
Definition: rwStringAttributeList.h:29
DtRwBoolean myIsRandomized
Definition: modelSetEntry.h:149
DtString myPlatform
Definition: modelSetEntry.h:148

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)