Files Classes Functions Hierarchy
#include <rpnfunc.h>
Public Member Functions | |
| rpnclearboth () | |
| rpnclearboth (deque< rpnbase * > &ds, bool const evaluate=true) | |
| ~rpnclearboth () | |
| rpnbase * | copy () const |
| string const | name () const |
| void | eval (deque< rpnbase * > &ds) |
Definition at line 144 of file rpnfunc.h.
| rpnclearboth::rpnclearboth | ( | ) | [inline] |
Definition at line 336 of file rpnfunc.cpp.
References eval().
00337 { 00338 if (evaluate) 00339 eval(ds); 00340 else 00341 ds.push_front(this); 00342 }
| rpnbase * rpnclearboth::copy | ( | ) | const [virtual] |
Reimplemented from rpnfunction.
Definition at line 344 of file rpnfunc.cpp.
References rpnclearboth().
00345 { 00346 return new rpnclearboth(); 00347 }
| void rpnclearboth::eval | ( | deque< rpnbase * > & | ds | ) | [virtual] |
Reimplemented from rpnfunction.
Definition at line 349 of file rpnfunc.cpp.
References rpnbase::dec().
Referenced by rpnclearboth().
00350 { 00351 if (!ds.empty()) 00352 { 00353 for (unsigned int i=0, imax=ds.size(); i<imax; ++i) 00354 ds[i]->dec(); 00355 00356 ds.clear(); 00357 } 00358 00359 deque<rpnvar*>& var = rpnprogramstackstate().vs(); 00360 if (!var.empty()) 00361 { 00362 for (unsigned int i=0, imax=var.size(); i<imax; ++i) 00363 var[i]->dec(); 00364 00365 var.clear(); 00366 } 00367 00368 dec(); 00369 }
| string const rpnclearboth::name | ( | ) | const [inline, virtual] |
1.5.8