/[pcsx2_0.9.7]/trunk/common/include/Utilities/wxBaseTools.h
ViewVC logotype

Contents of /trunk/common/include/Utilities/wxBaseTools.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 31 - (show annotations) (download)
Tue Sep 7 03:24:11 2010 UTC (9 years, 10 months ago) by william
File MIME type: text/plain
File size: 2304 byte(s)
committing r3113 initial commit again...
1 /* PCSX2 - PS2 Emulator for PCs
2 * Copyright (C) 2002-2010 PCSX2 Dev Team
3 *
4 * PCSX2 is free software: you can redistribute it and/or modify it under the terms
5 * of the GNU Lesser General Public License as published by the Free Software Found-
6 * ation, either version 3 of the License, or (at your option) any later version.
7 *
8 * PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
9 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
10 * PURPOSE. See the GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License along with PCSX2.
13 * If not, see <http://www.gnu.org/licenses/>.
14 */
15
16 #pragma once
17
18 #include "Dependencies.h"
19
20 // --------------------------------------------------------------------------------------
21 // wxBaseTools.h
22 //
23 // This file is meant to contain utility classes for users of the wxWidgets library.
24 // All classes in this file are strictly dependent on wxBase libraries only, meaning
25 // you don't need to include or link against wxCore (GUI) to build them. For tools
26 // which require wxCore, see wxGuiTools.h
27 // --------------------------------------------------------------------------------------
28
29 extern void pxExplore( const wxString& path );
30 extern void pxExplore( const char *path );
31
32 extern void pxLaunch( const wxString& path );
33 extern void pxLaunch( const char *path );
34
35 // --------------------------------------------------------------------------------------
36 // wxDoNotLogInThisScope
37 // --------------------------------------------------------------------------------------
38 // This class is used to disable wx's sometimes inappropriate amount of forced error logging
39 // during specific activities. For example, when using wxDynamicLibrary to detect the
40 // validity of DLLs, wx will log errors for missing symbols. (sigh)
41 //
42 // Usage: Basic auto-cleanup destructor class. Create an instance inside a scope, and
43 // logging will be re-enabled when scope is terminated. :)
44 //
45 class wxDoNotLogInThisScope
46 {
47 DeclareNoncopyableObject(wxDoNotLogInThisScope);
48
49 protected:
50 bool m_prev;
51
52 public:
53 wxDoNotLogInThisScope() :
54 m_prev( wxLog::EnableLogging( false ) )
55 {
56 }
57
58 ~wxDoNotLogInThisScope()
59 {
60 wxLog::EnableLogging( m_prev );
61 }
62 };

  ViewVC Help
Powered by ViewVC 1.1.22