void cbPutLine(DcmStack& stk) { DcmString *dcmStr = static_cast<DcmString*>( safePeekMain(stk, {DcmString::typeVal()})); stk.pop(); dcmout << *dcmStr << endl; del(dcmStr); }
void cbDef(DcmStack& stk) { DcmExec *exec = static_cast<DcmExec*>(safePeekMain(stk, {DcmExec::typeVal()})); stk.pop(); stk.push(new DcmPrimFun(new ExecCallback(exec))); // We took it off the stack del(exec); }
void cbPStk(DcmStack& stk) { stack<DcmType*> items; while (!stk.empty()) { items.push(stk.top()); stk.pop(); } while (!items.empty()) { dcmout << items.top()->repr() << ' '; stk.push(items.top()); items.pop(); } dcmout << endl; }
void cbCopy(DcmStack& stk) { DcmType *dcm = safePeekMain(stk); stk.pop(); stk.push(dcm->copy()); del(dcm); }
void cbClear(DcmStack& stk) { while (!stk.empty()) { del(stk.top()); stk.pop(); } }
void cbDel(DcmStack& stk) { del(safePeekMain(stk)); stk.pop(); }
void cbRepr(DcmStack& stk) { DcmType *dcm = safePeekMain(stk); stk.pop(); stk.push(new DcmString(dcm->repr())); del(dcm); }
void cbPrint(DcmStack& stk) { DcmType *dcm = safePeekMain(stk); stk.pop(); dcmout << dcm->repr() << endl; del(dcm); }