Pol  Revision:cb584c9
Pol::Core::BinFile Class Referencefinal

#include <binaryfilescrobj.h>

Public Member Functions

 BinFile ()=default
 
 BinFile (const std::string &filename, std::ios::openmode mode)
 
 BinFile (const BinFile &)=delete
 
 ~BinFile ()
 
void Close ()
 
std::fstream::pos_type FileSize (Bscript::Executor &exec)
 
void Flush ()
 
bool IsOpen ()
 
bool Open (const std::string &filename, std::ios::openmode mode)
 
BinFile operator= (const BinFile &)=delete
 
int Peek ()
 
template<class T >
bool Read (T &val)
 
template<class T >
bool Read (T *arr, size_t count)
 
bool Seek (std::fstream::pos_type abs_offset, std::ios::seekdir origin)
 
std::fstream::pos_type Tell ()
 
template<class T >
bool Write (T &val)
 
bool WriteString (const char *chr, unsigned len)
 

Private Member Functions

bool ReadBuffer (void *buffer, std::streamsize length)
 
bool WriteBuffer (void *buffer, std::streamsize length)
 

Private Attributes

std::fstream _file
 

Detailed Description

Definition at line 33 of file binaryfilescrobj.h.

Constructor & Destructor Documentation

Pol::Core::BinFile::BinFile ( )
default
Pol::Core::BinFile::BinFile ( const std::string &  filename,
std::ios::openmode  mode 
)

Definition at line 329 of file binaryfilescrobj.cpp.

Pol::Core::BinFile::BinFile ( const BinFile )
delete
Pol::Core::BinFile::~BinFile ( )

Definition at line 334 of file binaryfilescrobj.cpp.

Member Function Documentation

void Pol::Core::BinFile::Close ( )
std::fstream::pos_type Pol::Core::BinFile::FileSize ( Bscript::Executor exec)
void Pol::Core::BinFile::Flush ( )

Definition at line 440 of file binaryfilescrobj.cpp.

Referenced by Pol::Core::BBinaryfile::call_method_id().

bool Pol::Core::BinFile::IsOpen ( )

Definition at line 350 of file binaryfilescrobj.cpp.

Referenced by Pol::Core::BBinaryfile::isTrue().

bool Pol::Core::BinFile::Open ( const std::string &  filename,
std::ios::openmode  mode 
)

Definition at line 339 of file binaryfilescrobj.cpp.

References Pol::Clib::binary().

Referenced by Pol::Core::BBinaryfile::BBinaryfile().

BinFile Pol::Core::BinFile::operator= ( const BinFile )
delete
int Pol::Core::BinFile::Peek ( )

Definition at line 433 of file binaryfilescrobj.cpp.

Referenced by Pol::Core::BBinaryfile::call_method_id().

template<class T >
bool Pol::Core::BinFile::Read ( T &  val)
inline

Definition at line 46 of file binaryfilescrobj.h.

Referenced by Pol::Core::BBinaryfile::call_method_id().

template<class T >
bool Pol::Core::BinFile::Read ( T *  arr,
size_t  count 
)
inline

Definition at line 52 of file binaryfilescrobj.h.

bool Pol::Core::BinFile::ReadBuffer ( void *  buffer,
std::streamsize  length 
)
private

Definition at line 373 of file binaryfilescrobj.cpp.

bool Pol::Core::BinFile::Seek ( std::fstream::pos_type  abs_offset,
std::ios::seekdir  origin 
)

Definition at line 363 of file binaryfilescrobj.cpp.

Referenced by Pol::Core::BBinaryfile::call_method_id().

std::fstream::pos_type Pol::Core::BinFile::Tell ( )

Definition at line 426 of file binaryfilescrobj.cpp.

Referenced by Pol::Core::BBinaryfile::call_method_id().

template<class T >
bool Pol::Core::BinFile::Write ( T &  val)
inline

Definition at line 58 of file binaryfilescrobj.h.

References Pol::UoTool::buffer.

Referenced by Pol::Core::BBinaryfile::call_method_id().

bool Pol::Core::BinFile::WriteBuffer ( void *  buffer,
std::streamsize  length 
)
private

Definition at line 380 of file binaryfilescrobj.cpp.

bool Pol::Core::BinFile::WriteString ( const char *  chr,
unsigned  len 
)

Definition at line 387 of file binaryfilescrobj.cpp.

Referenced by Pol::Core::BBinaryfile::call_method_id().

Member Data Documentation

std::fstream Pol::Core::BinFile::_file
private

Definition at line 76 of file binaryfilescrobj.h.


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