Pol  Revision:3cfda13
Pol::Core::BinFile Class Reference

#include <binaryfilescrobj.h>

Public Member Functions

 BinFile ()
 
 BinFile (const std::string &filename, std::ios::openmode mode)
 
 ~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)
 
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 ( )

Definition at line 330 of file binaryfilescrobj.cpp.

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

Definition at line 332 of file binaryfilescrobj.cpp.

Pol::Core::BinFile::~BinFile ( )

Definition at line 337 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 443 of file binaryfilescrobj.cpp.

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

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

Definition at line 353 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 342 of file binaryfilescrobj.cpp.

References Pol::Clib::binary().

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

int Pol::Core::BinFile::Peek ( )

Definition at line 436 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 44 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 50 of file binaryfilescrobj.h.

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

Definition at line 376 of file binaryfilescrobj.cpp.

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

Definition at line 366 of file binaryfilescrobj.cpp.

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

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

Definition at line 429 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 56 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 383 of file binaryfilescrobj.cpp.

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

Definition at line 390 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 74 of file binaryfilescrobj.h.


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