Class hierarchy   Compound list   Header files   Member list  

dimeInput Class Reference

The dimeInput class offers transparent file I/O for DXF and DXB More...

#include <Input.h>

List of all members.

Public Members


Detailed Description

The dimeInput class offers transparent file I/O for DXF and DXB


Member Function Documentation

dimeInput::dimeInput()

Constructor.

dimeInput::~dimeInput()

Destructor.

bool dimeInput::setFile(const char * const filename)

Opens the file 'filename' for reading. True is returned if the file is opened correctly.

bool dimeInput::setFilePointer(const int newfd)

Sets the file pointer for this instance. newfd is a file opened with the unistd open() function.

bool dimeInput::eof() const

Returns true if end of file is encountered.

void dimeInput::setCallback(int (*cb)(float, void *), void *cbdata)

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.

float dimeInput::relativePosition()

Returns the relative file position. 0.0 means beginning of file, 1.0 is at end of file.

void dimeInput::putBackGroupCode(const int32 code)

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.

bool dimeInput::readGroupCode(int32 &code)

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.

bool dimeInput::readInt8(int8 &val)

Reads an 8 bit integer from the file.

bool dimeInput::readInt16(int16 &val)

Reads a 16 bit integer from the file.

bool dimeInput::readInt32(int32 &val)

Reads a 32 bit integer from the file.

bool dimeInput::readFloat(float &val)

Reads a single precision floating point number from the file.

bool dimeInput::readDouble(dxfdouble &val)

Reads a dxfdouble precision floating point number from the file.

const char* dimeInput::readString()

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.

dimeModel* dimeInput::getModel()

Returns the model for this file.

dimeMemHandler* dimeInput::getMemHandler()

Returns the memory handler used in this model.

int dimeInput::getFilePosition() const

For ASCII files, it returns the current line number. For binary files the file position is returned.

bool dimeInput::isBinary() const

Returns true if this is a binary (DXB) file.

int dimeInput::getVersion() const

Returns the version of this file (10, 12, 13 or 14).

bool dimeInput::isAborted() const

This method returns wether file input was aborted or not.


The documentation for this class was generated from the following files:
Copyright © 1998-1999, Systems In Motion <sales@sim.no>. All rights reserved.
System documentation was generated using doxygen.