Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
StreamOut Class Referenceabstract

Simple binary output stream. More...

#include <StreamOut.h>

Inheritance diagram for StreamOut:
NonCopyable StateRecorder StreamOutWrapper StateRecorderImpl

Public Member Functions

virtual ~StreamOut ()=default
 Virtual destructor.
 
virtual void WriteBytes (const void *inData, size_t inNumBytes)=0
 Write a string of bytes to the binary stream.
 
virtual bool IsFailed () const =0
 Returns true if there was an IO failure.
 
template<class T , std::enable_if_t< std::is_trivially_copyable_v< T >, bool > = true>
void Write (const T &inT)
 Write a primitive (e.g. float, int, etc.) to the binary stream.
 
template<class T , class A , std::enable_if_t< std::is_trivially_copyable_v< T >, bool > = true>
void Write (const Array< T, A > &inT)
 Write a vector of primitives to the binary stream.
 
template<class Type , class Traits , class Allocator >
void Write (const std::basic_string< Type, Traits, Allocator > &inString)
 Write a string to the binary stream (writes the number of characters and then the characters)
 
template<class T , class A , typename F >
void Write (const Array< T, A > &inT, const F &inWriteElement)
 Write a vector of primitives to the binary stream using a custom write function.
 
void Write (const Vec3 &inVec)
 Write a Vec3 (don't write W)
 
void Write (const DVec3 &inVec)
 Write a DVec3 (don't write W)
 
void Write (const DMat44 &inVec)
 Write a DMat44 (don't write W component of translation)
 
- Public Member Functions inherited from NonCopyable
 NonCopyable ()=default
 
 NonCopyable (const NonCopyable &)=delete
 
void operator= (const NonCopyable &)=delete
 

Detailed Description

Simple binary output stream.

Constructor & Destructor Documentation

◆ ~StreamOut()

virtual StreamOut::~StreamOut ( )
virtualdefault

Virtual destructor.

Member Function Documentation

◆ IsFailed()

virtual bool StreamOut::IsFailed ( ) const
pure virtual

Returns true if there was an IO failure.

Implemented in StreamOutWrapper, and StateRecorderImpl.

◆ Write() [1/7]

template<class T , class A , std::enable_if_t< std::is_trivially_copyable_v< T >, bool > = true>
void StreamOut::Write ( const Array< T, A > &  inT)
inline

Write a vector of primitives to the binary stream.

◆ Write() [2/7]

template<class T , class A , typename F >
void StreamOut::Write ( const Array< T, A > &  inT,
const F &  inWriteElement 
)
inline

Write a vector of primitives to the binary stream using a custom write function.

◆ Write() [3/7]

void StreamOut::Write ( const DMat44 inVec)
inline

Write a DMat44 (don't write W component of translation)

◆ Write() [4/7]

void StreamOut::Write ( const DVec3 inVec)
inline

Write a DVec3 (don't write W)

◆ Write() [5/7]

template<class Type , class Traits , class Allocator >
void StreamOut::Write ( const std::basic_string< Type, Traits, Allocator > &  inString)
inline

Write a string to the binary stream (writes the number of characters and then the characters)

◆ Write() [6/7]

template<class T , std::enable_if_t< std::is_trivially_copyable_v< T >, bool > = true>
void StreamOut::Write ( const T &  inT)
inline

Write a primitive (e.g. float, int, etc.) to the binary stream.

◆ Write() [7/7]

void StreamOut::Write ( const Vec3 inVec)
inline

Write a Vec3 (don't write W)

◆ WriteBytes()

virtual void StreamOut::WriteBytes ( const void *  inData,
size_t  inNumBytes 
)
pure virtual

Write a string of bytes to the binary stream.

Implemented in StreamOutWrapper, and StateRecorderImpl.


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