Assimp  v3.1.1 (June 2014)
Assimp::AssbinChunkWriter Class Reference

Chunk writer mechanism for the .assbin file structure. More...

Inherits Assimp::IOStream.

Public Member Functions

 AssbinChunkWriter (IOStream *container, uint32_t magic, size_t initial=4096)
 
virtual size_t FileSize () const
 Returns filesize Returns the filesize. More...
 
virtual void Flush ()
 Flush the contents of the file buffer (for writers) See fflush() for more details. More...
 
void * GetBufferPointer ()
 
virtual size_t Read (void *, size_t, size_t)
 Read from the file. More...
 
virtual aiReturn Seek (size_t, aiOrigin)
 Set the read/write cursor of the file. More...
 
virtual size_t Tell () const
 Get the current position of the read/write cursor. More...
 
virtual size_t Write (const void *pvBuffer, size_t pSize, size_t pCount)
 Write to the file. More...
 
virtual ~AssbinChunkWriter ()
 
- Public Member Functions inherited from Assimp::IOStream
virtual ~IOStream ()
 Destructor. More...
 

Additional Inherited Members

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

Detailed Description

Chunk writer mechanism for the .assbin file structure.

This is a standard in-memory IOStream (most of the code is based on BlobIOStream), the difference being that this takes another IOStream as a "container" in the constructor, and when it is destroyed, it appends the magic number, the chunk size, and the chunk contents to the container stream. This allows relatively easy chunk chunk construction, even recursively.

Constructor & Destructor Documentation

§ AssbinChunkWriter()

Assimp::AssbinChunkWriter::AssbinChunkWriter ( IOStream container,
uint32_t  magic,
size_t  initial = 4096 
)
inline

§ ~AssbinChunkWriter()

virtual Assimp::AssbinChunkWriter::~AssbinChunkWriter ( )
inlinevirtual

Member Function Documentation

§ FileSize()

virtual size_t Assimp::AssbinChunkWriter::FileSize ( ) const
inlinevirtual

Returns filesize Returns the filesize.

Implements Assimp::IOStream.

§ Flush()

virtual void Assimp::AssbinChunkWriter::Flush ( )
inlinevirtual

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

Implements Assimp::IOStream.

§ GetBufferPointer()

void* Assimp::AssbinChunkWriter::GetBufferPointer ( )
inline

§ Read()

virtual size_t Assimp::AssbinChunkWriter::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()

virtual aiReturn Assimp::AssbinChunkWriter::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()

virtual size_t Assimp::AssbinChunkWriter::Tell ( ) const
inlinevirtual

Get the current position of the read/write cursor.

See ftell() for more details

Implements Assimp::IOStream.

§ Write()

virtual size_t Assimp::AssbinChunkWriter::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: