Ptex

Public Member Functions | Private Attributes | List of all members
PtexReader::DefaultInputHandler Class Reference

`#include <PtexReader.h>`

Inheritance diagram for PtexReader::DefaultInputHandler:

## Public Member Functions
| DefaultInputHandler ()
virtual Handle | open (const char *path)
| Open a file in read mode.
virtual void | seek (Handle handle, int64_t pos)
| Seek to an absolute byte position in the input stream.
virtual size_t | read (void *bufferArg, size_t size, Handle handle)
| Read a number of bytes from the file.
virtual bool | close (Handle handle)
| Close a file.
virtual const char * | lastError ()
| Return the last error message encountered.

## Private Attributes
char * | buffer

## Additional Inherited Members
Public Types inherited from PtexInputHandler
typedef void * | Handle
Protected Member Functions inherited from PtexInputHandler
virtual | ~PtexInputHandler ()

## Detailed Description

Definition at line 619 of file PtexReader.h.

## Constructor & Destructor Documentation

## ◆ DefaultInputHandler()

PtexReader::DefaultInputHandler::DefaultInputHandler | ( |  | ) |
| inline

Definition at line 623 of file PtexReader.h.

References buffer.

## Member Function Documentation

## ◆ close()

virtual bool PtexReader::DefaultInputHandler::close | ( | Handle | handle | ) |
| inline virtual

Close a file.

Returns false if an error occurs, and the error string is available via lastError().

Implements PtexInputHandler.

Definition at line 637 of file PtexReader.h.

References buffer, and PtexReader::ok().

## ◆ lastError()

virtual const char * PtexReader::DefaultInputHandler::lastError | ( |  | ) |
| inline virtual

Return the last error message encountered.

Implements PtexInputHandler.

Definition at line 642 of file PtexReader.h.

## ◆ open()

virtual Handle PtexReader::DefaultInputHandler::open | ( | const char * | path | ) |
| inline virtual

Open a file in read mode.

Returns null if there was an error. If an error occurs, the error string is available via lastError().

Implements PtexInputHandler.

Definition at line 624 of file PtexReader.h.

References buffer, IBuffSize, and PtexReader::path().

## ◆ read()

virtual size_t PtexReader::DefaultInputHandler::read | ( | void * | buffer,
|  | size_t | size,
|  | Handle | handle )
| inline virtual

Read a number of bytes from the file.

Returns the number of bytes successfully read. If less than the requested number of bytes is read, the error string is available via lastError().

Implements PtexInputHandler.

Definition at line 634 of file PtexReader.h.

## ◆ seek()

virtual void PtexReader::DefaultInputHandler::seek | ( | Handle | handle,
|  | int64_t | pos )
| inline virtual

Seek to an absolute byte position in the input stream.

Implements PtexInputHandler.

Definition at line 633 of file PtexReader.h.

## Member Data Documentation

## ◆ buffer

char* PtexReader::DefaultInputHandler::buffer
| private

Definition at line 621 of file PtexReader.h.

Referenced by close(), DefaultInputHandler(), and open().

The documentation for this class was generated from the following file:

- PtexReader.h