diff options
author | William R. Otte <wotte@dre.vanderbilt.edu> | 2009-08-16 20:41:22 +0000 |
---|---|---|
committer | William R. Otte <wotte@dre.vanderbilt.edu> | 2009-08-16 20:41:22 +0000 |
commit | 3b37923a14c7db4d9d602cd9166be38f6104da50 (patch) | |
tree | 63477c4878be44047f054092ab3a9b8bb77ba59f /modules/CIAO/examples/Display/NavDisplayGUI_exec/NavUnit.h | |
parent | 767b53703f187eddaf51b3a1d99c6984bf8ba75f (diff) | |
download | ATCD-3b37923a14c7db4d9d602cd9166be38f6104da50.tar.gz |
branching/tagging
Diffstat (limited to 'modules/CIAO/examples/Display/NavDisplayGUI_exec/NavUnit.h')
-rw-r--r-- | modules/CIAO/examples/Display/NavDisplayGUI_exec/NavUnit.h | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/modules/CIAO/examples/Display/NavDisplayGUI_exec/NavUnit.h b/modules/CIAO/examples/Display/NavDisplayGUI_exec/NavUnit.h new file mode 100644 index 00000000000..86dd2cccbd7 --- /dev/null +++ b/modules/CIAO/examples/Display/NavDisplayGUI_exec/NavUnit.h @@ -0,0 +1,57 @@ +// $Id$ + +#ifndef __NAVUNIT_H +#define __NAVUNIT_H + +#include "ace/SString.h" + + +class UnitLocation +{ +public: + UnitLocation() {x_ = y_ = z_ = 0.0;} + UnitLocation( + double x, + double y, + double z) : + x_(x), y_(y), z_(z) {} + + UnitLocation(const UnitLocation &ul) { operator = (ul); } + +public: + UnitLocation & operator = (const UnitLocation &ul) + { + x_ = ul.x_; + y_ = ul.y_; + z_ = ul.z_; + return *this; + } + +public: + double x_, y_, z_; +}; + +typedef unsigned long UnitID; + +class NavUnit +{ +public: + NavUnit(const UnitID &id, const char *short_descr); + virtual ~NavUnit() {} + +public: + UnitID getID() const {return id_;} + + const char *getShortDescr() const {return short_descr_.c_str();} + void setShortDescr(const char *short_descr) {short_descr_ = short_descr;} + + UnitLocation getLocation() const {return loc_;} + void setLocation(const UnitLocation &loc) {loc_ = loc;} + +protected: + UnitID id_; + ACE_CString short_descr_; + UnitLocation loc_; +}; + +#endif // __NAVUNIT_H |