Castor3D 0.16.0
Multiplatform 3D engine
|
Binary data chunk writer base class. More...
#include <BinaryWriter.hpp>
Public Member Functions | |
virtual | ~BinaryWriterBase ()=default |
bool | write (TWritten const &obj, castor::BinaryFile &file) |
Writes an object to a file. | |
bool | write (TWritten const &obj, BinaryChunk &chunk) |
To chunk writer function. | |
Protected Member Functions | |
bool | doWriteHeader (BinaryChunk &chunk) const |
Writes the header chunk. | |
template<typename T > | |
bool | doWriteChunk (T const *values, size_t count, ChunkType chunkType, BinaryChunk &chunk) const |
Writes a subchunk value into a chunk. | |
template<typename T , size_t Count> | |
bool | doWriteChunk (T const(&values)[Count], ChunkType chunkType, BinaryChunk &chunk) const |
Writes a subchunk value into a chunk. | |
template<typename T , size_t Count> | |
bool | doWriteChunk (castor::Array< T, Count > const &values, ChunkType chunkType, BinaryChunk &chunk) const |
Writes a subchunk value into a chunk. | |
template<typename T > | |
bool | doWriteChunk (castor::Vector< T > const &values, ChunkType chunkType, BinaryChunk &chunk) const |
Writes a subchunk value into a chunk. | |
template<typename T > | |
bool | doWriteChunk (T const *begin, T const *end, ChunkType chunkType, BinaryChunk &chunk) const |
Writes a subchunk value into a chunk. | |
template<typename T > | |
bool | doWriteChunk (T const &value, ChunkType chunkType, BinaryChunk &chunk) const |
Writes a subchunk value into a chunk. | |
Protected Attributes | |
BinaryChunk | m_chunk { ChunkTyper< TWritten >::Value } |
Binary data chunk writer base class.
|
virtualdefault |
|
inlineprotected |
Writes a subchunk value into a chunk.
[in] | values | The values. |
[in] | chunkType | The subchunk type. |
[in,out] | chunk | The chunk. |
false
if any error occured. References castor3d::ChunkWriter< T >::write().
|
inlineprotected |
Writes a subchunk value into a chunk.
[in] | values | The values. |
[in] | chunkType | The subchunk type. |
[in,out] | chunk | The chunk. |
false
if any error occured. References castor3d::ChunkWriter< T >::write().
|
inlineprotected |
Writes a subchunk value into a chunk.
[in] | value | The value. |
[in] | chunkType | The subchunk type. |
[in,out] | chunk | The chunk. |
false
if any error occured. References castor3d::ChunkWriter< T >::write().
|
inlineprotected |
Writes a subchunk value into a chunk.
[in] | begin | The values begin. |
[in] | end | The values end. |
[in] | chunkType | The subchunk type. |
[in,out] | chunk | The chunk. |
false
if any error occured. References castor3d::ChunkWriter< T >::write().
|
inlineprotected |
Writes a subchunk value into a chunk.
[in] | values | The values. |
[in] | count | The values count. |
[in] | chunkType | The subchunk type. |
[in,out] | chunk | The chunk. |
false
if any error occured. References castor3d::ChunkWriter< T >::write().
Referenced by castor3d::BinaryWriterBase< TWritten >::doWriteHeader().
|
inlineprotected |
Writes a subchunk value into a chunk.
[in] | values | The values. |
[in] | chunkType | The subchunk type. |
[in,out] | chunk | The chunk. |
false
if any error occured. References castor3d::ChunkWriter< T >::write().
|
inlineprotected |
Writes the header chunk.
[in,out] | chunk | The parent chunk. |
false
if any error occured. References castor3d::BinaryChunk::addSubChunk(), castor3d::CurrentCmshVersion, cuT, castor3d::BinaryWriterBase< TWritten >::doWriteChunk(), castor3d::eCmshHeader, castor3d::eCmshVersion, castor3d::eName, and castor::makeStringStream().
Referenced by castor3d::BinaryWriterBase< TWritten >::write().
|
inline |
To chunk writer function.
[in] | obj | The object to write. |
[in,out] | chunk | The chunk. |
false
if any error occured. References castor3d::BinaryChunk::addSubChunk(), castor3d::BinaryChunk::finalise(), and castor3d::BinaryWriterBase< TWritten >::m_chunk.
|
inline |
Writes an object to a file.
[in] | obj | The object to write. |
[in,out] | file | The file. |
false
if any error occured. References castor3d::BinaryWriterBase< TWritten >::doWriteHeader(), castor3d::eCmshFile, and castor3d::BinaryWriterBase< TWritten >::write().
Referenced by castor3d::BinaryWriterBase< TWritten >::write().
|
protected |
The writer's chunk.
Referenced by castor3d::BinaryWriterBase< TWritten >::write().