Files Classes Functions Hierarchy
#include <rpnfunc.h>
Public Member Functions | |
| rpnbitshiftright () | |
| rpnbitshiftright (deque< rpnbase * > &ds, bool const evaluate=true) | |
| ~rpnbitshiftright () | |
| rpnbase * | copy () const |
| void | visit (deque< rpnbase * > &ds, rpninteger &n) |
| string const | name () const |
| void | eval (deque< rpnbase * > &ds) |
Definition at line 1304 of file rpnfunc.h.
| rpnbitshiftright::rpnbitshiftright | ( | ) | [inline] |
Definition at line 4041 of file rpnfunc.cpp.
References eval().
04042 { 04043 if (evaluate) 04044 eval(ds); 04045 else 04046 ds.push_front(this); 04047 }
| rpnbitshiftright::~rpnbitshiftright | ( | ) | [inline] |
| rpnbase * rpnbitshiftright::copy | ( | ) | const [virtual] |
Reimplemented from rpnfunction.
Definition at line 4049 of file rpnfunc.cpp.
References rpnbitshiftright().
04050 { 04051 return new rpnbitshiftright(); 04052 }
| void rpnbitshiftright::eval | ( | deque< rpnbase * > & | ds | ) | [virtual] |
Reimplemented from rpnfunction.
Definition at line 4054 of file rpnfunc.cpp.
References rpnbase::accept(), and rpnbase::dec().
Referenced by rpnbitshiftright().
| string const rpnbitshiftright::name | ( | ) | const [inline, virtual] |
| void rpnbitshiftright::visit | ( | deque< rpnbase * > & | ds, | |
| rpninteger & | n | |||
| ) | [virtual] |
Reimplemented from rpnfunction.
Definition at line 4062 of file rpnfunc.cpp.
References rpnbase::dec(), rpnbase::isinteger(), and rpninteger::num.
04063 { 04064 rpnbase* x0 = ds.front(); 04065 rpnbase* x1 = ds[1]; 04066 04067 if (!x1->isinteger()) 04068 return; 04069 04070 ds.pop_front(); 04071 04072 ((rpninteger*)x1)->num = (((rpninteger*)x1)->num >> n.num); 04073 04074 x0->dec(); 04075 }
1.5.8