Goby3  3.1.5a
2024.05.23
goby::middleware::SerializationSubscription< Data, scheme_id > Class Template Reference

Represents a subscription to a serialized data type (interprocess layer). More...

#include <goby/middleware/transport/serialization_handlers.h>

Inheritance diagram for goby::middleware::SerializationSubscription< Data, scheme_id >:
goby::middleware::SerializationHandlerBase<> goby::middleware::SerializationHandlerPostSelector< void >

Public Types

typedef std::function< void(std::shared_ptr< const Data > data)> HandlerType
 
- Public Types inherited from goby::middleware::SerializationHandlerBase<>
enum  SubscriptionAction
 

Public Member Functions

 SerializationSubscription (HandlerType handler, const Group &group=Group(Group::broadcast_group), const Subscriber< Data > &subscriber=Subscriber< Data >())
 
std::string::const_iterator post (std::string::const_iterator b, std::string::const_iterator e) const override
 
std::vector< char >::const_iterator post (std::vector< char >::const_iterator b, std::vector< char >::const_iterator e) const override
 
const charpost (const char *b, const char *e) const override
 
SerializationHandlerBase ::SubscriptionAction action () const override
 
const std::string & type_name () const override
 
const Groupsubscribed_group () const override
 
int scheme () const override
 
- Public Member Functions inherited from goby::middleware::SerializationHandlerBase<>
 SerializationHandlerBase ()=default
 
virtual ~SerializationHandlerBase ()=default
 
virtual const std::string & type_name () const=0
 
virtual const Groupsubscribed_group () const=0
 
virtual int scheme () const=0
 
virtual SubscriptionAction action () const=0
 
std::thread::id thread_id () const
 
virtual std::string subscriber_id () const
 

Detailed Description

template<typename Data, int scheme_id>
class goby::middleware::SerializationSubscription< Data, scheme_id >

Represents a subscription to a serialized data type (interprocess layer).

Template Parameters
DataSubscribed data type
scheme_idMarshalling scheme id (typically MarshallingScheme::MarshallingSchemeEnum).

Definition at line 136 of file serialization_handlers.h.

Member Typedef Documentation

◆ HandlerType

template<typename Data , int scheme_id>
typedef std::function<void(std::shared_ptr<const Data> data)> goby::middleware::SerializationSubscription< Data, scheme_id >::HandlerType

Definition at line 139 of file serialization_handlers.h.

Constructor & Destructor Documentation

◆ SerializationSubscription()

template<typename Data , int scheme_id>
goby::middleware::SerializationSubscription< Data, scheme_id >::SerializationSubscription ( HandlerType  handler,
const Group group = Group(Group::broadcast_group),
const Subscriber< Data > &  subscriber = Subscriber<Data>() 
)
inline

Definition at line 141 of file serialization_handlers.h.

Member Function Documentation

◆ action()

template<typename Data , int scheme_id>
SerializationHandlerBase ::SubscriptionAction goby::middleware::SerializationSubscription< Data, scheme_id >::action ( ) const
inlineoverride

Definition at line 168 of file serialization_handlers.h.

◆ post() [1/3]

template<typename Data , int scheme_id>
const char* goby::middleware::SerializationSubscription< Data, scheme_id >::post ( const char b,
const char e 
) const
inlineoverride

Definition at line 166 of file serialization_handlers.h.

◆ post() [2/3]

template<typename Data , int scheme_id>
std::string::const_iterator goby::middleware::SerializationSubscription< Data, scheme_id >::post ( std::string::const_iterator  b,
std::string::const_iterator  e 
) const
inlineoverride

Definition at line 152 of file serialization_handlers.h.

◆ post() [3/3]

template<typename Data , int scheme_id>
std::vector<char>::const_iterator goby::middleware::SerializationSubscription< Data, scheme_id >::post ( std::vector< char >::const_iterator  b,
std::vector< char >::const_iterator  e 
) const
inlineoverride

Definition at line 159 of file serialization_handlers.h.

◆ scheme()

template<typename Data , int scheme_id>
int goby::middleware::SerializationSubscription< Data, scheme_id >::scheme ( ) const
inlineoverride

Definition at line 176 of file serialization_handlers.h.

◆ subscribed_group()

template<typename Data , int scheme_id>
const Group& goby::middleware::SerializationSubscription< Data, scheme_id >::subscribed_group ( ) const
inlineoverride

Definition at line 175 of file serialization_handlers.h.

◆ type_name()

template<typename Data , int scheme_id>
const std::string& goby::middleware::SerializationSubscription< Data, scheme_id >::type_name ( ) const
inlineoverride

Definition at line 174 of file serialization_handlers.h.


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