PropertyDefinitionFormatter.h
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * Copyright (C) 2011-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
5  *
6  * ArmarX is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  *
10  * ArmarX is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  *
18  * @package ArmarXCore::core
19  * @author Jan Issac (jan dot issac at gmx dot de)
20  * @date 2012
21  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22  * GNU General Public License
23  */
24 
25 #pragma once
26 
27 #include <string>
28 #include <vector>
29 
30 namespace armarx
31 {
32  /**
33  * @ingroup properties
34  *
35  * @class PropertyDefinitionFormatter
36  * @brief PropertyDefinitionFormatter is the base class for all formatters of PropertyDefinitions
37  */
39  {
40  public:
42 
43  virtual std::string formatDefinition(
44  std::string name,
45  std::string description,
46  std::string min,
47  std::string max,
48  std::string default_,
49  std::string casesensitivity,
50  std::string requirement,
51  std::string reged,
52  std::vector<std::string> values,
53  std::string value) = 0;
54 
55  virtual std::string formatName(std::string name) = 0;
56  virtual std::string formatDescription(std::string description) = 0;
57  virtual std::string formatBounds(std::string min, std::string max) = 0;
58  virtual std::string formatDefault(std::string default_) = 0;
59  virtual std::string formatCaseSensitivity(std::string caseSensitivity) = 0;
60  virtual std::string formatRequirement(std::string requirement) = 0;
61  virtual std::string formatRegex(std::string regex) = 0;
62  virtual std::string formatValue(std::string value) = 0;
63  virtual std::string formatValues(std::vector<std::string> values) = 0;
64  virtual std::string formatAttribute(std::string name, std::string details) = 0;
65 
66  virtual std::string formatHeader(std::string headerText) = 0;
67 
68  virtual std::string getFormat() = 0;
69 
70  virtual void setPrefix(std::string prefix)
71  {
72  this->prefix = prefix;
73  }
74 
75  virtual std::string getPrefix() const
76  {
77  return prefix;
78  }
79 
80  protected:
81  std::string prefix;
82  };
83 }
84 
armarx::PropertyDefinitionFormatter::setPrefix
virtual void setPrefix(std::string prefix)
Definition: PropertyDefinitionFormatter.h:70
armarx::PropertyDefinitionFormatter::formatDefault
virtual std::string formatDefault(std::string default_)=0
Definition: PropertyDefinitionFormatter.cpp:100
armarx::PropertyDefinitionFormatter::~PropertyDefinitionFormatter
virtual ~PropertyDefinitionFormatter()
Definition: PropertyDefinitionFormatter.h:41
armarx::PropertyDefinitionFormatter::formatRegex
virtual std::string formatRegex(std::string regex)=0
Definition: PropertyDefinitionFormatter.cpp:115
armarx::PropertyDefinitionFormatter::formatBounds
virtual std::string formatBounds(std::string min, std::string max)=0
Definition: PropertyDefinitionFormatter.cpp:80
armarx::PropertyDefinitionFormatter::getFormat
virtual std::string getFormat()=0
Definition: PropertyDefinitionFormatter.cpp:57
armarx::max
std::vector< T > max(const std::vector< T > &v1, const std::vector< T > &v2)
Definition: VectorHelpers.h:267
ProsthesisInterface.values
values
Definition: ProsthesisInterface.py:190
armarx::PropertyDefinitionFormatter::formatValue
virtual std::string formatValue(std::string value)=0
Definition: PropertyDefinitionFormatter.cpp:144
armarx::PropertyDefinitionFormatter::prefix
std::string prefix
Definition: PropertyDefinitionFormatter.h:81
armarx::PropertyDefinitionFormatter::formatName
virtual std::string formatName(std::string name)=0
Definition: PropertyDefinitionFormatter.cpp:70
armarx::PropertyDefinitionFormatter::formatDescription
virtual std::string formatDescription(std::string description)=0
Definition: PropertyDefinitionFormatter.cpp:75
armarx::PropertyDefinitionFormatter::formatCaseSensitivity
virtual std::string formatCaseSensitivity(std::string caseSensitivity)=0
cxxopts::value
std::shared_ptr< Value > value()
Definition: cxxopts.hpp:926
armarx::PropertyDefinitionFormatter::formatAttribute
virtual std::string formatAttribute(std::string name, std::string details)=0
armarx::PropertyDefinitionFormatter::formatValues
virtual std::string formatValues(std::vector< std::string > values)=0
Definition: PropertyDefinitionFormatter.cpp:120
armarx::PropertyDefinitionFormatter::getPrefix
virtual std::string getPrefix() const
Definition: PropertyDefinitionFormatter.h:75
armarx::PropertyDefinitionFormatter::formatRequirement
virtual std::string formatRequirement(std::string requirement)=0
Definition: PropertyDefinitionFormatter.cpp:110
armarx::PropertyDefinitionFormatter::formatHeader
virtual std::string formatHeader(std::string headerText)=0
armarx::min
std::vector< T > min(const std::vector< T > &v1, const std::vector< T > &v2)
Definition: VectorHelpers.h:294
armarx::PropertyDefinitionFormatter::formatDefinition
virtual std::string formatDefinition(std::string name, std::string description, std::string min, std::string max, std::string default_, std::string casesensitivity, std::string requirement, std::string reged, std::vector< std::string > values, std::string value)=0
Definition: PropertyDefinitionFormatter.cpp:32
armarx::PropertyDefinitionFormatter
PropertyDefinitionFormatter is the base class for all formatters of PropertyDefinitions.
Definition: PropertyDefinitionFormatter.h:38
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28