Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
StreamInWrapper Class Reference

Wrapper around std::istream. More...

#include <StreamWrapper.h>

Inheritance diagram for StreamInWrapper:
StreamIn NonCopyable

Public Member Functions

 StreamInWrapper (istream &ioWrapped)
 Constructor. More...
 
virtual void ReadBytes (void *outData, size_t inNumBytes) override
 Write a string of bytes to the binary stream. More...
 
virtual bool IsEOF () const override
 Returns true when an attempt has been made to read past the end of the file. More...
 
virtual bool IsFailed () const override
 Returns true if there was an IO failure. More...
 
- Public Member Functions inherited from StreamIn
virtual ~StreamIn ()=default
 Virtual destructor. More...
 
virtual void ReadBytes (void *outData, size_t inNumBytes)=0
 Read a string of bytes from the binary stream. More...
 
virtual bool IsEOF () const =0
 Returns true when an attempt has been made to read past the end of the file. More...
 
virtual bool IsFailed () const =0
 Returns true if there was an IO failure. More...
 
template<class T , std::enable_if_t< std::is_trivially_copyable_v< T >, bool > = true>
void Read (T &outT)
 Read a primitive (e.g. float, int, etc.) from the binary stream. More...
 
template<class T , class A , std::enable_if_t< std::is_trivially_copyable_v< T >, bool > = true>
void Read (Array< T, A > &outT)
 Read a vector of primitives from the binary stream. More...
 
template<class Type , class Traits , class Allocator >
void Read (std::basic_string< Type, Traits, Allocator > &outString)
 Read a string from the binary stream (reads the number of characters and then the characters) More...
 
template<class T , class A , typename F >
void Read (Array< T, A > &outT, const F &inReadElement)
 Read a vector of primitives from the binary stream using a custom function to read the elements. More...
 
void Read (Vec3 &outVec)
 Read a Vec3 (don't read W) More...
 
void Read (DVec3 &outVec)
 Read a DVec3 (don't read W) More...
 
void Read (DMat44 &outVec)
 Read a DMat44 (don't read W component of translation) More...
 
- Public Member Functions inherited from NonCopyable
 NonCopyable ()=default
 
 NonCopyable (const NonCopyable &)=delete
 
void operator= (const NonCopyable &)=delete
 

Detailed Description

Wrapper around std::istream.

Constructor & Destructor Documentation

◆ StreamInWrapper()

StreamInWrapper::StreamInWrapper ( istream &  ioWrapped)
inline

Constructor.

Member Function Documentation

◆ IsEOF()

virtual bool StreamInWrapper::IsEOF ( ) const
inlineoverridevirtual

Returns true when an attempt has been made to read past the end of the file.

Implements StreamIn.

◆ IsFailed()

virtual bool StreamInWrapper::IsFailed ( ) const
inlineoverridevirtual

Returns true if there was an IO failure.

Implements StreamIn.

◆ ReadBytes()

virtual void StreamInWrapper::ReadBytes ( void *  outData,
size_t  inNumBytes 
)
inlineoverridevirtual

Write a string of bytes to the binary stream.

Implements StreamIn.


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