Lattice Tester Guide
1.0-9
Software Package For Testing The Uniformity Of Integral Lattices In The Real Space
|
This is an abstract class that represents an interface to Writer
classes.
More...
#include <latticetester/Writer.h>
Inherited by LatticeTester::WriterRes< Int >.
Public Member Functions | |
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 | beginTabbedSection ()=0 |
Begins a tabbed section. More... | |
virtual void | endTabbedSection ()=0 |
Ends a tabbed section. More... | |
virtual void | addTab ()=0 |
After this is called, newlines in tabbed sections will have an additional tab. More... | |
virtual void | removeTab ()=0 |
After this is called, newlines in tabbed sections will have one less tab. More... | |
virtual void | clearTab ()=0 |
After this is called, newlines in tabbed sections will have no tab. More... | |
virtual void | defaultTab ()=0 |
After this is called, newlines in tabbed sections will use the default amount of tabs and spaces of the class. More... | |
virtual void | newLine ()=0 |
Starts a new line and adds the right amount of tabs if in a tabbed section. More... | |
virtual void | newParagraph ()=0 |
Starts a new paragraph. 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 void | writeMathString (const std::string)=0 |
Writes a string that is formated and in LaTeX math mode. More... | |
virtual void | writeStandOutMathString (const std::string)=0 |
Writes a string that is formated and in LaTeX math mode with a newline after and before the string. More... | |
virtual std::ostream & | getStream () |
Returns the stream on which this object writes. More... | |
Protected Attributes | |
std::ostream * | m_stream |
The stream in which the writings are done. More... | |
This is an abstract class that represents an interface to Writer
classes.
That is, this class methods are intended to be used as a way to format an output on an ostream
or a file. It already implements functions to write basic data types. A subclass of this class must be implemented if you want to use it. WriterRes
offers utilities to print in a file or on the command line. Since this class must be overridden, it is possible to implement subclasses to format text for different kind of output such as plain text, \(\LaTeX\) or HTML.
If this class is used on a file, it will automatically print at the start of the file and overwrite it. But if a stream is passed to this object, it will not be modified. That means that it is possible to write on a single stream with multiple writers.
LatticeTester::Writer< Int >::Writer | ( | const char * | fileName | ) |
Constructor that opens a Writer
to write in the file filename
.
This will overwrite the file and start printing at the start. The program will make/ovewrite a file in the working directory from which the program was called.
LatticeTester::Writer< Int >::Writer | ( | std::ostream * | stream | ) |
Constructor that opens a Writer
to write directly in an ostream
.
This will not change the stream
object. That means that it is possible to create a stream and pass it to different implementations of this interface via this constructor to use different printing formats.
|
virtual |
Destructor.
|
pure virtual |
After this is called, newlines in tabbed sections will have an additional tab.
This is a pure virtual method that has no implementation.
Implemented in LatticeTester::WriterRes< Int >.
|
pure virtual |
Begins a tabbed section.
In a tabbed section, every newline character is followed by a series of whitespace or tab characters such that the first non-blank characters of the lines in this section are aligned. The amount of tabs in the begginning of the section can be modified with the addTab()
, removeTab()
and clearTab()
methods.
This is a pure virtual method that has no implementation.
Implemented in LatticeTester::WriterRes< Int >.
|
pure virtual |
After this is called, newlines in tabbed sections will have no tab.
This is a pure virtual method that has no implementation.
Implemented in LatticeTester::WriterRes< Int >.
|
pure virtual |
After this is called, newlines in tabbed sections will use the default amount of tabs and spaces of the class.
This is a pure virtual method that has no implementation.
Implemented in LatticeTester::WriterRes< Int >.
|
pure virtual |
Ends a tabbed section.
This is a pure virtual method that has no implementation.
Implemented in LatticeTester::WriterRes< Int >.
|
inlinevirtual |
Returns the stream on which this object writes.
If the stream is a simple ostream
, this can be used to then print on standard output for example. If this is a file. It can be possible to used different writers in succession.
|
pure virtual |
Starts a new line and adds the right amount of tabs if in a tabbed section.
This is a pure virtual method that has no implementation.
Implemented in LatticeTester::WriterRes< Int >.
|
pure virtual |
Starts a new paragraph.
Automatically ends the tabbed section if the writer was in one.
This is a pure virtual method that has no implementation.
Implemented in LatticeTester::WriterRes< Int >.
|
pure virtual |
After this is called, newlines in tabbed sections will have one less tab.
This is a pure virtual method that has no implementation.
Implemented in LatticeTester::WriterRes< Int >.
|
virtual |
Writes a bool
on the stream.
|
virtual |
Writes a double
on the stream.
|
virtual |
Writes an int
on the stream.
|
virtual |
Writes a IntScal
on the stream.
|
pure virtual |
Writes a string
that is formated and in LaTeX math mode.
This can be used to print mathemetical formulas in a standardised format.
This method can be implemented in various way. For example, it is possible to have it print with or without the LaTeX $ signs.
This is a pure virtual method that has no implementation.
Implemented in LatticeTester::WriterRes< Int >.
|
virtual |
Writes a IntMat
on the stream.
|
pure virtual |
Writes a string
that is formated and in LaTeX math mode with a newline after and before the string.
This can be used to print mathemetical formulas in a standardised format.
This method can be implemented in various way. For example, it is possible to have it print with or without the LaTeX \equation delimiters.
This is a pure virtual method that has no implementation.
Implemented in LatticeTester::WriterRes< Int >.
|
virtual |
Writes a string
on the stream.
|
protected |
The stream in which the writings are done.