PropertyDefinitionContainerFormatter.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 "
PropertyUser.h
"
28
#include "
PropertyDefinitionFormatter.h
"
29
30
#include <string>
31
#include <list>
32
33
namespace
armarx
34
{
35
/**
36
* @ingroup properties
37
*
38
* @class PropertyDefinitionContainerFormatter
39
* @brief PropertyDefinitionContainerFormatter
40
*/
41
class
PropertyDefinitionContainerFormatter
42
{
43
public
:
44
PropertyDefinitionContainerFormatter
(
45
PropertyDefinitionFormatter
&
defFormatter
):
46
defFormatter
(
defFormatter
)
47
{
48
49
}
50
virtual
~PropertyDefinitionContainerFormatter
() {}
51
52
void
setProperties
(
Ice::PropertiesPtr
properties
)
53
{
54
this->properties =
properties
;
55
}
56
57
std::string
formatPropertyDefinitionContainer
(
PropertyDefinitionsPtr
container)
58
{
59
std::string output;
60
container->setProperties(
properties
);
61
output +=
defFormatter
.
formatHeader
(container->getDescription());
62
output += container->toString(
defFormatter
);
63
return
output;
64
}
65
66
virtual
std::string
formatPropertyUsers
(
67
const
PropertyUserList
& propertyUserList)
68
{
69
std::string output;
70
71
for
(
auto
& it : propertyUserList)
72
{
73
output +=
formatPropertyDefinitionContainer
(it->getPropertyDefinitions());
74
}
75
76
return
output;
77
}
78
79
80
81
protected
:
82
PropertyDefinitionFormatter
&
defFormatter
;
83
Ice::PropertiesPtr
properties
;
84
};
85
}
86
armarx::PropertyDefinitionContainerFormatter::setProperties
void setProperties(Ice::PropertiesPtr properties)
Definition:
PropertyDefinitionContainerFormatter.h:52
armarx::PropertyDefinitionContainerFormatter::formatPropertyUsers
virtual std::string formatPropertyUsers(const PropertyUserList &propertyUserList)
Definition:
PropertyDefinitionContainerFormatter.h:66
armarx::PropertyDefinitionContainerFormatter
PropertyDefinitionContainerFormatter.
Definition:
PropertyDefinitionContainerFormatter.h:41
PropertyDefinitionFormatter.h
armarx::PropertyDefinitionContainerFormatter::~PropertyDefinitionContainerFormatter
virtual ~PropertyDefinitionContainerFormatter()
Definition:
PropertyDefinitionContainerFormatter.h:50
IceInternal::Handle< ::Ice::Properties >
armarx::PropertyUserList
std::vector< PropertyUserPtr > PropertyUserList
UserProperty list type.
Definition:
PropertyUser.h:262
PropertyUser.h
armarx::PropertyDefinitionContainerFormatter::formatPropertyDefinitionContainer
std::string formatPropertyDefinitionContainer(PropertyDefinitionsPtr container)
Definition:
PropertyDefinitionContainerFormatter.h:57
armarx::PropertyDefinitionContainerFormatter::defFormatter
PropertyDefinitionFormatter & defFormatter
Definition:
PropertyDefinitionContainerFormatter.h:82
armarx::PropertyDefinitionContainerFormatter::PropertyDefinitionContainerFormatter
PropertyDefinitionContainerFormatter(PropertyDefinitionFormatter &defFormatter)
Definition:
PropertyDefinitionContainerFormatter.h:44
armarx::PropertyDefinitionFormatter::formatHeader
virtual std::string formatHeader(std::string headerText)=0
IceUtil::Handle< class PropertyDefinitionContainer >
armarx::PropertyDefinitionFormatter
PropertyDefinitionFormatter is the base class for all formatters of PropertyDefinitions.
Definition:
PropertyDefinitionFormatter.h:38
armarx::PropertyDefinitionContainerFormatter::properties
Ice::PropertiesPtr properties
Definition:
PropertyDefinitionContainerFormatter.h:83
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition:
ArmarXTimeserver.cpp:28
ArmarXCore
core
application
properties
PropertyDefinitionContainerFormatter.h
Generated on Sat Oct 12 2024 09:14:01 for armarx_documentation by
1.8.17