OpenClonk
ObjectiveCAssociated.h
Go to the documentation of this file.
1 /*
2  * OpenClonk, http://www.openclonk.org
3  *
4  * Copyright (c) 2010-2016, The OpenClonk Team and contributors
5  *
6  * Distributed under the terms of the ISC license; see accompanying file
7  * "COPYING" for details.
8  *
9  * "Clonk" is a registered trademark of Matthes Bender, used with permission.
10  * See accompanying file "TRADEMARK" for details.
11  *
12  * To redistribute this file separately, substitute the full license texts
13  * for the above references.
14  */
15 
16 #ifdef __OBJC__
17 #import <Cocoa/Cocoa.h>
18 #endif
19 
20 typedef
21 #ifdef __OBJC__
22  id
23 #else
24  void*
25 #endif
27 
29 public:
31 public:
33 #ifdef __OBJC__
34  void setObjectiveCObject(id obj) { _objectiveCObject = obj; }
35  template<class T> inline T* objectiveCObject() { return (T*)_objectiveCObject; }
36 #endif
37 };
void * ObjCPtr