VR-Link API Documentation for HLA 1516
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
configVariable.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 #include <matrix/vlVector.h>
20 
21 #ifdef DtUSE_UTILITIES_NAMESPACE
22 namespace DtUSE_UTILITIES_NAMESPACE
23 {
24 #endif
25 
26 class DtTaitBryan;
27 
29 DtDeclareVarType( int, int )
30 DtDeclareVarType( unsigned int, unsigned int )
31 DtDeclareVarType( double, double )
32 DtDeclareVarType( float, float )
34 DtDeclareVarType( bool, bool )
36 
37 template <typename T>
39 {
40 public:
41 
43  DtConfigVariable( DtVariableGroup* group, const DtString& aName, T aDefault,
44  const DtString& aDescription = "", DtVariableScope aScope = DtBaseConfigVariable::DtScopeBoth,
45  bool isRequired = false, const DtString& aShortcut = "" );
46 
48  DtConfigVariable( DtVariableGroup& group, const DtString& aName, T aDefault,
49  const DtString& aDescription = "", DtVariableScope aScope = DtBaseConfigVariable::DtScopeBoth,
50  bool isRequired = false, const DtString& aShortcut = "" );
51 
54 
57 
59  virtual ~DtConfigVariable();
60 
63 
65  virtual void getCommandLineArg(DtCmdLine::CmdLine&);
66 
68  virtual void updateFromCommandLineArg();
69 
71  virtual void getEnvironmentSchemaType(DtEnvironment env,TypeSet& usedTypes) const;
72 
74  virtual DtEnvValueSP getEnvironmentValue(DtEnvironment env);
75 
77  virtual void updateFromEnvironment(DtEnvironment env);
78 
80  virtual DtString type() const;
81 
83  virtual bool isRequired() const;
84 
87 
88  virtual const DtString& name() const;
89  void setName(const DtString& name);
90 
92 
95 
96  T value() const;
97  void setValue(T aValue);
98 
100 
103  const DtString& shortcut() const;
104  void setShortcut(const DtString& aShortcut);
106 
109 
110  T defaultValue() const;
111  void setDefaultValue(T aDefault);
112 
114 
115  T* getInternalPtrValue();
116 
117 protected:
118 
120  DtConfigVariable( const DtConfigVariable& other );
121 
122 protected:
123 
124  //Internal Type
125  typedef typename DtVarType<T>::ArgType ArgType;
126 
130 
132 
135 };
136 
137 template <>
139 
140 template <>
142 
143 #include "configVariable.inl"
144 
145 #ifdef DtUSE_UTILITIES_NAMESPACE
146 }
147 #endif

Document ID: Generated on Thu Feb 22 04:26:36 EST 2018 from SVN revision 186468
Copyright © 2005-2016 VT MÄK. All Rights Reserved (www.mak.com)