class Hp49FileRead


Full nameHp49Calc::Hp49FileRead
Definition#include <hp49calc.H>
InheritsHp49Calc::Hp49File [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods


Detailed Description

 Hp49FileRead (string name, LogLevel lvl = NONE)

Constructor must be supplied with a file name

Parameters:
nameFile name
lvlLog level

Error  check ()

Checks to see if the file is a valid Hp49 file.

Returns: Error: SUCCESS, MINOR (not valid Hp49 File), MAJOR (unable to physically read file).

Error  open ()

Reimplemented from Hp49File.

bool  readNibble (unsigned char&)

Trying to read past the end of file will be considered as an error, especially since the data size of a file can be known before hand.

bool  readByte (unsigned char&)

Basically two calls to readNibble

Error  readNibbles (unsigned long& n, const int c_sz)

Reads nibbles from file to be recognized as a long integer. Therefore the first read nibble is the least significant and the last is the most significant.

Parameters:
nreturned result of nibbles read
c_sznumber of nibbles to read

Error  readBytes (string&, const int sz)

Reads straight from the file, byte by byte, and places it in a string.

Parameters:
strreturned result of bytes read
sznumber of bytes to read

Error  readData (string& data, unsigned long size = HPF_DEFAULT_FILE_SIZE)

Reads specified number of bytes of data from Hp49 file. After file is read, pointer wil not be reseted and will not go beyond end-of-file. This helps to have multiple reads for large files.

Parameters:
dataString to store data into
sizeNumber of bytes to read. Default is all bytes


Generated on Fri Mar 9 02:04:42 2001, using kdoc 2.0a43.