VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
rwUnsigned.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 1999 MaK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: rwUnsigned.h,v $ $Revision: 1.10 $ $State: Exp $
7 *******************************************************************************/
8 
11 
17 
18 #ifndef DtRwUnsigned_H_
19 #define DtRwUnsigned_H_
20 
21 #include <vlutil/vlMachineTypes.h>
23 
25 
29 
30 #include "vrfutil/vrfutilDefines.h"
32 {
33 public:
35  DtRwUnsigned();
36 
38  DtRwUnsigned(const DtString& name, DtReaderWriterRegistry* const parentRegistry = NULL);
39  DtRwUnsigned(const DtSymbolString& name, DtReaderWriterRegistry* const parentRegistry = NULL);
40 
42  DtRwUnsigned(const DtString& name, unsigned value,
43  DtReaderWriterRegistry* parentRegistry = NULL);
44 
45  DtRwUnsigned(const DtSymbolString& name, unsigned value,
46  DtReaderWriterRegistry* parentRegistry = NULL);
47 
48 
50  DtRwUnsigned(const DtRwUnsigned& orig);
51 
53  DtRwUnsigned & operator=(const DtRwUnsigned& orig);
54 
55  virtual ~DtRwUnsigned();
56 
57 
59 
61  virtual operator const unsigned() const;
62 
64  unsigned operator=(const unsigned orig);
65 
66  virtual int operator-() const;
67  virtual unsigned operator*(const unsigned rhs) const;
68  virtual unsigned operator/(const unsigned rhs) const;
69  virtual unsigned operator+(const unsigned rhs) const;
70  virtual unsigned operator-(const unsigned rhs) const;
71  virtual int operator<(const unsigned rhs) const;
72  virtual int operator>(const unsigned rhs) const;
73  virtual int operator<=(const unsigned rhs) const;
74  virtual int operator>=(const unsigned rhs) const;
75  virtual int operator==(const unsigned rhs) const;
76  virtual int operator!=(const unsigned rhs) const;
77  virtual unsigned operator*=(const unsigned rhs);
78  virtual unsigned operator/=(const unsigned rhs);
79  virtual unsigned operator+=(const unsigned rhs);
80  virtual unsigned operator-=(const unsigned rhs);
81 
82  virtual unsigned operator%(const unsigned rhs);
83  virtual unsigned operator%=(const unsigned rhs);
84  virtual unsigned operator--(int);
85  virtual unsigned operator--();
86  virtual unsigned operator++(int);
87  virtual unsigned operator++();
88 
89  virtual unsigned value() const;
90  virtual void setValue(unsigned value);
91 
92  virtual void putData(std::string& fp, int indentLevel = 0);
93  virtual DtlObjPtr getData(DtlObjPtr args, const DtReaderWriter::SearchPaths& searchPaths,
94  const DtVariableBindingsList& variableBindings);
95 
99  virtual const char* readerWriterType() const;
100 
101 protected:
102  unsigned myValue;
103 };
104 
105 namespace DtBufferSerialize
106 {
108  DT_DLL_vrfutil int getSize(const DtRwUnsigned& val);
109 
116  DT_DLL_vrfutil char *encode(const DtRwUnsigned& val, char *buffer);
117 
124  DT_DLL_vrfutil const char *decode(DtRwUnsigned &val, const char *buffer) ;
125 }
126 
127 
128 #endif
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.
This class allows one to collect and compare strings using an index number instead of having to do st...
Definition: symbolString.h:27
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
Description: Readable, Writable unsigned int.
Definition: rwUnsigned.h:31
unsigned myValue
Definition: rwUnsigned.h:102
std::list< const DtRwVariableBindings * > DtVariableBindingsList
Definition: readerWriterRegistry.h:29
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...
bool operator>(const DtObjectType &lhs, const DtSimulationModelSetLoader::EntityData &rhs)
Definition: simulationModelSetLoader.h:1393
virtual void putData(std::string &fp, int indentLevel=0)
Deriving class overrides these to get/put class specific data.
#define DT_DLL_vrfutil
This file is used to determine how to build Disable inconsistent dll linkage warning Visual Studio 6...
Definition: vrfutilDefines.h:34
const DtReaderWriter & operator=(const DtReaderWriter &orig)
assignment operator
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...
bool operator!=(const DtReaderWriter &rhs)
Definition: readerWriter.h:121

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)