BitShares-Core  5.0.0
BitShares blockchain implementation and command-line interface software
Classes | Public Types | Public Member Functions | List of all members
fc::ifstream Class Reference

#include <fstream.hpp>

Inheritance diagram for fc::ifstream:
fc::istream

Classes

class  impl
 

Public Types

enum  mode { in, binary }
 
enum  seekdir { beg, cur, end }
 

Public Member Functions

 ifstream ()
 
 ifstream (const fc::path &file, int m=binary)
 
 ~ifstream ()
 
void open (const fc::path &file, int m)
 
size_t readsome (char *buf, size_t len)
 
size_t readsome (const std::shared_ptr< char > &buffer, size_t max, size_t offset)
 
ifstreamread (char *buf, size_t len)
 
ifstreamseekg (size_t p, seekdir d=beg)
 
void get (char &c)
 
void close ()
 
bool eof () const
 
- Public Member Functions inherited from fc::istream
virtual ~istream ()
 
istreamread (char *buf, size_t len)
 
istreamread (const std::shared_ptr< char > &buf, size_t len, size_t offset=0)
 
virtual char get ()
 
void get (char &c)
 

Detailed Description

Definition at line 27 of file fstream.hpp.

Member Enumeration Documentation

Enumerator
in 
binary 

Definition at line 29 of file fstream.hpp.

Enumerator
beg 
cur 
end 

Definition at line 30 of file fstream.hpp.

Constructor & Destructor Documentation

fc::ifstream::ifstream ( )

Definition at line 55 of file fstream.cpp.

fc::ifstream::ifstream ( const fc::path file,
int  m = binary 
)

Definition at line 57 of file fstream.cpp.

fc::ifstream::~ifstream ( )

Definition at line 62 of file fstream.cpp.

Member Function Documentation

void fc::ifstream::close ( )

Definition at line 103 of file fstream.cpp.

bool fc::ifstream::eof ( ) const

Definition at line 105 of file fstream.cpp.

void fc::ifstream::get ( char &  c)
inline

Definition at line 42 of file fstream.hpp.

void fc::ifstream::open ( const fc::path file,
int  m 
)

Definition at line 64 of file fstream.cpp.

ifstream & fc::ifstream::read ( char *  buf,
size_t  len 
)

Definition at line 87 of file fstream.cpp.

size_t fc::ifstream::readsome ( char *  buf,
size_t  len 
)
virtual

read at least 1 byte or throw, if no data is available this method should block cooperatively until data is available or fc::eof is thrown.

Exceptions
fc::eofif at least 1 byte cannot be read

Implements fc::istream.

Definition at line 69 of file fstream.cpp.

size_t fc::ifstream::readsome ( const std::shared_ptr< char > &  buffer,
size_t  max,
size_t  offset 
)
virtual

Implements fc::istream.

Definition at line 82 of file fstream.cpp.

ifstream & fc::ifstream::seekg ( size_t  p,
seekdir  d = beg 
)

Definition at line 95 of file fstream.cpp.


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