Files Classes Functions Hierarchy
#include <rpnfunc.h>
Public Member Functions | |
| isrpnstring () | |
| isrpnstring (deque< rpnbase * > &ds, bool const evaluate=true) | |
| ~isrpnstring () | |
| rpnbase * | copy () const |
| string const | name () const |
| void | eval (deque< rpnbase * > &ds) |
Definition at line 931 of file rpnfunc.h.
| isrpnstring::isrpnstring | ( | ) | [inline] |
Definition at line 2914 of file rpnfunc.cpp.
References eval().
02915 { 02916 if (evaluate) 02917 eval(ds); 02918 else 02919 ds.push_front(this); 02920 }
| rpnbase * isrpnstring::copy | ( | ) | const [virtual] |
Reimplemented from rpnfunction.
Definition at line 2922 of file rpnfunc.cpp.
References isrpnstring().
02923 { 02924 return new isrpnstring(); 02925 }
| void isrpnstring::eval | ( | deque< rpnbase * > & | ds | ) | [virtual] |
Reimplemented from rpnfunction.
Definition at line 2927 of file rpnfunc.cpp.
References rpnbase::dec(), rpnbase::isstring(), and rpninteger::num.
Referenced by isrpnstring().
02928 { 02929 if(ds.empty()) 02930 return; 02931 02932 ds[0]->accept(ds,*this); 02933 02934 rpninteger* res = new rpninteger(); 02935 res->num = 0; 02936 02937 if( ds[0]->isstring() ) 02938 res->num = 1; 02939 02940 ds.push_front(res); 02941 02942 dec(); 02943 }
| string const isrpnstring::name | ( | ) | const [inline, virtual] |
1.5.8