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 Project Download Mailing lists
|
libs/orcapublish/ogmappublisher.h00001 #ifndef ORCAPUBLISH_OGMAPPUBLISHER_H 00002 #define ORCAPUBLISH_OGMAPPUBLISHER_H 00003 00004 #include <hydropublish/ogmappublisher.h> 00005 #include <orcaifaceimpl/ogmap.h> 00006 #include <orcaogmap/orcaogmap.h> 00007 #include <orcaice/timeutils.h> 00008 00009 namespace orcapublish { 00010 00011 // 00012 // @author Alex Brooks 00013 // 00014 class OgMapPublisher : public hydropublish::OgMapPublisher 00015 { 00016 public: 00017 00018 OgMapPublisher( const orcaice::Context &context, const std::string &name ) 00019 : impl_(new orcaifaceimpl::OgMapImpl(context,name)) 00020 { 00021 } 00022 00023 inline void init() { impl_->initInterface(); } 00024 inline void localSetAndSend( const hydroogmap::OgMap &ogMap ) 00025 { 00026 orcaogmap::convert( ogMap, orcaOgMapData_ ); 00027 orcaOgMapData_.timeStamp = orcaice::getNow(); 00028 impl_->localSetAndSend( orcaOgMapData_ ); 00029 } 00030 00031 private: 00032 00033 orcaifaceimpl::OgMapImplPtr impl_; 00034 orca::OgMapData orcaOgMapData_; 00035 }; 00036 00037 class OgMapPublisherFactory : public hydropublish::OgMapPublisherFactory 00038 { 00039 public: 00040 OgMapPublisherFactory( const orcaice::Context &context ) 00041 : context_(context) 00042 {} 00043 00044 hydropublish::OgMapPublisherPtr createPublisher( const std::string &name ) 00045 { return hydropublish::OgMapPublisherPtr(new OgMapPublisher( context_, name )); } 00046 00047 private: 00048 00049 orcaice::Context context_; 00050 }; 00051 00052 } 00053 00054 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)