Image Component Library (ICL)
Public Types | Public Member Functions | List of all members
icl::io::RSBIOUtil< T > Class Template Reference

Simple and ready to use RSB-Informer and RSB-Listener Interface. More...

#include <RSBIOUtil.h>

Inheritance diagram for icl::io::RSBIOUtil< T >:
icl::io::RSBIOUtilDataExtra< T > icl::utils::Uncopyable icl::io::RSBIOUtilDataBase< T >

Public Types

typedef RSBIOUtilDataExtra< T > Super
 
- Public Types inherited from icl::io::RSBIOUtilDataExtra< T >
typedef rsb::converter::ProtocolBufferConverter< T > Converter
 
typedef boost::shared_ptr< ConverterConverterPtr
 
- Public Types inherited from icl::io::RSBIOUtilDataBase< T >
typedef rsb::Informer< T > Informer
 
typedef Informer::Ptr InformerPtr
 
typedef Informer::DataPtr DataPtr
 
typedef rsb::Scope Scope
 
typedef rsb::ListenerPtr ListenerPtr
 
typedef utils::Function< void, const T & > Callback
 Callback type that is used for listener_callbacks. More...
 

Public Member Functions

 RSBIOUtil (const std::string &mode, const std::string &scope, bool autoRegisterType=true)
 creates an instance with given mode and scope More...
 
void send (const T &t)
 
void send (typename Super::DataPtr data)
 
void handle (typename Super::DataPtr data)
 
void registerListenerCallback (typename Super::Callback cb, const std::string &id="default")
 
void unregisterListenerCallback (const std::string &id="default")
 
- Public Member Functions inherited from icl::io::RSBIOUtilDataBase< T >
virtual ~RSBIOUtilDataBase ()
 

Additional Inherited Members

- Static Public Member Functions inherited from icl::io::RSBIOUtilDataExtra< T >
static void register_type ()
 
- Public Attributes inherited from icl::io::RSBIOUtilDataBase< T >
InformerPtr m_informer
 
DataPtr m_data
 
Scope m_scope
 
ListenerPtr m_listener
 
utils::Mutex m_mutex
 
std::map< std::string, Callbackm_callbacks
 
- Protected Member Functions inherited from icl::utils::Uncopyable
 Uncopyable ()
 Empty base constructor. More...
 

Detailed Description

template<class T>
class icl::io::RSBIOUtil< T >

Simple and ready to use RSB-Informer and RSB-Listener Interface.

This utility class will help to significantly reduce the amount of boiler-plate code in 95% of all cases where RSB-communication is needed. In the current implementation, only protocol buffer types are supported.

Member Typedef Documentation

◆ Super

template<class T >
typedef RSBIOUtilDataExtra<T> icl::io::RSBIOUtil< T >::Super

Constructor & Destructor Documentation

◆ RSBIOUtil()

template<class T >
icl::io::RSBIOUtil< T >::RSBIOUtil ( const std::string &  mode,
const std::string &  scope,
bool  autoRegisterType = true 
)
inline

creates an instance with given mode and scope

mode must be either send or receive

Member Function Documentation

◆ handle()

template<class T >
void icl::io::RSBIOUtil< T >::handle ( typename Super::DataPtr  data)
inline

◆ registerListenerCallback()

template<class T >
void icl::io::RSBIOUtil< T >::registerListenerCallback ( typename Super::Callback  cb,
const std::string &  id = "default" 
)
inline

◆ send() [1/2]

template<class T >
void icl::io::RSBIOUtil< T >::send ( const T &  t)
inline

◆ send() [2/2]

template<class T >
void icl::io::RSBIOUtil< T >::send ( typename Super::DataPtr  data)
inline

◆ unregisterListenerCallback()

template<class T >
void icl::io::RSBIOUtil< T >::unregisterListenerCallback ( const std::string &  id = "default")
inline

The documentation for this class was generated from the following file: