|
QDP++
|
Text file input class. More...
#include <qdp_io.h>
Public Member Functions | |
| TextFileReader () | |
| ~TextFileReader () | |
| TextFileReader (const std::string &p) | |
| void | open (const std::string &p) |
| Opens a file for reading. | |
| void | close () |
| Closes the last file opened. | |
| bool | is_open () |
| Queries whether the file is open. | |
| Public Member Functions inherited from QDP::TextReader | |
| TextReader () | |
| virtual | ~TextReader () |
| virtual bool | fail () |
| Checks status of the previous IO operation. | |
| virtual void | read (std::string &result) |
| virtual void | read (char &result) |
| virtual void | read (int &result) |
| virtual void | read (unsigned int &result) |
| virtual void | read (short int &result) |
| virtual void | read (unsigned short int &result) |
| virtual void | read (long int &result) |
| virtual void | read (unsigned long int &result) |
| virtual void | read (long long int &result) |
| virtual void | read (float &result) |
| virtual void | read (double &result) |
| virtual void | read (bool &result) |
Protected Member Functions | |
| std::istream & | getIstream () |
| Get the internal input stream. | |
| Protected Member Functions inherited from QDP::TextReader | |
| template<typename T> | |
| void | readPrimitive (T &output) |
| The universal data-reader. | |
Text file input class.
This class is used to read data from a text file. Input is done on the primary node and all nodes end up with the same data.
The read methods are also wrapped by externally defined >> operators,
| QDP::TextFileReader::~TextFileReader | ( | ) |
|
explicit |
| void QDP::TextFileReader::close | ( | ) |
Closes the last file opened.
Definition at line 237 of file qdp_io.cc.
References is_open(), and QDP::Layout::primaryNode().
Referenced by ~TextFileReader().
|
inlineprotectedvirtual |
| bool QDP::TextFileReader::is_open | ( | ) |
Queries whether the file is open.
Definition at line 247 of file qdp_io.cc.
References QDP::QDPInternal::broadcast(), QDP::Layout::primaryNode(), and QDP::QDP_isInitialized().
| void QDP::TextFileReader::open | ( | const std::string & | p | ) |
Opens a file for reading.
| p | The name of the file |
Definition at line 228 of file qdp_io.cc.
References is_open(), QDP::Layout::primaryNode(), and QDP::QDP_error_exit().
Referenced by TextFileReader().