YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
parameter.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2024-2024 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6#ifndef PARAMETER_H
7#define PARAMETER_H
8
9#include <string>
10#include <vector>
11#include <deque>
12#include <memory>
13
14// The name of the parameter is fully scoped. This means:
15// 1) myParam
16// 2) mySection1::myParam1
17// 3) mySection1::myParam2::myParam3
18// etc.
20{
21 private:
22 std::string paramOnlyName;
23 std::string fullyScopedName;
24 std::deque<std::string> paramGroups;
25
26 public:
27 std::string type;
28 std::string units;
29 std::string defaultValue;
30 bool required = false;
31 std::string description;
32 std::string notes;
34
35 public:
36 void setFullyScopedParamName(std::string fullyScopedParamName);
37
38 //give param mySection1::myParam1::myParam2, the following functions will return:
39
40 //mySection1::myParam1
41 std::string getFullGroupOnlyName() const;
42
43 //mySection1::myParam1::myParam2
44 std::string getFullParamName() const;
45
46 //myParam2
47 std::string getParamOnly() const;
48
49 //mySection1_myParam1_myParam2
50 std::string getFullParamVariable() const;
51
52 //mySection1, myParam1
53 std::deque<std::string> getListOfGroups() const;
54
55 private:
57 std::string getFullGroupOnlyVariable() const;
58};
59
60#endif
std::string getParamOnly() const
Definition parameter.cpp:89
std::string units
Definition parameter.h:28
std::string getFullParamName() const
Definition parameter.cpp:53
std::string notes
Definition parameter.h:32
std::string optional_variable_name
Definition parameter.h:33
std::string type
Definition parameter.h:27
bool required
Definition parameter.h:30
void setFullyScopedParamName(std::string fullyScopedParamName)
Definition parameter.cpp:21
std::string getFullGroupOnlyName() const
Definition parameter.cpp:41
std::string description
Definition parameter.h:31
std::string defaultValue
Definition parameter.h:29
std::string getFullParamVariable() const
Definition parameter.cpp:76
std::deque< std::string > getListOfGroups() const
Definition parameter.cpp:94