VR-Forces 4.8 Class Documentation
 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) 2013 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();
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();
66 
69  virtual void putData(DtEnvironmentSP, DtEnvValueSP parent) const;
70  virtual void getData(const DtEnvironmentSP, const DtEnvValueSP value,
73 
75  static const char* theXmlType();
76 
77  virtual const char* xmlType() const
78  {
79  return theXmlType();
80  }
82 
84  DtReal operator=(const DtReal orig);
85 
86  virtual DtReal operator-() const;
87  virtual DtReal operator*(const DtReal rhs) 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 bool 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 DtReal operator*=(const DtReal rhs);
98  virtual DtReal operator/=(const DtReal rhs);
99  virtual DtReal operator+=(const DtReal rhs);
100  virtual DtReal operator-=(const DtReal rhs);
101 
102  virtual DtReal value() const;
103  virtual void setValue(DtReal value);
104 
105  virtual void putData(std::string& fp, int indentLevel = 0);
106  virtual DtlObjPtr getData(DtlObjPtr args, const DtReaderWriter::SearchPaths& searchPaths,
107  const DtVariableBindingsList& variableBindings);
108 
112  virtual const char* readerWriterType() const;
113 
115  virtual DtString prettyPrint() const;
116 
118  virtual int alignment() const;
119 
120 protected:
121  DtReal myValue;
122 };
123 
124 namespace DtBufferSerialize
125 {
127  DT_DLL_readerWriter int getSize(const DtRwReal& val);
128 
135  DT_DLL_readerWriter char *encode(const DtRwReal& val, char *buffer);
136 
143  DT_DLL_readerWriter const char *decode(DtRwReal &val, const char *buffer) ;
144 }
145 
bool operator==(const DtReaderWriter &) const
Equivalence operator.
virtual const char * readerWriterType() const
Used to supply a string type that this reader writer type is.
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
Definition: symbolString.h:20
virtual const char * xmlType() const
Definition: rwReal.h:77
DT_DLL_readerWriter DtBoost::shared_ptr< DtEnvironment > DtEnvironmentSP
Definition: readerWriter.h:30
virtual DtlObjPtr getData(DtlObjPtr args, const SearchPaths &searchPaths, const DtVariableBindingsList &variableBindings)
Definition: readerWriter.h:85
Definition: readerWriterRegistry.h:39
virtual DtString prettyPrint() const
Routine to return a human readable form of the reader/writer variable.
virtual void reset()
For those reader/writer items that support it, resets the reader/writer value to original state Defau...
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.
bool operator>(const DtObjectType &lhs, const DtSimulationModelSetLoader::EntityData &rhs)
Definition: simulationModelSetLoader.h:1236
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:121
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.
bool operator!=(const DtReaderWriter &rhs)
Definition: readerWriter.h:121

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)