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 IOINFO_H 00020 #define IOINFO_H 00021 00022 #include <qstring.h> 00023 #include <qlist.h> 00024 #include "IOInfo.h" 00025 //#include "IOInfoList.h" 00026 00027 class IOInfoBin; 00028 class IOInfoASCII; 00029 class IOInfoList; 00030 00035 class IOInfo 00036 { 00037 public: 00038 IOInfo(); 00039 virtual ~IOInfo(); 00040 00041 bool equals(IOInfo* ); // instead of ==-operator 00042 virtual bool matches(IOInfo* ); 00044 virtual QString convertToString()=0; 00046 virtual QString convertToBinStr()=0; 00048 virtual QString convertToHexStr()=0; 00057 virtual bool convertToASCII(char* ascii, int maxlen, int& length, 00058 bool singlechar=FALSE) const =0; 00060 virtual IOInfoBin convertToBin(int numbits) const =0; 00062 virtual int convertToInt()=0; 00064 virtual void convertToBinList(IOInfoList& list)=0; 00065 00067 virtual IOInfo* clone()=0; 00068 00070 virtual void setBin(QString bin, int numbits)=0; 00077 virtual void setASCII(const char* ascii, int asciilen, int numbits)=0; 00079 virtual void setString(QString string, int numbits)=0; 00080 00082 virtual int getLength() const=0; 00084 virtual bool isSingle()=0; 00086 virtual QList<IOInfo> getSingles()=0; 00088 virtual void setSize(int) {}; 00089 // virtual void setOutputsSize(int) {}; 00090 00092 virtual void split(IOInfoList& )=0; 00093 00094 private: 00095 }; 00096 00097 00098 #endif 00099