MAK Data Logger API Documentation for DIS
lgrEnvVar.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
9 #ifndef lgrEnvVar_H_
10 #define lgrEnvVar_H_
11 
12 #include "lgrApp.h"
13 #include <mtl/envObject.h>
14 #include <vlutil/vlString.h>
15 
16 namespace MAKLogger
17 {
18 
19  class DtAnyValue;
20 
23  {
24  public:
25  typedef DtAnyValue* (*DtAnyValueEncoder)(const DtString&);
26 
29 
31  DtLgrEnvVariable(const DtString& type,const DtString& value);
32 
35  explicit DtLgrEnvVariable(const DtEnvObject*);
36 
37  static void addDefaultTypeEncoders();
38  static void addTypeEncoder(const DtString&,DtAnyValueEncoder encoder);
39 
40  void setType(const DtString& type);
41  DtString type() const;
42  void setValue(const DtString& value);
43  DtString value() const;
44 
45  DtAnyValue* generateAnyValue() const;
46 
47  protected:
48 
49  typedef std::map<DtString,DtAnyValueEncoder> DtAnyValueEncoderMap;
51 
52  static DtAnyValue* generateStringValue(const DtString&);
53  static DtAnyValue* generateIntegerValue(const DtString&);
54  static DtAnyValue* generateDoubleValue(const DtString&);
55  static DtAnyValue* generateBooleanValue(const DtString&);
56 
57  DtString myType;
58  DtString myValue;
59 
60  };
61 
62 }
63 
64 #endif

Document ID: Generated on Thu Apr 11 12:13:00 EDT 2013 from SVN revision 126011
Copyright © 2005-2012 VT MÄK. All Rights Reserved (www.mak.com)