dlvhex  2.5.0
Predicate Struct Reference

Predicate structure, used in PredicateTable.h. More...

#include <include/dlvhex2/Predicate.h>

Inheritance diagram for Predicate:
Collaboration diagram for Predicate:

Public Member Functions

 Predicate (IDKind kind, const std::string &symbol, const int &arity)
 Constructor.
std::ostream & print (std::ostream &o) const
 Writes the predicate p and its arity a as string of kind "Predicate(p,a)" to stream o.

Data Fields

IDKind kind
 The kind part of the ID of this symbol.
std::string symbol
 The actual predicate as string.
int arity
 The arity of the predicate.

Detailed Description

Predicate structure, used in PredicateTable.h.

Definition at line 45 of file Predicate.h.


Constructor & Destructor Documentation

Predicate::Predicate ( IDKind  kind,
const std::string &  symbol,
const int &  arity 
) [inline]

Constructor.

Parameters:
kindSee Predicate::kind.
symbolSee Predicate::symbol.
aritySee Predicate::arity.

Definition at line 59 of file Predicate.h.


Member Function Documentation

std::ostream& Predicate::print ( std::ostream &  o) const [inline]

Writes the predicate p and its arity a as string of kind "Predicate(p,a)" to stream o.

Parameters:
oThe output stream to write to.
Returns:
o.

Definition at line 64 of file Predicate.h.

References arity, and symbol.


Field Documentation

The arity of the predicate.

Definition at line 53 of file Predicate.h.

Referenced by print().

The kind part of the ID of this symbol.

Definition at line 49 of file Predicate.h.

std::string Predicate::symbol

The actual predicate as string.

Definition at line 51 of file Predicate.h.

Referenced by print(), and RawPrinter::print().


The documentation for this struct was generated from the following file: