A friendly interface for writing binary data to a stream.
Definition binarywriter.h:27
void WriteMat4(const Math::mat4 &m)
write a mat4 to the stream
Definition binarywriter.cc:442
bool isMapped
Definition binarywriter.h:101
void WriteGuid(const Util::Guid &guid)
write a guid
Definition binarywriter.cc:363
virtual bool Open()
begin reading from the stream
Definition binarywriter.cc:47
void WriteUInt64(uint64_t i)
write an 64-bit unsigned int to the stream
Definition binarywriter.cc:218
void WriteFloat(float f)
write a float value to the stream
Definition binarywriter.cc:238
void WriteDouble(double d)
write a double value to the stream
Definition binarywriter.cc:280
System::ByteOrder::Type GetStreamByteOrder() const
get the stream byte order
Definition binarywriter.h:140
void WriteBool(bool b)
write a boolean value to the stream
Definition binarywriter.cc:300
virtual ~BinaryWriter()
destructor
Definition binarywriter.cc:35
void WriteChar(char c)
write an 8-bit char to the stream
Definition binarywriter.cc:84
void WriteFloatArray(const Util::Array< float > &arr)
write a float array to the stream
Definition binarywriter.cc:464
virtual void Close()
end reading from the stream
Definition binarywriter.cc:72
BinaryWriter()
constructor
Definition binarywriter.cc:23
void WriteIntArray(const Util::Array< int > &arr)
write a int array to the stream
Definition binarywriter.cc:496
void WriteUChar(unsigned char c)
write an 8-bit unsigned char to the stream
Definition binarywriter.cc:101
void SetMemoryMappingEnabled(bool b)
call before Open() to enable memory mapping (if stream supports mapping)
Definition binarywriter.h:112
System::ByteOrder byteOrder
Definition binarywriter.h:102
unsigned char * mapEnd
Definition binarywriter.h:104
void SetStreamByteOrder(System::ByteOrder::Type byteOrder)
set the stream byte order (default is host byte order)
Definition binarywriter.h:131
void WriteUInt(unsigned int i)
write an 32-bit unsigned int to the stream
Definition binarywriter.cc:178
void WriteBoolArray(const Util::Array< bool > &arr)
write a bool array to the stream
Definition binarywriter.cc:561
bool enableMapping
Definition binarywriter.h:100
__DeclareClass(BinaryWriter)
void WriteVec3(const Math::vec3 &v)
write a vec4 to the stream
Definition binarywriter.cc:397
void WriteInt64(int64_t i)
write an 64-bit signed int to the stream
Definition binarywriter.cc:198
void WriteUShort(unsigned short s)
write an 16-bit unsigned short to the stream
Definition binarywriter.cc:138
void WriteShort(short s)
write an 16-bit short to the stream
Definition binarywriter.cc:118
void WriteVec4(const Math::vec4 &v)
write a vec4 to the stream
Definition binarywriter.cc:421
void WriteUIntArray(const Util::Array< uint > &arr)
write a unsigned int array to the stream
Definition binarywriter.cc:528
void WriteFloatAsNormalizedUByte2(float f)
write a compressed float value to the stream, lossy and needed to be in the range of -1....
Definition binarywriter.cc:258
void WriteRawData(const void *ptr, SizeT numBytes)
write raw data
Definition binarywriter.cc:593
void WriteString(const Util::String &s)
write a string to the stream
Definition binarywriter.cc:321
void WriteVec2(Math::vec2 f)
write a float value to the stream
Definition binarywriter.cc:376
void WriteFloatAsUnsignedNormalizedUByte2(float f)
write a compressed float value to the stream, lossy and needed to be in the range of 0....
Definition binarywriter.cc:269
void WriteBlob(const Util::Blob &blob)
write a blob of data
Definition binarywriter.cc:344
void WriteInt(int i)
write an 32-bit int to the stream
Definition binarywriter.cc:158
unsigned char * mapCursor
Definition binarywriter.h:103
bool IsMemoryMappingEnabled() const
return true if memory mapping is enabled
Definition binarywriter.h:122
Stream writer classes provide a specialized write-interface for a stream.
Definition streamwriter.h:22
Provides information and methods to help with byte ordering issues.
Definition darwinbyteorder.h:18
Type GetToByteOrder() const
get to-byte-order
Definition byteorder.h:140
Type
Definition byteorder.h:37
void SetToByteOrder(Type toByteOrder)
set to-byte-order
Definition byteorder.h:131
Nebula's dynamic array class.
Definition array.h:60
The Util::Blob class encapsulates a chunk of raw memory into a C++ object which can be copied,...
Definition blob.h:22
Instances of wrapped stream classes.
Definition orientation.cc:10
A 4x4 single point precision float matrix.
Definition mat4.h:49
A 2-component float vector class.
Definition vec2.h:21
A 3D vector.
Definition vec3.h:40
A 4D vector.
Definition vec4.h:24
Nebula's universal string class.
Definition string.h:50
int SizeT
Definition types.h:49