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/qgraphics2dpublisher.h

00001 #ifndef HYDROPUBLISH_QGRAPHICS2DPUBLISHER_H
00002 #define HYDROPUBLISH_QGRAPHICS2DPUBLISHER_H
00003 
00004 #include <boost/shared_ptr.hpp>
00005 #include <QPicture>
00006 
00007 namespace hydropublish {
00008 
00009 //
00010 // @brief Allows publishing of 2d graphics.
00011 //
00012 // @author Alex Brooks
00013 //
00014 class QGraphics2dPublisher
00015 {
00016 public: 
00017     virtual ~QGraphics2dPublisher() {}
00018 
00019     virtual void init()=0;
00020     virtual void localSetAndSend( const QPicture &picture )=0;
00021 
00022 private: 
00023 
00024 };
00025 typedef boost::shared_ptr<QGraphics2dPublisher> QGraphics2dPublisherPtr;
00026 
00027 // Does nothing
00028 class DummyQGraphics2dPublisher : public QGraphics2dPublisher {
00029 public:
00030     void init() {}
00031     void localSetAndSend( const QPicture &picture ) {}
00032 };
00033 
00034 //
00035 // @brief Allows pulishers of unknown concrete type to be created
00036 //
00037 // @author Alex Brooks
00038 //
00039 class QGraphics2dPublisherFactory
00040 {
00041 public:
00042     virtual ~QGraphics2dPublisherFactory() {}
00043 
00044     virtual QGraphics2dPublisherPtr createPublisher( const std::string &name )=0;
00045 
00046 private:
00047 };
00048 typedef boost::shared_ptr<QGraphics2dPublisherFactory> QGraphics2dPublisherFactoryPtr;
00049 
00050 // Creates dummy publishers
00051 class DummyQGraphics2dPublisherFactory : public QGraphics2dPublisherFactory {
00052 public:
00053     QGraphics2dPublisherPtr createPublisher( const std::string &name )
00054         { return QGraphics2dPublisherPtr(new DummyQGraphics2dPublisher); }    
00055 };
00056 
00057 }
00058 
00059 #endif
 

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


Generated for Orca Robotics by  doxygen 1.4.5