#pragma once templateclass State; /// /// 表示状态转换。 /// /// template class Transition { public: Transition() { m_state = nullptr; } /// /// 状态转换。 /// /// /// Transition(const TType& type, State *state) { m_type = type; m_state = state; } /// /// 设置转换的类型。 /// /// void setType(TType type) { m_type = type; } /// /// 获取转换的类型。 /// /// TType type() const { return m_type; } /// /// 获取状态。 /// /// State* state() const { return m_state; } /// /// 设置状态。 /// /// void setState(State* state) { m_state = state; } private: TType m_type; State *m_state; };