![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /******************************************************************************* 00002 ** Copyright (c) 1999 MaK Technologies, Inc. 00003 ** All rights reserved. 00004 *******************************************************************************/ 00005 /******************************************************************************* 00006 ** $RCSfile: rwUnsigned.h,v $ $Revision: 1.10 $ $State: Exp $ 00007 *******************************************************************************/ 00008 00011 00017 00018 #ifndef DtRwUnsigned_H_ 00019 #define DtRwUnsigned_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 DtRwUnsigned : public DtReaderWriter 00032 { 00033 public: 00035 DtRwUnsigned(); 00036 00038 DtRwUnsigned(const DtString& name, DtReaderWriterRegistry* const parentRegistry = NULL); 00039 DtRwUnsigned(const DtSymbolString& name, DtReaderWriterRegistry* const parentRegistry = NULL); 00040 00042 DtRwUnsigned(const DtString& name, unsigned value, 00043 DtReaderWriterRegistry* parentRegistry = NULL); 00044 00045 DtRwUnsigned(const DtSymbolString& name, unsigned value, 00046 DtReaderWriterRegistry* parentRegistry = NULL); 00047 00048 00050 DtRwUnsigned(const DtRwUnsigned& orig); 00051 00053 DtRwUnsigned & operator=(const DtRwUnsigned& orig); 00054 00055 virtual ~DtRwUnsigned(); 00056 00057 00059 00061 virtual operator const unsigned() const; 00062 00064 unsigned operator=(const unsigned orig); 00065 00066 virtual int operator-() const; 00067 virtual unsigned operator*(const unsigned rhs) const; 00068 virtual unsigned operator/(const unsigned rhs) const; 00069 virtual unsigned operator+(const unsigned rhs) const; 00070 virtual unsigned operator-(const unsigned rhs) const; 00071 virtual int operator<(const unsigned rhs) const; 00072 virtual int operator>(const unsigned rhs) const; 00073 virtual int operator<=(const unsigned rhs) const; 00074 virtual int operator>=(const unsigned rhs) const; 00075 virtual int operator==(const unsigned rhs) const; 00076 virtual int operator!=(const unsigned rhs) const; 00077 virtual unsigned operator*=(const unsigned rhs); 00078 virtual unsigned operator/=(const unsigned rhs); 00079 virtual unsigned operator+=(const unsigned rhs); 00080 virtual unsigned operator-=(const unsigned rhs); 00081 00082 virtual unsigned operator%(const unsigned rhs); 00083 virtual unsigned operator%=(const unsigned rhs); 00084 virtual unsigned operator--(int); 00085 virtual unsigned operator--(); 00086 virtual unsigned operator++(int); 00087 virtual unsigned operator++(); 00088 00089 virtual unsigned value() const; 00090 virtual void setValue(unsigned value); 00091 00092 virtual void putData(FILE* fp, int indentLevel = 0); 00093 virtual DtlObjPtr getData(DtlObjPtr args, const DtFilename& searchPath, 00094 const DtVariableBindingsList& variableBindings); 00095 00099 virtual const char* readerWriterType() const; 00100 00101 protected: 00102 unsigned myValue; 00103 }; 00104 00105 namespace DtBufferSerialize 00106 { 00108 DT_DLL_vrfutil int getSize(const DtRwUnsigned& val); 00109 00116 DT_DLL_vrfutil char *encode(const DtRwUnsigned& val, char *buffer); 00117 00124 DT_DLL_vrfutil const char *decode(DtRwUnsigned &val, const char *buffer) ; 00125 } 00126 00127 00128 #endif