MemberProfile.h
Go to the documentation of this file.
1 #pragma once
2 
7 
8 namespace swarmio::profiles
9 {
14  class MemberProfile : public Profile
15  {
16  protected:
17 
23 
29 
30  public:
31 
38  : Profile(endpoint, false), _keyvalueService(endpoint), _eventService(endpoint)
39  {
41  _discoveryService.RegisterDiscoverable(&_keyvalueService);
42  }
43 
50  {
51  return _eventService;
52  }
53 
60  {
61  return _keyvalueService;
62  }
63 
68  virtual ~MemberProfile()
69  {
70  _discoveryService.UnregisterDiscoverable(&_keyvalueService);
72  }
73  };
74 }
void RegisterDiscoverable(Discoverable *discoverable)
Register a new Discoverable service.
The Event service is responsible for triggering, handling and monitoring events.
Definition: event/Service.h:18
The Key-Value Service is responsible for getting and setting named values.
virtual ~MemberProfile()
Destroy the MemberProfile object.
Definition: MemberProfile.h:68
Service profile for swarm members.
Definition: MemberProfile.h:14
swarmio::services::event::Service & GetEventService()
Get a reference for the Event service.
Definition: MemberProfile.h:49
swarmio::services::discovery::Service _discoveryService
Discovery service.
Definition: Profile.h:24
void UnregisterDiscoverable(Discoverable *discoverable)
Unregister a Discoverable service.
MemberProfile(Endpoint *endpoint)
Construct a new MemberProfile.
Definition: MemberProfile.h:37
Abstract base class for Endpoint implementations.
Definition: Endpoint.h:25
swarmio::services::event::Service _eventService
Event service.
Definition: MemberProfile.h:28
swarmio::services::keyvalue::Service _keyvalueService
Key-Value service.
Definition: MemberProfile.h:22
Base class for profiles.
Definition: Profile.h:16
swarmio::services::keyvalue::Service & GetKeyValueService()
Get a reference for the Key-Value service.
Definition: MemberProfile.h:59


swarmros
Author(s):
autogenerated on Fri Apr 3 2020 03:42:48