VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
rwInt.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2013 MaK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
14 #pragma once
15 
16 #include <vlutil/vlMachineTypes.h>
18 
20 
26 {
27 public:
29  DtRwInt();
30 
32  DtRwInt(const DtString& name, DtReaderWriterRegistry* const parentRegistry = NULL);
33 
34  DtRwInt(const DtSymbolString& name, DtReaderWriterRegistry* const parentRegistry = NULL);
35 
37  DtRwInt(const DtString& name, int value, DtReaderWriterRegistry* const parentRegistry = NULL);
38 
40  DtRwInt(const DtSymbolString& name, int value, DtReaderWriterRegistry* const parentRegistry = NULL);
41 
43  DtRwInt(int orig, DtReaderWriterRegistry* const parentRegistry = NULL);
44  DtRwInt(const DtRwInt& orig, DtReaderWriterRegistry* const parentRegistry = NULL);
45 
47  DtRwInt & operator=(const DtRwInt & orig);
48 
49  virtual ~DtRwInt();
50 
52 
54  virtual operator const int() const;
55 
58  virtual void putData(DtEnvironmentSP, DtEnvValueSP parent) const;
59  virtual void getData(const DtEnvironmentSP, const DtEnvValueSP value,
61 
63  static const char* theXmlType();
64 
65  virtual const char* xmlType() const
66  {
67  return theXmlType();
68  }
70 
71  static int getIntegerFromHex(DtEnvironmentSP env, const DtString& attributeName, DtEnvValueSP root);
72 
73  static int getInt(DtEnvironmentSP env, const DtString& attributeName, DtEnvValueSP root);
74 
76  int operator=(const int orig);
77 
78  virtual int operator-() const;
79  virtual int operator*(const int rhs) const;
80  virtual int operator/(const int rhs) const;
81  virtual int operator+(const int rhs) const;
82  virtual int operator-(const int rhs) const;
83  virtual int operator<(const int rhs) const;
84  virtual int operator>(const int rhs) const;
85  virtual int operator<=(const int rhs) const;
86  virtual int operator>=(const int rhs) const;
87  virtual int operator==(const int rhs) const;
88  virtual int operator!=(const int rhs) const;
89  virtual int operator*=(const int rhs);
90  virtual int operator/=(const int rhs);
91  virtual int operator+=(const int rhs);
92  virtual int operator-=(const int rhs);
93 
94  virtual int operator%(const int rhs);
95  virtual int operator%=(const int rhs);
96  virtual int operator--(int);
97  virtual int operator--();
98  virtual int operator++(int);
99  virtual int operator++();
100 
101  virtual int value() const;
102  virtual void setValue(int value);
103 
105  virtual void reset();
106 
107  virtual void putData(std::string& fp, int indentLevel = 0);
108  virtual DtlObjPtr getData(DtlObjPtr args, const DtReaderWriter::SearchPaths& searchPaths,
109  const DtVariableBindingsList& variableBindings);
110 
114  virtual const char* readerWriterType() const;
115 
117  virtual DtString prettyPrint() const;
118 
120  virtual int alignment() const;
121 
122 protected:
123  int myValue;
124 };
125 
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...
#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
DT_DLL_readerWriter DtBoost::shared_ptr< DtEnvironment > DtEnvironmentSP
Definition: readerWriter.h:30
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
typedef int(ZCALLBACK *close_file_func) OF((voidpf opaque
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...
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...
Description: Readable, Writable int.
Definition: rwInt.h:25
std::vector< DtFilename > SearchPaths
Definition: readerWriter.h:92
bool operator>(const DtObjectType &lhs, const DtSimulationModelSetLoader::EntityData &rhs)
Definition: simulationModelSetLoader.h:1393
virtual const char * xmlType() const
Routines to archive/dearchive from an XML Environment.
Definition: rwInt.h:65
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
static const char * theXmlType()
The type that is used when archiving to an XML stream.
bool operator!=(const DtReaderWriter &rhs)
Definition: readerWriter.h:121
int myValue
Definition: rwInt.h:123

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)