void WQLCompile::print(std::ostream& ostr) { for (UInt32 i=0, n=eval_heap.size();i < n;i++) { WQLOperation wop = eval_heap[i].op; if (wop == WQL_DO_NOTHING) { continue; } ostr << "Eval element " << i << ": "; if (eval_heap[i].is_terminal1 == TERMINAL_HEAP) { ostr << "T("; } else if (eval_heap[i].is_terminal1 == EVAL_HEAP) { ostr << "E("; } else { ostr << "O("; } ostr << eval_heap[i].opn1 << ") "; ostr << WQLOperationToString(eval_heap[i].op); if (eval_heap[i].is_terminal2 == TERMINAL_HEAP) { ostr << " T("; } else if (eval_heap[i].is_terminal2 == EVAL_HEAP) { ostr << "E("; } else { ostr << "O("; } ostr << eval_heap[i].opn2 << ")" << std::endl; } for (UInt32 i=0, n=terminal_heap.size();i < n;i++) { ostr << "Terminal expression " << i << ": "; ostr << terminal_heap[i].opn1.toString() << " "; ostr << WQLOperationToString(terminal_heap[i].op) << " " << terminal_heap[i].opn2.toString() << std::endl; } }
void WQLCompile::printTableau(std::ostream& ostr) { for (UInt32 i=0, n = _tableau.size(); i < n; i++) { ostr << "Tableau " << i << std::endl; TableauRow tr = _tableau[i]; for (UInt32 j=0, m = tr.size(); j < m; j++) { ostr << tr[j].opn1.toString() << " "; ostr << WQLOperationToString(tr[j].op) << " " << tr[j].opn2.toString() << std::endl; } } }
void WQLSelectStatementRep::print() const { // // Print the header: // cout << "WQLSelectStatement" << endl; cout << "{" << endl; // // Print the class name: // cout << " _className: \"" << _className.getString() << '"' << endl; // // Print the select properties: // if (_allProperties) { cout << endl; cout << " _allProperties: TRUE" << endl; } else for (Uint32 i = 0; i < _selectPropertyNames.size(); i++) { if (i == 0) cout << endl; cout << " _selectPropertyNames[" << i << "]: "; cout << '"' << _selectPropertyNames[i].getString() << '"' << endl; } // // Print the operations: // for (Uint32 i = 0; i < _operations.size(); i++) { if (i == 0) cout << endl; cout << " _operations[" << i << "]: "; cout << '"' << WQLOperationToString(_operations[i]) << '"' << endl; } // // Print the operands: // for (Uint32 i = 0; i < _operands.size(); i++) { if (i == 0) cout << endl; cout << " _operands[" << i << "]: "; cout << '"' << _operands[i].toString() << '"' << endl; } // // Print the trailer: // cout << "}" << endl; }