VR-Link API Documentation for HLA 1516
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
envValue.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 1992-2026 MAK Technologies, Inc
3 ** All rights reserved.
4 ******************************************************************************/
5 
6 
10 
11 #ifndef envValue_H__
12 #define envValue_H__
13 
14 #if DT_ENV_THREAD_SAFE
15 #include <vlutil/vlThreadSafe.h>
16 #endif
17 
18 #include <vlutil/vlSmartPointers.h>
19 #include <vlutil/vlString.h>
20 #include <list>
21 
22 #ifdef DtUSE_UTILITIES_NAMESPACE
23 namespace DtUSE_UTILITIES_NAMESPACE
24 {
25 #endif
26 
27 
28 class DtEnvironment;
29 class DtEnvValue;
30 
31 typedef std::shared_ptr<DtEnvValue> DtEnvValueSP;
32 typedef std::weak_ptr<DtEnvValue> DtEnvValueWP;
33 typedef std::list<DtEnvValueSP> DtEnvValueList;
34 
35 #if DT_ENV_THREAD_SAFE
37 #else
39 typedef DtEnvValueList::iterator DtEnvValueIterator;
40 #endif
41 
45 {
46 public:
47  friend class DT_DLL_MTL DtEnvironment;
48  friend class DtEnvList;
49 
50 #define RESERVED_VALUE(N) (1 << N)
52  {
53  Value = 0,
54  Listed = 1,
58 
61  };
62 
63  explicit DtEnvValue(const DtString& value);
64  virtual ~DtEnvValue();
65 
66  virtual DtEnvValue* clone() const;
67 
69  virtual DtString value() const;
70 
72  virtual DtString unmodifiedValue() const;
73 
75  virtual void setValue(const DtString& value);
76 
78  virtual DtEnvValueSP parent() const;
79 
81  virtual void setParent(DtEnvValueSP parent);
82 
84  DtEnvValueFormat format() const;
85 
86 protected:
87  virtual void valueChanged();
88  virtual void childChanged(DtEnvValue*);
89 
91 
93 
98 };
99 
100 #ifdef DtUSE_UTILITIES_NAMESPACE
101 }
102 #endif
103 
104 
105 #endif
void addFormat(DtEnvValueFormat format)
virtual void setValue(const DtString &value)
Sets the object&#39;s value.
Contains the DtString class declaration.
DtEnvValueFormat
Definition: envValue.h:51
std::list< DtEnvValueSP > DtEnvValueList
Definition: envValue.h:33
DtEnvValue(const DtString &value)
Includes utility functions for weak and shared pointers.
Base value object which simply stores a single string value.
Definition: envValue.h:44
A Flyweight class for manipulating objects and their hierarchy The DtEnvironment wraps a DtEnvValuSP ...
Definition: environment.h:29
std::weak_ptr< DtEnvValue > DtEnvValueWP
Definition: envValue.h:32
Definition: envValue.h:53
DtEnvValueFormat myFormat
Definition: envValue.h:94
DtString DtEnvValueType
Definition: envValue.h:38
DtEnvValueWP myParent
Definition: envValue.h:97
DtEnvValueType myValue
Definition: envValue.h:95
virtual ~DtEnvValue()
virtual void childChanged(DtEnvValue *)
Definition: envValue.h:55
Definition: envValue.h:59
#define RESERVED_VALUE(N)
Definition: envValue.h:50
virtual void valueChanged()
Definition: envValue.h:60
virtual DtEnvValueSP parent() const
Get the parent of the object.
#define DT_DLL_MTL
Definition: vlMachineTypes.h:118
virtual DtString unmodifiedValue() const
Get the object&#39;s value without environmental expansion.
virtual DtString value() const
Get the object&#39;s value.
a thread safe interface to a value.
Definition: vlThreadSafe.h:104
DtEnvValueFormat format() const
Get the format of the object.
Instances of DtString are used to represent strings.
Definition: vlString.h:38
Defines a thread-safe template class for variables.
DtEnvValueList::iterator DtEnvValueIterator
Definition: envValue.h:39
Definition: envValue.h:54
Definition: envValue.h:57
std::shared_ptr< DtEnvValue > DtEnvValueSP
Definition: envValue.h:29
virtual void setParent(DtEnvValueSP parent)
Set the parent of the object.
DtEnvList is a list of DtEnvValue pointers.
Definition: envList.h:31
Definition: envValue.h:56
virtual DtEnvValue * clone() const
Create a deep copy.
DtEnvValueType myUnmodifiedValue
Definition: envValue.h:96

Document ID: Generated on Mon Sep 28 00:09:32 EDT 2026 from SVN revision 295353
Copyright © 1992-2025 MAK Technologies. All Rights Reserved (www.mak.com)