StateInstanceFactory.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 ArmarX::
17* @author Christian Mandery (christian.mandery at kit dot edu)
18* @date 2014
19* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20* GNU General Public License
21*/
22
23#pragma once
24
27
29
31{
32 using XmlParentPair = std::pair<rapidxml::xml_node<>*, armarx::statechartmodel::StatePtr>;
33
51
52 using StateInstanceFactoryBasePtr = std::shared_ptr<StateInstanceFactoryBase>;
53
55 {
56 public:
59
61
63
64 static std::string
66 {
67 return "EndState";
68 }
69
70 private:
71 static SubClassRegistry registry;
72 };
73
75 {
76 public:
79
81
83
84 static std::string
86 {
87 return "LocalState";
88 }
89
90 private:
91 static SubClassRegistry registry;
92 };
93
95 {
96 public:
99
101
103
104 static std::string
106 {
107 return "RemoteState";
108 }
109
110 private:
111 static SubClassRegistry registry;
112 };
113
115 {
116 public:
119
121
123
124 static std::string
126 {
127 return "DynamicRemoteState";
128 }
129
130 private:
131 static SubClassRegistry registry;
132 };
133} // namespace armarx::statechartio
A template that can be used as a superclass of a class hierarchy that wants to provide a factory meth...
DynamicRemoteStateInstanceFactory(rapidxml::xml_node<> *xmlNode, armarx::statechartmodel::StatePtr parentState)
static StateInstanceFactoryBasePtr createInstance(XmlParentPair)
armarx::statechartmodel::StateInstancePtr getStateInstance() override
static StateInstanceFactoryBasePtr createInstance(XmlParentPair)
EndStateInstanceFactory(rapidxml::xml_node<> *xmlNode, armarx::statechartmodel::StatePtr parentState)
armarx::statechartmodel::StateInstancePtr getStateInstance() override
static StateInstanceFactoryBasePtr createInstance(XmlParentPair)
armarx::statechartmodel::StateInstancePtr getStateInstance() override
LocalStateInstanceFactory(rapidxml::xml_node<> *xmlNode, armarx::statechartmodel::StatePtr parentState)
RemoteStateInstanceFactory(rapidxml::xml_node<> *xmlNode, armarx::statechartmodel::StatePtr parentState)
static StateInstanceFactoryBasePtr createInstance(XmlParentPair)
armarx::statechartmodel::StateInstancePtr getStateInstance() override
virtual armarx::statechartmodel::StateInstancePtr getStateInstance()=0
armarx::statechartmodel::StatePtr parentState
StateInstanceFactoryBase(rapidxml::xml_node<> *xmlNode, armarx::statechartmodel::StatePtr parentState)
Class representing a node of XML document.
std::pair< rapidxml::xml_node<> *, armarx::statechartmodel::StatePtr > XmlParentPair
std::shared_ptr< StateInstanceFactoryBase > StateInstanceFactoryBasePtr
std::shared_ptr< State > StatePtr
Definition State.h:48
std::shared_ptr< StateInstance > StateInstancePtr
This file contains rapidxml parser and DOM implementation.