proj home

Files   Classes   Functions   Hierarchy  

rpnbase Class Reference

#include <rpn.h>

Inheritance diagram for rpnbase:
Inheritance graph
Collaboration diagram for rpnbase:
Collaboration graph

List of all members.

Public Member Functions

virtual void inc ()
void dec ()
 rpnbase ()
virtual ~rpnbase ()=0
virtual rpnbasecopy () const =0
virtual ostreamprint (ostream &os) const
virtual string const name () const
virtual void eval (deque< rpnbase * > &ds)
virtual void accept (deque< rpnbase * > &ds, rpnfunction &f)
virtual bool const isinteger () const
virtual bool const isreal () const
virtual bool const iscomplex () const
virtual bool const isstring () const
virtual bool const isprogram () const
virtual bool const isvariable () const
virtual bool const isvector () const
bool const isnumber () const
virtual void inc ()
void dec ()
 rpnbase ()
virtual ~rpnbase ()=0
virtual rpnbasecopy () const =0
virtual ostreamprint (ostream &os) const
virtual string const name () const
virtual void eval (deque< rpnbase * > &ds)
virtual void accept (deque< rpnbase * > &ds, rpnfunction &f)
virtual bool const isinteger () const
virtual bool const isreal () const
virtual bool const isstring () const
virtual bool const isprogram () const
virtual bool const isvariable () const
virtual bool const isvector () const
bool const isnumber () const

Public Attributes

unsigned int counter

Detailed Description

Definition at line 16 of file rpn.h.


Constructor & Destructor Documentation

rpnbase::rpnbase (  )  [inline]

Definition at line 28 of file rpn.h.

00028 : counter(1) {}

rpnbase::~rpnbase (  )  [pure virtual]

Definition at line 32 of file rpn.cpp.

00032 {}

rpnbase::rpnbase (  )  [inline]

Definition at line 37 of file rpn2.h.

00037 : counter(1) {}

virtual rpnbase::~rpnbase (  )  [pure virtual]

Member Function Documentation

virtual void rpnbase::accept ( deque< rpnbase * > &  ds,
rpnfunction f 
) [inline, virtual]

Definition at line 52 of file rpn2.h.

00052 {}

virtual void rpnbase::accept ( deque< rpnbase * > &  ds,
rpnfunction f 
) [inline, virtual]
virtual rpnbase* rpnbase::copy (  )  const [pure virtual]
rpnbase * rpnbase::copy (  )  const [pure virtual]

Implemented in rpnfcos, rpnfsin, rpnftan, rpnflog, rpnflog10, rpnfexp, rpnfsqrt, rpnfsinh, rpnfcosh, rpnftanh, rpnffloor, rpnfceil, rpnfacos, rpnfasin, rpnfatan, rpnfabs, rpnfarg, rpnfnorm, rpnfimag, rpnrealconvert, rpnfconj, rpnpow, rpnr_to_d, rpnd_to_r, rpnp_to_c, rpnr_to_c, rpnfunction, rpnreal, rpncomplex, rpninteger, rpnstring, rpnvar, rpnvector, rpnprogram, rpnfunction, rpnreal, rpninteger, rpnstring, rpnvar, rpnvector, rpnprogram, rpnprogset, rpnpush, rpnpop, rpnpushn, rpnpopn, dssize2, rpneval, rpnclear, rpnclearvar, rpnclearboth, rpndup, rpndupn, dssize, rev, rot, rotn, rpnswap, rpnswap2, dropi, drop, dropn, ifthen, thenif, ifthenelse, thenelseif, var, vardel, vareval, varpushd, varpopd, depthd, varls, vartree, varpwd, pathtoggle, varinc, vardec, varexists, varreplace, varrecall, rpnnot, rpnneg, rpnadd, rpnmultiply, rpnlessthan, rpnlessthanequal, rpngreaterthanequal, rpngreaterthan, rpnequal, rpnfor, rpnforn, prognew, progdecompose, progrev, rpnsubtract, rpndivide, isrpnstring, isrpninteger, isrpnreal, isrpncomplex, isrpnprogram, pathcd, pathquery, varmv, rpncp, rpninsert, rpnerase, rpnpointermake, rpnvectormake, rpnvectorpointermake, pstream, rpnintegerhex, rpnintegeroct, rpnintegerdec, rpnintegerbin, rpnbitnot, rpnbitxor, rpnbitor, rpnbitand, rpnbitshiftleft, rpnbitshiftright, rpnintegerconvert, rpnstringconvert, rpnfactorial, rpnmod, rpnascii, rpngcd, stateevalset, stateevalunset, stateevalquery, load, rpnsave, dictadd, and rpninterp.

Definition at line 33 of file rpn.cpp.

Referenced by rpnvar::eval(), rpnprogramstackstate::evaluate(), rpnprogramstackstate::recall(), rpnforn::visit(), and rpnfor::visit().

00033 { return 0; }

void rpnbase::dec (  )  [inline]

Definition at line 33 of file rpn2.h.

References counter.

00034     { --counter; if (counter==0) delete this; }

void rpnbase::dec (  )  [inline]

Definition at line 24 of file rpn.h.

References counter.

Referenced by rpninterp::eval(), dictadd::eval(), rpnsave::eval(), load::eval(), stateevalquery::eval(), stateevalunset::eval(), stateevalset::eval(), rpngcd::eval(), rpnascii::eval(), rpnmod::eval(), rpnfactorial::eval(), rpnstringconvert::eval(), rpnintegerconvert::eval(), rpnbitshiftright::eval(), rpnbitshiftleft::eval(), rpnbitor::eval(), rpnbitand::eval(), rpnbitxor::eval(), rpnbitnot::eval(), rpnintegerbin::eval(), rpnintegerdec::eval(), rpnintegeroct::eval(), rpnintegerhex::eval(), pstream::eval(), rpnvectorpointermake::eval(), rpnvectormake::eval(), rpnpointermake::eval(), rpnerase::eval(), rpninsert::eval(), rpncp::eval(), varmv::eval(), pathquery::eval(), pathcd::eval(), isrpnprogram::eval(), isrpncomplex::eval(), isrpnreal::eval(), isrpninteger::eval(), isrpnstring::eval(), rpndivide::eval(), rpnsubtract::eval(), progrev::eval(), progdecompose::eval(), prognew::eval(), rpnforn::eval(), rpnfor::eval(), rpnequal::eval(), rpngreaterthan::eval(), rpngreaterthanequal::eval(), rpnlessthanequal::eval(), rpnlessthan::eval(), rpnmultiply::eval(), rpnadd::eval(), varrecall::eval(), varreplace::eval(), varexists::eval(), vardec::eval(), varinc::eval(), pathtoggle::eval(), varpwd::eval(), vartree::eval(), varls::eval(), depthd::eval(), varpopd::eval(), varpushd::eval(), vareval::eval(), vardel::eval(), var::eval(), rpnneg::eval(), rpnnot::eval(), thenelseif::eval(), ifthenelse::eval(), thenif::eval(), ifthen::eval(), dropn::eval(), drop::eval(), dropi::eval(), rpnswap2::eval(), rpnswap::eval(), rotn::eval(), rot::eval(), rev::eval(), dssize::eval(), rpndupn::eval(), rpndup::eval(), rpnclearboth::eval(), rpnclearvar::eval(), rpnclear::eval(), rpneval::eval(), dssize2::eval(), rpnpopn::eval(), rpnpushn::eval(), rpnpop::eval(), rpnpush::eval(), rpnprogset::eval(), rpnfunction::eval(), rpnprogram::eval(), rpnr_to_c::eval(), rpnp_to_c::eval(), rpnpow::eval(), rpnrealconvert::eval(), rpnprogramstackstate::replace(), dictadd::visit(), rpnsave::visit(), load::visit(), rpngcd::visit(), rpnascii::visit(), rpnmod::visit(), rpnstringconvert::visit(), rpnintegerconvert::visit(), rpnbitshiftright::visit(), rpnbitshiftleft::visit(), rpnbitor::visit(), rpnbitand::visit(), rpnbitxor::visit(), rpnvectorpointermake::visit(), rpnvectormake::visit(), rpnpointermake::visit(), rpnerase::visit(), rpninsert::visit(), rpncp::visit(), varmv::visit(), pathcd::visit(), rpndivide::visit(), rpnsubtract::visit(), progdecompose::visit(), prognew::visit(), rpnforn::visit(), rpnfor::visit(), rpnequal::visit(), rpngreaterthan::visit(), rpngreaterthanequal::visit(), rpnlessthanequal::visit(), rpnlessthan::visit(), rpnmultiply::visit(), rpnadd::visit(), varrecall::visit(), varreplace::visit(), vardec::visit(), varinc::visit(), pathtoggle::visit(), varpushd::visit(), vareval::visit(), vardel::visit(), var::visit(), thenelseif::visit(), ifthenelse::visit(), thenif::visit(), ifthen::visit(), dropn::visit(), dropi::visit(), rotn::visit(), rpndupn::visit(), rpnpopn::visit(), rpnpushn::visit(), rpnprogset::visit(), rpnfimag::visit(), rpnfnorm::visit(), rpnfarg::visit(), rpnfabs::visit(), rpnr_to_c::visit(), rpnp_to_c::visit(), rpnpow::visit(), rpnrealconvert::visit(), rpnfsqrt::visit(), fbuilduser::~fbuilduser(), and rpnprogram::~rpnprogram().

00025     { --counter; if (counter==0) delete this; }

virtual void rpnbase::eval ( deque< rpnbase * > &  ds  )  [inline, virtual]

Definition at line 48 of file rpn2.h.

00049     { ds.push_front(this); }

virtual void rpnbase::eval ( deque< rpnbase * > &  ds  )  [inline, virtual]
virtual void rpnbase::inc (  )  [inline, virtual]

Reimplemented in rpnvar, rpnprogram, rpnvar, and rpnprogram.

Definition at line 31 of file rpn2.h.

References counter.

00032     { ++counter; }

virtual void rpnbase::inc (  )  [inline, virtual]
virtual bool const rpnbase::iscomplex (  )  const [inline, virtual]

Reimplemented in rpncomplex.

Definition at line 48 of file rpn.h.

Referenced by isrpncomplex::eval(), rpndivide::visit(), rpnsubtract::visit(), rpnmultiply::visit(), rpnadd::visit(), and rpnpow::visit().

00048 { return false; }

virtual bool const rpnbase::isinteger (  )  const [inline, virtual]

Reimplemented in rpninteger, and rpninteger.

Definition at line 55 of file rpn2.h.

00055 { return false; } 

virtual bool const rpnbase::isinteger (  )  const [inline, virtual]
bool const rpnbase::isnumber (  )  const [inline]

Definition at line 61 of file rpn2.h.

References isinteger(), and isreal().

00062     { return this->isreal() || this->isinteger(); }

bool const rpnbase::isnumber (  )  const [inline]

Definition at line 53 of file rpn.h.

References isinteger(), and isreal().

00054     { return this->isreal() || this->isinteger(); }

virtual bool const rpnbase::isprogram (  )  const [inline, virtual]

Reimplemented in rpnprogram, and rpnprogram.

Definition at line 58 of file rpn2.h.

00058 { return false; } 

virtual bool const rpnbase::isprogram (  )  const [inline, virtual]

Reimplemented in rpnprogram, and rpnprogram.

Definition at line 50 of file rpn.h.

Referenced by isrpnprogram::eval(), pathstuff::findrelativetree(), dictadd::visit(), pstream::visit(), rpnforn::visit(), rpnfor::visit(), and rpnprogset::visit().

00050 { return false; } 

virtual bool const rpnbase::isreal (  )  const [inline, virtual]

Reimplemented in rpnreal, and rpnreal.

Definition at line 56 of file rpn2.h.

00056 { return false; }

virtual bool const rpnbase::isreal (  )  const [inline, virtual]
virtual bool const rpnbase::isstring (  )  const [inline, virtual]

Reimplemented in rpnstring, and rpnstring.

Definition at line 57 of file rpn2.h.

00057 { return false; }

virtual bool const rpnbase::isstring (  )  const [inline, virtual]

Reimplemented in rpnstring, and rpnstring.

Definition at line 49 of file rpn.h.

Referenced by pathstuff::convert(), isrpnstring::eval(), rpncp::visit(), and varmv::visit().

00049 { return false; }

virtual bool const rpnbase::isvariable (  )  const [inline, virtual]

Reimplemented in rpnvar, and rpnvar.

Definition at line 59 of file rpn2.h.

00059 { return false; }

virtual bool const rpnbase::isvariable (  )  const [inline, virtual]

Reimplemented in rpnvar, and rpnvar.

Definition at line 51 of file rpn.h.

00051 { return false; }

virtual bool const rpnbase::isvector (  )  const [inline, virtual]

Reimplemented in rpnvector, and rpnvector.

Definition at line 60 of file rpn2.h.

00060 { return false; }

virtual bool const rpnbase::isvector (  )  const [inline, virtual]

Reimplemented in rpnvector, and rpnvector.

Definition at line 52 of file rpn.h.

Referenced by rpnvectorpointermake::visit().

00052 { return false; }

virtual string const rpnbase::name (  )  const [inline, virtual]

Reimplemented in rpnfcos, rpnfsin, rpnftan, rpnflog, rpnflog10, rpnfexp, rpnfsqrt, rpnfsinh, rpnfcosh, rpnftanh, rpnffloor, rpnfceil, rpnfacos, rpnfasin, rpnfatan, rpnfabs, rpnfarg, rpnfnorm, rpnfimag, rpnrealconvert, rpnfconj, rpnpow, rpnr_to_d, rpnd_to_r, rpnp_to_c, rpnr_to_c, rpnfunction, rpnreal, rpncomplex, rpninteger, rpnvar, rpnvector, rpnfunction, rpnreal, rpninteger, rpnvar, rpnvector, rpnprogset, rpnpush, rpnpop, rpnpushn, rpnpopn, dssize2, rpneval, rpnclear, rpnclearvar, rpnclearboth, rpndup, rpndupn, dssize, rev, rot, rotn, rpnswap, rpnswap2, dropi, drop, dropsymb, dropn, ifthen, thenif, ifthenelse, thenelseif, var, vardel, vareval, varpushd, varpopd, depthd, varls, vartree, varpwd, pathtoggle, varinc, vardec, varexists, varreplace, varrecall, rpnnot, rpnneg, rpnadd, rpnmultiply, rpnlessthan, rpnlessthanequal, rpngreaterthanequal, rpngreaterthan, rpnequal, rpnfor, rpnforn, prognew, progdecompose, progrev, rpnsubtract, rpndivide, isrpnstring, isrpninteger, isrpnreal, isrpncomplex, isrpnprogram, pathcd, pathquery, varmv, rpncp, rpninsert, rpnerase, rpnpointermake, rpnvectormake, rpnvectorpointermake, pstream, rpnintegerhex, rpnintegeroct, rpnintegerdec, rpnintegerbin, rpnbitnot, rpnbitxor, rpnbitor, rpnbitand, rpnbitshiftleft, rpnbitshiftright, rpnintegerconvert, rpnstringconvert, rpnfactorial, rpnmod, rpnascii, rpngcd, stateevalset, stateevalunset, stateevalquery, load, rpnsave, dictadd, and rpninterp.

Definition at line 44 of file rpn2.h.

00045     { return string("undefined"); }

virtual string const rpnbase::name (  )  const [inline, virtual]

Reimplemented in rpnfcos, rpnfsin, rpnftan, rpnflog, rpnflog10, rpnfexp, rpnfsqrt, rpnfsinh, rpnfcosh, rpnftanh, rpnffloor, rpnfceil, rpnfacos, rpnfasin, rpnfatan, rpnfabs, rpnfarg, rpnfnorm, rpnfimag, rpnrealconvert, rpnfconj, rpnpow, rpnr_to_d, rpnd_to_r, rpnp_to_c, rpnr_to_c, rpnfunction, rpnreal, rpncomplex, rpninteger, rpnvar, rpnvector, rpnfunction, rpnreal, rpninteger, rpnvar, rpnvector, rpnprogset, rpnpush, rpnpop, rpnpushn, rpnpopn, dssize2, rpneval, rpnclear, rpnclearvar, rpnclearboth, rpndup, rpndupn, dssize, rev, rot, rotn, rpnswap, rpnswap2, dropi, drop, dropsymb, dropn, ifthen, thenif, ifthenelse, thenelseif, var, vardel, vareval, varpushd, varpopd, depthd, varls, vartree, varpwd, pathtoggle, varinc, vardec, varexists, varreplace, varrecall, rpnnot, rpnneg, rpnadd, rpnmultiply, rpnlessthan, rpnlessthanequal, rpngreaterthanequal, rpngreaterthan, rpnequal, rpnfor, rpnforn, prognew, progdecompose, progrev, rpnsubtract, rpndivide, isrpnstring, isrpninteger, isrpnreal, isrpncomplex, isrpnprogram, pathcd, pathquery, varmv, rpncp, rpninsert, rpnerase, rpnpointermake, rpnvectormake, rpnvectorpointermake, pstream, rpnintegerhex, rpnintegeroct, rpnintegerdec, rpnintegerbin, rpnbitnot, rpnbitxor, rpnbitor, rpnbitand, rpnbitshiftleft, rpnbitshiftright, rpnintegerconvert, rpnstringconvert, rpnfactorial, rpnmod, rpnascii, rpngcd, stateevalset, stateevalunset, stateevalquery, load, rpnsave, dictadd, and rpninterp.

Definition at line 35 of file rpn.h.

Referenced by print().

00036     { return string("undefined"); }

virtual ostream& rpnbase::print ( ostream os  )  const [inline, virtual]

Reimplemented in rpnreal, rpncomplex, rpninteger, rpnstring, rpnvar, rpnvector, rpnprogram, rpnreal, rpninteger, rpnstring, rpnvar, rpnvector, and rpnprogram.

Definition at line 41 of file rpn2.h.

References name().

00042     { return os << this->name(); }

virtual ostream& rpnbase::print ( ostream os  )  const [inline, virtual]

Reimplemented in rpnreal, rpncomplex, rpninteger, rpnstring, rpnvar, rpnvector, rpnprogram, rpnreal, rpninteger, rpnstring, rpnvar, rpnvector, and rpnprogram.

Definition at line 32 of file rpn.h.

References name().

Referenced by operator<<().

00033     { return os << this->name(); }


Member Data Documentation

unsigned int rpnbase::counter

Definition at line 21 of file rpn.h.

Referenced by dec(), inc(), rpnvar::inc(), and rpnprogram::inc().


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

Generated on 27 Nov 2012 for Chelton Evans Source by  doxygen 1.6.1