VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
multiConfigVariable.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2013 VT MAK
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include "baseConfigVariable.h"
13 #include "variableGroup.h"
14 #include "varType.h"
15 
16 #include <mtl/environment.h>
17 #include <vlutil/vlExceptions.h>
18 #include <cmdLine/cmdLine.h>
19 
20 #include <vector>
21 
22 template <typename T>
24 {
25 public:
26 
28  DtMultiConfigVariable( DtVariableGroup* group, const DtString& aName,
29  const DtString& itemName, const DtString& aDescription = "",
31  bool isRequired = false, const DtString& aShortcut = "" );
32 
34  DtMultiConfigVariable( DtVariableGroup& group, const DtString& aName,
35  const DtString& itemName, const DtString& aDescription = "",
37  bool isRequired = false, const DtString& aShortcut = "" );
38 
41  const DtMultiConfigVariable<T>& orig );
42 
45  const DtMultiConfigVariable<T>& orig );
46 
48  virtual ~DtMultiConfigVariable();
49 
54 
57 
59  virtual void updateFromCommandLineArg();
60 
62  virtual void getEnvironmentSchemaType(DtEnvironment env,TypeSet& usedTypes) const;
63 
66 
68  virtual void updateFromEnvironment(DtEnvironment env);
69 
71  virtual DtString type() const;
72 
74  virtual bool isRequired() const;
75 
78 
79  virtual const DtString& name() const;
80  void setName( const DtString& name );
81 
83 
86 
87  const std::vector<T>& values() const;
88  void setValues(const std::vector<T>& aValue);
89  void addValue(T aValue);
90  void removeValue(T aValue);
91  void clearValues();
93 
95 
98 
99  const DtString& shortcut() const;
100  void setShortcut( const DtString& aShortcut );
101 
103 
104 protected:
105 
108 
109 protected:
110 
111  //Internal Type
112  typedef typename DtVarType<T>::ArgType ArgType;
113 
118 
120 
121  std::vector<T> myValues;
122 
123 };
124 
125 #include "multiConfigVariable.inl"

Document ID: Generated on Tue Mar 1 02:56:17 EST 2016 from SVN revision 162687
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)