DummyTextToSpeech.h
Go to the documentation of this file.
1/*
2 * This file is part of ArmarX.
3 *
4 * ArmarX is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * ArmarX is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * @package RobotAPI::ArmarXObjects::DummyTextToSpeech
17 * @author Simon Ottenhaus ( simon dot ottenhaus at kit dot edu )
18 * @date 2018
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22
23#pragma once
24
25
27
28#include <RobotAPI/interface/speech/SpeechInterface.h>
29
30namespace armarx
31{
32 /**
33 * @class DummyTextToSpeechPropertyDefinitions
34 * @brief
35 */
37 {
38 public:
41 {
42 //defineRequiredProperty<std::string>("PropertyName", "Description");
44 "TextToSpeechTopicName", "TextToSpeech", "Name of the TextToSpeechTopic");
45 defineOptionalProperty<std::string>("TextToSpeechStateTopicName",
46 "TextToSpeechState",
47 "Name of the TextToSpeechStateTopic");
48 }
49 };
50
51 /**
52 * @defgroup Component-DummyTextToSpeech DummyTextToSpeech
53 * @ingroup RobotAPI-Components
54 * A description of the component DummyTextToSpeech.
55 *
56 * @class DummyTextToSpeech
57 * @ingroup Component-DummyTextToSpeech
58 * @brief Brief description of class DummyTextToSpeech.
59 *
60 * Detailed description of class DummyTextToSpeech.
61 */
62 class DummyTextToSpeech : virtual public armarx::Component, virtual public TextListenerInterface
63 {
64 public:
65 /**
66 * @see armarx::ManagedIceObject::getDefaultName()
67 */
68 std::string
69 getDefaultName() const override
70 {
71 return "DummyTextToSpeech";
72 }
73
74 protected:
75 /**
76 * @see armarx::ManagedIceObject::onInitComponent()
77 */
78 void onInitComponent() override;
79
80 /**
81 * @see armarx::ManagedIceObject::onConnectComponent()
82 */
83 void onConnectComponent() override;
84
85 /**
86 * @see armarx::ManagedIceObject::onDisconnectComponent()
87 */
88 void onDisconnectComponent() override;
89
90 /**
91 * @see armarx::ManagedIceObject::onExitComponent()
92 */
93 void onExitComponent() override;
94
95 /**
96 * @see PropertyUser::createPropertyDefinitions()
97 */
99
100 // TextListenerInterface interface
101 public:
102 void reportText(const std::string& text, const Ice::Current&) override;
103 void reportTextWithParams(const std::string& text,
104 const Ice::StringSeq& params,
105 const Ice::Current&) override;
106
107 private:
108 TextToSpeechStateInterfacePrx textToSpeechStateTopicPrx;
109 };
110} // namespace armarx
Default component property definition container.
Definition Component.h:70
ComponentPropertyDefinitions(std::string prefix, bool hasObjectNameParameter=true)
Definition Component.cpp:46
Baseclass for all ArmarX ManagedIceObjects requiring properties.
Definition Component.h:94
Brief description of class DummyTextToSpeech.
void reportText(const std::string &text, const Ice::Current &) override
void reportTextWithParams(const std::string &text, const Ice::StringSeq &params, const Ice::Current &) override
void onDisconnectComponent() override
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
std::string getDefaultName() const override
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
PropertyDefinition< PropertyType > & defineOptionalProperty(const std::string &name, PropertyType defaultValue, const std::string &description="", PropertyDefinitionBase::PropertyConstness constness=PropertyDefinitionBase::eConstant)
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.