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