VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
rwVector.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2025 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
13 
16 
17 #pragma once
18 
19 #include <matrix/vlVector.h>
22 
23 class DT_DLL_readerWriter DtRwVector : public DtReaderWriter, public DtVector
24 {
25 public:
27  DtRwVector(const DtString& name = DtString::nullString(),
28  DtReaderWriterRegistry* parentRegistry = NULL);
29 
30  DtRwVector(const DtSymbolString& name,
31  DtReaderWriterRegistry* parentRegistry = NULL);
32 
34  DtRwVector(double x, double y, double z,
35  const DtString& name = DtString::nullString(),
36  DtReaderWriterRegistry* parentRegistry = NULL);
37 
38  DtRwVector(double x, double y, double z,
39  const DtSymbolString& name,
40  DtReaderWriterRegistry* parentRegistry = NULL);
41 
43  DtRwVector(const DtVector & fromVec,
44  const DtString& name = DtString::nullString(),
45  DtReaderWriterRegistry* parentRegistry = NULL);
46 
47  DtRwVector(const DtVector & fromVec,
48  const DtSymbolString& name,
49  DtReaderWriterRegistry* parentRegistry = NULL);
50 
52  DtRwVector(const DtRwVector & orig,
53  DtReaderWriterRegistry* parentRegistry = NULL);
54 
56  DtRwVector(const DtString& name, const DtRwVector & orig,
57  DtReaderWriterRegistry* parentRegistry = NULL);
58 
60  DtRwVector & operator=(const DtRwVector & orig);
61  DtRwVector & operator=(const DtVector & orig);
62 
63  virtual ~DtRwVector() override;
64 
67  virtual void putData(DtEnvironmentSP, DtEnvValueSP parent) const override;
68  virtual void getData(const DtEnvironmentSP, const DtEnvValueSP value,
69  const DtReaderWriter::SearchPaths &searchPaths =
71  const DtVariableBindingsList &bindings =
72  DtVariableBindingsList()) override;
73 
75  static const char* theXmlType();
76 
77  virtual const char *xmlType() const override {
78  return theXmlType();
79  }
81 
82  virtual void putData(std::string &fp, int indentLevel = 0) override;
83  virtual DtlObjPtr getData(DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths,
84  const DtVariableBindingsList &variableBindings) override;
85 
86  virtual double distSquaredTo(const DtVector& point) const;
87 
91  virtual const char *readerWriterType() const override;
92 
94  virtual DtString prettyPrint() const override;
95 
96  bool operator==(const DtRwVector&) const;
97  bool operator!=(const DtRwVector& rhs) const { return !(*this == rhs); };
98 
99  bool operator==(const DtVector& rhs) const;
100 
102  virtual double value() const { return magnitudeSquared(); };
103 
104 protected:
105 
106 };
107 
108 
113 {
114 public:
116  DtRwOffsetVector(const DtString& name = DtString::nullString(),
117  DtReaderWriterRegistry* parentRegistry = NULL);
118 
119  DtRwOffsetVector(const DtSymbolString& name,
120  DtReaderWriterRegistry* parentRegistry = NULL);
121 
123  DtRwOffsetVector(double x, double y, double z,
124  const DtString& name = DtString::nullString(),
125  DtReaderWriterRegistry* parentRegistry = NULL);
126 
127  DtRwOffsetVector(double x, double y, double z,
128  const DtSymbolString& name,
129  DtReaderWriterRegistry* parentRegistry = NULL);
130 
132  DtRwOffsetVector(const DtVector & fromVec,
133  const DtString& name = DtString::nullString(),
134  DtReaderWriterRegistry* parentRegistry = NULL);
135 
136  DtRwOffsetVector(const DtVector & fromVec,
137  const DtSymbolString& name,
138  DtReaderWriterRegistry* parentRegistry = NULL);
139 
140  DtRwOffsetVector(const DtString& name, const DtRwOffsetVector & fromVec,
141  DtReaderWriterRegistry* parentRegistry = NULL);
142 
143  virtual ~DtRwOffsetVector() override;
144 
147  virtual void putData(DtEnvironmentSP, DtEnvValueSP parent) const override;
148  virtual void getData(const DtEnvironmentSP, const DtEnvValueSP value,
149  const DtReaderWriter::SearchPaths &searchPaths =
151  const DtVariableBindingsList &bindings =
152  DtVariableBindingsList()) override;
153  virtual DtlObjPtr getData(DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths,
154  const DtVariableBindingsList &variableBindings) override;
155 
157  static const char* theXmlType();
158 
159  virtual const char *xmlType() const override {
160  return theXmlType();
161  }
163 
165  DtRwOffsetVector(const DtRwOffsetVector & orig,
166  DtReaderWriterRegistry* parentRegistry = NULL);
167 
170  DtRwOffsetVector & operator=(const DtRwVector & orig);
171  DtRwOffsetVector & operator=(const DtVector & orig);
172 
176  virtual const char *readerWriterType() const override;
177 
179 
180  virtual void setFront(double);
181  virtual double front() const;
183 
185 
186  virtual void setRight(double);
187  virtual double right() const;
189 
191 
192  virtual void setUp(double);
193  virtual double up() const;
195 };
196 
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
virtual double value() const
Returns magnitude squared.
Definition: rwVector.h:102
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.
virtual void getData(const DtEnvironmentSP, const DtEnvValueSP value, const DtReaderWriter::SearchPaths &searchPaths=DtReaderWriter::SearchPaths(), const DtVariableBindingsList &bindings=DtVariableBindingsList()) override
Routines to archive/dearchive from an XML Environment.
Definition: readerWriter.h:85
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 ...
static const char * theXmlType()
The type that is used when archiving to an XML stream.
Definition: rwVector.h:23
DtRwVector & operator=(const DtRwVector &orig)
Assign to DtRwVector. Assigns value only.
virtual void putData(DtEnvironmentSP, DtEnvValueSP parent) const override
Routines to archive/dearchive from an XML Environment.
std::list< const DtRwVariableBindings * > DtVariableBindingsList
Definition: readerWriterRegistry.h:29
virtual const char * readerWriterType() const override
Used to supply a string type that this reader writer type is. This can be used in place of dynamic-ca...
std::vector< DtFilename > SearchPaths
Definition: readerWriter.h:92
virtual const char * xmlType() const override
Routines to archive/dearchive from an XML Environment.
Definition: rwVector.h:77
virtual void putData(std::string &fp, int indentLevel=0)
Deriving class overrides these to get/put class specific data.
Specialized vector that can be used for the knowledge of an &quot;offset&quot; rather than location vector...
Definition: rwVector.h:112
bool operator!=(const DtRwVector &rhs) const
Definition: rwVector.h:97
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
virtual const char * xmlType() const override
Routines to archive/dearchive from an XML Environment.
Definition: rwVector.h:159

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)