18 class GStateTransition;
73 GString
const name()
const;
93 virtual void removeTransitions();
94 virtual void enableGadgets(
bool enable);
99 GType& type()
const override {
return Type();}
103 GSuperState* parent_{};
105 std::list<gptr<GStateTransition>> transitions_;
106 std::forward_list<Gadget*> gadgets_;
107 virtual void fireState(
bool on);
112 GState& State(GSuperState& parent, GString
const& name =
"");
118 GCond& operator/(GStateTransition&, GFunction
const& fun);
119 GCond& operator/(GStateTransition&, GString
const& text);
120 GCond& operator/(GStateTransition&, GProp& prop);
121 GCond& operator/(GStateTransition&, GProp* prop);
127 GCond& operator/(GTrigger&, GStateTransition&);
128 GCond& operator/(GBoolExpr&, GStateTransition&);
129 GCond& operator/(GCond&, GStateTransition&);
166 void enableGadgets(
bool enable)
override;
169 static GType& Type();
170 GType& type()
const override {
return Type();}
173 friend class GStateTransition;
174 virtual void setCurrent(
GState*);
175 void fireState(
bool on)
override;
176 std::vector<gptr<GState>> states_;
177 GState *current_{
nullptr}, *initial_{
nullptr};
181 GSuperState& SuperState(GSuperState&, GString
const& name =
"");
199 void stop() {run(
false);}
203 using GType = GPropType_<GStateChart,GSuperState>;
204 static GType& Type();
205 GType& type()
const override {
return Type();}
209 GStateChart& StateChart(GString
const& name =
"");
218 using IsGadgetChild = bool;
224 GString typeName()
const override {
return "StateTransition";}
228 friend class GCondTrans;
229 GState *state1_, *state2_;
230 class GCondTrans* condtrans_;
231 virtual bool canFire()
const;
232 virtual void doFire(
GEvent&);