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
26
ObjCPtr
;
27
28
class
ObjectiveCAssociated
{
29
public
:
30
ObjCPtr
_objectiveCObject
;
31
public
:
32
ObjectiveCAssociated
():
_objectiveCObject
(nullptr) {}
33
#ifdef __OBJC__
34
void
setObjectiveCObject(
id
obj) {
_objectiveCObject
= obj; }
35
template
<
class
T>
inline
T* objectiveCObject() {
return
(T*)
_objectiveCObject
; }
36
#endif
37
};
ObjCPtr
void * ObjCPtr
Definition:
ObjectiveCAssociated.h:26
ObjectiveCAssociated
Definition:
ObjectiveCAssociated.h:28
ObjectiveCAssociated::_objectiveCObject
ObjCPtr _objectiveCObject
Definition:
ObjectiveCAssociated.h:30
ObjectiveCAssociated::ObjectiveCAssociated
ObjectiveCAssociated()
Definition:
ObjectiveCAssociated.h:32
openclonk
src
platform
ObjectiveCAssociated.h
Generated on Fri May 16 2025 04:33:19 for OpenClonk by
1.9.1