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

class that handles rules in ModuleLocal More...

#include <Rule.h>

Public Member Functions

 Rule (Fact *_head, std::vector< std::vector< Fact *> *> *_body)
 constructor that creates rule More...
 
 ~Rule ()
 destructor of Rule object More...
 
 Rule (Fact *_head, std::vector< Fact *> *_body)
 constructor that creates rule More...
 
 Rule (Rule *other)
 constructor that creates rule More...
 
Factget_head ()
 getter for a head Fact More...
 
std::vector< std::vector< Fact * > * > * get_body ()
 getter for a body facts More...
 
std::string print ()
 returns string with rule information More...
 
void valuate_rule (std::map< std::string, Value *> binding)
 

Detailed Description

class that handles rules in ModuleLocal

Constructor & Destructor Documentation

◆ Rule() [1/3]

Inter4ql::Rule::Rule ( Fact _head,
std::vector< std::vector< Fact *> *> *  _body 
)

constructor that creates rule

Parameters
_headhead of a rule
_bodybody of a rule (as vector that holds alternative conjunction vectors)

◆ ~Rule()

Inter4ql::Rule::~Rule ( )

destructor of Rule object

◆ Rule() [2/3]

Inter4ql::Rule::Rule ( Fact _head,
std::vector< Fact *> *  _body 
)

constructor that creates rule

Parameters
_headhead of a rule
_bodybody of a rule

◆ Rule() [3/3]

Inter4ql::Rule::Rule ( Rule other)

constructor that creates rule

Parameters
otherothe Rule to be copied

Member Function Documentation

◆ get_body()

std::vector< std::vector< Fact * > * > * Inter4ql::Rule::get_body ( )

getter for a body facts

Returns
pointer to body of rule

◆ get_head()

Fact * Inter4ql::Rule::get_head ( )

getter for a head Fact

Returns
pointer to head Fact

◆ print()

std::string Inter4ql::Rule::print ( )

returns string with rule information

Returns
rule information packed in a std::string

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