VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
rwHeading.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2020 MAK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 
7 
8 #pragma once
9 
10 #include <readerWriter/rwReal.h>
11 #include <readerWriter/rwBoolean.h>
12 
14 #include "vrfutil/vrfutilDefines.h"
16 {
17 public:
19  DtRwHeading(const DtString& name,
20  DtReaderWriterRegistry* parentRegistry = NULL);
21  DtRwHeading(const DtSymbolString& name,
22  DtReaderWriterRegistry* parentRegistry = NULL);
23 
25  DtRwHeading(const DtSymbolString& name, const double heading,
26  DtReaderWriterRegistry* parentRegistry = NULL);
27 
28  //copy contructor
29  DtRwHeading(const DtRwHeading& orig);
30 
32  virtual ~DtRwHeading();
33 
35  DtRwHeading(const DtString& name,
36  const DtRwHeading& orig,
37  DtReaderWriterRegistry* parentRegistry = NULL);
38  DtRwHeading(const DtSymbolString& name,
39  const DtRwHeading& orig,
40  DtReaderWriterRegistry* parentRegistry = NULL);
41 
43  DtRwHeading& operator=(const DtRwHeading& orig);
44 
45  virtual DtRwHeading* clone(DtReaderWriterRegistry* parent = 0) const;
46 
47  virtual void setHeading(double);
48  double heading() const;
49 
50  virtual void setIsMagnetic(bool);
51  bool isMagnetic() const;
52 
53  bool operator==(const DtRwHeading&) const;
54  bool operator!=(const DtRwHeading& rhs)
55  {
56  return !(*this == rhs);
57  }
58 
61 
62  virtual const char* readerWriterType() const;
63 
65  static const char* theXmlType();
66 
67 
68 protected:
71 };
72 
73 namespace DtBufferSerialize
74 {
76  DT_DLL_vrfutil int getSize(const DtRwHeading& val);
82  DT_DLL_vrfutil char *encode(const DtRwHeading& val, char *buffer);
88  DT_DLL_vrfutil const char *decode(DtRwHeading &val, const char *buffer);
89 }
bool operator==(const DtReaderWriter &) const
Equivalence operator.
bool operator!=(const DtRwHeading &rhs)
Definition: rwHeading.h:54
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.
Definition: symbolString.h:20
Definition: readerWriter.h:85
Definition: readerWriterRegistry.h:39
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...
Description: Readable, Writable DtReal (double)
Definition: rwReal.h:27
DtRwReal myHeading
Definition: rwHeading.h:69
DtRwBoolean myIsMagnetic
Definition: rwHeading.h:70
Description: Readable, Writable bool.
Definition: rwBoolean.h:26
#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...
static const char * theXmlType()
The type that is used when archiving to an XML stream.
DtRwHeading; descriptor that represents a more robust heading.
Definition: rwHeading.h:15

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)