void Transaction::printStructure(size_t nindent) const { static const char* const stateNames[kNumStates] = { "Collecting", "kCompleted", "RolledBack", "RolledBackWithErrors", "Committed" }; assert((sizeof(stateNames) / sizeof(void*)) == kNumStates && "Missing a state to print."); std::string indent(nindent, ' '); llvm::errs() << indent << "Transaction @" << this << ": \n"; for (const_nested_iterator I = nested_begin(), E = nested_end(); I != E; ++I) { (*I)->printStructure(nindent + 3); } llvm::errs() << indent << " state: " << stateNames[getState()] << " decl groups, "; if (hasNestedTransactions()) llvm::errs() << m_NestedTransactions->size(); else llvm::errs() << "0"; llvm::errs() << " nested transactions\n" << indent << " wrapper: " << m_WrapperFD << ", parent: " << m_Parent << ", next: " << m_Next << "\n"; }
void Transaction::printStructureBrief(size_t nindent /*=0*/) const { std::string indent(nindent, ' '); llvm::errs() << indent << "<cling::Transaction* " << this << " isEmpty=" << empty(); llvm::errs() << " isCommitted=" << (getState() == kCommitted); llvm::errs() <<"> \n"; for (const_nested_iterator I = nested_begin(), E = nested_end(); I != E; ++I) { llvm::errs() << indent << "`"; (*I)->printStructureBrief(nindent + 3); } }
void Transaction::printStructure(size_t nindent) const { static const char* const stateNames[] = { "Collecting", "RolledBack", "RolledBackWithErrors", "Committing", "Committed" }; std::string indent(nindent, ' '); llvm::errs() << indent << "Transaction @" << this << ": \n"; for (const_nested_iterator I = nested_begin(), E = nested_end(); I != E; ++I) { (*I)->printStructure(nindent + 1); } llvm::errs() << indent << " state: " << stateNames[getState()] << ", " << size() << " decl groups, " << m_NestedTransactions->size() << " nested transactions\n" << indent << " wrapper: " << m_WrapperFD << ", parent: " << m_Parent << ", next: " << m_Next << "\n"; }