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

Annotation of /trunk/common/include/Utilities/Dependencies.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 31 - (hide annotations) (download)
Tue Sep 7 03:24:11 2010 UTC (9 years, 11 months ago) by william
File MIME type: text/plain
File size: 3064 byte(s)
committing r3113 initial commit again...
1 william 31 /* 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     // Dependencies.h : Contains classes required by all Utilities headers.
19    
20     // This should prove useful....
21     #define wxsFormat wxString::Format
22    
23     // --------------------------------------------------------------------------------------
24     // DeclareNoncopyableObject
25     // --------------------------------------------------------------------------------------
26     // This macro provides an easy and clean method for ensuring objects are not copyable.
27     // Simply add the macro to the head or tail of your class declaration, and attempts to
28     // copy the class will give you a moderately obtuse compiler error that will have you
29     // scratching your head for 20 mintes.
30     //
31     // (... but that's probably better than having a weird invalid object copy having you
32     // scratch your head for a day).
33     //
34     // Programmer's notes:
35     // * We intentionally do NOT provide implementations for these methods, which should
36     // never be referenced anyway.
37    
38     // * I've opted for macro form over multi-inherited class form (Boost style), because
39     // the errors generated by the macro are considerably less voodoo. The Boost-style
40     // The macro reports the exact class that causes the copy failure, while Boost's class
41     // approach just reports an error in whatever "NoncopyableObject" is inherited.
42     //
43     // * This macro is the same as wxWidgets' DECLARE_NO_COPY_CLASS macro. This one is free
44     // of wx dependencies though, and has a nicer typeset. :)
45     //
46     #ifndef DeclareNoncopyableObject
47     # define DeclareNoncopyableObject(classname) \
48     private: \
49     explicit classname(const classname&); \
50     classname& operator=(const classname&)
51     #endif
52    
53     //////////////////////////////////////////////////////////////////////////////////////////
54     // macro provided for tagging translation strings, without actually running them through the
55     // translator (which the _() does automatically, and sometimes we don't want that). This is
56     // a shorthand replacement for wxTRANSLATE.
57     //
58     #define wxLt(a) (a)
59    
60     #include <wx/string.h>
61     #include <wx/gdicmn.h> // for wxPoint/wxRect stuff
62     #include <wx/intl.h>
63     #include <wx/log.h>
64    
65     #include "Pcsx2Defs.h"
66    
67     #include <stdexcept>
68     #include <algorithm>
69     #include <string>
70     #include <cstring> // string.h under c++
71     #include <cstdio> // stdio.h under c++
72     #include <cstdlib>
73     #include <vector>
74     #include <list>
75    
76     #include "Utilities/Assertions.h"

  ViewVC Help
Powered by ViewVC 1.1.22