8#include <RobotsIO/Utils/Parameters2YarpBottle.h>
10using namespace RobotsIO::Utils;
11using namespace yarp::os;
14Parameters2YarpBottle::Parameters2YarpBottle(
const Parameters& parameters) :
19Parameters2YarpBottle::~Parameters2YarpBottle()
23Bottle Parameters2YarpBottle::extract_to_bottle()
31void Parameters2YarpBottle::extract_field(
const std::string& key,
const std::string& value)
33 bottle_.addString(key);
34 bottle_.addString(value);
38void Parameters2YarpBottle::extract_field(
const std::string& key,
const std::size_t& value)
40 bottle_.addString(key);
41 bottle_.addInt32(value);
45void Parameters2YarpBottle::extract_field(
const std::string& key,
const int& value)
47 bottle_.addString(key);
48 bottle_.addInt32(value);
52void Parameters2YarpBottle::extract_field(
const std::string& key,
const double& value)
54 bottle_.addString(key);
55 bottle_.addFloat64(value);
59void Parameters2YarpBottle::extract_field(
const std::string& key,
const bool& value)
61 bottle_.addString(key);
62 bottle_.addInt32(value ? 1 : 0);