VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
rwReal.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2025 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
14 
15 #pragma once
16 
17 #include <vlutil/vlMachineTypes.h>
19 
21 
25 
28 {
29 public:
31  DtRwReal();
32 
34  DtRwReal(const DtString& name, DtReaderWriterRegistry* parentRegistry = NULL);
35 
36  DtRwReal(const DtSymbolString& name, DtReaderWriterRegistry* parentRegistry = NULL);
37 
39  DtRwReal(const DtString& name,
40  DtReal value,
41  DtReaderWriterRegistry* parentRegistry = NULL);
42 
43  DtRwReal(const DtSymbolString& name,
44  DtReal value,
45  DtReaderWriterRegistry* parentRegistry = NULL);
46 
48  DtRwReal(const DtRwReal& orig, DtReaderWriterRegistry* parentRegistry = NULL);
49 
50 public:
52  DtRwReal & operator=(const DtRwReal & orig);
53 
54  virtual ~DtRwReal() override;
55 
56 
58 
60  virtual operator const DtReal() const;
61 
62  static double getDouble(DtEnvironmentSP env, DtString attributeName, DtEnvValueSP root);
63 
65  virtual void reset() override;
66 
69  virtual void putData(DtEnvironmentSP, DtEnvValueSP parent) const override;
70  virtual void getData(const DtEnvironmentSP, const DtEnvValueSP value,
71  const DtReaderWriter::SearchPaths &searchPaths =
73  const DtVariableBindingsList &bindings =
74  DtVariableBindingsList()) override;
75 
77  static const char* theXmlType();
78 
79  virtual const char *xmlType() const override {
80  return theXmlType();
81  }
83 
85  DtReal operator=(const DtReal orig);
86 
87  virtual DtReal operator-() const;
88  virtual DtReal operator*(const DtReal rhs) const;
89  virtual DtReal operator/(const DtReal rhs) const;
90  virtual DtReal operator+(const DtReal rhs) const;
91  virtual DtReal operator-(const DtReal rhs) const;
92  virtual bool operator<(const DtReal rhs) const;
93  virtual bool operator>(const DtReal rhs) const;
94  virtual bool operator<=(const DtReal rhs) const;
95  virtual bool operator>=(const DtReal rhs) const;
96  virtual bool operator==(const DtReal rhs) const;
97  virtual bool operator!=(const DtReal rhs) const;
98  virtual DtReal operator*=(const DtReal rhs);
99  virtual DtReal operator/=(const DtReal rhs);
100  virtual DtReal operator+=(const DtReal rhs);
101  virtual DtReal operator-=(const DtReal rhs);
102 
103  virtual DtReal value() const;
104  virtual void setValue(DtReal value);
105 
106  virtual void putData(std::string &fp, int indentLevel = 0) override;
107  virtual DtlObjPtr getData(DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths,
108  const DtVariableBindingsList &variableBindings) override;
109 
113  virtual const char *readerWriterType() const override;
114 
116  virtual DtString prettyPrint() const override;
117 
119  virtual int alignment() const override;
120 
121 protected:
122  DtReal myValue;
123 };
124 
125 namespace DtBufferSerialize
126 {
128  DT_DLL_readerWriter int getSize(const DtRwReal& val);
129 
136  DT_DLL_readerWriter char *encode(const DtRwReal& val, char *buffer);
137 
144  DT_DLL_readerWriter const char *decode(DtRwReal &val, const char *buffer) ;
145 }
146 
bool operator==(const DtReaderWriter &) const
Equivalence operator.
virtual const char * readerWriterType() const
Used to supply a string type that this reader writer type is. This can be used in place of dynamic-ca...
DT_DLL_readerWriter int getSize(const DtString &val)
The number of bytes required to encode the value.
#define DT_DLL_readerWriter
This file is used to determine how to build Disable inconsistent dll linkage warning Visual Studio 6...
Definition: readerWriterDefines.h:34
This class allows one to collect and compare strings using an index number instead of having to do st...
Definition: symbolString.h:27
bool operator>(const DtTemporaryAgentManager::AgentParameters &lhs, const DtTemporaryAgentManager::AgentParameters &rhs)
Definition: DtTemporaryAgentManager.h:76
virtual const char * xmlType() const override
Routines to archive/dearchive from an XML Environment.
Definition: rwReal.h:79
virtual DtlObjPtr getData(DtlObjPtr args, const SearchPaths &searchPaths, const DtVariableBindingsList &variableBindings)
Deriving class overrides these to get/put class specific data.
Definition: readerWriter.h:85
Definition: readerWriterRegistry.h:39
virtual DtString prettyPrint() const
Routine to return a human readable form of the reader/writer variable. Not all reader/writer classes ...
virtual void reset()
For those reader/writer items that support it, resets the reader/writer value to original state Defau...
bool operator!=(const DtReaderWriter &rhs) const
Definition: readerWriter.h:121
std::list< const DtRwVariableBindings * > DtVariableBindingsList
Definition: readerWriterRegistry.h:29
virtual int alignment() const
For those items that are sent over the network via HLA, this will give the network alignment...
std::vector< DtFilename > SearchPaths
Definition: readerWriter.h:92
DT_DLL_readerWriter char * encode(const DtFilename &val, char *buffer)
Serializes the provided value val into buffer. buffer must have at least the number of bytes returned...
Description: Readable, Writable DtReal (double)
Definition: rwReal.h:27
virtual void putData(std::string &fp, int indentLevel=0)
Deriving class overrides these to get/put class specific data.
const DtReaderWriter & operator=(const DtReaderWriter &orig)
assignment operator
DtReal myValue
Definition: rwReal.h:122
DT_DLL_readerWriter const char * decode(DtString &val, const char *buffer)
Decodes a value from buffer and places the result in val of the type specified by val...
static const char * theXmlType()
The type that is used when archiving to an XML stream.
DT_DLL_readerWriter std::shared_ptr< DtEnvironment > DtEnvironmentSP
Definition: readerWriter.h:30

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)