1 /* Code generated from eC source file: BTNode.ec */
3 typedef long long int64;
4 typedef unsigned long long uint64;
8 #elif defined(__TINYC__)
10 #define __builtin_va_list va_list
11 #define __builtin_va_start va_start
12 #define __builtin_va_end va_end
14 #define strcasecmp stricmp
15 #define strncasecmp strnicmp
16 #define __declspec(x) __attribute__((x))
20 typedef long long int64;
21 typedef unsigned long long uint64;
23 typedef __int64 int64;
24 typedef unsigned __int64 uint64;
27 #define __ENDIAN_PAD(x) (8 - (x))
29 #define __ENDIAN_PAD(x) 0
32 #include <sys/types.h>
34 #if /*defined(_W64) || */(defined(__WORDSIZE) && __WORDSIZE == 8) || defined(__x86_64__)
40 #define arch_PointerSize sizeof(void *)
41 #define structSize_Instance (_64BIT ? 24 : 12)
43 extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size);
45 extern void * __ecereNameSpace__ecere__com__eSystem_New0(unsigned int size);
47 extern void * __ecereNameSpace__ecere__com__eSystem_Renew(void * memory, unsigned int size);
49 extern void * __ecereNameSpace__ecere__com__eSystem_Renew0(void * memory, unsigned int size);
51 struct __ecereNameSpace__ecere__sys__BTNode
54 struct __ecereNameSpace__ecere__sys__BTNode * parent, * left, * right;
56 } __attribute__ ((gcc_struct));
58 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__BTNode;
60 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__BinaryTree;
62 struct __ecereNameSpace__ecere__sys__BinaryTree
64 struct __ecereNameSpace__ecere__sys__BTNode * root;
66 int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
67 void (* FreeKey)(void * key);
68 } __attribute__ ((gcc_struct));
70 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__OldList;
72 struct __ecereNameSpace__ecere__sys__OldList
79 } __attribute__ ((gcc_struct));
81 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Class;
83 struct __ecereNameSpace__ecere__com__Class
85 struct __ecereNameSpace__ecere__com__Class * prev;
86 struct __ecereNameSpace__ecere__com__Class * next;
92 int (* Constructor)(struct __ecereNameSpace__ecere__com__Instance *);
93 void (* Destructor)(struct __ecereNameSpace__ecere__com__Instance *);
96 struct __ecereNameSpace__ecere__com__Class * base;
97 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
98 struct __ecereNameSpace__ecere__sys__BinaryTree members;
99 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
100 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
101 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
102 struct __ecereNameSpace__ecere__sys__OldList derivatives;
106 struct __ecereNameSpace__ecere__com__Instance * module;
107 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
108 char * dataTypeString;
109 struct __ecereNameSpace__ecere__com__Instance * dataType;
111 int defaultAlignment;
112 void (* Initialize)();
114 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
115 char * designerClass;
116 unsigned int noExpansion;
117 char * defaultProperty;
118 unsigned int comRedefinition;
120 unsigned int isRemote;
121 unsigned int internalDecl;
123 unsigned int computeSize;
125 int destructionWatchOffset;
127 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
128 int inheritanceAccess;
131 struct __ecereNameSpace__ecere__sys__OldList conversions;
132 struct __ecereNameSpace__ecere__sys__OldList templateParams;
133 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
134 struct __ecereNameSpace__ecere__com__Class * templateClass;
135 struct __ecereNameSpace__ecere__sys__OldList templatized;
137 unsigned int isInstanceClass;
138 } __attribute__ ((gcc_struct));
140 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, char * name);
142 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Instance;
144 struct __ecereNameSpace__ecere__com__Instance
147 struct __ecereNameSpace__ecere__com__Class * _class;
149 } __attribute__ ((gcc_struct));
151 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Property;
153 struct __ecereNameSpace__ecere__com__Property
155 struct __ecereNameSpace__ecere__com__Property * prev;
156 struct __ecereNameSpace__ecere__com__Property * next;
158 unsigned int isProperty;
161 struct __ecereNameSpace__ecere__com__Class * _class;
162 char * dataTypeString;
163 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
164 struct __ecereNameSpace__ecere__com__Instance * dataType;
165 void (* Set)(void * , int);
166 int (* Get)(void * );
167 unsigned int (* IsSet)(void * );
171 unsigned int conversion;
172 unsigned int watcherOffset;
174 unsigned int compiled;
175 unsigned int selfWatchable;
176 unsigned int isWatchable;
177 } __attribute__ ((gcc_struct));
179 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataMember;
181 struct __ecereNameSpace__ecere__com__DataMember
183 struct __ecereNameSpace__ecere__com__DataMember * prev;
184 struct __ecereNameSpace__ecere__com__DataMember * next;
186 unsigned int isProperty;
189 struct __ecereNameSpace__ecere__com__Class * _class;
190 char * dataTypeString;
191 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
192 struct __ecereNameSpace__ecere__com__Instance * dataType;
196 struct __ecereNameSpace__ecere__sys__OldList members;
197 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
200 } __attribute__ ((gcc_struct));
202 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Method;
204 struct __ecereNameSpace__ecere__com__Method
207 struct __ecereNameSpace__ecere__com__Method * parent;
208 struct __ecereNameSpace__ecere__com__Method * left;
209 struct __ecereNameSpace__ecere__com__Method * right;
214 struct __ecereNameSpace__ecere__com__Class * _class;
216 char * dataTypeString;
217 struct __ecereNameSpace__ecere__com__Instance * dataType;
219 } __attribute__ ((gcc_struct));
221 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__SerialBuffer;
223 struct __ecereNameSpace__ecere__com__SerialBuffer
225 unsigned char * _buffer;
229 } __attribute__ ((gcc_struct));
231 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataValue;
233 struct __ecereNameSpace__ecere__com__DataValue
248 } __attribute__ ((gcc_struct));
249 } __attribute__ ((gcc_struct));
251 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassTemplateArgument;
253 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
259 char * dataTypeString;
260 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
261 } __attribute__ ((gcc_struct));
262 struct __ecereNameSpace__ecere__com__DataValue expression;
268 struct __ecereNameSpace__ecere__com__DataMember * member;
269 struct __ecereNameSpace__ecere__com__Property * prop;
270 struct __ecereNameSpace__ecere__com__Method * method;
271 } __attribute__ ((gcc_struct));
272 } __attribute__ ((gcc_struct));
273 } __attribute__ ((gcc_struct));
274 } __attribute__ ((gcc_struct));
276 typedef __builtin_va_list va_list;
278 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TreePrintStyle;
280 extern int vsprintf(char * , const char * , __builtin_va_list);
282 extern size_t strlen(const char * );
284 void __ecereNameSpace__ecere__sys__strcatf(char * string, char * format, ...)
288 __builtin_va_start(args, format);
289 vsprintf(string + strlen(string), format, args);
290 __builtin_va_end(args);
293 static struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BTNode_prev, * __ecerePropM___ecereNameSpace__ecere__sys__BTNode_prev;
295 static struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BTNode_next, * __ecerePropM___ecereNameSpace__ecere__sys__BTNode_next;
297 static struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BTNode_count, * __ecerePropM___ecereNameSpace__ecere__sys__BTNode_count;
299 static struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BTNode_balanceFactor, * __ecerePropM___ecereNameSpace__ecere__sys__BTNode_balanceFactor;
301 void __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Serialize(struct __ecereNameSpace__ecere__com__Instance * this, struct __ecereNameSpace__ecere__com__Class * class, void * data);
303 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_bool;
305 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_uintptr;
307 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_uint;
309 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)
311 if((struct __ecereNameSpace__ecere__sys__BTNode *)this)
313 unsigned int truth = 0x1;
315 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Serialize(channel, __ecereClass_bool, &truth);
316 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Serialize(channel, __ecereClass_uintptr, this->key);
317 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Serialize(channel, __ecereClass___ecereNameSpace__ecere__sys__BTNode, this->left);
318 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Serialize(channel, __ecereClass___ecereNameSpace__ecere__sys__BTNode, this->right);
322 unsigned int nothing = 0;
324 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Serialize(channel, __ecereClass_uint, ¬hing);
328 extern void * __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
330 void __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Unserialize(struct __ecereNameSpace__ecere__com__Instance * this, struct __ecereNameSpace__ecere__com__Class * class, void * * data);
332 int __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_depthProp(struct __ecereNameSpace__ecere__sys__BTNode * this);
334 static struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BTNode_depthProp, * __ecerePropM___ecereNameSpace__ecere__sys__BTNode_depthProp;
336 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)
340 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Unserialize(channel, __ecereClass_bool, &truth);
343 (*this) = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__BTNode);
344 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Unserialize(channel, __ecereClass_uintptr, &(*this)->key);
345 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Unserialize(channel, __ecereClass___ecereNameSpace__ecere__sys__BTNode, &(*this)->left);
348 (*this)->left->parent = *(struct __ecereNameSpace__ecere__sys__BTNode **)this;
350 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Unserialize(channel, __ecereClass___ecereNameSpace__ecere__sys__BTNode, &(*this)->right);
353 (*this)->right->parent = *(struct __ecereNameSpace__ecere__sys__BTNode **)this;
355 (*this)->depth = __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_depthProp((*(struct __ecereNameSpace__ecere__sys__BTNode **)this));
358 (*this) = (((void *)0));
361 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_maximum(struct __ecereNameSpace__ecere__sys__BTNode * this);
363 static struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BTNode_maximum, * __ecerePropM___ecereNameSpace__ecere__sys__BTNode_maximum;
365 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_prev(struct __ecereNameSpace__ecere__sys__BTNode * this)
368 return __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_maximum(this->left);
371 if(this->parent && this == this->parent->right)
379 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_minimum(struct __ecereNameSpace__ecere__sys__BTNode * this);
381 static struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BTNode_minimum, * __ecerePropM___ecereNameSpace__ecere__sys__BTNode_minimum;
383 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(struct __ecereNameSpace__ecere__sys__BTNode * this)
385 struct __ecereNameSpace__ecere__sys__BTNode * right = this->right;
388 return __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_minimum(right);
391 struct __ecereNameSpace__ecere__sys__BTNode * parent = this->parent;
393 if(parent && this == parent->left)
398 return (((void *)0));
401 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_minimum(struct __ecereNameSpace__ecere__sys__BTNode * this)
408 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_maximum(struct __ecereNameSpace__ecere__sys__BTNode * this)
415 int __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_count(struct __ecereNameSpace__ecere__sys__BTNode * this)
417 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);
420 int __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_depthProp(struct __ecereNameSpace__ecere__sys__BTNode * this)
422 int leftDepth = this->left ? (__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_depthProp(this->left) + 1) : 0;
423 int rightDepth = this->right ? (__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_depthProp(this->right) + 1) : 0;
425 return ((leftDepth > rightDepth) ? leftDepth : rightDepth);
428 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Free(struct __ecereNameSpace__ecere__sys__BTNode * this, void (* FreeKey)(void * key))
431 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Free(this->left, FreeKey);
433 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Free(this->right, FreeKey);
435 FreeKey((void *)this->key);
436 ((this ? (__ecereClass___ecereNameSpace__ecere__sys__BTNode->Destructor ? __ecereClass___ecereNameSpace__ecere__sys__BTNode->Destructor(this) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(this)) : 0), this = 0);
439 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)
441 uintptr_t newKey = node->key;
445 int result = tree->CompareKey(tree, newKey, this->key);
461 struct __ecereNameSpace__ecere__sys__BTNode * n;
463 for(n = this; n; n = n->parent)
465 int __simpleStruct0, __simpleStruct1;
466 int newDepth = (__simpleStruct0 = n->left ? (n->left->depth + 1) : 0, __simpleStruct1 = n->right ? (n->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
468 if(newDepth == n->depth)
486 struct __ecereNameSpace__ecere__sys__BTNode * n;
488 for(n = this; n; n = n->parent)
490 int __simpleStruct0, __simpleStruct1;
491 int newDepth = (__simpleStruct0 = n->left ? (n->left->depth + 1) : 0, __simpleStruct1 = n->right ? (n->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
493 if(newDepth == n->depth)
504 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindNode(struct __ecereNameSpace__ecere__sys__BTNode * this, struct __ecereNameSpace__ecere__sys__BTNode * node)
508 else if(this->left && __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindNode(this->left, node))
510 else if(this->right && __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindNode(this->right, node))
515 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)
519 int result = tree->CompareKey(tree, key, this->key);
531 extern int strcmp(const char * , const char * );
533 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindString(struct __ecereNameSpace__ecere__sys__BTNode * this, char * key)
540 result = strcmp(key, (char *)this->key);
541 else if(key && !this->key)
543 else if(!key && this->key)
557 extern int strncmp(const char * , const char * , size_t n);
559 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindPrefix(struct __ecereNameSpace__ecere__sys__BTNode * this, char * key)
561 struct __ecereNameSpace__ecere__sys__BTNode * subString = (((void *)0));
562 int len = key ? strlen(key) : 0;
569 result = strcmp(key, (char *)this->key);
570 else if(key && !this->key)
572 else if(!key && this->key)
578 if(!strncmp(key, (char *)this->key, len))
593 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindAll(struct __ecereNameSpace__ecere__sys__BTNode * this, uintptr_t key)
595 struct __ecereNameSpace__ecere__sys__BTNode * result = (((void *)0));
599 if(!result && this->left)
600 result = __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindAll(this->left, key);
601 if(!result && this->right)
602 result = __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindAll(this->right, key);
606 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_RemoveSwap(struct __ecereNameSpace__ecere__sys__BTNode * this, struct __ecereNameSpace__ecere__sys__BTNode * swap)
610 swap->left->parent = swap->parent;
611 if(swap == swap->parent->left)
612 swap->parent->left = swap->left;
613 else if(swap == swap->parent->right)
614 swap->parent->right = swap->left;
615 swap->left = (((void *)0));
619 swap->right->parent = swap->parent;
620 if(swap == swap->parent->left)
621 swap->parent->left = swap->right;
622 else if(swap == swap->parent->right)
623 swap->parent->right = swap->right;
624 swap->right = (((void *)0));
626 if(swap == swap->parent->left)
627 swap->parent->left = (((void *)0));
628 else if(swap == swap->parent->right)
629 swap->parent->right = (((void *)0));
631 struct __ecereNameSpace__ecere__sys__BTNode * n;
633 for(n = swap->parent; n; n = n->parent)
635 int __simpleStruct0, __simpleStruct1;
636 int newDepth = (__simpleStruct0 = n->left ? (n->left->depth + 1) : 0, __simpleStruct1 = n->right ? (n->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
638 if(newDepth == n->depth)
646 swap->left = this->left;
648 this->left->parent = swap;
651 swap->right = this->right;
653 this->right->parent = swap;
655 swap->parent = this->parent;
656 this->left = (((void *)0));
657 this->right = (((void *)0));
660 if(this == this->parent->left)
661 this->parent->left = swap;
662 else if(this == this->parent->right)
663 this->parent->right = swap;
667 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Rebalance();
669 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BTNode_RemoveSwapLeft(struct __ecereNameSpace__ecere__sys__BTNode * this)
671 struct __ecereNameSpace__ecere__sys__BTNode * swap = this->left ? __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_maximum(this->left) : this->right;
672 struct __ecereNameSpace__ecere__sys__BTNode * swapParent = (((void *)0));
676 swapParent = swap->parent;
677 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_RemoveSwap(this, swap);
681 if(this == this->parent->left)
682 this->parent->left = (((void *)0));
683 else if(this == this->parent->right)
684 this->parent->right = (((void *)0));
687 struct __ecereNameSpace__ecere__sys__BTNode * n;
689 for(n = swap ? swap : this->parent; n; n = n->parent)
691 int __simpleStruct0, __simpleStruct1;
692 int newDepth = (__simpleStruct0 = n->left ? (n->left->depth + 1) : 0, __simpleStruct1 = n->right ? (n->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
694 if(newDepth == n->depth && n != swap)
699 if(swapParent && swapParent != this)
700 return __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Rebalance(swapParent);
702 return __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Rebalance(swap);
703 else if(this->parent)
704 return __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Rebalance(this->parent);
706 return (((void *)0));
709 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BTNode_RemoveSwapRight(struct __ecereNameSpace__ecere__sys__BTNode * this)
711 struct __ecereNameSpace__ecere__sys__BTNode * result;
712 struct __ecereNameSpace__ecere__sys__BTNode * swap = this->right ? __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_minimum(this->right) : this->left;
713 struct __ecereNameSpace__ecere__sys__BTNode * swapParent = (((void *)0));
717 swapParent = swap->parent;
718 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_RemoveSwap(this, swap);
722 if(this == this->parent->left)
723 this->parent->left = (((void *)0));
724 else if(this == this->parent->right)
725 this->parent->right = (((void *)0));
728 struct __ecereNameSpace__ecere__sys__BTNode * n;
730 for(n = swap ? swap : this->parent; n; n = n->parent)
732 int __simpleStruct0, __simpleStruct1;
733 int newDepth = (__simpleStruct0 = n->left ? (n->left->depth + 1) : 0, __simpleStruct1 = n->right ? (n->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
735 if(newDepth == n->depth && n != swap)
740 if(swapParent && swapParent != this)
741 result = __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Rebalance(swapParent);
743 result = __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Rebalance(swap);
744 else if(this->parent)
745 result = __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Rebalance(this->parent);
747 result = (((void *)0));
751 int __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_balanceFactor(struct __ecereNameSpace__ecere__sys__BTNode * this)
753 int leftDepth = this->left ? (this->left->depth + 1) : 0;
754 int rightDepth = this->right ? (this->right->depth + 1) : 0;
756 return rightDepth - leftDepth;
759 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_DoubleRotateRight();
761 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateRight();
763 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_DoubleRotateLeft();
765 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateLeft();
767 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Rebalance(struct __ecereNameSpace__ecere__sys__BTNode * this)
771 int factor = __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_balanceFactor(this);
775 if(__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_balanceFactor(this->left) == 1)
776 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_DoubleRotateRight(this);
778 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateRight(this);
782 if(__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_balanceFactor(this->right) == -1)
783 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_DoubleRotateLeft(this);
785 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateLeft(this);
794 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateRight(struct __ecereNameSpace__ecere__sys__BTNode * this)
796 int __simpleStruct2, __simpleStruct3;
797 int __simpleStruct0, __simpleStruct1;
801 if(this == this->parent->left)
802 this->parent->left = this->left;
803 else if(this == this->parent->right)
804 this->parent->right = this->left;
806 this->left->parent = this->parent;
807 this->parent = this->left;
808 this->left = this->parent->right;
810 this->left->parent = this;
811 this->parent->right = this;
812 this->depth = (__simpleStruct0 = this->left ? (this->left->depth + 1) : 0, __simpleStruct1 = this->right ? (this->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
813 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);
815 struct __ecereNameSpace__ecere__sys__BTNode * n;
817 for(n = this->parent->parent; n; n = n->parent)
819 int __simpleStruct0, __simpleStruct1;
820 int newDepth = (__simpleStruct0 = n->left ? (n->left->depth + 1) : 0, __simpleStruct1 = n->right ? (n->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
822 if(newDepth == n->depth)
829 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateLeft(struct __ecereNameSpace__ecere__sys__BTNode * this)
831 int __simpleStruct2, __simpleStruct3;
832 int __simpleStruct0, __simpleStruct1;
836 if(this == this->parent->right)
837 this->parent->right = this->right;
838 else if(this == this->parent->left)
839 this->parent->left = this->right;
841 this->right->parent = this->parent;
842 this->parent = this->right;
843 this->right = this->parent->left;
845 this->right->parent = this;
846 this->parent->left = this;
847 this->depth = (__simpleStruct0 = this->left ? (this->left->depth + 1) : 0, __simpleStruct1 = this->right ? (this->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
848 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);
850 struct __ecereNameSpace__ecere__sys__BTNode * n;
852 for(n = this->parent->parent; n; n = n->parent)
854 int __simpleStruct0, __simpleStruct1;
855 int newDepth = (__simpleStruct0 = n->left ? (n->left->depth + 1) : 0, __simpleStruct1 = n->right ? (n->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
857 if(newDepth == n->depth)
864 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_DoubleRotateRight(struct __ecereNameSpace__ecere__sys__BTNode * this)
866 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateLeft(this->left);
867 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateRight(this);
870 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_DoubleRotateLeft(struct __ecereNameSpace__ecere__sys__BTNode * this)
872 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateRight(this->right);
873 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateLeft(this);
876 extern char * strcat(char * , const char * );
878 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_PrintDepth(struct __ecereNameSpace__ecere__sys__BTNode * this, char * output, int wantedDepth, int curDepth, int maxDepth, unsigned int last);
880 char * __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Print(struct __ecereNameSpace__ecere__sys__BTNode * this, char * output, int tps)
889 __ecereNameSpace__ecere__sys__strcatf(output, "%d ", this->key);
891 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Print(this->left, output, tps);
893 __ecereNameSpace__ecere__sys__strcatf(output, "%d ", this->key);
895 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Print(this->right, output, tps);
897 __ecereNameSpace__ecere__sys__strcatf(output, "%d ", this->key);
902 int maxDepth = this->depth;
905 for(curDepth = 0; curDepth <= maxDepth; curDepth++)
909 for(c = 0; c < ((1 << (maxDepth - curDepth)) - 1) * 4 / 2; c++)
911 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_PrintDepth(this, output, curDepth, 0, maxDepth, 0x1);
912 strcat(output, "\n");
917 return (((void *)0));
920 extern int sprintf(char * , char * , ...);
922 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_PrintDepth(struct __ecereNameSpace__ecere__sys__BTNode * this, char * output, int wantedDepth, int curDepth, int maxDepth, unsigned int last)
926 if(wantedDepth == curDepth)
928 char nodeString[10] = "";
932 sprintf(nodeString, "%d", this->key);
933 len = strlen(nodeString);
934 for(c = 0; c < (4 - len) / 2; c++)
937 strcat(output, nodeString);
938 for(c = len; c < 4; c++)
940 if(curDepth && !last)
942 for(c = 0; c < ((1 << (maxDepth - curDepth)) - 1) * 4; c++)
946 else if(curDepth <= maxDepth)
948 __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);
949 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_PrintDepth((this ? this->right : (struct __ecereNameSpace__ecere__sys__BTNode *)(((void *)0))), output, wantedDepth, curDepth + 1, maxDepth, last);
953 extern int printf(char * , ...);
955 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Check(struct __ecereNameSpace__ecere__sys__BTNode * this, struct __ecereNameSpace__ecere__sys__BinaryTree * tree)
957 unsigned int valid = 0x1;
958 int leftHeight = this->left ? __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_depthProp(this->left) + 1 : 0;
959 int rightHeight = this->right ? __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_depthProp(this->right) + 1 : 0;
960 int diffHeight = rightHeight - leftHeight;
964 if(this->left->parent != this)
966 printf("Parent not set properly at node %d\n", this->left->key);
969 valid *= __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Check(this->left, tree);
973 if(this->right->parent != this)
975 printf("Parent not set properly at node %d\n", this->right->key);
978 valid *= __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Check(this->right, tree);
980 if(this->depth != __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_depthProp(this))
982 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));
983 valid = (unsigned int)0;
985 if(diffHeight < -1 || diffHeight > 1)
987 valid = (unsigned int)0;
988 printf("Height difference is %d at node %d\n", diffHeight, this->key);
990 if(diffHeight != __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_balanceFactor(this))
992 valid = (unsigned int)0;
993 printf("Height difference %d doesnt match balance-factor of %d at node \n", diffHeight, __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_balanceFactor(this), this->key);
995 if(this->left && tree->CompareKey(tree, this->left->key, this->key) > 0)
998 printf("Node %d is *smaller* than left subtree %d\n", this->key, this->left->key);
1000 if(this->right && tree->CompareKey(tree, this->right->key, this->key) < 0)
1003 printf("Node %d is *greater* than right subtree %d\n", this->key, this->right->key);
1008 struct __ecereNameSpace__ecere__sys__StringBTNode
1011 struct __ecereNameSpace__ecere__sys__StringBTNode * parent, * left, * right;
1013 } __attribute__ ((gcc_struct));
1015 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__StringBTNode;
1017 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_String;
1019 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)
1021 if((struct __ecereNameSpace__ecere__sys__StringBTNode *)this)
1023 unsigned int truth = 0x1;
1025 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Serialize(channel, __ecereClass_bool, &truth);
1026 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Serialize(channel, __ecereClass_String, this->key);
1027 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Serialize(channel, __ecereClass___ecereNameSpace__ecere__sys__StringBTNode, this->left);
1028 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Serialize(channel, __ecereClass___ecereNameSpace__ecere__sys__StringBTNode, this->right);
1032 unsigned int nothing = 0;
1034 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Serialize(channel, __ecereClass_uint, ¬hing);
1038 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)
1042 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Unserialize(channel, __ecereClass_bool, &truth);
1045 (*this) = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__StringBTNode);
1046 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Unserialize(channel, __ecereClass_String, &(*this)->key);
1047 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Unserialize(channel, __ecereClass___ecereNameSpace__ecere__sys__StringBTNode, &(*this)->left);
1050 (*this)->left->parent = *(struct __ecereNameSpace__ecere__sys__StringBTNode **)this;
1052 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Unserialize(channel, __ecereClass___ecereNameSpace__ecere__sys__StringBTNode, &(*this)->right);
1055 (*this)->right->parent = *(struct __ecereNameSpace__ecere__sys__StringBTNode **)this;
1057 (*this)->depth = __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_depthProp(((struct __ecereNameSpace__ecere__sys__BTNode *)*(struct __ecereNameSpace__ecere__sys__StringBTNode **)(*(struct __ecereNameSpace__ecere__sys__StringBTNode **)this)));
1060 (*this) = (((void *)0));
1063 extern struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_RegisterClass(int type, char * name, char * baseName, int size, int sizeClass, unsigned int (* Constructor)(void * ), void (* Destructor)(void * ), struct __ecereNameSpace__ecere__com__Instance * module, int declMode, int inheritanceAccess);
1065 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__NameSpace;
1067 struct __ecereNameSpace__ecere__com__NameSpace
1070 struct __ecereNameSpace__ecere__com__NameSpace * btParent;
1071 struct __ecereNameSpace__ecere__com__NameSpace * left;
1072 struct __ecereNameSpace__ecere__com__NameSpace * right;
1074 struct __ecereNameSpace__ecere__com__NameSpace * parent;
1075 struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
1076 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
1077 struct __ecereNameSpace__ecere__sys__BinaryTree defines;
1078 struct __ecereNameSpace__ecere__sys__BinaryTree functions;
1079 } __attribute__ ((gcc_struct));
1081 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Module;
1083 struct __ecereNameSpace__ecere__com__Module
1085 struct __ecereNameSpace__ecere__com__Instance * application;
1086 struct __ecereNameSpace__ecere__sys__OldList classes;
1087 struct __ecereNameSpace__ecere__sys__OldList defines;
1088 struct __ecereNameSpace__ecere__sys__OldList functions;
1089 struct __ecereNameSpace__ecere__sys__OldList modules;
1090 struct __ecereNameSpace__ecere__com__Instance * prev;
1091 struct __ecereNameSpace__ecere__com__Instance * next;
1097 struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
1098 struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
1099 } __attribute__ ((gcc_struct));
1101 extern struct __ecereNameSpace__ecere__com__Instance * __thisModule;
1103 extern void __ecereNameSpace__ecere__com__eEnum_AddFixedValue(struct __ecereNameSpace__ecere__com__Class * _class, char * string, int value);
1105 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__GlobalFunction;
1107 struct __ecereNameSpace__ecere__com__GlobalFunction;
1109 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);
1111 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);
1113 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);
1115 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);
1117 void __ecereRegisterModule_BTNode(struct __ecereNameSpace__ecere__com__Instance * module)
1119 struct __ecereNameSpace__ecere__com__Class * class;
1121 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(4, "ecere::sys::TreePrintStyle", 0, 0, 0, 0, 0, module, 4, 1);
1122 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
1123 __ecereClass___ecereNameSpace__ecere__sys__TreePrintStyle = class;
1124 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "inOrder", 0);
1125 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "postOrder", 1);
1126 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "preOrder", 2);
1127 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "depthOrder", 3);
1128 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::sys::strcatf", "void ecere::sys::strcatf(char * string, char * format, ...)", __ecereNameSpace__ecere__sys__strcatf, module, 4);
1129 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "ecere::sys::BTNode", 0, sizeof(struct __ecereNameSpace__ecere__sys__BTNode), 0, 0, 0, module, 4, 1);
1130 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
1131 __ecereClass___ecereNameSpace__ecere__sys__BTNode = class;
1132 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "OnSerialize", 0, __ecereMethod___ecereNameSpace__ecere__sys__BTNode_OnSerialize, 1);
1133 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "OnUnserialize", 0, __ecereMethod___ecereNameSpace__ecere__sys__BTNode_OnUnserialize, 1);
1134 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "FindPrefix", "ecere::sys::BTNode FindPrefix(char * key)", __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindPrefix, 1);
1135 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "FindString", "ecere::sys::BTNode FindString(char * key)", __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindString, 1);
1136 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "key", "uintptr", arch_PointerSize, arch_PointerSize, 1);
1137 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "parent", "ecere::sys::BTNode", arch_PointerSize, arch_PointerSize, 1);
1138 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "left", "ecere::sys::BTNode", arch_PointerSize, arch_PointerSize, 1);
1139 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "right", "ecere::sys::BTNode", arch_PointerSize, arch_PointerSize, 1);
1140 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "depth", "int", 4, 4, 1);
1141 __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);
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_prev = __ecerePropM___ecereNameSpace__ecere__sys__BTNode_prev, __ecerePropM___ecereNameSpace__ecere__sys__BTNode_prev = (void *)0;
1144 __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);
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_next = __ecerePropM___ecereNameSpace__ecere__sys__BTNode_next, __ecerePropM___ecereNameSpace__ecere__sys__BTNode_next = (void *)0;
1147 __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);
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_minimum = __ecerePropM___ecereNameSpace__ecere__sys__BTNode_minimum, __ecerePropM___ecereNameSpace__ecere__sys__BTNode_minimum = (void *)0;
1150 __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);
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_maximum = __ecerePropM___ecereNameSpace__ecere__sys__BTNode_maximum, __ecerePropM___ecereNameSpace__ecere__sys__BTNode_maximum = (void *)0;
1153 __ecerePropM___ecereNameSpace__ecere__sys__BTNode_count = __ecereNameSpace__ecere__com__eClass_AddProperty(class, "count", "int", 0, __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_count, 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_count = __ecerePropM___ecereNameSpace__ecere__sys__BTNode_count, __ecerePropM___ecereNameSpace__ecere__sys__BTNode_count = (void *)0;
1156 __ecerePropM___ecereNameSpace__ecere__sys__BTNode_depthProp = __ecereNameSpace__ecere__com__eClass_AddProperty(class, "depthProp", "int", 0, __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_depthProp, 1);
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_depthProp = __ecerePropM___ecereNameSpace__ecere__sys__BTNode_depthProp, __ecerePropM___ecereNameSpace__ecere__sys__BTNode_depthProp = (void *)0;
1159 __ecerePropM___ecereNameSpace__ecere__sys__BTNode_balanceFactor = __ecereNameSpace__ecere__com__eClass_AddProperty(class, "balanceFactor", "int", 0, __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_balanceFactor, 2);
1160 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application)
1161 __ecereProp___ecereNameSpace__ecere__sys__BTNode_balanceFactor = __ecerePropM___ecereNameSpace__ecere__sys__BTNode_balanceFactor, __ecerePropM___ecereNameSpace__ecere__sys__BTNode_balanceFactor = (void *)0;
1163 class->fixed = (unsigned int)1;
1164 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "ecere::sys::StringBTNode", 0, sizeof(struct __ecereNameSpace__ecere__sys__StringBTNode), 0, 0, 0, module, 4, 1);
1165 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
1166 __ecereClass___ecereNameSpace__ecere__sys__StringBTNode = class;
1167 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "OnSerialize", 0, __ecereMethod___ecereNameSpace__ecere__sys__StringBTNode_OnSerialize, 1);
1168 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "OnUnserialize", 0, __ecereMethod___ecereNameSpace__ecere__sys__StringBTNode_OnUnserialize, 1);
1169 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "key", "String", arch_PointerSize, arch_PointerSize, 1);
1170 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "parent", "ecere::sys::StringBTNode", arch_PointerSize, arch_PointerSize, 1);
1171 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "left", "ecere::sys::StringBTNode", arch_PointerSize, arch_PointerSize, 1);
1172 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "right", "ecere::sys::StringBTNode", arch_PointerSize, arch_PointerSize, 1);
1173 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "depth", "int", 4, 4, 1);
1175 class->fixed = (unsigned int)1;
1178 void __ecereUnregisterModule_BTNode(struct __ecereNameSpace__ecere__com__Instance * module)
1181 __ecerePropM___ecereNameSpace__ecere__sys__BTNode_prev = (void *)0;
1182 __ecerePropM___ecereNameSpace__ecere__sys__BTNode_next = (void *)0;
1183 __ecerePropM___ecereNameSpace__ecere__sys__BTNode_minimum = (void *)0;
1184 __ecerePropM___ecereNameSpace__ecere__sys__BTNode_maximum = (void *)0;
1185 __ecerePropM___ecereNameSpace__ecere__sys__BTNode_count = (void *)0;
1186 __ecerePropM___ecereNameSpace__ecere__sys__BTNode_depthProp = (void *)0;
1187 __ecerePropM___ecereNameSpace__ecere__sys__BTNode_balanceFactor = (void *)0;