VR-Forces 5.0.1 Developer's Guide
 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) 2022 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 
24 
31 class DtModelSetEntry;
32 typedef DtModelSetEntry* (*DtModelSetEntryCreatorFcn)(const DtString&, DtReaderWriterRegistry* parentRegistry);
33 
35 {
36 public:
39 
41  DtModelSetEntry(const DtString& name, DtReaderWriterRegistry* const parentRegistry = nullptr);
42 
44  DtModelSetEntry(const DtModelSetEntry& orig, DtReaderWriterRegistry* const parentRegistry = nullptr);
45 
47  virtual DtModelSetEntry& operator=(const DtModelSetEntry & orig);
48 
49  virtual ~DtModelSetEntry();
50 
51  virtual DtModelSetEntry* clone();
52 
53  virtual const char* readerWriterType();
54 
57  static DtModelSetEntryCreatorFcn SetModelSetEntryCreatorFcn(DtModelSetEntryCreatorFcn);
58  static DtModelSetEntryCreatorFcn ModelSetEntryCreatorFcn();
59  static DtModelSetEntry* Create(const DtString& name = "model-set-entry", DtReaderWriterRegistry* const parentRegistry = nullptr);
61 
62  DtString label() const;
63  void setLabel(const DtString&);
64 
65  DtString platform() const;
66  void setPlatform(const DtString&);
67 
68  DtString uniqueID() const;
69  void setUniqueID(const DtString&);
70 
73  void setIsRandomized(bool);
74  bool isRandomized() const;
75 
76  bool canCreate() const;
77  void setCanCreate(bool);
78 
79  bool canAggregate() const;
80  void setCanAggregate(bool);
81 
82  void setObjectType(const DtObjectType&);
83  const DtObjectType& objectType() const;
84 
87  void setMatchType(const DtObjectType&);
88  const DtObjectType& matchType() const;
89 
90  DtString menuIcon() const;
91  void setMenuIcon(const DtString&);
92 
93  void setKeywords(const DtString&);
94  DtString keywords() const;
95 
98  void setIncludeInBVSPCalcs(bool);
99  bool includeInBVSPCalcs() const;
100 
101  void setForces(const DtRwForces&);
102  const DtRwForces& forces() const;
103  DtRwForces& forces();
104 
105  void setCategories(const DtRwNLengthStringVector&);
106  const DtRwNLengthStringVector& categories() const;
107 
108  void addOnPalette(const DtString&);
109  void removeOnPalette(const DtString&);
110  void setOnlyOnPalette(const DtString&);
111 
112  void setOnPalettes(const DtRwNLengthStringVector&);
113  const DtRwNLengthStringVector& onPalettes() const;
114 
115  void setDefaultOverlayLayer(const DtString&);
116  DtString defaultOverlayLayer() const;
117 
118  void setDeployableCountries(const DtRwNLengthStringVector&);
119  const DtRwNLengthStringVector& deployableCountries() const;
120 
123  const DtRwStringAttributeList& iconLists() const;
124  DtRwStringAttributeList& iconLists();
125  void setIconLists(const DtRwStringAttributeList&);
126  void setIconForList(const DtString&, const DtString&);
127  DtString iconForList(const DtString&) const;
128 
129  virtual bool operator==(const DtModelSetEntry&) const;
130  virtual bool operator!=(const DtModelSetEntry&) const;
131 
132  virtual void getSelf(DtlObjPtr args,
134  const DtVariableBindingsList& variableBindings = nullVariableReference());
135 
139  virtual void readFromEnvironment(DtEnvironmentSP, DtEnvValueSP objectNode);
140 
144  virtual void writeToEnvironment(DtEnvironmentSP, DtEnvValueSP objectNode, std::vector<DtString>* = nullptr, DtModelSetEntry* = nullptr) const;
145 
146  virtual void updateImageData(char from, char to) const;
147 
148 protected:
165 
168 };
169 
171 {
172  return myIconLists;
173 }
174 
176 {
177  return myIconLists;
178 }
179 
181 {
182  myIconLists = l;
183 }
184 
185 inline void DtModelSetEntry::setIconForList(const DtString& icon, const DtString& list)
186 {
188  DtRwStringAttribute atr(list, list, icon);
190 }
191 
193 {
194  return myIconLists.value(key);
195 }
196 
197 inline void DtModelSetEntry::setLabel(const DtString& s)
198 {
199  myLabel = s;
200 }
201 
203 {
204  return myLabel;
205 }
206 
208 {
209  myPlatform = s;
210 }
211 
213 {
214  return myPlatform;
215 }
216 
218 {
219  myMenuIcon = s;
220 }
221 
223 {
224  return myMenuIcon;
225 }
226 
228 {
229  myKeywords = s;
230 }
231 
233 {
234  return myKeywords;
235 }
236 
238 {
240 }
241 
243 {
244  return myDefaultOverlayLayer;
245 }
246 
248 {
249  myUniqueID = s;
250 }
251 
253 {
254  return myUniqueID;
255 }
256 
257 inline void DtModelSetEntry::setCanCreate(bool b)
258 {
259  myCanCreate = b;
260 }
261 
262 inline bool DtModelSetEntry::canCreate() const
263 {
264  return myCanCreate;
265 }
266 
268 {
269  myCanAggregate = b;
270 }
271 
272 inline bool DtModelSetEntry::canAggregate() const
273 {
274  return myCanAggregate;
275 }
276 
278 {
279  myObjectType = o;
280 }
281 
283 {
284  return myObjectType;
285 }
286 
288 {
289  myMatchType = o;
290 }
291 
293 {
294  return myMatchType;
295 }
296 
298 {
299  myForces = f;
300 }
301 
302 inline const DtRwForces& DtModelSetEntry::forces() const
303 {
304  return myForces;
305 }
306 
308 {
309  return myForces;
310 }
311 
313 {
314  myCategories = c;
315 }
316 
318 {
319  return myCategories;
320 }
321 
323 {
324  myOnPalettes = c;
325 }
326 
328 {
329  return myOnPalettes;
330 }
331 
333 {
335 }
336 
338 {
339  return myDeployableCountries;
340 }
341 
343 {
345 }
346 
348 {
349  return myIncludeInBVSPCalcs;
350 }
351 
353 {
354  myIsRandomized = b;
355 }
356 
357 inline bool DtModelSetEntry::isRandomized() const
358 {
359  return myIsRandomized;
360 }
bool operator==(const DtReaderWriter &) const
Equivalence operator.
DtRwNLengthStringVector myDeployableCountries
Definition: modelSetEntry.h:160
virtual DtString value(const DtString &) const
Given the key, return the value.
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...
bool canAggregate() const
Definition: modelSetEntry.h:272
void setDefaultOverlayLayer(const DtString &)
Definition: modelSetEntry.h:237
const DtRwForces & forces() const
Definition: modelSetEntry.h:302
void setCategories(const DtRwNLengthStringVector &)
Definition: modelSetEntry.h:312
void setIncludeInBVSPCalcs(bool)
Whether or not to include in bounding volume or support point calcs from the entity editor...
Definition: modelSetEntry.h:342
DtRwString myUniqueID
Definition: modelSetEntry.h:152
bool canCreate() const
Definition: modelSetEntry.h:262
void setIconForList(const DtString &, const DtString &)
Definition: modelSetEntry.h:185
DtRwBoolean myCanAggregate
Definition: modelSetEntry.h:150
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:153
void setDeployableCountries(const DtRwNLengthStringVector &)
Definition: modelSetEntry.h:332
void setPlatform(const DtString &)
Definition: modelSetEntry.h:207
DtRwNLengthStringVector myCategories
Definition: modelSetEntry.h:159
DT_DLL_readerWriter DtBoost::shared_ptr< DtEnvironment > DtEnvironmentSP
Definition: readerWriter.h:30
DtRwBoolean myIncludeInBVSPCalcs
Definition: modelSetEntry.h:162
DtString defaultOverlayLayer() const
Definition: modelSetEntry.h:242
void setObjectType(const DtObjectType &)
Definition: modelSetEntry.h:277
DtRwString myMenuIcon
Definition: modelSetEntry.h:154
const DtRwNLengthStringVector & categories() const
Definition: modelSetEntry.h:317
void setUniqueID(const DtString &)
Definition: modelSetEntry.h:247
DtRwForces myForces
Definition: modelSetEntry.h:157
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:357
DtString label() const
Definition: modelSetEntry.h:202
DtRwBoolean myCanCreate
Definition: modelSetEntry.h:149
Definition: readerWriterRegistry.h:39
DtRwObjectType myObjectType
Definition: modelSetEntry.h:156
const DtObjectType & objectType() const
Definition: modelSetEntry.h:282
void setKeywords(const DtString &)
Definition: modelSetEntry.h:227
DtString keywords() const
Definition: modelSetEntry.h:232
void setCanAggregate(bool)
Definition: modelSetEntry.h:267
DtRwStringAttributeList myIconLists
Definition: modelSetEntry.h:161
Definition: objectType.h:27
DtString menuIcon() const
Definition: modelSetEntry.h:222
Definition: modelSetEntry.h:34
const DtObjectType & matchType() const
Definition: modelSetEntry.h:292
void setMatchType(const DtObjectType &)
The match type is a second entry that can be used to match against an object type. When finding this entry in a model set by matching by pattern, this match type (if specified) will be looked at first, then the more general object type for pattern matching.
Definition: modelSetEntry.h:287
DtObjectType myMatchType
Definition: modelSetEntry.h:166
static DtModelSetEntryCreatorFcn theModelSetEntryCreatorFcn
Definition: modelSetEntry.h:167
std::list< const DtRwVariableBindings * > DtVariableBindingsList
Definition: readerWriterRegistry.h:29
void setMenuIcon(const DtString &)
Definition: modelSetEntry.h:217
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. If the object does not have an icon for the list then the default font (or menu image) will be used as a display.
Definition: modelSetEntry.h:170
DtString platform() const
Definition: modelSetEntry.h:212
DtString uniqueID() const
Definition: modelSetEntry.h:252
virtual void getSelf(DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &variableBindings=nullVariableReference())
Top level to read itself from an input stream. searchPath is passed down to all DtReaderWriter member...
Description: A readable, writable list of DtForceType.
Definition: rwForces.h:34
static const DtVariableBindingsList & nullVariableReference()
void setOnPalettes(const DtRwNLengthStringVector &)
Definition: modelSetEntry.h:322
class DtRwStringAttribute:
Definition: rwStringAttribute.h:19
DtRwNLengthStringVector myOnPalettes
Definition: modelSetEntry.h:158
DtModelSetEntry *(* DtModelSetEntryCreatorFcn)(const DtString &, DtReaderWriterRegistry *parentRegistry)
Definition: modelSetEntry.h:32
Description: Readable, Writable bool.
Definition: rwBoolean.h:26
virtual void removeStringAttribute(const DtString &key)
bool includeInBVSPCalcs() const
Definition: modelSetEntry.h:347
const DtRwNLengthStringVector & deployableCountries() const
Definition: modelSetEntry.h:337
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. Randomized object types are just conta...
Definition: modelSetEntry.h:352
DtString iconForList(const DtString &) const
Definition: modelSetEntry.h:192
bool operator!=(const DtReaderWriter &rhs)
Definition: readerWriter.h:121
void setIconLists(const DtRwStringAttributeList &)
Definition: modelSetEntry.h:180
DtRwString myLabel
Definition: modelSetEntry.h:151
DtRwString myDefaultOverlayLayer
Definition: modelSetEntry.h:155
void setForces(const DtRwForces &)
Definition: modelSetEntry.h:297
void setLabel(const DtString &)
Definition: modelSetEntry.h:197
const DtRwNLengthStringVector & onPalettes() const
Definition: modelSetEntry.h:327
void setCanCreate(bool)
Definition: modelSetEntry.h:257
class DtRwStringAttributeList:
Definition: rwStringAttributeList.h:29
DtRwBoolean myIsRandomized
Definition: modelSetEntry.h:164
DtString myPlatform
Definition: modelSetEntry.h:163

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)