Inter4ql  5.2
Public Member Functions | Static Public Member Functions | List of all members
Inter4ql::Plugin Class Reference

Plugin module used to implement operations delievered by external applications. More...

#include <Plugin.h>

Inheritance diagram for Inter4ql::Plugin:
Inter4ql::ModuleExternal Inter4ql::ModuleGeneric

Public Member Functions

 Plugin (VariableSpace *_v)
 constructor for Plugin module More...
 
void reason ()
 performs reasoning More...
 
Result ask_for_result (Fact *term) const
 provides valuations matching given Fact More...
 
- Public Member Functions inherited from Inter4ql::ModuleExternal
 ModuleExternal (VariableSpace *_v)
 constructor More...
 
 ~ModuleExternal ()
 destructor More...
 
Relationget_relation (std::string s) const
 getter for a relation More...
 
std::vector< Relation * > * get_relations () const
 getter for module relations More...
 
std::string get_name () const
 getter for a name of module More...
 
std::string print ()
 function that returns string with module information More...
 
module_type::type get_module_type () const
 getter for module type More...
 
VariableSpaceget_variable_space () const
 getter for sql variable space pointer More...
 
- Public Member Functions inherited from Inter4ql::ModuleGeneric
 ModuleGeneric ()
 default constructor
 
virtual ~ModuleGeneric ()
 default destructor
 
virtual void reason_with_rules (std::vector< Rule *> *rules)
 performs reasing with additional Rules added More...
 
virtual Result evaluate_expression (Expression *expr) const
 provides valuations matching given Expression More...
 
virtual Result evaluate_expression_bf (Expression *expr) const
 provides bel-free valuations matching given Expression More...
 
virtual std::vector< std::string > get_references (Fact *term)
 provides a list of Module references is term (useful when e.g. term is a shadowed Bel) More...
 
virtual void set_modules (std::vector< ModuleGeneric *> *_modules)
 setter for modules needed in this module More...
 
virtual Constraintsget_constraints () const
 getter for constraints More...
 
virtual std::vector< Domain * > * get_domains () const
 getter for domains More...
 
virtual bool contains_domain (Domain *d) const
 check if module contains domain More...
 
virtual bool contains_relation (Relation *d) const
 check if module contains relation (ignoring module name) More...
 
virtual void set_disable_constraints (bool value) const
 allows for disabling constraints check More...
 
virtual bool check_constraints_local (bool check_rigid, bool check_flexible) const
 evaluates constraints locally, in current module More...
 
virtual database * get_wsm_database ()
 fetches a database of facts from well-supported model (for summing purposes) More...
 
virtual database * get_add_database ()
 fetches a database of facts which were added by actions to this module More...
 
virtual database * get_remove_database ()
 fetches a database of facts which were removed by actions from this module More...
 
virtual void set_add_database (database *db)
 overrides a database of facts which were added by actions to this module More...
 
virtual void set_remove_database (database *db)
 overrides a database of facts which were removed by actions from this module More...
 
virtual bool constraints_violated ()
 checks whether constraints are violated More...
 

Static Public Member Functions

static Inter4ql::logic_type::type runPlugin (std::string name, std::string params)
 Function executing external application. More...
 

Additional Inherited Members

- Public Attributes inherited from Inter4ql::ModuleExternal
VariableSpacevariable_space
 VariableSpace pointer for handling all values in enviroment.
 
std::vector< Relation * > * relations
 list of relations inside external module
 
std::string name
 name of external module
 
- Protected Attributes inherited from Inter4ql::ModuleGeneric
Inter4ql::database * database_to_add
 
Inter4ql::database * database_to_remove
 

Detailed Description

Plugin module used to implement operations delievered by external applications.

Constructor & Destructor Documentation

◆ Plugin()

Inter4ql::Plugin::Plugin ( VariableSpace _v)
explicit

constructor for Plugin module

Parameters
_vpointer to VariableSpace class

Member Function Documentation

◆ ask_for_result()

Result Inter4ql::Plugin::ask_for_result ( Fact term) const
virtual

provides valuations matching given Fact

Parameters
termquery to find in database
Returns
possible valuations of term

Implements Inter4ql::ModuleGeneric.

◆ reason()

void Inter4ql::Plugin::reason ( )
virtual

performs reasoning

Implements Inter4ql::ModuleGeneric.

◆ runPlugin()

Inter4ql::logic_type::type Inter4ql::Plugin::runPlugin ( std::string  name,
std::string  params 
)
static

Function executing external application.

Parameters
namename of application to execute
paramslist of params for application
Returns
TRUE or FALSE

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