Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

c_term Struct Reference

#include <parser-structs.h>

Inheritance diagram for c_term:

Inheritance graph
[legend]
Collaboration diagram for c_term:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 c_term ()
 ~c_term ()
virtual void deep_delete ()
void deep_copy (c_term *copy, bool reindex=false) const
void get_variables (set< string > &vars) const
void insert_list (const vector< c_term * > &list, const c_term *rest=0, const size_t start_index=0)

Public Attributes

string name
int num
vector< c_term * > arglist
bool negated
c_termlist_head
c_termlist_tail
bool list_empty
bool match_rest
int type

Static Public Attributes

int count = 0

Detailed Description

A many-purpose element in the final result. It represents a functor (head or body literal), a variable or a list depending on which member variables are used.


Constructor & Destructor Documentation

c_term::c_term  ) 
 

Default constructor.

c_term::~c_term  ) 
 

Destructor.


Member Function Documentation

void c_term::deep_copy c_term copy,
bool  reindex = false
const
 

Copy this c_term recursively into another c_term.

Parameters:
copy allocated memory area for another term.
reindex should variables be reindexed?

void c_term::deep_delete  )  [virtual]
 

Calls delete on all subterms recursively. Note that this should NOT be done on a term that wasn't created using deep_copy during safety mode off.

Implements c_base.

void c_term::get_variables set< string > &  vars  )  const
 

Inserts the variables of this term into a supplied set.

Parameters:
vars the set of variable names.

void c_term::insert_list const vector< c_term * > &  list,
const c_term rest = 0,
const size_t  start_index = 0
 

Inserts the given list, starting at the given index, at this position (only applicable in case this c_term is a list).

Parameters:
list all elements in the list to insert.
rest additional element to insert at the end (in case of a non-null-terminated list).
start_index the index to start looking up elements in the supplied list.


Member Data Documentation

vector<c_term*> c_term::arglist
 

The arguments in case of a functor.

int c_term::count = 0 [static]
 

The number of c_* instances allocated and not destroyed.

bool c_term::list_empty
 

Is this an empty list?

c_term* c_term::list_head
 

Head of the list in case of a list, 0 otherwise.

c_term* c_term::list_tail
 

Tail of the list in case of a list, 0 otherwise.

bool c_term::match_rest
 

This term was given after a pipe in a list and therefore matches the rest of any list

string c_term::name
 

The name in case of a functor or variable.

bool c_term::negated
 

Is this a negated functor?

int c_term::num
 

The number in case of a numeral.

int c_term::type
 

The type of this term. (T_VARIABLE, T_FUNCTOR, T_LIST or T_NUMBER)


The documentation for this struct was generated from the following files:
Generated on Wed Feb 16 20:54:23 2005 for Fixpoint Engine by  doxygen 1.3.9.1