Files Classes Functions Hierarchy
#include <rpnfunc.h>
Public Member Functions | |
| pathtoggle () | |
| pathtoggle (deque< rpnbase * > &ds, bool const evaluate=true) | |
| ~pathtoggle () | |
| rpnbase * | copy () const |
| string const | name () const |
| void | visit (deque< rpnbase * > &ds, rpnstring &path) |
| void | visit (deque< rpnbase * > &ds, rpnprogram &path) |
| void | eval (deque< rpnbase * > &ds) |
Definition at line 548 of file rpnfunc.h.
| pathtoggle::pathtoggle | ( | ) | [inline] |
Definition at line 1385 of file rpnfunc.cpp.
References eval().
01386 { 01387 if (evaluate) 01388 eval(ds); 01389 else 01390 ds.push_front(this); 01391 }
| rpnbase * pathtoggle::copy | ( | ) | const [virtual] |
Reimplemented from rpnfunction.
Definition at line 1393 of file rpnfunc.cpp.
References pathtoggle().
01394 { 01395 return new pathtoggle(); 01396 }
| void pathtoggle::eval | ( | deque< rpnbase * > & | ds | ) | [virtual] |
Reimplemented from rpnfunction.
Definition at line 1398 of file rpnfunc.cpp.
References rpnbase::accept(), and rpnbase::dec().
Referenced by pathtoggle().
| string const pathtoggle::name | ( | ) | const [inline, virtual] |
| void pathtoggle::visit | ( | deque< rpnbase * > & | ds, | |
| rpnprogram & | path | |||
| ) | [virtual] |
Reimplemented from rpnfunction.
Definition at line 1428 of file rpnfunc.cpp.
References rpnbase::dec(), and rpnstring::str.
01429 { 01430 rpnbase* x0 = ds.front(); 01431 01432 rpnstring* s = new rpnstring(); 01433 01434 vector<string> v; 01435 pathstuff().convert(v,path); 01436 pathstuff().convert(s->str,v); 01437 01438 ds.pop_front(); 01439 01440 ds.push_front(s); 01441 01442 x0->dec(); 01443 }
Reimplemented from rpnfunction.
Definition at line 1406 of file rpnfunc.cpp.
References rpnbase::dec(), and rpnstring::str.
01407 { 01408 rpnbase* x0 = ds.front(); 01409 ds.pop_front(); 01410 01411 if (path.str.empty()) 01412 { 01413 x0->dec(); 01414 return; 01415 } 01416 01417 rpnprogram* p = new rpnprogram(); 01418 01419 vector<string> v; 01420 pathstuff().convert(v,path.str); 01421 pathstuff().convert(*p,v); 01422 01423 ds.push_front(p); 01424 01425 x0->dec(); 01426 }
1.5.8