QDP++
QDP::TextBufferReader Class Reference

Text buffer input class. More...

#include <qdp_io.h>

Inheritance diagram for QDP::TextBufferReader:
QDP::TextReader

Public Member Functions

 TextBufferReader ()
 ~TextBufferReader ()
 Shutdown the buffer.
 TextBufferReader (const std::string &p)
void open (const std::string &p)
 Opens a buffer for reading.
std::string str () const
 Return entire buffer as a string.
std::string strPrimaryNode () const
 Return entire buffer as a string.
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.

Detailed Description

Text buffer input class.

This class is used to read data from a text buffer. 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,

Definition at line 110 of file qdp_io.h.

Constructor & Destructor Documentation

◆ TextBufferReader() [1/2]

QDP::TextBufferReader::TextBufferReader ( )

Definition at line 185 of file qdp_io.cc.

◆ ~TextBufferReader()

QDP::TextBufferReader::~TextBufferReader ( )

Shutdown the buffer.

Definition at line 219 of file qdp_io.cc.

◆ TextBufferReader() [2/2]

QDP::TextBufferReader::TextBufferReader ( const std::string & p)
explicit

Initialize a buffer for reading.

Parameters
pThe string of input

Definition at line 187 of file qdp_io.cc.

References open().

Member Function Documentation

◆ getIstream()

std::istream & QDP::TextBufferReader::getIstream ( )
inlineprotectedvirtual

Get the internal input stream.

Implements QDP::TextReader.

Definition at line 138 of file qdp_io.h.

◆ open()

void QDP::TextBufferReader::open ( const std::string & p)

Opens a buffer for reading.

Parameters
pThe string of input

Definition at line 189 of file qdp_io.cc.

References QDP::Layout::primaryNode().

Referenced by TextBufferReader().

◆ str()

std::string QDP::TextBufferReader::str ( ) const

Return entire buffer as a string.

Definition at line 207 of file qdp_io.cc.

References QDP::QDPInternal::broadcast(), and QDP::Layout::primaryNode().

◆ strPrimaryNode()

std::string QDP::TextBufferReader::strPrimaryNode ( ) const

Return entire buffer as a string.

Definition at line 196 of file qdp_io.cc.

References QDP::Layout::primaryNode().


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