2 typedef long long int64;
3 typedef unsigned long long uint64;
7 #elif defined(__TINYC__)
9 #define __builtin_va_list va_list
10 #define __builtin_va_start va_start
11 #define __builtin_va_end va_end
13 #define strcasecmp stricmp
14 #define strncasecmp strnicmp
15 #define __declspec(x) __attribute__((x))
19 typedef long long int64;
20 typedef unsigned long long uint64;
22 typedef __int64 int64;
23 typedef unsigned __int64 uint64;
26 #define __ENDIAN_PAD(x) (8 - (x))
28 #define __ENDIAN_PAD(x) 0
32 #if defined(_W64) || (defined(__WORDSIZE) && __WORDSIZE == 8) || defined(__x86_64__)
38 #define arch_PointerSize sizeof(void *)
39 #define structSize_Instance (_64BIT ? 24 : 12)
41 extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size);
43 extern void * __ecereNameSpace__ecere__com__eSystem_New0(unsigned int size);
45 extern void * __ecereNameSpace__ecere__com__eSystem_Renew(void * memory, unsigned int size);
47 extern void * __ecereNameSpace__ecere__com__eSystem_Renew0(void * memory, unsigned int size);
49 struct __ecereNameSpace__ecere__sys__BTNode
52 struct __ecereNameSpace__ecere__sys__BTNode * parent, * left, * right;
54 } __attribute__ ((gcc_struct));
56 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__BTNode;
58 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__BinaryTree;
60 struct __ecereNameSpace__ecere__sys__BinaryTree
62 struct __ecereNameSpace__ecere__sys__BTNode * root;
64 int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
65 void (* FreeKey)(void * key);
66 } __attribute__ ((gcc_struct));
68 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__OldList;
70 struct __ecereNameSpace__ecere__sys__OldList
77 } __attribute__ ((gcc_struct));
79 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Class;
81 struct __ecereNameSpace__ecere__com__Class
83 struct __ecereNameSpace__ecere__com__Class * prev;
84 struct __ecereNameSpace__ecere__com__Class * next;
90 int (* Constructor)(struct __ecereNameSpace__ecere__com__Instance *);
91 void (* Destructor)(struct __ecereNameSpace__ecere__com__Instance *);
94 struct __ecereNameSpace__ecere__com__Class * base;
95 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
96 struct __ecereNameSpace__ecere__sys__BinaryTree members;
97 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
98 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
99 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
100 struct __ecereNameSpace__ecere__sys__OldList derivatives;
104 struct __ecereNameSpace__ecere__com__Instance * module;
105 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
106 char * dataTypeString;
107 struct __ecereNameSpace__ecere__com__Instance * dataType;
109 int defaultAlignment;
110 void (* Initialize)();
112 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
113 char * designerClass;
114 unsigned int noExpansion;
115 char * defaultProperty;
116 unsigned int comRedefinition;
118 unsigned int isRemote;
119 unsigned int internalDecl;
121 unsigned int computeSize;
123 int destructionWatchOffset;
125 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
126 int inheritanceAccess;
129 struct __ecereNameSpace__ecere__sys__OldList conversions;
130 struct __ecereNameSpace__ecere__sys__OldList templateParams;
131 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
132 struct __ecereNameSpace__ecere__com__Class * templateClass;
133 struct __ecereNameSpace__ecere__sys__OldList templatized;
135 } __attribute__ ((gcc_struct));
137 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, char * name);
139 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Instance;
141 struct __ecereNameSpace__ecere__com__Instance
144 struct __ecereNameSpace__ecere__com__Class * _class;
146 } __attribute__ ((gcc_struct));
148 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Property;
150 struct __ecereNameSpace__ecere__com__Property
152 struct __ecereNameSpace__ecere__com__Property * prev;
153 struct __ecereNameSpace__ecere__com__Property * next;
155 unsigned int isProperty;
158 struct __ecereNameSpace__ecere__com__Class * _class;
159 char * dataTypeString;
160 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
161 struct __ecereNameSpace__ecere__com__Instance * dataType;
162 void (* Set)(void * , int);
163 int (* Get)(void * );
164 unsigned int (* IsSet)(void * );
168 unsigned int conversion;
169 unsigned int watcherOffset;
171 unsigned int compiled;
172 unsigned int selfWatchable;
173 unsigned int isWatchable;
174 } __attribute__ ((gcc_struct));
176 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataMember;
178 struct __ecereNameSpace__ecere__com__DataMember
180 struct __ecereNameSpace__ecere__com__DataMember * prev;
181 struct __ecereNameSpace__ecere__com__DataMember * next;
183 unsigned int isProperty;
186 struct __ecereNameSpace__ecere__com__Class * _class;
187 char * dataTypeString;
188 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
189 struct __ecereNameSpace__ecere__com__Instance * dataType;
193 struct __ecereNameSpace__ecere__sys__OldList members;
194 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
197 } __attribute__ ((gcc_struct));
199 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Method;
201 struct __ecereNameSpace__ecere__com__Method
204 struct __ecereNameSpace__ecere__com__Method * parent;
205 struct __ecereNameSpace__ecere__com__Method * left;
206 struct __ecereNameSpace__ecere__com__Method * right;
211 struct __ecereNameSpace__ecere__com__Class * _class;
213 char * dataTypeString;
214 struct __ecereNameSpace__ecere__com__Instance * dataType;
216 } __attribute__ ((gcc_struct));
218 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__SerialBuffer;
220 struct __ecereNameSpace__ecere__com__SerialBuffer
222 unsigned char * _buffer;
226 } __attribute__ ((gcc_struct));
228 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataValue;
230 struct __ecereNameSpace__ecere__com__DataValue
245 } __attribute__ ((gcc_struct));
246 } __attribute__ ((gcc_struct));
248 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassTemplateArgument;
250 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
256 char * dataTypeString;
257 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
258 } __attribute__ ((gcc_struct));
259 struct __ecereNameSpace__ecere__com__DataValue expression;
265 struct __ecereNameSpace__ecere__com__DataMember * member;
266 struct __ecereNameSpace__ecere__com__Property * prop;
267 struct __ecereNameSpace__ecere__com__Method * method;
268 } __attribute__ ((gcc_struct));
269 } __attribute__ ((gcc_struct));
270 } __attribute__ ((gcc_struct));
271 } __attribute__ ((gcc_struct));
273 typedef __builtin_va_list va_list;
275 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TreePrintStyle;
277 extern int vsprintf(char * , const char * , __builtin_va_list);
279 extern int strlen(const char * );
281 void __ecereNameSpace__ecere__sys__strcatf(char * string, char * format, ...)
285 __builtin_va_start(args, format);
286 vsprintf(string + strlen(string), format, args);
287 __builtin_va_end(args);
290 static struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BTNode_prev, * __ecerePropM___ecereNameSpace__ecere__sys__BTNode_prev;
292 static struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BTNode_next, * __ecerePropM___ecereNameSpace__ecere__sys__BTNode_next;
294 static struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BTNode_count, * __ecerePropM___ecereNameSpace__ecere__sys__BTNode_count;
296 static struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BTNode_balanceFactor, * __ecerePropM___ecereNameSpace__ecere__sys__BTNode_balanceFactor;
298 void __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Serialize(struct __ecereNameSpace__ecere__com__Instance * this, struct __ecereNameSpace__ecere__com__Class * class, void * data);
300 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_bool;
302 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_uintptr;
304 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_uint;
306 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_OnSerialize(struct __ecereNameSpace__ecere__com__Class * class, struct __ecereNameSpace__ecere__sys__BTNode * this, struct __ecereNameSpace__ecere__com__Instance * channel)
308 if((struct __ecereNameSpace__ecere__sys__BTNode *)this)
310 unsigned int truth = 0x1;
312 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Serialize(channel, __ecereClass_bool, &truth);
313 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Serialize(channel, __ecereClass_uintptr, &this->key);
314 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Serialize(channel, __ecereClass___ecereNameSpace__ecere__sys__BTNode, this->left);
315 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Serialize(channel, __ecereClass___ecereNameSpace__ecere__sys__BTNode, this->right);
319 unsigned int nothing = 0;
321 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Serialize(channel, __ecereClass_uint, ¬hing);
325 extern void * __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
327 void __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Unserialize(struct __ecereNameSpace__ecere__com__Instance * this, struct __ecereNameSpace__ecere__com__Class * class, void * * data);
329 int __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_depthProp(struct __ecereNameSpace__ecere__sys__BTNode * this);
331 static struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BTNode_depthProp, * __ecerePropM___ecereNameSpace__ecere__sys__BTNode_depthProp;
333 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_OnUnserialize(struct __ecereNameSpace__ecere__com__Class * class, struct __ecereNameSpace__ecere__sys__BTNode ** this, struct __ecereNameSpace__ecere__com__Instance * channel)
337 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Unserialize(channel, __ecereClass_bool, &truth);
340 (*(this)) = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__BTNode);
341 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Unserialize(channel, __ecereClass_uintptr, &(*(this))->key);
342 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Unserialize(channel, __ecereClass___ecereNameSpace__ecere__sys__BTNode, &(*(this))->left);
345 (*(this))->left->parent = (void *)*(struct __ecereNameSpace__ecere__sys__BTNode **)this;
347 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Unserialize(channel, __ecereClass___ecereNameSpace__ecere__sys__BTNode, &(*(this))->right);
350 (*(this))->right->parent = (void *)*(struct __ecereNameSpace__ecere__sys__BTNode **)this;
352 (*(this))->depth = __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_depthProp(((struct __ecereNameSpace__ecere__sys__BTNode *)(void *)*(struct __ecereNameSpace__ecere__sys__BTNode **)this));
355 (*(this)) = (((void *)0));
358 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_maximum(struct __ecereNameSpace__ecere__sys__BTNode * this);
360 static struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BTNode_maximum, * __ecerePropM___ecereNameSpace__ecere__sys__BTNode_maximum;
362 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_prev(struct __ecereNameSpace__ecere__sys__BTNode * this)
365 return __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_maximum(this->left);
368 if(this->parent && this == this->parent->right)
376 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_minimum(struct __ecereNameSpace__ecere__sys__BTNode * this);
378 static struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BTNode_minimum, * __ecerePropM___ecereNameSpace__ecere__sys__BTNode_minimum;
380 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(struct __ecereNameSpace__ecere__sys__BTNode * this)
382 struct __ecereNameSpace__ecere__sys__BTNode * right = this->right;
385 return __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_minimum(right);
388 struct __ecereNameSpace__ecere__sys__BTNode * parent = this->parent;
390 if(parent && this == parent->left)
395 return (((void *)0));
398 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_minimum(struct __ecereNameSpace__ecere__sys__BTNode * this)
405 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_maximum(struct __ecereNameSpace__ecere__sys__BTNode * this)
412 int __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_count(struct __ecereNameSpace__ecere__sys__BTNode * this)
414 return 1 + (this->left ? __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_count(this->left) : 0) + (this->right ? __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_count(this->right) : 0);
417 int __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_depthProp(struct __ecereNameSpace__ecere__sys__BTNode * this)
419 int leftDepth = this->left ? (__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_depthProp(this->left) + 1) : 0;
420 int rightDepth = this->right ? (__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_depthProp(this->right) + 1) : 0;
422 return ((leftDepth > rightDepth) ? leftDepth : rightDepth);
425 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Free(struct __ecereNameSpace__ecere__sys__BTNode * this, void (* FreeKey)(void * key))
428 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Free(this->left, FreeKey);
430 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Free(this->right, FreeKey);
432 FreeKey((void *)this->key);
433 ((this ? (__ecereClass___ecereNameSpace__ecere__sys__BTNode->Destructor ? __ecereClass___ecereNameSpace__ecere__sys__BTNode->Destructor(this) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(this)) : 0), this = 0);
436 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Add(struct __ecereNameSpace__ecere__sys__BTNode * this, struct __ecereNameSpace__ecere__sys__BinaryTree * tree, struct __ecereNameSpace__ecere__sys__BTNode * node)
438 uintptr_t newKey = node->key;
442 int result = tree->CompareKey(tree, newKey, this->key);
458 struct __ecereNameSpace__ecere__sys__BTNode * n;
460 for(n = this; n; n = n->parent)
462 int __simpleStruct0, __simpleStruct1;
463 int newDepth = (__simpleStruct0 = n->left ? (n->left->depth + 1) : 0, __simpleStruct1 = n->right ? (n->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
465 if(newDepth == n->depth)
483 struct __ecereNameSpace__ecere__sys__BTNode * n;
485 for(n = this; n; n = n->parent)
487 int __simpleStruct0, __simpleStruct1;
488 int newDepth = (__simpleStruct0 = n->left ? (n->left->depth + 1) : 0, __simpleStruct1 = n->right ? (n->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
490 if(newDepth == n->depth)
501 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindNode(struct __ecereNameSpace__ecere__sys__BTNode * this, struct __ecereNameSpace__ecere__sys__BTNode * node)
505 else if(this->left && __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindNode(this->left, node))
507 else if(this->right && __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindNode(this->right, node))
512 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Find(struct __ecereNameSpace__ecere__sys__BTNode * this, struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t key)
516 int result = tree->CompareKey(tree, key, this->key);
528 extern int strcmp(const char * , const char * );
530 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindString(struct __ecereNameSpace__ecere__sys__BTNode * this, char * key)
537 result = strcmp(key, (char *)this->key);
538 else if(key && !this->key)
540 else if(!key && this->key)
554 extern int strncmp(const char * , const char * , int n);
556 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindPrefix(struct __ecereNameSpace__ecere__sys__BTNode * this, char * key)
558 struct __ecereNameSpace__ecere__sys__BTNode * subString = (((void *)0));
559 int len = key ? strlen(key) : 0;
566 result = strcmp(key, (char *)this->key);
567 else if(key && !this->key)
569 else if(!key && this->key)
575 if(!strncmp(key, (char *)this->key, len))
590 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindAll(struct __ecereNameSpace__ecere__sys__BTNode * this, uintptr_t key)
592 struct __ecereNameSpace__ecere__sys__BTNode * result = (((void *)0));
596 if(!result && this->left)
597 result = __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindAll(this->left, key);
598 if(!result && this->right)
599 result = __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindAll(this->right, key);
603 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_RemoveSwap(struct __ecereNameSpace__ecere__sys__BTNode * this, struct __ecereNameSpace__ecere__sys__BTNode * swap)
607 swap->left->parent = swap->parent;
608 if(swap == swap->parent->left)
609 swap->parent->left = swap->left;
610 else if(swap == swap->parent->right)
611 swap->parent->right = swap->left;
612 swap->left = (((void *)0));
616 swap->right->parent = swap->parent;
617 if(swap == swap->parent->left)
618 swap->parent->left = swap->right;
619 else if(swap == swap->parent->right)
620 swap->parent->right = swap->right;
621 swap->right = (((void *)0));
623 if(swap == swap->parent->left)
624 swap->parent->left = (((void *)0));
625 else if(swap == swap->parent->right)
626 swap->parent->right = (((void *)0));
628 struct __ecereNameSpace__ecere__sys__BTNode * n;
630 for(n = swap->parent; n; n = n->parent)
632 int __simpleStruct0, __simpleStruct1;
633 int newDepth = (__simpleStruct0 = n->left ? (n->left->depth + 1) : 0, __simpleStruct1 = n->right ? (n->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
635 if(newDepth == n->depth)
643 swap->left = this->left;
645 this->left->parent = swap;
648 swap->right = this->right;
650 this->right->parent = swap;
652 swap->parent = this->parent;
653 this->left = (((void *)0));
654 this->right = (((void *)0));
657 if(this == this->parent->left)
658 this->parent->left = swap;
659 else if(this == this->parent->right)
660 this->parent->right = swap;
664 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Rebalance();
666 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BTNode_RemoveSwapLeft(struct __ecereNameSpace__ecere__sys__BTNode * this)
668 struct __ecereNameSpace__ecere__sys__BTNode * swap = this->left ? __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_maximum(this->left) : this->right;
669 struct __ecereNameSpace__ecere__sys__BTNode * swapParent = (((void *)0));
673 swapParent = swap->parent;
674 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_RemoveSwap(this, swap);
678 if(this == this->parent->left)
679 this->parent->left = (((void *)0));
680 else if(this == this->parent->right)
681 this->parent->right = (((void *)0));
684 struct __ecereNameSpace__ecere__sys__BTNode * n;
686 for(n = swap ? swap : this->parent; n; n = n->parent)
688 int __simpleStruct0, __simpleStruct1;
689 int newDepth = (__simpleStruct0 = n->left ? (n->left->depth + 1) : 0, __simpleStruct1 = n->right ? (n->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
691 if(newDepth == n->depth && n != swap)
696 if(swapParent && swapParent != this)
697 return __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Rebalance(swapParent);
699 return __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Rebalance(swap);
700 else if(this->parent)
701 return __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Rebalance(this->parent);
703 return (((void *)0));
706 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BTNode_RemoveSwapRight(struct __ecereNameSpace__ecere__sys__BTNode * this)
708 struct __ecereNameSpace__ecere__sys__BTNode * result;
709 struct __ecereNameSpace__ecere__sys__BTNode * swap = this->right ? __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_minimum(this->right) : this->left;
710 struct __ecereNameSpace__ecere__sys__BTNode * swapParent = (((void *)0));
714 swapParent = swap->parent;
715 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_RemoveSwap(this, swap);
719 if(this == this->parent->left)
720 this->parent->left = (((void *)0));
721 else if(this == this->parent->right)
722 this->parent->right = (((void *)0));
725 struct __ecereNameSpace__ecere__sys__BTNode * n;
727 for(n = swap ? swap : this->parent; n; n = n->parent)
729 int __simpleStruct0, __simpleStruct1;
730 int newDepth = (__simpleStruct0 = n->left ? (n->left->depth + 1) : 0, __simpleStruct1 = n->right ? (n->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
732 if(newDepth == n->depth && n != swap)
737 if(swapParent && swapParent != this)
738 result = __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Rebalance(swapParent);
740 result = __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Rebalance(swap);
741 else if(this->parent)
742 result = __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Rebalance(this->parent);
744 result = (((void *)0));
748 int __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_balanceFactor(struct __ecereNameSpace__ecere__sys__BTNode * this)
750 int leftDepth = this->left ? (this->left->depth + 1) : 0;
751 int rightDepth = this->right ? (this->right->depth + 1) : 0;
753 return rightDepth - leftDepth;
756 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_DoubleRotateRight();
758 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateRight();
760 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_DoubleRotateLeft();
762 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateLeft();
764 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Rebalance(struct __ecereNameSpace__ecere__sys__BTNode * this)
768 int factor = __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_balanceFactor(this);
772 if(__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_balanceFactor(this->left) == 1)
773 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_DoubleRotateRight(this);
775 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateRight(this);
779 if(__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_balanceFactor(this->right) == -1)
780 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_DoubleRotateLeft(this);
782 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateLeft(this);
791 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateRight(struct __ecereNameSpace__ecere__sys__BTNode * this)
793 int __simpleStruct2, __simpleStruct3;
794 int __simpleStruct0, __simpleStruct1;
798 if(this == this->parent->left)
799 this->parent->left = this->left;
800 else if(this == this->parent->right)
801 this->parent->right = this->left;
803 this->left->parent = this->parent;
804 this->parent = this->left;
805 this->left = this->parent->right;
807 this->left->parent = this;
808 this->parent->right = this;
809 this->depth = (__simpleStruct0 = this->left ? (this->left->depth + 1) : 0, __simpleStruct1 = this->right ? (this->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
810 this->parent->depth = (__simpleStruct2 = this->parent->left ? (this->parent->left->depth + 1) : 0, __simpleStruct3 = this->parent->right ? (this->parent->right->depth + 1) : 0, (__simpleStruct2 > __simpleStruct3) ? __simpleStruct2 : __simpleStruct3);
812 struct __ecereNameSpace__ecere__sys__BTNode * n;
814 for(n = this->parent->parent; n; n = n->parent)
816 int __simpleStruct0, __simpleStruct1;
817 int newDepth = (__simpleStruct0 = n->left ? (n->left->depth + 1) : 0, __simpleStruct1 = n->right ? (n->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
819 if(newDepth == n->depth)
826 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateLeft(struct __ecereNameSpace__ecere__sys__BTNode * this)
828 int __simpleStruct2, __simpleStruct3;
829 int __simpleStruct0, __simpleStruct1;
833 if(this == this->parent->right)
834 this->parent->right = this->right;
835 else if(this == this->parent->left)
836 this->parent->left = this->right;
838 this->right->parent = this->parent;
839 this->parent = this->right;
840 this->right = this->parent->left;
842 this->right->parent = this;
843 this->parent->left = this;
844 this->depth = (__simpleStruct0 = this->left ? (this->left->depth + 1) : 0, __simpleStruct1 = this->right ? (this->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
845 this->parent->depth = (__simpleStruct2 = this->parent->left ? (this->parent->left->depth + 1) : 0, __simpleStruct3 = this->parent->right ? (this->parent->right->depth + 1) : 0, (__simpleStruct2 > __simpleStruct3) ? __simpleStruct2 : __simpleStruct3);
847 struct __ecereNameSpace__ecere__sys__BTNode * n;
849 for(n = this->parent->parent; n; n = n->parent)
851 int __simpleStruct0, __simpleStruct1;
852 int newDepth = (__simpleStruct0 = n->left ? (n->left->depth + 1) : 0, __simpleStruct1 = n->right ? (n->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
854 if(newDepth == n->depth)
861 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_DoubleRotateRight(struct __ecereNameSpace__ecere__sys__BTNode * this)
863 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateLeft(this->left);
864 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateRight(this);
867 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_DoubleRotateLeft(struct __ecereNameSpace__ecere__sys__BTNode * this)
869 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateRight(this->right);
870 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateLeft(this);
873 extern char * strcat(char * , const char * );
875 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_PrintDepth(struct __ecereNameSpace__ecere__sys__BTNode * this, char * output, int wantedDepth, int curDepth, int maxDepth, unsigned int last);
877 char * __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Print(struct __ecereNameSpace__ecere__sys__BTNode * this, char * output, int tps)
886 __ecereNameSpace__ecere__sys__strcatf(output, "%d ", this->key);
888 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Print(this->left, output, tps);
890 __ecereNameSpace__ecere__sys__strcatf(output, "%d ", this->key);
892 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Print(this->right, output, tps);
894 __ecereNameSpace__ecere__sys__strcatf(output, "%d ", this->key);
899 int maxDepth = this->depth;
902 for(curDepth = 0; curDepth <= maxDepth; curDepth++)
906 for(c = 0; c < ((1 << (maxDepth - curDepth)) - 1) * 4 / 2; c++)
908 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_PrintDepth(this, output, curDepth, 0, maxDepth, 0x1);
909 strcat(output, "\n");
914 return (((void *)0));
917 extern int sprintf(char * , char * , ...);
919 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_PrintDepth(struct __ecereNameSpace__ecere__sys__BTNode * this, char * output, int wantedDepth, int curDepth, int maxDepth, unsigned int last)
923 if(wantedDepth == curDepth)
925 char nodeString[10] = "";
929 sprintf(nodeString, "%d", this->key);
930 len = strlen(nodeString);
931 for(c = 0; c < (4 - len) / 2; c++)
934 strcat(output, nodeString);
935 for(c = len; c < 4; c++)
937 if(curDepth && !last)
939 for(c = 0; c < ((1 << (maxDepth - curDepth)) - 1) * 4; c++)
943 else if(curDepth <= maxDepth)
945 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_PrintDepth((this ? this->left : (struct __ecereNameSpace__ecere__sys__BTNode *)(((void *)0))), output, wantedDepth, curDepth + 1, maxDepth, last && this && !this->right);
946 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_PrintDepth((this ? this->right : (struct __ecereNameSpace__ecere__sys__BTNode *)(((void *)0))), output, wantedDepth, curDepth + 1, maxDepth, last);
950 extern int printf(char * , ...);
952 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Check(struct __ecereNameSpace__ecere__sys__BTNode * this, struct __ecereNameSpace__ecere__sys__BinaryTree * tree)
954 unsigned int valid = 0x1;
955 int leftHeight = this->left ? __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_depthProp(this->left) + 1 : 0;
956 int rightHeight = this->right ? __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_depthProp(this->right) + 1 : 0;
957 int diffHeight = rightHeight - leftHeight;
961 if(this->left->parent != this)
963 printf("Parent not set properly at node %d\n", this->left->key);
966 valid *= __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Check(this->left, tree);
970 if(this->right->parent != this)
972 printf("Parent not set properly at node %d\n", this->right->key);
975 valid *= __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Check(this->right, tree);
977 if(this->depth != __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_depthProp(this))
979 printf("Depth value at node %d (%d) doesn't match depth property (%d)\n", this->key, this->depth, __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_depthProp(this));
980 valid = (unsigned int)0;
982 if(diffHeight < -1 || diffHeight > 1)
984 valid = (unsigned int)0;
985 printf("Height difference is %d at node %d\n", diffHeight, this->key);
987 if(diffHeight != __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_balanceFactor(this))
989 valid = (unsigned int)0;
990 printf("Height difference %d doesnt match balance-factor of %d at node \n", diffHeight, __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_balanceFactor(this), this->key);
992 if(this->left && tree->CompareKey(tree, this->left->key, this->key) > 0)
995 printf("Node %d is *smaller* than left subtree %d\n", this->key, this->left->key);
997 if(this->right && tree->CompareKey(tree, this->right->key, this->key) < 0)
1000 printf("Node %d is *greater* than right subtree %d\n", this->key, this->right->key);
1005 struct __ecereNameSpace__ecere__sys__StringBTNode
1008 struct __ecereNameSpace__ecere__sys__StringBTNode * parent, * left, * right;
1010 } __attribute__ ((gcc_struct));
1012 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__StringBTNode;
1014 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_String;
1016 void __ecereMethod___ecereNameSpace__ecere__sys__StringBTNode_OnSerialize(struct __ecereNameSpace__ecere__com__Class * class, struct __ecereNameSpace__ecere__sys__StringBTNode * this, struct __ecereNameSpace__ecere__com__Instance * channel)
1018 if((struct __ecereNameSpace__ecere__sys__StringBTNode *)this)
1020 unsigned int truth = 0x1;
1022 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Serialize(channel, __ecereClass_bool, &truth);
1023 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Serialize(channel, __ecereClass_String, this->key);
1024 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Serialize(channel, __ecereClass___ecereNameSpace__ecere__sys__StringBTNode, this->left);
1025 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Serialize(channel, __ecereClass___ecereNameSpace__ecere__sys__StringBTNode, this->right);
1029 unsigned int nothing = 0;
1031 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Serialize(channel, __ecereClass_uint, ¬hing);
1035 void __ecereMethod___ecereNameSpace__ecere__sys__StringBTNode_OnUnserialize(struct __ecereNameSpace__ecere__com__Class * class, struct __ecereNameSpace__ecere__sys__StringBTNode ** this, struct __ecereNameSpace__ecere__com__Instance * channel)
1039 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Unserialize(channel, __ecereClass_bool, &truth);
1042 (*(this)) = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__StringBTNode);
1043 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Unserialize(channel, __ecereClass_String, &(*(this))->key);
1044 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Unserialize(channel, __ecereClass___ecereNameSpace__ecere__sys__StringBTNode, &(*(this))->left);
1047 (*(this))->left->parent = (void *)*(struct __ecereNameSpace__ecere__sys__StringBTNode **)this;
1049 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Unserialize(channel, __ecereClass___ecereNameSpace__ecere__sys__StringBTNode, &(*(this))->right);
1050 if((*(this))->right)
1052 (*(this))->right->parent = (void *)*(struct __ecereNameSpace__ecere__sys__StringBTNode **)this;
1054 (*(this))->depth = __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_depthProp(((struct __ecereNameSpace__ecere__sys__BTNode *)((void *)*(struct __ecereNameSpace__ecere__sys__StringBTNode **)this)));
1057 (*(this)) = (((void *)0));
1060 extern struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_RegisterClass(int type, char * name, char * baseName, int size, int sizeClass, unsigned int (* )(void * ), void (* )(void * ), struct __ecereNameSpace__ecere__com__Instance * module, int declMode, int inheritanceAccess);
1062 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__NameSpace;
1064 struct __ecereNameSpace__ecere__com__NameSpace
1067 struct __ecereNameSpace__ecere__com__NameSpace * btParent;
1068 struct __ecereNameSpace__ecere__com__NameSpace * left;
1069 struct __ecereNameSpace__ecere__com__NameSpace * right;
1071 struct __ecereNameSpace__ecere__com__NameSpace * parent;
1072 struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
1073 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
1074 struct __ecereNameSpace__ecere__sys__BinaryTree defines;
1075 struct __ecereNameSpace__ecere__sys__BinaryTree functions;
1076 } __attribute__ ((gcc_struct));
1078 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Module;
1080 struct __ecereNameSpace__ecere__com__Module
1082 struct __ecereNameSpace__ecere__com__Instance * application;
1083 struct __ecereNameSpace__ecere__sys__OldList classes;
1084 struct __ecereNameSpace__ecere__sys__OldList defines;
1085 struct __ecereNameSpace__ecere__sys__OldList functions;
1086 struct __ecereNameSpace__ecere__sys__OldList modules;
1087 struct __ecereNameSpace__ecere__com__Instance * prev;
1088 struct __ecereNameSpace__ecere__com__Instance * next;
1094 struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
1095 struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
1096 } __attribute__ ((gcc_struct));
1098 extern struct __ecereNameSpace__ecere__com__Instance * __thisModule;
1100 extern void __ecereNameSpace__ecere__com__eEnum_AddFixedValue(struct __ecereNameSpace__ecere__com__Class * _class, char * string, int value);
1102 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__GlobalFunction;
1104 struct __ecereNameSpace__ecere__com__GlobalFunction;
1106 extern struct __ecereNameSpace__ecere__com__GlobalFunction * __ecereNameSpace__ecere__com__eSystem_RegisterFunction(char * name, char * type, void * func, struct __ecereNameSpace__ecere__com__Instance * module, int declMode);
1108 extern struct __ecereNameSpace__ecere__com__Method * __ecereNameSpace__ecere__com__eClass_AddMethod(struct __ecereNameSpace__ecere__com__Class * _class, char * name, char * type, void * function, int declMode);
1110 extern struct __ecereNameSpace__ecere__com__DataMember * __ecereNameSpace__ecere__com__eClass_AddDataMember(struct __ecereNameSpace__ecere__com__Class * _class, char * name, char * type, unsigned int size, unsigned int alignment, int declMode);
1112 extern struct __ecereNameSpace__ecere__com__Property * __ecereNameSpace__ecere__com__eClass_AddProperty(struct __ecereNameSpace__ecere__com__Class * _class, char * name, char * dataType, void * setStmt, void * getStmt, int declMode);
1114 void __ecereRegisterModule_BTNode(struct __ecereNameSpace__ecere__com__Instance * module)
1116 struct __ecereNameSpace__ecere__com__Class * class;
1118 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(4, "ecere::sys::TreePrintStyle", 0, 0, 0, 0, 0, module, 4, 1);
1119 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
1120 __ecereClass___ecereNameSpace__ecere__sys__TreePrintStyle = class;
1121 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "inOrder", 0);
1122 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "postOrder", 1);
1123 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "preOrder", 2);
1124 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "depthOrder", 3);
1125 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::sys::strcatf", "void ecere::sys::strcatf(char * string, char * format, ...)", __ecereNameSpace__ecere__sys__strcatf, module, 4);
1126 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "ecere::sys::BTNode", 0, sizeof(struct __ecereNameSpace__ecere__sys__BTNode), 0, 0, 0, module, 4, 1);
1127 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
1128 __ecereClass___ecereNameSpace__ecere__sys__BTNode = class;
1129 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "OnSerialize", 0, __ecereMethod___ecereNameSpace__ecere__sys__BTNode_OnSerialize, 1);
1130 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "OnUnserialize", 0, __ecereMethod___ecereNameSpace__ecere__sys__BTNode_OnUnserialize, 1);
1131 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "FindPrefix", "ecere::sys::BTNode FindPrefix(char * key)", __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindPrefix, 1);
1132 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "FindString", "ecere::sys::BTNode FindString(char * key)", __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindString, 1);
1133 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "key", "uintptr", arch_PointerSize, arch_PointerSize, 1);
1134 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "parent", "ecere::sys::BTNode", arch_PointerSize, arch_PointerSize, 1);
1135 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "left", "ecere::sys::BTNode", arch_PointerSize, arch_PointerSize, 1);
1136 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "right", "ecere::sys::BTNode", arch_PointerSize, arch_PointerSize, 1);
1137 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "depth", "int", 4, 4, 1);
1138 __ecerePropM___ecereNameSpace__ecere__sys__BTNode_prev = __ecereNameSpace__ecere__com__eClass_AddProperty(class, "prev", "ecere::sys::BTNode", 0, __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_prev, 1);
1139 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application)
1140 __ecereProp___ecereNameSpace__ecere__sys__BTNode_prev = __ecerePropM___ecereNameSpace__ecere__sys__BTNode_prev, __ecerePropM___ecereNameSpace__ecere__sys__BTNode_prev = (void *)0;
1141 __ecerePropM___ecereNameSpace__ecere__sys__BTNode_next = __ecereNameSpace__ecere__com__eClass_AddProperty(class, "next", "ecere::sys::BTNode", 0, __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next, 1);
1142 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application)
1143 __ecereProp___ecereNameSpace__ecere__sys__BTNode_next = __ecerePropM___ecereNameSpace__ecere__sys__BTNode_next, __ecerePropM___ecereNameSpace__ecere__sys__BTNode_next = (void *)0;
1144 __ecerePropM___ecereNameSpace__ecere__sys__BTNode_minimum = __ecereNameSpace__ecere__com__eClass_AddProperty(class, "minimum", "ecere::sys::BTNode", 0, __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_minimum, 1);
1145 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application)
1146 __ecereProp___ecereNameSpace__ecere__sys__BTNode_minimum = __ecerePropM___ecereNameSpace__ecere__sys__BTNode_minimum, __ecerePropM___ecereNameSpace__ecere__sys__BTNode_minimum = (void *)0;
1147 __ecerePropM___ecereNameSpace__ecere__sys__BTNode_maximum = __ecereNameSpace__ecere__com__eClass_AddProperty(class, "maximum", "ecere::sys::BTNode", 0, __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_maximum, 1);
1148 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application)
1149 __ecereProp___ecereNameSpace__ecere__sys__BTNode_maximum = __ecerePropM___ecereNameSpace__ecere__sys__BTNode_maximum, __ecerePropM___ecereNameSpace__ecere__sys__BTNode_maximum = (void *)0;
1150 __ecerePropM___ecereNameSpace__ecere__sys__BTNode_count = __ecereNameSpace__ecere__com__eClass_AddProperty(class, "count", "int", 0, __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_count, 1);
1151 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application)
1152 __ecereProp___ecereNameSpace__ecere__sys__BTNode_count = __ecerePropM___ecereNameSpace__ecere__sys__BTNode_count, __ecerePropM___ecereNameSpace__ecere__sys__BTNode_count = (void *)0;
1153 __ecerePropM___ecereNameSpace__ecere__sys__BTNode_depthProp = __ecereNameSpace__ecere__com__eClass_AddProperty(class, "depthProp", "int", 0, __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_depthProp, 1);
1154 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application)
1155 __ecereProp___ecereNameSpace__ecere__sys__BTNode_depthProp = __ecerePropM___ecereNameSpace__ecere__sys__BTNode_depthProp, __ecerePropM___ecereNameSpace__ecere__sys__BTNode_depthProp = (void *)0;
1156 __ecerePropM___ecereNameSpace__ecere__sys__BTNode_balanceFactor = __ecereNameSpace__ecere__com__eClass_AddProperty(class, "balanceFactor", "int", 0, __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_balanceFactor, 2);
1157 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application)
1158 __ecereProp___ecereNameSpace__ecere__sys__BTNode_balanceFactor = __ecerePropM___ecereNameSpace__ecere__sys__BTNode_balanceFactor, __ecerePropM___ecereNameSpace__ecere__sys__BTNode_balanceFactor = (void *)0;
1160 class->fixed = (unsigned int)1;
1161 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "ecere::sys::StringBTNode", 0, sizeof(struct __ecereNameSpace__ecere__sys__StringBTNode), 0, 0, 0, module, 4, 1);
1162 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
1163 __ecereClass___ecereNameSpace__ecere__sys__StringBTNode = class;
1164 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "OnSerialize", 0, __ecereMethod___ecereNameSpace__ecere__sys__StringBTNode_OnSerialize, 1);
1165 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "OnUnserialize", 0, __ecereMethod___ecereNameSpace__ecere__sys__StringBTNode_OnUnserialize, 1);
1166 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "key", "String", arch_PointerSize, arch_PointerSize, 1);
1167 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "parent", "ecere::sys::StringBTNode", arch_PointerSize, arch_PointerSize, 1);
1168 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "left", "ecere::sys::StringBTNode", arch_PointerSize, arch_PointerSize, 1);
1169 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "right", "ecere::sys::StringBTNode", arch_PointerSize, arch_PointerSize, 1);
1170 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "depth", "int", 4, 4, 1);
1172 class->fixed = (unsigned int)1;
1175 void __ecereUnregisterModule_BTNode(struct __ecereNameSpace__ecere__com__Instance * module)
1178 __ecerePropM___ecereNameSpace__ecere__sys__BTNode_prev = (void *)0;
1179 __ecerePropM___ecereNameSpace__ecere__sys__BTNode_next = (void *)0;
1180 __ecerePropM___ecereNameSpace__ecere__sys__BTNode_minimum = (void *)0;
1181 __ecerePropM___ecereNameSpace__ecere__sys__BTNode_maximum = (void *)0;
1182 __ecerePropM___ecereNameSpace__ecere__sys__BTNode_count = (void *)0;
1183 __ecerePropM___ecereNameSpace__ecere__sys__BTNode_depthProp = (void *)0;
1184 __ecerePropM___ecereNameSpace__ecere__sys__BTNode_balanceFactor = (void *)0;