Example #1
0
 unsigned int OnEnd(const char *tag)
 {
     CheckContent();
     TRACE << "OnEnd(" << tag << ")\n";
     assert(m_events[m_count].event == 'e');
     assert(!strcmp(tag, m_events[m_count].arg1));
     ++m_count;
     return 0;
 }
Example #2
0
void CApplicationImpl::OpenDataFile(const CString& csFileName)
{ 
	if (!IsDataFileOpened(csFileName))
	{
		Database::IDataFile* pTempDataFile = GetDatabase()->OpenDataFile(csFileName);
		try
		{
			if (pTempDataFile->IsEmpty())
			{
				CreateDefaultContent(pTempDataFile);
			}
			else
			{
				CheckContent(pTempDataFile);
			}

			CheckModules(pTempDataFile);

			if (!m_spDataFile.is_null())
			{
				GetDatabase()->CloseDataFile(m_spDataFile.get());
			}
			m_spDataFile = pTempDataFile;

			m_mru.AddToList(m_spDataFile->GetFileName());
			m_mru.WriteToRegistry(GetOptionsPath(_T("Application")));

			UpdateViews(UNM_FILE_OPENED, (WPARAM)m_spDataFile->GetFileName());
		}
		catch(...)
		{
			// close new opened temp data file and throw exception up
			GetDatabase()->CloseDataFile(pTempDataFile);
			throw;
		}
	}
}
Example #3
0
    ~SaxTestObserver()
    {
        CheckContent();
        assert(m_events[m_count].event == 'f');
//	TRACE << "--\n";
    }