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

class that implements a fact More...

#include <Fact.h>

Public Member Functions

 Fact (std::string _module, std::string a_relation, std::vector< Value *> *a_params, bool _t=true, bool _f=false)
 constructor that sets fact data More...
 
 Fact (std::string _module, std::string a_relation, Expression *a_params, bool _t=true, bool _f=false)
 constructor that sets fact data More...
 
 Fact (Fact *f)
 constructor that sets fact data More...
 
 ~Fact ()
 destructor More...
 
std::string print (bool type=true) const
 returns string with domain information More...
 
void set_value (logic_type::type _v)
 setter for fact logical value More...
 
Inter4ql::logic_type::type get_value () const
 getter for fact logical value More...
 
std::vector< Value * > * get_params () const
 getter for fact parameters More...
 
Expressionget_bel_params () const
 getter for BEL body More...
 
std::string get_module () const
 getter for fact module name More...
 
void set_module (std::string _m)
 setter for fact module name More...
 
std::string get_relation () const
 getter for fact relation name More...
 
void set_set (std::vector< Value *> *_v)
 setter for set of types ('in {...}' statement) More...
 
std::vector< Value * > * get_set ()
 getter for set of types ('in {...}' statement) More...
 
std::string get_set_string ()
 
bool is_set_query ()
 ask for being a subset query More...
 
bool operator== (Fact &r)
 overloaded operator used to comparing facts More...
 
std::vector< std::string > get_variable_names () const
 getter for names of variables More...
 
void valuate_fact (std::map< std::string, Value *> binding)
 exchanges variables into values More...
 
void should_delete_bel_params (bool value)
 setter for info whether BEL params should be deleted on destruction More...
 
void set_bel_free_query (bool value)
 setter for info whether BEL params should be deleted on destruction More...
 
bool is_bel_free_query ()
 setter for info whether BEL params should be deleted on destruction More...
 

Detailed Description

class that implements a fact

Constructor & Destructor Documentation

◆ Fact() [1/3]

Inter4ql::Fact::Fact ( std::string  _module,
std::string  a_relation,
std::vector< Value *> *  a_params,
bool  _t = true,
bool  _f = false 
)
explicit

constructor that sets fact data

Parameters
_modulemodule name
a_relationrelation name
a_paramsvector of fact parameters
_tis fact true value
_fis fact false value

◆ Fact() [2/3]

Inter4ql::Fact::Fact ( std::string  _module,
std::string  a_relation,
Expression a_params,
bool  _t = true,
bool  _f = false 
)
explicit

constructor that sets fact data

Parameters
_modulemodule name
a_relationrelation name
a_paramsExpression being a BEL body
_tis fact true value
_fis fact false value

◆ Fact() [3/3]

Inter4ql::Fact::Fact ( Fact f)
explicit

constructor that sets fact data

Parameters
pointerto Fact object to be copied

◆ ~Fact()

Inter4ql::Fact::~Fact ( )

destructor

Member Function Documentation

◆ get_bel_params()

Expression * Inter4ql::Fact::get_bel_params ( ) const

getter for BEL body

Returns
BEL body

◆ get_module()

std::string Inter4ql::Fact::get_module ( ) const

getter for fact module name

Returns
fact module name

◆ get_params()

std::vector< Value * > * Inter4ql::Fact::get_params ( ) const

getter for fact parameters

Returns
fact parameters

◆ get_relation()

std::string Inter4ql::Fact::get_relation ( ) const

getter for fact relation name

Returns
fact relation name

◆ get_set()

std::vector< Value * > * Inter4ql::Fact::get_set ( )

getter for set of types ('in {...}' statement)

Returns
set of types

◆ get_set_string()

std::string Inter4ql::Fact::get_set_string ( )
Returns
4 char that points to a view in a database

◆ get_value()

Inter4ql::logic_type::type Inter4ql::Fact::get_value ( ) const

getter for fact logical value

Returns
fact logical value

◆ get_variable_names()

std::vector< std::string > Inter4ql::Fact::get_variable_names ( ) const

getter for names of variables

Returns
vector of variable names

◆ is_bel_free_query()

bool Inter4ql::Fact::is_bel_free_query ( )

setter for info whether BEL params should be deleted on destruction

Parameters
valueinformation value

◆ is_set_query()

bool Inter4ql::Fact::is_set_query ( )

ask for being a subset query

Returns
type of a query

◆ operator==()

bool Inter4ql::Fact::operator== ( Fact r)

overloaded operator used to comparing facts

Parameters
ranother fact

◆ print()

std::string Inter4ql::Fact::print ( bool  type = true) const

returns string with domain information

Parameters
typedo we want to print fact parameters type?
Returns
domain information packed in a std::string

◆ set_bel_free_query()

void Inter4ql::Fact::set_bel_free_query ( bool  value)

setter for info whether BEL params should be deleted on destruction

Parameters
valueinformation value

◆ set_module()

void Inter4ql::Fact::set_module ( std::string  _m)

setter for fact module name

Parameters
_mfact module name

◆ set_set()

void Inter4ql::Fact::set_set ( std::vector< Value *> *  _v)

setter for set of types ('in {...}' statement)

Parameters
_vvector of types

◆ set_value()

void Inter4ql::Fact::set_value ( logic_type::type  _v)

setter for fact logical value

Parameters
_vfact logical value

◆ should_delete_bel_params()

void Inter4ql::Fact::should_delete_bel_params ( bool  value)

setter for info whether BEL params should be deleted on destruction

Parameters
valueinformation value

◆ valuate_fact()

void Inter4ql::Fact::valuate_fact ( std::map< std::string, Value *>  binding)

exchanges variables into values

Parameters
bindingmaping of variable names into values that they should get

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