VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
rwBoolean.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2013 MaK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
14 
15 #pragma once
16 
17 #include <vlutil/vlMachineTypes.h>
19 
21 
27 {
28 public:
29  //Constructor
30  DtRwBoolean(const DtString& name = DtString::nullString(),
31  DtReaderWriterRegistry* parentRegistry = NULL);
32 
33  DtRwBoolean(const DtSymbolString& name,
34  DtReaderWriterRegistry* parentRegistry = NULL);
35 
36  DtRwBoolean(const char* name,
37  DtReaderWriterRegistry* parentRegistry = NULL);
38 
40  DtRwBoolean(bool value,
41  const DtString & name = DtString::nullString(),
42  DtReaderWriterRegistry * parentRegistry = NULL);
43 
45  DtRwBoolean(const DtString& name, const DtRwBoolean& orig,
46  DtReaderWriterRegistry* const parentRegistry = NULL);
47 
48  DtRwBoolean(const DtRwBoolean& orig,
49  DtReaderWriterRegistry* const parentRegistry = NULL);
50 
52  DtRwBoolean & operator=(const DtRwBoolean & orig);
53 
54  virtual ~DtRwBoolean();
55 
57 
59  virtual operator const bool() const;
60 
62  bool operator=(const bool orig);
63 
66  virtual void putData(DtEnvironmentSP, DtEnvValueSP parent) const;
67  virtual void getData(const DtEnvironmentSP, const DtEnvValueSP value,
70 
72  virtual void reset();
73 
75  static const char* theXmlType();
76 
77  virtual const char* xmlType() const
78  {
79  return theXmlType();
80  }
82 
83  virtual int operator==(const bool rhs) const;
84  virtual int operator!=(const bool rhs) const;
85  virtual int operator&&(const bool rhs) const;
86  virtual int operator||(const bool rhs) const;
87  virtual int operator!() const;
88 
89  virtual bool value() const;
90  virtual void setValue(bool 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  virtual DtString prettyPrint() const;
102 
104  virtual int alignment() const;
105 
106  static bool getBoolAttribute(DtEnvironmentSP env, const DtString& attributeName, DtEnvValueSP root, bool defaultIfMissing = true);
107  static bool ToBool(const DtString& str, bool defaultIfMissing = true) ;
108 
109  // Not currently used, but worth hanging onto as an example
110  bool debugTest();
111 
112 protected:
113  bool myValue;
114 };
115 
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...
bool myValue
Definition: rwBoolean.h:113
#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
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
virtual const char * xmlType() const
Routines to archive/dearchive from an XML Environment.
Definition: rwBoolean.h:77
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...
std::vector< DtFilename > SearchPaths
Definition: readerWriter.h:92
DT_DLL_features DtQuery operator||(const DtQuery &, const DtQuery &)
DT_DLL_features DtQuery operator&&(const DtQuery &, const DtQuery &)
virtual void putData(std::string &fp, int indentLevel=0)
Deriving class overrides these to get/put class specific data.
Description: Readable, Writable bool.
Definition: rwBoolean.h:26
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

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)