Files Classes Functions Hierarchy
#include <rpnfunc.h>
Public Member Functions | |
| rpnstringconvert () | |
| rpnstringconvert (deque< rpnbase * > &ds, bool const evaluate=true) | |
| ~rpnstringconvert () | |
| rpnbase * | copy () const |
| void | visit (deque< rpnbase * > &ds, rpninteger &n) |
| void | visit (deque< rpnbase * > &ds, rpnreal &n) |
| string const | name () const |
| void | eval (deque< rpnbase * > &ds) |
Definition at line 1337 of file rpnfunc.h.
| rpnstringconvert::rpnstringconvert | ( | ) | [inline] |
Definition at line 4124 of file rpnfunc.cpp.
References eval().
04125 { 04126 if (evaluate) 04127 eval(ds); 04128 else 04129 ds.push_front(this); 04130 }
| rpnstringconvert::~rpnstringconvert | ( | ) | [inline] |
| rpnbase * rpnstringconvert::copy | ( | ) | const [virtual] |
Reimplemented from rpnfunction.
Definition at line 4132 of file rpnfunc.cpp.
References rpnstringconvert().
04133 { 04134 return new rpnstringconvert(); 04135 }
| void rpnstringconvert::eval | ( | deque< rpnbase * > & | ds | ) | [virtual] |
Reimplemented from rpnfunction.
Definition at line 4137 of file rpnfunc.cpp.
References rpnbase::accept(), and rpnbase::dec().
Referenced by rpnstringconvert().
| string const rpnstringconvert::name | ( | ) | const [inline, virtual] |
Reimplemented from rpnfunction.
Definition at line 4158 of file rpnfunc.cpp.
References rpnbase::dec(), and rpnreal::num.
04159 { 04160 rpnbase* x0 = ds.front(); 04161 ds.pop_front(); 04162 04163 stringstream ss; 04164 ss << n.num; 04165 04166 new rpnstring(ds,ss.str()); 04167 04168 x0->dec(); 04169 }
| void rpnstringconvert::visit | ( | deque< rpnbase * > & | ds, | |
| rpninteger & | n | |||
| ) | [virtual] |
Reimplemented from rpnfunction.
Definition at line 4145 of file rpnfunc.cpp.
References rpnbase::dec(), and rpninteger::num.
04146 { 04147 rpnbase* x0 = ds.front(); 04148 ds.pop_front(); 04149 04150 stringstream ss; 04151 ss << n.num; 04152 04153 new rpnstring(ds,ss.str()); 04154 04155 x0->dec(); 04156 }
1.5.8