Mantid
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
FileByteStream Class Reference

#include <BitStream.h>

Public Member Functions

bool eof () const
 
 FileByteStream (const std::string &filename)
 
uint64_t fileSize () const
 
std::streamsize gcount () const
 
template<typename T >
FileByteStreamoperator>> (T &val)
 
uint8_t peek ()
 
template<typename T >
readRaw (T &&result)
 
template<std::size_t bytecount, typename T >
FileByteStreamreadRaw (T &result)
 
template<typename T >
FileByteStreamreadRaw (T &result)
 
template<typename T >
FileByteStreamreadRaw (T &result, const std::size_t &bytecount)
 
template<size_t bytecount>
FileByteStreamskip ()
 

Private Member Functions

long getFileSize (std::string filename)
 
template<typename T >
char * getResultPointer (T *const result, const std::size_t &bytecount) const
 

Private Attributes

const uint64_t fileSize_
 
std::ifstream stream_
 

Detailed Description

Definition at line 19 of file BitStream.h.

Constructor & Destructor Documentation

◆ FileByteStream()

FileByteStream::FileByteStream ( const std::string &  filename)
inlineexplicit

Definition at line 21 of file BitStream.h.

References stream_.

Member Function Documentation

◆ eof()

bool FileByteStream::eof ( ) const
inline

◆ fileSize()

uint64_t FileByteStream::fileSize ( ) const
inline

Definition at line 71 of file BitStream.h.

References fileSize_.

Referenced by Mantid::DataHandling::LoadDNSEvent::split_File().

◆ gcount()

std::streamsize FileByteStream::gcount ( ) const
inline

Definition at line 68 of file BitStream.h.

References stream_.

Referenced by Mantid::DataHandling::LoadDNSEvent::split_File().

◆ getFileSize()

long FileByteStream::getFileSize ( std::string  filename)
inlineprivate

Definition at line 30 of file BitStream.h.

◆ getResultPointer()

template<typename T >
char * FileByteStream::getResultPointer ( T *const  result,
const std::size_t &  bytecount 
) const
inlineprivate

Definition at line 36 of file BitStream.h.

Referenced by readRaw().

◆ operator>>()

template<typename T >
FileByteStream & FileByteStream::operator>> ( T &  val)
inline

Definition at line 69 of file BitStream.h.

◆ peek()

uint8_t FileByteStream::peek ( )
inline

Definition at line 59 of file BitStream.h.

References stream_.

◆ readRaw() [1/4]

template<typename T >
T FileByteStream::readRaw ( T &&  result)
inline

Definition at line 54 of file BitStream.h.

◆ readRaw() [2/4]

template<std::size_t bytecount, typename T >
FileByteStream & FileByteStream::readRaw ( T &  result)
inline

Definition at line 46 of file BitStream.h.

References getResultPointer(), and stream_.

◆ readRaw() [3/4]

template<typename T >
FileByteStream & FileByteStream::readRaw ( T &  result)
inline

Definition at line 52 of file BitStream.h.

◆ readRaw() [4/4]

template<typename T >
FileByteStream & FileByteStream::readRaw ( T &  result,
const std::size_t &  bytecount 
)
inline

◆ skip()

template<size_t bytecount>
FileByteStream & FileByteStream::skip ( )
inline

Definition at line 63 of file BitStream.h.

References stream_.

Member Data Documentation

◆ fileSize_

const uint64_t FileByteStream::fileSize_
private

Definition at line 28 of file BitStream.h.

Referenced by fileSize().

◆ stream_

std::ifstream FileByteStream::stream_
private

Definition at line 27 of file BitStream.h.

Referenced by eof(), FileByteStream(), gcount(), peek(), readRaw(), and skip().


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