ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Binstream Class Reference

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

#include <binstream.h>

Collaboration diagram for Binstream:

Public Member Functions

 Binstream ()
 
 Binstream (const std::string, const char *)
 Construct a new Binstream:: Binstream object.
 
 ~Binstream ()
 
void close ()
 
void open (const std::string, const char *)
 
bool operator! () const
 
 operator bool () const
 
template<class T >
Binstreamoperator>> (T &data)
 
template<class T >
Binstreamoperator<< (const T &data)
 
template<class T >
Binstreamread (T *data, const int n)
 
template<class T >
Binstreamwrite (const T *data, const int n)
 

Public Attributes

FILE * fileptr
 

Detailed Description

A stream to read or write binary data.

Author
qianrui 2020-1-6

Constructor & Destructor Documentation

◆ Binstream() [1/2]

Binstream::Binstream ( )
inline

◆ Binstream() [2/2]

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 ( )

Member Function Documentation

◆ close()

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

◆ open()

void Binstream::open ( const std::string  filename,
const char *  op 
)
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)

◆ operator>>()

template<class T >
Binstream & Binstream::operator>> ( T data)

◆ read()

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

◆ write()

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

Member Data Documentation

◆ fileptr

FILE* Binstream::fileptr

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