Add remaining files
[juce-lv2.git] / juce / source / src / native / mac / juce_mac_ObjCSuffix.h
blob4ca70e22e6f258f9e7593b0001bea61d831c52c9
1 /*
2 ==============================================================================
4 This file is part of the JUCE library - "Jules' Utility Class Extensions"
5 Copyright 2004-11 by Raw Material Software Ltd.
7 ------------------------------------------------------------------------------
9 JUCE can be redistributed and/or modified under the terms of the GNU General
10 Public License (Version 2), as published by the Free Software Foundation.
11 A copy of the license is included in the JUCE distribution, or can be found
12 online at www.gnu.org/licenses.
14 JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
15 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
16 A PARTICULAR PURPOSE. See the GNU General Public License for more details.
18 ------------------------------------------------------------------------------
20 To release a closed-source product which uses JUCE, commercial licenses are
21 available: visit www.rawmaterialsoftware.com/juce for more information.
23 ==============================================================================
26 /** This suffix is used for naming all Obj-C classes that are used inside juce.
28 Because of the flat naming structure used by Obj-C, you can get horrible situations where
29 two DLLs are loaded into a host, each of which uses classes with the same names, and these get
30 cross-linked so that when you make a call to a class that you thought was private, it ends up
31 actually calling into a similarly named class in the other module's address space.
33 By changing this macro to a unique value, you ensure that all the obj-C classes in your app
34 have unique names, and should avoid this problem.
36 If you're using the amalgamated version, you can just set this macro to something unique before
37 you include juce_amalgamated.cpp.
39 #ifndef JUCE_ObjCExtraSuffix
40 #define JUCE_ObjCExtraSuffix 3
41 #endif
43 #ifndef DOXYGEN
44 #define appendMacro1(a, b, c, d, e) a ## _ ## b ## _ ## c ## _ ## d ## _ ## e
45 #define appendMacro2(a, b, c, d, e) appendMacro1(a, b, c, d, e)
46 #define MakeObjCClassName(rootName) appendMacro2 (rootName, JUCE_MAJOR_VERSION, JUCE_MINOR_VERSION, JUCE_BUILDNUMBER, JUCE_ObjCExtraSuffix)
47 #endif