LatNet Builder Manual
2.0.1-11
Software Package for Constructing Highly Uniform Point Sets
|
This is an abstract class that represents an interface to Writer
classes.
More...
#include <LatTestWriter.h>
Inherited by LatticeTester::LatTestWriterRes< Int >.
Public Member Functions | |
LatTestWriter (const char *fileName) | |
Constructor that opens a Writer to write in the file filename . More... | |
LatTestWriter (std::ostream *stream) | |
Constructor that opens a Writer to write directly in an ostream . More... | |
virtual | ~LatTestWriter () |
Destructor. | |
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 | 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. | |
virtual void | writeInt (const int &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 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. | |
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. LatTestWriterRes offers utilities to print in a file. Since this class will 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::LatTestWriter< Int >::LatTestWriter | ( | 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.
LatticeTester::LatTestWriter< Int >::LatTestWriter | ( | 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.
|
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::LatTestWriterRes< 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::LatTestWriterRes< 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::LatTestWriterRes< Int >.
|
pure virtual |
Ends a tabbed section.
This is a pure virtual method that has no implementation.
Implemented in LatticeTester::LatTestWriterRes< 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.
References LatticeTester::LatTestWriter< Int >::m_stream.
|
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::LatTestWriterRes< Int >.
Referenced by LatticeTester::LatticeAnalysis< Int, BasInt, Dbl, RedDbl >::doTestFromInputFile().
|
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::LatTestWriterRes< 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::LatTestWriterRes< Int >.
|
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::LatTestWriterRes< Int >.
|
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::LatTestWriterRes< Int >.