VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
laserDetectorIOPort.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2003 MaK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: laserDetectorPort.h,v $ $Revision: 1.1 $ $State: Exp $
7 *******************************************************************************/
8 
11 
14 
15 #ifndef DtLaserDetectorPort_H_
16 #define DtLaserDetectorPort_H_
17 
19 #include "vrfobjcore/outputPort.h"
20 #include "vrfobjcore/portData.h"
21 #include <readerWriter/rwReal.h>
22 
24 
25 extern const char* DtLaserSpotPortDatatype;
26 
27 //each laser spot report has this information
28 //no virtual functions-do not derive from this class
29 
32 {
33 public:
34  //constructors
36  DtLaserSpotData(const DtString& name, DtReaderWriterRegistry* const parentRegistry = NULL);
37  DtLaserSpotData(const DtSymbolString& name,DtReaderWriterRegistry* const parentRegistry = NULL);
38 
39  //copy and assignment
40  DtLaserSpotData(const DtLaserSpotData& target, DtReaderWriterRegistry* const parentRegistry = NULL);
42 
43  ~DtLaserSpotData();
44 
45  //distance from the object being lased to the designator
46  void setDistance(double d);
47  double distance() const;
48 
49  //azimuth from the object being lased to the designator
50  void setAzimuth(double a);
51  double azimuth() const;
52 
53 protected:
56 
57 public:
58 };
59 
61 
66 {
67 public:
71  virtual ~DtLaserSpotListPortData();
76 
78  virtual const DtString type() const;
79 
81  virtual void setValue(DtLaserSpotList* v);
82 
84  virtual DtLaserSpotList* value() const;
85 
87  virtual DtPortData* clone() const;
88 
89 protected:
91 };
92 
97 {
98 public:
99  DtLaserDetectorInputPort(const DtString& portName);
100  virtual ~DtLaserDetectorInputPort();
101 
103  virtual bool acceptType(const DtString& type) const;
104 
106  virtual const DtLaserSpotList* value() const;
107 };
108 
113 {
114 public:
115  DtLaserDetectorOutputPort(const DtString& portName);
116  virtual ~DtLaserDetectorOutputPort();
117 
119  virtual const DtString type() const;
120 
122  virtual void createPortData();
123 
126  virtual void emptyList();
127 
129  virtual void addSpotReport(const DtLaserSpotData& spot);
130 
133  virtual void removeSpotReport(const DtLaserSpotData& spot);
134 
135  virtual const DtLaserSpotList* value() const;
136 
137 protected:
139 };
140 
141 
142 #endif
virtual const DtString type() const =0
Override for each derrived class to return a unique type string. This type string is the type of the ...
This class allows one to collect and compare strings using an index number instead of having to do st...
Definition: symbolString.h:27
Definition: readerWriter.h:85
DtLaserSpotList * myValue
Definition: laserDetectorIOPort.h:90
Definition: readerWriterRegistry.h:39
Contains the DtOutputPort class declaration.
Contains the class declaration for DtSingleConnectionInputPort.
Definition: singleConnectionInputPort.h:36
This is an abstract base class for all data elements that are passed through ports. Derived types will be such things as DtAnalogPortData which manage a double, or more complex data types such as a target list. Derived types must provide a type() method with a unique type string and a clone() method for copying the data.
Definition: portData.h:25
virtual void createPortData()=0
Override for each derived class to create and set the internal DtPortData representation.
Definition: laserDetectorIOPort.h:31
virtual bool acceptType(const DtString &type) const =0
Returns true if this port should accept the recipt of the specified DtPortData type. Override this function to return true for the types your port will accept.
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
DT_DLL_VRVCORE double distance(const makVrv::DtCoordinateSystem &, const DtVector &from, const DtVector &to)
Returns the distance from the two points. Coordinates are in local database coordinates The coordinat...
virtual const DtString type() const =0
Returns a string type value for this class. Provide a unique string for each DtPortData class...
const char * DtLaserSpotPortDatatype
Contains class declarations for DtEntityListInputPort, DtEntityListOutputPort, and DtEntityListPortDa...
Instances of DtEntityListInputPort are input ports through which data consumers can receive a list of...
Definition: laserDetectorIOPort.h:96
DtOutputPorts are data ports owned by data producers. They are connected to DtPortConnections and sen...
Definition: outputPort.h:42
DtRwReal myDistance
Definition: laserDetectorIOPort.h:54
Description: Readable, Writable DtReal (double)
Definition: rwReal.h:27
Instances of DtEntityListOutputPort are output ports through which data producers can send a list of ...
Definition: laserDetectorIOPort.h:112
DtRwTemplatedListPtr< DtLaserSpotData, true > DtLaserSpotList
Definition: laserDetectorIOPort.h:60
Instances of DtLaserSpotListPortData are concrete data elements containing a list of DtLaserSpotData...
Definition: laserDetectorIOPort.h:65
const DtReaderWriter & operator=(const DtReaderWriter &orig)
assignment operator
virtual DtPortData * clone() const =0
Provides a copy of this port data.
DtLaserSpotList mySpotReportList
Definition: laserDetectorIOPort.h:138
DtRwReal myAzimuth
Definition: laserDetectorIOPort.h:55
DtPortData & operator=(const DtPortData &orig)
Assignment operator.

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)