Lattice Tester Guide
1.0-9
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>
Inherits LatticeTester::Writer< Int >.
Public Member Functions | |
WriterRes (const char *fileName) | |
Constructor that opens the writer to write at the beginning of file fileName . More... | |
WriterRes (std::ostream *stream) | |
Constructor that will use stream as an output stream. More... | |
void | beginTabbedSection () |
Implementation of the method defined in Writer . More... | |
void | endTabbedSection () |
Implementation of the method defined in Writer . More... | |
void | addTab () |
Implementation of the method defined in Writer . More... | |
void | removeTab () |
Implementation of the method defined in Writer . More... | |
void | clearTab () |
Implementation of the method defined in Writer . More... | |
void | defaultTab () |
Implementation of the method defined in Writer . More... | |
void | newLine () |
Implementation of the method defined in Writer . More... | |
void | newParagraph () |
Implementation of the method defined in Writer . More... | |
void | writeMathString (const std::string) |
Implementation of the method defined in Writer . More... | |
void | writeStandOutMathString (const std::string) |
Implementation of the method defined in Writer . More... | |
Public Member Functions inherited from LatticeTester::Writer< Int > | |
Writer (const char *fileName) | |
Constructor that opens a Writer to write in the file filename . More... | |
Writer (std::ostream *stream) | |
Constructor that opens a Writer to write directly in an ostream . More... | |
virtual | ~Writer () |
Destructor. More... | |
virtual void | writeBool (const bool &value) |
Writes a bool on the stream. More... | |
virtual void | writeInt (const int &value) |
Writes an int on the stream. More... | |
virtual void | writeString (const std::string &value) |
Writes a string on the stream. More... | |
virtual void | writeDouble (const double &value) |
Writes a double on the stream. More... | |
virtual void | writeIntScal (const Int &value) |
Writes a IntScal on the stream. More... | |
virtual void | writeMMat (const IntMat &A) |
Writes a IntMat on the stream. More... | |
virtual std::ostream & | getStream () |
Returns the stream on which this object writes. More... | |
Protected Attributes | |
bool | m_isTabbed = false |
Indicates if we currently are in a tabbed section. More... | |
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. More... | |
Protected Attributes inherited from LatticeTester::Writer< Int > | |
std::ostream * | m_stream |
The stream in which the writings are done. More... | |
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.