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