INTRODUCTION
Overview
Download and Install
Quick Start
Documentation
Publications

NONFRAMEWORK CODE
Driver Interfaces
Drivers
Libraries
Utilities

FRAMEWORK CODE
Interfaces
Components
Libraries
Utilities

Full Software Listings

DEVELOPER
Tutorials
Examples
Dev Guide
Dashboard

PEOPLE
Contributors
Users

SourceForge.net Logo
Project
Download
Mailing lists

 

         

hydrolibs/hydropublish/localise2dpublisher.h

00001 #ifndef HYDROPUBLISH_LOCALISE2DPUBLISHER_H
00002 #define HYDROPUBLISH_LOCALISE2DPUBLISHER_H
00003 
00004 #include <boost/shared_ptr.hpp>
00005 #include <hydronavutil/hydronavutil.h>
00006 #include <hydrotime/time.h>
00007 #include <hydronavutil/vehicledescription.h>
00008 
00009 namespace hydropublish {
00010 
00011 //
00012 // @brief Knows how to inform the world of Localise2d information.
00013 //
00014 // @author Alex Brooks
00015 //
00016 class Localise2dPublisher
00017 {
00018 public: 
00019     virtual ~Localise2dPublisher() {}
00020 
00021 
00022     virtual void init()=0;
00023     virtual void localSetAndSend( const hydronavutil::Gmm &gmm,
00024                                   const hydrotime::Time &timeStamp )=0;
00025     virtual void localSetAndSend( const hydronavutil::Pose &pose,
00026                                   const hydrotime::Time    &time = hydrotime::Time(0,0) )=0;
00027 
00028 private:
00029 
00030 };
00031 typedef boost::shared_ptr<Localise2dPublisher> Localise2dPublisherPtr;
00032 
00033 //
00034 // Does nothing
00035 //
00036 class DummyLocalise2dPublisher : public Localise2dPublisher {
00037 public:
00038     void init() {}
00039     void localSetAndSend( const hydronavutil::Gmm &gmm,
00040                           const hydrotime::Time &timeStamp ) {}
00041     void localSetAndSend( const hydronavutil::Pose &pose,
00042                           const hydrotime::Time    &time = hydrotime::Time(0,0) ) {}
00043 };
00044 
00045 //
00046 // @brief Knows how to create Localise2dPublisher's
00047 //
00048 // @author Alex Brooks
00049 //
00050 class Localise2dPublisherFactory
00051 {
00052 public:
00053     virtual ~Localise2dPublisherFactory() {}
00054 
00055     virtual Localise2dPublisherPtr createPublisher( 
00056         const hydronavutil::CylindricalGeometryDescription &cylindricalDescription,
00057         const std::string                                  &name ) = 0;
00058 
00059     virtual Localise2dPublisherPtr createPublisher( const std::string &name )=0;
00060 
00061 private:
00062 };
00063 typedef boost::shared_ptr<Localise2dPublisherFactory> Localise2dPublisherFactoryPtr;
00064 
00065 //
00066 // Produces dummy publishers
00067 //
00068 class DummyLocalise2dPublisherFactory : public Localise2dPublisherFactory {
00069 public:
00070 
00071     Localise2dPublisherPtr createPublisher( const hydronavutil::CylindricalGeometryDescription &cylindricalDescription,
00072                                             const std::string                  &name )
00073         { return Localise2dPublisherPtr( new DummyLocalise2dPublisher ); }
00074     Localise2dPublisherPtr createPublisher( const std::string &name )
00075         { return Localise2dPublisherPtr( new DummyLocalise2dPublisher ); }
00076 
00077 };
00078 
00079 }
00080 
00081 #endif
 

Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)


Generated for Orca Robotics by  doxygen 1.4.5