TTK
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
ttk::ProgramBase Class Referenceabstract

Base editor class for standalone programs. This class parses the the command line, execute the TTK module and takes care of the IO. More...

#include <ProgramBase.h>

Inheritance diagram for ttk::ProgramBase:
ttk::Debug ttk::BaseClass ttk::Program< ttkModule > ttkProgramBase ttkUserInterfaceBase vtkProgram< ttkModule > vtkUserInterface< ttkModule >

Public Member Functions

 ProgramBase ()
 
 ~ProgramBase () override=default
 
virtual int init (int &argc, char **argv)
 
virtual int run ()
 
virtual int save () const =0
 Save the output(s) of the TTK module.
 
- Public Member Functions inherited from ttk::Debug
 Debug ()
 
 ~Debug () override
 
virtual int setDebugLevel (const int &debugLevel)
 
int setWrapper (const Wrapper *wrapper) override
 
int printMsg (const std::string &msg, const debug::Priority &priority=debug::Priority::INFO, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsg (const std::vector< std::string > &msgs, const debug::Priority &priority=debug::Priority::INFO, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printErr (const std::string &msg, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cerr) const
 
int printWrn (const std::string &msg, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cerr) const
 
int printMsg (const std::string &msg, const double &progress, const double &time, const int &threads, const double &memory, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::PERFORMANCE, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const double &progress, const double &time, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::PERFORMANCE, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const double &progress, const double &time, const int &threads, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::PERFORMANCE, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const double &progress, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::PERFORMANCE, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const double &progress, const debug::Priority &priority, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsg (const std::vector< std::vector< std::string > > &rows, const debug::Priority &priority=debug::Priority::INFO, const bool hasHeader=true, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsg (const debug::Separator &separator, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::INFO, std::ostream &stream=std::cout) const
 
int printMsg (const debug::Separator &separator, const debug::Priority &priority, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const debug::Separator &separator, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::INFO, std::ostream &stream=std::cout) const
 
void setDebugMsgPrefix (const std::string &prefix)
 
- Public Member Functions inherited from ttk::BaseClass
 BaseClass ()
 
virtual ~BaseClass ()=default
 
int getThreadNumber () const
 
virtual int setThreadNumber (const int threadNumber)
 

Public Attributes

CommandLineParser parser_
 

Protected Member Functions

virtual int execute ()=0
 Execute your TTK module here.
 
virtual int load (const std::vector< std::string > &inputPaths)=0
 Load a sequence of input data-sets.
 
- Protected Member Functions inherited from ttk::Debug
int printMsgInternal (const std::string &msg, const std::string &right, const std::string &filler, const debug::Priority &priority=debug::Priority::INFO, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsgInternal (const std::string &msg, const debug::Priority &priority, const debug::LineMode &lineMode, std::ostream &stream=std::cout) const
 
int welcomeMsg (std::ostream &stream)
 

Protected Attributes

std::string outputPath_
 
DebugttkModule_
 
- Protected Attributes inherited from ttk::Debug
int debugLevel_
 
std::string debugMsgPrefix_
 
std::string debugMsgNamePrefix_
 
- Protected Attributes inherited from ttk::BaseClass
bool lastObject_
 
int threadNumber_
 
Wrapperwrapper_
 

Additional Inherited Members

- Static Protected Attributes inherited from ttk::Debug
static COMMON_EXPORTS debug::LineMode lastLineMode = ttk::debug::LineMode::NEW
 

Detailed Description

Base editor class for standalone programs. This class parses the the command line, execute the TTK module and takes care of the IO.

Author
Julien Tierny julie.nosp@m.n.ti.nosp@m.erny@.nosp@m.lip6.nosp@m..fr.
Date
February 2017.

Definition at line 16 of file ProgramBase.h.

Constructor & Destructor Documentation

◆ ProgramBase()

ttk::ProgramBase::ProgramBase ( )
inline

Definition at line 19 of file ProgramBase.h.

◆ ~ProgramBase()

ttk::ProgramBase::~ProgramBase ( )
overridedefault

Member Function Documentation

◆ execute()

virtual int ttk::ProgramBase::execute ( )
protectedpure virtual

Execute your TTK module here.

Implemented in ttkProgramBase.

◆ init()

virtual int ttk::ProgramBase::init ( int &  argc,
char **  argv 
)
inlinevirtual

Reimplemented in ttkUserInterfaceBase.

Definition at line 30 of file ProgramBase.h.

◆ load()

virtual int ttk::ProgramBase::load ( const std::vector< std::string > &  inputPaths)
protectedpure virtual

Load a sequence of input data-sets.

Implemented in ttkProgramBase.

◆ run()

virtual int ttk::ProgramBase::run ( )
inlinevirtual

◆ save()

virtual int ttk::ProgramBase::save ( ) const
pure virtual

Save the output(s) of the TTK module.

Implemented in ttkProgramBase.

Member Data Documentation

◆ outputPath_

std::string ttk::ProgramBase::outputPath_
protected

Definition at line 72 of file ProgramBase.h.

◆ parser_

CommandLineParser ttk::ProgramBase::parser_

Definition at line 69 of file ProgramBase.h.

◆ ttkModule_

Debug* ttk::ProgramBase::ttkModule_
protected

Definition at line 74 of file ProgramBase.h.


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