Public Types | Protected Member Functions | Static Protected Attributes

BaseDrawAlgorithm Class Reference

Base class for drawing algorithms, provides basic graph algorithms. More...

#include <drawAlgorithm.h>

Inheritance diagram for BaseDrawAlgorithm:
Collaboration diagram for BaseDrawAlgorithm:

List of all members.

Public Types

typedef QMap< QString,
unsigned int > 
TDistanceMap
typedef QMap< QString, QString > TPredecessorMap

Protected Member Functions

QString charactersToLabel (const QSharedPointer< IAutomaton > &automaton, const QSharedPointer< ITransition > &transition) const
void drawTransitions (Editor *editor, const Editor::TStateMap &states, const QSharedPointer< IAutomaton > &automaton, const ITransition::TITransitionList &transitions, const QPoint &startPos) const
void fillDijkstraShortestPaths (const QSharedPointer< IAutomaton > &automaton, const QString &fromStateName, TDistanceMap &distances, TPredecessorMap &predecessors) const
IState::TIStateList getBFSSortedStates (const QSharedPointer< IAutomaton > &automaton) const
unsigned int getMaxDistance (const TDistanceMap &distances) const
IState::TIStateNameSet getStatesInDistance (unsigned int distance, const TDistanceMap &distances) const
void initPaths (const IState::TIStateList &states, const QString &fromStateName, TDistanceMap &distances, TPredecessorMap &predecessors) const
void relax (const QString &u, const QString &v, TDistanceMap &distances, TPredecessorMap &predecessors) const

Static Protected Attributes

static const int X_STEP = GRID_STEP*3
static const int Y_STEP = GRID_STEP*3

Detailed Description

Base class for drawing algorithms, provides basic graph algorithms.

Definition at line 12 of file drawAlgorithm.h.


Member Typedef Documentation

typedef QMap<QString, unsigned int> BaseDrawAlgorithm::TDistanceMap

Definition at line 15 of file drawAlgorithm.h.

typedef QMap<QString, QString> BaseDrawAlgorithm::TPredecessorMap

Definition at line 16 of file drawAlgorithm.h.


Member Function Documentation

QString BaseDrawAlgorithm::charactersToLabel ( const QSharedPointer< IAutomaton > &  automaton,
const QSharedPointer< ITransition > &  transition 
) const [protected]

Definition at line 392 of file drawAlgorithm.cpp.

Referenced by drawTransitions().

Here is the caller graph for this function:

void BaseDrawAlgorithm::drawTransitions ( Editor editor,
const Editor::TStateMap states,
const QSharedPointer< IAutomaton > &  automaton,
const ITransition::TITransitionList transitions,
const QPoint &  startPos 
) const [protected]
void BaseDrawAlgorithm::fillDijkstraShortestPaths ( const QSharedPointer< IAutomaton > &  automaton,
const QString &  fromStateName,
TDistanceMap distances,
TPredecessorMap predecessors 
) const [protected]

Definition at line 133 of file drawAlgorithm.cpp.

References initPaths(), and relax().

Here is the call graph for this function:

IState::TIStateList BaseDrawAlgorithm::getBFSSortedStates ( const QSharedPointer< IAutomaton > &  automaton  )  const [protected]

Definition at line 64 of file drawAlgorithm.cpp.

Referenced by NaiveDrawAlgorithm::drawAutomaton().

Here is the caller graph for this function:

unsigned int BaseDrawAlgorithm::getMaxDistance ( const TDistanceMap distances  )  const [protected]

Definition at line 188 of file drawAlgorithm.cpp.

IState::TIStateNameSet BaseDrawAlgorithm::getStatesInDistance ( unsigned int  distance,
const TDistanceMap distances 
) const [protected]

Definition at line 174 of file drawAlgorithm.cpp.

void BaseDrawAlgorithm::initPaths ( const IState::TIStateList states,
const QString &  fromStateName,
TDistanceMap distances,
TPredecessorMap predecessors 
) const [protected]

Definition at line 94 of file drawAlgorithm.cpp.

References DBGLOG_DRAW, and DBGPAR.

Referenced by fillDijkstraShortestPaths().

Here is the caller graph for this function:

void BaseDrawAlgorithm::relax ( const QString &  u,
const QString &  v,
TDistanceMap distances,
TPredecessorMap predecessors 
) const [protected]

Definition at line 106 of file drawAlgorithm.cpp.

Referenced by fillDijkstraShortestPaths().

Here is the caller graph for this function:


Member Data Documentation

const int BaseDrawAlgorithm::X_STEP = GRID_STEP*3 [static, protected]

Definition at line 49 of file drawAlgorithm.h.

Referenced by drawTransitions().

const int BaseDrawAlgorithm::Y_STEP = GRID_STEP*3 [static, protected]

Definition at line 50 of file drawAlgorithm.h.

Referenced by drawTransitions().


The documentation for this class was generated from the following files: