Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | List of all members
gnsstk::InOutFramework< IType, OType > Class Template Reference

Detailed Description

template<class IType, class OType>
class gnsstk::InOutFramework< IType, OType >

This is a framework for programs that take a single type of input data and output a single stream of output.

The end user should define subclasses of this class, implementing those methods described as being meant to be overridden.

In use, the user will construct an object of the class derived from this, then call the initialize() and run() methods in that order.

Definition at line 69 of file InOutFramework.hpp.

#include <InOutFramework.hpp>

Inheritance diagram for gnsstk::InOutFramework< IType, OType >:
Inheritance graph
[legend]

Public Member Functions

bool initialize (int argc, char *argv[], bool pretty=true) noexcept
 
 InOutFramework (const std::string &applName, const std::string &applDesc) noexcept
 
virtual ~InOutFramework ()
 Destructor. More...
 
- Public Member Functions inherited from gnsstk::LoopedFramework
 LoopedFramework (const std::string &applName, const std::string &applDesc) noexcept
 
virtual ~LoopedFramework ()
 Destructor. More...
 
- Public Member Functions inherited from gnsstk::BasicFramework
 BasicFramework (const std::string &applName, const std::string &applDesc) noexcept
 
bool run () noexcept
 
virtual ~BasicFramework ()
 Destructor. More...
 

Public Attributes

IType input
 
std::string inputFn
 
OType output
 
std::string outputFn
 
- Public Attributes inherited from gnsstk::BasicFramework
int exitCode
 

Static Public Attributes

static const int OUTPUT_ERROR = 1
 Exit code used when the output file can't be opened. More...
 
- Static Public Attributes inherited from gnsstk::BasicFramework
static const int EXCEPTION_ERROR = 1
 
static const int EXIST_ERROR = 2
 
static const int GENERAL_ERROR = 1
 
static const int OPTION_ERROR = 2
 

Private Member Functions

 InOutFramework ()
 

Additional Inherited Members

- Protected Member Functions inherited from gnsstk::LoopedFramework
virtual void completeProcessing ()
 
- Protected Member Functions inherited from gnsstk::BasicFramework
virtual void additionalSetup ()
 
virtual void process ()
 
virtual void shutDown ()
 
virtual void spinUp ()
 
- Protected Attributes inherited from gnsstk::LoopedFramework
bool timeToDie
 if set to true, the loop will terminate More...
 
- Protected Attributes inherited from gnsstk::BasicFramework
std::string appDesc
 Description of program's function. More...
 
std::string argv0
 Name of the program. More...
 
int debugLevel
 Debug level for this run of the program. More...
 
CommandOptionNoArg debugOption
 Enable/increase debugging output. More...
 
CommandOptionHelpUsage helpOption
 Request command-line option usage. More...
 
int verboseLevel
 Verbose level for this run of the program. More...
 
CommandOptionNoArg verboseOption
 Enable/increase informational output. More...
 

Constructor & Destructor Documentation

◆ InOutFramework() [1/2]

template<class IType , class OType >
gnsstk::InOutFramework< IType, OType >::InOutFramework ( const std::string &  applName,
const std::string &  applDesc 
)
inlinenoexcept

Constructor for InOutFramework.

Parameters
applNamename of the program (argv[0]).
applDesctext description of program's function (used by CommandOption help).

Definition at line 81 of file InOutFramework.hpp.

◆ ~InOutFramework()

template<class IType , class OType >
virtual gnsstk::InOutFramework< IType, OType >::~InOutFramework ( )
inlinevirtual

Destructor.

Definition at line 89 of file InOutFramework.hpp.

◆ InOutFramework() [2/2]

template<class IType , class OType >
gnsstk::InOutFramework< IType, OType >::InOutFramework ( )
private

Member Function Documentation

◆ initialize()

template<class IType , class OType >
bool gnsstk::InOutFramework< IType, OType >::initialize ( int  argc,
char *  argv[],
bool  pretty = true 
)
inlinevirtualnoexcept

Process command line arguments. When this method is overridden, make sure to call the parent class's initialize().

Parameters
[in]argcsame as main() argc.
[in]argvsame as main() argv.
[in]prettyWhether the 'pretty print' option will be used when printing descriptions. It is 'TRUE' by default.
Returns
true if normal processing should proceed (i.e. no command line errors or help requests).

Reimplemented from gnsstk::BasicFramework.

Definition at line 92 of file InOutFramework.hpp.

Member Data Documentation

◆ input

template<class IType , class OType >
IType gnsstk::InOutFramework< IType, OType >::input

Definition at line 162 of file InOutFramework.hpp.

◆ inputFn

template<class IType , class OType >
std::string gnsstk::InOutFramework< IType, OType >::inputFn

Definition at line 166 of file InOutFramework.hpp.

◆ output

template<class IType , class OType >
OType gnsstk::InOutFramework< IType, OType >::output

Definition at line 164 of file InOutFramework.hpp.

◆ OUTPUT_ERROR

template<class IType , class OType >
const int gnsstk::InOutFramework< IType, OType >::OUTPUT_ERROR = 1
static

Exit code used when the output file can't be opened.

Definition at line 73 of file InOutFramework.hpp.

◆ outputFn

template<class IType , class OType >
std::string gnsstk::InOutFramework< IType, OType >::outputFn

Definition at line 166 of file InOutFramework.hpp.


The documentation for this class was generated from the following file:


gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:45