RobotsIO
Loading...
Searching...
No Matches
Parameters.cpp
1/*
2 * Copyright (C) 2019 Istituto Italiano di Tecnologia (IIT)
3 *
4 * This software may be modified and distributed under the terms of the
5 * BSD 3-Clause license. See the accompanying LICENSE file for details.
6 */
7
8#include <RobotsIO/Utils/Parameters.h>
9
10using namespace RobotsIO::Utils;
11
12#define robots_io_field_getter_impl(type) \
13 type Parameters::get_##type(const std::string& name) const \
14 { \
15 return type##_data_.at(name); \
16 } \
17
18#define robots_io_std_field_getter_impl(type) \
19 std::type Parameters::get_##type(const std::string& name) const \
20 { \
21 return type##_data_.at(name); \
22 } \
23
24#define robots_io_field_setter_impl(type) \
25 void Parameters::set_##type(const std::string& name, const type& value) \
26 { \
27 type##_data_[name] = value; \
28 } \
29
30#define robots_io_std_field_setter_impl(type) \
31 void Parameters::set_##type(const std::string& name, const std::type& value) \
32 { \
33 type##_data_[name] = value; \
34 }
35
36
37robots_io_std_field_getter_impl(string);
38
39
40robots_io_std_field_getter_impl(size_t);
41
42
43robots_io_field_getter_impl(double);
44
45
46robots_io_field_getter_impl(int);
47
48
49robots_io_field_getter_impl(bool);
50
51
52robots_io_std_field_setter_impl(string);
53
54
55robots_io_std_field_setter_impl(size_t);
56
57
58robots_io_field_setter_impl(double);
59
60
61robots_io_field_setter_impl(int);
62
63
64robots_io_field_setter_impl(bool);
65
66
68{
69 return this;
70}
const Parameters * parameters() const
Definition: Parameters.cpp:67