Assimp v5.2.2 (January 2022)
The Asset-Importer-Lib API documentation.
Assimp::BlobIOStream Class Reference

Redirect IOStream to a blob. More...

#include <BlobIOSystem.h>

Inherits Assimp::IOStream.

Public Member Functions

 BlobIOStream (BlobIOSystem *creator, const std::string &file, size_t initial=4096)
 The class constructor with all needed parameters. More...
 
size_t FileSize () const override
 Returns filesize Returns the filesize. More...
 
void Flush () override
 Flush the contents of the file buffer (for writers) See fflush() for more details. More...
 
aiExportDataBlobGetBlob ()
 
size_t Read (void *, size_t, size_t) override
 Read from the file. More...
 
aiReturn Seek (size_t pOffset, aiOrigin pOrigin) override
 Set the read/write cursor of the file. More...
 
size_t Tell () const override
 Get the current position of the read/write cursor. More...
 
size_t Write (const void *pvBuffer, size_t pSize, size_t pCount) override
 Write to the file. More...
 
 ~BlobIOStream () override
 The class destructor. More...
 
- Public Member Functions inherited from Assimp::IOStream
virtual size_t FileSize () const =0
 Returns filesize Returns the filesize. More...
 
virtual void Flush ()=0
 Flush the contents of the file buffer (for writers) See fflush() for more details. More...
 
virtual size_t Read (void *pvBuffer, size_t pSize, size_t pCount)=0
 Read from the file. More...
 
virtual aiReturn Seek (size_t pOffset, aiOrigin pOrigin)=0
 Set the read/write cursor of the file. More...
 
virtual size_t Tell () const =0
 Get the current position of the read/write cursor. More...
 
virtual size_t Write (const void *pvBuffer, size_t pSize, size_t pCount)=0
 Write to the file. More...
 
virtual ~IOStream ()
 Destructor. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Assimp::IOStream
 IOStream () AI_NO_EXCEPT
 Constructor protected, use IOSystem::Open() to create an instance. More...
 

Detailed Description

Redirect IOStream to a blob.

Constructor & Destructor Documentation

◆ BlobIOStream()

Assimp::BlobIOStream::BlobIOStream ( BlobIOSystem creator,
const std::string &  file,
size_t  initial = 4096 
)
inline

The class constructor with all needed parameters.

Parameters
creatorPointer to the creator instance
fileThe filename
initialThe initial size

◆ ~BlobIOStream()

Assimp::BlobIOStream::~BlobIOStream ( )
override

The class destructor.

Member Function Documentation

◆ FileSize()

size_t Assimp::BlobIOStream::FileSize ( ) const
inlineoverridevirtual

Returns filesize Returns the filesize.

Implements Assimp::IOStream.

◆ Flush()

void Assimp::BlobIOStream::Flush ( )
inlineoverridevirtual

Flush the contents of the file buffer (for writers) See fflush() for more details.

Implements Assimp::IOStream.

◆ GetBlob()

aiExportDataBlob * Assimp::BlobIOStream::GetBlob ( )
inline

◆ Read()

size_t Assimp::BlobIOStream::Read ( void *  pvBuffer,
size_t  pSize,
size_t  pCount 
)
inlineoverridevirtual

Read from the file.

See fread() for more details This fails for write-only files

Implements Assimp::IOStream.

◆ Seek()

aiReturn Assimp::BlobIOStream::Seek ( size_t  pOffset,
aiOrigin  pOrigin 
)
inlineoverridevirtual

Set the read/write cursor of the file.

Note that the offset is negative for aiOrigin_END. See fseek() for more details

Implements Assimp::IOStream.

◆ Tell()

size_t Assimp::BlobIOStream::Tell ( ) const
inlineoverridevirtual

Get the current position of the read/write cursor.

See ftell() for more details

Implements Assimp::IOStream.

◆ Write()

size_t Assimp::BlobIOStream::Write ( const void *  pvBuffer,
size_t  pSize,
size_t  pCount 
)
inlineoverridevirtual

Write to the file.

See fwrite() for more details This fails for read-only files

Implements Assimp::IOStream.


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