ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Binstream Class Reference

A stream to read or write binary data. More...

#include <binstream.h>

Collaboration diagram for Binstream:

Public Member Functions

 Binstream ()=default
 Binstream (const std::string, const char *)
 Construct a new Binstream:: Binstream object.
 ~Binstream ()
 Binstream (const Binstream &)=delete
Binstream & operator= (const Binstream &)=delete
void close ()
void open (const std::string, const char *)
bool operator! () const
 operator bool () const
template<class T>
Binstream & operator>> (T &data)
template<class T>
Binstream & operator<< (const T &data)
template<class T>
Binstream & read (T *data, const int n)
template<class T>
Binstream & write (const T *data, const int n)

Public Attributes

FILE * fileptr = nullptr

Detailed Description

A stream to read or write binary data.

Author
qianrui 2020-1-6

Constructor & Destructor Documentation

◆ Binstream() [1/3]

Binstream::Binstream ( )
default
Here is the caller graph for this function:

◆ Binstream() [2/3]

Binstream::Binstream ( const std::string filename,
const char * op )

Construct a new Binstream:: Binstream object.

Parameters
filename
op"r": read "a": add "w": write

◆ ~Binstream()

Binstream::~Binstream ( )
Here is the call graph for this function:

◆ Binstream() [3/3]

Binstream::Binstream ( const Binstream & )
delete
Here is the call graph for this function:

Member Function Documentation

◆ close()

void Binstream::close ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ open()

void Binstream::open ( const std::string filename,
const char * op )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator bool()

Binstream::operator bool ( ) const

◆ operator!()

bool Binstream::operator! ( ) const

◆ operator<<()

template<class T>
Binstream & Binstream::operator<< ( const T & data)
Here is the call graph for this function:

◆ operator=()

Binstream & Binstream::operator= ( const Binstream & )
delete
Here is the call graph for this function:

◆ operator>>()

template<class T>
Binstream & Binstream::operator>> ( T & data)
Here is the call graph for this function:

◆ read()

template<class T>
Binstream & Binstream::read ( T * data,
const int n )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write()

template<class T>
Binstream & Binstream::write ( const T * data,
const int n )
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ fileptr

FILE* Binstream::fileptr = nullptr

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