Function Class Reference

List of all members.

Public Member Functions

 Function (const FunctionTemplate *const &ft)
 Function (const FunctionTemplate *const &ft, Term *const &parent)
 Function (const Function &f)
 Function (const Function &f, Term *const &parent)
 ~Function ()
void appendTerm (Term *const &term)
TermremoveLastTerm ()
 Removes the last term in the function.
int getNumTerms () const
const TermgetTerm (const int &idx) const
void setTemplate (FunctionTemplate *const &t)
const FunctionTemplategetTemplate () const
const char * getName () const
int getId () const
void setRetConstId (const int &constId)
int getRetConstId () const
void setDirty ()
bool isDirty () const
void setParent (Term *const parent)
TermgetParent () const
const char * getTermTypeAsStr (const int &idx) const
int getTermTypeAsInt (const int &idx) const
int getRetTypeId () const
const char * getRetTypeName () const
bool same (const Function *const &f) const
void appendIntArrRep (Array< int > &rep)
size_t hashCode ()
bool same (Function *const &f)
ostream & printAsInt (ostream &out) const
ostream & printAsIntWithRetConstId (ostream &out) const
ostream & print (ostream &out, const Domain *const &domain) const
ostream & printWithRetConstName (ostream &out, const Domain *const &domain) const

Detailed Description

Definition at line 77 of file function.h.


Member Function Documentation

Term* Function::removeLastTerm (  )  [inline]

Removes the last term in the function.

The template is not changed and terms_ is compressed. Returned Term* no longer belongs to the function and caller is responsible for deleting it.

Definition at line 122 of file function.h.

References Array< Type >::compress(), Array< Type >::removeLastItem(), and setDirty().

00123   {
00124     Term* term = terms_->removeLastItem();
00125     terms_->compress();
00126     setDirty();
00127     return term;
00128   }


The documentation for this class was generated from the following files:
Generated on Sun Jun 7 11:55:24 2009 for Alchemy by  doxygen 1.5.1