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) 2025 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() override;
50 
52 
54  virtual operator const int() const;
55 
58  virtual void putData(DtEnvironmentSP,
59  DtEnvValueSP parent) const override;
60  virtual void getData(const DtEnvironmentSP, const DtEnvValueSP value,
61  const DtReaderWriter::SearchPaths &searchPaths =
63  const DtVariableBindingsList &bindings =
64  DtVariableBindingsList()) override;
65 
67  static const char* theXmlType();
68 
69  virtual const char *xmlType() const override {
70  return theXmlType();
71  }
73 
74  static int getIntegerFromHex(DtEnvironmentSP env, const DtString& attributeName, DtEnvValueSP root);
75 
76  static int getInt(DtEnvironmentSP env, const DtString& attributeName, DtEnvValueSP root);
77 
79  int operator=(const int orig);
80 
81  virtual int operator-() 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 bool operator<(const int rhs) const;
87  virtual bool operator>(const int rhs) const;
88  virtual bool operator<=(const int rhs) const;
89  virtual bool operator>=(const int rhs) const;
90  virtual bool operator==(const int rhs) const;
91  virtual bool operator!=(const int rhs) const;
92  virtual int operator*=(const int rhs);
93  virtual int operator/=(const int rhs);
94  virtual int operator+=(const int rhs);
95  virtual int operator-=(const int rhs);
96 
97  virtual int operator%(const int rhs);
98  virtual int operator%=(const int rhs);
99  virtual int operator--(int);
100  virtual int operator--();
101  virtual int operator++(int);
102  virtual int operator++();
103 
104  virtual int value() const;
105  virtual void setValue(int value);
106 
108  virtual void reset() override;
109 
110  virtual void putData(std::string &fp, int indentLevel = 0) override;
111  virtual DtlObjPtr getData(DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths,
112  const DtVariableBindingsList &variableBindings) override;
113 
117  virtual const char *readerWriterType() const override;
118 
120  virtual DtString prettyPrint() const override;
121 
123  virtual int alignment() const override;
124 
125 protected:
126  int myValue;
127 };
128 
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
bool operator>(const DtTemporaryAgentManager::AgentParameters &lhs, const DtTemporaryAgentManager::AgentParameters &rhs)
Definition: DtTemporaryAgentManager.h:76
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...
bool operator!=(const DtReaderWriter &rhs) const
Definition: readerWriter.h:121
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
virtual void putData(std::string &fp, int indentLevel=0)
Deriving class overrides these to get/put class specific data.
virtual const char * xmlType() const override
Routines to archive/dearchive from an XML Environment.
Definition: rwInt.h:69
const DtReaderWriter & operator=(const DtReaderWriter &orig)
assignment operator
static const char * theXmlType()
The type that is used when archiving to an XML stream.
DT_DLL_readerWriter std::shared_ptr< DtEnvironment > DtEnvironmentSP
Definition: readerWriter.h:30
int myValue
Definition: rwInt.h:126

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)