• Main Page
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

C:/CVUT/diplomka/Automata_editor/include/interfaces/istate.h

Go to the documentation of this file.
00001 #ifndef _ISTATE_H_2517689832025_
00002 #define _ISTATE_H_2517689832025_
00003 
00004 #include "itransition.h"
00005 
00006 #include <QSharedPointer>
00007 
00008 /*!
00009  * This is interface for work with automata, define states of automaton.
00010  * Note that transitions are added through IAutomaton only.
00011  */
00012 class IState
00013 {
00014 public:
00015 // types    
00016     typedef QSet<QString>                           TIStateNameSet;
00017     typedef QList<QString>                          TIStateNameList;
00018     typedef QList<QSharedPointer<IState> >          TIStateList;
00019 
00020     virtual ~IState() {}    
00021 
00022     //! Name has to be unique and VauCanSon-G compatible!!
00023     virtual void setName(const QString &name) = 0;
00024     virtual QString getName() const = 0;    
00025 
00026     //! Labels can be used multiple times for multiple states.
00027     virtual void setLabel(const QString &label) = 0;
00028     virtual QString getLabel() const = 0;
00029 
00030     virtual bool isInitial() const = 0;
00031     virtual bool isFinal() const = 0;
00032 
00033     virtual void setInitial(bool is = true) = 0;
00034     virtual void setFinal(bool is = true) = 0;
00035     
00036     virtual TIStateNameSet getStatesOn(const QString &character) const = 0;
00037     
00038     //! Useful for graph algorithms
00039     virtual TIStateNameList getAdjacentStates() const = 0;
00040 
00041     //! Returns transitions leading from state.
00042     virtual ITransition::TITransitionList getTransitions() const = 0;
00043     //! Returns transitions leading to state.
00044     virtual ITransition::TITransitionList getTransitionsTo() const = 0;
00045 };
00046 
00047 #endif //_ISTATE_H_2517689832025_

Generated on Tue Jan 4 2011 03:03:21 for Autoamata editor by  doxygen 1.7.0