![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /******************************************************************************* 00002 ** Copyright (c) 2003 MaK Technologies, Inc. 00003 ** All rights reserved. 00004 *******************************************************************************/ 00005 /******************************************************************************* 00006 ** $RCSfile: laserDetectorPort.h,v $ $Revision: 1.1 $ $State: Exp $ 00007 *******************************************************************************/ 00008 00011 00014 00015 #ifndef DtLaserDetectorPort_H_ 00016 #define DtLaserDetectorPort_H_ 00017 00018 #include "vrfobjcore/singleConnectionInputPort.h" 00019 #include "vrfobjcore/outputPort.h" 00020 #include "vrfobjcore/portData.h" 00021 #include "vrfutil/rwReal.h" 00022 00023 #include "vrfutil/rwTemplatedList.h" 00024 00025 extern const char* DtLaserSpotPortDatatype; 00026 00027 //each laser spot report has this information 00028 //no virtual functions-do not derive from this class 00029 00030 #include "vrfobjcore/vrfobjcoreDefines.h" 00031 class DT_DLL_vrfobjcore DtLaserSpotData : public DtReaderWriter 00032 { 00033 public: 00034 //constructors 00035 DtLaserSpotData(); 00036 DtLaserSpotData(const DtString& name, DtReaderWriterRegistry* const parentRegistry = NULL); 00037 DtLaserSpotData(const DtSymbolString& name,DtReaderWriterRegistry* const parentRegistry = NULL); 00038 00039 //copy and assignment 00040 DtLaserSpotData(const DtLaserSpotData& target, DtReaderWriterRegistry* const parentRegistry = NULL); 00041 DtLaserSpotData& operator=(const DtLaserSpotData& d); 00042 00043 ~DtLaserSpotData(); 00044 00045 //distance from the object being lased to the designator 00046 void setDistance(double d); 00047 double distance() const; 00048 00049 //azimuth from the object being lased to the designator 00050 void setAzimuth(double a); 00051 double azimuth() const; 00052 00053 protected: 00054 DtRwReal myDistance; 00055 DtRwReal myAzimuth; 00056 00057 public: 00058 }; 00059 00060 typedef DtRwTemplatedListPtr<DtLaserSpotData> DtLaserSpotList; 00061 00065 class DT_DLL_vrfobjcore DtLaserSpotListPortData : public DtPortData 00066 { 00067 public: 00069 DtLaserSpotListPortData(); 00071 virtual ~DtLaserSpotListPortData(); 00073 DtLaserSpotListPortData(const DtLaserSpotListPortData& orig); 00075 DtLaserSpotListPortData& operator=(const DtLaserSpotListPortData& orig); 00076 00078 virtual const DtString type() const; 00079 00081 virtual void setValue(DtLaserSpotList* v); 00082 00084 virtual DtLaserSpotList* value() const; 00085 00087 virtual DtPortData* clone() const; 00088 00089 protected: 00090 DtLaserSpotList* myValue; 00091 }; 00092 00096 class DT_DLL_vrfobjcore DtLaserDetectorInputPort : public DtSingleConnectionInputPort 00097 { 00098 public: 00099 DtLaserDetectorInputPort(const DtString& portName); 00100 virtual ~DtLaserDetectorInputPort(); 00101 00103 virtual bool acceptType(const DtString& type) const; 00104 00106 virtual const DtLaserSpotList* value() const; 00107 }; 00108 00112 class DT_DLL_vrfobjcore DtLaserDetectorOutputPort : public DtOutputPort 00113 { 00114 public: 00115 DtLaserDetectorOutputPort(const DtString& portName); 00116 virtual ~DtLaserDetectorOutputPort(); 00117 00119 virtual const DtString type() const; 00120 00122 virtual void createPortData(); 00123 00126 virtual void emptyList(); 00127 00129 virtual void addSpotReport(const DtLaserSpotData& spot); 00130 00133 virtual void removeSpotReport(const DtLaserSpotData& spot); 00134 00135 virtual const DtLaserSpotList* value() const; 00136 00137 protected: 00138 DtLaserSpotList mySpotReportList; 00139 }; 00140 00141 00142 #endif