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 
30 namespace armarx
31 {
32  /**
33  * @class DummyTextToSpeechPropertyDefinitions
34  * @brief
35  */
37  {
38  public:
41  {
42  //defineRequiredProperty<std::string>("PropertyName", "Description");
43  defineOptionalProperty<std::string>(
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
armarx::DummyTextToSpeech::onDisconnectComponent
void onDisconnectComponent() override
Definition: DummyTextToSpeech.cpp:45
armarx::DummyTextToSpeech::createPropertyDefinitions
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
Definition: DummyTextToSpeech.cpp:55
armarx::DummyTextToSpeech::getDefaultName
std::string getDefaultName() const override
Definition: DummyTextToSpeech.h:69
armarx::DummyTextToSpeech::onConnectComponent
void onConnectComponent() override
Definition: DummyTextToSpeech.cpp:37
armarx::PropertyDefinitionContainer::prefix
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
Definition: PropertyDefinitionContainer.h:345
armarx::DummyTextToSpeech::reportText
void reportText(const std::string &text, const Ice::Current &) override
Definition: DummyTextToSpeech.cpp:62
armarx::DummyTextToSpeech::onExitComponent
void onExitComponent() override
Definition: DummyTextToSpeech.cpp:50
armarx::DummyTextToSpeech
Brief description of class DummyTextToSpeech.
Definition: DummyTextToSpeech.h:62
armarx::DummyTextToSpeech::onInitComponent
void onInitComponent() override
Definition: DummyTextToSpeech.cpp:30
Component.h
armarx::Component
Baseclass for all ArmarX ManagedIceObjects requiring properties.
Definition: Component.h:91
armarx::DummyTextToSpeechPropertyDefinitions::DummyTextToSpeechPropertyDefinitions
DummyTextToSpeechPropertyDefinitions(std::string prefix)
Definition: DummyTextToSpeech.h:39
armarx::ComponentPropertyDefinitions
Default component property definition container.
Definition: Component.h:69
IceUtil::Handle< class PropertyDefinitionContainer >
armarx::DummyTextToSpeech::reportTextWithParams
void reportTextWithParams(const std::string &text, const Ice::StringSeq &params, const Ice::Current &) override
Definition: DummyTextToSpeech.cpp:78
armarx::DummyTextToSpeechPropertyDefinitions
Definition: DummyTextToSpeech.h:36
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:27