Пример #1
0
IndexFile::IndexFile(LogFile &logFile)
{
    std::string indexFileName(logFile.getFileBaseName() + ".id2");
    if(!loadIndexFile(indexFileName))
    {
        if(!createIndexFile(indexFileName, logFile))
        {
            throw std::runtime_error("Error building Index");
        }
        if(!loadIndexFile(indexFileName))
            throw std::runtime_error("Internal Error, created index is corrupted");
    }
}
Пример #2
0
	bool CVertexDiffuseLoader::Load( const string& path )
	{
		assert(NULL != m_pProgress);

		m_pProgress->SetProgress(0);

		loadIndexFile( path + "/index.didx" );
		
		TileModelDiffuseMap& modDifMap = CVertexDiffuseColor::GetInst()->GetAllObjectColor();
		IndexList::iterator it  = m_index.begin();
		IndexList::iterator eit = m_index.end();
		for ( ; it != eit; ++it )
		{
			stringstream ss;
			TileIndex ti = *it;
			ss << ti.first << "_" << ti.second << ".diffuse";
			string szLoadName = ss.str();

			m_stream->SetPath(szLoadName);
			if ( !m_reader->Open() )
				return false;

			GridModelDiffuseMap& gmdm = modDifMap[ti];
			loadTileModelDiffuse(gmdm);

			m_reader->Close();
		}
		
		return true;
	}
bool HelpDialogBase::qt_invoke( int _id, QUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: languageChange(); break;
    case 1: init(); break;
    case 2: destroy(); break;
    case 3: addBookmark(); break;
    case 4: currentBookmarkChanged((QListViewItem*)static_QUType_ptr.get(_o+1)); break;
    case 5: currentIndexChanged((QListBoxItem*)static_QUType_ptr.get(_o+1)); break;
    case 6: currentTabChanged((const QString&)static_QUType_QString.get(_o+1)); break;
    case 7: loadIndexFile(); break;
    case 8: currentContentsChanged((QListViewItem*)static_QUType_ptr.get(_o+1)); break;
    case 9: removeBookmark(); break;
    case 10: searchInIndex((const QString&)static_QUType_QString.get(_o+1)); break;
    case 11: showTopic(); break;
    case 12: showTopic((int)static_QUType_int.get(_o+1),(QListBoxItem*)static_QUType_ptr.get(_o+2),(const QPoint&)*((const QPoint*)static_QUType_ptr.get(_o+3))); break;
    case 13: showSearchHelp(); break;
    case 14: startSearch(); break;
    case 15: showResultPage((QListBoxItem*)static_QUType_ptr.get(_o+1)); break;
    case 16: showResultPage((int)static_QUType_int.get(_o+1),(QListBoxItem*)static_QUType_ptr.get(_o+2),(const QPoint&)*((const QPoint*)static_QUType_ptr.get(_o+3))); break;
    case 17: showResultPage((int)static_QUType_int.get(_o+1),(QListViewItem*)static_QUType_ptr.get(_o+2),(const QPoint&)*((const QPoint*)static_QUType_ptr.get(_o+3))); break;
    default:
	return QWidget::qt_invoke( _id, _o );
    }
    return TRUE;
}
bool HelpDialog::qt_invoke( int _id, QUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: showTopic((int)static_QUType_int.get(_o+1),(QListBoxItem*)static_QUType_ptr.get(_o+2),(const QPoint&)*((const QPoint*)static_QUType_ptr.get(_o+3))); break;
    case 1: showTopic((int)static_QUType_int.get(_o+1),(QListViewItem*)static_QUType_ptr.get(_o+2),(const QPoint&)*((const QPoint*)static_QUType_ptr.get(_o+3))); break;
    case 2: showTopic((QListViewItem*)static_QUType_ptr.get(_o+1)); break;
    case 3: loadIndexFile(); break;
    case 4: insertContents(); break;
    case 5: setupFullTextIndex(); break;
    case 6: currentTabChanged((const QString&)static_QUType_QString.get(_o+1)); break;
    case 7: currentIndexChanged((QListBoxItem*)static_QUType_ptr.get(_o+1)); break;
    case 8: showTopic(); break;
    case 9: searchInIndex((const QString&)static_QUType_QString.get(_o+1)); break;
    case 10: addBookmark(); break;
    case 11: removeBookmark(); break;
    case 12: currentBookmarkChanged((QListViewItem*)static_QUType_ptr.get(_o+1)); break;
    case 13: currentContentsChanged((QListViewItem*)static_QUType_ptr.get(_o+1)); break;
    case 14: startSearch(); break;
    case 15: showSearchHelp(); break;
    case 16: initialize(); break;
    case 17: toggleContents(); break;
    case 18: toggleIndex(); break;
    case 19: toggleBookmarks(); break;
    case 20: toggleSearch(); break;
    case 21: lastWinClosed(); break;
    case 22: showResultPage((int)static_QUType_int.get(_o+1),(QListBoxItem*)static_QUType_ptr.get(_o+2),(const QPoint&)*((const QPoint*)static_QUType_ptr.get(_o+3))); break;
    case 23: showResultPage((QListBoxItem*)static_QUType_ptr.get(_o+1)); break;
    case 24: setIndexingProgress((int)static_QUType_int.get(_o+1)); break;
    case 25: showItemMenu((QListBoxItem*)static_QUType_ptr.get(_o+1),(const QPoint&)*((const QPoint*)static_QUType_ptr.get(_o+2))); break;
    case 26: showItemMenu((QListViewItem*)static_QUType_ptr.get(_o+1),(const QPoint&)*((const QPoint*)static_QUType_ptr.get(_o+2))); break;
    case 27: insertBookmarks(); break;
    case 28: processEvents(); break;
    default:
	return HelpDialogBase::qt_invoke( _id, _o );
    }
    return TRUE;
}
Пример #5
0
IndexFile::IndexFile(std::string indexFileName)
{
    if(!loadIndexFile(indexFileName))
        throw std::runtime_error("Error, index is corrupted");
    
}