Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

IOInfoBin.h

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 IOINFOBIN_H
00020 #define IOINFOBIN_H
00021 
00022 #include "IOInfo.h"
00023 
00024 class IOInfoASCII;
00025 
00031 class IOInfoBin : public IOInfo
00032 {
00033   public:
00034     IOInfoBin(char* );
00035     IOInfoBin();
00036     IOInfoBin(int code, int len);
00037     ~IOInfoBin();
00038     IOInfoBin(const IOInfoBin& );
00039     IOInfoBin& operator=(const IOInfoBin& );
00040     bool isSingle() { return TRUE; };
00041 
00042     QList<IOInfo> getSingles();
00043 
00045     int getLength() const; //{ return length; };
00047     char* getInfo() { return info; };
00048     void setInfo(char*);
00049     void invertBits();
00050     void setBin(QString bin, int numbits);
00051     void setASCII(const char* ascii, int asciilen, int numbits);
00052     void setString(QString string, int numbits);
00053     void setSize(int );
00054 
00055     QString convertToString();
00056     QString convertToBinStr();
00057     QString convertToHexStr();
00058     bool convertToASCII(char* ascii, int maxlen, int& length, bool singlechar=FALSE) const;
00059     IOInfoBin convertToBin(int numbits) const;
00060     int convertToInt();
00061     void convertToBinList(IOInfoList& list);
00062 
00063     IOInfo* clone();
00064     void split(IOInfoList& );
00065 
00066   private:
00073     char* info;
00074 
00075     static void resolveX(IOInfoBin bin, IOInfoList& list);
00076 };
00077 
00078 #endif

Generated at Fri Apr 11 22:37:13 2003 for Qfsm by doxygen1.2.9.1 written by Dimitri van Heesch, © 1997-2001