VR-Link API Documentation for HLA Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
baseConfigVariable.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 <mtl/environment.h>
13 #include <list>
14 #include <set>
15 
16 #ifdef DtUSE_UTILITIES_NAMESPACE
17 namespace DtUSE_UTILITIES_NAMESPACE
18 {
19 #endif
20 
21 namespace DtCmdLine
22 {
23  class Arg;
24  class CmdLine;
25 }
26 
27 class DtString;
28 class DtVariableGroup;
29 
32 {
33 public:
34 
35  typedef std::set<DtString> TypeSet;
36 
38  {
42  DtScopeBoth
43  };
44 
45 public:
46 
49  DtVariableScope aScope, const DtString& aDescription );
50 
52  virtual ~DtBaseConfigVariable();
53 
57  DtBaseConfigVariable& operator = ( const DtBaseConfigVariable& other );
58 
60  inline DtVariableScope scope() const
61  {
62  return myScope;
63  }
64 
65  inline const DtString& description() const
66  {
67  return myDescription;
68  }
69 
71  inline bool inConfigFile() const
72  {
73  return scope() == DtScopeConfigFile || scope() == DtScopeBoth;
74  }
75 
77  inline bool inCommandLine() const
78  {
79  return scope() == DtScopeCommandLine || scope() == DtScopeBoth;
80  }
81 
83  inline bool isSet() const { return mySetFlag; }
84 
85  //@name Abstract Interface
87 
89  virtual const DtString& name() const = 0;
90 
92  virtual bool isRequired() const = 0;
93 
96  virtual void getCommandLineArg( DtCmdLine::CmdLine& cmdLine ) = 0;
97 
100  virtual void updateFromCommandLineArg() = 0;
101 
105  virtual void getEnvironmentSchemaType( DtEnvironment env,
106  TypeSet& usedTypes ) const = 0;
107 
111  virtual DtEnvValueSP getEnvironmentValue( DtEnvironment env ) = 0;
112 
115  virtual void updateFromEnvironment( DtEnvironment env ) = 0;
116 
118  virtual DtString type() const = 0;
119 
121 
122  static DtEnvValueSP createSchemaDeclaration( DtEnvironment env,
123  const DtString& name,const DtString& type );
124 
126  static DtEnvValueSP createSimpleSchemaType( DtEnvironment env,
127  const DtString& typeName, const DtString& xsType );
128 
130  static DtEnvValueSP createComplexSchemaType( DtEnvironment env,
131  const DtString& typeName, bool ordered,
132  const std::list<DtBaseConfigVariable*>& members );
133 
134 protected:
135 
138 
139 protected:
140 
143 
145  bool mySetFlag;
146 
149 
152 
153 };
154 
155 #ifdef DtUSE_UTILITIES_NAMESPACE
156 }
157 #endif

Document ID: Generated on Mon Apr 8 04:49:21 EDT 2019 from SVN revision 197403
Copyright © 2005-2016 VT MÄK. All Rights Reserved (www.mak.com)