00001 /* 00002 Copyright (C) 2000,2001 Stefan Duffner 00003 00004 This program is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU General Public License 00006 as published by the Free Software Foundation; either version 2 00007 of the License, or any later version. 00008 00009 This program is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 GNU General Public License for more details. 00013 00014 You should have received a copy of the GNU General Public License 00015 along with this program; if not, write to the Free Software 00016 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00017 */ 00018 00019 #ifndef TRANSITION_H 00020 #define TRANSITION_H 00021 00022 #include <qstring.h> 00023 00024 class State; 00025 class TransitionInfo; 00026 00027 00034 class Transition 00035 { 00036 public: 00037 Transition(State*, State*, TransitionInfo*); 00038 Transition(const Transition& ); 00039 ~Transition(); 00040 00041 Transition& operator=(const Transition& ); 00042 00044 State* getStart() { return start; }; 00046 void setStart(State* s) { start = s; }; 00048 State* getEnd() { return end; }; 00050 void setEnd(State* s) { end = s; }; 00052 TransitionInfo* getInfo() { return info; }; 00054 void setInfo(TransitionInfo* i) { info=i; }; 00055 00056 static int conditionValid(int type, QString , bool input=TRUE); 00057 00058 protected: 00060 State* start; 00062 State* end; 00064 TransitionInfo* info; 00065 }; 00066 00067 00068 #endif