Example #1
0
File: io.cpp Project: xorgy/dcm
void cbPutLine(DcmStack& stk) {
    DcmString *dcmStr = static_cast<DcmString*>(
      safePeekMain(stk, {DcmString::typeVal()}));
    stk.pop();
    dcmout << *dcmStr << endl;
    del(dcmStr);
}
Example #2
0
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);
}
Example #3
0
File: io.cpp Project: xorgy/dcm
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;
}
Example #4
0
void cbCopy(DcmStack& stk) {
    DcmType *dcm = safePeekMain(stk);
    stk.pop();
    stk.push(dcm->copy());
    del(dcm);
}
Example #5
0
void cbClear(DcmStack& stk) {
    while (!stk.empty()) {
        del(stk.top());
        stk.pop();
    }
}
Example #6
0
void cbDel(DcmStack& stk) {
    del(safePeekMain(stk));
    stk.pop();
}
Example #7
0
void cbRepr(DcmStack& stk) {
    DcmType *dcm = safePeekMain(stk);
    stk.pop();
    stk.push(new DcmString(dcm->repr()));
    del(dcm);
}
Example #8
0
File: io.cpp Project: xorgy/dcm
void cbPrint(DcmStack& stk) {
    DcmType *dcm = safePeekMain(stk);
    stk.pop();
    dcmout << dcm->repr() << endl;
    del(dcm);
}