Public Types | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes
Clasp::Cli::ClaspAppBase Class Reference

#include <clasp_app.h>

Inheritance diagram for Clasp::Cli::ClaspAppBase:
Inheritance graph
[legend]

List of all members.

Public Types

typedef ProgramOptions::PosOption PosOption
typedef ClaspFacade::Summary RunSummary

Protected Types

typedef SingleOwnerPtr
< ClaspFacade
ClaspPtr
typedef SingleOwnerPtr< OutputOutPtr

Protected Member Functions

 ClaspAppBase ()
virtual OutputcreateOutput (ProblemType f)
int exitCode (const RunSummary &sol) const
virtual HelpOpt getHelpOption () const
 Returns the application's help option and its description.
virtual PosOption getPositional () const
 Returns the parser function for handling positional options.
virtual ProblemType getProblemType ()=0
virtual const int * getSignals () const
 Returns a null-terminated array of signals that this application handles.
std::istream & getStream ()
bool handlePostGroundOptions (ProgramBuilder &prg)
bool handlePreSolveOptions (ClaspFacade &clasp)
virtual void initOptions (ProgramOptions::OptionContext &root)
 Adds all application options to the given context.
virtual void onEvent (const Event &ev)
virtual bool onModel (const Solver &s, const Model &m)
virtual bool onSignal (int)
 Called when a signal is received. Tthe default terminates the application.
void printDefaultConfigs () const
virtual void printHelp (const ProgramOptions::OptionContext &root)
 Prints the application's help information (called if options contain '--help').
void printLibClaspVersion () const
void printTemplate () const
virtual void printVersion ()
 Prints the application's version message (called if options contain '--version').
void readLemmas (SharedContext &ctx)
virtual void run (ClaspFacade &clasp)=0
virtual void run ()
 Shall run the application. Called after setup and option processing.
virtual void setup ()
 Called once after option processing is done.
virtual void shutdown ()
 Called after run returned. The default is a noop.
virtual void storeCommandArgs (const ProgramOptions::ParsedValues &values)
virtual void validateOptions (const ProgramOptions::OptionContext &root, const ProgramOptions::ParsedOptions &parsed, const ProgramOptions::ParsedValues &values)
 Validates parsed options. Shall throw to signal error.
void writeNonHcfs (const SharedDependencyGraph &graph) const
 ~ClaspAppBase ()

Static Protected Member Functions

static bool parsePositional (const std::string &s, std::string &out)

Protected Attributes

ClaspPtr clasp_
ClaspAppOptions claspAppOpts_
ClaspCliConfig claspConfig_
OutPtr out_

Detailed Description

Definition at line 110 of file clasp_app.h.


Member Typedef Documentation

Definition at line 158 of file clasp_app.h.

Definition at line 157 of file clasp_app.h.

Definition at line 113 of file clasp_app.h.

Definition at line 112 of file clasp_app.h.


Constructor & Destructor Documentation

Definition at line 113 of file clasp_app.cpp.

Definition at line 114 of file clasp_app.cpp.


Member Function Documentation

Definition at line 411 of file clasp_app.cpp.

int Clasp::Cli::ClaspAppBase::exitCode ( const RunSummary sol) const [protected]

Definition at line 255 of file clasp_app.cpp.

virtual HelpOpt Clasp::Cli::ClaspAppBase::getHelpOption ( ) const [inline, protected, virtual]

Returns the application's help option and its description.

Reimplemented from ProgramOptions::Application.

Definition at line 131 of file clasp_app.h.

virtual PosOption Clasp::Cli::ClaspAppBase::getPositional ( ) const [inline, protected, virtual]

Returns the parser function for handling positional options.

Reimplemented from ProgramOptions::Application.

Definition at line 132 of file clasp_app.h.

virtual ProblemType Clasp::Cli::ClaspAppBase::getProblemType ( ) [protected, pure virtual]

Implemented in Clasp::Cli::ClaspApp.

const int * Clasp::Cli::ClaspAppBase::getSignals ( ) const [protected, virtual]

Returns a null-terminated array of signals that this application handles.

Reimplemented from ProgramOptions::Application.

Definition at line 115 of file clasp_app.cpp.

std::istream & Clasp::Cli::ClaspAppBase::getStream ( ) [protected]

Definition at line 395 of file clasp_app.cpp.

Definition at line 446 of file clasp_app.cpp.

Definition at line 453 of file clasp_app.cpp.

Adds all application options to the given context.

Implements ProgramOptions::Application.

Definition at line 130 of file clasp_app.cpp.

void Clasp::Cli::ClaspAppBase::onEvent ( const Event ev) [protected, virtual]

Reimplemented from Clasp::EventHandler.

Definition at line 232 of file clasp_app.cpp.

bool Clasp::Cli::ClaspAppBase::onModel ( const Solver s,
const Model m 
) [protected, virtual]

Reimplemented from Clasp::EventHandler.

Definition at line 245 of file clasp_app.cpp.

bool Clasp::Cli::ClaspAppBase::onSignal ( int  x) [protected, virtual]

Called when a signal is received. Tthe default terminates the application.

Reimplemented from ProgramOptions::Application.

Definition at line 218 of file clasp_app.cpp.

bool Clasp::Cli::ClaspAppBase::parsePositional ( const std::string &  s,
std::string &  out 
) [static, protected]

Definition at line 124 of file clasp_app.cpp.

Definition at line 322 of file clasp_app.cpp.

void Clasp::Cli::ClaspAppBase::printHelp ( const ProgramOptions::OptionContext root) [protected, virtual]

Prints the application's help information (called if options contain '--help').

Reimplemented from ProgramOptions::Application.

Reimplemented in Clasp::Cli::ClaspApp.

Definition at line 308 of file clasp_app.cpp.

Definition at line 296 of file clasp_app.cpp.

void Clasp::Cli::ClaspAppBase::printTemplate ( ) const [protected]

Definition at line 263 of file clasp_app.cpp.

void Clasp::Cli::ClaspAppBase::printVersion ( ) [protected, virtual]

Prints the application's version message (called if options contain '--version').

Reimplemented from ProgramOptions::Application.

Definition at line 291 of file clasp_app.cpp.

Definition at line 342 of file clasp_app.cpp.

void Clasp::Cli::ClaspAppBase::run ( ClaspFacade clasp) [protected, pure virtual]

Implemented in Clasp::Cli::ClaspApp.

Definition at line 458 of file clasp_app.cpp.

void Clasp::Cli::ClaspAppBase::run ( ) [protected, virtual]

Shall run the application. Called after setup and option processing.

Implements ProgramOptions::Application.

Definition at line 207 of file clasp_app.cpp.

void Clasp::Cli::ClaspAppBase::setup ( ) [protected, virtual]

Called once after option processing is done.

Implements ProgramOptions::Application.

Definition at line 164 of file clasp_app.cpp.

void Clasp::Cli::ClaspAppBase::shutdown ( ) [protected, virtual]

Called after run returned. The default is a noop.

Reimplemented from ProgramOptions::Application.

Definition at line 183 of file clasp_app.cpp.

void Clasp::Cli::ClaspAppBase::storeCommandArgs ( const ProgramOptions::ParsedValues values) [protected, virtual]

Definition at line 442 of file clasp_app.cpp.

void Clasp::Cli::ClaspAppBase::validateOptions ( const ProgramOptions::OptionContext root,
const ProgramOptions::ParsedOptions parsed,
const ProgramOptions::ParsedValues values 
) [protected, virtual]

Validates parsed options. Shall throw to signal error.

Implements ProgramOptions::Application.

Definition at line 136 of file clasp_app.cpp.

void Clasp::Cli::ClaspAppBase::writeNonHcfs ( const SharedDependencyGraph graph) const [protected]

Definition at line 372 of file clasp_app.cpp.


Member Data Documentation

Definition at line 161 of file clasp_app.h.

Definition at line 160 of file clasp_app.h.

Definition at line 159 of file clasp_app.h.

Definition at line 162 of file clasp_app.h.


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


clasp
Author(s): Benjamin Kaufmann
autogenerated on Thu Aug 27 2015 12:41:41