Inter4ql  5.2
Public Member Functions | Public Attributes | List of all members
Inter4ql::ModuleInternal Class Reference

class that handles hardcoded relations in modules (f.e. math functions) More...

#include <ModuleInternal.h>

Inheritance diagram for Inter4ql::ModuleInternal:
Inter4ql::ModuleGeneric Inter4ql::Bel Inter4ql::Math

Public Member Functions

 ModuleInternal (VariableSpace *_v)
 constructor More...
 
 ~ModuleInternal ()
 destructor
 
Relationget_relation (std::string s) const
 getter for a relation More...
 
std::vector< Relation * > * get_relations () const
 getter for module relations More...
 
virtual void generate_facts ()
 
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 ()=0
 performs reasoning More...
 
virtual void reason_with_rules (std::vector< Rule *> *rules)
 performs reasing with additional Rules added More...
 
virtual Result ask_for_result (Fact *term) const =0
 provides valuations matching given Fact 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...
 

Public Attributes

VariableSpacevariable_space
 getter for reasoning wrapper pointer More...
 
std::vector< Relation * > * relations
 list of relations inside external module
 
std::string name
 name of external module
 

Additional Inherited Members

- Protected Attributes inherited from Inter4ql::ModuleGeneric
Inter4ql::database * database_to_add
 
Inter4ql::database * database_to_remove
 

Detailed Description

class that handles hardcoded relations in modules (f.e. math functions)

Constructor & Destructor Documentation

◆ ModuleInternal()

Inter4ql::ModuleInternal::ModuleInternal ( VariableSpace _v)
explicit

constructor

Parameters
_vpointer to variable space
_sqlpointer to SQLWrapper implementation

Member Function Documentation

◆ get_module_type()

module_type::type Inter4ql::ModuleInternal::get_module_type ( ) const
virtual

getter for module type

Returns
module type

Reimplemented from Inter4ql::ModuleGeneric.

Reimplemented in Inter4ql::Bel.

◆ get_name()

std::string Inter4ql::ModuleInternal::get_name ( ) const
virtual

getter for a name of module

Returns
module name

Reimplemented from Inter4ql::ModuleGeneric.

◆ get_relation()

Relation * Inter4ql::ModuleInternal::get_relation ( std::string  s) const
virtual

getter for a relation

Parameters
sname of a relation
Returns
relation with name s inside module

Reimplemented from Inter4ql::ModuleGeneric.

◆ get_relations()

std::vector< Relation * > * Inter4ql::ModuleInternal::get_relations ( ) const
virtual

getter for module relations

Returns
module relations

Reimplemented from Inter4ql::ModuleGeneric.

◆ get_variable_space()

VariableSpace* Inter4ql::ModuleInternal::get_variable_space ( ) const

getter for sql variable space pointer

Returns
VariableSpace instance pointer

◆ print()

std::string Inter4ql::ModuleInternal::print ( )
virtual

function that returns string with module information

Returns
module information packed in a std::string

Reimplemented from Inter4ql::ModuleGeneric.

Member Data Documentation

◆ variable_space

VariableSpace* Inter4ql::ModuleInternal::variable_space

getter for reasoning wrapper pointer

Returns
SQLWrapper instance pointerVariableSpace pointer for handling all values in enviroment

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