1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/cocoa/ObjcPose.h
3 // Purpose: Macros for initializing poseAs, among other things
4 // Author: David Elliott
8 // Copyright: (c) 2002 David Elliott <dfe@cox.net>
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef __WX_COCOA_PRIVATE_POSER_H__
13 #define __WX_COCOA_PRIVATE_POSER_H__
15 /*-------------------------------------------------------------------------
16 Objective-C Poser class initialization
17 -------------------------------------------------------------------------*/
19 #import <objc/objc-class.h>
20 #import <Foundation/NSObjCRuntime.h>
22 class wxPoseAsInitializer
30 virtual ~wxPoseAsInitializer()
34 static void InitializePosers()
42 wxPoseAsInitializer
*m_next
;
43 static wxPoseAsInitializer
*sm_first
;
46 class wxDummyForPoseAsInitializer
49 wxDummyForPoseAsInitializer(void*) {}
52 #define WX_IMPLEMENT_POSER(poser) \
53 class wxPoseAsInitializerFor##poser: public wxPoseAsInitializer \
56 virtual ~wxPoseAsInitializerFor##poser() \
58 class_poseAs([poser class],[poser superclass]); \
61 wxDummyForPoseAsInitializer wxDummyPoseAsInitializerFor##poser(new wxPoseAsInitializerFor##poser)
64 #warning "Objective-C++ Only!"
67 #endif // __WX_COCOA_PRIVATE_POSER_H__