VR-Link API Documentation for HLA 1516
multiVar.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 *********************************************************************/
5 
6 #ifndef multiVar_H_
7 #define multiVar_H_
8 
9 #include "baseConfigVar.h"
10 #include "varGroup.h"
11 #include "varType.h"
12 
13 #include <mtl/env.h>
14 #include <vlutil/vlExceptions.h>
15 #include <cmdLine/cmdLine.h>
16 
17 #include <vector>
18 
19 template <typename T>
21 {
22 public:
23 
25  DtMultiConfigVariable(DtVariableGroup* group, const DtString& aName,
26  const DtString& itemName, const DtString& aDescription = "",
28  bool isRequired = false,
29  const DtString& aShortcut = "");
30 
32  DtMultiConfigVariable(DtVariableGroup& group, const DtString& aName,
33  const DtString& itemName, const DtString& aDescription = "",
35  bool isRequired = false,
36  const DtString& aShortcut = "");
37 
39  virtual ~DtMultiConfigVariable();
40 
43 
45  virtual void updateFromCommandLineArg();
46 
48  virtual void getEnvironmentSchemaType(DtEnvironment env,TypeSet& usedTypes) const;
49 
52 
54  virtual void updateFromEnvironment(DtEnvironment env);
55 
57  virtual DtString type() const;
58 
60  virtual bool isRequired() const;
61 
62  // \brief Get/Set the variable name.
64  virtual const DtString& name() const;
65 
66  void setName(const DtString& name);
68 
69  // \brief Get/Set the variable value.
71  const std::vector<T>& values() const;
72  void setValues(const std::vector<T>& aValue);
73  void addValue(T aValue);
74  void removeValue(T aValue);
75  void clearValues();
77 
78  // \brief Get/Set the variable's shortcut
80  const DtString& shortcut() const;
81  void setShortcut(const DtString& aShortcut);
83 
84 protected:
85 
86  //Internal Type
87  typedef typename DtVarType<T>::ArgType ArgType;
88 
93 
95 
96  std::vector<T> myValues;
97 };
98 
99 #include "multiVar.inl"
100 
101 #endif
102 
103 
104 //#endif

Document ID: Generated on Wed Aug 14 15:35:11 EDT 2013 from SVN revision 130445
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)