Pajdeg  0.2.2
Pajdeg
PDType.h
Go to the documentation of this file.
1 //
2 // PDType.h
3 //
4 // Copyright (c) 2012 - 2015 Karl-Johan Alm (http://github.com/kallewoof)
5 //
6 // Permission is hereby granted, free of charge, to any person obtaining a copy
7 // of this software and associated documentation files (the "Software"), to deal
8 // in the Software without restriction, including without limitation the rights
9 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 // copies of the Software, and to permit persons to whom the Software is
11 // furnished to do so, subject to the following conditions:
12 //
13 // The above copyright notice and this permission notice shall be included in
14 // all copies or substantial portions of the Software.
15 //
16 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 // THE SOFTWARE.
23 //
24 
71 #ifndef ICViewer_PDType_h
72 #define ICViewer_PDType_h
73 
74 #include "PDDefines.h"
75 
83 #ifdef DEBUG_PD_RELEASES
84 #define PDRelease(ob) _PDReleaseDebug(__FILE__,__LINE__,ob)
85 extern void _PDReleaseDebug(const char *file, int lineNumber, void *pajdegObject);
86 extern void PDReleaseFunc(void *pajdegObject);
87 #else
88 extern void PDRelease(void *pajdegObject);
89 #define PDReleaseFunc PDRelease
90 #endif
91 
97 #ifdef DEBUG_PD_RELEASES
98 #define PDRetain(ob) _PDRetainDebug(__FILE__,__LINE__,ob)
99 extern void *_PDRetainDebug(const char *file, int lineNumber, void *pajdegObject);
100 #else
101 extern void *PDRetain(void *pajdegObject);
102 #endif
103 
113 #ifdef DEBUG_PD_RELEASES
114 #define PDAutorelease(ob) _PDAutoreleaseDebug(__FILE__,__LINE__,ob)
115 extern void *_PDAutoreleaseDebug(const char *file, int lineNumber, void *pajdegObject);
116 #else
117 extern void *PDAutorelease(void *pajdegObject);
118 #endif
119 
127 extern PDInstanceType PDResolve(void *pajdegObject);
128 
138 extern const char *PDDescription(void *pajdegObject);
139 
140 #if defined(DEBUG_PD_LEAKS)
141 extern void PDDebugBeginSession();
142 extern PDInteger PDDebugEndSession();
143 extern void PDFlagGlobalObject(void *ob);
144 #else
145 # define PDDebugBeginSession()
146 # define PDDebugEndSession() 0
147 # define PDFlagGlobalObject(ob)
148 #endif
149 
150 #endif
151 
void * PDRetain(void *pajdegObject)
Definition: PDType.c:365
long PDInteger
Definition: PDDefines.h:184
void PDRelease(void *pajdegObject)
Definition: PDType.c:335
void * PDAutorelease(void *pajdegObject)
Definition: PDType.c:388
PDInstanceType
Definition: PDDefines.h:557
const char * PDDescription(void *pajdegObject)
Definition: PDType.c:436
Definitions for the Pajdeg interface.
PDInstanceType PDResolve(void *pajdegObject)
Definition: PDType.c:403