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

Implementation of IOStream to read directly from a memory buffer. More...

#include <MemoryIOWrapper.h>

Inherits Assimp::IOStream.

Public Member Functions

size_t FileSize () const
 Returns filesize Returns the filesize.
 
void Flush ()
 Flush the contents of the file buffer (for writers) See fflush() for more details.
 
 MemoryIOStream (const uint8_t *buff, size_t len, bool own=false)
 
size_t Read (void *pvBuffer, size_t pSize, size_t pCount)
 Read from the file.
 
aiReturn Seek (size_t pOffset, aiOrigin pOrigin)
 Set the read/write cursor of the file.
 
size_t Tell () const
 Get the current position of the read/write cursor.
 
size_t Write (const void *, size_t, size_t)
 Write to the file.
 
 ~MemoryIOStream ()
 
- Public Member Functions inherited from Assimp::IOStream
virtual ~IOStream ()
 Destructor.
 

Additional Inherited Members

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

Detailed Description

Implementation of IOStream to read directly from a memory buffer.

Constructor & Destructor Documentation

◆ MemoryIOStream()

Assimp::MemoryIOStream::MemoryIOStream ( const uint8_t buff,
size_t  len,
bool  own = false 
)
inline

◆ ~MemoryIOStream()

Assimp::MemoryIOStream::~MemoryIOStream ( )
inline

Member Function Documentation

◆ FileSize()

size_t Assimp::MemoryIOStream::FileSize ( ) const
inlinevirtual

Returns filesize Returns the filesize.

Implements Assimp::IOStream.

◆ Flush()

void Assimp::MemoryIOStream::Flush ( )
inlinevirtual

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

Implements Assimp::IOStream.

◆ Read()

size_t Assimp::MemoryIOStream::Read ( void pvBuffer,
size_t  pSize,
size_t  pCount 
)
inlinevirtual

Read from the file.

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

Implements Assimp::IOStream.

◆ Seek()

aiReturn Assimp::MemoryIOStream::Seek ( size_t  pOffset,
aiOrigin  pOrigin 
)
inlinevirtual

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::MemoryIOStream::Tell ( ) const
inlinevirtual

Get the current position of the read/write cursor.

See ftell() for more details

Implements Assimp::IOStream.

◆ Write()

size_t Assimp::MemoryIOStream::Write ( const void pvBuffer,
size_t  pSize,
size_t  pCount 
)
inlinevirtual

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: