Version FC

Dependencies:   DmTftLibrary eeprom SX1280Lib filesystem mbed

Fork of MSNV2-Terminal_V1-5 by Francis CHATAIN

Committer:
FCH_31
Date:
Mon Oct 22 09:37:50 2018 +0000
Revision:
41:5a436163dddf
Parent:
20:b0281e8a375a
avec radio;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
patrick_duc 20:b0281e8a375a 1 #ifndef __CANDIDATE_COMPONENT_HPP__
patrick_duc 20:b0281e8a375a 2 #define __CANDIDATE_COMPONENT_HPP__
patrick_duc 20:b0281e8a375a 3
patrick_duc 20:b0281e8a375a 4 #include "Context.h"
patrick_duc 20:b0281e8a375a 5
patrick_duc 20:b0281e8a375a 6 #include <list>
patrick_duc 20:b0281e8a375a 7 #include <sstream>
patrick_duc 20:b0281e8a375a 8 #include <string>
patrick_duc 20:b0281e8a375a 9
patrick_duc 20:b0281e8a375a 10
patrick_duc 20:b0281e8a375a 11 namespace misnet {
patrick_duc 20:b0281e8a375a 12 class CandidateComponent;
patrick_duc 20:b0281e8a375a 13 }
patrick_duc 20:b0281e8a375a 14
patrick_duc 20:b0281e8a375a 15
patrick_duc 20:b0281e8a375a 16 class misnet::CandidateComponent {
patrick_duc 20:b0281e8a375a 17
patrick_duc 20:b0281e8a375a 18 public:
patrick_duc 20:b0281e8a375a 19 CandidateComponent(Component* component) : _component(component), _services(std::list<Service*>()) {
patrick_duc 20:b0281e8a375a 20 }
patrick_duc 20:b0281e8a375a 21
patrick_duc 20:b0281e8a375a 22 Component* getComponent() {
patrick_duc 20:b0281e8a375a 23 return this->_component;
patrick_duc 20:b0281e8a375a 24 }
patrick_duc 20:b0281e8a375a 25
patrick_duc 20:b0281e8a375a 26 std::list<Service*> & getServices() {
patrick_duc 20:b0281e8a375a 27 return this->_services;
patrick_duc 20:b0281e8a375a 28 }
patrick_duc 20:b0281e8a375a 29
patrick_duc 20:b0281e8a375a 30 void addService(Service* service) {
patrick_duc 20:b0281e8a375a 31 //DEBUG("\tAdding a pointer to service = %p\n", service);
patrick_duc 20:b0281e8a375a 32 //DEBUG("\tCorresponding service = %d\n", service->getMisnetCode());
patrick_duc 20:b0281e8a375a 33 this->_services.push_back(service);
patrick_duc 20:b0281e8a375a 34 }
patrick_duc 20:b0281e8a375a 35
patrick_duc 20:b0281e8a375a 36 private:
patrick_duc 20:b0281e8a375a 37 Component* _component;
patrick_duc 20:b0281e8a375a 38 std::list<Service*> _services;
patrick_duc 20:b0281e8a375a 39 };
patrick_duc 20:b0281e8a375a 40
patrick_duc 20:b0281e8a375a 41 #endif // __CANDIDATE_COMPONENT_HPP__