Lattice Tester Online Documentation 0.1.0-861
Software Package For Testing The Uniformity Of Integral Lattices In The Real Space
|
This class is a simple implementation of the Writer
abstract class to write in plain text format on the stream.
More...
#include <latticetester/WriterRes.h>
Public Member Functions | |
WriterRes (const char *fileName) | |
Constructor that opens the writer to write at the beginning of file fileName . | |
WriterRes (std::ostream *stream) | |
Constructor that will use stream as an output stream. | |
void | beginTabbedSection () |
Implementation of the method defined in Writer . | |
void | endTabbedSection () |
Implementation of the method defined in Writer . | |
void | addTab () |
Implementation of the method defined in Writer . | |
void | removeTab () |
Implementation of the method defined in Writer . | |
void | clearTab () |
Implementation of the method defined in Writer . | |
void | defaultTab () |
Implementation of the method defined in Writer . | |
void | newLine () |
Implementation of the method defined in Writer . | |
void | newParagraph () |
Implementation of the method defined in Writer . | |
void | writeMathString (const std::string) |
Implementation of the method defined in Writer . | |
void | writeStandOutMathString (const std::string) |
Implementation of the method defined in Writer . | |
Public Member Functions inherited from LatticeTester::Writer< Int > | |
Writer (const char *fileName) | |
Constructor that opens a Writer to write in the file filename . | |
Writer (std::ostream *stream) | |
Constructor that opens a Writer to write directly in an ostream . | |
virtual | ~Writer () |
Destructor. | |
virtual void | writeBool (const bool &value) |
Writes a bool on the stream. | |
virtual void | writeInt (const int64_t &value) |
Writes an int on the stream. | |
virtual void | writeString (const std::string &value) |
Writes a string on the stream. | |
virtual void | writeDouble (const double &value) |
Writes a double on the stream. | |
virtual void | writeIntScal (const Int &value) |
Writes a IntScal on the stream. | |
virtual void | writeMMat (const IntMat &A) |
Writes a IntMat on the stream. | |
virtual std::ostream & | getStream () |
Returns the stream on which this object writes. | |
Protected Attributes | |
bool | m_isTabbed = false |
Indicates if we currently are in a tabbed section. | |
std::string | m_prefix |
Used to remember the state of the tabs and white spaces needed to align correctly a line, for instance when in a tabbed section. | |
Protected Attributes inherited from LatticeTester::Writer< Int > | |
std::ostream * | m_stream |
The stream in which the writings are done. | |
This class is a simple implementation of the Writer
abstract class to write in plain text format on the stream.
This class defines no other method than the interface and can be viewed as an example to what the Writer
interface is intended to be.
LatticeTester::WriterRes< Int >::WriterRes | ( | const char * | fileName | ) |
Constructor that opens the writer to write at the beginning of file fileName
.
LatticeTester::WriterRes< Int >::WriterRes | ( | std::ostream * | stream | ) |
Constructor that will use stream
as an output stream.
This will make the writer start writing at the end of the stream.
|
virtual |
Implementation of the method defined in Writer
.
This adds 2 spaces to the prefix of tabbed sections.
Implements LatticeTester::Writer< Int >.
|
virtual |
Implementation of the method defined in Writer
.
In this class, by default, a tabbed section has 2 spaces at the beginning of lines. Calling this methods resets the prefix of tabbed sections to the default.
Implements LatticeTester::Writer< Int >.
|
virtual |
Implementation of the method defined in Writer
.
This sets the prefix of tabbed sections to an empty string.
Implements LatticeTester::Writer< Int >.
|
virtual |
Implementation of the method defined in Writer
.
This sets the prefix of tabbed sections to a string with 2 spaces.
Implements LatticeTester::Writer< Int >.
|
virtual |
Implementation of the method defined in Writer
.
Implements LatticeTester::Writer< Int >.
|
virtual |
Implementation of the method defined in Writer
.
Prints a newline character and the prefix of a tabbed section if a the writer is in a tabbed section.
Implements LatticeTester::Writer< Int >.
|
virtual |
Implementation of the method defined in Writer
.
Prints 2 newline characters and ends the tabbed section if the program is in a tabbed section.
Implements LatticeTester::Writer< Int >.
|
virtual |
Implementation of the method defined in Writer
.
This removes 2 spaces to the prefix of tabbed sections.
Implements LatticeTester::Writer< Int >.
|
virtual |
Implementation of the method defined in Writer
.
This writes the string passed as an argument to the output string.
Implements LatticeTester::Writer< Int >.
|
virtual |
Implementation of the method defined in Writer
.
This writes the string passed as argument in a tabbed section with a newline character before and after.
Implements LatticeTester::Writer< Int >.
|
protected |
Indicates if we currently are in a tabbed section.
The methods of this class will print m_prefix at each newline if m_isTabbed is true
.
|
protected |
Used to remember the state of the tabs and white spaces needed to align correctly a line, for instance when in a tabbed section.