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

IOInfoBin Class Reference

Stores binary Input/Ouput information. More...

#include <IOInfoBin.h>

Inheritance diagram for IOInfoBin::

IOInfo List of all members.

Public Methods

 IOInfoBin (char *)
 Constructor. More...

 IOInfoBin ()
 Standard constructor. More...

 IOInfoBin (int code, int len)
 Constructor. More...

 ~IOInfoBin ()
 Destructor.

 IOInfoBin (const IOInfoBin &)
 Copy constructor.

IOInfoBin & operator= (const IOInfoBin &)
 Overloaded assignment operator.

bool isSingle ()
 Returns TRUE if this I/O info is a single character.

QList< IOInfogetSingles ()
 Returns a list of IOInfo objects with single characters representing this I/O info.

int getLength () const
 Returns lenght of the information.

char * getInfo ()
 Returns a pointer to the binary array.

void setInfo (char *)
 Sets the I/O info to the character string io (binary format, see IOInfoBin::info).

void invertBits ()
 Inverts the order of the bits of this I/O info.

void setBin (QString bin, int numbits)
 Sets this I/O info to the binary string bin.

void setASCII (const char *ascii, int asciilen, int numbits)
 Sets this I/O info to a string of ASCII characters. More...

void setString (QString string, int numbits)
 Sets this I/O info to the string string.

void setSize (int)
 Sets the size of the I/O info (in bits).

QString convertToString ()
 Returns a string representing the input/output information.

QString convertToBinStr ()
 Returns a string representing the binary input/output information.

QString convertToHexStr ()
 Returns a string representing the hexadecimal input/output information.

bool convertToASCII (char *ascii, int maxlen, int &length, bool singlechar=FALSE) const
 Converts the I/O information into a string of ASCII characters. More...

IOInfoBin convertToBin (int numbits) const
 Converts this object into an IOInfoBin object.

int convertToInt ()
 Converts the I/O info into an integer value.

void convertToBinList (IOInfoList &list)
 Converts the I/O info into a list of IOInfoBin objects.

IOInfoclone ()
 Produces a copy of this object and returns a pointer to it.

void split (IOInfoList &)
 Splits the I/O info into its constituents.


Static Private Methods

void resolveX (IOInfoBin bin, IOInfoList &list)
 Resolves the 'don't care' positions. More...


Private Attributes

char * info
 The char array that contains the bits. More...


Detailed Description

Stores binary Input/Ouput information.


Constructor & Destructor Documentation

IOInfoBin::IOInfoBin char * io
 

Constructor.

Initialises the IOInfo object with the bits contained in the array io with the length len.

IOInfoBin::IOInfoBin
 

Standard constructor.

Sets no information.

IOInfoBin::IOInfoBin int code,
int len
 

Constructor.

Parameters:
code   I/O info in decimal form
len   Length of the I/O info (in bits)


Member Function Documentation

bool IOInfoBin::convertToASCII char * ascii,
int maxlen,
int & length,
bool singlechar = FALSE
const [virtual]
 

Converts the I/O information into a string of ASCII characters.

Parameters:
ascii   Resulting array of ASCII characters
maxlen   Length of the array
number   of relevant ASCII characters in the array
singlechar   If TRUE only a single char is converted
Returns:
TRUE if successful

Reimplemented from IOInfo.

void IOInfoBin::resolveX IOInfoBin bin,
IOInfoList & list
[static, private]
 

Resolves the 'don't care' positions.

Example: '0X' would result in '00' and '01'

Parameters:
bin   Object to convert
list   Resulting list of IOInfo objects

void IOInfoBin::setASCII const char * ascii,
int asciilen,
int numbits
[virtual]
 

Sets this I/O info to a string of ASCII characters.

Parameters:
ascii   Array holding the ASCII characters
asciilen   Number of characters in the array to use
numbits   Number of bits of the resulting I/O info

Reimplemented from IOInfo.


Member Data Documentation

char* IOInfoBin::info [private]
 

The char array that contains the bits.

Every character represents a bit. 0: 0 / 1: 1 / 2: X (don't care) / 10: end of string


The documentation for this class was generated from the following files:
Generated at Fri Apr 11 22:37:16 2003 for Qfsm by doxygen1.2.9.1 written by Dimitri van Heesch, © 1997-2001