compiler/libec: Fixed warnings in generated code for incompatible pointer types
[sdk] / compiler / bootstrap / ecere / bootstrap / instance.c
1 /* Code generated from eC source file: instance.ec */
2 #if defined(_WIN32)
3 #define __runtimePlatform 1
4 #elif defined(__APPLE__)
5 #define __runtimePlatform 3
6 #else
7 #define __runtimePlatform 2
8 #endif
9 #if defined(__GNUC__)
10 typedef long long int64;
11 typedef unsigned long long uint64;
12 #ifdef _WIN32
13 #define stdcall __attribute__((__stdcall__))
14 #else
15 #define stdcall
16 #define __declspec(x)
17 #endif
18 #elif defined(__TINYC__)
19 #include <stdarg.h>
20 #define __builtin_va_list va_list
21 #define __builtin_va_start va_start
22 #define __builtin_va_end va_end
23 #ifdef _WIN32
24 #define strcasecmp stricmp
25 #define strncasecmp strnicmp
26 #define __declspec(x) __attribute__((x))
27 #define stdcall __attribute__((__stdcall__))
28 #else
29 #define __declspec(x)
30 #define stdcall
31 #endif
32 typedef long long int64;
33 typedef unsigned long long uint64;
34 #else
35 typedef __int64 int64;
36 typedef unsigned __int64 uint64;
37 #endif
38 #ifdef __BIG_ENDIAN__
39 #define __ENDIAN_PAD(x) (8 - (x))
40 #else
41 #define __ENDIAN_PAD(x) 0
42 #endif
43 #include <stdint.h>
44 #include <sys/types.h>
45
46 #if /*defined(_W64) || */(defined(__WORDSIZE) && __WORDSIZE == 8) || defined(__x86_64__)
47 #define _64BIT 1
48 #else
49 #define _64BIT 0
50 #endif
51
52 #define arch_PointerSize                  sizeof(void *)
53 #define structSize_Instance               (_64BIT ? 24 : 12)
54 #define structSize_Module                 (_64BIT ? 560 : 300)
55 #define structSize_BinaryTree             (_64BIT ? 32 : 16)
56 #define structSize_OldList                (_64BIT ? 32 : 20)
57 #define structSize_NamedLink64            (_64BIT ? 32 : 24)
58 #define structSize_ClassTemplateArgument  (_64BIT ? 16 : 8)
59 #define structSize_ClassTemplateParameter (_64BIT ? 64 : 40)
60 #define structSize_OldLink                (_64BIT ? 24 : 12)
61 #define structSize_BTNamedLink            (_64BIT ? 48 : 24)
62 #define structSize_Application            (_64BIT ? 800 : 428)
63 #define structSize_Watcher                (_64BIT ? 32 : 16)
64 #define structSize_SelfWatcher            (_64BIT ? 32 : 16)
65 #define structSize_GlobalFunction         (_64BIT ? 72 : 36)
66 #define structSize_DefinedExpression      (_64BIT ? 40 : 20)
67 #define structSize_BitMember              (_64BIT ? 96 : 64)
68 #define structSize_DataMember             (_64BIT ? 160 : 96)
69 #define structSize_ClassProperty          (_64BIT ? 80 : 40)
70 #define structSize_Method                 (_64BIT ? 96 : 52)
71 #define structSize_Property               (_64BIT ? 152 : 88)
72 #define structSize_Class                  (_64BIT ? 624 : 376)
73
74 struct __ecereNameSpace__ecere__com__Instance;
75
76 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__BTNode;
77
78 struct __ecereNameSpace__ecere__sys__BTNode;
79
80 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__BinaryTree;
81
82 struct __ecereNameSpace__ecere__sys__BinaryTree
83 {
84 struct __ecereNameSpace__ecere__sys__BTNode * root;
85 int count;
86 int (*  CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
87 void (*  FreeKey)(void *  key);
88 } __attribute__ ((gcc_struct));
89
90 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__OldList;
91
92 struct __ecereNameSpace__ecere__sys__OldList
93 {
94 void *  first;
95 void *  last;
96 int count;
97 unsigned int offset;
98 unsigned int circ;
99 } __attribute__ ((gcc_struct));
100
101 struct __ecereNameSpace__ecere__com__Class
102 {
103 struct __ecereNameSpace__ecere__com__Class * prev, * next;
104 const char * name;
105 int offset, structSize;
106 void ** _vTbl;
107 int vTblSize;
108 unsigned int (* Constructor)(void *);
109 void (* Destructor)(void *);
110 int offsetClass, sizeClass;
111 struct __ecereNameSpace__ecere__com__Class * base;
112 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
113 struct __ecereNameSpace__ecere__sys__BinaryTree members;
114 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
115 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
116 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
117 struct __ecereNameSpace__ecere__sys__OldList derivatives;
118 int memberID, startMemberID;
119 int type;
120 struct __ecereNameSpace__ecere__com__Instance * module;
121 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
122 const char * dataTypeString;
123 struct __ecereNameSpace__ecere__com__Instance * dataType;
124 int typeSize;
125 int defaultAlignment;
126 void (* Initialize)();
127 int memberOffset;
128 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
129 const char * designerClass;
130 unsigned int noExpansion;
131 const char * defaultProperty;
132 unsigned int comRedefinition;
133 int count;
134 int isRemote;
135 unsigned int internalDecl;
136 void * data;
137 unsigned int computeSize;
138 int structAlignment;
139 int destructionWatchOffset;
140 unsigned int fixed;
141 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
142 int inheritanceAccess;
143 const char * fullName;
144 void * symbol;
145 struct __ecereNameSpace__ecere__sys__OldList conversions;
146 struct __ecereNameSpace__ecere__sys__OldList templateParams;
147 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
148 struct __ecereNameSpace__ecere__com__Class * templateClass;
149 struct __ecereNameSpace__ecere__sys__OldList templatized;
150 int numParams;
151 unsigned int isInstanceClass;
152 unsigned int byValueSystemClass;
153 } __attribute__ ((gcc_struct));
154
155 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Class;
156
157 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Instance;
158
159 struct __ecereNameSpace__ecere__com__Instance
160 {
161 void * *  _vTbl;
162 struct __ecereNameSpace__ecere__com__Class * _class;
163 int _refCount;
164 } __attribute__ ((gcc_struct));
165
166 struct __ecereNameSpace__ecere__com__Property
167 {
168 struct __ecereNameSpace__ecere__com__Property * prev, * next;
169 const char * name;
170 unsigned int isProperty;
171 int memberAccess;
172 int id;
173 struct __ecereNameSpace__ecere__com__Class * _class;
174 const char * dataTypeString;
175 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
176 struct __ecereNameSpace__ecere__com__Instance * dataType;
177 void (* Set)(void *, int);
178 int (* Get)(void *);
179 unsigned int (* IsSet)(void *);
180 void * data;
181 void * symbol;
182 int vid;
183 unsigned int conversion;
184 unsigned int watcherOffset;
185 const char * category;
186 unsigned int compiled;
187 unsigned int selfWatchable, isWatchable;
188 } __attribute__ ((gcc_struct));
189
190 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Property;
191
192 struct __ecereNameSpace__ecere__com__DataMember
193 {
194 struct __ecereNameSpace__ecere__com__DataMember * prev, * next;
195 const char * name;
196 unsigned int isProperty;
197 int memberAccess;
198 int id;
199 struct __ecereNameSpace__ecere__com__Class * _class;
200 const char * dataTypeString;
201 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
202 struct __ecereNameSpace__ecere__com__Instance * dataType;
203 int type;
204 int offset;
205 int memberID;
206 struct __ecereNameSpace__ecere__sys__OldList members;
207 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
208 int memberOffset;
209 int structAlignment;
210 } __attribute__ ((gcc_struct));
211
212 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataMember;
213
214 struct __ecereNameSpace__ecere__com__Method
215 {
216 const char * name;
217 struct __ecereNameSpace__ecere__com__Method * parent, * left, * right;
218 int depth;
219 int (* function)();
220 int vid;
221 int type;
222 struct __ecereNameSpace__ecere__com__Class * _class;
223 void * symbol;
224 const char * dataTypeString;
225 struct __ecereNameSpace__ecere__com__Instance * dataType;
226 int memberAccess;
227 } __attribute__ ((gcc_struct));
228
229 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Method;
230
231 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__SerialBuffer;
232
233 struct __ecereNameSpace__ecere__com__SerialBuffer
234 {
235 unsigned char *  _buffer;
236 unsigned int count;
237 unsigned int _size;
238 unsigned int pos;
239 } __attribute__ ((gcc_struct));
240
241 struct __ecereNameSpace__ecere__com__DataValue
242 {
243 union
244 {
245 char c;
246 unsigned char uc;
247 short s;
248 unsigned short us;
249 int i;
250 unsigned int ui;
251 void * p;
252 float f;
253 double d;
254 long long i64;
255 uint64 ui64;
256 } __attribute__ ((gcc_struct)) __anon1;
257 } __attribute__ ((gcc_struct));
258
259 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataValue;
260
261 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
262 {
263 union
264 {
265 struct
266 {
267 const char * dataTypeString;
268 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
269 } __attribute__ ((gcc_struct)) __anon1;
270 struct __ecereNameSpace__ecere__com__DataValue expression;
271 struct
272 {
273 const char * memberString;
274 union
275 {
276 struct __ecereNameSpace__ecere__com__DataMember * member;
277 struct __ecereNameSpace__ecere__com__Property * prop;
278 struct __ecereNameSpace__ecere__com__Method * method;
279 } __attribute__ ((gcc_struct)) __anon1;
280 } __attribute__ ((gcc_struct)) __anon2;
281 } __attribute__ ((gcc_struct)) __anon1;
282 } __attribute__ ((gcc_struct));
283
284 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassTemplateArgument;
285
286 void exit(int status);
287
288 void * calloc(size_t nmemb, size_t size);
289
290 void free(void * ptr);
291
292 void * malloc(size_t size);
293
294 void * realloc(void * ptr, size_t size);
295
296 long int strtol(const char * nptr, char ** endptr, int base);
297
298 long long int strtoll(const char * nptr, char ** endptr, int base);
299
300 unsigned long long int strtoull(const char * nptr, char ** endptr, int base);
301
302 typedef __builtin_va_list va_list;
303
304 typedef void FILE;
305
306 FILE * bsl_stdin(void);
307
308 FILE * bsl_stdout(void);
309
310 FILE * bsl_stderr(void);
311
312 char * fgets(char * s, int size, FILE * stream);
313
314 FILE * fopen(const char * path, const char * mode);
315
316 int fclose(FILE * fp);
317
318 int fflush(FILE * stream);
319
320 int fgetc(FILE * stream);
321
322 int fprintf(FILE * stream, const char * format, ...);
323
324 int fputc(int c, FILE * stream);
325
326 size_t fread(void * ptr, size_t size, size_t nmemb, FILE * stream);
327
328 size_t fwrite(const void * ptr, size_t size, size_t nmemb, FILE * stream);
329
330 int vsnprintf(char *, size_t, const char *, va_list args);
331
332 int snprintf(char * str, size_t, const char * format, ...);
333
334 int fseek(FILE * stream, long offset, int whence);
335
336 long ftell(FILE * stream);
337
338 int feof(FILE * stream);
339
340 int ferror(FILE * stream);
341
342 int fileno(FILE * stream);
343
344
345 struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_FindClass(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
346
347 void * __ecereNameSpace__ecere__com__eSystem_Renew(void * memory, unsigned int size);
348
349 void * __ecereNameSpace__ecere__com__eSystem_Renew0(void * memory, unsigned int size);
350
351 void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size);
352
353 void * __ecereNameSpace__ecere__com__eSystem_New0(unsigned int size);
354
355 void __ecereNameSpace__ecere__com__eSystem_Delete(void * memory);
356
357 void * __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
358
359 extern int __ecereVMethodID_class_OnGetDataFromString;
360
361 unsigned int Instance_LocateModule(const char * name, const char * fileName);
362
363 void Instance_COM_Initialize(int argc, char ** argv, char ** parsedCommand, int * argcPtr, const char *** argvPtr);
364
365 void * Instance_Module_Load(const char * libLocation, const char * name, void ** Load, void ** Unload);
366
367 void Instance_Module_Free(void * library);
368
369 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Angle;
370
371 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__unichar;
372
373 int __ecereNameSpace__ecere__sys__UTF32toUTF8Len(const unsigned int *  source, int count, char *  dest, int max);
374
375 const char * __ecereMethod___ecereNameSpace__ecere__com__unichar_OnGetString(struct __ecereNameSpace__ecere__com__Class * class, unsigned int * this, char * tempString, void * fieldData, unsigned int * needClass)
376 {
377 __ecereNameSpace__ecere__sys__UTF32toUTF8Len(&(*this), 1, tempString, 5);
378 return tempString;
379 }
380
381 unsigned int __ecereNameSpace__ecere__sys__UTF8GetChar(const char *  string, int *  numBytes);
382
383 unsigned int __ecereMethod___ecereNameSpace__ecere__com__unichar_OnGetDataFromString(struct __ecereNameSpace__ecere__com__Class * class, unsigned int * this, const char * string)
384 {
385 int nb;
386
387 (*this) = __ecereNameSpace__ecere__sys__UTF8GetChar(string, &nb);
388 return 1;
389 }
390
391 void __ecereNameSpace__ecere__com__eInstance_FireWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
392
393 void __ecereNameSpace__ecere__com__MemoryGuard_PushLoc(const char * loc)
394 {
395 }
396
397 void __ecereNameSpace__ecere__com__MemoryGuard_PopLoc()
398 {
399 }
400
401 extern unsigned int __ecereDll_Load_ecere(struct __ecereNameSpace__ecere__com__Instance * module);
402
403 extern unsigned int __ecereDll_Unload_ecere(struct __ecereNameSpace__ecere__com__Instance * module);
404
405 struct __ecereNameSpace__ecere__com__BTNamedLink
406 {
407 const char * name;
408 struct __ecereNameSpace__ecere__com__BTNamedLink * parent, * left, * right;
409 int depth;
410 void * data;
411 } __attribute__ ((gcc_struct));
412
413 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__BTNamedLink;
414
415 struct __ecereNameSpace__ecere__com__SelfWatcher
416 {
417 struct __ecereNameSpace__ecere__com__SelfWatcher * prev, * next;
418 void (* callback)(void *);
419 struct __ecereNameSpace__ecere__com__Property * _property;
420 } __attribute__ ((gcc_struct));
421
422 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__SelfWatcher;
423
424 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__AccessMode;
425
426 struct __ecereNameSpace__ecere__com__SubModule
427 {
428 struct __ecereNameSpace__ecere__com__SubModule * prev, * next;
429 struct __ecereNameSpace__ecere__com__Instance * module;
430 int importMode;
431 } __attribute__ ((gcc_struct));
432
433 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__SubModule;
434
435 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataMemberType;
436
437 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassType;
438
439 static __attribute__((unused)) struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__com__Class_char__PTR_, * __ecerePropM___ecereNameSpace__ecere__com__Class_char__PTR_;
440
441 const char *  __ecereProp___ecereNameSpace__ecere__com__Class_Get_char__PTR_(struct __ecereNameSpace__ecere__com__Class * this)
442 {
443 return this->name;
444 }
445
446 extern struct __ecereNameSpace__ecere__com__Instance * __thisModule;
447
448 struct __ecereNameSpace__ecere__com__Class * __ecereProp___ecereNameSpace__ecere__com__Class_Set_char__PTR_(const char *  value)
449 {
450 struct __ecereNameSpace__ecere__com__Class * theClass = __ecereNameSpace__ecere__com__eSystem_FindClass(__thisModule, value);
451
452 return theClass;
453 }
454
455 const char * __ecereMethod___ecereNameSpace__ecere__com__Class_OnGetString(struct __ecereNameSpace__ecere__com__Class * class, struct __ecereNameSpace__ecere__com__Class * this, char * tempString, void * fieldData, unsigned int * needClass)
456 {
457 return this->name;
458 }
459
460 struct __ecereNameSpace__ecere__com__NameSpace
461 {
462 const char * name;
463 struct __ecereNameSpace__ecere__com__NameSpace * btParent, * left, * right;
464 int depth;
465 struct __ecereNameSpace__ecere__com__NameSpace * parent;
466 struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
467 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
468 struct __ecereNameSpace__ecere__sys__BinaryTree defines;
469 struct __ecereNameSpace__ecere__sys__BinaryTree functions;
470 } __attribute__ ((gcc_struct));
471
472 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__NameSpace;
473
474 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Module;
475
476 struct __ecereNameSpace__ecere__com__Module
477 {
478 struct __ecereNameSpace__ecere__com__Instance * application;
479 struct __ecereNameSpace__ecere__sys__OldList classes;
480 struct __ecereNameSpace__ecere__sys__OldList defines;
481 struct __ecereNameSpace__ecere__sys__OldList functions;
482 struct __ecereNameSpace__ecere__sys__OldList modules;
483 struct __ecereNameSpace__ecere__com__Instance * prev;
484 struct __ecereNameSpace__ecere__com__Instance * next;
485 const char *  name;
486 void *  library;
487 void *  Unload;
488 int importType;
489 int origImportType;
490 struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
491 struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
492 } __attribute__ ((gcc_struct));
493
494 unsigned int __ecereMethod___ecereNameSpace__ecere__com__Class_OnGetDataFromString(struct __ecereNameSpace__ecere__com__Class * class, struct __ecereNameSpace__ecere__com__Class ** this, const char * string)
495 {
496 struct __ecereNameSpace__ecere__com__Class * theClass;
497
498 theClass = __ecereNameSpace__ecere__com__eSystem_FindClass(__thisModule, string);
499 if(!theClass)
500 theClass = __ecereNameSpace__ecere__com__eSystem_FindClass(((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application, string);
501 (*this) = (void *)theClass;
502 return theClass != (((void *)0));
503 }
504
505 void __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Serialize(struct __ecereNameSpace__ecere__com__Instance * this, struct __ecereNameSpace__ecere__com__Class * class, const void * data);
506
507 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_char__PTR_;
508
509 void __ecereMethod___ecereNameSpace__ecere__com__Class_OnSerialize(struct __ecereNameSpace__ecere__com__Class * class, struct __ecereNameSpace__ecere__com__Class * this, struct __ecereNameSpace__ecere__com__Instance * channel)
510 {
511 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Serialize(channel, __ecereClass_char__PTR_, this->fullName);
512 }
513
514 void __ecereMethod___ecereNameSpace__ecere__com__Class_OnFree(struct __ecereNameSpace__ecere__com__Class * class, struct __ecereNameSpace__ecere__com__Class * this)
515 {
516 }
517
518 void __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Unserialize(struct __ecereNameSpace__ecere__com__Instance * this, struct __ecereNameSpace__ecere__com__Class * class, void * *  data);
519
520 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_String;
521
522 void __ecereMethod___ecereNameSpace__ecere__com__Class_OnUnserialize(struct __ecereNameSpace__ecere__com__Class * class, struct __ecereNameSpace__ecere__com__Class ** this, struct __ecereNameSpace__ecere__com__Instance * channel)
523 {
524 struct __ecereNameSpace__ecere__com__Class * theClass;
525 char * string;
526
527 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Unserialize(channel, __ecereClass_String, (void *)&string);
528 theClass = __ecereNameSpace__ecere__com__eSystem_FindClass(__thisModule, string);
529 if(!theClass)
530 theClass = __ecereNameSpace__ecere__com__eSystem_FindClass(((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application, string);
531 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
532 (*this) = (void *)theClass;
533 }
534
535 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__TemplateParameterType;
536
537 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__TemplateMemberType;
538
539 struct __ecereNameSpace__ecere__com__ClassTemplateParameter
540 {
541 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * prev, * next;
542 const char * name;
543 int type;
544 union
545 {
546 const char * dataTypeString;
547 int memberType;
548 } __attribute__ ((gcc_struct)) __anon1;
549 struct __ecereNameSpace__ecere__com__ClassTemplateArgument defaultArg;
550 void * param;
551 } __attribute__ ((gcc_struct));
552
553 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassTemplateParameter;
554
555 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__MethodType;
556
557 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ImportType;
558
559 struct __ecereNameSpace__ecere__com__BitMember
560 {
561 struct __ecereNameSpace__ecere__com__BitMember * prev, * next;
562 const char * name;
563 unsigned int isProperty;
564 int memberAccess;
565 int id;
566 struct __ecereNameSpace__ecere__com__Class * _class;
567 const char * dataTypeString;
568 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
569 struct __ecereNameSpace__ecere__com__Instance * dataType;
570 int type;
571 int size;
572 int pos;
573 uint64 mask;
574 } __attribute__ ((gcc_struct));
575
576 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__BitMember;
577
578 struct __ecereNameSpace__ecere__com__ClassProperty
579 {
580 const char * name;
581 struct __ecereNameSpace__ecere__com__ClassProperty * parent, * left, * right;
582 int depth;
583 void (* Set)(struct __ecereNameSpace__ecere__com__Class *, long long);
584 long long (* Get)(struct __ecereNameSpace__ecere__com__Class *);
585 const char * dataTypeString;
586 struct __ecereNameSpace__ecere__com__Instance * dataType;
587 unsigned int constant;
588 } __attribute__ ((gcc_struct));
589
590 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassProperty;
591
592 struct __ecereNameSpace__ecere__com__DefinedExpression
593 {
594 struct __ecereNameSpace__ecere__com__DefinedExpression * prev, * next;
595 const char * name;
596 const char * value;
597 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
598 } __attribute__ ((gcc_struct));
599
600 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DefinedExpression;
601
602 struct __ecereNameSpace__ecere__com__GlobalFunction
603 {
604 struct __ecereNameSpace__ecere__com__GlobalFunction * prev, * next;
605 const char * name;
606 int (* function)();
607 struct __ecereNameSpace__ecere__com__Instance * module;
608 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
609 const char * dataTypeString;
610 struct __ecereNameSpace__ecere__com__Instance * dataType;
611 void * symbol;
612 } __attribute__ ((gcc_struct));
613
614 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__GlobalFunction;
615
616 struct __ecereNameSpace__ecere__com__EnumClassData
617 {
618 struct __ecereNameSpace__ecere__sys__OldList values;
619 long long largest;
620 } __attribute__ ((gcc_struct));
621
622 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__EnumClassData;
623
624 struct __ecereNameSpace__ecere__com__Watcher
625 {
626 struct __ecereNameSpace__ecere__com__Watcher * prev, * next;
627 void (* callback)(void *, void *);
628 struct __ecereNameSpace__ecere__com__Instance * object;
629 } __attribute__ ((gcc_struct));
630
631 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Watcher;
632
633 static unsigned int __ecereNameSpace__ecere__com__TOTAL_MEM = 0;
634
635 static unsigned int __ecereNameSpace__ecere__com__OUTSIDE_MEM = 0;
636
637 struct __ecereNameSpace__ecere__com__MemBlock
638 {
639 struct __ecereNameSpace__ecere__com__MemBlock * prev, * next;
640 struct __ecereNameSpace__ecere__com__MemPart * part;
641 unsigned int size;
642 } __attribute__ ((gcc_struct));
643
644 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__MemBlock;
645
646 struct __ecereNameSpace__ecere__com__MemPart
647 {
648 void * memory;
649 int blocksUsed;
650 int size;
651 struct __ecereNameSpace__ecere__com__BlockPool * pool;
652 } __attribute__ ((gcc_struct));
653
654 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__MemPart;
655
656 struct __ecereNameSpace__ecere__com__BlockPool
657 {
658 struct __ecereNameSpace__ecere__com__MemBlock * first, * last;
659 struct __ecereNameSpace__ecere__com__MemBlock * free;
660 unsigned int blockSize;
661 unsigned int blockSpace;
662 int numParts;
663 int numBlocks;
664 unsigned int totalSize;
665 unsigned int usedSpace;
666 } __attribute__ ((gcc_struct));
667
668 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__BlockPool;
669
670 unsigned int __ecereMethod___ecereNameSpace__ecere__com__BlockPool_Expand(struct __ecereNameSpace__ecere__com__BlockPool * this, unsigned int numBlocks)
671 {
672 unsigned char * memory = malloc(numBlocks * this->blockSpace);
673
674 __ecereNameSpace__ecere__com__TOTAL_MEM += numBlocks * this->blockSpace;
675 if(memory)
676 {
677 int c;
678 struct __ecereNameSpace__ecere__com__MemBlock * block = (struct __ecereNameSpace__ecere__com__MemBlock *)memory;
679 struct __ecereNameSpace__ecere__com__MemPart * part = calloc(1, sizeof(struct __ecereNameSpace__ecere__com__MemPart));
680
681 __ecereNameSpace__ecere__com__TOTAL_MEM += sizeof(struct __ecereNameSpace__ecere__com__MemPart);
682 this->free = block;
683 for(c = 0; c < numBlocks - 1; c++)
684 {
685 block->part = part;
686 block->prev = (((void *)0));
687 block->next = (struct __ecereNameSpace__ecere__com__MemBlock *)((unsigned char *)block + this->blockSpace);
688 block = block->next;
689 }
690 part->blocksUsed = 0;
691 part->pool = this;
692 part->memory = memory;
693 part->size = numBlocks;
694 block->part = part;
695 block->prev = (((void *)0));
696 block->next = (((void *)0));
697 this->totalSize += numBlocks;
698 this->numParts++;
699 return 1;
700 }
701 return 0;
702 }
703
704 struct __ecereNameSpace__ecere__com__MemBlock * __ecereMethod___ecereNameSpace__ecere__com__BlockPool_Add(struct __ecereNameSpace__ecere__com__BlockPool * this)
705 {
706 int __simpleStruct0;
707 struct __ecereNameSpace__ecere__com__MemBlock * block = (((void *)0));
708
709 if(!this->free)
710 __ecereMethod___ecereNameSpace__ecere__com__BlockPool_Expand(this, (__simpleStruct0 = this->numBlocks / 2, (1 > __simpleStruct0) ? 1 : __simpleStruct0));
711 if(this->free)
712 {
713 block = this->free;
714 block->prev = this->last;
715 if(block->prev)
716 block->prev->next = block;
717 if(!this->first)
718 this->first = block;
719 this->last = block;
720 this->free = block->next;
721 block->next = (((void *)0));
722 block->part->blocksUsed++;
723 this->numBlocks++;
724 }
725 return block;
726 }
727
728 void __ecereMethod___ecereNameSpace__ecere__com__BlockPool_Remove(struct __ecereNameSpace__ecere__com__BlockPool * this, struct __ecereNameSpace__ecere__com__MemBlock * block)
729 {
730 if(block->prev)
731 block->prev->next = block->next;
732 if(block->next)
733 block->next->prev = block->prev;
734 if(this->first == block)
735 this->first = block->next;
736 if(this->last == block)
737 this->last = block->prev;
738 block->next = this->free;
739 this->free = block;
740 block->part->blocksUsed--;
741 this->numBlocks--;
742 (*block->part->pool).usedSpace -= block->size;
743 if(!block->part->blocksUsed && this->numBlocks && this->totalSize > this->numBlocks + this->numBlocks / 2)
744 {
745 struct __ecereNameSpace__ecere__com__MemBlock * next = this->free, * prev = (((void *)0));
746 struct __ecereNameSpace__ecere__com__MemPart * part = block->part;
747
748 this->free = (((void *)0));
749 this->totalSize -= part->size;
750 while(next)
751 {
752 if(next->part != part)
753 {
754 if(prev)
755 prev->next = next;
756 else
757 this->free = next;
758 prev = next;
759 }
760 next = next->next;
761 }
762 ;
763 if(prev)
764 prev->next = (((void *)0));
765 __ecereNameSpace__ecere__com__TOTAL_MEM -= part->size * this->blockSpace;
766 __ecereNameSpace__ecere__com__TOTAL_MEM -= sizeof(struct __ecereNameSpace__ecere__com__MemPart);
767 this->numParts--;
768 free(part->memory);
769 free(part);
770 }
771 }
772
773 static struct __ecereNameSpace__ecere__com__BlockPool * __ecereNameSpace__ecere__com__pools;
774
775 static unsigned int __ecereNameSpace__ecere__com__log1_5i(unsigned int number)
776 {
777 unsigned int pos;
778 uint64 current = sizeof(void *);
779
780 for(pos = 0; pos < 31; pos++)
781 {
782 if(current >= number)
783 break;
784 current = current * 3 / 2;
785 if(current == 1)
786 current = 2;
787 }
788 return pos;
789 }
790
791 static unsigned int __ecereNameSpace__ecere__com__pow1_5(unsigned int number)
792 {
793 unsigned int pos;
794 uint64 current = sizeof(void *);
795
796 for(pos = 0; pos < number; pos++)
797 {
798 current = current * 3 / 2;
799 if(current == 1)
800 current = 2;
801 }
802 return (unsigned int)current;
803 }
804
805 static unsigned int __ecereNameSpace__ecere__com__pow1_5i(unsigned int number)
806 {
807 unsigned int pos;
808 uint64 current = sizeof(void *);
809
810 for(pos = 0; pos < 31; pos++)
811 {
812 if(current >= number)
813 return (unsigned int)current;
814 current = current * 3 / 2;
815 if(current == 1)
816 current = 2;
817 }
818 return (unsigned int)current;
819 }
820
821 unsigned int __ecereNameSpace__ecere__com__log2i(unsigned int number)
822 {
823 unsigned int power;
824
825 for(power = 0; power < 32; power++)
826 if((1L << power) >= number)
827 break;
828 return power;
829 }
830
831 unsigned int __ecereNameSpace__ecere__com__pow2i(unsigned int number)
832 {
833 return 1 << __ecereNameSpace__ecere__com__log2i(number);
834 }
835
836 static unsigned int __ecereNameSpace__ecere__com__memoryInitialized = 0;
837
838 static void __ecereNameSpace__ecere__com__InitMemory()
839 {
840 int c;
841
842 __ecereNameSpace__ecere__com__memoryInitialized = 1;
843 __ecereNameSpace__ecere__com__pools = calloc(1, sizeof(struct __ecereNameSpace__ecere__com__BlockPool) * 31);
844 for(c = 0; c < 31; c++)
845 {
846 int expansion;
847
848 __ecereNameSpace__ecere__com__pools[c].blockSize = __ecereNameSpace__ecere__com__pow1_5(c);
849 if(__ecereNameSpace__ecere__com__pools[c].blockSize % sizeof(void *))
850 __ecereNameSpace__ecere__com__pools[c].blockSize += sizeof(void *) - (__ecereNameSpace__ecere__com__pools[c].blockSize % sizeof(void *));
851 __ecereNameSpace__ecere__com__pools[c].blockSpace = __ecereNameSpace__ecere__com__pools[c].blockSize;
852 __ecereNameSpace__ecere__com__pools[c].blockSpace += sizeof(struct __ecereNameSpace__ecere__com__MemBlock);
853 expansion = (__ecereNameSpace__ecere__com__pools[c].blockSize < 128) ? 1024 : (131072 / __ecereNameSpace__ecere__com__pools[c].blockSize);
854 if(c < 12)
855 __ecereMethod___ecereNameSpace__ecere__com__BlockPool_Expand(&__ecereNameSpace__ecere__com__pools[c], ((1 > expansion) ? 1 : expansion));
856 }
857 }
858
859 unsigned int __ecereNameSpace__ecere__com__poolingDisabled;
860
861 static void * __ecereNameSpace__ecere__com___mymalloc(unsigned int size)
862 {
863 struct __ecereNameSpace__ecere__com__MemBlock * block = (((void *)0));
864
865 if(size)
866 {
867 unsigned int p = __ecereNameSpace__ecere__com__log1_5i(size);
868
869 if(!__ecereNameSpace__ecere__com__memoryInitialized)
870 __ecereNameSpace__ecere__com__InitMemory();
871 if(!__ecereNameSpace__ecere__com__poolingDisabled && p < 31)
872 {
873 block = __ecereMethod___ecereNameSpace__ecere__com__BlockPool_Add(&__ecereNameSpace__ecere__com__pools[p]);
874 if(block)
875 {
876 block->size = size;
877 __ecereNameSpace__ecere__com__pools[p].usedSpace += size;
878 }
879 }
880 else
881 {
882 block = malloc(sizeof(struct __ecereNameSpace__ecere__com__MemBlock) + size);
883 if(block)
884 {
885 __ecereNameSpace__ecere__com__TOTAL_MEM += sizeof(struct __ecereNameSpace__ecere__com__MemBlock) + size;
886 __ecereNameSpace__ecere__com__OUTSIDE_MEM += sizeof(struct __ecereNameSpace__ecere__com__MemBlock) + size;
887 block->part = (((void *)0));
888 block->size = size;
889 }
890 }
891 }
892 return block ? ((struct __ecereNameSpace__ecere__com__MemBlock *)block + 1) : (((void *)0));
893 }
894
895 extern void *  memset(void *  area, int value, size_t count);
896
897 static void * __ecereNameSpace__ecere__com___mycalloc(int n, unsigned int size)
898 {
899 void * pointer = __ecereNameSpace__ecere__com___mymalloc(n * size);
900
901 if(pointer)
902 memset(pointer, 0, n * size);
903 return pointer;
904 }
905
906 static void __ecereNameSpace__ecere__com___myfree(void * pointer)
907 {
908 if(pointer)
909 {
910 struct __ecereNameSpace__ecere__com__MemBlock * block = (struct __ecereNameSpace__ecere__com__MemBlock *)((unsigned char *)pointer - sizeof(struct __ecereNameSpace__ecere__com__MemBlock));
911 struct __ecereNameSpace__ecere__com__MemPart * part = block->part;
912 struct __ecereNameSpace__ecere__com__BlockPool * pool = part ? part->pool : (((void *)0));
913
914 if(pool)
915 __ecereMethod___ecereNameSpace__ecere__com__BlockPool_Remove((&*pool), block);
916 else
917 {
918 __ecereNameSpace__ecere__com__TOTAL_MEM -= sizeof(struct __ecereNameSpace__ecere__com__MemBlock) + block->size;
919 __ecereNameSpace__ecere__com__OUTSIDE_MEM -= sizeof(struct __ecereNameSpace__ecere__com__MemBlock) + block->size;
920 free(block);
921 }
922 }
923 }
924
925 extern void *  memcpy(void * , const void * , size_t size);
926
927 static void * __ecereNameSpace__ecere__com___myrealloc(void * pointer, unsigned int size)
928 {
929 struct __ecereNameSpace__ecere__com__MemBlock * block = pointer ? ((struct __ecereNameSpace__ecere__com__MemBlock *)((unsigned char *)pointer - sizeof(struct __ecereNameSpace__ecere__com__MemBlock))) : (((void *)0));
930 void * newPointer = (((void *)0));
931 struct __ecereNameSpace__ecere__com__MemPart * part = block ? block->part : (((void *)0));
932 struct __ecereNameSpace__ecere__com__BlockPool * pool = part ? part->pool : (((void *)0));
933
934 if(block)
935 {
936 if(pool)
937 {
938 unsigned int ns = __ecereNameSpace__ecere__com__pow1_5i(size);
939 unsigned int mod = ns % sizeof(void *);
940
941 if(mod)
942 ns += sizeof(void *) - mod;
943 if(ns == (*pool).blockSize)
944 {
945 newPointer = pointer;
946 (*pool).usedSpace += size - block->size;
947 block->size = size;
948 }
949 }
950 else if(size)
951 {
952 struct __ecereNameSpace__ecere__com__MemBlock * newBlock = realloc(block, sizeof(struct __ecereNameSpace__ecere__com__MemBlock) + size);
953
954 if(newBlock)
955 {
956 __ecereNameSpace__ecere__com__TOTAL_MEM += size - newBlock->size;
957 __ecereNameSpace__ecere__com__OUTSIDE_MEM += size - newBlock->size;
958 newPointer = ((struct __ecereNameSpace__ecere__com__MemBlock *)newBlock + 1);
959 }
960 }
961 }
962 if(!newPointer)
963 {
964 newPointer = __ecereNameSpace__ecere__com___mymalloc(size);
965 if(pointer && newPointer)
966 {
967 unsigned int __simpleStruct0;
968
969 memcpy(newPointer, pointer, (__simpleStruct0 = block->size, (size < __simpleStruct0) ? size : __simpleStruct0));
970 __ecereNameSpace__ecere__com___myfree(pointer);
971 }
972 }
973 return newPointer;
974 }
975
976 static void * __ecereNameSpace__ecere__com___mycrealloc(void * pointer, unsigned int size)
977 {
978 struct __ecereNameSpace__ecere__com__MemBlock * block = pointer ? ((struct __ecereNameSpace__ecere__com__MemBlock *)((unsigned char *)pointer - sizeof(struct __ecereNameSpace__ecere__com__MemBlock))) : (((void *)0));
979 void * newPointer = (((void *)0));
980 struct __ecereNameSpace__ecere__com__MemPart * part = block ? block->part : (((void *)0));
981 struct __ecereNameSpace__ecere__com__BlockPool * pool = part ? part->pool : (((void *)0));
982
983 if(block)
984 {
985 if(pool)
986 {
987 unsigned int ns = __ecereNameSpace__ecere__com__pow1_5i(size);
988 unsigned int mod = ns % sizeof(void *);
989
990 if(mod)
991 ns += sizeof(void *) - mod;
992 if(ns == (*pool).blockSize)
993 {
994 int extra = size - block->size;
995
996 newPointer = pointer;
997 (*pool).usedSpace += extra;
998 if(extra > 0)
999 memset((unsigned char *)pointer + block->size, 0, extra);
1000 block->size = size;
1001 }
1002 }
1003 else if(size)
1004 {
1005 struct __ecereNameSpace__ecere__com__MemBlock * newBlock = realloc(block, sizeof(struct __ecereNameSpace__ecere__com__MemBlock) + size);
1006
1007 if(newBlock)
1008 {
1009 int extra = size - newBlock->size;
1010
1011 __ecereNameSpace__ecere__com__TOTAL_MEM += extra;
1012 __ecereNameSpace__ecere__com__OUTSIDE_MEM += extra;
1013 newPointer = ((struct __ecereNameSpace__ecere__com__MemBlock *)newBlock + 1);
1014 if(extra > 0)
1015 memset((unsigned char *)newPointer + newBlock->size, 0, extra);
1016 newBlock->size = size;
1017 }
1018 }
1019 }
1020 if(!newPointer)
1021 {
1022 newPointer = __ecereNameSpace__ecere__com___mymalloc(size);
1023 if(newPointer)
1024 {
1025 if(pointer)
1026 {
1027 unsigned int __simpleStruct0;
1028
1029 memcpy(newPointer, pointer, (__simpleStruct0 = block->size, (size < __simpleStruct0) ? size : __simpleStruct0));
1030 if(size > block->size)
1031 memset((unsigned char *)newPointer + block->size, 0, size - block->size);
1032 __ecereNameSpace__ecere__com___myfree(pointer);
1033 }
1034 else
1035 memset((unsigned char *)newPointer, 0, size);
1036 }
1037 }
1038 return newPointer;
1039 }
1040
1041 static void * __ecereNameSpace__ecere__com___malloc(unsigned int size)
1042 {
1043 void * pointer;
1044
1045 pointer = size ? __ecereNameSpace__ecere__com___mymalloc(size + 2 * 0) : (((void *)0));
1046 return pointer ? ((unsigned char *)pointer + 0) : (((void *)0));
1047 }
1048
1049 static void * __ecereNameSpace__ecere__com___calloc(int n, unsigned int size)
1050 {
1051 void * pointer;
1052
1053 pointer = (n * size) ? __ecereNameSpace__ecere__com___mycalloc(1, n * size + 2 * 0) : (((void *)0));
1054 return pointer ? ((unsigned char *)pointer + 0) : (((void *)0));
1055 }
1056
1057 static void __ecereNameSpace__ecere__com___free(void *  pointer);
1058
1059 static void * __ecereNameSpace__ecere__com___realloc(void * pointer, unsigned int size)
1060 {
1061 if(!size)
1062 {
1063 __ecereNameSpace__ecere__com___free(pointer);
1064 return (((void *)0));
1065 }
1066 pointer = __ecereNameSpace__ecere__com___myrealloc(pointer, size);
1067 return pointer ? ((unsigned char *)pointer + 0) : (((void *)0));
1068 }
1069
1070 static void * __ecereNameSpace__ecere__com___crealloc(void * pointer, unsigned int size)
1071 {
1072 if(!size)
1073 return (((void *)0));
1074 pointer = __ecereNameSpace__ecere__com___mycrealloc(pointer, size);
1075 return pointer ? ((unsigned char *)pointer + 0) : (((void *)0));
1076 }
1077
1078 static void __ecereNameSpace__ecere__com___free(void * pointer)
1079 {
1080 if(pointer)
1081 {
1082 __ecereNameSpace__ecere__com___myfree(pointer);
1083 }
1084 }
1085
1086 void __ecereNameSpace__ecere__com__memswap(unsigned char * a, unsigned char * b, unsigned int size)
1087 {
1088 unsigned int c;
1089 unsigned char buffer[1024];
1090
1091 for(c = 0; c < size; )
1092 {
1093 int s = sizeof (buffer);
1094
1095 if(c + s > size)
1096 s = size - c;
1097 memcpy(buffer, a + c, s);
1098 memcpy(a + c, b + c, s);
1099 memcpy(b + c, buffer, s);
1100 c += s;
1101 }
1102 }
1103
1104 void __ecereNameSpace__ecere__com__CheckMemory()
1105 {
1106 }
1107
1108 static void __ecereNameSpace__ecere__com__ComputeClassParameters(struct __ecereNameSpace__ecere__com__Class * templatedClass, const char *  templateParams, struct __ecereNameSpace__ecere__com__Instance * findModule);
1109
1110 extern char *  strchr(const char * , int);
1111
1112 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__OldLink;
1113
1114 struct __ecereNameSpace__ecere__sys__OldLink
1115 {
1116 struct __ecereNameSpace__ecere__sys__OldLink * prev;
1117 struct __ecereNameSpace__ecere__sys__OldLink * next;
1118 void *  data;
1119 } __attribute__ ((gcc_struct));
1120
1121 extern char *  __ecereNameSpace__ecere__sys__CopyString(const char *  string);
1122
1123 extern void *  memmove(void * , const void * , size_t size);
1124
1125 static void __ecereNameSpace__ecere__com__SetDelayedCPValues(struct __ecereNameSpace__ecere__com__Class * _class, struct __ecereNameSpace__ecere__com__ClassProperty * _property);
1126
1127 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(struct __ecereNameSpace__ecere__sys__BinaryTree * this);
1128
1129 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BinaryTree_first;
1130
1131 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(struct __ecereNameSpace__ecere__sys__BTNode * this);
1132
1133 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BTNode_next;
1134
1135 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(struct __ecereNameSpace__ecere__sys__BinaryTree * this, const char *  key);
1136
1137 void __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Delete(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node);
1138
1139 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Delete(struct __ecereNameSpace__ecere__sys__OldList * this, void *  item);
1140
1141 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(struct __ecereNameSpace__ecere__sys__OldList * this, void *  item);
1142
1143 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(struct __ecereNameSpace__ecere__sys__OldList * this, void *  prevItem, void *  item);
1144
1145 static void __ecereNameSpace__ecere__com__FixDerivativesBase(struct __ecereNameSpace__ecere__com__Class * base, struct __ecereNameSpace__ecere__com__Class * mod)
1146 {
1147 struct __ecereNameSpace__ecere__sys__OldLink * derivative;
1148
1149 __ecereNameSpace__ecere__com__ComputeClassParameters(base, strchr(base->name, '<'), (((void *)0)));
1150 for(derivative = base->derivatives.first; derivative; derivative = derivative->next)
1151 {
1152 struct __ecereNameSpace__ecere__com__Class * _class = derivative->data;
1153 int type = _class->type;
1154 int oldType = type;
1155 int size = _class->structSize - _class->offset;
1156 int oldSizeClass = _class->sizeClass;
1157 int sizeClass = _class->sizeClass - _class->offsetClass;
1158 struct __ecereNameSpace__ecere__com__Class * enumBase = (((void *)0));
1159 const char * dataTypeString = (((void *)0));
1160 struct __ecereNameSpace__ecere__com__Class * baseClass;
1161 unsigned int offsetBefore = _class->offset;
1162 int offsetClass, totalSizeClass;
1163
1164 for(baseClass = base; baseClass->base; baseClass = baseClass->base)
1165 ;
1166 if(base && !base->internalDecl && (base->type == 5 || base->type == 1 || base->type == 0))
1167 {
1168 if(base->type == 1 && type == 0)
1169 type = 5;
1170 else
1171 type = base->type;
1172 }
1173 if(base && (_class->type == 0 || _class->type == 5 || _class->type == 1) && (base->type == 3 || base->type == 2 || base->type == 4))
1174 {
1175 type = base->type;
1176 }
1177 if(type == 4)
1178 {
1179 if(base->type != 4)
1180 {
1181 enumBase = base;
1182 base = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, "enum");
1183 }
1184 }
1185 dataTypeString = enumBase ? enumBase->dataTypeString : base->dataTypeString;
1186 offsetClass = base ? (base->templateClass ? base->templateClass->sizeClass : base->sizeClass) : (type == 5 ? 0 : 0);
1187 totalSizeClass = offsetClass + sizeClass;
1188 if(type == 0 || type == 5)
1189 _class->offset = (base && (base->templateClass ? base->templateClass->structSize : base->structSize) && base->type != 1000) ? (base->templateClass ? base->templateClass->structSize : base->structSize) : ((type == 5) ? 0 : structSize_Instance);
1190 if(type == 1)
1191 {
1192 _class->memberOffset = (base && (base->templateClass ? base->templateClass->structSize : base->structSize) && base->type != 1000) ? (base->templateClass ? base->templateClass->structSize : base->structSize) : 0;
1193 _class->typeSize = _class->structSize = _class->memberOffset + size;
1194 }
1195 else if(type == 2 || type == 4 || type == 3)
1196 {
1197 struct __ecereNameSpace__ecere__com__Class * dataTypeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, dataTypeString);
1198
1199 if(dataTypeClass)
1200 _class->typeSize = dataTypeClass->typeSize;
1201 _class->structSize = 0;
1202 }
1203 else if(type == 0 || type == 5)
1204 {
1205 _class->structSize = _class->offset + size;
1206 _class->typeSize = sizeof(void *);
1207 }
1208 if(_class->type != 1000)
1209 _class->type = type;
1210 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)_class->dataTypeString), _class->dataTypeString = 0);
1211 _class->dataTypeString = __ecereNameSpace__ecere__sys__CopyString(dataTypeString);
1212 if(totalSizeClass != oldSizeClass)
1213 {
1214 _class->data = __ecereNameSpace__ecere__com__eSystem_Renew(_class->data, sizeof(unsigned char) * (totalSizeClass));
1215 memmove((unsigned char *)_class->data + mod->offsetClass, (unsigned char *)_class->data, totalSizeClass - mod->sizeClass);
1216 if(base->type != 1000 && base->type != 4)
1217 memcpy((unsigned char *)_class->data, (unsigned char *)base->data, totalSizeClass - _class->sizeClass);
1218 else
1219 memset((unsigned char *)_class->data, 0, totalSizeClass - _class->sizeClass);
1220 }
1221 _class->offsetClass = offsetClass;
1222 _class->sizeClass = totalSizeClass;
1223 {
1224 struct __ecereNameSpace__ecere__com__Method * method, * next;
1225 struct __ecereNameSpace__ecere__com__Class * b;
1226 unsigned int needUpdate = (mod != (base->templateClass ? base->templateClass : base) || _class->vTblSize != mod->vTblSize);
1227 int updateStart = -1, updateEnd = -1;
1228
1229 if(mod->base && mod->base->base && mod->base->vTblSize > baseClass->vTblSize && needUpdate)
1230 {
1231 _class->vTblSize += mod->base->vTblSize - baseClass->vTblSize;
1232 _class->_vTbl = __ecereNameSpace__ecere__com__eSystem_Renew(_class->_vTbl, sizeof(void *) * (_class->vTblSize));
1233 memmove(_class->_vTbl + mod->base->vTblSize, _class->_vTbl + baseClass->vTblSize, (_class->vTblSize - mod->vTblSize) * sizeof(void *));
1234 updateStart = baseClass->vTblSize;
1235 updateEnd = updateStart + mod->base->vTblSize - baseClass->vTblSize;
1236 for(method = (struct __ecereNameSpace__ecere__com__Method *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&_class->methods); method; method = next)
1237 {
1238 next = (struct __ecereNameSpace__ecere__com__Method *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)method));
1239 if(method->type == 1)
1240 method->vid += mod->base->vTblSize - baseClass->vTblSize;
1241 }
1242 }
1243 for(b = mod->base; b && b != (((void *)0)); b = b->base)
1244 {
1245 struct __ecereNameSpace__ecere__com__Method * vMethod;
1246
1247 for(vMethod = (struct __ecereNameSpace__ecere__com__Method *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&b->methods); vMethod; vMethod = (struct __ecereNameSpace__ecere__com__Method *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)vMethod)))
1248 {
1249 if(vMethod->type == 1)
1250 {
1251 method = (struct __ecereNameSpace__ecere__com__Method *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&_class->methods, vMethod->name);
1252 if(method)
1253 {
1254 if(method->function)
1255 _class->_vTbl[vMethod->vid] = method->function;
1256 if(!method->symbol)
1257 {
1258 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)method->name), method->name = 0);
1259 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)method->dataTypeString), method->dataTypeString = 0);
1260 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Delete(&_class->methods, (struct __ecereNameSpace__ecere__sys__BTNode *)method);
1261 }
1262 else
1263 {
1264 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)method->dataTypeString), method->dataTypeString = 0);
1265 method->type = vMethod->type;
1266 method->dataTypeString = __ecereNameSpace__ecere__sys__CopyString(vMethod->dataTypeString);
1267 method->_class = vMethod->_class;
1268 }
1269 }
1270 else if((vMethod->vid >= updateStart && vMethod->vid < updateEnd) || _class->_vTbl[vMethod->vid] == b->_vTbl[vMethod->vid])
1271 _class->_vTbl[vMethod->vid] = _class->base->_vTbl[vMethod->vid];
1272 }
1273 }
1274 }
1275 }
1276 if(type == 0 || type == 5 || type == 1)
1277 {
1278 struct __ecereNameSpace__ecere__com__Property * prop;
1279 struct __ecereNameSpace__ecere__com__DataMember * member;
1280 struct __ecereNameSpace__ecere__com__Class * c;
1281
1282 for(c = mod->base; c; c = c->base)
1283 {
1284 struct __ecereNameSpace__ecere__com__Property * _property;
1285
1286 for(_property = c->membersAndProperties.first; _property; _property = _property->next)
1287 {
1288 if(_property->isProperty)
1289 {
1290 struct __ecereNameSpace__ecere__com__BTNamedLink * link = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&_class->prop, _property->name);
1291
1292 if(link)
1293 {
1294 prop = link->data;
1295 if(!prop->Set && !prop->Get && prop->memberAccess == 4)
1296 {
1297 struct __ecereNameSpace__ecere__com__SelfWatcher * watcher;
1298
1299 for(watcher = _class->selfWatchers.first; watcher; watcher = watcher->next)
1300 {
1301 if(watcher->_property == prop)
1302 watcher->_property = _property;
1303 }
1304 _property->selfWatchable = 1;
1305 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Delete(&_class->prop, (struct __ecereNameSpace__ecere__sys__BTNode *)link);
1306 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)prop->name), prop->name = 0);
1307 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)prop->dataTypeString), prop->dataTypeString = 0);
1308 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Delete(&_class->membersAndProperties, prop);
1309 }
1310 }
1311 }
1312 }
1313 }
1314 {
1315 struct __ecereNameSpace__ecere__com__DataMember * next;
1316
1317 for(member = _class->membersAndProperties.first; member; member = next)
1318 {
1319 int offsetDiff = _class->offset - offsetBefore;
1320
1321 next = member->next;
1322 if(!member->isProperty)
1323 {
1324 if(oldType == 2 && type != 2)
1325 {
1326 struct __ecereNameSpace__ecere__com__DataMember * prev = member->prev;
1327
1328 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(&_class->membersAndProperties, member);
1329 member = (struct __ecereNameSpace__ecere__com__DataMember *)__ecereNameSpace__ecere__com__eSystem_Renew0(member, sizeof(unsigned char) * (sizeof(struct __ecereNameSpace__ecere__com__DataMember)));
1330 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(&_class->membersAndProperties, prev, member);
1331 }
1332 if(offsetDiff > 0)
1333 {
1334 member->offset += offsetDiff;
1335 member->memberOffset += offsetDiff;
1336 }
1337 }
1338 member->id += mod->base->memberID;
1339 }
1340 _class->memberID += mod->base->memberID;
1341 _class->startMemberID += mod->base->memberID;
1342 }
1343 }
1344 __ecereNameSpace__ecere__com__FixDerivativesBase(_class, mod);
1345 {
1346 struct __ecereNameSpace__ecere__com__Class * c;
1347
1348 for(c = mod->base; c; c = c->base)
1349 {
1350 struct __ecereNameSpace__ecere__com__ClassProperty * _property;
1351
1352 for(_property = (struct __ecereNameSpace__ecere__com__ClassProperty *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&c->classProperties); _property; _property = (struct __ecereNameSpace__ecere__com__ClassProperty *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)_property)))
1353 {
1354 __ecereNameSpace__ecere__com__SetDelayedCPValues(_class, _property);
1355 }
1356 }
1357 }
1358 }
1359 {
1360 struct __ecereNameSpace__ecere__sys__OldLink * templateLink;
1361
1362 for(templateLink = base->templatized.first; templateLink; templateLink = templateLink->next)
1363 {
1364 struct __ecereNameSpace__ecere__com__Class * template = templateLink->data;
1365
1366 template->base = base->base;
1367 template->_vTbl = base->_vTbl;
1368 template->data = base->data;
1369 template->offset = base->offset;
1370 template->offsetClass = base->offsetClass;
1371 template->sizeClass = base->sizeClass;
1372 template->structSize = base->structSize;
1373 template->vTblSize = base->vTblSize;
1374 __ecereNameSpace__ecere__com__FixDerivativesBase(template, mod);
1375 }
1376 }
1377 }
1378
1379 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Application;
1380
1381 struct __ecereNameSpace__ecere__com__Application
1382 {
1383 int argc;
1384 const char * *  argv;
1385 int exitCode;
1386 unsigned int isGUIApp;
1387 struct __ecereNameSpace__ecere__sys__OldList allModules;
1388 char *  parsedCommand;
1389 struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace;
1390 } __attribute__ ((gcc_struct));
1391
1392 extern int strcmp(const char * , const char * );
1393
1394 extern char *  strncpy(char * , const char * , size_t n);
1395
1396 extern char *  __ecereNameSpace__ecere__sys__RSearchString(const char *  buffer, const char *  subStr, int maxLen, unsigned int matchCase, unsigned int matchWord);
1397
1398 extern size_t strlen(const char * );
1399
1400 extern int printf(const char * , ...);
1401
1402 static void __ecereNameSpace__ecere__com__FreeTemplatesDerivatives(struct __ecereNameSpace__ecere__com__Class * base);
1403
1404 static void __ecereNameSpace__ecere__com__NameSpace_Free(struct __ecereNameSpace__ecere__com__NameSpace * parentNameSpace);
1405
1406 static struct __ecereNameSpace__ecere__com__BTNamedLink * __ecereNameSpace__ecere__com__SearchNameSpace(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace, const char *  name, void *  listOffset);
1407
1408 extern char *  strcpy(char * , const char * );
1409
1410 static void __ecereNameSpace__ecere__com__FreeTemplateArgs(struct __ecereNameSpace__ecere__com__Class * template);
1411
1412 static void __ecereNameSpace__ecere__com__CopyTemplateArg(struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param, struct __ecereNameSpace__ecere__com__ClassTemplateArgument * arg);
1413
1414 extern char *  strstr(const char * , const char * );
1415
1416 int __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString(struct __ecereNameSpace__ecere__sys__BinaryTree * this, const char *  a, const char *  b);
1417
1418 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node);
1419
1420 struct __ecereNameSpace__ecere__sys__OldLink * __ecereMethod___ecereNameSpace__ecere__sys__OldList_FindLink(struct __ecereNameSpace__ecere__sys__OldList * this, void *  data);
1421
1422 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(struct __ecereNameSpace__ecere__sys__OldList * this, void *  item);
1423
1424 struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_RegisterClass(int type, const char * name, const char * baseName, int size, int sizeClass, unsigned int (* Constructor)(void *), void (* Destructor)(void *), struct __ecereNameSpace__ecere__com__Instance * module, int declMode, int inheritanceAccess)
1425 {
1426 int start = 0, c;
1427 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace = (((void *)0));
1428 unsigned int force64Bits = (((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application + structSize_Module)))->isGUIApp & 2) ? 1 : 0;
1429 unsigned int force32Bits = (((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application + structSize_Module)))->isGUIApp & 4) ? 1 : 0;
1430 unsigned int inCompiler = (((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application + structSize_Module)))->isGUIApp & 8) ? 1 : 0;
1431 unsigned int crossBits = force32Bits || force64Bits;
1432 unsigned int fixed = 0;
1433
1434 if(inCompiler && crossBits)
1435 {
1436 struct __ecereNameSpace__ecere__com__Class * c = __ecereNameSpace__ecere__com__eSystem_FindClass(((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application, name);
1437
1438 if(c && c->fixed)
1439 fixed = 1;
1440 else if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->name && !strcmp(((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->name, "ecereCOM"))
1441 fixed = 1;
1442 }
1443 {
1444 nameSpace = (declMode == 1) ? &((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->publicNameSpace : &((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->privateNameSpace;
1445 if(declMode == 4)
1446 nameSpace = &((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application + structSize_Module)))->systemNameSpace;
1447 {
1448 for(c = 0; name[c]; c++)
1449 {
1450 if(name[c] == '.' || (name[c] == ':' && name[c + 1] == ':'))
1451 {
1452 struct __ecereNameSpace__ecere__com__NameSpace * newSpace;
1453 char * spaceName = __ecereNameSpace__ecere__com___malloc(c - start + 1);
1454
1455 strncpy(spaceName, name + start, c - start);
1456 spaceName[c - start] = '\0';
1457 newSpace = (struct __ecereNameSpace__ecere__com__NameSpace *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&(*nameSpace).nameSpaces, spaceName);
1458 if(!newSpace)
1459 {
1460 newSpace = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(struct __ecereNameSpace__ecere__com__NameSpace) * (1));
1461 (*newSpace).classes.CompareKey = (void *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString;
1462 (*newSpace).defines.CompareKey = (void *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString;
1463 (*newSpace).functions.CompareKey = (void *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString;
1464 (*newSpace).nameSpaces.CompareKey = (void *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString;
1465 (*newSpace).name = spaceName;
1466 (*newSpace).parent = nameSpace;
1467 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&(*nameSpace).nameSpaces, (struct __ecereNameSpace__ecere__sys__BTNode *)newSpace);
1468 }
1469 else
1470 (__ecereNameSpace__ecere__com__eSystem_Delete(spaceName), spaceName = 0);
1471 nameSpace = newSpace;
1472 if(name[c] == ':')
1473 c++;
1474 start = c + 1;
1475 }
1476 }
1477 }
1478 }
1479 if(c - start)
1480 {
1481 int offsetClass;
1482 int totalSizeClass;
1483 struct __ecereNameSpace__ecere__com__BTNamedLink * classLink = (((void *)0));
1484 struct __ecereNameSpace__ecere__com__Class * _class = (((void *)0));
1485 const char * dataTypeString = (((void *)0));
1486 struct __ecereNameSpace__ecere__com__Class * enumBase = (((void *)0));
1487 struct __ecereNameSpace__ecere__com__Class * base = (baseName && baseName[0]) ? __ecereNameSpace__ecere__com__eSystem_FindClass(module, baseName) : (((void *)0));
1488 struct __ecereNameSpace__ecere__com__Class * prevBase = (((void *)0));
1489
1490 if(base && !base->internalDecl && (base->type == 5 || base->type == 1 || base->type == 0))
1491 {
1492 if(base->type == 1 && type == 0)
1493 type = 5;
1494 else
1495 type = base->type;
1496 }
1497 if(base && (type == 0 || type == 5 || type == 1) && (base->type == 3 || base->type == 2 || base->type == 4))
1498 {
1499 type = base->type;
1500 }
1501 if(!base || base->type == 1000 || base->isInstanceClass)
1502 {
1503 if(type == 4)
1504 {
1505 if(base || !baseName || !baseName[0] || !strcmp(baseName, "unsigned int") || !strcmp(baseName, "uint") || !strcmp(baseName, "unsigned int64") || !strcmp(baseName, "uint64") || !strcmp(baseName, "int64") || !strcmp(baseName, "unsigned short") || !strcmp(baseName, "short") || !strcmp(baseName, "unsigned char") || !strcmp(baseName, "byte") || !strcmp(baseName, "char") || !strcmp(baseName, "uint32") || !strcmp(baseName, "uint16"))
1506 {
1507 base = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "enum");
1508 dataTypeString = (baseName && baseName[0]) ? baseName : "int";
1509 }
1510 else
1511 {
1512 base = __ecereNameSpace__ecere__com__eSystem_RegisterClass((int)0, baseName, (((void *)0)), 0, 0, (((void *)0)), (((void *)0)), module, declMode, 1);
1513 base->internalDecl = 1;
1514 enumBase = base;
1515 base = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "enum");
1516 }
1517 }
1518 else if(type == 1 && (!baseName || !baseName[0]))
1519 {
1520 base = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "struct");
1521 dataTypeString = name + start;
1522 }
1523 else
1524 {
1525 if(type == 0)
1526 dataTypeString = "struct __ecereNameSpace__ecere__com__Instance";
1527 else if(type == 5)
1528 dataTypeString = "void *";
1529 else if(type == 2)
1530 dataTypeString = (baseName && baseName[0]) ? baseName : "unsigned int";
1531 else if(type == 3)
1532 dataTypeString = (baseName && baseName[0]) ? baseName : "int";
1533 else if(type == 1)
1534 dataTypeString = name + start;
1535 if(base || (!baseName || !baseName[0]) || type == 2 || type == 3)
1536 {
1537 if(base || !baseName || !baseName[0] || !strcmp(baseName, "unsigned int") || !strcmp(baseName, "uint") || !strcmp(baseName, "unsigned int64") || !strcmp(baseName, "uint64") || !strcmp(baseName, "int64") || !strcmp(baseName, "unsigned short") || !strcmp(baseName, "short") || !strcmp(baseName, "unsigned char") || !strcmp(baseName, "byte") || !strcmp(baseName, "char") || !strcmp(baseName, "uint32") || !strcmp(baseName, "uint16"))
1538 {
1539 if(type == 0 && strcmp(name, "ecere::com::Instance") && strcmp(name, "enum") && strcmp(name, "struct"))
1540 base = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "ecere::com::Instance");
1541 else
1542 base = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "class");
1543 }
1544 }
1545 else
1546 {
1547 }
1548 }
1549 }
1550 else
1551 {
1552 if(type == 4)
1553 {
1554 if(base->type != 4)
1555 {
1556 enumBase = base;
1557 base = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "enum");
1558 }
1559 }
1560 dataTypeString = enumBase ? enumBase->dataTypeString : base->dataTypeString;
1561 }
1562 offsetClass = base ? base->sizeClass : (type == 5 ? 0 : 0);
1563 totalSizeClass = offsetClass + sizeClass;
1564 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(module, name);
1565 if(!_class)
1566 {
1567 const char * colons = __ecereNameSpace__ecere__sys__RSearchString(name, "::", strlen(name), 1, 0);
1568
1569 if(colons && colons)
1570 {
1571 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(module, colons + 2);
1572 if(_class)
1573 {
1574 if(_class->internalDecl)
1575 {
1576 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)_class->fullName), _class->fullName = 0);
1577 _class->fullName = __ecereNameSpace__ecere__sys__CopyString(name);
1578 }
1579 else
1580 _class = (((void *)0));
1581 }
1582 }
1583 }
1584 if(_class)
1585 {
1586 if(!_class->internalDecl)
1587 {
1588 if(declMode != 4)
1589 printf("error: Redefinition of class %s\n", name);
1590 else
1591 {
1592 _class->comRedefinition = 1;
1593 return _class;
1594 }
1595 return (((void *)0));
1596 }
1597 __ecereNameSpace__ecere__com__FreeTemplatesDerivatives(_class);
1598 classLink = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&(*_class->nameSpace).classes, name + start);
1599 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Delete(&(*_class->nameSpace).classes, (struct __ecereNameSpace__ecere__sys__BTNode *)classLink);
1600 {
1601 struct __ecereNameSpace__ecere__sys__OldLink * t;
1602
1603 for(t = _class->templatized.first; t; t = t->next)
1604 {
1605 struct __ecereNameSpace__ecere__com__Class * template = t->data;
1606
1607 classLink = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&(*_class->nameSpace).classes, template->name);
1608 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Delete(&(*_class->nameSpace).classes, (struct __ecereNameSpace__ecere__sys__BTNode *)classLink);
1609 }
1610 }
1611 {
1612 struct __ecereNameSpace__ecere__com__NameSpace * ns = _class->nameSpace;
1613
1614 while((*ns).parent && !__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&(*ns).classes) && !__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&(*ns).functions) && !__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&(*ns).defines) && !__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&(*ns).nameSpaces))
1615 {
1616 struct __ecereNameSpace__ecere__com__NameSpace * parent = (*ns).parent;
1617
1618 __ecereNameSpace__ecere__com__NameSpace_Free(ns);
1619 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Delete(&(*parent).nameSpaces, (struct __ecereNameSpace__ecere__sys__BTNode *)ns);
1620 ns = parent;
1621 }
1622 }
1623 }
1624 else
1625 {
1626 classLink = __ecereNameSpace__ecere__com__SearchNameSpace(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application + structSize_Instance)))->privateNameSpace, name, &(*((struct __ecereNameSpace__ecere__com__NameSpace *)0)).classes);
1627 if(!classLink)
1628 classLink = __ecereNameSpace__ecere__com__SearchNameSpace(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application + structSize_Instance)))->publicNameSpace, name, &(*((struct __ecereNameSpace__ecere__com__NameSpace *)0)).classes);
1629 if(!classLink)
1630 classLink = __ecereNameSpace__ecere__com__SearchNameSpace(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application + structSize_Instance)))->privateNameSpace, name + start, &(*((struct __ecereNameSpace__ecere__com__NameSpace *)0)).classes);
1631 if(!classLink)
1632 classLink = __ecereNameSpace__ecere__com__SearchNameSpace(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application + structSize_Instance)))->publicNameSpace, name + start, &(*((struct __ecereNameSpace__ecere__com__NameSpace *)0)).classes);
1633 if(classLink)
1634 _class = classLink->data;
1635 if(_class && _class->internalDecl)
1636 {
1637 __ecereNameSpace__ecere__com__FreeTemplatesDerivatives(_class);
1638 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Delete(&(*_class->nameSpace).classes, (struct __ecereNameSpace__ecere__sys__BTNode *)classLink);
1639 {
1640 struct __ecereNameSpace__ecere__sys__OldLink * t;
1641
1642 for(t = _class->templatized.first; t; t = t->next)
1643 {
1644 struct __ecereNameSpace__ecere__com__Class * template = t->data;
1645
1646 classLink = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&(*_class->nameSpace).classes, template->name);
1647 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Delete(&(*_class->nameSpace).classes, (struct __ecereNameSpace__ecere__sys__BTNode *)classLink);
1648 }
1649 }
1650 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)_class->fullName), _class->fullName = 0);
1651 _class->fullName = __ecereNameSpace__ecere__sys__CopyString(name);
1652 }
1653 else
1654 {
1655 _class = __ecereNameSpace__ecere__com___calloc(1, sizeof(struct __ecereNameSpace__ecere__com__Class));
1656 _class->methods.CompareKey = (void *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString;
1657 _class->members.CompareKey = (void *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString;
1658 _class->prop.CompareKey = (void *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString;
1659 _class->classProperties.CompareKey = (void *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString;
1660 _class->name = __ecereNameSpace__ecere__sys__CopyString(name + start);
1661 _class->fullName = __ecereNameSpace__ecere__sys__CopyString(name);
1662 }
1663 }
1664 if(nameSpace)
1665 {
1666 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&(*nameSpace).classes, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
1667 struct __ecereNameSpace__ecere__com__BTNamedLink * __ecereInstance1 = __ecereNameSpace__ecere__com__eSystem_New0(structSize_BTNamedLink);
1668
1669 __ecereInstance1->name = (char *)_class->name, __ecereInstance1->data = _class, __ecereInstance1;
1670 }));
1671 {
1672 struct __ecereNameSpace__ecere__sys__OldLink * t;
1673
1674 for(t = _class->templatized.first; t; t = t->next)
1675 {
1676 struct __ecereNameSpace__ecere__com__Class * template = t->data;
1677
1678 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&(*nameSpace).classes, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
1679 struct __ecereNameSpace__ecere__com__BTNamedLink * __ecereInstance1 = __ecereNameSpace__ecere__com__eSystem_New0(structSize_BTNamedLink);
1680
1681 __ecereInstance1->name = (char *)template->name, __ecereInstance1->data = template, __ecereInstance1;
1682 }));
1683 }
1684 }
1685 }
1686 if(_class)
1687 {
1688 if(!base && baseName && strcmp(baseName, name))
1689 {
1690 if(strchr(baseName, '<'))
1691 {
1692 char templateClassName[1024];
1693 struct __ecereNameSpace__ecere__com__Class * templateBase;
1694
1695 strcpy(templateClassName, baseName);
1696 *strchr(templateClassName, '<') = '\0';
1697 templateBase = __ecereNameSpace__ecere__com__eSystem_FindClass(module, templateClassName);
1698 if(!templateBase)
1699 {
1700 templateBase = __ecereNameSpace__ecere__com__eSystem_RegisterClass((int)0, templateClassName, (((void *)0)), 0, 0, (((void *)0)), (((void *)0)), module, declMode, 1);
1701 templateBase->internalDecl = 1;
1702 }
1703 base = __ecereNameSpace__ecere__com__eSystem_FindClass(module, baseName);
1704 }
1705 else
1706 {
1707 base = __ecereNameSpace__ecere__com__eSystem_RegisterClass((int)0, baseName, (((void *)0)), 0, 0, (((void *)0)), (((void *)0)), module, declMode, 1);
1708 base->internalDecl = 1;
1709 }
1710 }
1711 else
1712 _class->internalDecl = 0;
1713 if(totalSizeClass)
1714 {
1715 _class->data = __ecereNameSpace__ecere__com__eSystem_Renew(_class->data, sizeof(unsigned char) * (totalSizeClass));
1716 if(base && base->type != 1000 && base->type != 4)
1717 memcpy(_class->data, base->data, offsetClass);
1718 else
1719 memset(_class->data, 0, offsetClass);
1720 memset((unsigned char *)_class->data + offsetClass, 0, sizeClass);
1721 }
1722 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)_class->dataTypeString), _class->dataTypeString = 0);
1723 _class->dataTypeString = __ecereNameSpace__ecere__sys__CopyString(dataTypeString);
1724 _class->defaultAlignment = base ? base->defaultAlignment : 0;
1725 if(_class->module)
1726 {
1727 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)_class->module + structSize_Instance)))->classes, _class);
1728 }
1729 if(_class->base)
1730 {
1731 struct __ecereNameSpace__ecere__com__Class * base = _class->base;
1732 struct __ecereNameSpace__ecere__sys__OldLink * deriv = __ecereMethod___ecereNameSpace__ecere__sys__OldList_FindLink(&base->derivatives, _class);
1733
1734 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Delete(&base->derivatives, deriv);
1735 }
1736 if(module)
1737 {
1738 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->classes, _class);
1739 }
1740 _class->nameSpace = nameSpace;
1741 {
1742 struct __ecereNameSpace__ecere__sys__OldLink * t;
1743
1744 for(t = _class->templatized.first; t; t = t->next)
1745 {
1746 struct __ecereNameSpace__ecere__com__Class * template = t->data;
1747
1748 template->nameSpace = nameSpace;
1749 }
1750 }
1751 _class->module = module;
1752 prevBase = _class->base;
1753 _class->base = base;
1754 if(base)
1755 {
1756 int numParams = 0;
1757 struct __ecereNameSpace__ecere__com__Class * sClass;
1758
1759 for(sClass = base; sClass; sClass = sClass->base)
1760 {
1761 if(sClass->templateClass)
1762 sClass = sClass->templateClass;
1763 numParams += sClass->templateParams.count;
1764 }
1765 if(numParams)
1766 {
1767 if(_class->templateArgs)
1768 {
1769 __ecereNameSpace__ecere__com__FreeTemplateArgs(_class);
1770 }
1771 (__ecereNameSpace__ecere__com__eSystem_Delete(_class->templateArgs), _class->templateArgs = 0);
1772 _class->templateArgs = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(struct __ecereNameSpace__ecere__com__ClassTemplateArgument) * (numParams));
1773 _class->numParams = numParams;
1774 for(sClass = _class; sClass; sClass = sClass->base)
1775 {
1776 struct __ecereNameSpace__ecere__com__Class * prevClass;
1777 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
1778 int id = 0;
1779
1780 if(sClass->templateClass)
1781 sClass = sClass->templateClass;
1782 for(prevClass = sClass->base; prevClass; prevClass = prevClass->base)
1783 {
1784 if(prevClass->templateClass)
1785 prevClass = prevClass->templateClass;
1786 id += prevClass->templateParams.count;
1787 }
1788 if(base->templateArgs)
1789 {
1790 for(param = sClass->templateParams.first; param; param = param->next)
1791 {
1792 _class->templateArgs[id] = base->templateArgs[id];
1793 __ecereNameSpace__ecere__com__CopyTemplateArg(param, &_class->templateArgs[id]);
1794 id++;
1795 }
1796 }
1797 }
1798 }
1799 }
1800 _class->memberID = _class->startMemberID = (base && (type == 0 || type == 5 || type == 1)) ? base->memberID : 0;
1801 if(type == 0 || type == 5)
1802 _class->offset = (base && base->structSize && base->type != 1000) ? base->structSize : ((type == 5) ? 0 : ((force64Bits && inCompiler && fixed) ? 24 : (force32Bits && inCompiler && fixed) ? 12 : structSize_Instance));
1803 if(crossBits)
1804 {
1805 if(!strcmp(name, "GNOSISSystem") || !strcmp(name, "LineStyle") || !strcmp(name, "FillStyle") || !strcmp(name, "FontObject") || !strcmp(name, "SymbolStyle"))
1806 {
1807 _class->offset = force32Bits ? 24 : 12;
1808 }
1809 else if(strstr(name, "ecere::sys::EARHeader") || strstr(name, "AnchorValue") || !strcmp(name, "ecere::com::CustomAVLTree") || !strcmp(name, "ecere::com::Array") || !strcmp(name, "ecere::gui::Window") || !strcmp(name, "ecere::sys::Mutex"))
1810 ;
1811 else
1812 {
1813 if(!strcmp(name, "ecere::sys::FileListing"))
1814 {
1815 size = 3 * (force32Bits ? 4 : 8);
1816 _class->structAlignment = force32Bits ? 4 : 8;
1817 }
1818 else if(!strcmp(name, "ecere::com::Class"))
1819 size = 0;
1820 else if(!strcmp(name, "ecere::com::ClassProperty"))
1821 size = 0;
1822 else if(!strcmp(name, "ecere::com::NameSpace"))
1823 size = 0;
1824 else if(!strcmp(name, "ecere::sys::BufferedFile"))
1825 size = 0;
1826 else if(!strcmp(name, "ecere::sys::BTNode"))
1827 size = 0;
1828 else if(!strcmp(name, "ecere::sys::StringBTNode"))
1829 size = 0;
1830 else if(!strcmp(name, "ecere::sys::OldList"))
1831 size = 0;
1832 else if(!strcmp(name, "ecere::sys::Item"))
1833 size = 0;
1834 else if(!strcmp(name, "ecere::sys::NamedLink"))
1835 size = 0;
1836 else if(!strcmp(name, "ecere::sys::NamedLink64"))
1837 size = 0;
1838 else if(!strcmp(name, "ecere::sys::OldLink"))
1839 size = 0;
1840 else if(!strcmp(name, "ecere::sys::NamedItem"))
1841 size = 0;
1842 else if(!strcmp(name, "ecere::sys::NamedItem64"))
1843 size = 0;
1844 else if(!strcmp(name, "ecere::sys::BinaryTree"))
1845 size = 0;
1846 else if(module != ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application && inCompiler)
1847 {
1848 if(fixed || type == 1)
1849 size = 0;
1850 }
1851 }
1852 }
1853 if(type == 1)
1854 {
1855 _class->memberOffset = (base && base->structSize && base->type != 1000) ? base->structSize : 0;
1856 _class->typeSize = _class->structSize = _class->memberOffset + size;
1857 }
1858 else if(type == 2 || type == 4 || type == 3)
1859 {
1860 struct __ecereNameSpace__ecere__com__Class * dataTypeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, dataTypeString);
1861
1862 if(dataTypeClass)
1863 _class->typeSize = dataTypeClass->typeSize;
1864 _class->structSize = 0;
1865 }
1866 else if(type == 0 || type == 5)
1867 {
1868 _class->structSize = _class->offset + size;
1869 _class->typeSize = sizeof(void *);
1870 }
1871 _class->offsetClass = offsetClass;
1872 _class->sizeClass = totalSizeClass;
1873 _class->Constructor = Constructor;
1874 _class->Destructor = Destructor;
1875 if(_class->type != 1000)
1876 _class->type = type;
1877 if(!size)
1878 _class->computeSize = 1;
1879 else
1880 _class->computeSize = 0;
1881 _class->inheritanceAccess = inheritanceAccess;
1882 if(type == 4)
1883 {
1884 if(enumBase)
1885 _class->base = base = enumBase;
1886 {
1887 struct __ecereNameSpace__ecere__com__EnumClassData * data = (struct __ecereNameSpace__ecere__com__EnumClassData *)_class->data;
1888
1889 if(base && base->type != 4)
1890 data->largest = -1;
1891 else
1892 data->largest = ((struct __ecereNameSpace__ecere__com__EnumClassData *)base->data)->largest;
1893 }
1894 }
1895 if(base)
1896 {
1897 int i;
1898 unsigned int oldSize = _class->vTblSize;
1899
1900 if(base->vTblSize && _class->vTblSize < base->vTblSize)
1901 {
1902 _class->vTblSize = base->vTblSize;
1903 _class->_vTbl = __ecereNameSpace__ecere__com___realloc(_class->_vTbl, sizeof(int (*)()) * _class->vTblSize);
1904 }
1905 if(!prevBase)
1906 {
1907 if(_class->type == 0 && strcmp(_class->name, "ecere::com::Instance") && strcmp(_class->name, "enum") && strcmp(_class->name, "struct"))
1908 prevBase = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "ecere::com::Instance");
1909 else
1910 prevBase = __ecereNameSpace__ecere__com__eSystem_FindClass(module, "class");
1911 }
1912 for(i = 0; i < base->vTblSize; i++)
1913 {
1914 if(i >= oldSize || _class->_vTbl[i] == prevBase->_vTbl[i])
1915 _class->_vTbl[i] = base->_vTbl[i];
1916 }
1917 }
1918 if(_class->base)
1919 {
1920 struct __ecereNameSpace__ecere__sys__OldLink * link = (link = __ecereNameSpace__ecere__com__eSystem_New0(structSize_OldLink), link->data = _class, link);
1921
1922 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&_class->base->derivatives, link);
1923 }
1924 __ecereNameSpace__ecere__com__FixDerivativesBase(_class, _class);
1925 return _class;
1926 }
1927 }
1928 return (((void *)0));
1929 }
1930
1931 static void __ecereNameSpace__ecere__com__DataMember_Free(struct __ecereNameSpace__ecere__com__DataMember * parentMember)
1932 {
1933 struct __ecereNameSpace__ecere__com__DataMember * member;
1934 struct __ecereNameSpace__ecere__com__BTNamedLink * namedLink;
1935
1936 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)parentMember->name), parentMember->name = 0);
1937 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)parentMember->dataTypeString), parentMember->dataTypeString = 0);
1938 while((member = parentMember->members.first))
1939 {
1940 __ecereNameSpace__ecere__com__DataMember_Free(member);
1941 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Delete(&parentMember->members, member);
1942 }
1943 while((namedLink = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&parentMember->membersAlpha)))
1944 {
1945 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Delete(&parentMember->membersAlpha, (struct __ecereNameSpace__ecere__sys__BTNode *)namedLink);
1946 }
1947 }
1948
1949 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__NamedLink64;
1950
1951 struct __ecereNameSpace__ecere__sys__NamedLink64
1952 {
1953 struct __ecereNameSpace__ecere__sys__NamedLink64 * prev;
1954 struct __ecereNameSpace__ecere__sys__NamedLink64 * next;
1955 char *  name;
1956 long long data;
1957 } __attribute__ ((gcc_struct));
1958
1959 static void __ecereNameSpace__ecere__com__FreeEnumValue(struct __ecereNameSpace__ecere__sys__NamedLink64 * value)
1960 {
1961 (__ecereNameSpace__ecere__com__eSystem_Delete(value->name), value->name = 0);
1962 }
1963
1964 static void __ecereNameSpace__ecere__com__FreeTemplateArg(struct __ecereNameSpace__ecere__com__Class * template, struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param, int id)
1965 {
1966 switch(param->type)
1967 {
1968 case 0:
1969 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)template->templateArgs[id].__anon1.__anon1.dataTypeString), template->templateArgs[id].__anon1.__anon1.dataTypeString = 0);
1970 break;
1971 case 1:
1972 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)template->templateArgs[id].__anon1.__anon2.memberString), template->templateArgs[id].__anon1.__anon2.memberString = 0);
1973 break;
1974 case 2:
1975 break;
1976 }
1977 }
1978
1979 static void __ecereNameSpace__ecere__com__FreeTemplateArgs(struct __ecereNameSpace__ecere__com__Class * template)
1980 {
1981 if(template->templateArgs)
1982 {
1983 struct __ecereNameSpace__ecere__com__Class * _class;
1984
1985 for(_class = template; _class; _class = _class->base)
1986 {
1987 struct __ecereNameSpace__ecere__com__Class * prevClass;
1988 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
1989 int id = 0;
1990
1991 if(_class->templateClass)
1992 _class = _class->templateClass;
1993 for(prevClass = _class->base; prevClass; prevClass = prevClass->base)
1994 {
1995 if(prevClass->templateClass)
1996 prevClass = prevClass->templateClass;
1997 id += prevClass->templateParams.count;
1998 }
1999 if(id < template->numParams)
2000 {
2001 for(param = _class->templateParams.first; param; param = param->next)
2002 {
2003 switch(param->type)
2004 {
2005 case 0:
2006 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)template->templateArgs[id].__anon1.__anon1.dataTypeString), template->templateArgs[id].__anon1.__anon1.dataTypeString = 0);
2007 break;
2008 case 1:
2009 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)template->templateArgs[id].__anon1.__anon2.memberString), template->templateArgs[id].__anon1.__anon2.memberString = 0);
2010 break;
2011 case 2:
2012 break;
2013 }
2014 id++;
2015 }
2016 }
2017 }
2018 }
2019 }
2020
2021 static void __ecereNameSpace__ecere__com__FreeTemplate(struct __ecereNameSpace__ecere__com__Class * template)
2022 {
2023 struct __ecereNameSpace__ecere__sys__OldLink * deriv;
2024
2025 if(template->nameSpace)
2026 {
2027 struct __ecereNameSpace__ecere__com__BTNamedLink * link = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&(*template->nameSpace).classes, template->name);
2028
2029 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Delete(&(*template->nameSpace).classes, (struct __ecereNameSpace__ecere__sys__BTNode *)link);
2030 }
2031 __ecereNameSpace__ecere__com__FreeTemplateArgs(template);
2032 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)template->fullName), template->fullName = 0);
2033 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)template->name), template->name = 0);
2034 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)template->templateArgs), template->templateArgs = 0);
2035 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)template->dataTypeString), template->dataTypeString = 0);
2036 while((deriv = template->derivatives.first))
2037 {
2038 ((struct __ecereNameSpace__ecere__com__Class *)deriv->data)->base = (((void *)0));
2039 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Delete(&template->derivatives, deriv);
2040 }
2041 __ecereNameSpace__ecere__com___free(template);
2042 }
2043
2044 static void __ecereNameSpace__ecere__com__FreeTemplates(struct __ecereNameSpace__ecere__com__Class * _class)
2045 {
2046 struct __ecereNameSpace__ecere__sys__OldLink * deriv, * template;
2047
2048 for(deriv = _class->derivatives.first; deriv; deriv = deriv->next)
2049 {
2050 __ecereNameSpace__ecere__com__FreeTemplates(deriv->data);
2051 }
2052 __ecereNameSpace__ecere__com__FreeTemplateArgs(_class);
2053 (__ecereNameSpace__ecere__com__eSystem_Delete(_class->templateArgs), _class->templateArgs = 0);
2054 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)_class->dataTypeString), _class->dataTypeString = 0);
2055 while((template = _class->templatized.first))
2056 {
2057 __ecereNameSpace__ecere__com__FreeTemplates(template->data);
2058 __ecereNameSpace__ecere__com__FreeTemplate(template->data);
2059 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Delete(&_class->templatized, template);
2060 }
2061 }
2062
2063 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(struct __ecereNameSpace__ecere__sys__OldList * this, void (*  freeFn)(void * ));
2064
2065 void __ecereNameSpace__ecere__com__eClass_Unregister(struct __ecereNameSpace__ecere__com__Class * _class)
2066 {
2067 struct __ecereNameSpace__ecere__com__BTNamedLink * namedLink;
2068 struct __ecereNameSpace__ecere__com__DataMember * member;
2069 struct __ecereNameSpace__ecere__com__Method * method;
2070 struct __ecereNameSpace__ecere__sys__OldLink * deriv, * template;
2071 struct __ecereNameSpace__ecere__com__ClassProperty * classProp;
2072 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
2073
2074 (__ecereNameSpace__ecere__com__eSystem_Delete(_class->_vTbl), _class->_vTbl = 0);
2075 __ecereNameSpace__ecere__com__FreeTemplates(_class);
2076 __ecereNameSpace__ecere__com__FreeTemplateArgs(_class);
2077 (__ecereNameSpace__ecere__com__eSystem_Delete(_class->templateArgs), _class->templateArgs = 0);
2078 while((template = _class->templatized.first))
2079 {
2080 __ecereNameSpace__ecere__com__FreeTemplate(template->data);
2081 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Delete(&_class->templatized, template);
2082 }
2083 while((member = _class->membersAndProperties.first))
2084 {
2085 if(!member->isProperty && (member->type == 1 || member->type == 2))
2086 __ecereNameSpace__ecere__com__DataMember_Free(member);
2087 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)member->name), member->name = 0);
2088 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)member->dataTypeString), member->dataTypeString = 0);
2089 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Delete(&_class->membersAndProperties, member);
2090 }
2091 while((member = _class->conversions.first))
2092 {
2093 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)member->name), member->name = 0);
2094 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)member->dataTypeString), member->dataTypeString = 0);
2095 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Delete(&_class->conversions, member);
2096 }
2097 while((namedLink = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&_class->prop)))
2098 {
2099 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Delete(&_class->prop, (struct __ecereNameSpace__ecere__sys__BTNode *)namedLink);
2100 }
2101 while((namedLink = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&_class->members)))
2102 {
2103 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Delete(&_class->members, (struct __ecereNameSpace__ecere__sys__BTNode *)namedLink);
2104 }
2105 while((classProp = (struct __ecereNameSpace__ecere__com__ClassProperty *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&_class->classProperties)))
2106 {
2107 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)classProp->name), classProp->name = 0);
2108 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)classProp->dataTypeString), classProp->dataTypeString = 0);
2109 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Delete(&_class->classProperties, (struct __ecereNameSpace__ecere__sys__BTNode *)classProp);
2110 }
2111 while((method = (struct __ecereNameSpace__ecere__com__Method *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&_class->methods)))
2112 {
2113 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)method->name), method->name = 0);
2114 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)method->dataTypeString), method->dataTypeString = 0);
2115 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Delete(&_class->methods, (struct __ecereNameSpace__ecere__sys__BTNode *)method);
2116 }
2117 if(_class->type == 4)
2118 {
2119 struct __ecereNameSpace__ecere__com__EnumClassData * data = (struct __ecereNameSpace__ecere__com__EnumClassData *)_class->data;
2120
2121 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&data->values, (void *)__ecereNameSpace__ecere__com__FreeEnumValue);
2122 }
2123 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&_class->delayedCPValues, (((void *)0)));
2124 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&_class->selfWatchers, (((void *)0)));
2125 if(_class->base)
2126 {
2127 struct __ecereNameSpace__ecere__com__Class * base = _class->base;
2128
2129 for(deriv = base->derivatives.first; deriv; deriv = deriv->next)
2130 {
2131 if(deriv->data == _class)
2132 break;
2133 }
2134 if(deriv)
2135 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Delete(&base->derivatives, deriv);
2136 }
2137 while((deriv = _class->derivatives.first))
2138 {
2139 ((struct __ecereNameSpace__ecere__com__Class *)deriv->data)->base = (((void *)0));
2140 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Delete(&_class->derivatives, deriv);
2141 }
2142 if(_class->nameSpace)
2143 {
2144 struct __ecereNameSpace__ecere__com__BTNamedLink * link = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&(*_class->nameSpace).classes, _class->name);
2145
2146 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Delete(&(*_class->nameSpace).classes, (struct __ecereNameSpace__ecere__sys__BTNode *)link);
2147 }
2148 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)_class->name), _class->name = 0);
2149 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)_class->fullName), _class->fullName = 0);
2150 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)_class->dataTypeString), _class->dataTypeString = 0);
2151 (__ecereNameSpace__ecere__com__eSystem_Delete(_class->data), _class->data = 0);
2152 while((param = _class->templateParams.first))
2153 {
2154 switch(param->type)
2155 {
2156 case 0:
2157 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)param->defaultArg.__anon1.__anon1.dataTypeString), param->defaultArg.__anon1.__anon1.dataTypeString = 0);
2158 break;
2159 case 1:
2160 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)param->defaultArg.__anon1.__anon2.memberString), param->defaultArg.__anon1.__anon2.memberString = 0);
2161 break;
2162 case 2:
2163 break;
2164 }
2165 if(param->type != 1)
2166 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)param->__anon1.dataTypeString), param->__anon1.dataTypeString = 0);
2167 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)param->name), param->name = 0);
2168 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Delete(&_class->templateParams, param);
2169 }
2170 __ecereNameSpace__ecere__com___free(_class);
2171 }
2172
2173 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Find(struct __ecereNameSpace__ecere__sys__BinaryTree * this, uintptr_t key);
2174
2175 static struct __ecereNameSpace__ecere__com__BTNamedLink * __ecereNameSpace__ecere__com__ScanNameSpace(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace, const char * name, void * listOffset)
2176 {
2177 struct __ecereNameSpace__ecere__sys__BinaryTree * tree = (struct __ecereNameSpace__ecere__sys__BinaryTree *)((unsigned char *)nameSpace + (uintptr_t)listOffset);
2178 struct __ecereNameSpace__ecere__com__BTNamedLink * link = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Find((&*tree), (uintptr_t)name);
2179 struct __ecereNameSpace__ecere__com__NameSpace * child;
2180
2181 if(!link)
2182 {
2183 for(child = (struct __ecereNameSpace__ecere__com__NameSpace *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&nameSpace->nameSpaces); child; child = (struct __ecereNameSpace__ecere__com__NameSpace *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)child)))
2184 {
2185 link = __ecereNameSpace__ecere__com__ScanNameSpace(child, name, listOffset);
2186 if(link)
2187 break;
2188 }
2189 }
2190 return link;
2191 }
2192
2193 static struct __ecereNameSpace__ecere__com__BTNamedLink * __ecereNameSpace__ecere__com__SearchNameSpace(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace, const char * name, void * listOffset)
2194 {
2195 int start = 0, c;
2196 char ch;
2197 int level = 0;
2198
2199 for(c = 0; (ch = name[c]); c++)
2200 {
2201 if(ch == '<')
2202 level++;
2203 if(ch == '>')
2204 level--;
2205 if(level == 0 && (ch == '.' || (ch == ':' && name[c + 1] == ':')))
2206 {
2207 struct __ecereNameSpace__ecere__com__NameSpace * newSpace;
2208 char * spaceName = __ecereNameSpace__ecere__com___malloc(c - start + 1);
2209
2210 memcpy(spaceName, name + start, c - start);
2211 spaceName[c - start] = '\0';
2212 newSpace = (struct __ecereNameSpace__ecere__com__NameSpace *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&nameSpace->nameSpaces, spaceName);
2213 __ecereNameSpace__ecere__com___free(spaceName);
2214 if(!newSpace)
2215 return (((void *)0));
2216 nameSpace = newSpace;
2217 if(level == 0 && ch == ':')
2218 c++;
2219 start = c + 1;
2220 }
2221 }
2222 if(c - start)
2223 {
2224 return __ecereNameSpace__ecere__com__ScanNameSpace(nameSpace, name + start, listOffset);
2225 }
2226 return (((void *)0));
2227 }
2228
2229 static struct __ecereNameSpace__ecere__com__BTNamedLink * __ecereNameSpace__ecere__com__SearchModule(struct __ecereNameSpace__ecere__com__Instance * module, const char * name, void * listOffset, unsigned int searchPrivate)
2230 {
2231 struct __ecereNameSpace__ecere__com__SubModule * subModule;
2232 struct __ecereNameSpace__ecere__com__BTNamedLink * link;
2233
2234 if(searchPrivate)
2235 {
2236 link = __ecereNameSpace__ecere__com__SearchNameSpace(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->privateNameSpace, name, listOffset);
2237 if(link)
2238 return link;
2239 }
2240 link = __ecereNameSpace__ecere__com__SearchNameSpace(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->publicNameSpace, name, listOffset);
2241 if(link)
2242 return link;
2243 for(subModule = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->modules.first; subModule; subModule = subModule->next)
2244 {
2245 if(searchPrivate || subModule->importMode == 1)
2246 {
2247 link = __ecereNameSpace__ecere__com__SearchModule(subModule->module, name, listOffset, 0);
2248 if(link)
2249 return link;
2250 }
2251 }
2252 return (((void *)0));
2253 }
2254
2255 extern int isspace(int c);
2256
2257 long long __ecereNameSpace__ecere__com___strtoi64(const char * string, const char ** endString, int base)
2258 {
2259 long long value = 0;
2260 int sign = 1;
2261 int c;
2262 char ch;
2263
2264 for(c = 0; (ch = string[c]) && isspace(ch); c++)
2265 ;
2266 if(ch == '+')
2267 c++;
2268 else if(ch == '-')
2269 {
2270 sign = -1;
2271 c++;
2272 }
2273 ;
2274 if(!base)
2275 {
2276 if(ch == '0' && string[c + 1] == 'x')
2277 {
2278 base = 16;
2279 c += 2;
2280 }
2281 else if(ch == '0')
2282 {
2283 base = 8;
2284 c++;
2285 }
2286 else
2287 base = 10;
2288 }
2289 for(; (ch = string[c]); c++)
2290 {
2291 if(ch >= '0' && ch <= '9')
2292 ch -= '0';
2293 else if(ch >= 'a' && ch <= 'z')
2294 ch -= ('a' - 10);
2295 else if(ch >= 'A' && ch <= 'Z')
2296 ch -= ('A' - 10);
2297 else
2298 {
2299 if(endString)
2300 *endString = string + c;
2301 break;
2302 }
2303 if(ch < base)
2304 {
2305 value *= base;
2306 value += ch;
2307 }
2308 else
2309 {
2310 if(endString)
2311 *endString = string + c;
2312 break;
2313 }
2314 }
2315 return sign * value;
2316 }
2317
2318 uint64 __ecereNameSpace__ecere__com___strtoui64(const char * string, const char ** endString, int base)
2319 {
2320 uint64 value = 0;
2321 int sign = 1;
2322 int c;
2323 char ch;
2324
2325 for(c = 0; (ch = string[c]) && isspace(ch); c++)
2326 ;
2327 if(ch == '+')
2328 c++;
2329 else if(ch == '-')
2330 {
2331 sign = -1;
2332 c++;
2333 }
2334 ;
2335 if(!base)
2336 {
2337 if(ch == '0' && string[c + 1] == 'x')
2338 {
2339 base = 16;
2340 c += 2;
2341 }
2342 else if(ch == '0')
2343 {
2344 base = 8;
2345 c++;
2346 }
2347 else
2348 base = 10;
2349 }
2350 for(; (ch = string[c]); c++)
2351 {
2352 if(ch >= '0' && ch <= '9')
2353 ch -= '0';
2354 else if(ch >= 'a' && ch <= 'z')
2355 ch -= ('a' - 10);
2356 else if(ch >= 'A' && ch <= 'Z')
2357 ch -= ('A' - 10);
2358 else
2359 {
2360 if(endString)
2361 *endString = string + c;
2362 break;
2363 }
2364 if(ch < base)
2365 {
2366 value *= base;
2367 value += ch;
2368 }
2369 else
2370 {
2371 if(endString)
2372 *endString = string + c;
2373 break;
2374 }
2375 }
2376 return sign * value;
2377 }
2378
2379 extern int strncmp(const char * , const char * , size_t n);
2380
2381 extern char *  strcat(char * , const char * );
2382
2383 struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_FindClass(struct __ecereNameSpace__ecere__com__Instance * module, const char * name)
2384 {
2385 if(name && module)
2386 {
2387 struct __ecereNameSpace__ecere__com__BTNamedLink * link;
2388
2389 if(!strncmp(name, "const ", 6))
2390 name += 6;
2391 link = __ecereNameSpace__ecere__com__SearchNameSpace(&((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application + structSize_Module)))->systemNameSpace, name, &(*((struct __ecereNameSpace__ecere__com__NameSpace *)0)).classes);
2392 if(link)
2393 return link->data;
2394 link = __ecereNameSpace__ecere__com__SearchModule(module, name, &(*((struct __ecereNameSpace__ecere__com__NameSpace *)0)).classes, 1);
2395 if(link)
2396 return link->data;
2397 {
2398 char noTemplateName[1024];
2399 char * templateParams = strchr(name, '<');
2400
2401 if(templateParams)
2402 {
2403 strncpy(noTemplateName, name, templateParams - name);
2404 noTemplateName[templateParams - name] = '\0';
2405 }
2406 else
2407 strcpy(noTemplateName, name);
2408 link = __ecereNameSpace__ecere__com__SearchNameSpace(&((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application + structSize_Module)))->systemNameSpace, noTemplateName, &(*((struct __ecereNameSpace__ecere__com__NameSpace *)0)).classes);
2409 if(!link)
2410 link = __ecereNameSpace__ecere__com__SearchModule(module, noTemplateName, &(*((struct __ecereNameSpace__ecere__com__NameSpace *)0)).classes, 1);
2411 if(link)
2412 {
2413 struct __ecereNameSpace__ecere__com__Class * _class = link->data;
2414 struct __ecereNameSpace__ecere__com__Class * templatedClass = (((void *)0));
2415 char className[1024];
2416
2417 strcpy(className, _class->fullName);
2418 strcat(className, templateParams);
2419 link = __ecereNameSpace__ecere__com__SearchNameSpace(&((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application + structSize_Module)))->systemNameSpace, className, &(*((struct __ecereNameSpace__ecere__com__NameSpace *)0)).classes);
2420 if(link)
2421 return link->data;
2422 link = __ecereNameSpace__ecere__com__SearchModule(module, className, &(*((struct __ecereNameSpace__ecere__com__NameSpace *)0)).classes, 1);
2423 if(link)
2424 return link->data;
2425 if(_class && templateParams)
2426 {
2427 struct __ecereNameSpace__ecere__sys__OldList __simpleStruct1 =
2428 {
2429 0, 0, 0, 0, 0
2430 };
2431 struct __ecereNameSpace__ecere__sys__OldList __simpleStruct0 =
2432 {
2433 0, 0, 0, 0, 0
2434 };
2435
2436 templatedClass = __ecereNameSpace__ecere__com__eSystem_New0(structSize_Class);
2437 *templatedClass = *_class;
2438 templatedClass->templateClass = _class;
2439 templatedClass->fullName = __ecereNameSpace__ecere__sys__CopyString(className);
2440 templatedClass->dataTypeString = __ecereNameSpace__ecere__sys__CopyString(_class->dataTypeString);
2441 templatedClass->name = __ecereNameSpace__ecere__sys__CopyString(templatedClass->fullName + strlen(_class->fullName) - strlen(_class->name));
2442 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&(*templatedClass->nameSpace).classes, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
2443 struct __ecereNameSpace__ecere__com__BTNamedLink * __ecereInstance1 = __ecereNameSpace__ecere__com__eSystem_New0(structSize_BTNamedLink);
2444
2445 __ecereInstance1->name = (char *)templatedClass->name, __ecereInstance1->data = templatedClass, __ecereInstance1;
2446 }));
2447 templatedClass->templateArgs = (((void *)0));
2448 templatedClass->numParams = 0;
2449 templatedClass->derivatives = __simpleStruct0;
2450 templatedClass->templatized = __simpleStruct1;
2451 __ecereNameSpace__ecere__com__ComputeClassParameters(templatedClass, templateParams, module);
2452 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&_class->templatized, __extension__ ({
2453 struct __ecereNameSpace__ecere__sys__OldLink * __ecereInstance1 = __ecereNameSpace__ecere__com__eSystem_New0(structSize_OldLink);
2454
2455 __ecereInstance1->data = templatedClass, __ecereInstance1;
2456 }));
2457 }
2458 return templatedClass;
2459 }
2460 }
2461 }
2462 return (((void *)0));
2463 }
2464
2465 static void __ecereNameSpace__ecere__com__CopyTemplateArg(struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param, struct __ecereNameSpace__ecere__com__ClassTemplateArgument * arg)
2466 {
2467 switch(param->type)
2468 {
2469 case 0:
2470 arg->__anon1.__anon1.dataTypeString = __ecereNameSpace__ecere__sys__CopyString(arg->__anon1.__anon1.dataTypeString);
2471 break;
2472 case 2:
2473 break;
2474 case 1:
2475 arg->__anon1.__anon2.memberString = __ecereNameSpace__ecere__sys__CopyString(arg->__anon1.__anon2.memberString);
2476 break;
2477 }
2478 }
2479
2480 extern char *  __ecereNameSpace__ecere__sys__TrimRSpaces(const char *  string, char *  output);
2481
2482 extern unsigned long strtoul(const char *  nptr, char * *  endptr, int base);
2483
2484 extern double strtod(const char * , char * * );
2485
2486 extern int sprintf(char * , const char * , ...);
2487
2488 struct __ecereNameSpace__ecere__com__DataMember * __ecereNameSpace__ecere__com__eClass_FindDataMember(struct __ecereNameSpace__ecere__com__Class * _class, const char *  name, struct __ecereNameSpace__ecere__com__Instance * module, struct __ecereNameSpace__ecere__com__DataMember **  subMemberStack, int *  subMemberStackPos);
2489
2490 struct __ecereNameSpace__ecere__com__Method * __ecereNameSpace__ecere__com__eClass_FindMethod(struct __ecereNameSpace__ecere__com__Class * _class, const char *  name, struct __ecereNameSpace__ecere__com__Instance * module);
2491
2492 struct __ecereNameSpace__ecere__com__Property * __ecereNameSpace__ecere__com__eClass_FindProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char *  name, struct __ecereNameSpace__ecere__com__Instance * module);
2493
2494 static void __ecereNameSpace__ecere__com__ComputeClassParameters(struct __ecereNameSpace__ecere__com__Class * templatedClass, const char * templateParams, struct __ecereNameSpace__ecere__com__Instance * findModule)
2495 {
2496 char ch;
2497 const char * nextParamStart = templateParams ? (templateParams + 1) : (((void *)0));
2498 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
2499 struct __ecereNameSpace__ecere__com__Class * lastClass = (((void *)0)), * sClass;
2500 int curParamID = 0;
2501 int numParams = 0;
2502 struct __ecereNameSpace__ecere__com__Class * _class = templatedClass->templateClass ? templatedClass->templateClass : templatedClass;
2503
2504 for(sClass = _class; sClass; sClass = sClass->base)
2505 {
2506 if(sClass->templateClass)
2507 sClass = sClass->templateClass;
2508 numParams += sClass->templateParams.count;
2509 }
2510 if(templatedClass->templateArgs)
2511 __ecereNameSpace__ecere__com__FreeTemplateArgs(templatedClass);
2512 (__ecereNameSpace__ecere__com__eSystem_Delete(templatedClass->templateArgs), templatedClass->templateArgs = 0);
2513 templatedClass->templateArgs = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(struct __ecereNameSpace__ecere__com__ClassTemplateArgument) * (numParams));
2514 templatedClass->numParams = numParams;
2515 if(_class != templatedClass)
2516 {
2517 }
2518 if(templatedClass->base && templatedClass->base->templateArgs && _class == templatedClass)
2519 {
2520 struct __ecereNameSpace__ecere__com__Class * sClass;
2521
2522 memcpy(templatedClass->templateArgs, templatedClass->base->templateArgs, sizeof(struct __ecereNameSpace__ecere__com__ClassTemplateArgument) * (numParams - templatedClass->templateParams.count));
2523 for(sClass = templatedClass->base; sClass; sClass = sClass->base)
2524 {
2525 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
2526 struct __ecereNameSpace__ecere__com__Class * prevClass;
2527 int id = 0;
2528
2529 for(prevClass = sClass->base; prevClass; prevClass = prevClass->base)
2530 {
2531 if(prevClass->templateClass)
2532 prevClass = prevClass->templateClass;
2533 id += prevClass->templateParams.count;
2534 }
2535 if(sClass->templateClass)
2536 sClass = sClass->templateClass;
2537 for(param = sClass->templateParams.first; param; param = param->next)
2538 __ecereNameSpace__ecere__com__CopyTemplateArg(param, &templatedClass->templateArgs[id++]);
2539 }
2540 }
2541 while(nextParamStart)
2542 {
2543 const char * paramStart = nextParamStart;
2544 const char * paramEnd;
2545 int level = 0;
2546
2547 while(*paramStart == ' ')
2548 paramStart++;
2549 paramEnd = paramStart;
2550 while((ch = *paramEnd, ch && (level > 0 || (ch != '>' && ch != ','))))
2551 {
2552 if(ch == '<')
2553 level++;
2554 if(ch == '>')
2555 level--;
2556 paramEnd++;
2557 }
2558 nextParamStart = (ch == ',') ? (paramEnd + 1) : (((void *)0));
2559 while(*paramEnd == ' ')
2560 paramEnd--;
2561 if(paramEnd > paramStart)
2562 {
2563 const char * ptr, * equal = (((void *)0));
2564
2565 for(ptr = paramStart; ptr <= paramEnd; ptr++)
2566 {
2567 if(*ptr == '=')
2568 {
2569 equal = ptr;
2570 break;
2571 }
2572 }
2573 if(equal)
2574 {
2575 const char * end = equal - 1;
2576 char ident[1024];
2577
2578 while(*end == ' ')
2579 end--;
2580 strncpy(ident, paramStart, end + 1 - paramStart);
2581 ident[end + 1 - paramStart] = (char)0;
2582 for(sClass = _class; sClass; sClass = sClass->base)
2583 {
2584 if(sClass->templateClass)
2585 sClass = sClass->templateClass;
2586 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
2587 {
2588 if(!strcmp(curParam->name, ident))
2589 break;
2590 }
2591 if(curParam)
2592 {
2593 struct __ecereNameSpace__ecere__com__Class * nextClass;
2594 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * prevParam;
2595
2596 curParamID = 0;
2597 for(prevParam = curParam->prev; prevParam; prevParam = prevParam->prev)
2598 curParamID++;
2599 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
2600 {
2601 if(nextClass->templateClass)
2602 nextClass = nextClass->templateClass;
2603 curParamID += nextClass->templateParams.count;
2604 }
2605 break;
2606 }
2607 }
2608 lastClass = sClass;
2609 }
2610 else
2611 {
2612 if(curParam)
2613 {
2614 curParam = curParam->next;
2615 curParamID++;
2616 }
2617 if(!curParam)
2618 {
2619 for(sClass = lastClass ? lastClass->base : _class; sClass; sClass = sClass->base)
2620 {
2621 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
2622
2623 curParamID = 0;
2624 if(sClass->templateClass)
2625 sClass = sClass->templateClass;
2626 for(param = sClass->templateParams.first; param; param = param->next, curParamID++)
2627 {
2628 curParam = param;
2629 break;
2630 }
2631 if(curParam)
2632 {
2633 struct __ecereNameSpace__ecere__com__Class * nextClass;
2634
2635 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
2636 {
2637 if(nextClass->templateClass)
2638 nextClass = nextClass->templateClass;
2639 curParamID += nextClass->templateParams.count;
2640 }
2641 lastClass = sClass;
2642 break;
2643 }
2644 }
2645 }
2646 }
2647 if(curParam)
2648 {
2649 struct __ecereNameSpace__ecere__com__ClassTemplateArgument argument =
2650 {
2651
2652 .__anon1 = {
2653
2654 .__anon1 = {
2655 .dataTypeString = 0
2656 }
2657 }
2658 };
2659 char value[1024];
2660
2661 if(equal)
2662 {
2663 equal++;
2664 while(*equal == ' ')
2665 equal++;
2666 memcpy(value, equal, paramEnd - equal);
2667 value[paramEnd - equal] = (char)0;
2668 }
2669 else
2670 {
2671 memcpy(value, paramStart, paramEnd - paramStart);
2672 value[paramEnd - paramStart] = (char)0;
2673 }
2674 __ecereNameSpace__ecere__sys__TrimRSpaces(value, value);
2675 switch(curParam->type)
2676 {
2677 case 0:
2678 argument.__anon1.__anon1.dataTypeString = __ecereNameSpace__ecere__sys__CopyString(value);
2679 argument.__anon1.__anon1.dataTypeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, value);
2680 if(!argument.__anon1.__anon1.dataTypeClass)
2681 argument.__anon1.__anon1.dataTypeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(((struct __ecereNameSpace__ecere__com__Module *)(((char *)_class->module + structSize_Instance)))->application, value);
2682 if(!argument.__anon1.__anon1.dataTypeClass)
2683 argument.__anon1.__anon1.dataTypeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(findModule, value);
2684 break;
2685 case 2:
2686 {
2687 struct __ecereNameSpace__ecere__com__Class * expClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, curParam->__anon1.dataTypeString);
2688
2689 if(!expClass)
2690 expClass = __ecereNameSpace__ecere__com__eSystem_FindClass(((struct __ecereNameSpace__ecere__com__Module *)(((char *)_class->module + structSize_Instance)))->application, curParam->__anon1.dataTypeString);
2691 if(expClass)
2692 {
2693 ((unsigned int (*)(void *, void *, const char *))(void *)expClass->_vTbl[__ecereVMethodID_class_OnGetDataFromString])(expClass, &argument.__anon1.expression, value);
2694 }
2695 else if(value[0] == '\"')
2696 {
2697 char * endQuote = value + strlen(value) - 1;
2698
2699 if(*endQuote != '\"')
2700 endQuote++;
2701 *endQuote = '\0';
2702 argument.__anon1.expression.__anon1.p = __ecereNameSpace__ecere__sys__CopyString(value + 1);
2703 }
2704 else if(value[0] == '\'')
2705 {
2706 int nb;
2707 unsigned int ch = __ecereNameSpace__ecere__sys__UTF8GetChar(value + 1, &nb);
2708
2709 argument.__anon1.expression.__anon1.ui = ch;
2710 }
2711 else if(!strcmp(curParam->__anon1.dataTypeString, "uint"))
2712 {
2713 argument.__anon1.expression.__anon1.ui = strtoul(value, (((void *)0)), 0);
2714 }
2715 else if(!strcmp(curParam->__anon1.dataTypeString, "char"))
2716 {
2717 argument.__anon1.expression.__anon1.c = (char)strtol(value, (((void *)0)), 0);
2718 }
2719 else if(!strcmp(curParam->__anon1.dataTypeString, "byte"))
2720 {
2721 argument.__anon1.expression.__anon1.uc = (unsigned char)strtoul(value, (((void *)0)), 0);
2722 }
2723 else if(!strcmp(curParam->__anon1.dataTypeString, "short"))
2724 {
2725 argument.__anon1.expression.__anon1.s = (short)strtol(value, (((void *)0)), 0);
2726 }
2727 else if(!strcmp(curParam->__anon1.dataTypeString, "uint16"))
2728 {
2729 argument.__anon1.expression.__anon1.us = (unsigned short)strtoul(value, (((void *)0)), 0);
2730 }
2731 else if(!strcmp(curParam->__anon1.dataTypeString, "int64"))
2732 {
2733 argument.__anon1.expression.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(value, (((void *)0)), 0);
2734 }
2735 else if(!strcmp(curParam->__anon1.dataTypeString, "uint64"))
2736 {
2737 argument.__anon1.expression.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(value, (((void *)0)), 0);
2738 }
2739 else if(!strcmp(curParam->__anon1.dataTypeString, "float"))
2740 {
2741 argument.__anon1.expression.__anon1.f = (float)strtod(value, (((void *)0)));
2742 }
2743 else if(!strcmp(curParam->__anon1.dataTypeString, "double"))
2744 {
2745 argument.__anon1.expression.__anon1.d = strtod(value, (((void *)0)));
2746 }
2747 else
2748 {
2749 argument.__anon1.expression.__anon1.i = strtol(value, (((void *)0)), 0);
2750 }
2751 break;
2752 }
2753 case 1:
2754 argument.__anon1.__anon2.memberString = __ecereNameSpace__ecere__sys__CopyString(value);
2755 break;
2756 }
2757 __ecereNameSpace__ecere__com__FreeTemplateArg(templatedClass, curParam, curParamID);
2758 templatedClass->templateArgs[curParamID] = argument;
2759 }
2760 }
2761 }
2762 if(templatedClass == _class)
2763 {
2764 struct __ecereNameSpace__ecere__com__Class * sClass = _class;
2765 int curParamID = 0;
2766 struct __ecereNameSpace__ecere__com__Class * nextClass;
2767 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
2768
2769 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
2770 {
2771 if(nextClass->templateClass)
2772 nextClass = nextClass->templateClass;
2773 curParamID += nextClass->templateParams.count;
2774 }
2775 for(param = sClass->templateParams.first; param; param = param->next)
2776 {
2777 if(!templatedClass->templateArgs[curParamID].__anon1.__anon1.dataTypeString)
2778 {
2779 templatedClass->templateArgs[curParamID] = param->defaultArg;
2780 __ecereNameSpace__ecere__com__CopyTemplateArg(param, &templatedClass->templateArgs[curParamID]);
2781 if(param->type == 0 && param->defaultArg.__anon1.__anon1.dataTypeString)
2782 {
2783 templatedClass->templateArgs[curParamID].__anon1.__anon1.dataTypeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(templatedClass->module, param->defaultArg.__anon1.__anon1.dataTypeString);
2784 if(!templatedClass->templateArgs[curParamID].__anon1.__anon1.dataTypeClass)
2785 templatedClass->templateArgs[curParamID].__anon1.__anon1.dataTypeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(((struct __ecereNameSpace__ecere__com__Module *)(((char *)templatedClass->module + structSize_Instance)))->application, param->defaultArg.__anon1.__anon1.dataTypeString);
2786 if(!templatedClass->templateArgs[curParamID].__anon1.__anon1.dataTypeClass)
2787 templatedClass->templateArgs[curParamID].__anon1.__anon1.dataTypeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(findModule, param->defaultArg.__anon1.__anon1.dataTypeString);
2788 }
2789 }
2790 curParamID++;
2791 }
2792 }
2793 if(templatedClass->base && templatedClass->base->templateArgs && numParams - _class->templateParams.count)
2794 {
2795 int c = numParams - _class->templateParams.count - 1;
2796
2797 for(sClass = _class->base; sClass; sClass = sClass->base)
2798 {
2799 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
2800
2801 if(sClass->templateClass)
2802 sClass = sClass->templateClass;
2803 for(param = sClass->templateParams.last; param; param = param->prev)
2804 {
2805 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * arg = &templatedClass->templateArgs[c];
2806 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * baseArg = &templatedClass->base->templateArgs[c];
2807
2808 if(!(*arg).__anon1.__anon1.dataTypeString)
2809 {
2810 *arg = templatedClass->base->templateArgs[c];
2811 __ecereNameSpace__ecere__com__CopyTemplateArg(param, arg);
2812 if(param->type == 0)
2813 {
2814 if((*arg).__anon1.__anon1.dataTypeClass && strchr((*arg).__anon1.__anon1.dataTypeString, '<') && (*arg).__anon1.__anon1.dataTypeClass->templateArgs)
2815 {
2816 struct __ecereNameSpace__ecere__com__Class * expClass = (*arg).__anon1.__anon1.dataTypeClass;
2817 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
2818 int paramCount = 0;
2819 int lastParam = -1;
2820 char templateString[1024];
2821
2822 sprintf(templateString, "%s<", expClass->templateClass->fullName);
2823 for(cClass = expClass; cClass; cClass = cClass->base)
2824 {
2825 int p = 0;
2826 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
2827
2828 for(param = cClass->templateParams.first; param; param = param->next)
2829 {
2830 int id = p;
2831 struct __ecereNameSpace__ecere__com__Class * sClass;
2832 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
2833
2834 for(sClass = expClass->base; sClass; sClass = sClass->base)
2835 id += sClass->templateParams.count;
2836 arg = expClass->templateArgs[id];
2837 {
2838 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * cParam;
2839 int p = numParams - _class->templateParams.count;
2840
2841 for(cParam = _class->templateParams.first; cParam; cParam = cParam->next, p++)
2842 {
2843 if(cParam->type == 0 && arg.__anon1.__anon1.dataTypeString && !strcmp(cParam->name, arg.__anon1.__anon1.dataTypeString))
2844 {
2845 arg.__anon1.__anon1.dataTypeString = templatedClass->templateArgs[p].__anon1.__anon1.dataTypeString;
2846 arg.__anon1.__anon1.dataTypeClass = templatedClass->templateArgs[p].__anon1.__anon1.dataTypeClass;
2847 break;
2848 }
2849 }
2850 }
2851 {
2852 char argument[256];
2853
2854 argument[0] = '\0';
2855 switch(param->type)
2856 {
2857 case 2:
2858 {
2859 break;
2860 }
2861 case 1:
2862 {
2863 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
2864 break;
2865 }
2866 case 0:
2867 {
2868 if(arg.__anon1.__anon1.dataTypeString)
2869 strcat(argument, arg.__anon1.__anon1.dataTypeString);
2870 break;
2871 }
2872 }
2873 if(argument[0])
2874 {
2875 if(paramCount)
2876 strcat(templateString, ", ");
2877 if(lastParam != p - 1)
2878 {
2879 strcat(templateString, param->name);
2880 strcat(templateString, " = ");
2881 }
2882 strcat(templateString, argument);
2883 paramCount++;
2884 lastParam = p;
2885 }
2886 }
2887 p++;
2888 }
2889 }
2890 {
2891 int len = (int)strlen(templateString);
2892
2893 if(templateString[len - 1] == '>')
2894 templateString[len++] = ' ';
2895 templateString[len++] = '>';
2896 templateString[len++] = '\0';
2897 }
2898 __ecereNameSpace__ecere__com__FreeTemplateArg(templatedClass, param, c);
2899 (*arg).__anon1.__anon1.dataTypeString = __ecereNameSpace__ecere__sys__CopyString(templateString);
2900 (*arg).__anon1.__anon1.dataTypeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(templatedClass->module, templateString);
2901 if(!(*arg).__anon1.__anon1.dataTypeClass)
2902 (*arg).__anon1.__anon1.dataTypeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(((struct __ecereNameSpace__ecere__com__Module *)(((char *)templatedClass->module + structSize_Instance)))->application, templateString);
2903 }
2904 else
2905 {
2906 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * cParam;
2907 int p = numParams - _class->templateParams.count;
2908
2909 for(cParam = _class->templateParams.first; cParam; cParam = cParam->next, p++)
2910 {
2911 if(cParam->type == 0 && (*baseArg).__anon1.__anon1.dataTypeString && !strcmp(cParam->name, (*baseArg).__anon1.__anon1.dataTypeString))
2912 {
2913 __ecereNameSpace__ecere__com__FreeTemplateArg(templatedClass, param, c);
2914 (*arg).__anon1.__anon1.dataTypeString = templatedClass->templateArgs[p].__anon1.__anon1.dataTypeString;
2915 (*arg).__anon1.__anon1.dataTypeClass = templatedClass->templateArgs[p].__anon1.__anon1.dataTypeClass;
2916 __ecereNameSpace__ecere__com__CopyTemplateArg(cParam, arg);
2917 break;
2918 }
2919 }
2920 }
2921 }
2922 }
2923 c--;
2924 }
2925 }
2926 }
2927 {
2928 struct __ecereNameSpace__ecere__com__Class * sClass;
2929
2930 for(sClass = _class; sClass; sClass = sClass->base)
2931 {
2932 int curParamID = 0;
2933 struct __ecereNameSpace__ecere__com__Class * nextClass;
2934 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
2935
2936 if(sClass->templateClass)
2937 sClass = sClass->templateClass;
2938 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
2939 {
2940 if(nextClass->templateClass)
2941 nextClass = nextClass->templateClass;
2942 curParamID += nextClass->templateParams.count;
2943 }
2944 for(param = sClass->templateParams.first; param; param = param->next)
2945 {
2946 if(!templatedClass->templateArgs[curParamID].__anon1.__anon1.dataTypeString)
2947 {
2948 templatedClass->templateArgs[curParamID] = param->defaultArg;
2949 __ecereNameSpace__ecere__com__CopyTemplateArg(param, &templatedClass->templateArgs[curParamID]);
2950 if(param->type == 0 && param->defaultArg.__anon1.__anon1.dataTypeString)
2951 {
2952 templatedClass->templateArgs[curParamID].__anon1.__anon1.dataTypeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(templatedClass->module, param->defaultArg.__anon1.__anon1.dataTypeString);
2953 if(!templatedClass->templateArgs[curParamID].__anon1.__anon1.dataTypeClass)
2954 templatedClass->templateArgs[curParamID].__anon1.__anon1.dataTypeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(((struct __ecereNameSpace__ecere__com__Module *)(((char *)templatedClass->module + structSize_Instance)))->application, param->defaultArg.__anon1.__anon1.dataTypeString);
2955 if(!templatedClass->templateArgs[curParamID].__anon1.__anon1.dataTypeClass)
2956 templatedClass->templateArgs[curParamID].__anon1.__anon1.dataTypeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(findModule, param->defaultArg.__anon1.__anon1.dataTypeString);
2957 }
2958 }
2959 curParamID++;
2960 }
2961 }
2962 }
2963 {
2964 int c = numParams - 1;
2965
2966 for(sClass = _class; sClass; sClass = sClass->base)
2967 {
2968 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
2969
2970 if(sClass->templateClass)
2971 sClass = sClass->templateClass;
2972 for(param = sClass->templateParams.last; param; param = param->prev)
2973 {
2974 if(param->type == 0)
2975 {
2976 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * arg = &templatedClass->templateArgs[c];
2977 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * cParam;
2978 struct __ecereNameSpace__ecere__com__Class * dClass;
2979 int p = numParams - 1;
2980
2981 for(dClass = _class; dClass; dClass = dClass->base)
2982 {
2983 if(dClass->templateClass)
2984 dClass = dClass->templateClass;
2985 for(cParam = dClass->templateParams.last; cParam; cParam = cParam->prev, p--)
2986 {
2987 if(cParam->type == 0 && (*arg).__anon1.__anon1.dataTypeString && !strcmp(cParam->name, (*arg).__anon1.__anon1.dataTypeString))
2988 {
2989 if(templatedClass->templateArgs[p].__anon1.__anon1.dataTypeString && c != p)
2990 {
2991 __ecereNameSpace__ecere__com__FreeTemplateArg(templatedClass, param, c);
2992 (*arg).__anon1.__anon1.dataTypeString = templatedClass->templateArgs[p].__anon1.__anon1.dataTypeString;
2993 (*arg).__anon1.__anon1.dataTypeClass = templatedClass->templateArgs[p].__anon1.__anon1.dataTypeClass;
2994 __ecereNameSpace__ecere__com__CopyTemplateArg(cParam, arg);
2995 }
2996 }
2997 }
2998 }
2999 }
3000 c--;
3001 }
3002 }
3003 }
3004 {
3005 struct __ecereNameSpace__ecere__com__Class * tClass;
3006 int c = numParams - 1;
3007
3008 for(tClass = _class; tClass; tClass = tClass->base)
3009 {
3010 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
3011
3012 if(tClass->templateClass)
3013 tClass = tClass->templateClass;
3014 for(param = tClass->templateParams.last; param; param = param->prev)
3015 {
3016 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * arg = &templatedClass->templateArgs[c];
3017
3018 if(param->type == 1 && (*arg).__anon1.__anon2.memberString)
3019 {
3020 struct __ecereNameSpace__ecere__com__Class * memberClass = templatedClass;
3021 const char * memberString = (*arg).__anon1.__anon2.memberString;
3022 const char * colon = strstr(memberString, "::");
3023 const char * memberName = memberString;
3024
3025 if(colon)
3026 memberName = colon + 2;
3027 if(!colon)
3028 {
3029 memberString = param->defaultArg.__anon1.__anon2.memberString;
3030 colon = memberString ? strstr(memberString, "::") : (((void *)0));
3031 }
3032 if(colon)
3033 {
3034 char className[1024];
3035 struct __ecereNameSpace__ecere__com__Class * sClass;
3036
3037 memcpy(className, memberString, colon - memberString);
3038 className[colon - memberString] = '\0';
3039 for(sClass = _class; sClass; sClass = sClass->base)
3040 {
3041 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * cParam;
3042 struct __ecereNameSpace__ecere__com__Class * nextClass;
3043 int id = 0;
3044
3045 if(sClass->templateClass)
3046 sClass = sClass->templateClass;
3047 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
3048 {
3049 if(nextClass->templateClass)
3050 nextClass = nextClass->templateClass;
3051 id += nextClass->templateParams.count;
3052 }
3053 for(cParam = sClass->templateParams.first; cParam; cParam = cParam->next)
3054 {
3055 if(cParam->type == 0 && !strcmp(cParam->name, className) && templatedClass->templateArgs[id].__anon1.__anon1.dataTypeString)
3056 {
3057 strcpy(className, templatedClass->templateArgs[id].__anon1.__anon1.dataTypeString);
3058 }
3059 id++;
3060 }
3061 }
3062 memberClass = __ecereNameSpace__ecere__com__eSystem_FindClass(templatedClass->module, className);
3063 if(!memberClass)
3064 memberClass = __ecereNameSpace__ecere__com__eSystem_FindClass(findModule, className);
3065 if(!memberClass)
3066 memberClass = __ecereNameSpace__ecere__com__eSystem_FindClass(((struct __ecereNameSpace__ecere__com__Module *)(((char *)templatedClass->module + structSize_Instance)))->application, className);
3067 }
3068 if(memberClass)
3069 {
3070 switch(param->__anon1.memberType)
3071 {
3072 case 0:
3073 (*arg).__anon1.__anon2.__anon1.member = __ecereNameSpace__ecere__com__eClass_FindDataMember(memberClass, memberName, memberClass->module, (((void *)0)), (((void *)0)));
3074 break;
3075 case 1:
3076 (*arg).__anon1.__anon2.__anon1.method = __ecereNameSpace__ecere__com__eClass_FindMethod(memberClass, memberName, memberClass->module);
3077 break;
3078 case 2:
3079 (*arg).__anon1.__anon2.__anon1.prop = __ecereNameSpace__ecere__com__eClass_FindProperty(memberClass, memberName, memberClass->module);
3080 break;
3081 }
3082 }
3083 }
3084 c--;
3085 }
3086 }
3087 }
3088 }
3089
3090 unsigned int __ecereNameSpace__ecere__com__DefaultFunction()
3091 {
3092 return 1;
3093 }
3094
3095 unsigned int __ecereNameSpace__ecere__com__eClass_IsDerived(struct __ecereNameSpace__ecere__com__Class * _class, struct __ecereNameSpace__ecere__com__Class * from)
3096 {
3097 if(!_class && !from)
3098 return 1;
3099 if(_class && from && (_class->templateClass || from->templateClass))
3100 {
3101 if(__ecereNameSpace__ecere__com__eClass_IsDerived(_class->templateClass ? _class->templateClass : _class, from->templateClass ? from->templateClass : from))
3102 {
3103 if(!from->templateClass)
3104 return 1;
3105 else if(!_class->templateClass && _class == from->templateClass)
3106 return 0;
3107 else
3108 {
3109 struct __ecereNameSpace__ecere__com__Class * sClass;
3110
3111 for(sClass = from; sClass; sClass = sClass->base)
3112 {
3113 if(sClass->templateParams.first)
3114 {
3115 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
3116 struct __ecereNameSpace__ecere__com__Class * nextClass;
3117 int p = 0;
3118
3119 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
3120 p += nextClass->templateParams.count;
3121 for(param = sClass->templateParams.first; param; param = param->next, p++)
3122 {
3123 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * arg = &_class->templateArgs[p];
3124 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * fArg = &from->templateArgs[p];
3125
3126 if(param->type == 0)
3127 {
3128 if((*arg).__anon1.__anon1.dataTypeString != (*fArg).__anon1.__anon1.dataTypeString && (*arg).__anon1.__anon1.dataTypeString && (*fArg).__anon1.__anon1.dataTypeString && strcmp((*arg).__anon1.__anon1.dataTypeString, (*fArg).__anon1.__anon1.dataTypeString))
3129 break;
3130 }
3131 else if(param->type == 1)
3132 {
3133 if((*arg).__anon1.__anon2.__anon1.member != (*fArg).__anon1.__anon2.__anon1.member)
3134 break;
3135 }
3136 else if(param->type == 2)
3137 {
3138 if((*arg).__anon1.expression.__anon1.ui64 != (*fArg).__anon1.expression.__anon1.ui64)
3139 break;
3140 }
3141 }
3142 if(param)
3143 return 0;
3144 }
3145 }
3146 return 1;
3147 }
3148 }
3149 }
3150 else
3151 {
3152 for(; _class && from; _class = _class->base)
3153 {
3154 if(_class == from || _class->templateClass == from || ((_class->type == 1000 || (_class->type == 0 && _class->isInstanceClass)) && from->name && !strcmp(_class->name, from->name)))
3155 return 1;
3156 }
3157 }
3158 return 0;
3159 }
3160
3161 static void __ecereNameSpace__ecere__com__FixDerivativeVirtualMethod(struct __ecereNameSpace__ecere__com__Class * base, const char * name, int vid, void * origFunction, const char * type)
3162 {
3163 struct __ecereNameSpace__ecere__sys__OldLink * derivative;
3164
3165 for(derivative = base->derivatives.first; derivative; derivative = derivative->next)
3166 {
3167 struct __ecereNameSpace__ecere__com__Class * _class = derivative->data;
3168 struct __ecereNameSpace__ecere__com__Method * method, * next;
3169 void * function = origFunction;
3170
3171 _class->vTblSize++;
3172 _class->_vTbl = __ecereNameSpace__ecere__com__eSystem_Renew(_class->_vTbl, sizeof(void *) * (_class->vTblSize));
3173 memmove(_class->_vTbl + vid + 1, _class->_vTbl + vid, (_class->vTblSize - vid - 1) * sizeof(void *));
3174 method = (struct __ecereNameSpace__ecere__com__Method *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&_class->methods, name);
3175 if(method)
3176 {
3177 if(method->function)
3178 function = method->function;
3179 if(!method->symbol)
3180 {
3181 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)method->name), method->name = 0);
3182 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)method->dataTypeString), method->dataTypeString = 0);
3183 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Delete(&_class->methods, (struct __ecereNameSpace__ecere__sys__BTNode *)method);
3184 }
3185 else
3186 {
3187 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)method->dataTypeString), method->dataTypeString = 0);
3188 method->type = 1;
3189 method->dataTypeString = __ecereNameSpace__ecere__sys__CopyString(type);
3190 method->_class = base;
3191 }
3192 }
3193 for(method = (struct __ecereNameSpace__ecere__com__Method *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&_class->methods); method; method = next)
3194 {
3195 next = (struct __ecereNameSpace__ecere__com__Method *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)method));
3196 if(method->type == 1)
3197 method->vid++;
3198 }
3199 _class->_vTbl[vid] = function;
3200 {
3201 struct __ecereNameSpace__ecere__sys__OldLink * templateLink;
3202
3203 for(templateLink = _class->templatized.first; templateLink; templateLink = templateLink->next)
3204 {
3205 struct __ecereNameSpace__ecere__com__Class * template = templateLink->data;
3206
3207 template->_vTbl = _class->_vTbl;
3208 }
3209 }
3210 if(_class->derivatives.first || _class->templatized.first)
3211 __ecereNameSpace__ecere__com__FixDerivativeVirtualMethod(_class, name, vid, function, type);
3212 }
3213 {
3214 struct __ecereNameSpace__ecere__sys__OldLink * templateLink;
3215
3216 for(templateLink = base->templatized.first; templateLink; templateLink = templateLink->next)
3217 {
3218 struct __ecereNameSpace__ecere__com__Class * template = templateLink->data;
3219
3220 template->_vTbl = base->_vTbl;
3221 __ecereNameSpace__ecere__com__FixDerivativeVirtualMethod(template, name, vid, origFunction, type);
3222 }
3223 }
3224 }
3225
3226 struct __ecereNameSpace__ecere__com__Method * __ecereNameSpace__ecere__com__eClass_AddMethod(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, void * function, int declMode)
3227 {
3228 if(_class && !_class->comRedefinition && name)
3229 {
3230 struct __ecereNameSpace__ecere__com__Class * base;
3231
3232 for(base = _class; base; base = base->base)
3233 {
3234 struct __ecereNameSpace__ecere__com__Method * method;
3235
3236 if(base->templateClass)
3237 base = base->templateClass;
3238 method = (struct __ecereNameSpace__ecere__com__Method *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&base->methods, name);
3239 if(method)
3240 {
3241 if(method->type == 1)
3242 {
3243 struct __ecereNameSpace__ecere__sys__OldLink * deriv;
3244 void * oldFunction = _class->_vTbl[method->vid];
3245
3246 if(method->vid >= _class->vTblSize)
3247 printf("error: virtual methods overriding failure\n");
3248 else
3249 _class->_vTbl[method->vid] = function ? function : __ecereNameSpace__ecere__com__DefaultFunction;
3250 for(deriv = _class->derivatives.first; deriv; deriv = deriv->next)
3251 {
3252 struct __ecereNameSpace__ecere__com__Class * derivClass = deriv->data;
3253
3254 if(derivClass->_vTbl[method->vid] == oldFunction)
3255 __ecereNameSpace__ecere__com__eClass_AddMethod(derivClass, name, type, function, declMode);
3256 }
3257 {
3258 struct __ecereNameSpace__ecere__sys__OldLink * templateLink;
3259
3260 for(templateLink = _class->templatized.first; templateLink; templateLink = templateLink->next)
3261 {
3262 struct __ecereNameSpace__ecere__com__Class * template = templateLink->data;
3263
3264 for(deriv = template->derivatives.first; deriv; deriv = deriv->next)
3265 {
3266 struct __ecereNameSpace__ecere__com__Class * derivClass = deriv->data;
3267
3268 if(derivClass->_vTbl[method->vid] == oldFunction)
3269 __ecereNameSpace__ecere__com__eClass_AddMethod(derivClass, name, type, function, declMode);
3270 }
3271 }
3272 }
3273 }
3274 else
3275 {
3276 if(base == _class)
3277 {
3278 break;
3279 }
3280 base = (((void *)0));
3281 break;
3282 }
3283 return method;
3284 }
3285 }
3286 if(!base)
3287 {
3288 struct __ecereNameSpace__ecere__com__Method * method = (method = __ecereNameSpace__ecere__com__eSystem_New0(structSize_Method), method->name = __ecereNameSpace__ecere__sys__CopyString(name), method->function = function ? function : (void *)(__ecereNameSpace__ecere__com__DefaultFunction), method->_class = _class, method->dataTypeString = __ecereNameSpace__ecere__sys__CopyString(type), method->memberAccess = declMode, method);
3289
3290 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&_class->methods, (struct __ecereNameSpace__ecere__sys__BTNode *)method);
3291 return method;
3292 }
3293 }
3294 return (((void *)0));
3295 }
3296
3297 struct __ecereNameSpace__ecere__com__Method * __ecereNameSpace__ecere__com__eClass_AddVirtualMethod(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, void * function, int declMode)
3298 {
3299 if(_class && !_class->comRedefinition && name)
3300 {
3301 struct __ecereNameSpace__ecere__com__Class * base;
3302
3303 for(base = _class; base; base = base->base)
3304 {
3305 struct __ecereNameSpace__ecere__com__Method * method = (struct __ecereNameSpace__ecere__com__Method *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&base->methods, name);
3306
3307 if(method)
3308 {
3309 if(method->type == 1)
3310 {
3311 if(method->vid >= _class->vTblSize)
3312 printf("error: virtual methods overriding failure\n");
3313 else
3314 _class->_vTbl[method->vid] = function ? function : __ecereNameSpace__ecere__com__DefaultFunction;
3315 }
3316 else
3317 base = (((void *)0));
3318 return method;
3319 }
3320 }
3321 if(!base)
3322 {
3323 struct __ecereNameSpace__ecere__com__Method * method = (method = __ecereNameSpace__ecere__com__eSystem_New0(structSize_Method), method->name = __ecereNameSpace__ecere__sys__CopyString(name), method->function = function ? function : (void *)(__ecereNameSpace__ecere__com__DefaultFunction), method->type = 1, method->_class = _class, method->vid = _class->vTblSize++, method->dataTypeString = __ecereNameSpace__ecere__sys__CopyString(type), method->memberAccess = declMode, method);
3324
3325 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&_class->methods, (struct __ecereNameSpace__ecere__sys__BTNode *)method);
3326 _class->_vTbl = __ecereNameSpace__ecere__com__eSystem_Renew(_class->_vTbl, sizeof(void *) * (_class->vTblSize));
3327 _class->_vTbl[method->vid] = function ? function : __ecereNameSpace__ecere__com__DefaultFunction;
3328 if(_class->derivatives.first || _class->templatized.first)
3329 __ecereNameSpace__ecere__com__FixDerivativeVirtualMethod(_class, name, method->vid, function ? function : (void *)__ecereNameSpace__ecere__com__DefaultFunction, type);
3330 return method;
3331 }
3332 }
3333 return (((void *)0));
3334 }
3335
3336 static void __ecereNameSpace__ecere__com__FixDerivativeProperty(struct __ecereNameSpace__ecere__com__Class * base, struct __ecereNameSpace__ecere__com__Property * _property)
3337 {
3338 struct __ecereNameSpace__ecere__sys__OldLink * derivative;
3339
3340 for(derivative = base->derivatives.first; derivative; derivative = derivative->next)
3341 {
3342 struct __ecereNameSpace__ecere__com__Class * _class = derivative->data;
3343 struct __ecereNameSpace__ecere__com__Property * prop;
3344 struct __ecereNameSpace__ecere__com__BTNamedLink * link = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&_class->prop, _property->name);
3345
3346 if(link)
3347 {
3348 prop = link->data;
3349 if(!prop->Set && !prop->Get && prop->memberAccess == 4)
3350 {
3351 struct __ecereNameSpace__ecere__com__SelfWatcher * watcher;
3352
3353 for(watcher = _class->selfWatchers.first; watcher; watcher = watcher->next)
3354 {
3355 if(watcher->_property == prop)
3356 watcher->_property = _property;
3357 }
3358 _property->selfWatchable = 1;
3359 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)prop->name), prop->name = 0);
3360 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)prop->dataTypeString), prop->dataTypeString = 0);
3361 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Delete(&_class->membersAndProperties, prop);
3362 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Delete(&_class->prop, (struct __ecereNameSpace__ecere__sys__BTNode *)link);
3363 }
3364 }
3365 for(prop = _class->membersAndProperties.first; prop; prop = prop->next)
3366 prop->id++;
3367 _class->memberID++;
3368 _class->startMemberID++;
3369 __ecereNameSpace__ecere__com__FixDerivativeProperty(_class, _property);
3370 }
3371 }
3372
3373 struct __ecereNameSpace__ecere__com__Property * __ecereNameSpace__ecere__com__eClass_AddProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * dataType, void * setStmt, void * getStmt, int declMode)
3374 {
3375 struct __ecereNameSpace__ecere__com__Property * _property = (((void *)0));
3376
3377 if(_class)
3378 {
3379 struct __ecereNameSpace__ecere__com__BTNamedLink * link = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&_class->prop, name ? name : dataType);
3380 unsigned int isConversion = name ? 0 : 1;
3381
3382 if(!name && dataType && !strncmp(dataType, "const ", 6))
3383 {
3384 name = dataType + 6;
3385 isConversion = 1;
3386 }
3387 if(link)
3388 _property = link->data;
3389 if(!_property)
3390 {
3391 _property = __extension__ ({
3392 struct __ecereNameSpace__ecere__com__Property * __ecereInstance1 = __ecereNameSpace__ecere__com__eSystem_New0(structSize_Property);
3393
3394 __ecereInstance1->isProperty = 1, __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(name ? name : dataType), __ecereInstance1->id = (name && (setStmt || getStmt || dataType)) ? _class->memberID++ : 0, __ecereInstance1->Set = setStmt, __ecereInstance1->Get = getStmt, __ecereInstance1->dataTypeString = __ecereNameSpace__ecere__sys__CopyString(dataType), __ecereInstance1->_class = _class, __ecereInstance1->compiled = 1, __ecereInstance1->conversion = isConversion, __ecereInstance1->memberAccess = declMode, __ecereInstance1;
3395 });
3396 if(!isConversion)
3397 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&_class->membersAndProperties, _property);
3398 else
3399 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&_class->conversions, _property);
3400 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&_class->prop, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
3401 struct __ecereNameSpace__ecere__com__BTNamedLink * __ecereInstance1 = __ecereNameSpace__ecere__com__eSystem_New0(structSize_BTNamedLink);
3402
3403 __ecereInstance1->name = _property->name, __ecereInstance1->data = _property, __ecereInstance1;
3404 }));
3405 if(!_property->conversion)
3406 {
3407 __ecereNameSpace__ecere__com__FixDerivativeProperty(_class, _property);
3408 }
3409 }
3410 }
3411 return _property;
3412 }
3413
3414 static void __ecereNameSpace__ecere__com__SetDelayedCPValues(struct __ecereNameSpace__ecere__com__Class * _class, struct __ecereNameSpace__ecere__com__ClassProperty * _property)
3415 {
3416 struct __ecereNameSpace__ecere__sys__OldLink * deriv;
3417 struct __ecereNameSpace__ecere__sys__NamedLink64 * value, * next;
3418
3419 for(value = _class->delayedCPValues.first; value; value = next)
3420 {
3421 next = value->next;
3422 if(!strcmp(value->name, _property->name))
3423 {
3424 _property->Set(_class, value->data);
3425 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Delete(&_class->delayedCPValues, value);
3426 }
3427 }
3428 for(deriv = _class->derivatives.first; deriv; deriv = deriv->next)
3429 {
3430 __ecereNameSpace__ecere__com__SetDelayedCPValues(deriv->data, _property);
3431 }
3432 }
3433
3434 struct __ecereNameSpace__ecere__com__ClassProperty * __ecereNameSpace__ecere__com__eClass_AddClassProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * dataType, void * setStmt, void * getStmt)
3435 {
3436 if(name && !__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&_class->classProperties, name))
3437 {
3438 struct __ecereNameSpace__ecere__com__ClassProperty * _property = (_property = __ecereNameSpace__ecere__com__eSystem_New0(structSize_ClassProperty), _property->name = __ecereNameSpace__ecere__sys__CopyString(name), _property->Set = setStmt, _property->Get = getStmt, _property->dataTypeString = __ecereNameSpace__ecere__sys__CopyString(dataType), _property);
3439
3440 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&_class->classProperties, (struct __ecereNameSpace__ecere__sys__BTNode *)_property);
3441 __ecereNameSpace__ecere__com__SetDelayedCPValues(_class, _property);
3442 return _property;
3443 }
3444 return (((void *)0));
3445 }
3446
3447 struct __ecereNameSpace__ecere__com__ClassProperty * __ecereNameSpace__ecere__com__eClass_FindClassProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name)
3448 {
3449 struct __ecereNameSpace__ecere__com__ClassProperty * _property = (((void *)0));
3450
3451 if(name && _class)
3452 {
3453 struct __ecereNameSpace__ecere__com__Class * origClass = _class;
3454
3455 for(; _class; _class = _class->base)
3456 {
3457 _property = (struct __ecereNameSpace__ecere__com__ClassProperty *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&_class->classProperties, name);
3458 if(_property)
3459 break;
3460 }
3461 if(!_property && origClass->type == 4)
3462 {
3463 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(origClass->module, "enum");
3464
3465 _property = __ecereNameSpace__ecere__com__eClass_FindClassProperty(enumClass, name);
3466 }
3467 }
3468 return _property;
3469 }
3470
3471 long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name)
3472 {
3473 struct __ecereNameSpace__ecere__com__ClassProperty * _property = __ecereNameSpace__ecere__com__eClass_FindClassProperty(_class, name);
3474
3475 if(_property && _property->Get && _property->Get != (void *)1)
3476 {
3477 long long result = _property->Get(_class);
3478
3479 return result;
3480 }
3481 return 0;
3482 }
3483
3484 void __ecereNameSpace__ecere__com__eClass_SetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, long long value)
3485 {
3486 struct __ecereNameSpace__ecere__com__ClassProperty * _property = __ecereNameSpace__ecere__com__eClass_FindClassProperty(_class, name);
3487
3488 if(_property)
3489 {
3490 if(_property->Set)
3491 ((void (*)(void *, long long))_property->Set)(_class, value);
3492 }
3493 else
3494 {
3495 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&_class->delayedCPValues, __extension__ ({
3496 struct __ecereNameSpace__ecere__sys__NamedLink64 * __ecereInstance1 = __ecereNameSpace__ecere__com__eSystem_New0(structSize_NamedLink64);
3497
3498 __ecereInstance1->name = (char *)name, __ecereInstance1->data = value, __ecereInstance1;
3499 }));
3500 }
3501 }
3502
3503 struct __ecereNameSpace__ecere__com__Method * __ecereNameSpace__ecere__com__eClass_FindMethod(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, struct __ecereNameSpace__ecere__com__Instance * module)
3504 {
3505 if(_class && name)
3506 {
3507 for(; _class; _class = _class->base)
3508 {
3509 struct __ecereNameSpace__ecere__com__Method * method;
3510
3511 if(_class->templateClass)
3512 _class = _class->templateClass;
3513 method = (struct __ecereNameSpace__ecere__com__Method *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&_class->methods, name);
3514 if(method && (method->memberAccess == 1 || _class->module == module || !method->dataTypeString))
3515 {
3516 if(!method->dataTypeString)
3517 {
3518 if(_class->module != module)
3519 {
3520 if(method->memberAccess == 1)
3521 module = _class->module;
3522 else
3523 {
3524 return (((void *)0));
3525 }
3526 }
3527 }
3528 else
3529 {
3530 return method;
3531 }
3532 }
3533 if(_class->inheritanceAccess == 2 && _class->module != module)
3534 break;
3535 }
3536 }
3537 return (((void *)0));
3538 }
3539
3540 static unsigned int __ecereNameSpace__ecere__com__ConstructInstance(void * instance, struct __ecereNameSpace__ecere__com__Class * _class, struct __ecereNameSpace__ecere__com__Class * from)
3541 {
3542 if(_class->templateClass)
3543 _class = _class->templateClass;
3544 if(_class->base && from != _class->base)
3545 {
3546 if(!__ecereNameSpace__ecere__com__ConstructInstance(instance, _class->base, from))
3547 return 0;
3548 }
3549 if(_class->Initialize)
3550 {
3551 void (* Initialize)(struct __ecereNameSpace__ecere__com__Instance * module) = (void *)_class->Initialize;
3552
3553 _class->Initialize = (((void *)0));
3554 Initialize(_class->module);
3555 }
3556 if(_class->Constructor)
3557 {
3558 if(!_class->Constructor(instance))
3559 {
3560 for(; _class; _class = _class->base)
3561 {
3562 if(_class->templateClass)
3563 _class = _class->templateClass;
3564 if(_class->Destructor)
3565 _class->Destructor(instance);
3566 }
3567 return 0;
3568 }
3569 }
3570 (_class->templateClass ? _class->templateClass : _class)->count++;
3571 return 1;
3572 }
3573
3574 void * __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class)
3575 {
3576 struct __ecereNameSpace__ecere__com__Instance * instance = (((void *)0));
3577
3578 if(_class)
3579 {
3580 {
3581 int size = _class->structSize;
3582 int flags = ((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)_class->module + structSize_Instance)))->application + structSize_Module)))->isGUIApp;
3583 unsigned int inCompiler = (flags & 8) ? 1 : 0;
3584 unsigned int force32Bits = (flags & 4) ? 1 : 0;
3585
3586 if(force32Bits && inCompiler)
3587 {
3588 if(!strcmp(_class->name, "Module"))
3589 size = 560;
3590 else if(_class->templateClass && !strcmp(_class->templateClass->name, "Map"))
3591 size = 40;
3592 else
3593 size *= 3;
3594 }
3595 instance = __ecereNameSpace__ecere__com___calloc(1, size);
3596 }
3597 if(_class->type == 0)
3598 {
3599 ((struct __ecereNameSpace__ecere__com__Instance *)(char *)instance)->_class = _class;
3600 ((struct __ecereNameSpace__ecere__com__Instance *)(char *)instance)->_vTbl = _class->_vTbl;
3601 }
3602 if(!__ecereNameSpace__ecere__com__ConstructInstance(instance, _class, (((void *)0))))
3603 {
3604 __ecereNameSpace__ecere__com___free(instance);
3605 instance = (((void *)0));
3606 }
3607 }
3608 return instance;
3609 }
3610
3611 void __ecereNameSpace__ecere__com__eInstance_Evolve(struct __ecereNameSpace__ecere__com__Instance ** instancePtr, struct __ecereNameSpace__ecere__com__Class * _class)
3612 {
3613 if(_class && instancePtr && *instancePtr)
3614 {
3615 unsigned int wasApp = 0, wasGuiApp = 0;
3616 struct __ecereNameSpace__ecere__com__Instance * instance = (struct __ecereNameSpace__ecere__com__Instance *)__ecereNameSpace__ecere__com__eSystem_Renew(*instancePtr, sizeof(unsigned char) * (_class->structSize));
3617 struct __ecereNameSpace__ecere__com__Class * fromClass = ((struct __ecereNameSpace__ecere__com__Instance *)(char *)instance)->_class;
3618
3619 *instancePtr = instance;
3620 memset(((unsigned char *)instance) + ((struct __ecereNameSpace__ecere__com__Instance *)(char *)instance)->_class->structSize, 0, _class->structSize - ((struct __ecereNameSpace__ecere__com__Instance *)(char *)instance)->_class->structSize);
3621 if((wasApp = !strcmp(((struct __ecereNameSpace__ecere__com__Instance *)(char *)instance)->_class->name, "Application")) || (wasGuiApp = !strcmp(((struct __ecereNameSpace__ecere__com__Instance *)(char *)instance)->_class->name, "GuiApplication")))
3622 {
3623 struct __ecereNameSpace__ecere__com__Instance * module;
3624 struct __ecereNameSpace__ecere__com__Instance * app = (struct __ecereNameSpace__ecere__com__Instance *)instance;
3625 struct __ecereNameSpace__ecere__com__BTNamedLink * link;
3626 struct __ecereNameSpace__ecere__com__Class * _class;
3627 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
3628
3629 for(module = ((struct __ecereNameSpace__ecere__com__Application *)(((char *)app + structSize_Module)))->allModules.first; module; module = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->next)
3630 ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application = app;
3631 for(link = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)app + structSize_Instance)))->privateNameSpace.classes); link; link = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)link)))
3632 {
3633 struct __ecereNameSpace__ecere__sys__OldLink * t;
3634
3635 ((struct __ecereNameSpace__ecere__com__Class *)link->data)->nameSpace = &((struct __ecereNameSpace__ecere__com__Module *)(((char *)app + structSize_Instance)))->privateNameSpace;
3636 for(t = ((struct __ecereNameSpace__ecere__com__Class *)link->data)->templatized.first; t; t = t->next)
3637 {
3638 struct __ecereNameSpace__ecere__com__Class * template = t->data;
3639
3640 template->nameSpace = ((struct __ecereNameSpace__ecere__com__Class *)link->data)->nameSpace;
3641 }
3642 }
3643 for(link = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)app + structSize_Instance)))->publicNameSpace.classes); link; link = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)link)))
3644 {
3645 struct __ecereNameSpace__ecere__sys__OldLink * t;
3646
3647 ((struct __ecereNameSpace__ecere__com__Class *)link->data)->nameSpace = &((struct __ecereNameSpace__ecere__com__Module *)(((char *)app + structSize_Instance)))->publicNameSpace;
3648 for(t = ((struct __ecereNameSpace__ecere__com__Class *)link->data)->templatized.first; t; t = t->next)
3649 {
3650 struct __ecereNameSpace__ecere__com__Class * template = t->data;
3651
3652 template->nameSpace = ((struct __ecereNameSpace__ecere__com__Class *)link->data)->nameSpace;
3653 }
3654 }
3655 for(link = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)app + structSize_Instance)))->privateNameSpace.defines); link; link = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)link)))
3656 ((struct __ecereNameSpace__ecere__com__DefinedExpression *)link->data)->nameSpace = &((struct __ecereNameSpace__ecere__com__Module *)(((char *)app + structSize_Instance)))->privateNameSpace;
3657 for(link = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)app + structSize_Instance)))->publicNameSpace.defines); link; link = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)link)))
3658 ((struct __ecereNameSpace__ecere__com__DefinedExpression *)link->data)->nameSpace = &((struct __ecereNameSpace__ecere__com__Module *)(((char *)app + structSize_Instance)))->publicNameSpace;
3659 for(link = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)app + structSize_Instance)))->privateNameSpace.functions); link; link = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)link)))
3660 ((struct __ecereNameSpace__ecere__com__GlobalFunction *)link->data)->nameSpace = &((struct __ecereNameSpace__ecere__com__Module *)(((char *)app + structSize_Instance)))->privateNameSpace;
3661 for(link = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)app + structSize_Instance)))->publicNameSpace.functions); link; link = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)link)))
3662 ((struct __ecereNameSpace__ecere__com__GlobalFunction *)link->data)->nameSpace = &((struct __ecereNameSpace__ecere__com__Module *)(((char *)app + structSize_Instance)))->publicNameSpace;
3663 for(nameSpace = (struct __ecereNameSpace__ecere__com__NameSpace *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)app + structSize_Instance)))->privateNameSpace.nameSpaces); nameSpace; nameSpace = (struct __ecereNameSpace__ecere__com__NameSpace *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)nameSpace)))
3664 (*nameSpace).parent = &((struct __ecereNameSpace__ecere__com__Module *)(((char *)app + structSize_Instance)))->privateNameSpace;
3665 for(nameSpace = (struct __ecereNameSpace__ecere__com__NameSpace *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)app + structSize_Instance)))->publicNameSpace.nameSpaces); nameSpace; nameSpace = (struct __ecereNameSpace__ecere__com__NameSpace *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)nameSpace)))
3666 (*nameSpace).parent = &((struct __ecereNameSpace__ecere__com__Module *)(((char *)app + structSize_Instance)))->publicNameSpace;
3667 for(link = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&((struct __ecereNameSpace__ecere__com__Application *)(((char *)app + structSize_Module)))->systemNameSpace.classes); link; link = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)link)))
3668 {
3669 struct __ecereNameSpace__ecere__sys__OldLink * t;
3670
3671 ((struct __ecereNameSpace__ecere__com__Class *)link->data)->nameSpace = &((struct __ecereNameSpace__ecere__com__Application *)(((char *)app + structSize_Module)))->systemNameSpace;
3672 for(t = ((struct __ecereNameSpace__ecere__com__Class *)link->data)->templatized.first; t; t = t->next)
3673 {
3674 struct __ecereNameSpace__ecere__com__Class * template = t->data;
3675
3676 template->nameSpace = ((struct __ecereNameSpace__ecere__com__Class *)link->data)->nameSpace;
3677 }
3678 }
3679 for(link = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&((struct __ecereNameSpace__ecere__com__Application *)(((char *)app + structSize_Module)))->systemNameSpace.defines); link; link = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)link)))
3680 ((struct __ecereNameSpace__ecere__com__DefinedExpression *)link->data)->nameSpace = &((struct __ecereNameSpace__ecere__com__Application *)(((char *)app + structSize_Module)))->systemNameSpace;
3681 for(link = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&((struct __ecereNameSpace__ecere__com__Application *)(((char *)app + structSize_Module)))->systemNameSpace.functions); link; link = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)link)))
3682 ((struct __ecereNameSpace__ecere__com__GlobalFunction *)link->data)->nameSpace = &((struct __ecereNameSpace__ecere__com__Application *)(((char *)app + structSize_Module)))->systemNameSpace;
3683 for(link = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&((struct __ecereNameSpace__ecere__com__Application *)(((char *)app + structSize_Module)))->systemNameSpace.functions); link; link = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)link)))
3684 ((struct __ecereNameSpace__ecere__com__GlobalFunction *)link->data)->nameSpace = &((struct __ecereNameSpace__ecere__com__Application *)(((char *)app + structSize_Module)))->systemNameSpace;
3685 for(nameSpace = (struct __ecereNameSpace__ecere__com__NameSpace *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&((struct __ecereNameSpace__ecere__com__Application *)(((char *)app + structSize_Module)))->systemNameSpace.nameSpaces); nameSpace; nameSpace = (struct __ecereNameSpace__ecere__com__NameSpace *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)nameSpace)))
3686 (*nameSpace).parent = &((struct __ecereNameSpace__ecere__com__Application *)(((char *)app + structSize_Module)))->systemNameSpace;
3687 for(_class = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)app + structSize_Instance)))->classes.first; _class; _class = _class->next)
3688 {
3689 struct __ecereNameSpace__ecere__sys__OldLink * templateLink;
3690
3691 _class->module = (struct __ecereNameSpace__ecere__com__Instance *)app;
3692 for(templateLink = _class->templatized.first; templateLink; templateLink = templateLink->next)
3693 {
3694 struct __ecereNameSpace__ecere__com__Class * template = templateLink->data;
3695
3696 template->module = _class->module;
3697 }
3698 }
3699 for(module = ((struct __ecereNameSpace__ecere__com__Application *)(((char *)app + structSize_Module)))->allModules.first; module; module = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->next)
3700 {
3701 for(_class = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->classes.first; _class; _class = _class->next)
3702 {
3703 struct __ecereNameSpace__ecere__sys__OldLink * templateLink;
3704
3705 _class->module = module;
3706 for(templateLink = _class->templatized.first; templateLink; templateLink = templateLink->next)
3707 {
3708 struct __ecereNameSpace__ecere__com__Class * template = templateLink->data;
3709
3710 template->module = _class->module;
3711 }
3712 }
3713 }
3714 ((struct __ecereNameSpace__ecere__com__Module *)(((char *)app + structSize_Instance)))->application = app;
3715 }
3716 {
3717 struct __ecereNameSpace__ecere__com__Class * base;
3718
3719 for(base = ((struct __ecereNameSpace__ecere__com__Instance *)(char *)instance)->_class; base && base->type == 0 && base->count; base = base->base)
3720 (base->templateClass ? base->templateClass : base)->count--;
3721 }
3722 ((struct __ecereNameSpace__ecere__com__Instance *)(char *)instance)->_class = _class;
3723 ((struct __ecereNameSpace__ecere__com__Instance *)(char *)instance)->_vTbl = _class->_vTbl;
3724 if(!__ecereNameSpace__ecere__com__ConstructInstance(instance, _class, fromClass))
3725 {
3726 __ecereNameSpace__ecere__com___free(instance);
3727 *instancePtr = (((void *)0));
3728 }
3729 }
3730 }
3731
3732 void __ecereNameSpace__ecere__com__eInstance_Delete(struct __ecereNameSpace__ecere__com__Instance * instance)
3733 {
3734 if(instance)
3735 {
3736 struct __ecereNameSpace__ecere__com__Class * _class, * base;
3737 unsigned int ownVtbl;
3738
3739 ownVtbl = ((struct __ecereNameSpace__ecere__com__Instance *)(char *)instance)->_vTbl != ((struct __ecereNameSpace__ecere__com__Instance *)(char *)instance)->_class->_vTbl;
3740 for(_class = ((struct __ecereNameSpace__ecere__com__Instance *)(char *)instance)->_class; _class; _class = base)
3741 {
3742 if(_class->templateClass)
3743 _class = _class->templateClass;
3744 if(_class->destructionWatchOffset)
3745 {
3746 struct __ecereNameSpace__ecere__sys__OldList * watchers = (struct __ecereNameSpace__ecere__sys__OldList *)((unsigned char *)instance + _class->destructionWatchOffset);
3747 struct __ecereNameSpace__ecere__com__Watcher * watcher, * next;
3748
3749 for(watcher = (*watchers).first; watcher; watcher = next)
3750 {
3751 next = watcher->next;
3752 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*watchers), watcher);
3753 watcher->callback(watcher->object, instance);
3754 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Delete((&*watchers), watcher);
3755 }
3756 }
3757 base = _class->base;
3758 if(base && (base->type == 1000 || base->isInstanceClass))
3759 base = (((void *)0));
3760 if(_class->Destructor)
3761 _class->Destructor(instance);
3762 }
3763 for(_class = ((struct __ecereNameSpace__ecere__com__Instance *)(char *)instance)->_class; _class; _class = base)
3764 {
3765 if(_class->templateClass)
3766 _class = _class->templateClass;
3767 base = _class->base;
3768 (_class->templateClass ? _class->templateClass : _class)->count--;
3769 if(_class->type == 0 && !_class->count && !_class->module)
3770 {
3771 __ecereNameSpace__ecere__com__eClass_Unregister(_class);
3772 }
3773 }
3774 if(ownVtbl)
3775 {
3776 (__ecereNameSpace__ecere__com__eSystem_Delete(((struct __ecereNameSpace__ecere__com__Instance *)(char *)instance)->_vTbl), ((struct __ecereNameSpace__ecere__com__Instance * )(char * )instance)->_vTbl = 0);
3777 }
3778 __ecereNameSpace__ecere__com___free(instance);
3779 }
3780 }
3781
3782 struct __ecereNameSpace__ecere__com__Property * __ecereNameSpace__ecere__com__eClass_FindProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, struct __ecereNameSpace__ecere__com__Instance * module)
3783 {
3784 if(_class && name)
3785 {
3786 if(!strncmp(name, "const ", 6))
3787 name += 6;
3788 for(; _class; _class = _class->base)
3789 {
3790 struct __ecereNameSpace__ecere__com__BTNamedLink * link;
3791
3792 if(_class->templateClass)
3793 _class = _class->templateClass;
3794 link = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&_class->prop, name);
3795 if(link)
3796 {
3797 struct __ecereNameSpace__ecere__com__Property * _property = (struct __ecereNameSpace__ecere__com__Property *)link->data;
3798
3799 if(_property->memberAccess == 1 || _class->module == module || !_property->dataTypeString)
3800 {
3801 if(!_property->dataTypeString)
3802 {
3803 if(_class->module != module)
3804 {
3805 if(_property->memberAccess == 1)
3806 module = _class->module;
3807 else
3808 {
3809 return (((void *)0));
3810 }
3811 }
3812 }
3813 else
3814 {
3815 return _property;
3816 }
3817 }
3818 }
3819 if(_class->inheritanceAccess == 2 && _class->module != module)
3820 break;
3821 }
3822 }
3823 return (((void *)0));
3824 }
3825
3826 static struct __ecereNameSpace__ecere__com__DataMember * __ecereNameSpace__ecere__com__FindDataMember(struct __ecereNameSpace__ecere__sys__OldList * list, struct __ecereNameSpace__ecere__sys__BinaryTree * alist, const char * name, unsigned int * offset, int * id, unsigned int searchPrivate, struct __ecereNameSpace__ecere__com__DataMember ** subMemberStack, int * subMemberStackPos)
3827 {
3828 struct __ecereNameSpace__ecere__com__BTNamedLink * link;
3829 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
3830
3831 link = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(alist, name);
3832 if(link)
3833 {
3834 dataMember = link->data;
3835 if(dataMember->type == 0 && (dataMember->memberAccess == 1 || searchPrivate || !dataMember->dataTypeString))
3836 {
3837 if(offset)
3838 *offset += dataMember->offset;
3839 if(id)
3840 *id = dataMember->id;
3841 return dataMember;
3842 }
3843 return (((void *)0));
3844 }
3845 for(dataMember = list->first; dataMember; dataMember = dataMember->next)
3846 {
3847 if(!dataMember->isProperty && (dataMember->memberAccess == 1 || searchPrivate) && !dataMember->name && (dataMember->type == 1 || dataMember->type == 2))
3848 {
3849 struct __ecereNameSpace__ecere__com__DataMember * childMember;
3850
3851 if(subMemberStackPos)
3852 subMemberStack[(*subMemberStackPos)++] = dataMember;
3853 childMember = __ecereNameSpace__ecere__com__FindDataMember(&dataMember->members, &dataMember->membersAlpha, name, offset, id, searchPrivate, subMemberStack, subMemberStackPos);
3854 if(childMember)
3855 {
3856 if(offset)
3857 *offset += dataMember->offset;
3858 if(id)
3859 *id += dataMember->id;
3860 return childMember;
3861 }
3862 if(subMemberStackPos)
3863 (*subMemberStackPos)--;
3864 }
3865 }
3866 return (((void *)0));
3867 }
3868
3869 struct __ecereNameSpace__ecere__com__DataMember * __ecereNameSpace__ecere__com__eClass_FindDataMember(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, struct __ecereNameSpace__ecere__com__Instance * module, struct __ecereNameSpace__ecere__com__DataMember ** subMemberStack, int * subMemberStackPos)
3870 {
3871 struct __ecereNameSpace__ecere__com__DataMember * dataMember = (((void *)0));
3872
3873 if(subMemberStackPos)
3874 *subMemberStackPos = 0;
3875 if(_class && name)
3876 {
3877 for(; _class; _class = _class->base)
3878 {
3879 if(_class->templateClass)
3880 _class = _class->templateClass;
3881 dataMember = __ecereNameSpace__ecere__com__FindDataMember(&_class->membersAndProperties, &_class->members, name, (((void *)0)), (((void *)0)), _class->module == module, subMemberStack, subMemberStackPos);
3882 if(dataMember)
3883 {
3884 if(!dataMember->dataTypeString)
3885 {
3886 if(_class->module != module)
3887 {
3888 if(dataMember->memberAccess == 1)
3889 module = _class->module;
3890 else
3891 {
3892 return (((void *)0));
3893 }
3894 }
3895 dataMember = (((void *)0));
3896 }
3897 else
3898 {
3899 dataMember->_class = _class->templateClass ? _class->templateClass : _class;
3900 return dataMember;
3901 }
3902 }
3903 if(_class->inheritanceAccess == 2 && _class->module != module)
3904 break;
3905 }
3906 }
3907 return dataMember;
3908 }
3909
3910 struct __ecereNameSpace__ecere__com__DataMember * __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, unsigned int * offset, struct __ecereNameSpace__ecere__com__Instance * module, struct __ecereNameSpace__ecere__com__DataMember ** subMemberStack, int * subMemberStackPos)
3911 {
3912 struct __ecereNameSpace__ecere__com__DataMember * dataMember = (((void *)0));
3913
3914 if(subMemberStackPos)
3915 *subMemberStackPos = 0;
3916 if(offset)
3917 *offset = 0;
3918 if(_class)
3919 {
3920 for(; _class; _class = _class->base)
3921 {
3922 if(_class->templateClass)
3923 _class = _class->templateClass;
3924 dataMember = __ecereNameSpace__ecere__com__FindDataMember(&_class->membersAndProperties, &_class->members, name, offset, (((void *)0)), _class->module == module, subMemberStack, subMemberStackPos);
3925 if(dataMember)
3926 {
3927 if(!dataMember->dataTypeString)
3928 {
3929 if(_class->module != module)
3930 {
3931 if(dataMember->memberAccess == 1)
3932 module = _class->module;
3933 else
3934 {
3935 return (((void *)0));
3936 }
3937 }
3938 dataMember = (((void *)0));
3939 }
3940 else
3941 {
3942 dataMember->_class = _class;
3943 return dataMember;
3944 }
3945 }
3946 if(_class->inheritanceAccess == 2 && _class->module != module)
3947 break;
3948 }
3949 }
3950 return dataMember;
3951 }
3952
3953 struct __ecereNameSpace__ecere__com__DataMember * __ecereNameSpace__ecere__com__eClass_FindDataMemberAndId(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, int * id, struct __ecereNameSpace__ecere__com__Instance * module, struct __ecereNameSpace__ecere__com__DataMember ** subMemberStack, int * subMemberStackPos)
3954 {
3955 struct __ecereNameSpace__ecere__com__DataMember * dataMember = (((void *)0));
3956
3957 if(subMemberStackPos)
3958 *subMemberStackPos = 0;
3959 if(_class)
3960 {
3961 for(; _class; _class = _class->base)
3962 {
3963 if(_class->templateClass)
3964 _class = _class->templateClass;
3965 dataMember = __ecereNameSpace__ecere__com__FindDataMember(&_class->membersAndProperties, &_class->members, name, (((void *)0)), id, _class->module == module, subMemberStack, subMemberStackPos);
3966 if(dataMember)
3967 {
3968 if(!dataMember->dataTypeString)
3969 {
3970 if(_class->module != module)
3971 {
3972 if(dataMember->memberAccess == 1)
3973 module = _class->module;
3974 else
3975 {
3976 return (((void *)0));
3977 }
3978 }
3979 dataMember = (((void *)0));
3980 }
3981 else
3982 {
3983 dataMember->_class = _class;
3984 return dataMember;
3985 }
3986 }
3987 if(_class->inheritanceAccess == 2 && _class->module != module)
3988 break;
3989 }
3990 }
3991 return dataMember;
3992 }
3993
3994 void __ecereNameSpace__ecere__com__eClass_FindNextMember(struct __ecereNameSpace__ecere__com__Class * _class, struct __ecereNameSpace__ecere__com__Class ** curClass, struct __ecereNameSpace__ecere__com__DataMember ** curMember, struct __ecereNameSpace__ecere__com__DataMember ** subMemberStack, int * subMemberStackPos)
3995 {
3996 if(*curMember)
3997 {
3998 *curMember = (*curMember)->next;
3999 if(subMemberStackPos && *subMemberStackPos > 0 && subMemberStack[*subMemberStackPos - 1]->type == 1)
4000 {
4001 *curMember = subMemberStack[--(*subMemberStackPos)];
4002 *curMember = (*curMember)->next;
4003 }
4004 if(subMemberStackPos && *subMemberStackPos > 0)
4005 {
4006 while(*curMember && ((*curMember)->memberAccess == 2))
4007 *curMember = (*curMember)->next;
4008 }
4009 else
4010 while(*curMember && (*curMember)->name)
4011 {
4012 struct __ecereNameSpace__ecere__com__DataMember * dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, (*curMember)->name, (((void *)0)), (((void *)0)), (((void *)0)));
4013
4014 if(!dataMember)
4015 dataMember = (struct __ecereNameSpace__ecere__com__DataMember *)__ecereNameSpace__ecere__com__eClass_FindProperty(_class, (*curMember)->name, (((void *)0)));
4016 if(dataMember && dataMember->memberAccess != 2)
4017 {
4018 *curMember = dataMember;
4019 break;
4020 }
4021 else
4022 *curMember = (*curMember)->next;
4023 }
4024 if(subMemberStackPos)
4025 {
4026 while((*curMember) && !(*curMember)->isProperty && !(*curMember)->name && ((*curMember)->type == 2 || (*curMember)->type == 1))
4027 {
4028 subMemberStack[(*subMemberStackPos)++] = *curMember;
4029 *curMember = (*curMember)->members.first;
4030 while(*curMember && ((*curMember)->memberAccess == 2))
4031 *curMember = (*curMember)->next;
4032 }
4033 }
4034 }
4035 while(!*curMember)
4036 {
4037 if(!*curMember)
4038 {
4039 if(subMemberStackPos && *subMemberStackPos)
4040 {
4041 *curMember = subMemberStack[--(*subMemberStackPos)];
4042 *curMember = (*curMember)->next;
4043 }
4044 else
4045 {
4046 struct __ecereNameSpace__ecere__com__Class * lastCurClass = *curClass;
4047
4048 if(*curClass == _class)
4049 break;
4050 for(*curClass = _class; (*curClass)->base != lastCurClass && (*curClass)->base->type != 1000 && (*curClass)->inheritanceAccess != 2; *curClass = (*curClass)->base)
4051 ;
4052 *curMember = (*curClass)->membersAndProperties.first;
4053 }
4054 if(subMemberStackPos && *subMemberStackPos > 0)
4055 {
4056 while(*curMember && ((*curMember)->memberAccess == 2))
4057 *curMember = (*curMember)->next;
4058 }
4059 else
4060 while(*curMember && (*curMember)->name)
4061 {
4062 struct __ecereNameSpace__ecere__com__DataMember * dataMember = (((void *)0));
4063
4064 if(((*curMember)->memberAccess != 2))
4065 {
4066 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, (*curMember)->name, (((void *)0)), (((void *)0)), (((void *)0)));
4067 if(!dataMember)
4068 dataMember = (struct __ecereNameSpace__ecere__com__DataMember *)__ecereNameSpace__ecere__com__eClass_FindProperty(_class, (*curMember)->name, (((void *)0)));
4069 }
4070 if(dataMember && dataMember->memberAccess != 2 && dataMember->id >= 0)
4071 {
4072 *curMember = dataMember;
4073 break;
4074 }
4075 else
4076 *curMember = (*curMember)->next;
4077 }
4078 if(subMemberStackPos)
4079 {
4080 while((*curMember) && !(*curMember)->isProperty && !(*curMember)->name && ((*curMember)->type == 2 || (*curMember)->type == 1))
4081 {
4082 subMemberStack[(*subMemberStackPos)++] = *curMember;
4083 *curMember = (*curMember)->members.first;
4084 while(*curMember && (*curMember)->memberAccess == 2)
4085 *curMember = (*curMember)->next;
4086 }
4087 }
4088 }
4089 }
4090 }
4091
4092 void __ecereNameSpace__ecere__com__eInstance_SetMethod(struct __ecereNameSpace__ecere__com__Instance * instance, const char * name, void * function)
4093 {
4094 if(instance && name)
4095 {
4096 struct __ecereNameSpace__ecere__com__Class * _class;
4097
4098 for(_class = ((struct __ecereNameSpace__ecere__com__Instance *)(char *)instance)->_class; _class; _class = _class->base)
4099 {
4100 struct __ecereNameSpace__ecere__com__Method * method = (struct __ecereNameSpace__ecere__com__Method *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&_class->methods, name);
4101
4102 if(method && method->type == 1)
4103 {
4104 if(((struct __ecereNameSpace__ecere__com__Instance *)(char *)instance)->_vTbl == ((struct __ecereNameSpace__ecere__com__Instance *)(char *)instance)->_class->_vTbl)
4105 {
4106 ((struct __ecereNameSpace__ecere__com__Instance *)(char *)instance)->_vTbl = __ecereNameSpace__ecere__com___malloc(sizeof(void *) * ((struct __ecereNameSpace__ecere__com__Instance *)(char *)instance)->_class->vTblSize);
4107 memcpy(((struct __ecereNameSpace__ecere__com__Instance *)(char *)instance)->_vTbl, ((struct __ecereNameSpace__ecere__com__Instance *)(char *)instance)->_class->_vTbl, sizeof(int (*)()) * ((struct __ecereNameSpace__ecere__com__Instance *)(char *)instance)->_class->vTblSize);
4108 }
4109 ((struct __ecereNameSpace__ecere__com__Instance *)(char *)instance)->_vTbl[method->vid] = function ? function : __ecereNameSpace__ecere__com__DefaultFunction;
4110 }
4111 }
4112 }
4113 }
4114
4115 unsigned int __ecereNameSpace__ecere__com__eInstance_IsDerived(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Class * from)
4116 {
4117 if(instance)
4118 {
4119 struct __ecereNameSpace__ecere__com__Class * _class = ((struct __ecereNameSpace__ecere__com__Instance *)(char *)instance)->_class;
4120
4121 for(; _class; _class = _class->base)
4122 {
4123 if(_class == from)
4124 return 1;
4125 }
4126 }
4127 return 0;
4128 }
4129
4130 void __ecereNameSpace__ecere__com__eInstance_IncRef(struct __ecereNameSpace__ecere__com__Instance * instance)
4131 {
4132 if(instance)
4133 ((struct __ecereNameSpace__ecere__com__Instance *)(char *)instance)->_refCount++;
4134 }
4135
4136 void __ecereNameSpace__ecere__com__eInstance_DecRef(struct __ecereNameSpace__ecere__com__Instance * instance)
4137 {
4138 if(instance)
4139 {
4140 ((struct __ecereNameSpace__ecere__com__Instance *)(char *)instance)->_refCount--;
4141 if(((struct __ecereNameSpace__ecere__com__Instance *)(char *)instance)->_refCount <= 0)
4142 {
4143 __ecereNameSpace__ecere__com__eInstance_Delete(instance);
4144 }
4145 }
4146 }
4147
4148 static void __ecereNameSpace__ecere__com__FixOffsets(struct __ecereNameSpace__ecere__com__Class * _class)
4149 {
4150 struct __ecereNameSpace__ecere__sys__OldLink * deriv;
4151
4152 _class->structSize += _class->base->structSize - _class->offset;
4153 _class->offset = _class->base->structSize;
4154 for(deriv = _class->derivatives.first; deriv; deriv = deriv->next)
4155 __ecereNameSpace__ecere__com__FixOffsets(deriv->data);
4156 }
4157
4158 void __ecereNameSpace__ecere__com__eClass_Resize(struct __ecereNameSpace__ecere__com__Class * _class, int newSize)
4159 {
4160 struct __ecereNameSpace__ecere__sys__OldLink * deriv;
4161
4162 _class->structSize = newSize;
4163 for(deriv = _class->derivatives.first; deriv; deriv = deriv->next)
4164 __ecereNameSpace__ecere__com__FixOffsets(deriv->data);
4165 }
4166
4167 struct __ecereNameSpace__ecere__com__DataMember * __ecereNameSpace__ecere__com__eClass_AddDataMember(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, unsigned int size, unsigned int alignment, int declMode)
4168 {
4169 if(_class && name)
4170 {
4171 if(!__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&_class->members, name))
4172 {
4173 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
4174
4175 if(alignment)
4176 {
4177 int __simpleStruct0;
4178
4179 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
4180 if(_class->memberOffset % alignment)
4181 _class->memberOffset += alignment - (_class->memberOffset % alignment);
4182 }
4183 dataMember = __extension__ ({
4184 struct __ecereNameSpace__ecere__com__DataMember * __ecereInstance1 = __ecereNameSpace__ecere__com__eSystem_New0(structSize_DataMember);
4185
4186 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(name), __ecereInstance1->dataTypeString = __ecereNameSpace__ecere__sys__CopyString(type), __ecereInstance1->id = _class->memberID++, __ecereInstance1->_class = _class, __ecereInstance1->offset = _class->memberOffset, __ecereInstance1->memberOffset = size, __ecereInstance1->memberAccess = declMode, __ecereInstance1->membersAlpha.CompareKey = (void *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString, __ecereInstance1;
4187 });
4188 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&_class->membersAndProperties, dataMember);
4189 _class->memberOffset += size;
4190 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&_class->members, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
4191 struct __ecereNameSpace__ecere__com__BTNamedLink * __ecereInstance1 = __ecereNameSpace__ecere__com__eSystem_New0(structSize_BTNamedLink);
4192
4193 __ecereInstance1->name = dataMember->name, __ecereInstance1->data = dataMember, __ecereInstance1;
4194 }));
4195 return dataMember;
4196 }
4197 }
4198 return (((void *)0));
4199 }
4200
4201 struct __ecereNameSpace__ecere__com__DataMember * __ecereNameSpace__ecere__com__eMember_AddDataMember(struct __ecereNameSpace__ecere__com__DataMember * member, const char * name, const char * type, unsigned int size, unsigned int alignment, int declMode)
4202 {
4203 if(name && !__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&member->membersAlpha, name))
4204 {
4205 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
4206
4207 if(alignment)
4208 {
4209 int __simpleStruct0;
4210
4211 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
4212 if(member->memberOffset % alignment)
4213 member->memberOffset += alignment - (member->memberOffset % alignment);
4214 }
4215 dataMember = __extension__ ({
4216 struct __ecereNameSpace__ecere__com__DataMember * __ecereInstance1 = __ecereNameSpace__ecere__com__eSystem_New0(structSize_DataMember);
4217
4218 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(name), __ecereInstance1->_class = member->_class, __ecereInstance1->dataTypeString = __ecereNameSpace__ecere__sys__CopyString(type), __ecereInstance1->id = member->memberID++, __ecereInstance1->offset = (member->type == 1) ? 0 : member->memberOffset, __ecereInstance1->memberAccess = declMode, __ecereInstance1->membersAlpha.CompareKey = (void *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString, __ecereInstance1;
4219 });
4220 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&member->members, dataMember);
4221 if(member->type == 1)
4222 {
4223 if(size > member->memberOffset)
4224 member->memberOffset = size;
4225 }
4226 else
4227 member->memberOffset += size;
4228 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&member->membersAlpha, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
4229 struct __ecereNameSpace__ecere__com__BTNamedLink * __ecereInstance1 = __ecereNameSpace__ecere__com__eSystem_New0(structSize_BTNamedLink);
4230
4231 __ecereInstance1->name = dataMember->name, __ecereInstance1->data = dataMember, __ecereInstance1;
4232 }));
4233 return dataMember;
4234 }
4235 return (((void *)0));
4236 }
4237
4238 struct __ecereNameSpace__ecere__com__DataMember * __ecereNameSpace__ecere__com__eMember_New(int type, int declMode)
4239 {
4240 return __extension__ ({
4241 struct __ecereNameSpace__ecere__com__DataMember * __ecereInstance1 = __ecereNameSpace__ecere__com__eSystem_New0(structSize_DataMember);
4242
4243 __ecereInstance1->type = type, __ecereInstance1->memberAccess = declMode, __ecereInstance1->membersAlpha.CompareKey = (void *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString, __ecereInstance1;
4244 });
4245 }
4246
4247 static void __ecereNameSpace__ecere__com__SetMemberClass(struct __ecereNameSpace__ecere__com__DataMember * member, struct __ecereNameSpace__ecere__com__Class * _class)
4248 {
4249 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
4250
4251 member->_class = _class;
4252 for(dataMember = member->members.first; dataMember; dataMember = dataMember->next)
4253 __ecereNameSpace__ecere__com__SetMemberClass(dataMember, _class);
4254 }
4255
4256 unsigned int __ecereNameSpace__ecere__com__eMember_AddMember(struct __ecereNameSpace__ecere__com__DataMember * addTo, struct __ecereNameSpace__ecere__com__DataMember * dataMember)
4257 {
4258 int __simpleStruct0, __simpleStruct1;
4259
4260 if(dataMember->name && __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&addTo->membersAlpha, dataMember->name))
4261 {
4262 __ecereNameSpace__ecere__com__DataMember_Free(dataMember);
4263 ((dataMember ? (__ecereClass___ecereNameSpace__ecere__com__DataMember->Destructor ? __ecereClass___ecereNameSpace__ecere__com__DataMember->Destructor((void *)dataMember) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(dataMember)) : 0), dataMember = 0);
4264 return 0;
4265 }
4266 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&addTo->members, dataMember);
4267 if(dataMember->name)
4268 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&addTo->membersAlpha, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
4269 struct __ecereNameSpace__ecere__com__BTNamedLink * __ecereInstance1 = __ecereNameSpace__ecere__com__eSystem_New0(structSize_BTNamedLink);
4270
4271 __ecereInstance1->name = dataMember->name, __ecereInstance1->data = dataMember, __ecereInstance1;
4272 }));
4273 dataMember->_class = addTo->_class;
4274 dataMember->id = addTo->memberID;
4275 if(dataMember->type == 1)
4276 addTo->memberID += 1;
4277 else
4278 addTo->memberID += dataMember->memberID;
4279 addTo->structAlignment = (__simpleStruct0 = addTo->structAlignment, __simpleStruct1 = dataMember->structAlignment, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
4280 dataMember->offset = (addTo->type == 1) ? 0 : addTo->memberOffset;
4281 if(dataMember->structAlignment)
4282 {
4283 int __simpleStruct0, __simpleStruct1;
4284
4285 addTo->structAlignment = (__simpleStruct0 = addTo->structAlignment, __simpleStruct1 = dataMember->structAlignment, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
4286 if(addTo->memberOffset % dataMember->structAlignment)
4287 addTo->memberOffset += dataMember->structAlignment - (addTo->memberOffset % dataMember->structAlignment);
4288 }
4289 if(addTo->type == 1)
4290 {
4291 if(dataMember->memberOffset > addTo->memberOffset)
4292 addTo->memberOffset = dataMember->memberOffset;
4293 }
4294 else
4295 addTo->memberOffset += dataMember->memberOffset;
4296 return 1;
4297 }
4298
4299 unsigned int __ecereNameSpace__ecere__com__eClass_AddMember(struct __ecereNameSpace__ecere__com__Class * _class, struct __ecereNameSpace__ecere__com__DataMember * dataMember)
4300 {
4301 int __simpleStruct0, __simpleStruct1;
4302
4303 if(!_class || _class->comRedefinition || (dataMember->name && __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&_class->members, dataMember->name)))
4304 {
4305 __ecereNameSpace__ecere__com__DataMember_Free(dataMember);
4306 ((dataMember ? (__ecereClass___ecereNameSpace__ecere__com__DataMember->Destructor ? __ecereClass___ecereNameSpace__ecere__com__DataMember->Destructor((void *)dataMember) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(dataMember)) : 0), dataMember = 0);
4307 return 0;
4308 }
4309 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&_class->membersAndProperties, dataMember);
4310 if(dataMember->name)
4311 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&_class->members, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
4312 struct __ecereNameSpace__ecere__com__BTNamedLink * __ecereInstance1 = __ecereNameSpace__ecere__com__eSystem_New0(structSize_BTNamedLink);
4313
4314 __ecereInstance1->name = dataMember->name, __ecereInstance1->data = dataMember, __ecereInstance1;
4315 }));
4316 __ecereNameSpace__ecere__com__SetMemberClass(dataMember, _class);
4317 dataMember->id = _class->memberID;
4318 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, __simpleStruct1 = dataMember->structAlignment, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
4319 if(dataMember->type == 1)
4320 _class->memberID += 1;
4321 else
4322 _class->memberID += dataMember->memberID;
4323 if(dataMember->structAlignment)
4324 {
4325 int __simpleStruct0, __simpleStruct1;
4326
4327 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, __simpleStruct1 = dataMember->structAlignment, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
4328 if(_class->memberOffset % dataMember->structAlignment)
4329 _class->memberOffset += dataMember->structAlignment - (_class->memberOffset % dataMember->structAlignment);
4330 }
4331 dataMember->offset = _class->memberOffset;
4332 _class->memberOffset += dataMember->memberOffset;
4333 return 1;
4334 }
4335
4336 struct __ecereNameSpace__ecere__com__BitMember * __ecereNameSpace__ecere__com__eClass_AddBitMember(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, int bitSize, int bitPos, int declMode)
4337 {
4338 if(_class && name && !__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&_class->members, name))
4339 {
4340 uint64 mask = 0;
4341 int c;
4342 struct __ecereNameSpace__ecere__com__BitMember * bitMember = (bitMember = __ecereNameSpace__ecere__com__eSystem_New0(structSize_BitMember), bitMember->name = __ecereNameSpace__ecere__sys__CopyString(name), bitMember->_class = _class, bitMember->dataTypeString = __ecereNameSpace__ecere__sys__CopyString(type), bitMember->id = _class->memberID++, bitMember->memberAccess = declMode, bitMember);
4343
4344 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&_class->membersAndProperties, bitMember);
4345 if(bitSize)
4346 {
4347 bitMember->pos = (bitPos == -1) ? _class->memberOffset : bitPos;
4348 bitMember->size = bitSize;
4349 _class->memberOffset = bitMember->pos + bitMember->size;
4350 for(c = 0; c < bitSize; c++)
4351 {
4352 if(c)
4353 mask <<= 1;
4354 mask |= 1;
4355 }
4356 bitMember->mask = mask << bitMember->pos;
4357 }
4358 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&_class->members, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
4359 struct __ecereNameSpace__ecere__com__BTNamedLink * __ecereInstance1 = __ecereNameSpace__ecere__com__eSystem_New0(structSize_BTNamedLink);
4360
4361 __ecereInstance1->name = bitMember->name, __ecereInstance1->data = bitMember, __ecereInstance1;
4362 }));
4363 return bitMember;
4364 }
4365 return (((void *)0));
4366 }
4367
4368 extern char *  __ecereNameSpace__ecere__sys__GetLastDirectory(const char *  string, char *  output);
4369
4370 extern char *  __ecereNameSpace__ecere__sys__GetExtension(const char *  string, char *  output);
4371
4372 extern unsigned int __ecereNameSpace__ecere__sys__StripExtension(char *  string);
4373
4374 extern int strcasecmp(const char * , const char * );
4375
4376 static struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__com__Module_Load(struct __ecereNameSpace__ecere__com__Instance * fromModule, const char * name, int importAccess, unsigned int ensureCOM)
4377 {
4378 unsigned int (stdcall * Load)(struct __ecereNameSpace__ecere__com__Instance * module) = (((void *)0));
4379 unsigned int (stdcall * Unload)(struct __ecereNameSpace__ecere__com__Instance * module) = (((void *)0));
4380 struct __ecereNameSpace__ecere__com__Instance * module;
4381
4382 for(module = ((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)fromModule + structSize_Instance)))->application + structSize_Module)))->allModules.first; module; module = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->next)
4383 {
4384 if(!strcmp(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->name, name))
4385 break;
4386 }
4387 if(ensureCOM && (!strcmp(name, "ecereCOM") || !strcmp(name, "ecere")))
4388 {
4389 for(module = ((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)fromModule + structSize_Instance)))->application + structSize_Module)))->allModules.first; module; module = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->next)
4390 {
4391 if(!strcmp(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->name, "ecere") || !strcmp(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->name, "ecereCOM"))
4392 break;
4393 }
4394 }
4395 if(!module)
4396 {
4397 void * library = (((void *)0));
4398
4399 if(ensureCOM && !strcmp(name, "ecereCOM"))
4400 {
4401 Load = (void *)(__ecereDll_Load_ecere);
4402 Unload = (void *)(__ecereDll_Unload_ecere);
4403 }
4404 else
4405 {
4406 char * libLocation = (((void *)0));
4407
4408 library = Instance_Module_Load(libLocation, name, (void *)(&Load), (void *)(&Unload));
4409 }
4410 if(Load)
4411 {
4412 module = (struct __ecereNameSpace__ecere__com__Instance *)__ecereNameSpace__ecere__com__eInstance_New(__ecereNameSpace__ecere__com__eSystem_FindClass(fromModule, "Module"));
4413 ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)fromModule + structSize_Instance)))->application;
4414 ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->library = library;
4415 {
4416 char moduleName[274];
4417 char ext[17];
4418
4419 __ecereNameSpace__ecere__sys__GetLastDirectory(name, moduleName);
4420 __ecereNameSpace__ecere__sys__GetExtension(moduleName, ext);
4421 __ecereNameSpace__ecere__sys__StripExtension(moduleName);
4422 if((!(strcasecmp)(ext, "dylib") || !(strcasecmp)(ext, "so")) && strstr(moduleName, "lib") == moduleName)
4423 {
4424 int len = (int)strlen(moduleName) - 3;
4425
4426 memmove(moduleName, moduleName + 3, len);
4427 moduleName[len] = (char)0;
4428 }
4429 ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->name = __ecereNameSpace__ecere__sys__CopyString(moduleName);
4430 }
4431 ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->Unload = Unload;
4432 ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->origImportType = 0;
4433 if(!Load(module))
4434 {
4435 __ecereNameSpace__ecere__com__eInstance_Delete((struct __ecereNameSpace__ecere__com__Instance *)module);
4436 module = (((void *)0));
4437 }
4438 }
4439 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)fromModule + structSize_Instance)))->application + structSize_Module)))->allModules, module);
4440 }
4441 if(ensureCOM && !strcmp(name, "ecere") && module)
4442 {
4443 name = !strcmp(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->name, "ecereCOM") ? "ecere" : "ecereCOM";
4444 if((!Load && !strcmp(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->name, "ecereCOM")) || (Load && (!__thisModule || !((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->name || !strcmp(((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->name, "ecereCOM")) && Load != __ecereDll_Load_ecere))
4445 {
4446 struct __ecereNameSpace__ecere__com__Instance * module;
4447
4448 for(module = ((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)fromModule + structSize_Instance)))->application + structSize_Module)))->allModules.first; module; module = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->next)
4449 {
4450 if(!strcmp(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->name, name))
4451 break;
4452 }
4453 if(!module)
4454 {
4455 Load = (void *)(__ecereDll_Load_ecere);
4456 Unload = (void *)(__ecereDll_Unload_ecere);
4457 module = (struct __ecereNameSpace__ecere__com__Instance *)__ecereNameSpace__ecere__com__eInstance_New(__ecereNameSpace__ecere__com__eSystem_FindClass(fromModule, "Module"));
4458 ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)fromModule + structSize_Instance)))->application;
4459 ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->library = (((void *)0));
4460 ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->name = __ecereNameSpace__ecere__sys__CopyString(name);
4461 ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->Unload = Unload;
4462 if(!Load(module))
4463 {
4464 __ecereNameSpace__ecere__com__eInstance_Delete((struct __ecereNameSpace__ecere__com__Instance *)module);
4465 module = (((void *)0));
4466 }
4467 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)fromModule + structSize_Instance)))->application + structSize_Module)))->allModules, module);
4468 }
4469 if(module)
4470 {
4471 if(fromModule)
4472 {
4473 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)fromModule + structSize_Instance)))->modules, __extension__ ({
4474 struct __ecereNameSpace__ecere__com__SubModule * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__com__SubModule);
4475
4476 __ecereInstance1->module = module, __ecereInstance1->importMode = importAccess, __ecereInstance1;
4477 }));
4478 }
4479 module->_refCount++;
4480 }
4481 }
4482 }
4483 if(module)
4484 {
4485 if(fromModule)
4486 {
4487 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)fromModule + structSize_Instance)))->modules, __extension__ ({
4488 struct __ecereNameSpace__ecere__com__SubModule * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__com__SubModule);
4489
4490 __ecereInstance1->module = module, __ecereInstance1->importMode = importAccess, __ecereInstance1;
4491 }));
4492 }
4493 module->_refCount++;
4494 }
4495 return module;
4496 }
4497
4498 struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__com__eModule_Load(struct __ecereNameSpace__ecere__com__Instance * fromModule, const char * name, int importAccess)
4499 {
4500 return __ecereNameSpace__ecere__com__Module_Load(fromModule, name, importAccess, 1);
4501 }
4502
4503 struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__com__eModule_LoadStrict(struct __ecereNameSpace__ecere__com__Instance * fromModule, const char * name, int importAccess)
4504 {
4505 return __ecereNameSpace__ecere__com__Module_Load(fromModule, name, importAccess, 0);
4506 }
4507
4508 struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__com__eModule_LoadStatic(struct __ecereNameSpace__ecere__com__Instance * fromModule, const char * name, int importAccess, unsigned int (* Load)(struct __ecereNameSpace__ecere__com__Instance * module), unsigned int (* Unload)(struct __ecereNameSpace__ecere__com__Instance * module))
4509 {
4510 struct __ecereNameSpace__ecere__com__Instance * module;
4511
4512 for(module = ((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)fromModule + structSize_Instance)))->application + structSize_Module)))->allModules.first; module; module = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->next)
4513 {
4514 if(!strcmp(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->name, name))
4515 break;
4516 }
4517 if(!module)
4518 {
4519 if(Load)
4520 {
4521 module = (struct __ecereNameSpace__ecere__com__Instance *)__ecereNameSpace__ecere__com__eInstance_New(__ecereNameSpace__ecere__com__eSystem_FindClass(fromModule, "Module"));
4522 ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)fromModule + structSize_Instance)))->application;
4523 ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->name = __ecereNameSpace__ecere__sys__CopyString(name);
4524 ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->origImportType = 1;
4525 ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->Unload = (void *)Unload;
4526 if(!Load(module))
4527 {
4528 __ecereNameSpace__ecere__com__eInstance_Delete((struct __ecereNameSpace__ecere__com__Instance *)module);
4529 module = (((void *)0));
4530 }
4531 }
4532 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)fromModule + structSize_Instance)))->application + structSize_Module)))->allModules, module);
4533 }
4534 if(module)
4535 {
4536 if(fromModule)
4537 {
4538 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)fromModule + structSize_Instance)))->modules, __extension__ ({
4539 struct __ecereNameSpace__ecere__com__SubModule * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__com__SubModule);
4540
4541 __ecereInstance1->module = module, __ecereInstance1->importMode = importAccess, __ecereInstance1;
4542 }));
4543 }
4544 module->_refCount++;
4545 }
4546 return module;
4547 }
4548
4549 void __ecereNameSpace__ecere__com__eModule_Unload(struct __ecereNameSpace__ecere__com__Instance * fromModule, struct __ecereNameSpace__ecere__com__Instance * module)
4550 {
4551 struct __ecereNameSpace__ecere__sys__OldLink * m;
4552
4553 for(m = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)fromModule + structSize_Instance)))->modules.first; m; m = m->next)
4554 {
4555 if(m->data == module)
4556 break;
4557 }
4558 if(m)
4559 {
4560 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Delete(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)fromModule + structSize_Instance)))->modules, m);
4561 (__ecereNameSpace__ecere__com__eInstance_DecRef(module), module = 0);
4562 }
4563 }
4564
4565 void __ecereNameSpace__ecere__com__eEnum_AddFixedValue(struct __ecereNameSpace__ecere__com__Class * _class, const char * string, long long value)
4566 {
4567 if(_class && _class->type == 4)
4568 {
4569 struct __ecereNameSpace__ecere__com__EnumClassData * data = (struct __ecereNameSpace__ecere__com__EnumClassData *)_class->data;
4570 struct __ecereNameSpace__ecere__sys__NamedLink64 * item;
4571
4572 for(item = data->values.first; item; item = item->next)
4573 if(!strcmp(item->name, string))
4574 break;
4575 if(!item)
4576 {
4577 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&data->values, __extension__ ({
4578 struct __ecereNameSpace__ecere__sys__NamedLink64 * __ecereInstance1 = __ecereNameSpace__ecere__com__eSystem_New0(structSize_NamedLink64);
4579
4580 __ecereInstance1->data = value, __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(string), __ecereInstance1;
4581 }));
4582 if(value > data->largest)
4583 data->largest = value;
4584 }
4585 }
4586 }
4587
4588 long long __ecereNameSpace__ecere__com__eEnum_AddValue(struct __ecereNameSpace__ecere__com__Class * _class, const char * string)
4589 {
4590 if(_class && _class->type == 4)
4591 {
4592 struct __ecereNameSpace__ecere__com__EnumClassData * data = (struct __ecereNameSpace__ecere__com__EnumClassData *)_class->data;
4593 long long value = data->largest + 1;
4594 struct __ecereNameSpace__ecere__sys__NamedLink64 * item;
4595
4596 for(item = data->values.first; item; item = item->next)
4597 if(!strcmp(item->name, string))
4598 break;
4599 if(!item)
4600 {
4601 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&data->values, __extension__ ({
4602 struct __ecereNameSpace__ecere__sys__NamedLink64 * __ecereInstance1 = __ecereNameSpace__ecere__com__eSystem_New0(structSize_NamedLink64);
4603
4604 __ecereInstance1->data = value, __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(string), __ecereInstance1;
4605 }));
4606 if(value > data->largest)
4607 data->largest = value;
4608 return value;
4609 }
4610 }
4611 return -1;
4612 }
4613
4614 static void __ecereNameSpace__ecere__com__NameSpace_Free(struct __ecereNameSpace__ecere__com__NameSpace * parentNameSpace)
4615 {
4616 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
4617
4618 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)parentNameSpace->name), parentNameSpace->name = 0);
4619 while((nameSpace = (struct __ecereNameSpace__ecere__com__NameSpace *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&parentNameSpace->nameSpaces)))
4620 {
4621 __ecereNameSpace__ecere__com__NameSpace_Free(nameSpace);
4622 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Delete(&parentNameSpace->nameSpaces, (struct __ecereNameSpace__ecere__sys__BTNode *)nameSpace);
4623 }
4624 }
4625
4626 static void __ecereNameSpace__ecere__com__Application_Destructor(struct __ecereNameSpace__ecere__com__Instance * app)
4627 {
4628 if(((struct __ecereNameSpace__ecere__com__Application *)(((char *)app + structSize_Module)))->parsedCommand)
4629 {
4630 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)((struct __ecereNameSpace__ecere__com__Application *)(((char *)app + structSize_Module)))->argv), ((struct __ecereNameSpace__ecere__com__Application * )(((char * )app + structSize_Module)))->argv = 0);
4631 (__ecereNameSpace__ecere__com__eSystem_Delete(((struct __ecereNameSpace__ecere__com__Application *)(((char *)app + structSize_Module)))->parsedCommand), ((struct __ecereNameSpace__ecere__com__Application * )(((char * )app + structSize_Module)))->parsedCommand = 0);
4632 }
4633 }
4634
4635 static unsigned int __ecereNameSpace__ecere__com__Module_Constructor(struct __ecereNameSpace__ecere__com__Instance * module)
4636 {
4637 ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->privateNameSpace.classes.CompareKey = (void *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString;
4638 ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->privateNameSpace.defines.CompareKey = (void *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString;
4639 ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->privateNameSpace.functions.CompareKey = (void *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString;
4640 ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->privateNameSpace.nameSpaces.CompareKey = (void *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString;
4641 ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->publicNameSpace.classes.CompareKey = (void *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString;
4642 ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->publicNameSpace.defines.CompareKey = (void *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString;
4643 ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->publicNameSpace.functions.CompareKey = (void *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString;
4644 ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->publicNameSpace.nameSpaces.CompareKey = (void *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString;
4645 return 1;
4646 }
4647
4648 static void __ecereNameSpace__ecere__com__Module_Destructor(struct __ecereNameSpace__ecere__com__Instance * module)
4649 {
4650 struct __ecereNameSpace__ecere__com__Class * _class;
4651 struct __ecereNameSpace__ecere__com__DefinedExpression * def;
4652 struct __ecereNameSpace__ecere__com__GlobalFunction * function;
4653 struct __ecereNameSpace__ecere__com__Instance * m;
4654 struct __ecereNameSpace__ecere__com__SubModule * handle;
4655
4656 for(m = ((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application + structSize_Module)))->allModules.first; m; m = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)m + structSize_Instance)))->next)
4657 {
4658 struct __ecereNameSpace__ecere__com__SubModule * next;
4659
4660 for(handle = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)m + structSize_Instance)))->modules.first; handle; handle = next)
4661 {
4662 next = handle->next;
4663 if(handle->module == module)
4664 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Delete(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)m + structSize_Instance)))->modules, handle);
4665 }
4666 }
4667 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->Unload)
4668 {
4669 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->origImportType == 1)
4670 {
4671 unsigned int (* Unload)(struct __ecereNameSpace__ecere__com__Instance * module) = (void *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->Unload;
4672
4673 Unload(module);
4674 }
4675 else
4676 {
4677 unsigned int (stdcall * Unload)(struct __ecereNameSpace__ecere__com__Instance * module) = (void *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->Unload;
4678
4679 Unload(module);
4680 }
4681 }
4682 {
4683 struct __ecereNameSpace__ecere__com__Instance * ourWorld = __ecereClass___ecereNameSpace__ecere__com__Class->module;
4684 void * ourHandle = (((void *)0));
4685
4686 while((handle = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->modules.last))
4687 {
4688 struct __ecereNameSpace__ecere__com__Instance * depModule = handle->module;
4689
4690 if(depModule == ourWorld)
4691 {
4692 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->modules, handle);
4693 ourHandle = handle;
4694 }
4695 else
4696 {
4697 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Delete(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->modules, handle);
4698 (__ecereNameSpace__ecere__com__eInstance_DecRef(depModule), depModule = 0);
4699 }
4700 }
4701 if(ourHandle)
4702 {
4703 (__ecereNameSpace__ecere__com__eSystem_Delete(ourHandle), ourHandle = 0);
4704 (__ecereNameSpace__ecere__com__eInstance_DecRef(ourWorld), ourWorld = 0);
4705 }
4706 }
4707 for(; (_class = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->classes.first); )
4708 {
4709 if(_class->nameSpace)
4710 {
4711 struct __ecereNameSpace__ecere__com__BTNamedLink * classLink = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&(*_class->nameSpace).classes, _class->name);
4712 struct __ecereNameSpace__ecere__sys__OldLink * t;
4713
4714 for(t = _class->templatized.first; t; t = t->next)
4715 {
4716 struct __ecereNameSpace__ecere__com__Class * template = t->data;
4717 struct __ecereNameSpace__ecere__com__BTNamedLink * link;
4718
4719 link = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&(*template->nameSpace).classes, template->name);
4720 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Delete(&(*template->nameSpace).classes, (struct __ecereNameSpace__ecere__sys__BTNode *)link);
4721 template->nameSpace = (((void *)0));
4722 }
4723 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Delete(&(*_class->nameSpace).classes, (struct __ecereNameSpace__ecere__sys__BTNode *)classLink);
4724 _class->nameSpace = (((void *)0));
4725 }
4726 _class->module = (((void *)0));
4727 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->classes, _class);
4728 if(_class->count <= 0 || _class->type != 0 || _class->isInstanceClass)
4729 __ecereNameSpace__ecere__com__eClass_Unregister(_class);
4730 else
4731 {
4732 }
4733 }
4734 for(; (def = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->defines.first); )
4735 {
4736 if(def->nameSpace)
4737 {
4738 struct __ecereNameSpace__ecere__com__BTNamedLink * defLink;
4739
4740 for(defLink = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&(*def->nameSpace).defines); defLink; defLink = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)defLink)))
4741 if(defLink->data == def)
4742 {
4743 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Delete(&(*def->nameSpace).defines, (struct __ecereNameSpace__ecere__sys__BTNode *)defLink);
4744 break;
4745 }
4746 }
4747 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)def->name), def->name = 0);
4748 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)def->value), def->value = 0);
4749 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Delete(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->defines, def);
4750 }
4751 for(; (function = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->functions.first); )
4752 {
4753 if(function->nameSpace)
4754 {
4755 struct __ecereNameSpace__ecere__com__BTNamedLink * functionLink;
4756
4757 for(functionLink = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&(*function->nameSpace).functions); functionLink; functionLink = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)functionLink)))
4758 if(functionLink->data == function)
4759 {
4760 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Delete(&(*function->nameSpace).functions, (struct __ecereNameSpace__ecere__sys__BTNode *)functionLink);
4761 break;
4762 }
4763 }
4764 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)function->name), function->name = 0);
4765 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)function->dataTypeString), function->dataTypeString = 0);
4766 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Delete(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->functions, function);
4767 }
4768 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->name), ((struct __ecereNameSpace__ecere__com__Module * )(((char * )module + structSize_Instance)))->name = 0);
4769 __ecereNameSpace__ecere__com__NameSpace_Free(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->privateNameSpace);
4770 __ecereNameSpace__ecere__com__NameSpace_Free(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->publicNameSpace);
4771 if(module != ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application)
4772 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(&((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application + structSize_Module)))->allModules, module);
4773 else
4774 __ecereNameSpace__ecere__com__NameSpace_Free(&((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application + structSize_Module)))->systemNameSpace);
4775 Instance_Module_Free(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->library);
4776 }
4777
4778 static long long __ecereNameSpace__ecere__com__GetEnumSize(struct __ecereNameSpace__ecere__com__Class * _class)
4779 {
4780 struct __ecereNameSpace__ecere__com__EnumClassData * data = (struct __ecereNameSpace__ecere__com__EnumClassData *)_class->data;
4781
4782 return data->largest + 1;
4783 }
4784
4785 char * strlwr(char * string)
4786 {
4787 int c;
4788
4789 for(c = 0; string[c]; c++)
4790 if(string[c] >= 'A' && string[c] <= 'Z')
4791 string[c] += 'a' - 'A';
4792 return string;
4793 }
4794
4795 char * strupr(char * string)
4796 {
4797 int c;
4798
4799 for(c = 0; string[c]; c++)
4800 if(string[c] >= 'a' && string[c] <= 'z')
4801 string[c] -= 'a' - 'A';
4802 return string;
4803 }
4804
4805 struct __ecereNameSpace__ecere__com__DefinedExpression * __ecereNameSpace__ecere__com__eSystem_RegisterDefine(const char * name, const char * value, struct __ecereNameSpace__ecere__com__Instance * module, int declMode)
4806 {
4807 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace = (((void *)0));
4808 int start = 0, c;
4809
4810 nameSpace = (declMode == 1) ? &((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->publicNameSpace : &((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->privateNameSpace;
4811 if(declMode == 4)
4812 nameSpace = &((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application + structSize_Module)))->systemNameSpace;
4813 if(declMode != 3)
4814 {
4815 for(c = 0; name[c]; c++)
4816 {
4817 if(name[c] == '.' || (name[c] == ':' && name[c + 1] == ':'))
4818 {
4819 struct __ecereNameSpace__ecere__com__NameSpace * newSpace;
4820 char * spaceName = __ecereNameSpace__ecere__com___malloc(c - start + 1);
4821
4822 strncpy(spaceName, name + start, c - start);
4823 spaceName[c - start] = '\0';
4824 newSpace = (struct __ecereNameSpace__ecere__com__NameSpace *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&(*nameSpace).nameSpaces, spaceName);
4825 if(!newSpace)
4826 {
4827 newSpace = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(struct __ecereNameSpace__ecere__com__NameSpace) * (1));
4828 (*newSpace).classes.CompareKey = (void *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString;
4829 (*newSpace).defines.CompareKey = (void *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString;
4830 (*newSpace).functions.CompareKey = (void *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString;
4831 (*newSpace).nameSpaces.CompareKey = (void *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString;
4832 (*newSpace).name = spaceName;
4833 (*newSpace).parent = nameSpace;
4834 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&(*nameSpace).nameSpaces, (struct __ecereNameSpace__ecere__sys__BTNode *)newSpace);
4835 }
4836 else
4837 (__ecereNameSpace__ecere__com__eSystem_Delete(spaceName), spaceName = 0);
4838 nameSpace = newSpace;
4839 if(name[c] == ':')
4840 c++;
4841 start = c + 1;
4842 }
4843 }
4844 }
4845 else
4846 c = (int)strlen(name);
4847 if(c - start && !__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&(*nameSpace).defines, name + start))
4848 {
4849 struct __ecereNameSpace__ecere__com__DefinedExpression * def = (def = __ecereNameSpace__ecere__com__eSystem_New0(structSize_DefinedExpression), def->name = __ecereNameSpace__ecere__sys__CopyString(name), def->nameSpace = nameSpace, def->value = __ecereNameSpace__ecere__sys__CopyString(value), def);
4850
4851 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&(*nameSpace).defines, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
4852 struct __ecereNameSpace__ecere__com__BTNamedLink * __ecereInstance1 = __ecereNameSpace__ecere__com__eSystem_New0(structSize_BTNamedLink);
4853
4854 __ecereInstance1->name = def->name + start, __ecereInstance1->data = def, __ecereInstance1;
4855 }));
4856 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->defines, def);
4857 return def;
4858 }
4859 return (((void *)0));
4860 }
4861
4862 struct __ecereNameSpace__ecere__com__GlobalFunction * __ecereNameSpace__ecere__com__eSystem_RegisterFunction(const char * name, const char * type, void * func, struct __ecereNameSpace__ecere__com__Instance * module, int declMode)
4863 {
4864 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace = (((void *)0));
4865 int start = 0, c;
4866
4867 nameSpace = (declMode == 1) ? &((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->publicNameSpace : &((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->privateNameSpace;
4868 if(declMode == 4)
4869 nameSpace = &((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application + structSize_Module)))->systemNameSpace;
4870 if(declMode != 3)
4871 {
4872 for(c = 0; name[c]; c++)
4873 {
4874 if(name[c] == '.' || (name[c] == ':' && name[c + 1] == ':'))
4875 {
4876 struct __ecereNameSpace__ecere__com__NameSpace * newSpace;
4877 char * spaceName = __ecereNameSpace__ecere__com___malloc(c - start + 1);
4878
4879 strncpy(spaceName, name + start, c - start);
4880 spaceName[c - start] = '\0';
4881 newSpace = (struct __ecereNameSpace__ecere__com__NameSpace *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&(*nameSpace).nameSpaces, spaceName);
4882 if(!newSpace)
4883 {
4884 newSpace = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(struct __ecereNameSpace__ecere__com__NameSpace) * (1));
4885 (*newSpace).classes.CompareKey = (void *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString;
4886 (*newSpace).defines.CompareKey = (void *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString;
4887 (*newSpace).functions.CompareKey = (void *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString;
4888 (*newSpace).nameSpaces.CompareKey = (void *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString;
4889 (*newSpace).name = spaceName;
4890 (*newSpace).parent = nameSpace;
4891 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&(*nameSpace).nameSpaces, (struct __ecereNameSpace__ecere__sys__BTNode *)newSpace);
4892 }
4893 else
4894 (__ecereNameSpace__ecere__com__eSystem_Delete(spaceName), spaceName = 0);
4895 nameSpace = newSpace;
4896 if(name[c] == ':')
4897 c++;
4898 start = c + 1;
4899 }
4900 }
4901 }
4902 else
4903 c = (int)strlen(name);
4904 if(c - start && !__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&(*nameSpace).functions, name + start))
4905 {
4906 struct __ecereNameSpace__ecere__com__GlobalFunction * function = (function = __ecereNameSpace__ecere__com__eSystem_New0(structSize_GlobalFunction), function->name = __ecereNameSpace__ecere__sys__CopyString(name), function->nameSpace = nameSpace, function->dataTypeString = __ecereNameSpace__ecere__sys__CopyString(type), function->function = func, function->module = module, function);
4907
4908 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&(*nameSpace).functions, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
4909 struct __ecereNameSpace__ecere__com__BTNamedLink * __ecereInstance1 = __ecereNameSpace__ecere__com__eSystem_New0(structSize_BTNamedLink);
4910
4911 __ecereInstance1->name = function->name + start, __ecereInstance1->data = function, __ecereInstance1;
4912 }));
4913 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->functions, function);
4914 return function;
4915 }
4916 return (((void *)0));
4917 }
4918
4919 struct __ecereNameSpace__ecere__com__DefinedExpression * __ecereNameSpace__ecere__com__eSystem_FindDefine(struct __ecereNameSpace__ecere__com__Instance * module, const char * name)
4920 {
4921 if(name && module)
4922 {
4923 struct __ecereNameSpace__ecere__com__BTNamedLink * link;
4924
4925 link = __ecereNameSpace__ecere__com__SearchNameSpace(&((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application + structSize_Module)))->systemNameSpace, name, &(*((struct __ecereNameSpace__ecere__com__NameSpace *)0)).defines);
4926 if(link)
4927 return link->data;
4928 link = __ecereNameSpace__ecere__com__SearchModule(module, name, &(*((struct __ecereNameSpace__ecere__com__NameSpace *)0)).defines, 1);
4929 if(link)
4930 return link->data;
4931 }
4932 return (((void *)0));
4933 }
4934
4935 struct __ecereNameSpace__ecere__com__GlobalFunction * __ecereNameSpace__ecere__com__eSystem_FindFunction(struct __ecereNameSpace__ecere__com__Instance * module, const char * name)
4936 {
4937 if(name && module)
4938 {
4939 struct __ecereNameSpace__ecere__com__BTNamedLink * link;
4940
4941 link = __ecereNameSpace__ecere__com__SearchNameSpace(&((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application + structSize_Module)))->systemNameSpace, name, &(*((struct __ecereNameSpace__ecere__com__NameSpace *)0)).functions);
4942 if(link)
4943 return link->data;
4944 link = __ecereNameSpace__ecere__com__SearchModule(module, name, &(*((struct __ecereNameSpace__ecere__com__NameSpace *)0)).functions, 1);
4945 if(link)
4946 return link->data;
4947 }
4948 return (((void *)0));
4949 }
4950
4951 void * __ecereNameSpace__ecere__com__eSystem_Renew(void * memory, unsigned int size)
4952 {
4953 return __ecereNameSpace__ecere__com___realloc(memory, size);
4954 }
4955
4956 void * __ecereNameSpace__ecere__com__eSystem_Renew0(void * memory, unsigned int size)
4957 {
4958 return __ecereNameSpace__ecere__com___crealloc(memory, size);
4959 }
4960
4961 void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size)
4962 {
4963 return __ecereNameSpace__ecere__com___malloc(size);
4964 }
4965
4966 void * __ecereNameSpace__ecere__com__eSystem_New0(unsigned int size)
4967 {
4968 return __ecereNameSpace__ecere__com___calloc(1, size);
4969 }
4970
4971 void __ecereNameSpace__ecere__com__eSystem_Delete(void * memory)
4972 {
4973 if(memory)
4974 __ecereNameSpace__ecere__com___free(memory);
4975 }
4976
4977 void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property)
4978 {
4979 if(instance && _property && _property->selfWatchable)
4980 {
4981 struct __ecereNameSpace__ecere__com__Class * _class;
4982
4983 for(_class = ((struct __ecereNameSpace__ecere__com__Instance *)(char *)instance)->_class; _class; _class = _class->base)
4984 {
4985 struct __ecereNameSpace__ecere__com__SelfWatcher * selfWatcher, * next;
4986
4987 for(selfWatcher = _class->selfWatchers.first; selfWatcher; selfWatcher = next)
4988 {
4989 next = selfWatcher->next;
4990 if(selfWatcher->_property == _property)
4991 selfWatcher->callback(instance);
4992 }
4993 }
4994 }
4995 }
4996
4997 void __ecereNameSpace__ecere__com__eInstance_FireWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property)
4998 {
4999 if(instance && _property && _property->isWatchable)
5000 {
5001 struct __ecereNameSpace__ecere__com__Instance * module = ((struct __ecereNameSpace__ecere__com__Instance *)(char *)instance)->_class ? ((struct __ecereNameSpace__ecere__com__Instance *)(char *)instance)->_class->module : (((void *)0));
5002 struct __ecereNameSpace__ecere__com__Instance * application = module ? ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application : (((void *)0));
5003 int flags = application ? ((struct __ecereNameSpace__ecere__com__Application *)(((char *)application + structSize_Module)))->isGUIApp : 0;
5004 unsigned int inCompiler = (flags & 8) ? 1 : 0;
5005 unsigned int force32Bits = (flags & 4) ? 1 : 0;
5006
5007 if(!force32Bits || !inCompiler)
5008 {
5009 struct __ecereNameSpace__ecere__sys__OldList * watchers = (struct __ecereNameSpace__ecere__sys__OldList *)((unsigned char *)instance + _property->watcherOffset);
5010 struct __ecereNameSpace__ecere__com__Watcher * watcher, * next;
5011
5012 for(watcher = (*watchers).first; watcher; watcher = next)
5013 {
5014 next = watcher->next;
5015 watcher->callback(watcher->object, instance);
5016 }
5017 }
5018 }
5019 }
5020
5021 void __ecereNameSpace__ecere__com__eProperty_Watchable(struct __ecereNameSpace__ecere__com__Property * _property)
5022 {
5023 if(!_property->isWatchable)
5024 {
5025 struct __ecereNameSpace__ecere__com__Class * _class = _property->_class;
5026
5027 if(!_class->computeSize)
5028 {
5029 _property->watcherOffset = _class->structSize;
5030 _class->structSize += sizeof(struct __ecereNameSpace__ecere__sys__OldList);
5031 __ecereNameSpace__ecere__com__FixDerivativesBase(_class, _class);
5032 }
5033 _property->isWatchable = 1;
5034 }
5035 }
5036
5037 void __ecereNameSpace__ecere__com__eClass_DestructionWatchable(struct __ecereNameSpace__ecere__com__Class * _class)
5038 {
5039 if(!_class->destructionWatchOffset)
5040 {
5041 _class->destructionWatchOffset = _class->structSize;
5042 _class->structSize += sizeof(struct __ecereNameSpace__ecere__sys__OldList);
5043 __ecereNameSpace__ecere__com__FixDerivativesBase(_class, _class);
5044 }
5045 }
5046
5047 void __ecereNameSpace__ecere__com__eProperty_SelfWatch(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, void (* callback)(void *))
5048 {
5049 if(_class)
5050 {
5051 struct __ecereNameSpace__ecere__com__Property * _property = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, name, _class->module);
5052
5053 if(!_property)
5054 _property = __ecereNameSpace__ecere__com__eClass_AddProperty(_class, name, (((void *)0)), (((void *)0)), (((void *)0)), 4);
5055 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&_class->selfWatchers, __extension__ ({
5056 struct __ecereNameSpace__ecere__com__SelfWatcher * __ecereInstance1 = __ecereNameSpace__ecere__com__eSystem_New0(structSize_SelfWatcher);
5057
5058 __ecereInstance1->_property = _property, __ecereInstance1->callback = callback, __ecereInstance1;
5059 }));
5060 _property->selfWatchable = 1;
5061 }
5062 }
5063
5064 void __ecereNameSpace__ecere__com__eInstance_Watch(void * instance, struct __ecereNameSpace__ecere__com__Property * _property, void * object, void (* callback)(void *, void *))
5065 {
5066 if(_property->isWatchable)
5067 {
5068 struct __ecereNameSpace__ecere__sys__OldList * watchers = (struct __ecereNameSpace__ecere__sys__OldList *)((unsigned char *)instance + _property->watcherOffset);
5069
5070 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*watchers), __extension__ ({
5071 struct __ecereNameSpace__ecere__com__Watcher * __ecereInstance1 = __ecereNameSpace__ecere__com__eSystem_New0(structSize_Watcher);
5072
5073 __ecereInstance1->callback = callback, __ecereInstance1->object = object, __ecereInstance1;
5074 }));
5075 }
5076 }
5077
5078 void __ecereNameSpace__ecere__com__eInstance_WatchDestruction(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Instance * object, void (* callback)(void *, void *))
5079 {
5080 struct __ecereNameSpace__ecere__sys__OldList * watchers = (struct __ecereNameSpace__ecere__sys__OldList *)((unsigned char *)instance + ((struct __ecereNameSpace__ecere__com__Instance *)(char *)instance)->_class->destructionWatchOffset);
5081
5082 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*watchers), __extension__ ({
5083 struct __ecereNameSpace__ecere__com__Watcher * __ecereInstance1 = __ecereNameSpace__ecere__com__eSystem_New0(structSize_Watcher);
5084
5085 __ecereInstance1->callback = callback, __ecereInstance1->object = object, __ecereInstance1;
5086 }));
5087 }
5088
5089 void __ecereNameSpace__ecere__com__eInstance_StopWatching(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property, struct __ecereNameSpace__ecere__com__Instance * object)
5090 {
5091 if(instance && (!_property || _property->isWatchable))
5092 {
5093 if(_property)
5094 {
5095 struct __ecereNameSpace__ecere__sys__OldList * watchers = (struct __ecereNameSpace__ecere__sys__OldList *)((unsigned char *)instance + _property->watcherOffset);
5096 struct __ecereNameSpace__ecere__com__Watcher * watcher;
5097
5098 for(watcher = (*watchers).first; watcher; watcher = watcher->next)
5099 if(watcher->object == object)
5100 {
5101 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Delete((&*watchers), watcher);
5102 break;
5103 }
5104 }
5105 else
5106 {
5107 struct __ecereNameSpace__ecere__com__Class * _class, * base;
5108
5109 for(_class = ((struct __ecereNameSpace__ecere__com__Instance *)(char *)instance)->_class; _class; _class = base)
5110 {
5111 if(_class->destructionWatchOffset)
5112 {
5113 struct __ecereNameSpace__ecere__sys__OldList * watchers = (struct __ecereNameSpace__ecere__sys__OldList *)((unsigned char *)instance + _class->destructionWatchOffset);
5114 struct __ecereNameSpace__ecere__com__Watcher * watcher;
5115
5116 for(watcher = (*watchers).first; watcher; watcher = watcher->next)
5117 {
5118 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Delete((&*watchers), watcher);
5119 break;
5120 }
5121 }
5122 for(_property = (struct __ecereNameSpace__ecere__com__Property *)_class->membersAndProperties.first; _property; _property = _property->next)
5123 {
5124 if(_property->isProperty && _property->isWatchable)
5125 {
5126 struct __ecereNameSpace__ecere__sys__OldList * watchers = (struct __ecereNameSpace__ecere__sys__OldList *)((unsigned char *)instance + _property->watcherOffset);
5127 struct __ecereNameSpace__ecere__com__Watcher * watcher;
5128
5129 for(watcher = (*watchers).first; watcher; watcher = watcher->next)
5130 if(watcher->object == object)
5131 {
5132 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Delete((&*watchers), watcher);
5133 break;
5134 }
5135 }
5136 }
5137 base = _class->base;
5138 if(base && (base->type == 1000 || base->isInstanceClass))
5139 base = (((void *)0));
5140 }
5141 }
5142 }
5143 }
5144
5145 struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eClass_GetDesigner(struct __ecereNameSpace__ecere__com__Class * _class)
5146 {
5147 for(; _class; _class = _class->base)
5148 {
5149 if(_class->designerClass)
5150 return (struct __ecereNameSpace__ecere__com__Class *)__ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, _class->designerClass);
5151 }
5152 return (((void *)0));
5153 }
5154
5155 struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eInstance_GetDesigner(struct __ecereNameSpace__ecere__com__Instance * instance)
5156 {
5157 if(instance)
5158 return __ecereNameSpace__ecere__com__eClass_GetDesigner(((struct __ecereNameSpace__ecere__com__Instance *)(char *)instance)->_class);
5159 return (((void *)0));
5160 }
5161
5162 unsigned int __ecereNameSpace__ecere__com__LocateModule(const char * name, const char * fileName)
5163 {
5164 return Instance_LocateModule(name, fileName);
5165 }
5166
5167 extern void __ecereNameSpace__ecere__com__InitializeDataTypes1(struct __ecereNameSpace__ecere__com__Instance * module);
5168
5169 extern void __ecereNameSpace__ecere__com__InitializeDataTypes(struct __ecereNameSpace__ecere__com__Instance * module);
5170
5171 extern double sin(double number);
5172
5173 extern double sinh(double number);
5174
5175 extern double cosh(double number);
5176
5177 extern double tanh(double number);
5178
5179 extern double sqrt(double number);
5180
5181 extern double cos(double number);
5182
5183 extern double tan(double number);
5184
5185 extern double atan2(double y, double x);
5186
5187 extern double asin(double number);
5188
5189 extern double acos(double number);
5190
5191 extern double atan(double number);
5192
5193 extern double asinh(double number);
5194
5195 extern double acosh(double number);
5196
5197 extern double atanh(double number);
5198
5199 extern double pow(double number, double number2);
5200
5201 extern double fmod(double x, double y);
5202
5203 extern double fabs(double number);
5204
5205 extern double log(double number);
5206
5207 extern double log10(double number);
5208
5209 extern double ceil(double number);
5210
5211 extern double floor(double number);
5212
5213 extern double exp(double number);
5214
5215 extern void qsort(void * , size_t, size_t, int (* )(void * , void * ));
5216
5217 extern int system(const char * );
5218
5219 extern int atoi(const char * );
5220
5221 extern double atof(const char * );
5222
5223 extern int tolower(int);
5224
5225 extern int toupper(int);
5226
5227 extern unsigned int isdigit(int);
5228
5229 extern char *  getenv(const char *  name);
5230
5231 extern int rename(const char *  oldpath, const char *  newpath);
5232
5233 extern char *  strncat(char * , const char * , size_t n);
5234
5235 extern size_t strspn(const char * , const char * );
5236
5237 extern size_t strcspn(const char * , const char * );
5238
5239 extern char *  strpbrk(const char * , const char * );
5240
5241 extern int strncasecmp(const char * , const char * , size_t n);
5242
5243 extern int memcmp(const void * , const void * , size_t size);
5244
5245 extern int vsprintf(char * , const char * , __builtin_va_list);
5246
5247 extern int puts(const char * );
5248
5249 extern int fputs(const char * , void *  stream);
5250
5251 extern int isalnum(int c);
5252
5253 extern int isalpha(int c);
5254
5255 extern int islower(int c);
5256
5257 extern int isupper(int c);
5258
5259 extern int isprint(int c);
5260
5261 static void __ecereNameSpace__ecere__com__LoadCOM(struct __ecereNameSpace__ecere__com__Instance * module)
5262 {
5263 unsigned int force64Bits = (((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application + structSize_Module)))->isGUIApp & 2) ? 1 : 0;
5264 unsigned int force32Bits = (((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application + structSize_Module)))->isGUIApp & 4) ? 1 : 0;
5265 unsigned int inCompiler = (((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application + structSize_Module)))->isGUIApp & 8) ? 1 : 0;
5266 int pointerSize = force64Bits ? 8 : force32Bits ? 4 : sizeof(void *);
5267 struct __ecereNameSpace__ecere__com__Class * applicationClass;
5268 struct __ecereNameSpace__ecere__com__Class * enumClass, * structClass, * boolClass;
5269 struct __ecereNameSpace__ecere__com__Class * moduleClass;
5270 struct __ecereNameSpace__ecere__com__Class * baseClass = __ecereNameSpace__ecere__com__eSystem_RegisterClass(0, "class", (((void *)0)), 0, 0, (((void *)0)), (((void *)0)), module, 4, 1);
5271
5272 baseClass->type = 1000;
5273 baseClass->memberOffset = 0;
5274 baseClass->offset = 0;
5275 baseClass->structSize = 0;
5276 baseClass->typeSize = 0;
5277 {
5278 struct __ecereNameSpace__ecere__com__Class * instanceClass = __ecereNameSpace__ecere__com__eSystem_RegisterClass(0, "ecere::com::Instance", (((void *)0)), 0, 0, (((void *)0)), (((void *)0)), module, 4, 1);
5279
5280 instanceClass->type = 0;
5281 instanceClass->isInstanceClass = 1;
5282 instanceClass->fixed = 1;
5283 instanceClass->memberOffset = 0;
5284 instanceClass->offset = 0;
5285 instanceClass->memberID = -3;
5286 instanceClass->startMemberID = -3;
5287 __ecereNameSpace__ecere__com__eClass_AddDataMember(instanceClass, "_vTbl", "void **", pointerSize, pointerSize, 1);
5288 __ecereNameSpace__ecere__com__eClass_AddDataMember(instanceClass, "_class", "ecere::com::Class", pointerSize, pointerSize, 1);
5289 __ecereNameSpace__ecere__com__eClass_AddDataMember(instanceClass, "_refCount", "int", sizeof(int), sizeof(int), 1);
5290 }
5291 __ecereNameSpace__ecere__com__InitializeDataTypes1(module);
5292 enumClass = __ecereNameSpace__ecere__com__eSystem_RegisterClass(0, "enum", (((void *)0)), 0, force64Bits ? 40 : sizeof(struct __ecereNameSpace__ecere__com__EnumClassData), (((void *)0)), (((void *)0)), module, 4, 1);
5293 __ecereNameSpace__ecere__com__eClass_AddClassProperty(enumClass, "enumSize", "int", (((void *)0)), __ecereNameSpace__ecere__com__GetEnumSize)->constant = 1;
5294 enumClass->type = 1000;
5295 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)enumClass->dataTypeString), enumClass->dataTypeString = 0);
5296 enumClass->dataTypeString = __ecereNameSpace__ecere__sys__CopyString("int");
5297 structClass = __ecereNameSpace__ecere__com__eSystem_RegisterClass(0, "struct", (((void *)0)), 0, 0, (((void *)0)), (((void *)0)), module, 4, 1);
5298 structClass->type = 1000;
5299 structClass->memberOffset = 0;
5300 structClass->offset = 0;
5301 structClass->structSize = 0;
5302 structClass->typeSize = 0;
5303 __ecereNameSpace__ecere__com__InitializeDataTypes(module);
5304 boolClass = __ecereNameSpace__ecere__com__eSystem_RegisterClass(4, "bool", "uint", 0, 0, (((void *)0)), (((void *)0)), module, 4, 1);
5305 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(boolClass, "true", 0x1);
5306 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(boolClass, "false", 0x0);
5307 moduleClass = __ecereNameSpace__ecere__com__eSystem_RegisterClass(0, "ecere::com::Module", (((void *)0)), force64Bits ? 8 + 32 + 32 + 32 + 32 + 8 + 8 + 8 + 8 + 8 + 4 + 4 + (32 + 8 + 8 + 4 * 32) + (32 + 8 + 8 + 4 * 32) : sizeof(struct __ecereNameSpace__ecere__com__Module), 0, (void *)__ecereNameSpace__ecere__com__Module_Constructor, (void *)__ecereNameSpace__ecere__com__Module_Destructor, module, 4, 1);
5308 __ecereNameSpace__ecere__com__eClass_AddVirtualMethod(moduleClass, "OnLoad", "bool()", (((void *)0)), 1);
5309 __ecereNameSpace__ecere__com__eClass_AddVirtualMethod(moduleClass, "OnUnload", "void()", (((void *)0)), 1);
5310 __ecereNameSpace__ecere__com__eClass_AddMethod(moduleClass, "Load", "Module(const char * name, AccessMode importAccess)", __ecereNameSpace__ecere__com__eModule_Load, 1);
5311 __ecereNameSpace__ecere__com__eClass_AddMethod(moduleClass, "Unload", "void(Module module)", __ecereNameSpace__ecere__com__eModule_Unload, 1);
5312 __ecereNameSpace__ecere__com__eClass_AddDataMember(moduleClass, "application", "Application", pointerSize, pointerSize, 1);
5313 __ecereNameSpace__ecere__com__eClass_AddDataMember(moduleClass, "classes", "OldList", force64Bits ? 32 : force32Bits ? 20 : sizeof(struct __ecereNameSpace__ecere__sys__OldList), pointerSize, 1);
5314 __ecereNameSpace__ecere__com__eClass_AddDataMember(moduleClass, "defines", "OldList", force64Bits ? 32 : force32Bits ? 20 : sizeof(struct __ecereNameSpace__ecere__sys__OldList), pointerSize, 1);
5315 __ecereNameSpace__ecere__com__eClass_AddDataMember(moduleClass, "functions", "OldList", force64Bits ? 32 : force32Bits ? 20 : sizeof(struct __ecereNameSpace__ecere__sys__OldList), pointerSize, 1);
5316 __ecereNameSpace__ecere__com__eClass_AddDataMember(moduleClass, "modules", "OldList", force64Bits ? 32 : force32Bits ? 20 : sizeof(struct __ecereNameSpace__ecere__sys__OldList), pointerSize, 1);
5317 __ecereNameSpace__ecere__com__eClass_AddDataMember(moduleClass, "prev", "Module", pointerSize, pointerSize, 1);
5318 __ecereNameSpace__ecere__com__eClass_AddDataMember(moduleClass, "next", "Module", pointerSize, pointerSize, 1);
5319 __ecereNameSpace__ecere__com__eClass_AddDataMember(moduleClass, "name", "const char *", pointerSize, pointerSize, 1);
5320 __ecereNameSpace__ecere__com__eClass_AddDataMember(moduleClass, "library", "void *", pointerSize, pointerSize, 1);
5321 __ecereNameSpace__ecere__com__eClass_AddDataMember(moduleClass, "Unload", "void *", pointerSize, pointerSize, 1);
5322 __ecereNameSpace__ecere__com__eClass_AddDataMember(moduleClass, "importType", "ImportType", sizeof(int), 4, 1);
5323 __ecereNameSpace__ecere__com__eClass_AddDataMember(moduleClass, "origImportType", "ImportType", sizeof(int), 4, 1);
5324 __ecereNameSpace__ecere__com__eClass_AddDataMember(moduleClass, "privateNameSpace", "NameSpace", force64Bits ? (32 + 8 + 8 + 4 * 32) : force32Bits ? (16 + 4 + 4 + 4 * 16) : sizeof(struct __ecereNameSpace__ecere__com__NameSpace), pointerSize, 1);
5325 __ecereNameSpace__ecere__com__eClass_AddDataMember(moduleClass, "publicNameSpace", "NameSpace", force64Bits ? (32 + 8 + 8 + 4 * 32) : force32Bits ? (16 + 4 + 4 + 4 * 16) : sizeof(struct __ecereNameSpace__ecere__com__NameSpace), pointerSize, 1);
5326 moduleClass->fixed = 1;
5327 moduleClass->count++;
5328 if(inCompiler && force32Bits)
5329 moduleClass->structSize = 12 + 4 + 20 + 20 + 20 + 20 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + (16 + 4 + 4 + 4 * 16) + (16 + 4 + 4 + 4 * 16);
5330 applicationClass = __ecereNameSpace__ecere__com__eSystem_RegisterClass(0, "ecere::com::Application", "Module", force64Bits ? (8 + 8 + 4 + 4 + 32 + 8 + 176) : sizeof(struct __ecereNameSpace__ecere__com__Application), 0, (((void *)0)), (void *)__ecereNameSpace__ecere__com__Application_Destructor, module, 4, 1);
5331 if(inCompiler && force32Bits)
5332 {
5333 applicationClass->offset = 12 + 4 + 20 + 20 + 20 + 20 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + (16 + 4 + 4 + 4 * 16) + (16 + 4 + 4 + 4 * 16);
5334 applicationClass->structSize = applicationClass->offset + (4 + 4 + 4 + 4 + 20 + 4 + 88);
5335 }
5336 __ecereNameSpace__ecere__com__eClass_AddVirtualMethod(applicationClass, "Main", "void()", (((void *)0)), 1);
5337 __ecereNameSpace__ecere__com__eClass_AddDataMember(applicationClass, "argc", "int", sizeof(int), 4, 1);
5338 __ecereNameSpace__ecere__com__eClass_AddDataMember(applicationClass, "argv", "const char **", pointerSize, pointerSize, 1);
5339 __ecereNameSpace__ecere__com__eClass_AddDataMember(applicationClass, "exitCode", "int", sizeof(int), 4, 1);
5340 __ecereNameSpace__ecere__com__eClass_AddDataMember(applicationClass, "isGUIApp", "bool", sizeof(unsigned int), 4, 1);
5341 __ecereNameSpace__ecere__com__eClass_AddDataMember(applicationClass, "allModules", "OldList", force64Bits ? 32 : force32Bits ? 20 : sizeof(struct __ecereNameSpace__ecere__sys__OldList), pointerSize, 1);
5342 __ecereNameSpace__ecere__com__eClass_AddDataMember(applicationClass, "parsedCommand", "char *", pointerSize, pointerSize, 1);
5343 __ecereNameSpace__ecere__com__eClass_AddDataMember(applicationClass, "systemNameSpace", "NameSpace", force64Bits ? (32 + 8 + 8 + 4 * 32) : force32Bits ? (16 + 4 + 4 + 4 * 16) : sizeof(struct __ecereNameSpace__ecere__com__NameSpace), pointerSize, 1);
5344 applicationClass->fixed = 1;
5345 applicationClass->count++;
5346 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("sin", "double sin(Angle number)", sin, module, 4);
5347 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("sinh", "double sinh(Angle number)", sinh, module, 4);
5348 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("cosh", "double cosh(Angle number)", cosh, module, 4);
5349 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("tanh", "double tanh(Angle number)", tanh, module, 4);
5350 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("sqrt", "double sqrt(double number)", sqrt, module, 4);
5351 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("cos", "double cos(Angle number)", cos, module, 4);
5352 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("tan", "double tan(Angle number)", tan, module, 4);
5353 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("atan2", "Angle atan2(double y, double x)", atan2, module, 4);
5354 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("asin", "Angle asin(double number)", asin, module, 4);
5355 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("acos", "Angle acos(double number)", acos, module, 4);
5356 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("atan", "Angle atan(double number)", atan, module, 4);
5357 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("asinh", "Angle asinh(double number)", asinh, module, 4);
5358 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("acosh", "Angle acosh(double number)", acosh, module, 4);
5359 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("atanh", "Angle atanh(double number)", atanh, module, 4);
5360 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("pow", "double pow(double number, double number2)", pow, module, 4);
5361 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("fmod", "double fmod(double x, double y)", fmod, module, 4);
5362 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("fabs", "double fabs(double number)", fabs, module, 4);
5363 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("log", "double log(double number)", log, module, 4);
5364 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("log10", "double log10(double number)", log10, module, 4);
5365 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ceil", "double ceil(double number)", ceil, module, 4);
5366 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("floor", "double floor(double number)", floor, module, 4);
5367 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("exp", "double exp(double number)", exp, module, 4);
5368 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("qsort", "void qsort(void *, uintsize, uintsize, int (*)(void *, void *))", qsort, module, 4);
5369 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("strtod", "double strtod(const char*, char**)", strtod, module, 4);
5370 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("strtol", "int strtol(const char*, char**, int base)", strtol, module, 4);
5371 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("strtoul", "unsigned long strtoul(const char * nptr, char ** endptr, int base)", strtoul, module, 4);
5372 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("strtoll", "int64 strtoll(const char * nptr, char ** endptr, int base)", strtoll, module, 4);
5373 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("strtoull", "uint64 strtoull(const char * nptr, char ** endptr, int base)", strtoull, module, 4);
5374 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("system", "int system(const char*)", system, module, 4);
5375 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("atoi", "int atoi(const char*)", atoi, module, 4);
5376 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("atof", "double atof(const char*)", atof, module, 4);
5377 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("tolower", "int tolower(int)", tolower, module, 4);
5378 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("toupper", "int toupper(int)", toupper, module, 4);
5379 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("isdigit", "bool isdigit(int)", isdigit, module, 4);
5380 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("memset", "void * memset(void * area, int value, uintsize count)", memset, module, 4);
5381 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("getenv", "char * getenv(const char * name)", getenv, module, 4);
5382 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("rename", "int rename(const char *oldpath, const char *newpath)", rename, module, 4);
5383 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("strlen", "uintsize strlen(const char *)", strlen, module, 4);
5384 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("strcat", "char * strcat(char *, const char *)", strcat, module, 4);
5385 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("strncat", "char * strncat(char *, const char *, uintsize n)", strncat, module, 4);
5386 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("strchr", "char * strchr(const char *, int)", strchr, module, 4);
5387 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("strstr", "char * strstr(const char *, const char *)", strstr, module, 4);
5388 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("strspn", "uintsize strspn(const char *, const char *)", strspn, module, 4);
5389 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("strcspn", "uintsize strcspn(const char *, const char *)", strcspn, module, 4);
5390 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("strpbrk", "char * strpbrk(const char *, const char *)", strpbrk, module, 4);
5391 __ecereNameSpace__ecere__com__eSystem_RegisterDefine("fstrcmp", "(__runtimePlatform == win32) ? strcmpi : strcmp", module, 4);
5392 __ecereNameSpace__ecere__com__eSystem_RegisterDefine("strcmpi", "strcasecmp", module, 4);
5393 __ecereNameSpace__ecere__com__eSystem_RegisterDefine("strnicmp", "strncasecmp", module, 4);
5394 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("strcasecmp", "int strcasecmp(const char *, const char *)", strcasecmp, module, 4);
5395 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("strncasecmp", "int strncasecmp(const char *, const char *, uintsize n)", strncasecmp, module, 4);
5396 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("strcmp", "int strcmp(const char *, const char *)", strcmp, module, 4);
5397 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("strncmp", "int strncmp(const char *, const char *, uintsize n)", strncmp, module, 4);
5398 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("strlwr", "char * strlwr(char *)", strlwr, module, 4);
5399 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("strupr", "char * strupr(char *)", strupr, module, 4);
5400 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("strcpy", "char * strcpy(char *, const char *)", strcpy, module, 4);
5401 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("strncpy", "char * strncpy(char *, const char *, uintsize n)", strncpy, module, 4);
5402 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("memcpy", "void * memcpy(void *, const void *, uintsize size)", memcpy, module, 4);
5403 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("memmove", "void * memmove(void *, const void *, uintsize size)", memmove, module, 4);
5404 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("memcmp", "int memcmp(const void *, const void *, uintsize size)", memcmp, module, 4);
5405 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("sprintf", "int sprintf(char *, const char *, ...)", sprintf, module, 4);
5406 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("snprintf", "int sprintf(char *, uintsize, const char *, ...)", snprintf, module, 4);
5407 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("printf", "int printf(const char *, ...)", printf, module, 4);
5408 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("vsprintf", "int vsprintf(char*, const char*, __builtin_va_list)", vsprintf, module, 4);
5409 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("vsnprintf", "int vsnprintf(char*, uintsize, const char*, __builtin_va_list)", vsnprintf, module, 4);
5410 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("puts", "int puts(const char *)", puts, module, 4);
5411 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("fputs", "int fputs(const char *, void * stream)", fputs, module, 4);
5412 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("isalnum", "int isalnum(int c)", isalnum, module, 4);
5413 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("isspace", "int isspace(int c)", isspace, module, 4);
5414 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("isalpha", "int isalpha(int c)", isalpha, module, 4);
5415 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("islower", "int islower(int c)", islower, module, 4);
5416 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("isupper", "int isupper(int c)", isupper, module, 4);
5417 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("isprint", "int isprint(int c)", isprint, module, 4);
5418 }
5419
5420 struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__com____ecere_COM_Initialize(unsigned int guiApp, int argc, char * argv[])
5421 {
5422 struct __ecereNameSpace__ecere__com__Instance * app;
5423
5424 app = __ecereNameSpace__ecere__com___calloc(1, structSize_Application);
5425 __ecereNameSpace__ecere__com__Module_Constructor(app);
5426 ((struct __ecereNameSpace__ecere__com__Application *)(((char *)app + structSize_Module)))->systemNameSpace.classes.CompareKey = (void *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString;
5427 ((struct __ecereNameSpace__ecere__com__Application *)(((char *)app + structSize_Module)))->systemNameSpace.defines.CompareKey = (void *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString;
5428 ((struct __ecereNameSpace__ecere__com__Application *)(((char *)app + structSize_Module)))->systemNameSpace.functions.CompareKey = (void *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString;
5429 ((struct __ecereNameSpace__ecere__com__Application *)(((char *)app + structSize_Module)))->systemNameSpace.nameSpaces.CompareKey = (void *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString;
5430 Instance_COM_Initialize(argc, argv, &((struct __ecereNameSpace__ecere__com__Application *)(((char *)app + structSize_Module)))->parsedCommand, &((struct __ecereNameSpace__ecere__com__Application *)(((char *)app + structSize_Module)))->argc, &((struct __ecereNameSpace__ecere__com__Application *)(((char *)app + structSize_Module)))->argv);
5431 ((struct __ecereNameSpace__ecere__com__Module *)(((char *)app + structSize_Instance)))->application = app;
5432 ((struct __ecereNameSpace__ecere__com__Application *)(((char *)app + structSize_Module)))->allModules.offset = structSize_Instance + (unsigned int)(uintptr_t)&(*((struct __ecereNameSpace__ecere__com__Module *)0)).prev;
5433 ((struct __ecereNameSpace__ecere__com__Application *)(((char *)app + structSize_Module)))->isGUIApp = guiApp;
5434 __ecereNameSpace__ecere__com__LoadCOM(app);
5435 ((struct __ecereNameSpace__ecere__com__Instance *)(char *)app)->_class = __ecereNameSpace__ecere__com__eSystem_FindClass(app, "Application");
5436 return app;
5437 }
5438
5439 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * __ecereNameSpace__ecere__com__eClass_AddTemplateParameter(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, int type, const void * info, struct __ecereNameSpace__ecere__com__ClassTemplateArgument * defaultArg)
5440 {
5441 if(_class && name)
5442 {
5443 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
5444
5445 for(param = _class->templateParams.first; param; param = param->next)
5446 {
5447 if(!strcmp(param->name, name))
5448 return param;
5449 }
5450 param = __extension__ ({
5451 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * __ecereInstance1 = __ecereNameSpace__ecere__com__eSystem_New0(structSize_ClassTemplateParameter);
5452
5453 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(name), __ecereInstance1->type = type, __ecereInstance1->__anon1.dataTypeString = (type == 1) ? info : __ecereNameSpace__ecere__sys__CopyString(info), __ecereInstance1;
5454 });
5455 if(defaultArg != (((void *)0)))
5456 {
5457 param->defaultArg = *defaultArg;
5458 __ecereNameSpace__ecere__com__CopyTemplateArg(param, &param->defaultArg);
5459 }
5460 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&_class->templateParams, param);
5461 return param;
5462 }
5463 return (((void *)0));
5464 }
5465
5466 void __ecereNameSpace__ecere__com__eClass_DoneAddingTemplateParameters(struct __ecereNameSpace__ecere__com__Class * base)
5467 {
5468 if(base)
5469 {
5470 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
5471
5472 {
5473 void * first = base->templateParams.first;
5474 int count = base->templateParams.count;
5475
5476 __ecereNameSpace__ecere__com__FreeTemplateArgs(base);
5477 (__ecereNameSpace__ecere__com__eSystem_Delete(base->templateArgs), base->templateArgs = 0);
5478 base->templateParams.first = (((void *)0));
5479 base->templateParams.count = 0;
5480 __ecereNameSpace__ecere__com__FreeTemplatesDerivatives(base);
5481 base->templateParams.first = first;
5482 base->templateParams.count = count;
5483 }
5484 for(param = base->templateParams.first; param; param = param->next)
5485 {
5486 if(param->type == 1 && param->defaultArg.__anon1.__anon2.memberString)
5487 {
5488 struct __ecereNameSpace__ecere__com__Class * memberClass = base;
5489 const char * colon = strstr(param->defaultArg.__anon1.__anon2.memberString, "::");
5490 const char * memberName;
5491
5492 if(colon)
5493 {
5494 char className[1024];
5495 struct __ecereNameSpace__ecere__com__Class * sClass;
5496
5497 memcpy(className, param->defaultArg.__anon1.__anon2.memberString, colon - param->defaultArg.__anon1.__anon2.memberString);
5498 className[colon - param->defaultArg.__anon1.__anon2.memberString] = '\0';
5499 memberName = colon + 2;
5500 for(sClass = base; sClass; sClass = sClass->base)
5501 {
5502 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * cParam;
5503 struct __ecereNameSpace__ecere__com__Class * nextClass;
5504 int id = 0;
5505
5506 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
5507 id += nextClass->templateParams.count;
5508 if(sClass == base || base->templateArgs)
5509 {
5510 for(cParam = sClass->templateParams.first; cParam; cParam = cParam->next)
5511 {
5512 if(cParam->type == 0 && !strcmp(cParam->name, className))
5513 strcpy(className, (sClass == base) ? cParam->defaultArg.__anon1.__anon1.dataTypeString : base->templateArgs[id].__anon1.__anon1.dataTypeString);
5514 id++;
5515 }
5516 }
5517 }
5518 memberClass = __ecereNameSpace__ecere__com__eSystem_FindClass(base->module, className);
5519 if(!memberClass)
5520 memberClass = __ecereNameSpace__ecere__com__eSystem_FindClass(((struct __ecereNameSpace__ecere__com__Module *)(((char *)base->module + structSize_Instance)))->application, className);
5521 }
5522 else
5523 memberName = param->defaultArg.__anon1.__anon2.memberString;
5524 if(memberClass)
5525 {
5526 switch(param->__anon1.memberType)
5527 {
5528 case 0:
5529 param->defaultArg.__anon1.__anon2.__anon1.member = __ecereNameSpace__ecere__com__eClass_FindDataMember(memberClass, memberName, memberClass->module, (((void *)0)), (((void *)0)));
5530 break;
5531 case 1:
5532 param->defaultArg.__anon1.__anon2.__anon1.method = __ecereNameSpace__ecere__com__eClass_FindMethod(memberClass, memberName, memberClass->module);
5533 break;
5534 case 2:
5535 param->defaultArg.__anon1.__anon2.__anon1.prop = __ecereNameSpace__ecere__com__eClass_FindProperty(memberClass, memberName, memberClass->module);
5536 break;
5537 }
5538 }
5539 }
5540 }
5541 __ecereNameSpace__ecere__com__FixDerivativesBase(base, base);
5542 }
5543 }
5544
5545 static void __ecereNameSpace__ecere__com__FreeTemplatesDerivatives(struct __ecereNameSpace__ecere__com__Class * base)
5546 {
5547 struct __ecereNameSpace__ecere__sys__OldLink * derivative, * templateLink;
5548
5549 for(derivative = base->derivatives.first; derivative; derivative = derivative->next)
5550 {
5551 struct __ecereNameSpace__ecere__com__Class * _class = derivative->data;
5552
5553 if(_class->templateArgs)
5554 {
5555 __ecereNameSpace__ecere__com__FreeTemplateArgs(_class);
5556 (__ecereNameSpace__ecere__com__eSystem_Delete(_class->templateArgs), _class->templateArgs = 0);
5557 }
5558 __ecereNameSpace__ecere__com__FreeTemplatesDerivatives(_class);
5559 }
5560 for(templateLink = base->templatized.first; templateLink; templateLink = templateLink->next)
5561 {
5562 struct __ecereNameSpace__ecere__com__Class * _class = templateLink->data;
5563
5564 if(_class->templateArgs)
5565 {
5566 __ecereNameSpace__ecere__com__FreeTemplateArgs(_class);
5567 (__ecereNameSpace__ecere__com__eSystem_Delete(_class->templateArgs), _class->templateArgs = 0);
5568 }
5569 __ecereNameSpace__ecere__com__FreeTemplatesDerivatives(_class);
5570 }
5571 }
5572
5573 static const char * __ecereNameSpace__ecere__com__platformNames[4] =
5574 {
5575 "", "win32", "linux", "apple"
5576 };
5577
5578 static const int __ecereNameSpace__ecere__com__firstPlatform = 1;
5579
5580 static __attribute__((unused)) struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__com__Platform_char__PTR_, * __ecerePropM___ecereNameSpace__ecere__com__Platform_char__PTR_;
5581
5582 static const int __ecereNameSpace__ecere__com__lastPlatform = 3;
5583
5584 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Platform;
5585
5586 int __ecereVMethodID_class_OnGetString;
5587
5588 const char *  __ecereProp___ecereNameSpace__ecere__com__Platform_Get_char__PTR_(int this)
5589 {
5590 return ((const char *  (*)(struct __ecereNameSpace__ecere__com__Class *, const void *, char *  tempString, void *  fieldData, unsigned int *  needClass))__ecereClass___ecereNameSpace__ecere__com__Platform->_vTbl[__ecereVMethodID_class_OnGetString])(__ecereClass___ecereNameSpace__ecere__com__Platform, (void *)&this, (((void *)0)), (((void *)0)), (((void *)0)));
5591 }
5592
5593 int __ecereProp___ecereNameSpace__ecere__com__Platform_Set_char__PTR_(const char *  value)
5594 {
5595 if(value)
5596 {
5597 int c;
5598
5599 for(c = __ecereNameSpace__ecere__com__firstPlatform; c <= __ecereNameSpace__ecere__com__lastPlatform; c++)
5600 if(!strcasecmp(value, __ecereNameSpace__ecere__com__platformNames[c]))
5601 return c;
5602 }
5603 return 0;
5604 }
5605
5606 const char * __ecereMethod___ecereNameSpace__ecere__com__Platform_OnGetString(struct __ecereNameSpace__ecere__com__Class * class, int * this, char * tempString, void * fieldData, unsigned int * needClass)
5607 {
5608 if((*this) >= __ecereNameSpace__ecere__com__firstPlatform && (*this) <= __ecereNameSpace__ecere__com__lastPlatform)
5609 {
5610 if(tempString)
5611 strcpy(tempString, __ecereNameSpace__ecere__com__platformNames[*(int *)this]);
5612 return __ecereNameSpace__ecere__com__platformNames[*(int *)this];
5613 }
5614 if(tempString && tempString[0])
5615 tempString[0] = '\0';
5616 return (((void *)0));
5617 }
5618
5619 unsigned int __ecereMethod___ecereNameSpace__ecere__com__Platform_OnGetDataFromString(struct __ecereNameSpace__ecere__com__Class * class, int * this, const char * string)
5620 {
5621 (*this) = __ecereProp___ecereNameSpace__ecere__com__Platform_Set_char__PTR_(string);
5622 return (*this) != 0;
5623 }
5624
5625 extern int runtimePlatform;
5626
5627 int __ecereNameSpace__ecere__com__GetRuntimePlatform()
5628 {
5629 return runtimePlatform;
5630 }
5631
5632 struct __ecereNameSpace__ecere__com__ObjectInfo
5633 {
5634 struct __ecereNameSpace__ecere__com__ObjectInfo * prev, * next;
5635 struct __ecereNameSpace__ecere__com__Instance * instance;
5636 char * name;
5637 struct __ecereNameSpace__ecere__com__Instance * instCode;
5638 unsigned int deleted;
5639 struct __ecereNameSpace__ecere__com__ObjectInfo * oClass;
5640 struct __ecereNameSpace__ecere__sys__OldList instances;
5641 struct __ecereNameSpace__ecere__com__Instance * classDefinition;
5642 unsigned int modified;
5643 void * i18nStrings;
5644 } __attribute__ ((gcc_struct));
5645
5646 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ObjectInfo;
5647
5648 static __attribute__((unused)) struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__com__DesignerBase_classDesigner, * __ecerePropM___ecereNameSpace__ecere__com__DesignerBase_classDesigner;
5649
5650 static __attribute__((unused)) struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__com__DesignerBase_objectClass, * __ecerePropM___ecereNameSpace__ecere__com__DesignerBase_objectClass;
5651
5652 static __attribute__((unused)) struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__com__DesignerBase_isDragging, * __ecerePropM___ecereNameSpace__ecere__com__DesignerBase_isDragging;
5653
5654 struct __ecereNameSpace__ecere__com__DesignerBase
5655 {
5656 struct __ecereNameSpace__ecere__com__Instance * classDesigner;
5657 const char * objectClass;
5658 unsigned int isDragging;
5659 } __attribute__ ((gcc_struct));
5660
5661 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DesignerBase;
5662
5663 struct __ecereNameSpace__ecere__com__Instance * __ecereProp___ecereNameSpace__ecere__com__DesignerBase_Get_classDesigner(struct __ecereNameSpace__ecere__com__Instance * this)
5664 {
5665 __attribute__((unused)) struct __ecereNameSpace__ecere__com__DesignerBase * __ecerePointer___ecereNameSpace__ecere__com__DesignerBase = (struct __ecereNameSpace__ecere__com__DesignerBase *)(this ? (((char *)this) + __ecereClass___ecereNameSpace__ecere__com__DesignerBase->offset) : 0);
5666
5667 return __ecerePointer___ecereNameSpace__ecere__com__DesignerBase->classDesigner;
5668 }
5669
5670 void __ecereProp___ecereNameSpace__ecere__com__DesignerBase_Set_classDesigner(struct __ecereNameSpace__ecere__com__Instance * this, struct __ecereNameSpace__ecere__com__Instance * value)
5671 {
5672 __attribute__((unused)) struct __ecereNameSpace__ecere__com__DesignerBase * __ecerePointer___ecereNameSpace__ecere__com__DesignerBase = (struct __ecereNameSpace__ecere__com__DesignerBase *)(this ? (((char *)this) + __ecereClass___ecereNameSpace__ecere__com__DesignerBase->offset) : 0);
5673
5674 __ecerePointer___ecereNameSpace__ecere__com__DesignerBase->classDesigner = value;
5675 __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(this, __ecereProp___ecereNameSpace__ecere__com__DesignerBase_classDesigner), __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(this, __ecerePropM___ecereNameSpace__ecere__com__DesignerBase_classDesigner);
5676 }
5677
5678 const char *  __ecereProp___ecereNameSpace__ecere__com__DesignerBase_Get_objectClass(struct __ecereNameSpace__ecere__com__Instance * this)
5679 {
5680 __attribute__((unused)) struct __ecereNameSpace__ecere__com__DesignerBase * __ecerePointer___ecereNameSpace__ecere__com__DesignerBase = (struct __ecereNameSpace__ecere__com__DesignerBase *)(this ? (((char *)this) + __ecereClass___ecereNameSpace__ecere__com__DesignerBase->offset) : 0);
5681
5682 return __ecerePointer___ecereNameSpace__ecere__com__DesignerBase->objectClass;
5683 }
5684
5685 void __ecereProp___ecereNameSpace__ecere__com__DesignerBase_Set_objectClass(struct __ecereNameSpace__ecere__com__Instance * this, const char *  value)
5686 {
5687 __attribute__((unused)) struct __ecereNameSpace__ecere__com__DesignerBase * __ecerePointer___ecereNameSpace__ecere__com__DesignerBase = (struct __ecereNameSpace__ecere__com__DesignerBase *)(this ? (((char *)this) + __ecereClass___ecereNameSpace__ecere__com__DesignerBase->offset) : 0);
5688
5689 __ecerePointer___ecereNameSpace__ecere__com__DesignerBase->objectClass = value;
5690 __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(this, __ecereProp___ecereNameSpace__ecere__com__DesignerBase_objectClass), __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(this, __ecerePropM___ecereNameSpace__ecere__com__DesignerBase_objectClass);
5691 }
5692
5693 unsigned int __ecereProp___ecereNameSpace__ecere__com__DesignerBase_Get_isDragging(struct __ecereNameSpace__ecere__com__Instance * this)
5694 {
5695 __attribute__((unused)) struct __ecereNameSpace__ecere__com__DesignerBase * __ecerePointer___ecereNameSpace__ecere__com__DesignerBase = (struct __ecereNameSpace__ecere__com__DesignerBase *)(this ? (((char *)this) + __ecereClass___ecereNameSpace__ecere__com__DesignerBase->offset) : 0);
5696
5697 return __ecerePointer___ecereNameSpace__ecere__com__DesignerBase->isDragging;
5698 }
5699
5700 void __ecereProp___ecereNameSpace__ecere__com__DesignerBase_Set_isDragging(struct __ecereNameSpace__ecere__com__Instance * this, unsigned int value)
5701 {
5702 __attribute__((unused)) struct __ecereNameSpace__ecere__com__DesignerBase * __ecerePointer___ecereNameSpace__ecere__com__DesignerBase = (struct __ecereNameSpace__ecere__com__DesignerBase *)(this ? (((char *)this) + __ecereClass___ecereNameSpace__ecere__com__DesignerBase->offset) : 0);
5703
5704 __ecerePointer___ecereNameSpace__ecere__com__DesignerBase->isDragging = value;
5705 __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(this, __ecereProp___ecereNameSpace__ecere__com__DesignerBase_isDragging), __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(this, __ecerePropM___ecereNameSpace__ecere__com__DesignerBase_isDragging);
5706 }
5707
5708 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassDesignerBase;
5709
5710 struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__com__activeDesigner;
5711
5712 void __ecereNameSpace__ecere__com__SetActiveDesigner(struct __ecereNameSpace__ecere__com__Instance * designer)
5713 {
5714 __ecereNameSpace__ecere__com__activeDesigner = designer;
5715 }
5716
5717 struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__com__GetActiveDesigner()
5718 {
5719 return __ecereNameSpace__ecere__com__activeDesigner;
5720 }
5721
5722 void __ecereNameSpace__ecere__com__eSystem_SetPoolingDisabled(unsigned int disabled)
5723 {
5724 __ecereNameSpace__ecere__com__poolingDisabled = disabled;
5725 }
5726
5727
5728
5729 unsigned int __ecereNameSpace__ecere__sys__UTF8Validate(const char * source)
5730 {
5731 if(source)
5732 {
5733 int c;
5734
5735 for(c = 0; source[c]; )
5736 {
5737 unsigned char ch = source[c];
5738 unsigned int codePoint = 0;
5739 int numBytes = 1;
5740 int i;
5741 unsigned char mask = (unsigned char)0x7F;
5742
5743 if(ch & (unsigned char)0x80)
5744 {
5745 if(ch & (unsigned char)0x40)
5746 {
5747 mask >>= 2;
5748 numBytes++;
5749 if(ch & (unsigned char)0x20)
5750 {
5751 numBytes++;
5752 mask >>= 1;
5753 if(ch & (unsigned char)0x10)
5754 {
5755 if(ch & (unsigned char)0x08)
5756 return 0;
5757 numBytes++;
5758 mask >>= 1;
5759 }
5760 }
5761 }
5762 else
5763 return 0;
5764 }
5765 for(i = 0; i < numBytes && (ch = source[c]); i++, c++)
5766 {
5767 codePoint <<= 6;
5768 codePoint |= ch & mask;
5769 mask = (unsigned char)0x3F;
5770 if(i > 1)
5771 {
5772 if(!(ch & (unsigned char)0x80) || (ch & (unsigned char)0x40))
5773 return 0;
5774 }
5775 }
5776 if(i < numBytes)
5777 return 0;
5778 if(codePoint > 0x10FFFF || (codePoint >= 0xD800 && codePoint <= 0xDFFF) || (codePoint < 0x80 && numBytes > 1) || (codePoint < 0x800 && numBytes > 2) || (codePoint < 0x10000 && numBytes > 3))
5779 return 0;
5780 }
5781 }
5782 return 1;
5783 }
5784
5785 int __ecereNameSpace__ecere__sys__ISO8859_1toUTF8(const char * source, char * dest, int max)
5786 {
5787 int c;
5788 int d = 0;
5789
5790 for(c = 0; source[c]; c++)
5791 {
5792 unsigned int ch = ((unsigned char *)source)[c];
5793
5794 switch(ch)
5795 {
5796 case 150:
5797 ch = 0x2012;
5798 break;
5799 }
5800 if(ch < 0x80)
5801 {
5802 if(d + 1 >= max)
5803 break;
5804 dest[d++] = (char)ch;
5805 }
5806 else if(ch < 0x800)
5807 {
5808 if(d + 2 >= max)
5809 break;
5810 dest[d++] = (unsigned char)0xC0 | (unsigned char)((ch & 0x7C0) >> 6);
5811 dest[d++] = (unsigned char)0x80 | (unsigned char)(ch & 0x03F);
5812 }
5813 else if(ch < 0x10000)
5814 {
5815 if(d + 3 >= max)
5816 break;
5817 dest[d++] = (unsigned char)0xE0 | (unsigned char)((ch & 0xF000) >> 12);
5818 dest[d++] = (unsigned char)0x80 | (unsigned char)((ch & 0xFC0) >> 6);
5819 dest[d++] = (unsigned char)0x80 | (unsigned char)(ch & 0x03F);
5820 }
5821 else
5822 {
5823 if(d + 4 >= max)
5824 break;
5825 dest[d++] = (unsigned char)0xF0 | (unsigned char)((ch & 0x1C0000) >> 18);
5826 dest[d++] = (unsigned char)0x80 | (unsigned char)((ch & 0x3F000) >> 12);
5827 dest[d++] = (unsigned char)0x80 | (unsigned char)((ch & 0xFC0) >> 6);
5828 dest[d++] = (unsigned char)0x80 | (unsigned char)(ch & 0x03F);
5829 }
5830 }
5831 dest[d] = (char)0;
5832 return d;
5833 }
5834
5835 char * __ecereNameSpace__ecere__sys__UTF16toUTF8(const unsigned short * source)
5836 {
5837 int c;
5838 int d = 0;
5839 int len;
5840 char * dest;
5841 unsigned short u16;
5842 unsigned int invert = 0;
5843
5844 for(len = 0; source[len]; len++)
5845 ;
5846 dest = __ecereNameSpace__ecere__com__eSystem_New(sizeof(char) * (len * 3 + 1));
5847 for(c = 0; (u16 = source[c]); c++)
5848 {
5849 unsigned int ch;
5850
5851 if(!c && (u16 == (unsigned short)0xFFFE || u16 == (unsigned short)0xFEFF))
5852 {
5853 if(u16 == (unsigned short)0xFFFE)
5854 invert = 1;
5855 continue;
5856 }
5857 if(invert)
5858 {
5859 u16 = ((u16 & (unsigned short)0xFF00) >> (unsigned short)8) | ((u16 & (unsigned short)0x00FF) << (unsigned short)8);
5860 }
5861 if(u16 < (unsigned short)0xD800 || u16 > (unsigned short)0xDBFF)
5862 ch = u16;
5863 else
5864 ch = (u16 << 10) + source[c++] + (0x10000 - (0xD800 << 10) - 0xDC00);
5865 if(ch < 0x80)
5866 {
5867 dest[d++] = (char)ch;
5868 }
5869 else if(ch < 0x800)
5870 {
5871 dest[d++] = (unsigned char)0xC0 | (unsigned char)((ch & 0x7C0) >> 6);
5872 dest[d++] = (unsigned char)0x80 | (unsigned char)(ch & 0x03F);
5873 }
5874 else if(ch < 0x10000)
5875 {
5876 dest[d++] = (unsigned char)0xE0 | (unsigned char)((ch & 0xF000) >> 12);
5877 dest[d++] = (unsigned char)0x80 | (unsigned char)((ch & 0xFC0) >> 6);
5878 dest[d++] = (unsigned char)0x80 | (unsigned char)(ch & 0x03F);
5879 }
5880 else
5881 {
5882 dest[d++] = (unsigned char)0xF0 | (unsigned char)((ch & 0x1C0000) >> 18);
5883 dest[d++] = (unsigned char)0x80 | (unsigned char)((ch & 0x3F000) >> 12);
5884 dest[d++] = (unsigned char)0x80 | (unsigned char)((ch & 0xFC0) >> 6);
5885 dest[d++] = (unsigned char)0x80 | (unsigned char)(ch & 0x03F);
5886 }
5887 }
5888 dest[d] = (char)0;
5889 dest = __ecereNameSpace__ecere__com__eSystem_Renew(dest, sizeof(char) * (d + 1));
5890 return dest;
5891 }
5892
5893 int __ecereNameSpace__ecere__sys__UTF16toUTF8Buffer(const unsigned short * source, char * dest, int max)
5894 {
5895 int c;
5896 int d = 0;
5897 unsigned short u16;
5898
5899 for(c = 0; (u16 = source[c]); c++)
5900 {
5901 unsigned int ch;
5902
5903 if(u16 < (unsigned short)0xD800 || u16 > (unsigned short)0xDBFF)
5904 ch = u16;
5905 else
5906 ch = (u16 << 10) + source[c++] + (0x10000 - (0xD800 << 10) - 0xDC00);
5907 if(ch < 0x80)
5908 {
5909 if(d + 1 >= max)
5910 break;
5911 dest[d++] = (char)ch;
5912 }
5913 else if(ch < 0x800)
5914 {
5915 if(d + 2 >= max)
5916 break;
5917 dest[d++] = (unsigned char)0xC0 | (unsigned char)((ch & 0x7C0) >> 6);
5918 dest[d++] = (unsigned char)0x80 | (unsigned char)(ch & 0x03F);
5919 }
5920 else if(ch < 0x10000)
5921 {
5922 if(d + 3 >= max)
5923 break;
5924 dest[d++] = (unsigned char)0xE0 | (unsigned char)((ch & 0xF000) >> 12);
5925 dest[d++] = (unsigned char)0x80 | (unsigned char)((ch & 0xFC0) >> 6);
5926 dest[d++] = (unsigned char)0x80 | (unsigned char)(ch & 0x03F);
5927 }
5928 else
5929 {
5930 if(d + 4 >= max)
5931 break;
5932 dest[d++] = (unsigned char)0xF0 | (unsigned char)((ch & 0x1C0000) >> 18);
5933 dest[d++] = (unsigned char)0x80 | (unsigned char)((ch & 0x3F000) >> 12);
5934 dest[d++] = (unsigned char)0x80 | (unsigned char)((ch & 0xFC0) >> 6);
5935 dest[d++] = (unsigned char)0x80 | (unsigned char)(ch & 0x03F);
5936 }
5937 }
5938 dest[d] = (char)0;
5939 return d;
5940 }
5941
5942 unsigned int __ecereNameSpace__ecere__sys__UTF8GetChar(const char * string, int * numBytes)
5943 {
5944 unsigned int ch;
5945 unsigned char b = ((unsigned char *)string)[0];
5946 int i;
5947 unsigned char mask = (unsigned char)0x7F;
5948 int nb = b ? 1 : 0;
5949
5950 ch = 0;
5951 if(b & (unsigned char)0x80)
5952 {
5953 if(b & (unsigned char)0x40)
5954 {
5955 mask >>= 2;
5956 nb++;
5957 if(b & (unsigned char)0x20)
5958 {
5959 nb++;
5960 mask >>= 1;
5961 if(b & (unsigned char)0x10)
5962 {
5963 if(b & (unsigned char)0x08)
5964 {
5965 nb = 0;
5966 }
5967 nb++;
5968 mask >>= 1;
5969 }
5970 }
5971 }
5972 else
5973 nb = 0;
5974 }
5975 for(i = 0; i < nb; i++)
5976 {
5977 ch <<= 6;
5978 ch |= (b = ((unsigned char *)string)[i]) & mask;
5979 mask = (unsigned char)0x3F;
5980 if(i > 1 && (!(b & (unsigned char)0x80) || (b & (unsigned char)0x40)))
5981 {
5982 nb = 0;
5983 ch = 0;
5984 }
5985 }
5986 if(i < nb || ch > 0x10FFFF || (ch >= 0xD800 && ch <= 0xDFFF) || (ch < 0x80 && nb > 1) || (ch < 0x800 && nb > 2) || (ch < 0x10000 && nb > 3))
5987 {
5988 ch = 0;
5989 nb = 0;
5990 }
5991 if(numBytes)
5992 *numBytes = nb;
5993 return ch;
5994 }
5995
5996 int __ecereNameSpace__ecere__sys__UTF8toUTF16Buffer(const char * source, unsigned short * dest, int max)
5997 {
5998 if(source)
5999 {
6000 int c;
6001 int d = 0;
6002
6003 for(c = 0; source[c]; )
6004 {
6005 unsigned char ch = source[c];
6006 unsigned int codePoint = 0;
6007 int numBytes = 1;
6008 int i;
6009 unsigned char mask = (unsigned char)0x7F;
6010
6011 if(ch & (unsigned char)0x80 && ch & (unsigned char)0x40)
6012 {
6013 mask >>= 2;
6014 numBytes++;
6015 if(ch & (unsigned char)0x20)
6016 {
6017 numBytes++;
6018 mask >>= 1;
6019 if(ch & (unsigned char)0x10)
6020 {
6021 numBytes++;
6022 mask >>= 1;
6023 }
6024 }
6025 }
6026 for(i = 0; i < numBytes; i++)
6027 {
6028 codePoint <<= 6;
6029 codePoint |= source[c++] & mask;
6030 mask = (unsigned char)0x3F;
6031 }
6032 if(codePoint > 0xFFFF)
6033 {
6034 unsigned short lead = (unsigned short)((0xD800 - (0x10000 >> 10)) + (codePoint >> 10));
6035 unsigned short trail = (unsigned short)0xDC00 + (unsigned short)(codePoint & 0x3FF);
6036
6037 if(d >= max - 1)
6038 break;
6039 dest[d++] = lead;
6040 dest[d++] = trail;
6041 }
6042 else
6043 {
6044 if(d >= max)
6045 break;
6046 dest[d++] = (unsigned short)codePoint;
6047 }
6048 }
6049 dest[d] = (unsigned short)0;
6050 return d;
6051 }
6052 return 0;
6053 }
6054
6055 int __ecereNameSpace__ecere__sys__UTF32toUTF8Len(const unsigned int * source, int count, char * dest, int max)
6056 {
6057 int c;
6058 int d = 0;
6059 unsigned int ch;
6060
6061 for(c = 0; c < count && (ch = source[c]); c++)
6062 {
6063 if(ch < 0x80)
6064 {
6065 if(d + 1 >= max)
6066 break;
6067 dest[d++] = (char)ch;
6068 }
6069 else if(ch < 0x800)
6070 {
6071 if(d + 2 >= max)
6072 break;
6073 dest[d++] = (unsigned char)0xC0 | (unsigned char)((ch & 0x7C0) >> 6);
6074 dest[d++] = (unsigned char)0x80 | (unsigned char)(ch & 0x03F);
6075 }
6076 else if(ch < 0x10000)
6077 {
6078 if(d + 3 >= max)
6079 break;
6080 dest[d++] = (unsigned char)0xE0 | (unsigned char)((ch & 0xF000) >> 12);
6081 dest[d++] = (unsigned char)0x80 | (unsigned char)((ch & 0xFC0) >> 6);
6082 dest[d++] = (unsigned char)0x80 | (unsigned char)(ch & 0x03F);
6083 }
6084 else
6085 {
6086 if(d + 4 >= max)
6087 break;
6088 dest[d++] = (unsigned char)0xF0 | (unsigned char)((ch & 0x1C0000) >> 18);
6089 dest[d++] = (unsigned char)0x80 | (unsigned char)((ch & 0x3F000) >> 12);
6090 dest[d++] = (unsigned char)0x80 | (unsigned char)((ch & 0xFC0) >> 6);
6091 dest[d++] = (unsigned char)0x80 | (unsigned char)(ch & 0x03F);
6092 }
6093 }
6094 dest[d] = (char)0;
6095 return d;
6096 }
6097
6098 unsigned short * __ecereNameSpace__ecere__sys__UTF8toUTF16(const char * source, int * wordCount)
6099 {
6100 if(source)
6101 {
6102 int len = (int)strlen(source);
6103 unsigned short * dest = __ecereNameSpace__ecere__com__eSystem_New(sizeof(unsigned short) * (len + 1));
6104 int c;
6105 int d = 0;
6106
6107 for(c = 0; source[c]; )
6108 {
6109 unsigned char ch = source[c];
6110 unsigned int codePoint = 0;
6111 int numBytes = 1;
6112 int i;
6113 unsigned char mask = (unsigned char)0x7F;
6114
6115 if(ch & (unsigned char)0x80 && ch & (unsigned char)0x40)
6116 {
6117 mask >>= 2;
6118 numBytes++;
6119 if(ch & (unsigned char)0x20)
6120 {
6121 numBytes++;
6122 mask >>= 1;
6123 if(ch & (unsigned char)0x10)
6124 {
6125 numBytes++;
6126 mask >>= 1;
6127 }
6128 }
6129 }
6130 for(i = 0; i < numBytes; i++)
6131 {
6132 codePoint <<= 6;
6133 codePoint |= source[c++] & mask;
6134 mask = (unsigned char)0x3F;
6135 }
6136 if(codePoint > 0xFFFF)
6137 {
6138 unsigned short lead = (unsigned short)((0xD800 - (0x10000 >> 10)) + (codePoint >> 10));
6139 unsigned short trail = (unsigned short)0xDC00 + (unsigned short)(codePoint & 0x3FF);
6140
6141 dest[d++] = lead;
6142 dest[d++] = trail;
6143 }
6144 else
6145 {
6146 dest[d++] = (unsigned short)codePoint;
6147 }
6148 }
6149 dest[d] = (unsigned short)0;
6150 if(wordCount)
6151 *wordCount = d;
6152 return dest;
6153 }
6154 return (((void *)0));
6155 }
6156
6157 int __ecereVMethodID___ecereNameSpace__ecere__com__DesignerBase_FindObject;
6158
6159 int __ecereVMethodID___ecereNameSpace__ecere__com__DesignerBase_RenameObject;
6160
6161 int __ecereVMethodID___ecereNameSpace__ecere__com__DesignerBase_SelectObjectFromDesigner;
6162
6163 int __ecereVMethodID___ecereNameSpace__ecere__com__DesignerBase_CodeAddObject;
6164
6165 int __ecereVMethodID___ecereNameSpace__ecere__com__DesignerBase_SheetAddObject;
6166
6167 int __ecereVMethodID___ecereNameSpace__ecere__com__DesignerBase_AddToolBoxClass;
6168
6169 int __ecereVMethodID___ecereNameSpace__ecere__com__DesignerBase_AddDefaultMethod;
6170
6171 int __ecereVMethodID___ecereNameSpace__ecere__com__DesignerBase_DeleteObject;
6172
6173 int __ecereVMethodID___ecereNameSpace__ecere__com__DesignerBase_ObjectContainsCode;
6174
6175 int __ecereVMethodID___ecereNameSpace__ecere__com__DesignerBase_ModifyCode;
6176
6177 int __ecereVMethodID___ecereNameSpace__ecere__com__DesignerBase_UpdateProperties;
6178
6179 int __ecereVMethodID___ecereNameSpace__ecere__com__ClassDesignerBase_Reset;
6180
6181 int __ecereVMethodID___ecereNameSpace__ecere__com__ClassDesignerBase_AddObject;
6182
6183 int __ecereVMethodID___ecereNameSpace__ecere__com__ClassDesignerBase_SelectObject;
6184
6185 int __ecereVMethodID___ecereNameSpace__ecere__com__ClassDesignerBase_ListToolBoxClasses;
6186
6187 int __ecereVMethodID___ecereNameSpace__ecere__com__ClassDesignerBase_PrepareTestObject;
6188
6189 int __ecereVMethodID___ecereNameSpace__ecere__com__ClassDesignerBase_CreateObject;
6190
6191 int __ecereVMethodID___ecereNameSpace__ecere__com__ClassDesignerBase_PostCreateObject;
6192
6193 int __ecereVMethodID___ecereNameSpace__ecere__com__ClassDesignerBase_DroppedObject;
6194
6195 int __ecereVMethodID___ecereNameSpace__ecere__com__ClassDesignerBase_DestroyObject;
6196
6197 int __ecereVMethodID___ecereNameSpace__ecere__com__ClassDesignerBase_FixProperty;
6198
6199 int __ecereVMethodID___ecereNameSpace__ecere__com__ClassDesignerBase_CreateNew;
6200
6201 void __ecereRegisterModule_instance(struct __ecereNameSpace__ecere__com__Instance * module)
6202 {
6203 struct __ecereNameSpace__ecere__com__Class __attribute__((unused)) * class;
6204
6205 __ecereNameSpace__ecere__com__eSystem_RegisterDefine("ecere::com::null", "((void *)0)", module, 4);
6206 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(3, "ecere::com::Angle", "double", 0, 0, (void *)0, (void *)0, module, 4, 1);
6207 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
6208 __ecereClass___ecereNameSpace__ecere__com__Angle = class;
6209 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(3, "ecere::com::unichar", "uint", 0, 0, (void *)0, (void *)0, module, 4, 1);
6210 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
6211 __ecereClass___ecereNameSpace__ecere__com__unichar = class;
6212 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "OnGetString", 0, __ecereMethod___ecereNameSpace__ecere__com__unichar_OnGetString, 1);
6213 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "OnGetDataFromString", 0, __ecereMethod___ecereNameSpace__ecere__com__unichar_OnGetDataFromString, 1);
6214 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "ecere::com::Property", 0, sizeof(struct __ecereNameSpace__ecere__com__Property), 0, (void *)0, (void *)0, module, 4, 1);
6215 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
6216 __ecereClass___ecereNameSpace__ecere__com__Property = class;
6217 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "prev", "ecere::com::Property", arch_PointerSize, arch_PointerSize, 1);
6218 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "next", "ecere::com::Property", arch_PointerSize, arch_PointerSize, 1);
6219 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "name", "const char *", arch_PointerSize, arch_PointerSize, 1);
6220 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "isProperty", "bool", 4, 4, 1);
6221 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "memberAccess", "ecere::com::AccessMode", 4, 4, 1);
6222 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "id", "int", 4, 4, 1);
6223 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "_class", "ecere::com::Class", arch_PointerSize, arch_PointerSize, 1);
6224 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "dataTypeString", "const char *", arch_PointerSize, arch_PointerSize, 1);
6225 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "dataTypeClass", "ecere::com::Class", arch_PointerSize, arch_PointerSize, 1);
6226 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "dataType", "Type", arch_PointerSize, arch_PointerSize, 1);
6227 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "Set", "void (*)(void *, int)", arch_PointerSize, arch_PointerSize, 1);
6228 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "Get", "int (*)(void *)", arch_PointerSize, arch_PointerSize, 1);
6229 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "IsSet", "bool (*)(void *)", arch_PointerSize, arch_PointerSize, 1);
6230 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "data", "void *", arch_PointerSize, arch_PointerSize, 1);
6231 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "symbol", "void *", arch_PointerSize, arch_PointerSize, 1);
6232 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "vid", "int", 4, 4, 1);
6233 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "conversion", "bool", 4, 4, 1);
6234 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "watcherOffset", "uint", 4, 4, 1);
6235 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "category", "const char *", arch_PointerSize, arch_PointerSize, 1);
6236 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "compiled", "bool", 4, 4, 1);
6237 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "selfWatchable", "bool", 4, 4, 1);
6238 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "isWatchable", "bool", 4, 4, 1);
6239 if(class)
6240 class->fixed = (unsigned int)1;
6241 if(class)
6242 class->noExpansion = (unsigned int)1;
6243 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::MemoryGuard_PushLoc", "void ecere::com::MemoryGuard_PushLoc(const char * loc)", __ecereNameSpace__ecere__com__MemoryGuard_PushLoc, module, 4);
6244 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::MemoryGuard_PopLoc", "void ecere::com::MemoryGuard_PopLoc(void)", __ecereNameSpace__ecere__com__MemoryGuard_PopLoc, module, 4);
6245 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "ecere::com::BTNamedLink", 0, sizeof(struct __ecereNameSpace__ecere__com__BTNamedLink), 0, (void *)0, (void *)0, module, 4, 1);
6246 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
6247 __ecereClass___ecereNameSpace__ecere__com__BTNamedLink = class;
6248 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "name", "const char *", arch_PointerSize, arch_PointerSize, 1);
6249 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "parent", "ecere::com::BTNamedLink", arch_PointerSize, arch_PointerSize, 1);
6250 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "left", "ecere::com::BTNamedLink", arch_PointerSize, arch_PointerSize, 1);
6251 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "right", "ecere::com::BTNamedLink", arch_PointerSize, arch_PointerSize, 1);
6252 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "depth", "int", 4, 4, 1);
6253 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "data", "void *", arch_PointerSize, arch_PointerSize, 1);
6254 if(class)
6255 class->fixed = (unsigned int)1;
6256 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "ecere::com::SelfWatcher", 0, sizeof(struct __ecereNameSpace__ecere__com__SelfWatcher), 0, (void *)0, (void *)0, module, 2, 1);
6257 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
6258 __ecereClass___ecereNameSpace__ecere__com__SelfWatcher = class;
6259 if(class)
6260 class->fixed = (unsigned int)1;
6261 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(4, "ecere::com::AccessMode", 0, 0, 0, (void *)0, (void *)0, module, 4, 1);
6262 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
6263 __ecereClass___ecereNameSpace__ecere__com__AccessMode = class;
6264 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "defaultAccess", 0);
6265 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "publicAccess", 1);
6266 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "privateAccess", 2);
6267 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "staticAccess", 3);
6268 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "baseSystemAccess", 4);
6269 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "ecere::com::SubModule", 0, sizeof(struct __ecereNameSpace__ecere__com__SubModule), 0, (void *)0, (void *)0, module, 4, 1);
6270 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
6271 __ecereClass___ecereNameSpace__ecere__com__SubModule = class;
6272 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "prev", "ecere::com::SubModule", arch_PointerSize, arch_PointerSize, 1);
6273 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "next", "ecere::com::SubModule", arch_PointerSize, arch_PointerSize, 1);
6274 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "module", "ecere::com::Module", arch_PointerSize, arch_PointerSize, 1);
6275 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "importMode", "ecere::com::AccessMode", 4, 4, 1);
6276 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(4, "ecere::com::DataMemberType", 0, 0, 0, (void *)0, (void *)0, module, 4, 1);
6277 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
6278 __ecereClass___ecereNameSpace__ecere__com__DataMemberType = class;
6279 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "normalMember", 0);
6280 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "unionMember", 1);
6281 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "structMember", 2);
6282 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(4, "ecere::com::ClassType", 0, 0, 0, (void *)0, (void *)0, module, 4, 1);
6283 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
6284 __ecereClass___ecereNameSpace__ecere__com__ClassType = class;
6285 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "normalClass", 0);
6286 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "structClass", 1);
6287 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "bitClass", 2);
6288 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "unitClass", 3);
6289 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "enumClass", 4);
6290 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "noHeadClass", 5);
6291 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "unionClass", 6);
6292 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "systemClass", 1000);
6293 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "ecere::com::Class", 0, sizeof(struct __ecereNameSpace__ecere__com__Class), 0, (void *)0, (void *)0, module, 4, 1);
6294 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
6295 __ecereClass___ecereNameSpace__ecere__com__Class = class;
6296 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "OnFree", 0, __ecereMethod___ecereNameSpace__ecere__com__Class_OnFree, 1);
6297 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "OnGetString", 0, __ecereMethod___ecereNameSpace__ecere__com__Class_OnGetString, 1);
6298 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "OnGetDataFromString", 0, __ecereMethod___ecereNameSpace__ecere__com__Class_OnGetDataFromString, 1);
6299 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "OnSerialize", 0, __ecereMethod___ecereNameSpace__ecere__com__Class_OnSerialize, 1);
6300 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "OnUnserialize", 0, __ecereMethod___ecereNameSpace__ecere__com__Class_OnUnserialize, 1);
6301 __ecereProp___ecereNameSpace__ecere__com__Class_char__PTR_ = __ecereNameSpace__ecere__com__eClass_AddProperty(class, 0, "const char *", __ecereProp___ecereNameSpace__ecere__com__Class_Set_char__PTR_, __ecereProp___ecereNameSpace__ecere__com__Class_Get_char__PTR_, 1);
6302 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "prev", "ecere::com::Class", arch_PointerSize, arch_PointerSize, 1);
6303 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "next", "ecere::com::Class", arch_PointerSize, arch_PointerSize, 1);
6304 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "name", "const char *", arch_PointerSize, arch_PointerSize, 1);
6305 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "offset", "int", 4, 4, 1);
6306 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "structSize", "int", 4, 4, 1);
6307 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "_vTbl", "void * *", arch_PointerSize, arch_PointerSize, 1);
6308 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "vTblSize", "int", 4, 4, 1);
6309 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "Constructor", "bool (*)(void *)", arch_PointerSize, arch_PointerSize, 1);
6310 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "Destructor", "void (*)(void *)", arch_PointerSize, arch_PointerSize, 1);
6311 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "offsetClass", "int", 4, 4, 1);
6312 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "sizeClass", "int", 4, 4, 1);
6313 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "base", "ecere::com::Class", arch_PointerSize, arch_PointerSize, 1);
6314 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "methods", "ecere::sys::BinaryTree", structSize_BinaryTree, arch_PointerSize, 1);
6315 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "members", "ecere::sys::BinaryTree", structSize_BinaryTree, arch_PointerSize, 1);
6316 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "prop", "ecere::sys::BinaryTree", structSize_BinaryTree, arch_PointerSize, 1);
6317 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "membersAndProperties", "ecere::sys::OldList", structSize_OldList, arch_PointerSize, 1);
6318 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "classProperties", "ecere::sys::BinaryTree", structSize_BinaryTree, arch_PointerSize, 1);
6319 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "derivatives", "ecere::sys::OldList", structSize_OldList, arch_PointerSize, 1);
6320 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "memberID", "int", 4, 4, 1);
6321 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "startMemberID", "int", 4, 4, 1);
6322 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "type", "ecere::com::ClassType", 4, 4, 1);
6323 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "module", "ecere::com::Module", arch_PointerSize, arch_PointerSize, 1);
6324 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "nameSpace", "ecere::com::NameSpace *", arch_PointerSize, arch_PointerSize, 1);
6325 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "dataTypeString", "const char *", arch_PointerSize, arch_PointerSize, 1);
6326 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "dataType", "Type", arch_PointerSize, arch_PointerSize, 1);
6327 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "typeSize", "int", 4, 4, 1);
6328 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "defaultAlignment", "int", 4, 4, 1);
6329 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "Initialize", "void (*)()", arch_PointerSize, arch_PointerSize, 1);
6330 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "memberOffset", "int", 4, 4, 1);
6331 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "selfWatchers", "ecere::sys::OldList", structSize_OldList, arch_PointerSize, 1);
6332 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "designerClass", "const char *", arch_PointerSize, arch_PointerSize, 1);
6333 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "noExpansion", "bool", 4, 4, 1);
6334 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "defaultProperty", "const char *", arch_PointerSize, arch_PointerSize, 1);
6335 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "comRedefinition", "bool", 4, 4, 1);
6336 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "count", "int", 4, 4, 1);
6337 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "isRemote", "int", 4, 4, 1);
6338 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "internalDecl", "bool", 4, 4, 1);
6339 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "data", "void *", arch_PointerSize, arch_PointerSize, 1);
6340 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "computeSize", "bool", 4, 4, 1);
6341 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "structAlignment", "int", 4, 4, 1);
6342 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "destructionWatchOffset", "int", 4, 4, 1);
6343 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "fixed", "bool", 4, 4, 1);
6344 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "delayedCPValues", "ecere::sys::OldList", structSize_OldList, arch_PointerSize, 1);
6345 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "inheritanceAccess", "ecere::com::AccessMode", 4, 4, 1);
6346 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "fullName", "const char *", arch_PointerSize, arch_PointerSize, 1);
6347 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "symbol", "void *", arch_PointerSize, arch_PointerSize, 1);
6348 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "conversions", "ecere::sys::OldList", structSize_OldList, arch_PointerSize, 1);
6349 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "templateParams", "ecere::sys::OldList", structSize_OldList, arch_PointerSize, 1);
6350 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "templateArgs", "ecere::com::ClassTemplateArgument *", arch_PointerSize, arch_PointerSize, 1);
6351 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "templateClass", "ecere::com::Class", arch_PointerSize, arch_PointerSize, 1);
6352 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "templatized", "ecere::sys::OldList", structSize_OldList, arch_PointerSize, 1);
6353 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "numParams", "int", 4, 4, 1);
6354 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "isInstanceClass", "bool", 4, 4, 1);
6355 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "byValueSystemClass", "bool", 4, 4, 1);
6356 if(class)
6357 class->fixed = (unsigned int)1;
6358 if(class)
6359 class->noExpansion = (unsigned int)1;
6360 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(4, "ecere::com::TemplateParameterType", 0, 0, 0, (void *)0, (void *)0, module, 4, 1);
6361 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
6362 __ecereClass___ecereNameSpace__ecere__com__TemplateParameterType = class;
6363 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "type", 0);
6364 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "identifier", 1);
6365 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "expression", 2);
6366 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(4, "ecere::com::TemplateMemberType", 0, 0, 0, (void *)0, (void *)0, module, 4, 1);
6367 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
6368 __ecereClass___ecereNameSpace__ecere__com__TemplateMemberType = class;
6369 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "dataMember", 0);
6370 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "method", 1);
6371 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "prop", 2);
6372 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(1, "ecere::com::ClassTemplateArgument", 0, sizeof(struct __ecereNameSpace__ecere__com__ClassTemplateArgument), 0, (void *)0, (void *)0, module, 4, 1);
6373 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
6374 __ecereClass___ecereNameSpace__ecere__com__ClassTemplateArgument = class;
6375 {
6376 struct __ecereNameSpace__ecere__com__DataMember * dataMember0 = __ecereNameSpace__ecere__com__eMember_New(1, 1);
6377
6378 {
6379 struct __ecereNameSpace__ecere__com__DataMember * dataMember1 = __ecereNameSpace__ecere__com__eMember_New(2, 1);
6380
6381 __ecereNameSpace__ecere__com__eMember_AddDataMember(dataMember1, "dataTypeString", "const char *", arch_PointerSize, arch_PointerSize, 1);
6382 __ecereNameSpace__ecere__com__eMember_AddDataMember(dataMember1, "dataTypeClass", "ecere::com::Class", arch_PointerSize, arch_PointerSize, 1);
6383 __ecereNameSpace__ecere__com__eMember_AddMember(dataMember0, dataMember1);
6384 }
6385 __ecereNameSpace__ecere__com__eMember_AddDataMember(dataMember0, "expression", "ecere::com::DataValue", 8, 8, 1);
6386 {
6387 struct __ecereNameSpace__ecere__com__DataMember * dataMember1 = __ecereNameSpace__ecere__com__eMember_New(2, 1);
6388
6389 __ecereNameSpace__ecere__com__eMember_AddDataMember(dataMember1, "memberString", "const char *", arch_PointerSize, arch_PointerSize, 1);
6390 {
6391 struct __ecereNameSpace__ecere__com__DataMember * dataMember2 = __ecereNameSpace__ecere__com__eMember_New(1, 1);
6392
6393 __ecereNameSpace__ecere__com__eMember_AddDataMember(dataMember2, "member", "ecere::com::DataMember", arch_PointerSize, arch_PointerSize, 1);
6394 __ecereNameSpace__ecere__com__eMember_AddDataMember(dataMember2, "prop", "ecere::com::Property", arch_PointerSize, arch_PointerSize, 1);
6395 __ecereNameSpace__ecere__com__eMember_AddDataMember(dataMember2, "method", "ecere::com::Method", arch_PointerSize, arch_PointerSize, 1);
6396 __ecereNameSpace__ecere__com__eMember_AddMember(dataMember1, dataMember2);
6397 }
6398 __ecereNameSpace__ecere__com__eMember_AddMember(dataMember0, dataMember1);
6399 }
6400 __ecereNameSpace__ecere__com__eClass_AddMember(class, dataMember0);
6401 }
6402 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "ecere::com::ClassTemplateParameter", 0, sizeof(struct __ecereNameSpace__ecere__com__ClassTemplateParameter), 0, (void *)0, (void *)0, module, 4, 1);
6403 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
6404 __ecereClass___ecereNameSpace__ecere__com__ClassTemplateParameter = class;
6405 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "prev", "ecere::com::ClassTemplateParameter", arch_PointerSize, arch_PointerSize, 1);
6406 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "next", "ecere::com::ClassTemplateParameter", arch_PointerSize, arch_PointerSize, 1);
6407 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "name", "const char *", arch_PointerSize, arch_PointerSize, 1);
6408 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "type", "ecere::com::TemplateParameterType", 4, 4, 1);
6409 {
6410 struct __ecereNameSpace__ecere__com__DataMember * dataMember0 = __ecereNameSpace__ecere__com__eMember_New(1, 1);
6411
6412 __ecereNameSpace__ecere__com__eMember_AddDataMember(dataMember0, "dataTypeString", "const char *", arch_PointerSize, arch_PointerSize, 1);
6413 __ecereNameSpace__ecere__com__eMember_AddDataMember(dataMember0, "memberType", "ecere::com::TemplateMemberType", 4, 4, 1);
6414 __ecereNameSpace__ecere__com__eClass_AddMember(class, dataMember0);
6415 }
6416 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "defaultArg", "ecere::com::ClassTemplateArgument", structSize_ClassTemplateArgument, 8, 1);
6417 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "param", "void *", arch_PointerSize, arch_PointerSize, 1);
6418 if(class)
6419 class->fixed = (unsigned int)1;
6420 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(4, "ecere::com::MethodType", 0, 0, 0, (void *)0, (void *)0, module, 4, 1);
6421 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
6422 __ecereClass___ecereNameSpace__ecere__com__MethodType = class;
6423 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "normalMethod", 0);
6424 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "virtualMethod", 1);
6425 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "ecere::com::Method", 0, sizeof(struct __ecereNameSpace__ecere__com__Method), 0, (void *)0, (void *)0, module, 4, 1);
6426 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
6427 __ecereClass___ecereNameSpace__ecere__com__Method = class;
6428 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "name", "const char *", arch_PointerSize, arch_PointerSize, 1);
6429 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "parent", "ecere::com::Method", arch_PointerSize, arch_PointerSize, 1);
6430 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "left", "ecere::com::Method", arch_PointerSize, arch_PointerSize, 1);
6431 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "right", "ecere::com::Method", arch_PointerSize, arch_PointerSize, 1);
6432 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "depth", "int", 4, 4, 1);
6433 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "function", "int (*)()", arch_PointerSize, arch_PointerSize, 1);
6434 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "vid", "int", 4, 4, 1);
6435 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "type", "ecere::com::MethodType", 4, 4, 1);
6436 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "_class", "ecere::com::Class", arch_PointerSize, arch_PointerSize, 1);
6437 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "symbol", "void *", arch_PointerSize, arch_PointerSize, 1);
6438 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "dataTypeString", "const char *", arch_PointerSize, arch_PointerSize, 1);
6439 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "dataType", "Type", arch_PointerSize, arch_PointerSize, 1);
6440 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "memberAccess", "ecere::com::AccessMode", 4, 4, 1);
6441 if(class)
6442 class->fixed = (unsigned int)1;
6443 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(4, "ecere::com::ImportType", 0, 0, 0, (void *)0, (void *)0, module, 4, 1);
6444 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
6445 __ecereClass___ecereNameSpace__ecere__com__ImportType = class;
6446 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "normalImport", 0);
6447 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "staticImport", 1);
6448 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "remoteImport", 2);
6449 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "preDeclImport", 3);
6450 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "comCheckImport", 4);
6451 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(1, "ecere::com::NameSpace", 0, sizeof(struct __ecereNameSpace__ecere__com__NameSpace), 0, (void *)0, (void *)0, module, 4, 1);
6452 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
6453 __ecereClass___ecereNameSpace__ecere__com__NameSpace = class;
6454 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "name", "const char *", arch_PointerSize, arch_PointerSize, 1);
6455 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "btParent", "ecere::com::NameSpace *", arch_PointerSize, arch_PointerSize, 1);
6456 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "left", "ecere::com::NameSpace *", arch_PointerSize, arch_PointerSize, 1);
6457 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "right", "ecere::com::NameSpace *", arch_PointerSize, arch_PointerSize, 1);
6458 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "depth", "int", 4, 4, 1);
6459 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "parent", "ecere::com::NameSpace *", arch_PointerSize, arch_PointerSize, 1);
6460 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "nameSpaces", "ecere::sys::BinaryTree", structSize_BinaryTree, arch_PointerSize, 1);
6461 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "classes", "ecere::sys::BinaryTree", structSize_BinaryTree, arch_PointerSize, 1);
6462 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "defines", "ecere::sys::BinaryTree", structSize_BinaryTree, arch_PointerSize, 1);
6463 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "functions", "ecere::sys::BinaryTree", structSize_BinaryTree, arch_PointerSize, 1);
6464 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(1, "ecere::com::DataValue", 0, sizeof(struct __ecereNameSpace__ecere__com__DataValue), 0, (void *)0, (void *)0, module, 4, 1);
6465 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
6466 __ecereClass___ecereNameSpace__ecere__com__DataValue = class;
6467 {
6468 struct __ecereNameSpace__ecere__com__DataMember * dataMember0 = __ecereNameSpace__ecere__com__eMember_New(1, 1);
6469
6470 __ecereNameSpace__ecere__com__eMember_AddDataMember(dataMember0, "c", "char", 1, 1, 1);
6471 __ecereNameSpace__ecere__com__eMember_AddDataMember(dataMember0, "uc", "byte", 1, 1, 1);
6472 __ecereNameSpace__ecere__com__eMember_AddDataMember(dataMember0, "s", "short", 2, 2, 1);
6473 __ecereNameSpace__ecere__com__eMember_AddDataMember(dataMember0, "us", "uint16", 2, 2, 1);
6474 __ecereNameSpace__ecere__com__eMember_AddDataMember(dataMember0, "i", "int", 4, 4, 1);
6475 __ecereNameSpace__ecere__com__eMember_AddDataMember(dataMember0, "ui", "uint", 4, 4, 1);
6476 __ecereNameSpace__ecere__com__eMember_AddDataMember(dataMember0, "p", "void *", arch_PointerSize, arch_PointerSize, 1);
6477 __ecereNameSpace__ecere__com__eMember_AddDataMember(dataMember0, "f", "float", 4, 4, 1);
6478 __ecereNameSpace__ecere__com__eMember_AddDataMember(dataMember0, "d", "double", 8, 8, 1);
6479 __ecereNameSpace__ecere__com__eMember_AddDataMember(dataMember0, "i64", "int64", 8, 8, 1);
6480 __ecereNameSpace__ecere__com__eMember_AddDataMember(dataMember0, "ui64", "uint64", 8, 8, 1);
6481 __ecereNameSpace__ecere__com__eClass_AddMember(class, dataMember0);
6482 }
6483 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "ecere::com::DataMember", 0, sizeof(struct __ecereNameSpace__ecere__com__DataMember), 0, (void *)0, (void *)0, module, 4, 1);
6484 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
6485 __ecereClass___ecereNameSpace__ecere__com__DataMember = class;
6486 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "prev", "ecere::com::DataMember", arch_PointerSize, arch_PointerSize, 1);
6487 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "next", "ecere::com::DataMember", arch_PointerSize, arch_PointerSize, 1);
6488 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "name", "const char *", arch_PointerSize, arch_PointerSize, 1);
6489 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "isProperty", "bool", 4, 4, 1);
6490 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "memberAccess", "ecere::com::AccessMode", 4, 4, 1);
6491 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "id", "int", 4, 4, 1);
6492 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "_class", "ecere::com::Class", arch_PointerSize, arch_PointerSize, 1);
6493 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "dataTypeString", "const char *", arch_PointerSize, arch_PointerSize, 1);
6494 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "dataTypeClass", "ecere::com::Class", arch_PointerSize, arch_PointerSize, 1);
6495 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "dataType", "Type", arch_PointerSize, arch_PointerSize, 1);
6496 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "type", "ecere::com::DataMemberType", 4, 4, 1);
6497 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "offset", "int", 4, 4, 1);
6498 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "memberID", "int", 4, 4, 1);
6499 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "members", "ecere::sys::OldList", structSize_OldList, arch_PointerSize, 1);
6500 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "membersAlpha", "ecere::sys::BinaryTree", structSize_BinaryTree, arch_PointerSize, 1);
6501 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "memberOffset", "int", 4, 4, 1);
6502 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "structAlignment", "int", 4, 4, 1);
6503 if(class)
6504 class->fixed = (unsigned int)1;
6505 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "ecere::com::BitMember", 0, sizeof(struct __ecereNameSpace__ecere__com__BitMember), 0, (void *)0, (void *)0, module, 4, 1);
6506 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
6507 __ecereClass___ecereNameSpace__ecere__com__BitMember = class;
6508 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "prev", "ecere::com::BitMember", arch_PointerSize, arch_PointerSize, 1);
6509 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "next", "ecere::com::BitMember", arch_PointerSize, arch_PointerSize, 1);
6510 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "name", "const char *", arch_PointerSize, arch_PointerSize, 1);
6511 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "isProperty", "bool", 4, 4, 1);
6512 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "memberAccess", "ecere::com::AccessMode", 4, 4, 1);
6513 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "id", "int", 4, 4, 1);
6514 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "_class", "ecere::com::Class", arch_PointerSize, arch_PointerSize, 1);
6515 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "dataTypeString", "const char *", arch_PointerSize, arch_PointerSize, 1);
6516 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "dataTypeClass", "ecere::com::Class", arch_PointerSize, arch_PointerSize, 1);
6517 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "dataType", "Type", arch_PointerSize, arch_PointerSize, 1);
6518 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "type", "ecere::com::DataMemberType", 4, 4, 1);
6519 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "size", "int", 4, 4, 1);
6520 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "pos", "int", 4, 4, 1);
6521 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "mask", "uint64", 8, 8, 1);
6522 if(class)
6523 class->fixed = (unsigned int)1;
6524 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "ecere::com::ClassProperty", 0, sizeof(struct __ecereNameSpace__ecere__com__ClassProperty), 0, (void *)0, (void *)0, module, 4, 1);
6525 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
6526 __ecereClass___ecereNameSpace__ecere__com__ClassProperty = class;
6527 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "name", "const char *", arch_PointerSize, arch_PointerSize, 1);
6528 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "parent", "ecere::com::ClassProperty", arch_PointerSize, arch_PointerSize, 1);
6529 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "left", "ecere::com::ClassProperty", arch_PointerSize, arch_PointerSize, 1);
6530 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "right", "ecere::com::ClassProperty", arch_PointerSize, arch_PointerSize, 1);
6531 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "depth", "int", 4, 4, 1);
6532 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "Set", "void (*)(ecere::com::Class, int64)", arch_PointerSize, arch_PointerSize, 1);
6533 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "Get", "int64 (*)(ecere::com::Class)", arch_PointerSize, arch_PointerSize, 1);
6534 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "dataTypeString", "const char *", arch_PointerSize, arch_PointerSize, 1);
6535 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "dataType", "Type", arch_PointerSize, arch_PointerSize, 1);
6536 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "constant", "bool", 4, 4, 1);
6537 if(class)
6538 class->fixed = (unsigned int)1;
6539 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "ecere::com::DefinedExpression", 0, sizeof(struct __ecereNameSpace__ecere__com__DefinedExpression), 0, (void *)0, (void *)0, module, 4, 1);
6540 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
6541 __ecereClass___ecereNameSpace__ecere__com__DefinedExpression = class;
6542 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "prev", "ecere::com::DefinedExpression", arch_PointerSize, arch_PointerSize, 1);
6543 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "next", "ecere::com::DefinedExpression", arch_PointerSize, arch_PointerSize, 1);
6544 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "name", "const char *", arch_PointerSize, arch_PointerSize, 1);
6545 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "value", "const char *", arch_PointerSize, arch_PointerSize, 1);
6546 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "nameSpace", "ecere::com::NameSpace *", arch_PointerSize, arch_PointerSize, 1);
6547 if(class)
6548 class->fixed = (unsigned int)1;
6549 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "ecere::com::GlobalFunction", 0, sizeof(struct __ecereNameSpace__ecere__com__GlobalFunction), 0, (void *)0, (void *)0, module, 4, 1);
6550 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
6551 __ecereClass___ecereNameSpace__ecere__com__GlobalFunction = class;
6552 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "prev", "ecere::com::GlobalFunction", arch_PointerSize, arch_PointerSize, 1);
6553 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "next", "ecere::com::GlobalFunction", arch_PointerSize, arch_PointerSize, 1);
6554 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "name", "const char *", arch_PointerSize, arch_PointerSize, 1);
6555 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "function", "int (*)()", arch_PointerSize, arch_PointerSize, 1);
6556 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "module", "ecere::com::Module", arch_PointerSize, arch_PointerSize, 1);
6557 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "nameSpace", "ecere::com::NameSpace *", arch_PointerSize, arch_PointerSize, 1);
6558 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "dataTypeString", "const char *", arch_PointerSize, arch_PointerSize, 1);
6559 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "dataType", "Type", arch_PointerSize, arch_PointerSize, 1);
6560 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "symbol", "void *", arch_PointerSize, arch_PointerSize, 1);
6561 if(class)
6562 class->fixed = (unsigned int)1;
6563 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "ecere::com::EnumClassData", 0, sizeof(struct __ecereNameSpace__ecere__com__EnumClassData), 0, (void *)0, (void *)0, module, 4, 1);
6564 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
6565 __ecereClass___ecereNameSpace__ecere__com__EnumClassData = class;
6566 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "values", "ecere::sys::OldList", structSize_OldList, arch_PointerSize, 1);
6567 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "largest", "int64", 8, 8, 1);
6568 if(class)
6569 class->fixed = (unsigned int)1;
6570 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "ecere::com::Watcher", 0, sizeof(struct __ecereNameSpace__ecere__com__Watcher), 0, (void *)0, (void *)0, module, 2, 1);
6571 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
6572 __ecereClass___ecereNameSpace__ecere__com__Watcher = class;
6573 if(class)
6574 class->fixed = (unsigned int)1;
6575 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "ecere::com::MemBlock", 0, sizeof(struct __ecereNameSpace__ecere__com__MemBlock), 0, (void *)0, (void *)0, module, 2, 1);
6576 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
6577 __ecereClass___ecereNameSpace__ecere__com__MemBlock = class;
6578 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "ecere::com::MemPart", 0, sizeof(struct __ecereNameSpace__ecere__com__MemPart), 0, (void *)0, (void *)0, module, 2, 1);
6579 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
6580 __ecereClass___ecereNameSpace__ecere__com__MemPart = class;
6581 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(1, "ecere::com::BlockPool", 0, sizeof(struct __ecereNameSpace__ecere__com__BlockPool), 0, (void *)0, (void *)0, module, 2, 1);
6582 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
6583 __ecereClass___ecereNameSpace__ecere__com__BlockPool = class;
6584 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Add", "ecere::com::MemBlock Add()", __ecereMethod___ecereNameSpace__ecere__com__BlockPool_Add, 1);
6585 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Expand", "bool Expand(unsigned int numBlocks)", __ecereMethod___ecereNameSpace__ecere__com__BlockPool_Expand, 1);
6586 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Remove", "void Remove(ecere::com::MemBlock block)", __ecereMethod___ecereNameSpace__ecere__com__BlockPool_Remove, 1);
6587 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "first", "ecere::com::MemBlock", arch_PointerSize, arch_PointerSize, 1);
6588 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "last", "ecere::com::MemBlock", arch_PointerSize, arch_PointerSize, 1);
6589 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "free", "ecere::com::MemBlock", arch_PointerSize, arch_PointerSize, 1);
6590 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "blockSize", "uint", 4, 4, 1);
6591 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "blockSpace", "uint", 4, 4, 1);
6592 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "numParts", "int", 4, 4, 1);
6593 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "numBlocks", "int", 4, 4, 1);
6594 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "totalSize", "uint", 4, 4, 1);
6595 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "usedSpace", "uint", 4, 4, 1);
6596 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::log2i", "uint ecere::com::log2i(uint number)", __ecereNameSpace__ecere__com__log2i, module, 4);
6597 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::pow2i", "uint ecere::com::pow2i(uint number)", __ecereNameSpace__ecere__com__pow2i, module, 4);
6598 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::memswap", "void ecere::com::memswap(byte * a, byte * b, uint size)", __ecereNameSpace__ecere__com__memswap, module, 4);
6599 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::CheckMemory", "void ecere::com::CheckMemory(void)", __ecereNameSpace__ecere__com__CheckMemory, module, 4);
6600 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eSystem_RegisterClass", "ecere::com::Class ecere::com::eSystem_RegisterClass(ecere::com::ClassType type, const char * name, const char * baseName, int size, int sizeClass, bool (* Constructor)(void *), void (* Destructor)(void *), ecere::com::Module module, ecere::com::AccessMode declMode, ecere::com::AccessMode inheritanceAccess)", __ecereNameSpace__ecere__com__eSystem_RegisterClass, module, 4);
6601 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eClass_Unregister", "void ecere::com::eClass_Unregister(ecere::com::Class _class)", __ecereNameSpace__ecere__com__eClass_Unregister, module, 4);
6602 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::_strtoi64", "int64 ecere::com::_strtoi64(const char * string, const char * * endString, int base)", __ecereNameSpace__ecere__com___strtoi64, module, 4);
6603 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::_strtoui64", "uint64 ecere::com::_strtoui64(const char * string, const char * * endString, int base)", __ecereNameSpace__ecere__com___strtoui64, module, 4);
6604 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eSystem_FindClass", "ecere::com::Class ecere::com::eSystem_FindClass(ecere::com::Module module, const char * name)", __ecereNameSpace__ecere__com__eSystem_FindClass, module, 4);
6605 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::DefaultFunction", "bool ecere::com::DefaultFunction(void)", __ecereNameSpace__ecere__com__DefaultFunction, module, 2);
6606 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eClass_IsDerived", "bool ecere::com::eClass_IsDerived(ecere::com::Class _class, ecere::com::Class from)", __ecereNameSpace__ecere__com__eClass_IsDerived, module, 4);
6607 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eClass_AddMethod", "ecere::com::Method ecere::com::eClass_AddMethod(ecere::com::Class _class, const char * name, const char * type, void * function, ecere::com::AccessMode declMode)", __ecereNameSpace__ecere__com__eClass_AddMethod, module, 4);
6608 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eClass_AddVirtualMethod", "ecere::com::Method ecere::com::eClass_AddVirtualMethod(ecere::com::Class _class, const char * name, const char * type, void * function, ecere::com::AccessMode declMode)", __ecereNameSpace__ecere__com__eClass_AddVirtualMethod, module, 4);
6609 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eClass_AddProperty", "ecere::com::Property ecere::com::eClass_AddProperty(ecere::com::Class _class, const char * name, const char * dataType, void * setStmt, void * getStmt, ecere::com::AccessMode declMode)", __ecereNameSpace__ecere__com__eClass_AddProperty, module, 4);
6610 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eClass_AddClassProperty", "ecere::com::ClassProperty ecere::com::eClass_AddClassProperty(ecere::com::Class _class, const char * name, const char * dataType, void * setStmt, void * getStmt)", __ecereNameSpace__ecere__com__eClass_AddClassProperty, module, 4);
6611 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eClass_FindClassProperty", "ecere::com::ClassProperty ecere::com::eClass_FindClassProperty(ecere::com::Class _class, const char * name)", __ecereNameSpace__ecere__com__eClass_FindClassProperty, module, 4);
6612 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eClass_GetProperty", "int64 ecere::com::eClass_GetProperty(ecere::com::Class _class, const char * name)", __ecereNameSpace__ecere__com__eClass_GetProperty, module, 4);
6613 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eClass_SetProperty", "void ecere::com::eClass_SetProperty(ecere::com::Class _class, const char * name, int64 value)", __ecereNameSpace__ecere__com__eClass_SetProperty, module, 4);
6614 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eClass_FindMethod", "ecere::com::Method ecere::com::eClass_FindMethod(ecere::com::Class _class, const char * name, ecere::com::Module module)", __ecereNameSpace__ecere__com__eClass_FindMethod, module, 4);
6615 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eInstance_New", "void * ecere::com::eInstance_New(ecere::com::Class _class)", __ecereNameSpace__ecere__com__eInstance_New, module, 4);
6616 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eInstance_Evolve", "void ecere::com::eInstance_Evolve(ecere::com::Instance * instancePtr, ecere::com::Class _class)", __ecereNameSpace__ecere__com__eInstance_Evolve, module, 4);
6617 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eInstance_Delete", "void ecere::com::eInstance_Delete(ecere::com::Instance instance)", __ecereNameSpace__ecere__com__eInstance_Delete, module, 4);
6618 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eClass_FindProperty", "ecere::com::Property ecere::com::eClass_FindProperty(ecere::com::Class _class, const char * name, ecere::com::Module module)", __ecereNameSpace__ecere__com__eClass_FindProperty, module, 4);
6619 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eClass_FindDataMember", "ecere::com::DataMember ecere::com::eClass_FindDataMember(ecere::com::Class _class, const char * name, ecere::com::Module module, ecere::com::DataMember * subMemberStack, int * subMemberStackPos)", __ecereNameSpace__ecere__com__eClass_FindDataMember, module, 4);
6620 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eClass_FindDataMemberAndOffset", "ecere::com::DataMember ecere::com::eClass_FindDataMemberAndOffset(ecere::com::Class _class, const char * name, uint * offset, ecere::com::Module module, ecere::com::DataMember * subMemberStack, int * subMemberStackPos)", __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset, module, 4);
6621 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eClass_FindDataMemberAndId", "ecere::com::DataMember ecere::com::eClass_FindDataMemberAndId(ecere::com::Class _class, const char * name, int * id, ecere::com::Module module, ecere::com::DataMember * subMemberStack, int * subMemberStackPos)", __ecereNameSpace__ecere__com__eClass_FindDataMemberAndId, module, 4);
6622 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eClass_FindNextMember", "void ecere::com::eClass_FindNextMember(ecere::com::Class _class, ecere::com::Class * curClass, ecere::com::DataMember * curMember, ecere::com::DataMember * subMemberStack, int * subMemberStackPos)", __ecereNameSpace__ecere__com__eClass_FindNextMember, module, 4);
6623 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eInstance_SetMethod", "void ecere::com::eInstance_SetMethod(ecere::com::Instance instance, const char * name, void * function)", __ecereNameSpace__ecere__com__eInstance_SetMethod, module, 4);
6624 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eInstance_IsDerived", "bool ecere::com::eInstance_IsDerived(ecere::com::Instance instance, ecere::com::Class from)", __ecereNameSpace__ecere__com__eInstance_IsDerived, module, 4);
6625 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eInstance_IncRef", "void ecere::com::eInstance_IncRef(ecere::com::Instance instance)", __ecereNameSpace__ecere__com__eInstance_IncRef, module, 4);
6626 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eInstance_DecRef", "void ecere::com::eInstance_DecRef(ecere::com::Instance instance)", __ecereNameSpace__ecere__com__eInstance_DecRef, module, 4);
6627 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eClass_Resize", "void ecere::com::eClass_Resize(ecere::com::Class _class, int newSize)", __ecereNameSpace__ecere__com__eClass_Resize, module, 4);
6628 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eClass_AddDataMember", "ecere::com::DataMember ecere::com::eClass_AddDataMember(ecere::com::Class _class, const char * name, const char * type, uint size, uint alignment, ecere::com::AccessMode declMode)", __ecereNameSpace__ecere__com__eClass_AddDataMember, module, 4);
6629 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eMember_AddDataMember", "ecere::com::DataMember ecere::com::eMember_AddDataMember(ecere::com::DataMember member, const char * name, const char * type, uint size, uint alignment, ecere::com::AccessMode declMode)", __ecereNameSpace__ecere__com__eMember_AddDataMember, module, 4);
6630 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eMember_New", "ecere::com::DataMember ecere::com::eMember_New(ecere::com::DataMemberType type, ecere::com::AccessMode declMode)", __ecereNameSpace__ecere__com__eMember_New, module, 4);
6631 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eMember_AddMember", "bool ecere::com::eMember_AddMember(ecere::com::DataMember addTo, ecere::com::DataMember dataMember)", __ecereNameSpace__ecere__com__eMember_AddMember, module, 4);
6632 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eClass_AddMember", "bool ecere::com::eClass_AddMember(ecere::com::Class _class, ecere::com::DataMember dataMember)", __ecereNameSpace__ecere__com__eClass_AddMember, module, 4);
6633 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eClass_AddBitMember", "ecere::com::BitMember ecere::com::eClass_AddBitMember(ecere::com::Class _class, const char * name, const char * type, int bitSize, int bitPos, ecere::com::AccessMode declMode)", __ecereNameSpace__ecere__com__eClass_AddBitMember, module, 4);
6634 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eModule_Load", "ecere::com::Module ecere::com::eModule_Load(ecere::com::Module fromModule, const char * name, ecere::com::AccessMode importAccess)", __ecereNameSpace__ecere__com__eModule_Load, module, 4);
6635 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eModule_LoadStrict", "ecere::com::Module ecere::com::eModule_LoadStrict(ecere::com::Module fromModule, const char * name, ecere::com::AccessMode importAccess)", __ecereNameSpace__ecere__com__eModule_LoadStrict, module, 4);
6636 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eModule_LoadStatic", "ecere::com::Module ecere::com::eModule_LoadStatic(ecere::com::Module fromModule, const char * name, ecere::com::AccessMode importAccess, bool (* Load)(ecere::com::Module module), bool (* Unload)(ecere::com::Module module))", __ecereNameSpace__ecere__com__eModule_LoadStatic, module, 4);
6637 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eModule_Unload", "void ecere::com::eModule_Unload(ecere::com::Module fromModule, ecere::com::Module module)", __ecereNameSpace__ecere__com__eModule_Unload, module, 4);
6638 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eEnum_AddFixedValue", "void ecere::com::eEnum_AddFixedValue(ecere::com::Class _class, const char * string, int64 value)", __ecereNameSpace__ecere__com__eEnum_AddFixedValue, module, 4);
6639 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eEnum_AddValue", "int64 ecere::com::eEnum_AddValue(ecere::com::Class _class, const char * string)", __ecereNameSpace__ecere__com__eEnum_AddValue, module, 4);
6640 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eSystem_RegisterDefine", "ecere::com::DefinedExpression ecere::com::eSystem_RegisterDefine(const char * name, const char * value, ecere::com::Module module, ecere::com::AccessMode declMode)", __ecereNameSpace__ecere__com__eSystem_RegisterDefine, module, 4);
6641 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eSystem_RegisterFunction", "ecere::com::GlobalFunction ecere::com::eSystem_RegisterFunction(const char * name, const char * type, void * func, ecere::com::Module module, ecere::com::AccessMode declMode)", __ecereNameSpace__ecere__com__eSystem_RegisterFunction, module, 4);
6642 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eSystem_FindDefine", "ecere::com::DefinedExpression ecere::com::eSystem_FindDefine(ecere::com::Module module, const char * name)", __ecereNameSpace__ecere__com__eSystem_FindDefine, module, 4);
6643 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eSystem_FindFunction", "ecere::com::GlobalFunction ecere::com::eSystem_FindFunction(ecere::com::Module module, const char * name)", __ecereNameSpace__ecere__com__eSystem_FindFunction, module, 4);
6644 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eSystem_Renew", "void * ecere::com::eSystem_Renew(void * memory, uint size)", __ecereNameSpace__ecere__com__eSystem_Renew, module, 4);
6645 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eSystem_Renew0", "void * ecere::com::eSystem_Renew0(void * memory, uint size)", __ecereNameSpace__ecere__com__eSystem_Renew0, module, 4);
6646 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eSystem_New", "void * ecere::com::eSystem_New(uint size)", __ecereNameSpace__ecere__com__eSystem_New, module, 4);
6647 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eSystem_New0", "void * ecere::com::eSystem_New0(uint size)", __ecereNameSpace__ecere__com__eSystem_New0, module, 4);
6648 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eSystem_Delete", "void ecere::com::eSystem_Delete(void * memory)", __ecereNameSpace__ecere__com__eSystem_Delete, module, 4);
6649 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eInstance_FireSelfWatchers", "void ecere::com::eInstance_FireSelfWatchers(ecere::com::Instance instance, ecere::com::Property _property)", __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers, module, 4);
6650 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eInstance_FireWatchers", "void ecere::com::eInstance_FireWatchers(ecere::com::Instance instance, ecere::com::Property _property)", __ecereNameSpace__ecere__com__eInstance_FireWatchers, module, 4);
6651 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eProperty_Watchable", "void ecere::com::eProperty_Watchable(ecere::com::Property _property)", __ecereNameSpace__ecere__com__eProperty_Watchable, module, 4);
6652 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eClass_DestructionWatchable", "void ecere::com::eClass_DestructionWatchable(ecere::com::Class _class)", __ecereNameSpace__ecere__com__eClass_DestructionWatchable, module, 4);
6653 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eProperty_SelfWatch", "void ecere::com::eProperty_SelfWatch(ecere::com::Class _class, const char * name, void (* callback)(void *))", __ecereNameSpace__ecere__com__eProperty_SelfWatch, module, 4);
6654 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eInstance_Watch", "void ecere::com::eInstance_Watch(void * instance, ecere::com::Property _property, void * object, void (* callback)(void *, void *))", __ecereNameSpace__ecere__com__eInstance_Watch, module, 4);
6655 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eInstance_WatchDestruction", "void ecere::com::eInstance_WatchDestruction(ecere::com::Instance instance, ecere::com::Instance object, void (* callback)(void *, void *))", __ecereNameSpace__ecere__com__eInstance_WatchDestruction, module, 4);
6656 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eInstance_StopWatching", "void ecere::com::eInstance_StopWatching(ecere::com::Instance instance, ecere::com::Property _property, ecere::com::Instance object)", __ecereNameSpace__ecere__com__eInstance_StopWatching, module, 4);
6657 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eClass_GetDesigner", "subclass(ecere::com::ClassDesignerBase) ecere::com::eClass_GetDesigner(ecere::com::Class _class)", __ecereNameSpace__ecere__com__eClass_GetDesigner, module, 4);
6658 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eInstance_GetDesigner", "subclass(ecere::com::ClassDesignerBase) ecere::com::eInstance_GetDesigner(ecere::com::Instance instance)", __ecereNameSpace__ecere__com__eInstance_GetDesigner, module, 4);
6659 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::LocateModule", "bool ecere::com::LocateModule(const char * name, const char * fileName)", __ecereNameSpace__ecere__com__LocateModule, module, 4);
6660 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::__ecere_COM_Initialize", "ecere::com::Application ecere::com::__ecere_COM_Initialize(bool guiApp, int argc, char * argv[])", __ecereNameSpace__ecere__com____ecere_COM_Initialize, module, 4);
6661 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eClass_AddTemplateParameter", "ecere::com::ClassTemplateParameter ecere::com::eClass_AddTemplateParameter(ecere::com::Class _class, const char * name, ecere::com::TemplateParameterType type, const void * info, ecere::com::ClassTemplateArgument defaultArg)", __ecereNameSpace__ecere__com__eClass_AddTemplateParameter, module, 4);
6662 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eClass_DoneAddingTemplateParameters", "void ecere::com::eClass_DoneAddingTemplateParameters(ecere::com::Class base)", __ecereNameSpace__ecere__com__eClass_DoneAddingTemplateParameters, module, 4);
6663 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(4, "ecere::com::Platform", 0, 0, 0, (void *)0, (void *)0, module, 4, 1);
6664 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
6665 __ecereClass___ecereNameSpace__ecere__com__Platform = class;
6666 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "OnGetString", 0, __ecereMethod___ecereNameSpace__ecere__com__Platform_OnGetString, 1);
6667 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "OnGetDataFromString", 0, __ecereMethod___ecereNameSpace__ecere__com__Platform_OnGetDataFromString, 1);
6668 __ecereProp___ecereNameSpace__ecere__com__Platform_char__PTR_ = __ecereNameSpace__ecere__com__eClass_AddProperty(class, 0, "const char *", __ecereProp___ecereNameSpace__ecere__com__Platform_Set_char__PTR_, __ecereProp___ecereNameSpace__ecere__com__Platform_Get_char__PTR_, 1);
6669 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "unknown", 0);
6670 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "win32", 1);
6671 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "tux", 2);
6672 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "apple", 3);
6673 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::GetRuntimePlatform", "ecere::com::Platform ecere::com::GetRuntimePlatform(void)", __ecereNameSpace__ecere__com__GetRuntimePlatform, module, 4);
6674 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "ecere::com::ObjectInfo", 0, sizeof(struct __ecereNameSpace__ecere__com__ObjectInfo), 0, (void *)0, (void *)0, module, 4, 1);
6675 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
6676 __ecereClass___ecereNameSpace__ecere__com__ObjectInfo = class;
6677 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "prev", "ecere::com::ObjectInfo", arch_PointerSize, arch_PointerSize, 1);
6678 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "next", "ecere::com::ObjectInfo", arch_PointerSize, arch_PointerSize, 1);
6679 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "instance", "ecere::com::Instance", arch_PointerSize, arch_PointerSize, 1);
6680 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "name", "char *", arch_PointerSize, arch_PointerSize, 1);
6681 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "instCode", "Instantiation", arch_PointerSize, arch_PointerSize, 1);
6682 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "deleted", "bool", 4, 4, 1);
6683 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "oClass", "ecere::com::ObjectInfo", arch_PointerSize, arch_PointerSize, 1);
6684 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "instances", "ecere::sys::OldList", structSize_OldList, arch_PointerSize, 1);
6685 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "classDefinition", "ClassDefinition", arch_PointerSize, arch_PointerSize, 1);
6686 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "modified", "bool", 4, 4, 1);
6687 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "i18nStrings", "void *", arch_PointerSize, arch_PointerSize, 1);
6688 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(0, "ecere::com::DesignerBase", "ecere::gui::Window", sizeof(struct __ecereNameSpace__ecere__com__DesignerBase), 0, (void *)0, (void *)0, module, 4, 1);
6689 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
6690 __ecereClass___ecereNameSpace__ecere__com__DesignerBase = class;
6691 __ecereNameSpace__ecere__com__eClass_AddVirtualMethod(class, "FindObject", "bool FindObject(ecere::com::Instance * instance, const char * string)", 0, 1);
6692 __ecereNameSpace__ecere__com__eClass_AddVirtualMethod(class, "RenameObject", "void RenameObject(ecere::com::ObjectInfo object, const char * name)", 0, 1);
6693 __ecereNameSpace__ecere__com__eClass_AddVirtualMethod(class, "SelectObjectFromDesigner", "void SelectObjectFromDesigner(ecere::com::ObjectInfo object)", 0, 1);
6694 __ecereNameSpace__ecere__com__eClass_AddVirtualMethod(class, "CodeAddObject", "void CodeAddObject(ecere::com::Instance instance, ecere::com::ObjectInfo * object)", 0, 1);
6695 __ecereNameSpace__ecere__com__eClass_AddVirtualMethod(class, "SheetAddObject", "void SheetAddObject(ecere::com::ObjectInfo object)", 0, 1);
6696 __ecereNameSpace__ecere__com__eClass_AddVirtualMethod(class, "AddToolBoxClass", "void AddToolBoxClass(ecere::com::Class _class)", 0, 1);
6697 __ecereNameSpace__ecere__com__eClass_AddVirtualMethod(class, "AddDefaultMethod", "void AddDefaultMethod(ecere::com::Instance instance, ecere::com::Instance classInstance)", 0, 1);
6698 __ecereNameSpace__ecere__com__eClass_AddVirtualMethod(class, "DeleteObject", "void DeleteObject(ecere::com::ObjectInfo object)", 0, 1);
6699 __ecereNameSpace__ecere__com__eClass_AddVirtualMethod(class, "ObjectContainsCode", "bool ObjectContainsCode(ecere::com::ObjectInfo object)", 0, 1);
6700 __ecereNameSpace__ecere__com__eClass_AddVirtualMethod(class, "ModifyCode", "void ModifyCode(void)", 0, 1);
6701 __ecereNameSpace__ecere__com__eClass_AddVirtualMethod(class, "UpdateProperties", "void UpdateProperties(void)", 0, 1);
6702 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "classDesigner", "ecere::com::ClassDesignerBase", arch_PointerSize, arch_PointerSize, 1);
6703 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "objectClass", "const char *", arch_PointerSize, arch_PointerSize, 1);
6704 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "isDragging", "bool", 4, 4, 1);
6705 __ecerePropM___ecereNameSpace__ecere__com__DesignerBase_classDesigner = __ecereNameSpace__ecere__com__eClass_AddProperty(class, "classDesigner", "ecere::com::ClassDesignerBase", __ecereProp___ecereNameSpace__ecere__com__DesignerBase_Set_classDesigner, __ecereProp___ecereNameSpace__ecere__com__DesignerBase_Get_classDesigner, 1);
6706 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application)
6707 __ecereProp___ecereNameSpace__ecere__com__DesignerBase_classDesigner = __ecerePropM___ecereNameSpace__ecere__com__DesignerBase_classDesigner, __ecerePropM___ecereNameSpace__ecere__com__DesignerBase_classDesigner = (void *)0;
6708 __ecerePropM___ecereNameSpace__ecere__com__DesignerBase_objectClass = __ecereNameSpace__ecere__com__eClass_AddProperty(class, "objectClass", "const char *", __ecereProp___ecereNameSpace__ecere__com__DesignerBase_Set_objectClass, __ecereProp___ecereNameSpace__ecere__com__DesignerBase_Get_objectClass, 1);
6709 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application)
6710 __ecereProp___ecereNameSpace__ecere__com__DesignerBase_objectClass = __ecerePropM___ecereNameSpace__ecere__com__DesignerBase_objectClass, __ecerePropM___ecereNameSpace__ecere__com__DesignerBase_objectClass = (void *)0;
6711 __ecerePropM___ecereNameSpace__ecere__com__DesignerBase_isDragging = __ecereNameSpace__ecere__com__eClass_AddProperty(class, "isDragging", "bool", __ecereProp___ecereNameSpace__ecere__com__DesignerBase_Set_isDragging, __ecereProp___ecereNameSpace__ecere__com__DesignerBase_Get_isDragging, 1);
6712 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application)
6713 __ecereProp___ecereNameSpace__ecere__com__DesignerBase_isDragging = __ecerePropM___ecereNameSpace__ecere__com__DesignerBase_isDragging, __ecerePropM___ecereNameSpace__ecere__com__DesignerBase_isDragging = (void *)0;
6714 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(0, "ecere::com::ClassDesignerBase", "ecere::gui::Window", 0, 0, (void *)0, (void *)0, module, 4, 1);
6715 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
6716 __ecereClass___ecereNameSpace__ecere__com__ClassDesignerBase = class;
6717 __ecereNameSpace__ecere__com__eClass_AddVirtualMethod(class, "Reset", "void Reset(void)", 0, 1);
6718 __ecereNameSpace__ecere__com__eClass_AddVirtualMethod(class, "AddObject", "void AddObject(void)", 0, 1);
6719 __ecereNameSpace__ecere__com__eClass_AddVirtualMethod(class, "SelectObject", "void SelectObject(ecere::com::ObjectInfo object, ecere::com::Instance control)", 0, 1);
6720 __ecereNameSpace__ecere__com__eClass_AddVirtualMethod(class, "ListToolBoxClasses", "void ListToolBoxClasses(ecere::com::DesignerBase designer)", 0, 1);
6721 __ecereNameSpace__ecere__com__eClass_AddVirtualMethod(class, "PrepareTestObject", "void ::PrepareTestObject(ecere::com::DesignerBase designer, ecere::com::Instance test)", 0, 1);
6722 __ecereNameSpace__ecere__com__eClass_AddVirtualMethod(class, "CreateObject", "void ::CreateObject(ecere::com::DesignerBase designer, ecere::com::Instance instance, ecere::com::ObjectInfo object, bool isClass, ecere::com::Instance _class)", 0, 1);
6723 __ecereNameSpace__ecere__com__eClass_AddVirtualMethod(class, "PostCreateObject", "void ::PostCreateObject(ecere::com::Instance instance, ecere::com::ObjectInfo object, bool isClass, ecere::com::Instance _class)", 0, 1);
6724 __ecereNameSpace__ecere__com__eClass_AddVirtualMethod(class, "DroppedObject", "void ::DroppedObject(ecere::com::Instance instance, ecere::com::ObjectInfo object, bool isClass, ecere::com::Instance _class)", 0, 1);
6725 __ecereNameSpace__ecere__com__eClass_AddVirtualMethod(class, "DestroyObject", "void ::DestroyObject(ecere::com::Instance object)", 0, 1);
6726 __ecereNameSpace__ecere__com__eClass_AddVirtualMethod(class, "FixProperty", "void ::FixProperty(ecere::com::Property prop, ecere::com::Instance object)", 0, 1);
6727 __ecereNameSpace__ecere__com__eClass_AddVirtualMethod(class, "CreateNew", "void ::CreateNew(EditBox editBox, Size clientSize, const char * name, const char * inherit)", 0, 1);
6728 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::SetActiveDesigner", "void ecere::com::SetActiveDesigner(ecere::com::DesignerBase designer)", __ecereNameSpace__ecere__com__SetActiveDesigner, module, 4);
6729 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::GetActiveDesigner", "ecere::com::DesignerBase ecere::com::GetActiveDesigner(void)", __ecereNameSpace__ecere__com__GetActiveDesigner, module, 4);
6730 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::com::eSystem_SetPoolingDisabled", "void ecere::com::eSystem_SetPoolingDisabled(bool disabled)", __ecereNameSpace__ecere__com__eSystem_SetPoolingDisabled, module, 4);
6731 __ecereNameSpace__ecere__com__eSystem_RegisterDefine("ecere::sys::LEAD_OFFSET", "0xD800 - (0x10000 >> 10)", module, 2);
6732 __ecereNameSpace__ecere__com__eSystem_RegisterDefine("ecere::sys::SURROGATE_OFFSET", "0x10000 - (0xD800 << 10) - 0xDC00", module, 2);
6733 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::sys::UTF8Validate", "bool ecere::sys::UTF8Validate(const char * source)", __ecereNameSpace__ecere__sys__UTF8Validate, module, 4);
6734 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::sys::ISO8859_1toUTF8", "int ecere::sys::ISO8859_1toUTF8(const char * source, char * dest, int max)", __ecereNameSpace__ecere__sys__ISO8859_1toUTF8, module, 4);
6735 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::sys::UTF16toUTF8", "char * ecere::sys::UTF16toUTF8(const uint16 * source)", __ecereNameSpace__ecere__sys__UTF16toUTF8, module, 4);
6736 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::sys::UTF16toUTF8Buffer", "int ecere::sys::UTF16toUTF8Buffer(const uint16 * source, char * dest, int max)", __ecereNameSpace__ecere__sys__UTF16toUTF8Buffer, module, 4);
6737 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::sys::UTF8GetChar", "ecere::com::unichar ecere::sys::UTF8GetChar(const char * string, int * numBytes)", __ecereNameSpace__ecere__sys__UTF8GetChar, module, 4);
6738 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::sys::UTF8toUTF16Buffer", "int ecere::sys::UTF8toUTF16Buffer(const char * source, uint16 * dest, int max)", __ecereNameSpace__ecere__sys__UTF8toUTF16Buffer, module, 4);
6739 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::sys::UTF32toUTF8Len", "int ecere::sys::UTF32toUTF8Len(const ecere::com::unichar * source, int count, char * dest, int max)", __ecereNameSpace__ecere__sys__UTF32toUTF8Len, module, 4);
6740 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::sys::UTF8toUTF16", "uint16 * ecere::sys::UTF8toUTF16(const char * source, int * wordCount)", __ecereNameSpace__ecere__sys__UTF8toUTF16, module, 4);
6741 }
6742
6743 void __ecereUnregisterModule_instance(struct __ecereNameSpace__ecere__com__Instance * module)
6744 {
6745
6746 __ecerePropM___ecereNameSpace__ecere__com__DesignerBase_classDesigner = (void *)0;
6747 __ecerePropM___ecereNameSpace__ecere__com__DesignerBase_objectClass = (void *)0;
6748 __ecerePropM___ecereNameSpace__ecere__com__DesignerBase_isDragging = (void *)0;
6749 }
6750