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

IOInfoASCII Class Reference

Stores ASCII Input/Ouput information. More...

#include <IOInfoASCII.h>

Inheritance diagram for IOInfoASCII::

IOInfo List of all members.

Public Methods

 IOInfoASCII ()
 Standard constructor.

 IOInfoASCII (char)
 Constructor.

 IOInfoASCII (QString)
 Constructor.

 ~IOInfoASCII ()
 Destructor.

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.

int getLength () const
 Returns the length of this I/O info (in bits).

bool matchesOld (IOInfo *)
 Old 'matches' function.

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

QString getInfo ()
 Returns the I/O info.

void setInfo (QString i)
 Sets the 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.

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

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 Public Methods

char escapeToChar (char)
 Converts an escape character into the ASCII character.

bool isReadable (char)
 Returns TRUE if the character cp is readable.

int findChar (const char *ascii, int len, char c)
 Finds a character in an ASCII string. More...


Private Attributes

QString info
 I/O information.


Detailed Description

Stores ASCII Input/Ouput information.


Member Function Documentation

bool IOInfoASCII::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.

int IOInfoASCII::findChar const char * ascii,
int len,
char c
[static]
 

Finds a character in an ASCII string.

Parameters:
ascii   Array of ASCII characters
len   Length of the array
c   Character to look for
Returns:
If found, the position of the character in the array, otherwise -1

void IOInfoASCII::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.


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