![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /******************************************************************************* 00002 ** Copyright (c) 1999 MaK Technologies, Inc. 00003 ** All rights reserved. 00004 *******************************************************************************/ 00005 /******************************************************************************* 00006 ** $RCSfile: rwReal.h,v $ $Revision: 1.12 $ $State: Exp $ 00007 *******************************************************************************/ 00008 00011 00017 00018 #ifndef DtRwReal_H_ 00019 #define DtRwReal_H_ 00020 00021 #include <vlutil/vlMachineTypes.h> 00022 #include "vrfutil/rdrWritr.h" 00023 00024 class DtReaderWriterRegistry; 00025 00029 00030 #include "vrfutil/vrfutilDefines.h" 00031 class DT_DLL_vrfutil DtRwReal : public DtReaderWriter 00032 { 00033 public: 00035 DtRwReal(); 00036 00038 DtRwReal(const DtString& name, DtReaderWriterRegistry* parentRegistry = NULL); 00039 00040 DtRwReal(const DtSymbolString& name, DtReaderWriterRegistry* parentRegistry = NULL); 00041 00043 DtRwReal(const DtString& name, 00044 DtReal value, 00045 DtReaderWriterRegistry* parentRegistry = NULL); 00046 00047 DtRwReal(const DtSymbolString& name, 00048 DtReal value, 00049 DtReaderWriterRegistry* parentRegistry = NULL); 00050 00052 DtRwReal(const DtRwReal& orig, DtReaderWriterRegistry* parentRegistry = NULL); 00053 00054 public: 00056 DtRwReal & operator=(const DtRwReal & orig); 00057 00058 virtual ~DtRwReal(); 00059 00060 00062 00064 virtual operator const DtReal() const; 00065 00067 DtReal operator=(const DtReal orig); 00068 00069 virtual DtReal operator-() const; 00070 virtual DtReal operator*(const DtReal rhs) const; 00071 virtual DtReal operator/(const DtReal rhs) const; 00072 virtual DtReal operator+(const DtReal rhs) const; 00073 virtual DtReal operator-(const DtReal rhs) const; 00074 virtual bool operator<(const DtReal rhs) const; 00075 virtual bool operator>(const DtReal rhs) const; 00076 virtual bool operator<=(const DtReal rhs) const; 00077 virtual bool operator>=(const DtReal rhs) const; 00078 virtual bool operator==(const DtReal rhs) const; 00079 virtual bool operator!=(const DtReal rhs) const; 00080 virtual DtReal operator*=(const DtReal rhs); 00081 virtual DtReal operator/=(const DtReal rhs); 00082 virtual DtReal operator+=(const DtReal rhs); 00083 virtual DtReal operator-=(const DtReal rhs); 00084 00085 virtual DtReal value() const; 00086 virtual void setValue(DtReal value); 00087 00088 virtual void putData(FILE* fp, int indentLevel = 0); 00089 virtual DtlObjPtr getData(DtlObjPtr args, const DtFilename& searchPath, 00090 const DtVariableBindingsList& variableBindings); 00091 00095 virtual const char* readerWriterType() const; 00096 00097 protected: 00098 DtReal myValue; 00099 }; 00100 00101 namespace DtBufferSerialize 00102 { 00104 DT_DLL_vrfutil int getSize(const DtRwReal& val); 00105 00112 DT_DLL_vrfutil char *encode(const DtRwReal& val, char *buffer); 00113 00120 DT_DLL_vrfutil const char *decode(DtRwReal &val, const char *buffer) ; 00121 } 00122 00123 00124 #endif