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 unsigned int byValueSystemClass;
139 } __attribute__ ((gcc_struct));
141 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, char * name);
143 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Instance;
145 struct __ecereNameSpace__ecere__com__Instance
148 struct __ecereNameSpace__ecere__com__Class * _class;
150 } __attribute__ ((gcc_struct));
152 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Property;
154 struct __ecereNameSpace__ecere__com__Property
156 struct __ecereNameSpace__ecere__com__Property * prev;
157 struct __ecereNameSpace__ecere__com__Property * next;
159 unsigned int isProperty;
162 struct __ecereNameSpace__ecere__com__Class * _class;
163 char * dataTypeString;
164 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
165 struct __ecereNameSpace__ecere__com__Instance * dataType;
166 void (* Set)(void * , int);
167 int (* Get)(void * );
168 unsigned int (* IsSet)(void * );
172 unsigned int conversion;
173 unsigned int watcherOffset;
175 unsigned int compiled;
176 unsigned int selfWatchable;
177 unsigned int isWatchable;
178 } __attribute__ ((gcc_struct));
180 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataMember;
182 struct __ecereNameSpace__ecere__com__DataMember
184 struct __ecereNameSpace__ecere__com__DataMember * prev;
185 struct __ecereNameSpace__ecere__com__DataMember * next;
187 unsigned int isProperty;
190 struct __ecereNameSpace__ecere__com__Class * _class;
191 char * dataTypeString;
192 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
193 struct __ecereNameSpace__ecere__com__Instance * dataType;
197 struct __ecereNameSpace__ecere__sys__OldList members;
198 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
201 } __attribute__ ((gcc_struct));
203 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Method;
205 struct __ecereNameSpace__ecere__com__Method
208 struct __ecereNameSpace__ecere__com__Method * parent;
209 struct __ecereNameSpace__ecere__com__Method * left;
210 struct __ecereNameSpace__ecere__com__Method * right;
215 struct __ecereNameSpace__ecere__com__Class * _class;
217 char * dataTypeString;
218 struct __ecereNameSpace__ecere__com__Instance * dataType;
220 } __attribute__ ((gcc_struct));
222 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__SerialBuffer;
224 struct __ecereNameSpace__ecere__com__SerialBuffer
226 unsigned char * _buffer;
230 } __attribute__ ((gcc_struct));
232 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataValue;
234 struct __ecereNameSpace__ecere__com__DataValue
249 } __attribute__ ((gcc_struct));
250 } __attribute__ ((gcc_struct));
252 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassTemplateArgument;
254 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
260 char * dataTypeString;
261 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
262 } __attribute__ ((gcc_struct));
263 struct __ecereNameSpace__ecere__com__DataValue expression;
269 struct __ecereNameSpace__ecere__com__DataMember * member;
270 struct __ecereNameSpace__ecere__com__Property * prop;
271 struct __ecereNameSpace__ecere__com__Method * method;
272 } __attribute__ ((gcc_struct));
273 } __attribute__ ((gcc_struct));
274 } __attribute__ ((gcc_struct));
275 } __attribute__ ((gcc_struct));
277 typedef __builtin_va_list va_list;
279 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TreePrintStyle;
281 extern int vsprintf(char * , const char * , __builtin_va_list);
283 extern size_t strlen(const char * );
285 void __ecereNameSpace__ecere__sys__strcatf(char * string, char * format, ...)
289 __builtin_va_start(args, format);
290 vsprintf(string + strlen(string), format, args);
291 __builtin_va_end(args);
294 static struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BTNode_prev, * __ecerePropM___ecereNameSpace__ecere__sys__BTNode_prev;
296 static struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BTNode_next, * __ecerePropM___ecereNameSpace__ecere__sys__BTNode_next;
298 static struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BTNode_count, * __ecerePropM___ecereNameSpace__ecere__sys__BTNode_count;
300 static struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BTNode_balanceFactor, * __ecerePropM___ecereNameSpace__ecere__sys__BTNode_balanceFactor;
302 void __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Serialize(struct __ecereNameSpace__ecere__com__Instance * this, struct __ecereNameSpace__ecere__com__Class * class, void * data);
304 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_bool;
306 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_uintptr;
308 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_uint;
310 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)
312 if((struct __ecereNameSpace__ecere__sys__BTNode *)this)
314 unsigned int truth = 0x1;
316 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Serialize(channel, __ecereClass_bool, &truth);
317 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Serialize(channel, __ecereClass_uintptr, this->key);
318 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Serialize(channel, __ecereClass___ecereNameSpace__ecere__sys__BTNode, this->left);
319 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Serialize(channel, __ecereClass___ecereNameSpace__ecere__sys__BTNode, this->right);
323 unsigned int nothing = 0;
325 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Serialize(channel, __ecereClass_uint, ¬hing);
329 extern void * __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
331 void __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Unserialize(struct __ecereNameSpace__ecere__com__Instance * this, struct __ecereNameSpace__ecere__com__Class * class, void * * data);
333 int __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_depthProp(struct __ecereNameSpace__ecere__sys__BTNode * this);
335 static struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BTNode_depthProp, * __ecerePropM___ecereNameSpace__ecere__sys__BTNode_depthProp;
337 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)
341 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Unserialize(channel, __ecereClass_bool, &truth);
344 (*this) = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__BTNode);
345 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Unserialize(channel, __ecereClass_uintptr, &(*this)->key);
346 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Unserialize(channel, __ecereClass___ecereNameSpace__ecere__sys__BTNode, &(*this)->left);
349 (*this)->left->parent = *(struct __ecereNameSpace__ecere__sys__BTNode **)this;
351 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Unserialize(channel, __ecereClass___ecereNameSpace__ecere__sys__BTNode, &(*this)->right);
354 (*this)->right->parent = *(struct __ecereNameSpace__ecere__sys__BTNode **)this;
356 (*this)->depth = __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_depthProp((*(struct __ecereNameSpace__ecere__sys__BTNode **)this));
359 (*this) = (((void *)0));
362 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_maximum(struct __ecereNameSpace__ecere__sys__BTNode * this);
364 static struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BTNode_maximum, * __ecerePropM___ecereNameSpace__ecere__sys__BTNode_maximum;
366 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_prev(struct __ecereNameSpace__ecere__sys__BTNode * this)
369 return __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_maximum(this->left);
372 if(this->parent && this == this->parent->right)
380 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_minimum(struct __ecereNameSpace__ecere__sys__BTNode * this);
382 static struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BTNode_minimum, * __ecerePropM___ecereNameSpace__ecere__sys__BTNode_minimum;
384 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(struct __ecereNameSpace__ecere__sys__BTNode * this)
386 struct __ecereNameSpace__ecere__sys__BTNode * right = this->right;
389 return __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_minimum(right);
392 struct __ecereNameSpace__ecere__sys__BTNode * parent = this->parent;
394 if(parent && this == parent->left)
399 return (((void *)0));
402 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_minimum(struct __ecereNameSpace__ecere__sys__BTNode * this)
409 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_maximum(struct __ecereNameSpace__ecere__sys__BTNode * this)
416 int __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_count(struct __ecereNameSpace__ecere__sys__BTNode * this)
418 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);
421 int __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_depthProp(struct __ecereNameSpace__ecere__sys__BTNode * this)
423 int leftDepth = this->left ? (__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_depthProp(this->left) + 1) : 0;
424 int rightDepth = this->right ? (__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_depthProp(this->right) + 1) : 0;
426 return ((leftDepth > rightDepth) ? leftDepth : rightDepth);
429 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Free(struct __ecereNameSpace__ecere__sys__BTNode * this, void (* FreeKey)(void * key))
432 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Free(this->left, FreeKey);
434 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Free(this->right, FreeKey);
436 FreeKey((void *)this->key);
437 ((this ? (__ecereClass___ecereNameSpace__ecere__sys__BTNode->Destructor ? __ecereClass___ecereNameSpace__ecere__sys__BTNode->Destructor(this) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(this)) : 0), this = 0);
440 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)
442 uintptr_t newKey = node->key;
446 int result = tree->CompareKey(tree, newKey, this->key);
462 struct __ecereNameSpace__ecere__sys__BTNode * n;
464 for(n = this; n; n = n->parent)
466 int __simpleStruct0, __simpleStruct1;
467 int newDepth = (__simpleStruct0 = n->left ? (n->left->depth + 1) : 0, __simpleStruct1 = n->right ? (n->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
469 if(newDepth == n->depth)
487 struct __ecereNameSpace__ecere__sys__BTNode * n;
489 for(n = this; n; n = n->parent)
491 int __simpleStruct0, __simpleStruct1;
492 int newDepth = (__simpleStruct0 = n->left ? (n->left->depth + 1) : 0, __simpleStruct1 = n->right ? (n->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
494 if(newDepth == n->depth)
505 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindNode(struct __ecereNameSpace__ecere__sys__BTNode * this, struct __ecereNameSpace__ecere__sys__BTNode * node)
509 else if(this->left && __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindNode(this->left, node))
511 else if(this->right && __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindNode(this->right, node))
516 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)
520 int result = tree->CompareKey(tree, key, this->key);
532 extern int strcmp(const char * , const char * );
534 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindString(struct __ecereNameSpace__ecere__sys__BTNode * this, char * key)
541 result = strcmp(key, (char *)this->key);
542 else if(key && !this->key)
544 else if(!key && this->key)
558 extern int strncmp(const char * , const char * , size_t n);
560 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindPrefix(struct __ecereNameSpace__ecere__sys__BTNode * this, char * key)
562 struct __ecereNameSpace__ecere__sys__BTNode * subString = (((void *)0));
563 int len = key ? strlen(key) : 0;
570 result = strcmp(key, (char *)this->key);
571 else if(key && !this->key)
573 else if(!key && this->key)
579 if(!strncmp(key, (char *)this->key, len))
594 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindAll(struct __ecereNameSpace__ecere__sys__BTNode * this, uintptr_t key)
596 struct __ecereNameSpace__ecere__sys__BTNode * result = (((void *)0));
600 if(!result && this->left)
601 result = __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindAll(this->left, key);
602 if(!result && this->right)
603 result = __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindAll(this->right, key);
607 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_RemoveSwap(struct __ecereNameSpace__ecere__sys__BTNode * this, struct __ecereNameSpace__ecere__sys__BTNode * swap)
611 swap->left->parent = swap->parent;
612 if(swap == swap->parent->left)
613 swap->parent->left = swap->left;
614 else if(swap == swap->parent->right)
615 swap->parent->right = swap->left;
616 swap->left = (((void *)0));
620 swap->right->parent = swap->parent;
621 if(swap == swap->parent->left)
622 swap->parent->left = swap->right;
623 else if(swap == swap->parent->right)
624 swap->parent->right = swap->right;
625 swap->right = (((void *)0));
627 if(swap == swap->parent->left)
628 swap->parent->left = (((void *)0));
629 else if(swap == swap->parent->right)
630 swap->parent->right = (((void *)0));
632 struct __ecereNameSpace__ecere__sys__BTNode * n;
634 for(n = swap->parent; n; n = n->parent)
636 int __simpleStruct0, __simpleStruct1;
637 int newDepth = (__simpleStruct0 = n->left ? (n->left->depth + 1) : 0, __simpleStruct1 = n->right ? (n->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
639 if(newDepth == n->depth)
647 swap->left = this->left;
649 this->left->parent = swap;
652 swap->right = this->right;
654 this->right->parent = swap;
656 swap->parent = this->parent;
657 this->left = (((void *)0));
658 this->right = (((void *)0));
661 if(this == this->parent->left)
662 this->parent->left = swap;
663 else if(this == this->parent->right)
664 this->parent->right = swap;
668 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Rebalance();
670 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BTNode_RemoveSwapLeft(struct __ecereNameSpace__ecere__sys__BTNode * this)
672 struct __ecereNameSpace__ecere__sys__BTNode * swap = this->left ? __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_maximum(this->left) : this->right;
673 struct __ecereNameSpace__ecere__sys__BTNode * swapParent = (((void *)0));
677 swapParent = swap->parent;
678 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_RemoveSwap(this, swap);
682 if(this == this->parent->left)
683 this->parent->left = (((void *)0));
684 else if(this == this->parent->right)
685 this->parent->right = (((void *)0));
688 struct __ecereNameSpace__ecere__sys__BTNode * n;
690 for(n = swap ? swap : this->parent; n; n = n->parent)
692 int __simpleStruct0, __simpleStruct1;
693 int newDepth = (__simpleStruct0 = n->left ? (n->left->depth + 1) : 0, __simpleStruct1 = n->right ? (n->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
695 if(newDepth == n->depth && n != swap)
700 if(swapParent && swapParent != this)
701 return __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Rebalance(swapParent);
703 return __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Rebalance(swap);
704 else if(this->parent)
705 return __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Rebalance(this->parent);
707 return (((void *)0));
710 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BTNode_RemoveSwapRight(struct __ecereNameSpace__ecere__sys__BTNode * this)
712 struct __ecereNameSpace__ecere__sys__BTNode * result;
713 struct __ecereNameSpace__ecere__sys__BTNode * swap = this->right ? __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_minimum(this->right) : this->left;
714 struct __ecereNameSpace__ecere__sys__BTNode * swapParent = (((void *)0));
718 swapParent = swap->parent;
719 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_RemoveSwap(this, swap);
723 if(this == this->parent->left)
724 this->parent->left = (((void *)0));
725 else if(this == this->parent->right)
726 this->parent->right = (((void *)0));
729 struct __ecereNameSpace__ecere__sys__BTNode * n;
731 for(n = swap ? swap : this->parent; n; n = n->parent)
733 int __simpleStruct0, __simpleStruct1;
734 int newDepth = (__simpleStruct0 = n->left ? (n->left->depth + 1) : 0, __simpleStruct1 = n->right ? (n->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
736 if(newDepth == n->depth && n != swap)
741 if(swapParent && swapParent != this)
742 result = __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Rebalance(swapParent);
744 result = __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Rebalance(swap);
745 else if(this->parent)
746 result = __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Rebalance(this->parent);
748 result = (((void *)0));
752 int __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_balanceFactor(struct __ecereNameSpace__ecere__sys__BTNode * this)
754 int leftDepth = this->left ? (this->left->depth + 1) : 0;
755 int rightDepth = this->right ? (this->right->depth + 1) : 0;
757 return rightDepth - leftDepth;
760 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_DoubleRotateRight();
762 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateRight();
764 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_DoubleRotateLeft();
766 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateLeft();
768 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Rebalance(struct __ecereNameSpace__ecere__sys__BTNode * this)
772 int factor = __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_balanceFactor(this);
776 if(__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_balanceFactor(this->left) == 1)
777 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_DoubleRotateRight(this);
779 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateRight(this);
783 if(__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_balanceFactor(this->right) == -1)
784 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_DoubleRotateLeft(this);
786 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateLeft(this);
795 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateRight(struct __ecereNameSpace__ecere__sys__BTNode * this)
797 int __simpleStruct2, __simpleStruct3;
798 int __simpleStruct0, __simpleStruct1;
802 if(this == this->parent->left)
803 this->parent->left = this->left;
804 else if(this == this->parent->right)
805 this->parent->right = this->left;
807 this->left->parent = this->parent;
808 this->parent = this->left;
809 this->left = this->parent->right;
811 this->left->parent = this;
812 this->parent->right = this;
813 this->depth = (__simpleStruct0 = this->left ? (this->left->depth + 1) : 0, __simpleStruct1 = this->right ? (this->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
814 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);
816 struct __ecereNameSpace__ecere__sys__BTNode * n;
818 for(n = this->parent->parent; n; n = n->parent)
820 int __simpleStruct0, __simpleStruct1;
821 int newDepth = (__simpleStruct0 = n->left ? (n->left->depth + 1) : 0, __simpleStruct1 = n->right ? (n->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
823 if(newDepth == n->depth)
830 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateLeft(struct __ecereNameSpace__ecere__sys__BTNode * this)
832 int __simpleStruct2, __simpleStruct3;
833 int __simpleStruct0, __simpleStruct1;
837 if(this == this->parent->right)
838 this->parent->right = this->right;
839 else if(this == this->parent->left)
840 this->parent->left = this->right;
842 this->right->parent = this->parent;
843 this->parent = this->right;
844 this->right = this->parent->left;
846 this->right->parent = this;
847 this->parent->left = this;
848 this->depth = (__simpleStruct0 = this->left ? (this->left->depth + 1) : 0, __simpleStruct1 = this->right ? (this->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
849 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);
851 struct __ecereNameSpace__ecere__sys__BTNode * n;
853 for(n = this->parent->parent; n; n = n->parent)
855 int __simpleStruct0, __simpleStruct1;
856 int newDepth = (__simpleStruct0 = n->left ? (n->left->depth + 1) : 0, __simpleStruct1 = n->right ? (n->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
858 if(newDepth == n->depth)
865 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_DoubleRotateRight(struct __ecereNameSpace__ecere__sys__BTNode * this)
867 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateLeft(this->left);
868 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateRight(this);
871 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_DoubleRotateLeft(struct __ecereNameSpace__ecere__sys__BTNode * this)
873 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateRight(this->right);
874 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateLeft(this);
877 extern char * strcat(char * , const char * );
879 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_PrintDepth(struct __ecereNameSpace__ecere__sys__BTNode * this, char * output, int wantedDepth, int curDepth, int maxDepth, unsigned int last);
881 char * __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Print(struct __ecereNameSpace__ecere__sys__BTNode * this, char * output, int tps)
890 __ecereNameSpace__ecere__sys__strcatf(output, "%d ", this->key);
892 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Print(this->left, output, tps);
894 __ecereNameSpace__ecere__sys__strcatf(output, "%d ", this->key);
896 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Print(this->right, output, tps);
898 __ecereNameSpace__ecere__sys__strcatf(output, "%d ", this->key);
903 int maxDepth = this->depth;
906 for(curDepth = 0; curDepth <= maxDepth; curDepth++)
910 for(c = 0; c < ((1 << (maxDepth - curDepth)) - 1) * 4 / 2; c++)
912 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_PrintDepth(this, output, curDepth, 0, maxDepth, 0x1);
913 strcat(output, "\n");
918 return (((void *)0));
921 extern int sprintf(char * , char * , ...);
923 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_PrintDepth(struct __ecereNameSpace__ecere__sys__BTNode * this, char * output, int wantedDepth, int curDepth, int maxDepth, unsigned int last)
927 if(wantedDepth == curDepth)
929 char nodeString[10] = "";
933 sprintf(nodeString, "%d", this->key);
934 len = strlen(nodeString);
935 for(c = 0; c < (4 - len) / 2; c++)
938 strcat(output, nodeString);
939 for(c = len; c < 4; c++)
941 if(curDepth && !last)
943 for(c = 0; c < ((1 << (maxDepth - curDepth)) - 1) * 4; c++)
947 else if(curDepth <= maxDepth)
949 __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);
950 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_PrintDepth((this ? this->right : (struct __ecereNameSpace__ecere__sys__BTNode *)(((void *)0))), output, wantedDepth, curDepth + 1, maxDepth, last);
954 extern int printf(char * , ...);
956 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Check(struct __ecereNameSpace__ecere__sys__BTNode * this, struct __ecereNameSpace__ecere__sys__BinaryTree * tree)
958 unsigned int valid = 0x1;
959 int leftHeight = this->left ? __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_depthProp(this->left) + 1 : 0;
960 int rightHeight = this->right ? __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_depthProp(this->right) + 1 : 0;
961 int diffHeight = rightHeight - leftHeight;
965 if(this->left->parent != this)
967 printf("Parent not set properly at node %d\n", this->left->key);
970 valid *= __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Check(this->left, tree);
974 if(this->right->parent != this)
976 printf("Parent not set properly at node %d\n", this->right->key);
979 valid *= __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Check(this->right, tree);
981 if(this->depth != __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_depthProp(this))
983 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));
984 valid = (unsigned int)0;
986 if(diffHeight < -1 || diffHeight > 1)
988 valid = (unsigned int)0;
989 printf("Height difference is %d at node %d\n", diffHeight, this->key);
991 if(diffHeight != __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_balanceFactor(this))
993 valid = (unsigned int)0;
994 printf("Height difference %d doesnt match balance-factor of %d at node \n", diffHeight, __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_balanceFactor(this), this->key);
996 if(this->left && tree->CompareKey(tree, this->left->key, this->key) > 0)
999 printf("Node %d is *smaller* than left subtree %d\n", this->key, this->left->key);
1001 if(this->right && tree->CompareKey(tree, this->right->key, this->key) < 0)
1004 printf("Node %d is *greater* than right subtree %d\n", this->key, this->right->key);
1009 struct __ecereNameSpace__ecere__sys__StringBTNode
1012 struct __ecereNameSpace__ecere__sys__StringBTNode * parent, * left, * right;
1014 } __attribute__ ((gcc_struct));
1016 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__StringBTNode;
1018 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_String;
1020 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)
1022 if((struct __ecereNameSpace__ecere__sys__StringBTNode *)this)
1024 unsigned int truth = 0x1;
1026 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Serialize(channel, __ecereClass_bool, &truth);
1027 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Serialize(channel, __ecereClass_String, this->key);
1028 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Serialize(channel, __ecereClass___ecereNameSpace__ecere__sys__StringBTNode, this->left);
1029 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Serialize(channel, __ecereClass___ecereNameSpace__ecere__sys__StringBTNode, this->right);
1033 unsigned int nothing = 0;
1035 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Serialize(channel, __ecereClass_uint, ¬hing);
1039 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)
1043 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Unserialize(channel, __ecereClass_bool, &truth);
1046 (*this) = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__StringBTNode);
1047 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Unserialize(channel, __ecereClass_String, &(*this)->key);
1048 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Unserialize(channel, __ecereClass___ecereNameSpace__ecere__sys__StringBTNode, &(*this)->left);
1051 (*this)->left->parent = *(struct __ecereNameSpace__ecere__sys__StringBTNode **)this;
1053 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Unserialize(channel, __ecereClass___ecereNameSpace__ecere__sys__StringBTNode, &(*this)->right);
1056 (*this)->right->parent = *(struct __ecereNameSpace__ecere__sys__StringBTNode **)this;
1058 (*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)));
1061 (*this) = (((void *)0));
1064 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);
1066 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__NameSpace;
1068 struct __ecereNameSpace__ecere__com__NameSpace
1071 struct __ecereNameSpace__ecere__com__NameSpace * btParent;
1072 struct __ecereNameSpace__ecere__com__NameSpace * left;
1073 struct __ecereNameSpace__ecere__com__NameSpace * right;
1075 struct __ecereNameSpace__ecere__com__NameSpace * parent;
1076 struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
1077 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
1078 struct __ecereNameSpace__ecere__sys__BinaryTree defines;
1079 struct __ecereNameSpace__ecere__sys__BinaryTree functions;
1080 } __attribute__ ((gcc_struct));
1082 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Module;
1084 struct __ecereNameSpace__ecere__com__Module
1086 struct __ecereNameSpace__ecere__com__Instance * application;
1087 struct __ecereNameSpace__ecere__sys__OldList classes;
1088 struct __ecereNameSpace__ecere__sys__OldList defines;
1089 struct __ecereNameSpace__ecere__sys__OldList functions;
1090 struct __ecereNameSpace__ecere__sys__OldList modules;
1091 struct __ecereNameSpace__ecere__com__Instance * prev;
1092 struct __ecereNameSpace__ecere__com__Instance * next;
1098 struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
1099 struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
1100 } __attribute__ ((gcc_struct));
1102 extern struct __ecereNameSpace__ecere__com__Instance * __thisModule;
1104 extern void __ecereNameSpace__ecere__com__eEnum_AddFixedValue(struct __ecereNameSpace__ecere__com__Class * _class, char * string, int value);
1106 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__GlobalFunction;
1108 struct __ecereNameSpace__ecere__com__GlobalFunction;
1110 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);
1112 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);
1114 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);
1116 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);
1118 void __ecereRegisterModule_BTNode(struct __ecereNameSpace__ecere__com__Instance * module)
1120 struct __ecereNameSpace__ecere__com__Class * class;
1122 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(4, "ecere::sys::TreePrintStyle", 0, 0, 0, 0, 0, module, 4, 1);
1123 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
1124 __ecereClass___ecereNameSpace__ecere__sys__TreePrintStyle = class;
1125 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "inOrder", 0);
1126 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "postOrder", 1);
1127 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "preOrder", 2);
1128 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "depthOrder", 3);
1129 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::sys::strcatf", "void ecere::sys::strcatf(char * string, char * format, ...)", __ecereNameSpace__ecere__sys__strcatf, module, 4);
1130 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "ecere::sys::BTNode", 0, sizeof(struct __ecereNameSpace__ecere__sys__BTNode), 0, 0, 0, module, 4, 1);
1131 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
1132 __ecereClass___ecereNameSpace__ecere__sys__BTNode = class;
1133 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "OnSerialize", 0, __ecereMethod___ecereNameSpace__ecere__sys__BTNode_OnSerialize, 1);
1134 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "OnUnserialize", 0, __ecereMethod___ecereNameSpace__ecere__sys__BTNode_OnUnserialize, 1);
1135 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "FindPrefix", "ecere::sys::BTNode FindPrefix(char * key)", __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindPrefix, 1);
1136 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "FindString", "ecere::sys::BTNode FindString(char * key)", __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindString, 1);
1137 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "key", "uintptr", arch_PointerSize, arch_PointerSize, 1);
1138 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "parent", "ecere::sys::BTNode", arch_PointerSize, arch_PointerSize, 1);
1139 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "left", "ecere::sys::BTNode", arch_PointerSize, arch_PointerSize, 1);
1140 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "right", "ecere::sys::BTNode", arch_PointerSize, arch_PointerSize, 1);
1141 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "depth", "int", 4, 4, 1);
1142 __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);
1143 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application)
1144 __ecereProp___ecereNameSpace__ecere__sys__BTNode_prev = __ecerePropM___ecereNameSpace__ecere__sys__BTNode_prev, __ecerePropM___ecereNameSpace__ecere__sys__BTNode_prev = (void *)0;
1145 __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);
1146 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application)
1147 __ecereProp___ecereNameSpace__ecere__sys__BTNode_next = __ecerePropM___ecereNameSpace__ecere__sys__BTNode_next, __ecerePropM___ecereNameSpace__ecere__sys__BTNode_next = (void *)0;
1148 __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);
1149 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application)
1150 __ecereProp___ecereNameSpace__ecere__sys__BTNode_minimum = __ecerePropM___ecereNameSpace__ecere__sys__BTNode_minimum, __ecerePropM___ecereNameSpace__ecere__sys__BTNode_minimum = (void *)0;
1151 __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);
1152 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application)
1153 __ecereProp___ecereNameSpace__ecere__sys__BTNode_maximum = __ecerePropM___ecereNameSpace__ecere__sys__BTNode_maximum, __ecerePropM___ecereNameSpace__ecere__sys__BTNode_maximum = (void *)0;
1154 __ecerePropM___ecereNameSpace__ecere__sys__BTNode_count = __ecereNameSpace__ecere__com__eClass_AddProperty(class, "count", "int", 0, __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_count, 1);
1155 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application)
1156 __ecereProp___ecereNameSpace__ecere__sys__BTNode_count = __ecerePropM___ecereNameSpace__ecere__sys__BTNode_count, __ecerePropM___ecereNameSpace__ecere__sys__BTNode_count = (void *)0;
1157 __ecerePropM___ecereNameSpace__ecere__sys__BTNode_depthProp = __ecereNameSpace__ecere__com__eClass_AddProperty(class, "depthProp", "int", 0, __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_depthProp, 1);
1158 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application)
1159 __ecereProp___ecereNameSpace__ecere__sys__BTNode_depthProp = __ecerePropM___ecereNameSpace__ecere__sys__BTNode_depthProp, __ecerePropM___ecereNameSpace__ecere__sys__BTNode_depthProp = (void *)0;
1160 __ecerePropM___ecereNameSpace__ecere__sys__BTNode_balanceFactor = __ecereNameSpace__ecere__com__eClass_AddProperty(class, "balanceFactor", "int", 0, __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_balanceFactor, 2);
1161 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application)
1162 __ecereProp___ecereNameSpace__ecere__sys__BTNode_balanceFactor = __ecerePropM___ecereNameSpace__ecere__sys__BTNode_balanceFactor, __ecerePropM___ecereNameSpace__ecere__sys__BTNode_balanceFactor = (void *)0;
1164 class->fixed = (unsigned int)1;
1165 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "ecere::sys::StringBTNode", 0, sizeof(struct __ecereNameSpace__ecere__sys__StringBTNode), 0, 0, 0, module, 4, 1);
1166 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
1167 __ecereClass___ecereNameSpace__ecere__sys__StringBTNode = class;
1168 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "OnSerialize", 0, __ecereMethod___ecereNameSpace__ecere__sys__StringBTNode_OnSerialize, 1);
1169 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "OnUnserialize", 0, __ecereMethod___ecereNameSpace__ecere__sys__StringBTNode_OnUnserialize, 1);
1170 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "key", "String", arch_PointerSize, arch_PointerSize, 1);
1171 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "parent", "ecere::sys::StringBTNode", arch_PointerSize, arch_PointerSize, 1);
1172 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "left", "ecere::sys::StringBTNode", arch_PointerSize, arch_PointerSize, 1);
1173 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "right", "ecere::sys::StringBTNode", arch_PointerSize, arch_PointerSize, 1);
1174 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "depth", "int", 4, 4, 1);
1176 class->fixed = (unsigned int)1;
1179 void __ecereUnregisterModule_BTNode(struct __ecereNameSpace__ecere__com__Instance * module)
1182 __ecerePropM___ecereNameSpace__ecere__sys__BTNode_prev = (void *)0;
1183 __ecerePropM___ecereNameSpace__ecere__sys__BTNode_next = (void *)0;
1184 __ecerePropM___ecereNameSpace__ecere__sys__BTNode_minimum = (void *)0;
1185 __ecerePropM___ecereNameSpace__ecere__sys__BTNode_maximum = (void *)0;
1186 __ecerePropM___ecereNameSpace__ecere__sys__BTNode_count = (void *)0;
1187 __ecerePropM___ecereNameSpace__ecere__sys__BTNode_depthProp = (void *)0;
1188 __ecerePropM___ecereNameSpace__ecere__sys__BTNode_balanceFactor = (void *)0;