OmniPvdFileReadStream

Defined in pvdruntime/include/OmniPvdFileReadStream.h

class OmniPvdFileReadStream : public OmniPvdReadStream

Used to abstract a file read stream.

Used to set the filename, opening and closing it.

Public Functions

inline virtual ~OmniPvdFileReadStream()
virtual void setFileName(const char *fileName) = 0

Sets the file name of the file to read from.

Parameters

fileName – The file name of the file to open

virtual bool openFile() = 0

Opens the file.

Returns

True if the file opening was successfull

virtual bool closeFile() = 0

Closes the file.

Returns

True if the file closing was successfull

virtual uint64_t readBytes(uint8_t *bytes, uint64_t nbrBytes) = 0

Read n bytes from the shared memory buffer.

Parameters
  • bytes – Reads n bytes into the destination pointer

  • nbrBytes – The requested number of bytes to read

Returns

The actual number of bytes read

virtual uint64_t skipBytes(uint64_t nbrBytes) = 0

Skip n bytes from the shared memory buffer.

Parameters

nbrBytes – The requested number of bytes to skip

Returns

The actual number of bytes skipped

virtual bool openStream() = 0

Opens the read stream.

Returns

True if it succeeded

virtual bool closeStream() = 0

Closes the read stream.

Returns

True if it succeeded