Creates concrete state and returns Transition supertype. More...
#include <transitionManager.h>
Public Member Functions | |
~TransitionManager () | |
OneStateTransition * | createOneStateTransition (const QString &typeName, Editor *editor, State *state, const QString &label, int direction, bool dimmed) |
OneStateTransition * | createOneStateTransition (Editor *editor, State *state, const TransitionLoopSEDialog &td) |
TwoStatesTransition * | createTwoStatesTransition (Editor *editor, State *s1, State *s2, const TransitionDialog &td) |
TwoStatesTransition * | createTwoStatesTransition (const QString &typeName, Editor *editor, State *s1, State *s2, const QString &label, bool leftOriented, bool dimmed) |
const OneStateTransitionProperties & | getOneStateTransitionProperties (int typeId) const |
returns editable properties of transition type for transition dialogs | |
const QList< QString > & | getOneStateTransitionTypeNameList () const |
returns transition type list, used for dialog (filling comboBox) | |
const TwoStatesTransitionProperties & | getTwoStatesTransitionProperties (int typeId) const |
const QList< QString > & | getTwoStatesTransitionTypeNameList () const |
int | getTypeNameId (const QString &typeName) const |
returns typeID by given typeName - important to hold elements's types consistent | |
Static Public Member Functions | |
static TransitionManager * | getInstance () |
returns instance of TransitionManager | |
Protected Types | |
typedef OneStateTransition *(TransitionManager::* | OneStateTransitionConstructor )(Editor *, State *, const QString &, int, bool) |
pointer to TransitionManager::createConcreteTransition | |
typedef TwoStatesTransition *(TransitionManager::* | TwoStatesTransitionConstructor )(Editor *, State *, State *, const QString &, bool, bool) |
typedef QMap< QString, OneStateTransitionConstructor > | TypeNameToOneStateInstanceMap |
typedef QMap< QString, OneStateTransitionProperties > | TypeNameToOneStatePropsMap |
typedef QMap< QString, TwoStatesTransitionConstructor > | TypeNameToTwoStatesInstanceMap |
typedef QMap< QString, TwoStatesTransitionProperties > | TypeNameToTwoStatesPropsMap |
Protected Member Functions | |
TwoStatesTransition * | createTransitionArc (Editor *editor, State *s1, State *s2, const QString &label, bool leftOriented, bool dimmed) |
OneStateTransition * | createTransitionCLoop (Editor *editor, State *state, const QString &label, int direction, bool dimmed) |
OneStateTransition * | createTransitionFinal (Editor *editor, State *state, const QString &, int direction, bool dimmed) |
OneStateTransition * | createTransitionInitial (Editor *editor, State *state, const QString &, int direction, bool dimmed) |
TwoStatesTransition * | createTransitionLArc (Editor *editor, State *s1, State *s2, const QString &label, bool leftOriented, bool dimmed) |
TwoStatesTransition * | createTransitionLine (Editor *editor, State *s1, State *s2, const QString &label, bool leftOriented, bool dimmed) |
twoStatesTransitions creators | |
OneStateTransition * | createTransitionLoop (Editor *editor, State *state, const QString &label, int direction, bool dimmed) |
OneStateTransition * | createTransitionLoopVar (Editor *editor, State *state, const QString &label, int direction, bool dimmed) |
TwoStatesTransition * | createTransitionVArc (Editor *editor, State *s1, State *s2, const QString &label, bool leftOriented, bool dimmed) |
TwoStatesTransition * | createTransitionVCurve (Editor *editor, State *s1, State *s2, const QString &label, bool leftOriented, bool dimmed) |
Protected Attributes | |
QList< QString > | oneStateTransitionTypeList |
QList< QString > | twoStatesTransitionTypeList |
TypeNameToOneStateInstanceMap | typeNameToOneStateInstanceMap |
maps type name to createConcreteOneStateTransition function | |
TypeNameToOneStatePropsMap | typeNameToOneStatePropsMap |
TypeNameToTwoStatesInstanceMap | typeNameToTwoStatesInstanceMap |
maps type name to createConcreteTwoStatesTransition function | |
TypeNameToTwoStatesPropsMap | typeNameToTwoStatesPropsMap |
Private Member Functions | |
TransitionManager () | |
Static Private Attributes | |
static bool | instantiated = false |
static TransitionManager * | manager = NULL |
Creates concrete state and returns Transition supertype.
Implemented as singelton.
Definition at line 62 of file transitionManager.h.
typedef OneStateTransition*(TransitionManager::* TransitionManager::OneStateTransitionConstructor)(Editor *, State *, const QString &, int, bool) [protected] |
pointer to TransitionManager::createConcreteTransition
Definition at line 133 of file transitionManager.h.
typedef TwoStatesTransition*(TransitionManager::* TransitionManager::TwoStatesTransitionConstructor)(Editor *, State *, State *, const QString &, bool, bool) [protected] |
Definition at line 147 of file transitionManager.h.
typedef QMap<QString, OneStateTransitionConstructor> TransitionManager::TypeNameToOneStateInstanceMap [protected] |
Definition at line 135 of file transitionManager.h.
typedef QMap<QString, OneStateTransitionProperties> TransitionManager::TypeNameToOneStatePropsMap [protected] |
Definition at line 137 of file transitionManager.h.
typedef QMap<QString, TwoStatesTransitionConstructor> TransitionManager::TypeNameToTwoStatesInstanceMap [protected] |
Definition at line 149 of file transitionManager.h.
typedef QMap<QString, TwoStatesTransitionProperties> TransitionManager::TypeNameToTwoStatesPropsMap [protected] |
Definition at line 138 of file transitionManager.h.
TransitionManager::TransitionManager | ( | ) | [private] |
Definition at line 20 of file transitionManager.cpp.
References DEF_ARC_ANGLE, DEF_ARC_CURV, DEF_ARC_LAB_POS, DEF_EDGE_LAB_POS, DEF_LOOP_LAB_POS, DEF_VCURV_ANGLE, DEF_VCURV_ANGLE_B, DEF_VCURV_CURV, oneStateTransitionTypeList, twoStatesTransitionTypeList, typeNameToOneStateInstanceMap, typeNameToOneStatePropsMap, typeNameToTwoStatesInstanceMap, and typeNameToTwoStatesPropsMap.
Referenced by getInstance().
TransitionManager::~TransitionManager | ( | ) | [inline] |
Definition at line 73 of file transitionManager.h.
References instantiated.
OneStateTransition * TransitionManager::createOneStateTransition | ( | Editor * | editor, | |
State * | state, | |||
const TransitionLoopSEDialog & | td | |||
) |
Definition at line 137 of file transitionManager.cpp.
References TransitionLoopSEDialog::getDirection(), TransitionLoopSEDialog::getLabel(), TransitionLoopSEDialog::getType(), and TransitionLoopSEDialog::isDimmed().
Referenced by createState(), TransitionSerializer::createTransition(), NaiveDrawAlgorithm::drawAutomaton(), BaseDrawAlgorithm::drawTransitions(), GraphVizDrawAlgorithm::drawTransitionsAccordingToGV(), Editor::editState(), Editor::editTransition(), Editor::generateDistance(), Editor::generateExactMatching(), Editor::insertState(), Editor::insertTransition(), and Parser::OneStateTransition().
OneStateTransition * TransitionManager::createOneStateTransition | ( | const QString & | typeName, | |
Editor * | editor, | |||
State * | state, | |||
const QString & | label, | |||
int | direction, | |||
bool | dimmed | |||
) |
Definition at line 146 of file transitionManager.cpp.
TwoStatesTransition * TransitionManager::createTransitionArc | ( | Editor * | editor, | |
State * | s1, | |||
State * | s2, | |||
const QString & | label, | |||
bool | leftOriented, | |||
bool | dimmed | |||
) | [protected] |
Definition at line 215 of file transitionManager.cpp.
OneStateTransition * TransitionManager::createTransitionCLoop | ( | Editor * | editor, | |
State * | state, | |||
const QString & | label, | |||
int | direction, | |||
bool | dimmed | |||
) | [protected] |
Definition at line 195 of file transitionManager.cpp.
References TransitionLoop::eCLoop.
OneStateTransition * TransitionManager::createTransitionFinal | ( | Editor * | editor, | |
State * | state, | |||
const QString & | , | |||
int | direction, | |||
bool | dimmed | |||
) | [protected] |
Definition at line 183 of file transitionManager.cpp.
OneStateTransition * TransitionManager::createTransitionInitial | ( | Editor * | editor, | |
State * | state, | |||
const QString & | , | |||
int | direction, | |||
bool | dimmed | |||
) | [protected] |
createConcreteTransition methods oneStateTransitions creators
Definition at line 177 of file transitionManager.cpp.
TwoStatesTransition * TransitionManager::createTransitionLArc | ( | Editor * | editor, | |
State * | s1, | |||
State * | s2, | |||
const QString & | label, | |||
bool | leftOriented, | |||
bool | dimmed | |||
) | [protected] |
Definition at line 221 of file transitionManager.cpp.
TwoStatesTransition * TransitionManager::createTransitionLine | ( | Editor * | editor, | |
State * | s1, | |||
State * | s2, | |||
const QString & | label, | |||
bool | leftOriented, | |||
bool | dimmed | |||
) | [protected] |
twoStatesTransitions creators
Definition at line 209 of file transitionManager.cpp.
OneStateTransition * TransitionManager::createTransitionLoop | ( | Editor * | editor, | |
State * | state, | |||
const QString & | label, | |||
int | direction, | |||
bool | dimmed | |||
) | [protected] |
Definition at line 189 of file transitionManager.cpp.
References TransitionLoop::eLoop.
OneStateTransition * TransitionManager::createTransitionLoopVar | ( | Editor * | editor, | |
State * | state, | |||
const QString & | label, | |||
int | direction, | |||
bool | dimmed | |||
) | [protected] |
Definition at line 201 of file transitionManager.cpp.
References TransitionLoop::eLoopVar.
TwoStatesTransition * TransitionManager::createTransitionVArc | ( | Editor * | editor, | |
State * | s1, | |||
State * | s2, | |||
const QString & | label, | |||
bool | leftOriented, | |||
bool | dimmed | |||
) | [protected] |
Definition at line 227 of file transitionManager.cpp.
TwoStatesTransition * TransitionManager::createTransitionVCurve | ( | Editor * | editor, | |
State * | s1, | |||
State * | s2, | |||
const QString & | label, | |||
bool | leftOriented, | |||
bool | dimmed | |||
) | [protected] |
Definition at line 233 of file transitionManager.cpp.
TwoStatesTransition * TransitionManager::createTwoStatesTransition | ( | const QString & | typeName, | |
Editor * | editor, | |||
State * | s1, | |||
State * | s2, | |||
const QString & | label, | |||
bool | leftOriented, | |||
bool | dimmed | |||
) |
Definition at line 164 of file transitionManager.cpp.
TwoStatesTransition * TransitionManager::createTwoStatesTransition | ( | Editor * | editor, | |
State * | s1, | |||
State * | s2, | |||
const TransitionDialog & | td | |||
) |
Definition at line 155 of file transitionManager.cpp.
References TransitionDialog::getLabel(), TransitionDialog::getType(), TransitionDialog::isDimmed(), and TransitionDialog::isLeftOriented().
Referenced by TransitionSerializer::createTransition(), NaiveDrawAlgorithm::drawAutomaton(), BaseDrawAlgorithm::drawTransitions(), GraphVizDrawAlgorithm::drawTransitionsAccordingToGV(), Editor::editTransition(), Parser::EndTransitionDeclaration(), Editor::generateDistance(), Editor::generateExactMatching(), and Editor::insertTransition().
TransitionManager * TransitionManager::getInstance | ( | ) | [static] |
returns instance of TransitionManager
Definition at line 79 of file transitionManager.cpp.
References instantiated, manager, and TransitionManager().
Referenced by createState(), TransitionSerializer::createTransition(), NaiveDrawAlgorithm::drawAutomaton(), BaseDrawAlgorithm::drawTransitions(), GraphVizDrawAlgorithm::drawTransitionsAccordingToGV(), Editor::editState(), Editor::editTransition(), Parser::EndTransitionDeclaration(), Editor::generateDistance(), Editor::generateExactMatching(), Editor::insertState(), Editor::insertTransition(), Parser::OneStateTransition(), TransitionLoopSEDialog::showEdits(), TransitionDialog::showEdits(), TransitionDialog::TransitionDialog(), TransitionLoopSEDialog::TransitionLoopSEDialog(), and Editor::~Editor().
const OneStateTransitionProperties & TransitionManager::getOneStateTransitionProperties | ( | int | typeId | ) | const |
returns editable properties of transition type for transition dialogs
Definition at line 115 of file transitionManager.cpp.
References oneStateTransitionTypeList, and typeNameToOneStatePropsMap.
Referenced by TransitionLoopSEDialog::showEdits().
const QList< QString > & TransitionManager::getOneStateTransitionTypeNameList | ( | ) | const |
returns transition type list, used for dialog (filling comboBox)
Definition at line 93 of file transitionManager.cpp.
References oneStateTransitionTypeList.
Referenced by TransitionLoopSEDialog::TransitionLoopSEDialog().
const TwoStatesTransitionProperties & TransitionManager::getTwoStatesTransitionProperties | ( | int | typeId | ) | const |
Definition at line 126 of file transitionManager.cpp.
References twoStatesTransitionTypeList, and typeNameToTwoStatesPropsMap.
Referenced by TransitionDialog::showEdits().
const QList< QString > & TransitionManager::getTwoStatesTransitionTypeNameList | ( | ) | const |
Definition at line 98 of file transitionManager.cpp.
References twoStatesTransitionTypeList.
Referenced by TransitionDialog::TransitionDialog().
int TransitionManager::getTypeNameId | ( | const QString & | typeName | ) | const |
returns typeID by given typeName - important to hold elements's types consistent
Definition at line 103 of file transitionManager.cpp.
References oneStateTransitionTypeList, and twoStatesTransitionTypeList.
Referenced by Editor::editTransition().
bool TransitionManager::instantiated = false [static, private] |
Definition at line 65 of file transitionManager.h.
Referenced by getInstance(), and ~TransitionManager().
TransitionManager * TransitionManager::manager = NULL [static, private] |
Definition at line 66 of file transitionManager.h.
Referenced by getInstance().
QList<QString> TransitionManager::oneStateTransitionTypeList [protected] |
Definition at line 128 of file transitionManager.h.
Referenced by getOneStateTransitionProperties(), getOneStateTransitionTypeNameList(), getTypeNameId(), and TransitionManager().
QList<QString> TransitionManager::twoStatesTransitionTypeList [protected] |
Definition at line 129 of file transitionManager.h.
Referenced by getTwoStatesTransitionProperties(), getTwoStatesTransitionTypeNameList(), getTypeNameId(), and TransitionManager().
maps type name to createConcreteOneStateTransition function
Definition at line 141 of file transitionManager.h.
Referenced by TransitionManager().
Definition at line 143 of file transitionManager.h.
Referenced by getOneStateTransitionProperties(), and TransitionManager().
maps type name to createConcreteTwoStatesTransition function
Definition at line 151 of file transitionManager.h.
Referenced by TransitionManager().
Definition at line 144 of file transitionManager.h.
Referenced by getTwoStatesTransitionProperties(), and TransitionManager().