void CResultsDataManager::load(const String &filepath) { INFO(getPrintInfo(), "CResultsDataManager::load(\"" << filepath << "\")"); path p(filepath); if (CDataManager::checkPathOk(p) == 1) { if (getDataHandler()->getSelection()) getDataHandler()->getSelection()->loadResults(filepath.c_str()); else getDataHandler()->getResults(true)->load(filepath); } else throw CException("CResultsDataManager::load", filepath + " is not a regular file"); }
void CResultsDataManager::dumpTestcases(const String &filepath) { INFO(getPrintInfo(), "CResultsDataManager::dumpTestcases(\"" << filepath << "\")"); if (getDataHandler()->getResults() || getDataHandler()->getSelection()) { ofstream O((filepath + ".csv").c_str()); const IIDManager& idm = (getDataHandler()->getSelection() ? getDataHandler()->getSelection()->getResults() : getDataHandler()->getResults())->getTestcases(); for (IndexType idx = 0; idx < idm.size(); ++idx) { O << idx << ':' << idm[idx] << std::endl; } O.close(); } else WARN("There is no results data to be dumped."); }
void CResultsDataManager::dumpRevisions(const String& filepath) { INFO(getPrintInfo(), "CResultsDataManager::dumpRevisions(\"" << filepath << "\")"); if (getDataHandler()->getResults() || getDataHandler()->getSelection()) { ofstream O((filepath + ".csv").c_str()); IntVector revList = (getDataHandler()->getSelection() ? getDataHandler()->getSelection()->getResults() : getDataHandler()->getResults())->getRevisionNumbers(); for (IndexType idx = 0; idx < revList.size(); ++idx) { O << idx << ':' << revList[idx] << std::endl; } O.close(); } else { WARN("There is no results data to be dumped."); } }
/////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// // // // Create a data handler and connect it to the buffer // // /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// ptr<handlers::dataHandler> buffer::getDataHandler(bool bWrite, imbxUint32 size) { PUNTOEXE_FUNCTION_START(L"buffer::getDataHandler"); return getDataHandler(bWrite, false, size); PUNTOEXE_FUNCTION_END(); }
/////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// // // // Create a raw data handler and connect it to the buffer // // /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// ptr<handlers::dataHandlerRaw> buffer::getDataHandlerRaw(bool bWrite, imbxUint32 size) { PUNTOEXE_FUNCTION_START(L"buffer::getDataHandlerRaw"); ptr<handlers::dataHandler> returnValue = getDataHandler(bWrite, true, size); return ptr<handlers::dataHandlerRaw>((handlers::dataHandlerRaw*)returnValue.get()); PUNTOEXE_FUNCTION_END(); }
void CResultsDataManager::dumpPassFail(const String& filepath, bool psize, char csep, char rsep) { INFO(getPrintInfo(), "CResultsDataManager::dumpPassFail(\"" << filepath << "\")"); if (getDataHandler()->getResults() || getDataHandler()->getSelection()) { ofstream O((filepath + ".csv").c_str()); const IBitMatrix& m = (getDataHandler()->getSelection() ? getDataHandler()->getSelection()->getResults() : getDataHandler()->getResults())->getPassedBitMatrix(); if (psize) { O << m.getNumOfRows() << csep << m.getNumOfCols() << rsep; } for (IndexType rev = 0; rev < m.getNumOfRows(); ++rev) { O << m[rev][0]; for(IndexType tcidx = 1; tcidx < m.getNumOfCols(); ++tcidx) { O << csep << (m[rev][tcidx] ? '1' : '0'); } O << rsep; } O.close(); } else WARN("There is no results data to be dumped."); }