The dimeInput class offers transparent file I/O for DXF and DXB More...
#include <Input.h>
Constructor.
Destructor.
Opens the file 'filename' for reading. True is returned if the file is opened correctly.
Sets the file pointer for this instance. newfd is a file opened with the unistd open() function.
Returns true if end of file is encountered.
This method sets a progress callback that will be called with a float in the range between 0 and 1, and void * cbdata as arguments.
Returns the relative file position. 0.0 means beginning of file, 1.0 is at end of file.
This function is needed when a loader snoops for future group codes. It is possible to put back a single group code so that the next time dimeInput::readGroupCode() is called, the putback value will be returned.
Reads a group code from the file. In binary files, group codes are represented as a single byte, with the exception of extended data which has 255 as the first byte, and then the actual group code following as a 16-bit integer.
Reads an 8 bit integer from the file.
Reads a 16 bit integer from the file.
Reads a 32 bit integer from the file.
Reads a single precision floating point number from the file.
Reads a dxfdouble precision floating point number from the file.
Returns a null-terminated string read from the file. The string is valid only until the next read operation, so you'd better copy it somewhere if you need it.
Returns the model for this file.
Returns the memory handler used in this model.
For ASCII files, it returns the current line number. For binary files the file position is returned.
Returns true if this is a binary (DXB) file.
Returns the version of this file (10, 12, 13 or 14).
This method returns wether file input was aborted or not.