fw4spl
IParametersService.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2016-2018.
3  * Distributed under the terms of the GNU Lesser General Public License (LGPL) as
4  * published by the Free Software Foundation.
5  * ****** END LICENSE BLOCK ****** */
6 
7 #pragma once
8 
9 #include "fwServices/config.hpp"
10 #include <fwServices/IService.hpp>
11 
12 #include <array>
13 #include <cstdint>
14 
15 namespace fwServices
16 {
17 
38 class FWSERVICES_CLASS_API IParametersService : public ::fwServices::IService
39 {
40 
41 public:
42 
44 
45  FWSERVICES_API static const ::fwCom::Slots::SlotKeyType s_SET_BOOL_PARAMETER_SLOT;
46  FWSERVICES_API static const ::fwCom::Slots::SlotKeyType s_SET_COLOR_PARAMETER_SLOT;
47  FWSERVICES_API static const ::fwCom::Slots::SlotKeyType s_SET_DOUBLE_PARAMETER_SLOT;
48  FWSERVICES_API static const ::fwCom::Slots::SlotKeyType s_SET_DOUBLE2_PARAMETER_SLOT;
49  FWSERVICES_API static const ::fwCom::Slots::SlotKeyType s_SET_DOUBLE3_PARAMETER_SLOT;
50  FWSERVICES_API static const ::fwCom::Slots::SlotKeyType s_SET_INT_PARAMETER_SLOT;
51  FWSERVICES_API static const ::fwCom::Slots::SlotKeyType s_SET_INT2_PARAMETER_SLOT;
52  FWSERVICES_API static const ::fwCom::Slots::SlotKeyType s_SET_INT3_PARAMETER_SLOT;
53  FWSERVICES_API static const ::fwCom::Slots::SlotKeyType s_SET_ENUM_PARAMETER_SLOT;
54 
55 protected:
56 
58  FWSERVICES_API IParametersService();
59 
61  FWSERVICES_API virtual ~IParametersService();
62 
64  FWSERVICES_API virtual void setBoolParameter(bool val, std::string key);
65 
67  FWSERVICES_API virtual void setColorParameter(std::array<std::uint8_t, 4> color, std::string key);
68 
70  FWSERVICES_API virtual void setDoubleParameter(double val, std::string key);
71 
73  FWSERVICES_API virtual void setDouble2Parameter(double val0, double val1, std::string key);
74 
76  FWSERVICES_API virtual void setDouble3Parameter(double val0, double val1, double val2, std::string key);
77 
79  FWSERVICES_API virtual void setIntParameter(int val, std::string key);
80 
82  FWSERVICES_API virtual void setInt2Parameter(int val0, int val1, std::string key);
83 
85  FWSERVICES_API virtual void setInt3Parameter(int val0, int val1, int val2, std::string key);
86 
88  FWSERVICES_API virtual void setEnumParameter(std::string val, std::string key);
89 };
90 
91 }
Base class for all services.
Definition: IService.hpp:61
Namespace fwServices is dedicated to (mimic) the dynamic affectation of methods to (pure data) object...
#define fwCoreServiceClassDefinitionsMacro(_classinfo_)
Generate common code for services classes.
This interface defines a basic slots to receive parameter values from signals.