Beispiel #1
0
wxMemoryFSHandlerBase::~wxMemoryFSHandlerBase()
{
    // as only one copy of FS handler is supposed to exist, we may silently
    // delete static data here. (There is no way how to remove FS handler from
    // wxFileSystem other than releasing _all_ handlers.)
    WX_CLEAR_HASH_MAP(wxMemoryFSHash, m_Hash);
}
Beispiel #2
0
wxColourDatabase::~wxColourDatabase ()
{
    if ( m_map )
    {
        WX_CLEAR_HASH_MAP(wxStringToColourHashMap, *m_map);

        delete m_map;
    }
}
Beispiel #3
0
wxColourDatabase::~wxColourDatabase ()
{
    if ( m_map )
    {
        WX_CLEAR_HASH_MAP(wxStringToColourHashMap, *m_map);

        delete m_map;
    }

#ifdef __WXPM__
    delete [] m_palTable;
#endif
}
Beispiel #4
0
wxArchiveFSCacheDataImpl::~wxArchiveFSCacheDataImpl()
{
    WX_CLEAR_HASH_MAP(wxArchiveFSEntryHash, m_hash);

    wxArchiveFSEntry *entry = m_begin;

    while (entry)
    {
        wxArchiveFSEntry *next = entry->next;
        delete entry;
        entry = next;
    }

    CloseStreams();
}
void CMusikLibrary::GetFilelistSongs( const wxArrayString & aFiles, MusikSongIdArray & aReturn )
{
	aReturn.Clear();
	if(aFiles.GetCount() == 0)
        return;
	wxString sQuery = wxT("select songs.songid,songs.filename from songs where ");

	sQuery.Alloc(sQuery.Len() + aFiles.GetCount() * 30); // optimization ( the 30 is a wild guess)
    _Add_IN_ClauseForColumn(sQuery,g_PlaylistColumn[PlaylistColumn::FILENAME],aFiles);
    sQuery << wxT(";");

	myStringToMusikSongIdPtrMap theMap;
	//---------------------------------------------------------------------//
	//--- we fill the map and afterwards a array from the map because	---//
	//--- we can have multiple filenames in the same list				---//
	//---------------------------------------------------------------------//
    MusikDb::ResultCB cb(&theMap, &db_callbackAddToSongIdMap);
    m_pDB->Exec( ConvQueryToMB( sQuery ),cb);

	aReturn.Alloc( aFiles.GetCount() );
	for ( size_t i = 0; i < aFiles.GetCount(); i++ )
	{
		MusikSongId * pSongid = theMap[ aFiles.Item( i ) ];
	//	wxASSERT_MSG( pSong, wxString(aFiles.Item( i ) + wxT( " is not on the map!" ) ) );

		//---------------------------------------------------------------------//
		//--- add the object(of the map) by value, to create duplicate		---// 
		//--- entries if needed.											---//
		//---------------------------------------------------------------------//
		if( pSongid )
			aReturn.Add( *pSongid ); 
	}

	//-------------------------------------------------------------------------//
	//--- delete all map objects( this is done explicitly, because the map	---//
	//--- contains pointers to objects)										---//
	//-------------------------------------------------------------------------//
	WX_CLEAR_HASH_MAP(myStringToMusikSongIdPtrMap, theMap); 

	return;
}
Beispiel #6
0
void wxPrintPaperDatabase::ClearDatabase()
{
    delete m_list;
    WX_CLEAR_HASH_MAP(wxStringToPrintPaperTypeHashMap, *m_map);
    delete m_map;
}
Beispiel #7
0
void wxPanelTabView::ClearWindows(bool deleteWindows)
{
  if (deleteWindows)
    WX_CLEAR_HASH_MAP(wxIntToWindowHashMap, m_tabWindows);
  m_tabWindows.clear();
}
	unElements::~unElements()
	{
		WX_CLEAR_HASH_MAP(unElementMap, ElementsByType);
	}
Beispiel #9
0

//-----------------------------------------------------------------------------
// wxFileSystem
//-----------------------------------------------------------------------------

IMPLEMENT_DYNAMIC_CLASS(wxFileSystem, wxObject)
IMPLEMENT_ABSTRACT_CLASS(wxFSFile, wxObject)


wxList wxFileSystem::m_Handlers;


wxFileSystem::~wxFileSystem()
{
    WX_CLEAR_HASH_MAP(wxFSHandlerHash, m_LocalHandlers)
}


static wxString MakeCorrectPath(const wxString& path)
{
    wxString p(path);
    wxString r;
    int i, j, cnt;

    cnt = p.length();
    for (i = 0; i < cnt; i++)
      if (p.GetChar(i) == wxT('\\')) p.GetWritableChar(i) = wxT('/'); // Want to be windows-safe

    if (p.Left(2) == wxT("./")) { p = p.Mid(2); cnt -= 2; }
Beispiel #10
0
/**
 * 全て削除
 */
void DicBooks::DeleteAll()
{
    WX_CLEAR_HASH_MAP(DicBooks, *this);
}
Beispiel #11
0
/**
 * 全て削除
 */
void DicBitmaps::DeleteAll()
{
    WX_CLEAR_HASH_MAP(DicBitmaps, *this);
}