VR-Link API Documentation for HLA 1516
baseConfigVar.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 ******************************************************************************/
5 
6 
8 
9 #ifndef baseConfigVar_H_
10 #define baseConfigVar_H_
11 
12 
13 #include <mtl/env.h>
14 #include <list>
15 #include <set>
16 
17 
18 #ifdef DtUSE_UTILITIES_NAMESPACE
19 namespace DtUSE_UTILITIES_NAMESPACE
20 {
21 #endif
22 
23 namespace DtCmdLine
24 {
25  class Arg;
26  class CmdLine;
27 }
28 
29 // Forward declarations
30 class DtVariableGroup;
31 class DtString;
32 
33 
36 {
37 public:
38 
39  typedef std::set<DtString> TypeSet;
40 
42  {
46  DtScopeBoth
47  };
48 
51  DtVariableScope aScope, const DtString& aDescription);
52 
54  virtual ~DtBaseConfigVariable();
55 
57  inline DtVariableScope scope() const
58  {
59  return myScope;
60  }
61 
62  inline const DtString& description() const
63  {
64  return myDescription;
65  }
66 
68  inline bool inConfigFile() const
69  {
70  return scope() == DtScopeConfigFile || scope() == DtScopeBoth;
71  }
72 
74  inline bool inCommandLine() const
75  {
76  return scope() == DtScopeCommandLine || scope() == DtScopeBoth;
77  }
78 
80  inline bool isSet() const { return mySetFlag; }
81 
82  //@name Abstract Interface
84 
86  virtual const DtString& name() const = 0;
87 
89  virtual bool isRequired() const = 0;
90 
93  virtual void getCommandLineArg(DtCmdLine::CmdLine& cmdLine) = 0;
94 
97  virtual void updateFromCommandLineArg() = 0;
98 
102  virtual void getEnvironmentSchemaType(DtEnvironment env,
103  TypeSet& usedTypes) const = 0;
104 
108  virtual DtEnvValueSP getEnvironmentValue(DtEnvironment env) = 0;
109 
112  virtual void updateFromEnvironment(DtEnvironment env) = 0;
113 
115  virtual DtString type() const = 0;
116 
118 
119  static DtEnvValueSP createSchemaDeclaration(DtEnvironment env,
120  const DtString& name,const DtString& type);
121 
123  static DtEnvValueSP createSimpleSchemaType(DtEnvironment env,
124  const DtString& typeName,
125  const DtString& xsType );
126 
128  static DtEnvValueSP createComplexSchemaType(DtEnvironment env,
129  const DtString& typeName,bool ordered,
130  const std::list<DtBaseConfigVariable*>& members);
131 
132 
133 protected:
134 
137 
139  bool mySetFlag;
140 
143 
146 };
147 
148 
149 #ifdef DtUSE_UTILITIES_NAMESPACE
150 }
151 #endif
152 
153 
154 #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)