clingo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
Public Member Functions | Protected Member Functions | List of all members
Clasp::Cli::ClaspApp Class Reference

#include <clasp_app.h>

Inheritance diagram for Clasp::Cli::ClaspApp:
Inheritance graph
Collaboration diagram for Clasp::Cli::ClaspApp:
Collaboration graph

Public Member Functions

 ClaspApp ()
 
const char * getName () const
 Returns the name of this application. More...
 
const char * getVersion () const
 Returns the version number of this application. More...
 
const char * getUsage () const
 Returns the usage information of this application. More...
 
- Public Member Functions inherited from ProgramOptions::Application
virtual void error (const char *msg) const
 Prints the given error message to stderr. More...
 
virtual void info (const char *msg) const
 Prints the given info message to stderr. More...
 
virtual void warn (const char *msg) const
 Prints the given warning message to stderr. More...
 
int main (int argc, char **argv)
 Runs this application with the given command-line arguments. More...
 
void setExitCode (int n)
 Sets the value that should be returned as the application's exit code. More...
 
int getExitCode () const
 Returns the application's exit code. More...
 
virtual void printUsage ()
 Prints the application's usage message (default is: "usage: getName() getUsage()"). More...
 
- Public Member Functions inherited from Clasp::EventHandler
 EventHandler (Event::Verbosity verbosity=Event::verbosity_quiet)
 
virtual ~EventHandler ()
 
void setVerbosity (Event::Subsystem sys, Event::Verbosity verb)
 
void dispatch (const Event &ev)
 

Protected Member Functions

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

Additional Inherited Members

- Public Types inherited from Clasp::Cli::ClaspAppBase
typedef ClaspFacade::Summary RunSummary
 
typedef ProgramOptions::PosOption PosOption
 
- Public Types inherited from ProgramOptions::Application
typedef std::pair< const char
*, unsigned > 
HelpOpt
 Description of and max value for help option. More...
 
- Static Public Member Functions inherited from ProgramOptions::Application
static ApplicationgetInstance ()
 Returns the application object that is running. More...
 
- Protected Types inherited from Clasp::Cli::ClaspAppBase
typedef SingleOwnerPtr< OutputOutPtr
 
typedef SingleOwnerPtr
< ClaspFacade
ClaspPtr
 
- Static Protected Member Functions inherited from Clasp::Cli::ClaspAppBase
static bool parsePositional (const std::string &s, std::string &out)
 
- Protected Attributes inherited from Clasp::Cli::ClaspAppBase
ClaspCliConfig claspConfig_
 
ClaspAppOptions claspAppOpts_
 
ClaspPtr clasp_
 
OutPtr out_
 

Constructor & Destructor Documentation

Clasp::Cli::ClaspApp::ClaspApp ( )

Member Function Documentation

const char* Clasp::Cli::ClaspApp::getName ( ) const
inlinevirtual

Returns the name of this application.

Implements ProgramOptions::Application.

ProblemType Clasp::Cli::ClaspApp::getProblemType ( )
protectedvirtual

Implements Clasp::Cli::ClaspAppBase.

Here is the call graph for this function:

const char* Clasp::Cli::ClaspApp::getUsage ( ) const
inlinevirtual

Returns the usage information of this application.

Reimplemented from ProgramOptions::Application.

const char* Clasp::Cli::ClaspApp::getVersion ( ) const
inlinevirtual

Returns the version number of this application.

Implements ProgramOptions::Application.

void Clasp::Cli::ClaspApp::printHelp ( const ProgramOptions::OptionContext root)
protectedvirtual

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

Reimplemented from Clasp::Cli::ClaspAppBase.

Here is the call graph for this function:

void Clasp::Cli::ClaspApp::run ( ClaspFacade clasp)
protectedvirtual

Implements Clasp::Cli::ClaspAppBase.

Here is the call graph for this function:


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