VR-Link API Documentation for HLA 1516
Home
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
include
mtl
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
20
#ifdef DtUSE_UTILITIES_NAMESPACE
21
namespace
DtUSE_UTILITIES_NAMESPACE
22
{
23
#endif
24
25
class
DtVector
;
26
class
DtTaitBryan
;
27
28
DtDeclareVarType
(
DtString
,
DtString
)
29
DtDeclareVarType
(
int
,
int
)
30
DtDeclareVarType
(
unsigned
int
,
unsigned
int
)
31
DtDeclareVarType
(
double
,
double
)
32
DtDeclareVarType
(
float
,
float
)
33
DtDeclareVarType
(
DtVector
,
DtString
)
34
DtDeclareVarType
(
bool
,
bool
)
35
DtDeclareVarType
(
DtTaitBryan
,
DtString
)
36
37
template <typename T>
38
class
DtConfigVariable
: public
DtBaseConfigVariable
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
53
DtConfigVariable
(
DtVariableGroup
* group,
const
DtConfigVariable<T>
& orig );
54
56
DtConfigVariable
(
DtVariableGroup
& group,
const
DtConfigVariable<T>
& orig );
57
59
virtual
~
DtConfigVariable
();
60
62
DtConfigVariable
&
operator=
(
const
DtConfigVariable
& rhs);
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
127
DtString
myName
;
128
DtString
myShortcut
;
129
bool
myRequiredFlag
;
130
131
DtVariableGroup
*
myGroup
;
132
133
T
myDefault
;
134
T
myValue
;
135
};
136
137
template
<>
138
DT_DLL_MTL
void
DtConfigVariable<bool>::updateFromCommandLineArg
();
139
140
template
<>
141
DT_DLL_MTL
void
DtConfigVariable<bool>::getCommandLineArg
(
DtCmdLine::CmdLine
& cmdLine);
142
143
#include "configVariable.inl"
144
145
#ifdef DtUSE_UTILITIES_NAMESPACE
146
}
147
#endif
Document ID: Generated on Wed Oct 23 22:25:48 EDT 2013 from SVN revision 132765
Copyright © 2005-2013 VT MÄK. All Rights Reserved (
www.mak.com
)