|
WSF
|
#include <WsfCoverageMeasureTextOutput.hpp>


Public Member Functions | |
| MeasureTextOutput () | |
| MeasureTextOutput (std::unique_ptr< TextOutputWriter > aWriterPtr) | |
| MeasureTextOutput (const MeasureTextOutput &aOther)=default | |
| ~MeasureTextOutput () override=default | |
| bool | ProcessInput (UtInput &aInput) override |
| void | Write (const Coverage &aCoverage, const Measure &aMeasure) override |
| void | SetFileNameToDefault (const Coverage &aCoverage, const Measure &aMeasure) override |
| TextOutputWriter & | GetWriter () |
| Return the writer being used by this object. | |
| Public Member Functions inherited from wsf::coverage::MeasureOutput | |
| MeasureOutput ()=default | |
| MeasureOutput (const MeasureOutput &aOther)=default | |
| ~MeasureOutput () override=default | |
| MeasureOutput * | Clone () const override=0 |
| virtual std::string | GetOutputType () const =0 |
| const std::string & | GetFileName () const |
| Return the file name into which output will be written. | |
| const std::string & | GetOutputDir () const |
| Return the directory into which any files will be generated. | |
| void | SetFileName (const std::string &aFileName) |
| Set the file name into which output will be written. | |
| void | SetOutputDir (const std::string &aOutputDir) |
| Set the directory into which any files will be generated. | |
| Public Member Functions inherited from WsfObject | |
| WsfObject () | |
| This is the constructor for the WsfObject class. | |
| ~WsfObject () override | |
| This is the destructor for the WsfObject class. | |
| const char * | GetScriptClassName () const override |
| const std::string & | GetType () const |
| WsfStringId | GetTypeId () const |
| Get the string ID of the 'type' of the object. | |
| void | SetType (WsfStringId aType) |
| const std::string & | GetBaseType () const |
| WsfStringId | GetBaseTypeId () const |
| const TypeList & | GetTypeList () const |
| bool | IsA_TypeOf (WsfStringId aType) const |
| WsfObject & | operator= (const WsfObject &aRhs) |
| Assignment operator. | |
| template<typename T> | |
| void | Serialize (T &aBuff) |
| For XIO (de)serialization. | |
| const std::string & | GetName () const |
| WsfStringId | GetNameId () const |
| void | SetName (WsfStringId aName) |
Additional Inherited Members | |
| Public Types inherited from WsfObject | |
| typedef std::vector< WsfStringId > | TypeList |
| The list of types returned by GetTypeList. | |
| WsfObject (const WsfObject &aSrc) | |
| Copy constructor (for Clone()). | |
This class collects some common behavior for text output file for measure data.
This class defers both settings management and the actual writing to streams to an owned instance of a TextOutputWriter. This member has a sensible default, but that default can be overridden. For example, a subclass of TextOutputWriter that writes to a string stream instead of a file is useful for unit tests.
| wsf::coverage::MeasureTextOutput::MeasureTextOutput | ( | ) |
|
explicit |
References wsf::coverage::MeasureOutput::MeasureOutput().
|
default |
References MeasureTextOutput().
|
overridedefault |
References ProcessInput(), SetFileNameToDefault(), and Write().
|
inline |
Return the writer being used by this object.
|
overridevirtual |
Process input from a generic source.
Examine the current input command. If it is NOT one of the commands recognized by this class then it simply returns 'false'. If it is one of the commands recognized by this class then it processes the command and returns 'true'.
| aInput | a reference to a UtInput object. |
| UtInput::ExceptionBase | (or an object derived from it) if the command was recognized but contains some sort of error. |
Reimplemented from wsf::coverage::MeasureOutput.
References wsf::coverage::TextOutputWriter::cMAX_PRECISION, wsf::coverage::TextOutputWriter::cMAX_WIDTH, wsf::coverage::TextOutputWriter::cMIN_PRECISION, wsf::coverage::TextOutputWriter::cMIN_WIDTH, and wsf::coverage::MeasureOutput::ProcessInput().
Referenced by wsf::coverage::MeasureLatLonStatsOutput::ProcessInput(), and ~MeasureTextOutput().
|
overridevirtual |
Set the filename to a default value that is reasonably unique.
To avoid the user having to manually set the name of every file, MeasureOutput provides an automatic naming feature. Subclasses should implement this so that the default names have a reasonable chance of being unique.
| aCoverage | - The coverage object defining the measure. |
| aMeasure | - The measure to be output. |
Implements wsf::coverage::MeasureOutput.
References wsf::coverage::MeasureOutput::GetFileName(), WsfObject::GetName(), and wsf::coverage::MeasureOutput::SetFileName().
Referenced by ~MeasureTextOutput().
|
overridevirtual |
Write the measured data to a text file.
This method uses the template pattern, calling into operations on the owned TextOutputWriter and on the subclass.
| aCoverage | - The coverage defining the given aMeasure. |
| aMeasure | - The measured data to be written to file. |
Implements wsf::coverage::MeasureOutput.
References wsf::coverage::MeasureOutput::GetFileName(), and wsf::coverage::MeasureOutput::GetOutputDir().
Referenced by ~MeasureTextOutput().