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