BitShares-Core  7.0.2
BitShares blockchain node software and command-line wallet 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
 
virtual char get ()
 
void get (char &c)
 
- 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

◆ mode

Enumerator
in 
binary 

Definition at line 29 of file fstream.hpp.

◆ seekdir

Enumerator
beg 
cur 
end 

Definition at line 30 of file fstream.hpp.

Constructor & Destructor Documentation

◆ ifstream() [1/2]

fc::ifstream::ifstream ( )

Definition at line 55 of file fstream.cpp.

◆ ifstream() [2/2]

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

Definition at line 57 of file fstream.cpp.

◆ ~ifstream()

fc::ifstream::~ifstream ( )

Definition at line 62 of file fstream.cpp.

Member Function Documentation

◆ close()

void fc::ifstream::close ( )

Definition at line 103 of file fstream.cpp.

◆ eof()

bool fc::ifstream::eof ( ) const

Definition at line 105 of file fstream.cpp.

◆ get() [1/3]

char fc::istream::get

Definition at line 267 of file iostream.cpp.

◆ get() [2/3]

void fc::istream::get
inline

Definition at line 33 of file iostream.hpp.

◆ get() [3/3]

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

Definition at line 42 of file fstream.hpp.

◆ open()

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

Definition at line 64 of file fstream.cpp.

◆ read()

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

Definition at line 87 of file fstream.cpp.

◆ readsome() [1/2]

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.

◆ readsome() [2/2]

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.

◆ seekg()

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: