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 extern void __ecereNameSpace__ecere__com__eSystem_Delete(void * memory);
53 struct __ecereNameSpace__ecere__sys__BTNode
56 struct __ecereNameSpace__ecere__sys__BTNode * parent, * left, * right;
58 } __attribute__ ((gcc_struct));
60 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__BTNode;
62 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__BinaryTree;
64 struct __ecereNameSpace__ecere__sys__BinaryTree
66 struct __ecereNameSpace__ecere__sys__BTNode * root;
68 int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
69 void (* FreeKey)(void * key);
70 } __attribute__ ((gcc_struct));
72 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__OldList;
74 struct __ecereNameSpace__ecere__sys__OldList
81 } __attribute__ ((gcc_struct));
83 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Class;
85 struct __ecereNameSpace__ecere__com__Class
87 struct __ecereNameSpace__ecere__com__Class * prev;
88 struct __ecereNameSpace__ecere__com__Class * next;
94 int (* Constructor)(struct __ecereNameSpace__ecere__com__Instance *);
95 void (* Destructor)(struct __ecereNameSpace__ecere__com__Instance *);
98 struct __ecereNameSpace__ecere__com__Class * base;
99 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
100 struct __ecereNameSpace__ecere__sys__BinaryTree members;
101 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
102 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
103 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
104 struct __ecereNameSpace__ecere__sys__OldList derivatives;
108 struct __ecereNameSpace__ecere__com__Instance * module;
109 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
110 char * dataTypeString;
111 struct __ecereNameSpace__ecere__com__Instance * dataType;
113 int defaultAlignment;
114 void (* Initialize)();
116 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
117 char * designerClass;
118 unsigned int noExpansion;
119 char * defaultProperty;
120 unsigned int comRedefinition;
122 unsigned int isRemote;
123 unsigned int internalDecl;
125 unsigned int computeSize;
127 int destructionWatchOffset;
129 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
130 int inheritanceAccess;
133 struct __ecereNameSpace__ecere__sys__OldList conversions;
134 struct __ecereNameSpace__ecere__sys__OldList templateParams;
135 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
136 struct __ecereNameSpace__ecere__com__Class * templateClass;
137 struct __ecereNameSpace__ecere__sys__OldList templatized;
139 unsigned int isInstanceClass;
140 unsigned int byValueSystemClass;
141 } __attribute__ ((gcc_struct));
143 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, char * name);
145 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Property;
147 struct __ecereNameSpace__ecere__com__Property
149 struct __ecereNameSpace__ecere__com__Property * prev;
150 struct __ecereNameSpace__ecere__com__Property * next;
152 unsigned int isProperty;
155 struct __ecereNameSpace__ecere__com__Class * _class;
156 char * dataTypeString;
157 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
158 struct __ecereNameSpace__ecere__com__Instance * dataType;
159 void (* Set)(void * , int);
160 int (* Get)(void * );
161 unsigned int (* IsSet)(void * );
165 unsigned int conversion;
166 unsigned int watcherOffset;
168 unsigned int compiled;
169 unsigned int selfWatchable;
170 unsigned int isWatchable;
171 } __attribute__ ((gcc_struct));
173 extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
175 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Instance;
177 struct __ecereNameSpace__ecere__com__Instance
180 struct __ecereNameSpace__ecere__com__Class * _class;
182 } __attribute__ ((gcc_struct));
184 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataMember;
186 struct __ecereNameSpace__ecere__com__DataMember
188 struct __ecereNameSpace__ecere__com__DataMember * prev;
189 struct __ecereNameSpace__ecere__com__DataMember * next;
191 unsigned int isProperty;
194 struct __ecereNameSpace__ecere__com__Class * _class;
195 char * dataTypeString;
196 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
197 struct __ecereNameSpace__ecere__com__Instance * dataType;
201 struct __ecereNameSpace__ecere__sys__OldList members;
202 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
205 } __attribute__ ((gcc_struct));
207 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Method;
209 struct __ecereNameSpace__ecere__com__Method
212 struct __ecereNameSpace__ecere__com__Method * parent;
213 struct __ecereNameSpace__ecere__com__Method * left;
214 struct __ecereNameSpace__ecere__com__Method * right;
219 struct __ecereNameSpace__ecere__com__Class * _class;
221 char * dataTypeString;
222 struct __ecereNameSpace__ecere__com__Instance * dataType;
224 } __attribute__ ((gcc_struct));
226 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__SerialBuffer;
228 struct __ecereNameSpace__ecere__com__SerialBuffer
230 unsigned char * _buffer;
234 } __attribute__ ((gcc_struct));
236 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataValue;
238 struct __ecereNameSpace__ecere__com__DataValue
253 } __attribute__ ((gcc_struct));
254 } __attribute__ ((gcc_struct));
256 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassTemplateArgument;
258 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
264 char * dataTypeString;
265 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
266 } __attribute__ ((gcc_struct));
267 struct __ecereNameSpace__ecere__com__DataValue expression;
273 struct __ecereNameSpace__ecere__com__DataMember * member;
274 struct __ecereNameSpace__ecere__com__Property * prop;
275 struct __ecereNameSpace__ecere__com__Method * method;
276 } __attribute__ ((gcc_struct));
277 } __attribute__ ((gcc_struct));
278 } __attribute__ ((gcc_struct));
279 } __attribute__ ((gcc_struct));
281 typedef __builtin_va_list va_list;
283 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TreePrintStyle;
285 extern int vsprintf(char * , const char * , __builtin_va_list);
287 extern size_t strlen(const char * );
289 void __ecereNameSpace__ecere__sys__strcatf(char * string, char * format, ...)
293 __builtin_va_start(args, format);
294 vsprintf(string + strlen(string), format, args);
295 __builtin_va_end(args);
298 static struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BTNode_prev, * __ecerePropM___ecereNameSpace__ecere__sys__BTNode_prev;
300 static struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BTNode_next, * __ecerePropM___ecereNameSpace__ecere__sys__BTNode_next;
302 static struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BTNode_count, * __ecerePropM___ecereNameSpace__ecere__sys__BTNode_count;
304 static struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BTNode_balanceFactor, * __ecerePropM___ecereNameSpace__ecere__sys__BTNode_balanceFactor;
306 void __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Serialize(struct __ecereNameSpace__ecere__com__Instance * this, struct __ecereNameSpace__ecere__com__Class * class, void * data);
308 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_bool;
310 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_uint;
312 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)
314 if((struct __ecereNameSpace__ecere__sys__BTNode *)this)
316 unsigned int __internalValue000;
317 unsigned int truth = 0x1;
319 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Serialize(channel, __ecereClass_bool, &truth);
320 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Serialize(channel, __ecereClass_uint, __extension__ ({
321 __internalValue000 = (unsigned int)this->key;
324 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Serialize(channel, __ecereClass___ecereNameSpace__ecere__sys__BTNode, this->left);
325 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Serialize(channel, __ecereClass___ecereNameSpace__ecere__sys__BTNode, this->right);
329 unsigned int nothing = 0;
331 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Serialize(channel, __ecereClass_uint, ¬hing);
335 extern void * __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
337 void __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Unserialize(struct __ecereNameSpace__ecere__com__Instance * this, struct __ecereNameSpace__ecere__com__Class * class, void * * data);
339 int __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_depthProp(struct __ecereNameSpace__ecere__sys__BTNode * this);
341 static struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BTNode_depthProp, * __ecerePropM___ecereNameSpace__ecere__sys__BTNode_depthProp;
343 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)
347 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Unserialize(channel, __ecereClass_bool, &truth);
350 (*this) = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__BTNode);
354 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Unserialize(channel, __ecereClass_uint, &k);
357 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Unserialize(channel, __ecereClass___ecereNameSpace__ecere__sys__BTNode, &(*this)->left);
360 (*this)->left->parent = *(struct __ecereNameSpace__ecere__sys__BTNode **)this;
362 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Unserialize(channel, __ecereClass___ecereNameSpace__ecere__sys__BTNode, &(*this)->right);
365 (*this)->right->parent = *(struct __ecereNameSpace__ecere__sys__BTNode **)this;
367 (*this)->depth = __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_depthProp((*(struct __ecereNameSpace__ecere__sys__BTNode **)this));
370 (*this) = (((void *)0));
373 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_maximum(struct __ecereNameSpace__ecere__sys__BTNode * this);
375 static struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BTNode_maximum, * __ecerePropM___ecereNameSpace__ecere__sys__BTNode_maximum;
377 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_prev(struct __ecereNameSpace__ecere__sys__BTNode * this)
380 return __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_maximum(this->left);
383 if(this->parent && this == this->parent->right)
391 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_minimum(struct __ecereNameSpace__ecere__sys__BTNode * this);
393 static struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BTNode_minimum, * __ecerePropM___ecereNameSpace__ecere__sys__BTNode_minimum;
395 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(struct __ecereNameSpace__ecere__sys__BTNode * this)
397 struct __ecereNameSpace__ecere__sys__BTNode * right = this->right;
400 return __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_minimum(right);
403 struct __ecereNameSpace__ecere__sys__BTNode * parent = this->parent;
405 if(parent && this == parent->left)
410 return (((void *)0));
413 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_minimum(struct __ecereNameSpace__ecere__sys__BTNode * this)
420 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_maximum(struct __ecereNameSpace__ecere__sys__BTNode * this)
427 int __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_count(struct __ecereNameSpace__ecere__sys__BTNode * this)
429 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);
432 int __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_depthProp(struct __ecereNameSpace__ecere__sys__BTNode * this)
434 int leftDepth = this->left ? (__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_depthProp(this->left) + 1) : 0;
435 int rightDepth = this->right ? (__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_depthProp(this->right) + 1) : 0;
437 return ((leftDepth > rightDepth) ? leftDepth : rightDepth);
440 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Free(struct __ecereNameSpace__ecere__sys__BTNode * this, void (* FreeKey)(void * key))
443 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Free(this->left, FreeKey);
445 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Free(this->right, FreeKey);
447 FreeKey((void *)this->key);
448 ((this ? (__ecereClass___ecereNameSpace__ecere__sys__BTNode->Destructor ? __ecereClass___ecereNameSpace__ecere__sys__BTNode->Destructor(this) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(this)) : 0), this = 0);
451 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)
453 uintptr_t newKey = node->key;
457 int result = tree->CompareKey(tree, newKey, this->key);
473 struct __ecereNameSpace__ecere__sys__BTNode * n;
475 for(n = this; n; n = n->parent)
477 int __simpleStruct0, __simpleStruct1;
478 int newDepth = (__simpleStruct0 = n->left ? (n->left->depth + 1) : 0, __simpleStruct1 = n->right ? (n->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
480 if(newDepth == n->depth)
498 struct __ecereNameSpace__ecere__sys__BTNode * n;
500 for(n = this; n; n = n->parent)
502 int __simpleStruct0, __simpleStruct1;
503 int newDepth = (__simpleStruct0 = n->left ? (n->left->depth + 1) : 0, __simpleStruct1 = n->right ? (n->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
505 if(newDepth == n->depth)
516 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindNode(struct __ecereNameSpace__ecere__sys__BTNode * this, struct __ecereNameSpace__ecere__sys__BTNode * node)
520 else if(this->left && __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindNode(this->left, node))
522 else if(this->right && __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindNode(this->right, node))
527 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)
531 int result = tree->CompareKey(tree, key, this->key);
543 extern int strcmp(const char * , const char * );
545 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindString(struct __ecereNameSpace__ecere__sys__BTNode * this, char * key)
552 result = strcmp(key, (char *)this->key);
553 else if(key && !this->key)
555 else if(!key && this->key)
569 extern int strncmp(const char * , const char * , size_t n);
571 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindPrefix(struct __ecereNameSpace__ecere__sys__BTNode * this, char * key)
573 struct __ecereNameSpace__ecere__sys__BTNode * subString = (((void *)0));
574 int len = key ? strlen(key) : 0;
581 result = strcmp(key, (char *)this->key);
582 else if(key && !this->key)
584 else if(!key && this->key)
590 if(!strncmp(key, (char *)this->key, len))
605 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindAll(struct __ecereNameSpace__ecere__sys__BTNode * this, uintptr_t key)
607 struct __ecereNameSpace__ecere__sys__BTNode * result = (((void *)0));
611 if(!result && this->left)
612 result = __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindAll(this->left, key);
613 if(!result && this->right)
614 result = __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindAll(this->right, key);
618 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_RemoveSwap(struct __ecereNameSpace__ecere__sys__BTNode * this, struct __ecereNameSpace__ecere__sys__BTNode * swap)
622 swap->left->parent = swap->parent;
623 if(swap == swap->parent->left)
624 swap->parent->left = swap->left;
625 else if(swap == swap->parent->right)
626 swap->parent->right = swap->left;
627 swap->left = (((void *)0));
631 swap->right->parent = swap->parent;
632 if(swap == swap->parent->left)
633 swap->parent->left = swap->right;
634 else if(swap == swap->parent->right)
635 swap->parent->right = swap->right;
636 swap->right = (((void *)0));
638 if(swap == swap->parent->left)
639 swap->parent->left = (((void *)0));
640 else if(swap == swap->parent->right)
641 swap->parent->right = (((void *)0));
643 struct __ecereNameSpace__ecere__sys__BTNode * n;
645 for(n = swap->parent; n; n = n->parent)
647 int __simpleStruct0, __simpleStruct1;
648 int newDepth = (__simpleStruct0 = n->left ? (n->left->depth + 1) : 0, __simpleStruct1 = n->right ? (n->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
650 if(newDepth == n->depth)
658 swap->left = this->left;
660 this->left->parent = swap;
663 swap->right = this->right;
665 this->right->parent = swap;
667 swap->parent = this->parent;
668 this->left = (((void *)0));
669 this->right = (((void *)0));
672 if(this == this->parent->left)
673 this->parent->left = swap;
674 else if(this == this->parent->right)
675 this->parent->right = swap;
679 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Rebalance();
681 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BTNode_RemoveSwapLeft(struct __ecereNameSpace__ecere__sys__BTNode * this)
683 struct __ecereNameSpace__ecere__sys__BTNode * swap = this->left ? __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_maximum(this->left) : this->right;
684 struct __ecereNameSpace__ecere__sys__BTNode * swapParent = (((void *)0));
688 swapParent = swap->parent;
689 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_RemoveSwap(this, swap);
693 if(this == this->parent->left)
694 this->parent->left = (((void *)0));
695 else if(this == this->parent->right)
696 this->parent->right = (((void *)0));
699 struct __ecereNameSpace__ecere__sys__BTNode * n;
701 for(n = swap ? swap : this->parent; n; n = n->parent)
703 int __simpleStruct0, __simpleStruct1;
704 int newDepth = (__simpleStruct0 = n->left ? (n->left->depth + 1) : 0, __simpleStruct1 = n->right ? (n->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
706 if(newDepth == n->depth && n != swap)
711 if(swapParent && swapParent != this)
712 return __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Rebalance(swapParent);
714 return __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Rebalance(swap);
715 else if(this->parent)
716 return __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Rebalance(this->parent);
718 return (((void *)0));
721 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BTNode_RemoveSwapRight(struct __ecereNameSpace__ecere__sys__BTNode * this)
723 struct __ecereNameSpace__ecere__sys__BTNode * result;
724 struct __ecereNameSpace__ecere__sys__BTNode * swap = this->right ? __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_minimum(this->right) : this->left;
725 struct __ecereNameSpace__ecere__sys__BTNode * swapParent = (((void *)0));
729 swapParent = swap->parent;
730 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_RemoveSwap(this, swap);
734 if(this == this->parent->left)
735 this->parent->left = (((void *)0));
736 else if(this == this->parent->right)
737 this->parent->right = (((void *)0));
740 struct __ecereNameSpace__ecere__sys__BTNode * n;
742 for(n = swap ? swap : this->parent; n; n = n->parent)
744 int __simpleStruct0, __simpleStruct1;
745 int newDepth = (__simpleStruct0 = n->left ? (n->left->depth + 1) : 0, __simpleStruct1 = n->right ? (n->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
747 if(newDepth == n->depth && n != swap)
752 if(swapParent && swapParent != this)
753 result = __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Rebalance(swapParent);
755 result = __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Rebalance(swap);
756 else if(this->parent)
757 result = __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Rebalance(this->parent);
759 result = (((void *)0));
763 int __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_balanceFactor(struct __ecereNameSpace__ecere__sys__BTNode * this)
765 int leftDepth = this->left ? (this->left->depth + 1) : 0;
766 int rightDepth = this->right ? (this->right->depth + 1) : 0;
768 return rightDepth - leftDepth;
771 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_DoubleRotateRight();
773 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateRight();
775 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_DoubleRotateLeft();
777 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateLeft();
779 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Rebalance(struct __ecereNameSpace__ecere__sys__BTNode * this)
783 int factor = __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_balanceFactor(this);
787 if(__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_balanceFactor(this->left) == 1)
788 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_DoubleRotateRight(this);
790 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateRight(this);
794 if(__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_balanceFactor(this->right) == -1)
795 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_DoubleRotateLeft(this);
797 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateLeft(this);
806 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateRight(struct __ecereNameSpace__ecere__sys__BTNode * this)
808 int __simpleStruct2, __simpleStruct3;
809 int __simpleStruct0, __simpleStruct1;
813 if(this == this->parent->left)
814 this->parent->left = this->left;
815 else if(this == this->parent->right)
816 this->parent->right = this->left;
818 this->left->parent = this->parent;
819 this->parent = this->left;
820 this->left = this->parent->right;
822 this->left->parent = this;
823 this->parent->right = this;
824 this->depth = (__simpleStruct0 = this->left ? (this->left->depth + 1) : 0, __simpleStruct1 = this->right ? (this->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
825 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);
827 struct __ecereNameSpace__ecere__sys__BTNode * n;
829 for(n = this->parent->parent; n; n = n->parent)
831 int __simpleStruct0, __simpleStruct1;
832 int newDepth = (__simpleStruct0 = n->left ? (n->left->depth + 1) : 0, __simpleStruct1 = n->right ? (n->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
834 if(newDepth == n->depth)
841 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateLeft(struct __ecereNameSpace__ecere__sys__BTNode * this)
843 int __simpleStruct2, __simpleStruct3;
844 int __simpleStruct0, __simpleStruct1;
848 if(this == this->parent->right)
849 this->parent->right = this->right;
850 else if(this == this->parent->left)
851 this->parent->left = this->right;
853 this->right->parent = this->parent;
854 this->parent = this->right;
855 this->right = this->parent->left;
857 this->right->parent = this;
858 this->parent->left = this;
859 this->depth = (__simpleStruct0 = this->left ? (this->left->depth + 1) : 0, __simpleStruct1 = this->right ? (this->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
860 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);
862 struct __ecereNameSpace__ecere__sys__BTNode * n;
864 for(n = this->parent->parent; n; n = n->parent)
866 int __simpleStruct0, __simpleStruct1;
867 int newDepth = (__simpleStruct0 = n->left ? (n->left->depth + 1) : 0, __simpleStruct1 = n->right ? (n->right->depth + 1) : 0, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
869 if(newDepth == n->depth)
876 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_DoubleRotateRight(struct __ecereNameSpace__ecere__sys__BTNode * this)
878 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateLeft(this->left);
879 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateRight(this);
882 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_DoubleRotateLeft(struct __ecereNameSpace__ecere__sys__BTNode * this)
884 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateRight(this->right);
885 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_SingleRotateLeft(this);
888 extern char * strcat(char * , const char * );
890 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_PrintDepth(struct __ecereNameSpace__ecere__sys__BTNode * this, char * output, int wantedDepth, int curDepth, int maxDepth, unsigned int last);
892 char * __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Print(struct __ecereNameSpace__ecere__sys__BTNode * this, char * output, int tps)
901 __ecereNameSpace__ecere__sys__strcatf(output, "%d ", this->key);
903 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Print(this->left, output, tps);
905 __ecereNameSpace__ecere__sys__strcatf(output, "%d ", this->key);
907 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Print(this->right, output, tps);
909 __ecereNameSpace__ecere__sys__strcatf(output, "%d ", this->key);
914 int maxDepth = this->depth;
917 for(curDepth = 0; curDepth <= maxDepth; curDepth++)
921 for(c = 0; c < ((1 << (maxDepth - curDepth)) - 1) * 4 / 2; c++)
923 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_PrintDepth(this, output, curDepth, 0, maxDepth, 0x1);
924 strcat(output, "\n");
929 return (((void *)0));
932 extern int sprintf(char * , char * , ...);
934 void __ecereMethod___ecereNameSpace__ecere__sys__BTNode_PrintDepth(struct __ecereNameSpace__ecere__sys__BTNode * this, char * output, int wantedDepth, int curDepth, int maxDepth, unsigned int last)
938 if(wantedDepth == curDepth)
940 char nodeString[10] = "";
944 sprintf(nodeString, "%d", this->key);
945 len = strlen(nodeString);
946 for(c = 0; c < (4 - len) / 2; c++)
949 strcat(output, nodeString);
950 for(c = len; c < 4; c++)
952 if(curDepth && !last)
954 for(c = 0; c < ((1 << (maxDepth - curDepth)) - 1) * 4; c++)
958 else if(curDepth <= maxDepth)
960 __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);
961 __ecereMethod___ecereNameSpace__ecere__sys__BTNode_PrintDepth((this ? this->right : (struct __ecereNameSpace__ecere__sys__BTNode *)(((void *)0))), output, wantedDepth, curDepth + 1, maxDepth, last);
965 extern int printf(char * , ...);
967 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Check(struct __ecereNameSpace__ecere__sys__BTNode * this, struct __ecereNameSpace__ecere__sys__BinaryTree * tree)
969 unsigned int valid = 0x1;
970 int leftHeight = this->left ? __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_depthProp(this->left) + 1 : 0;
971 int rightHeight = this->right ? __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_depthProp(this->right) + 1 : 0;
972 int diffHeight = rightHeight - leftHeight;
976 if(this->left->parent != this)
978 printf("Parent not set properly at node %d\n", this->left->key);
981 valid *= __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Check(this->left, tree);
985 if(this->right->parent != this)
987 printf("Parent not set properly at node %d\n", this->right->key);
990 valid *= __ecereMethod___ecereNameSpace__ecere__sys__BTNode_Check(this->right, tree);
992 if(this->depth != __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_depthProp(this))
994 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));
995 valid = (unsigned int)0;
997 if(diffHeight < -1 || diffHeight > 1)
999 valid = (unsigned int)0;
1000 printf("Height difference is %d at node %d\n", diffHeight, this->key);
1002 if(diffHeight != __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_balanceFactor(this))
1004 valid = (unsigned int)0;
1005 printf("Height difference %d doesnt match balance-factor of %d at node \n", diffHeight, __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_balanceFactor(this), this->key);
1007 if(this->left && tree->CompareKey(tree, this->left->key, this->key) > 0)
1010 printf("Node %d is *smaller* than left subtree %d\n", this->key, this->left->key);
1012 if(this->right && tree->CompareKey(tree, this->right->key, this->key) < 0)
1015 printf("Node %d is *greater* than right subtree %d\n", this->key, this->right->key);
1020 struct __ecereNameSpace__ecere__sys__StringBTNode
1023 struct __ecereNameSpace__ecere__sys__StringBTNode * parent, * left, * right;
1025 } __attribute__ ((gcc_struct));
1027 static struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__StringBTNode;
1029 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_String;
1031 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)
1033 if((struct __ecereNameSpace__ecere__sys__StringBTNode *)this)
1035 unsigned int truth = 0x1;
1037 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Serialize(channel, __ecereClass_bool, &truth);
1038 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Serialize(channel, __ecereClass_String, this->key);
1039 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Serialize(channel, __ecereClass___ecereNameSpace__ecere__sys__StringBTNode, this->left);
1040 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Serialize(channel, __ecereClass___ecereNameSpace__ecere__sys__StringBTNode, this->right);
1044 unsigned int nothing = 0;
1046 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Serialize(channel, __ecereClass_uint, ¬hing);
1050 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)
1054 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Unserialize(channel, __ecereClass_bool, &truth);
1057 (*this) = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__StringBTNode);
1058 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Unserialize(channel, __ecereClass_String, &(*this)->key);
1059 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Unserialize(channel, __ecereClass___ecereNameSpace__ecere__sys__StringBTNode, &(*this)->left);
1062 (*this)->left->parent = *(struct __ecereNameSpace__ecere__sys__StringBTNode **)this;
1064 __ecereMethod___ecereNameSpace__ecere__com__IOChannel_Unserialize(channel, __ecereClass___ecereNameSpace__ecere__sys__StringBTNode, &(*this)->right);
1067 (*this)->right->parent = *(struct __ecereNameSpace__ecere__sys__StringBTNode **)this;
1069 (*this)->depth = __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_depthProp(((struct __ecereNameSpace__ecere__sys__BTNode *)*(struct __ecereNameSpace__ecere__sys__StringBTNode **)this));
1072 (*this) = (((void *)0));
1075 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);
1077 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__NameSpace;
1079 struct __ecereNameSpace__ecere__com__NameSpace
1082 struct __ecereNameSpace__ecere__com__NameSpace * btParent;
1083 struct __ecereNameSpace__ecere__com__NameSpace * left;
1084 struct __ecereNameSpace__ecere__com__NameSpace * right;
1086 struct __ecereNameSpace__ecere__com__NameSpace * parent;
1087 struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
1088 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
1089 struct __ecereNameSpace__ecere__sys__BinaryTree defines;
1090 struct __ecereNameSpace__ecere__sys__BinaryTree functions;
1091 } __attribute__ ((gcc_struct));
1093 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Module;
1095 struct __ecereNameSpace__ecere__com__Module
1097 struct __ecereNameSpace__ecere__com__Instance * application;
1098 struct __ecereNameSpace__ecere__sys__OldList classes;
1099 struct __ecereNameSpace__ecere__sys__OldList defines;
1100 struct __ecereNameSpace__ecere__sys__OldList functions;
1101 struct __ecereNameSpace__ecere__sys__OldList modules;
1102 struct __ecereNameSpace__ecere__com__Instance * prev;
1103 struct __ecereNameSpace__ecere__com__Instance * next;
1109 struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
1110 struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
1111 } __attribute__ ((gcc_struct));
1113 extern struct __ecereNameSpace__ecere__com__Instance * __thisModule;
1115 extern void __ecereNameSpace__ecere__com__eEnum_AddFixedValue(struct __ecereNameSpace__ecere__com__Class * _class, char * string, int value);
1117 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__GlobalFunction;
1119 struct __ecereNameSpace__ecere__com__GlobalFunction;
1121 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);
1123 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);
1125 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);
1127 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);
1129 void __ecereRegisterModule_BTNode(struct __ecereNameSpace__ecere__com__Instance * module)
1131 struct __ecereNameSpace__ecere__com__Class * class;
1133 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(4, "ecere::sys::TreePrintStyle", 0, 0, 0, 0, 0, module, 4, 1);
1134 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
1135 __ecereClass___ecereNameSpace__ecere__sys__TreePrintStyle = class;
1136 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "inOrder", 0);
1137 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "postOrder", 1);
1138 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "preOrder", 2);
1139 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "depthOrder", 3);
1140 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ecere::sys::strcatf", "void ecere::sys::strcatf(char * string, char * format, ...)", __ecereNameSpace__ecere__sys__strcatf, module, 4);
1141 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "ecere::sys::BTNode", 0, sizeof(struct __ecereNameSpace__ecere__sys__BTNode), 0, 0, 0, module, 4, 1);
1142 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
1143 __ecereClass___ecereNameSpace__ecere__sys__BTNode = class;
1144 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "OnSerialize", 0, __ecereMethod___ecereNameSpace__ecere__sys__BTNode_OnSerialize, 1);
1145 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "OnUnserialize", 0, __ecereMethod___ecereNameSpace__ecere__sys__BTNode_OnUnserialize, 1);
1146 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "FindPrefix", "ecere::sys::BTNode FindPrefix(char * key)", __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindPrefix, 1);
1147 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "FindString", "ecere::sys::BTNode FindString(char * key)", __ecereMethod___ecereNameSpace__ecere__sys__BTNode_FindString, 1);
1148 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "key", "uintptr", arch_PointerSize, arch_PointerSize, 1);
1149 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "parent", "ecere::sys::BTNode", arch_PointerSize, arch_PointerSize, 1);
1150 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "left", "ecere::sys::BTNode", arch_PointerSize, arch_PointerSize, 1);
1151 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "right", "ecere::sys::BTNode", arch_PointerSize, arch_PointerSize, 1);
1152 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "depth", "int", 4, 4, 1);
1153 __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);
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_prev = __ecerePropM___ecereNameSpace__ecere__sys__BTNode_prev, __ecerePropM___ecereNameSpace__ecere__sys__BTNode_prev = (void *)0;
1156 __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);
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_next = __ecerePropM___ecereNameSpace__ecere__sys__BTNode_next, __ecerePropM___ecereNameSpace__ecere__sys__BTNode_next = (void *)0;
1159 __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);
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_minimum = __ecerePropM___ecereNameSpace__ecere__sys__BTNode_minimum, __ecerePropM___ecereNameSpace__ecere__sys__BTNode_minimum = (void *)0;
1162 __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);
1163 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application)
1164 __ecereProp___ecereNameSpace__ecere__sys__BTNode_maximum = __ecerePropM___ecereNameSpace__ecere__sys__BTNode_maximum, __ecerePropM___ecereNameSpace__ecere__sys__BTNode_maximum = (void *)0;
1165 __ecerePropM___ecereNameSpace__ecere__sys__BTNode_count = __ecereNameSpace__ecere__com__eClass_AddProperty(class, "count", "int", 0, __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_count, 1);
1166 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application)
1167 __ecereProp___ecereNameSpace__ecere__sys__BTNode_count = __ecerePropM___ecereNameSpace__ecere__sys__BTNode_count, __ecerePropM___ecereNameSpace__ecere__sys__BTNode_count = (void *)0;
1168 __ecerePropM___ecereNameSpace__ecere__sys__BTNode_depthProp = __ecereNameSpace__ecere__com__eClass_AddProperty(class, "depthProp", "int", 0, __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_depthProp, 1);
1169 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application)
1170 __ecereProp___ecereNameSpace__ecere__sys__BTNode_depthProp = __ecerePropM___ecereNameSpace__ecere__sys__BTNode_depthProp, __ecerePropM___ecereNameSpace__ecere__sys__BTNode_depthProp = (void *)0;
1171 __ecerePropM___ecereNameSpace__ecere__sys__BTNode_balanceFactor = __ecereNameSpace__ecere__com__eClass_AddProperty(class, "balanceFactor", "int", 0, __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_balanceFactor, 2);
1172 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application)
1173 __ecereProp___ecereNameSpace__ecere__sys__BTNode_balanceFactor = __ecerePropM___ecereNameSpace__ecere__sys__BTNode_balanceFactor, __ecerePropM___ecereNameSpace__ecere__sys__BTNode_balanceFactor = (void *)0;
1175 class->fixed = (unsigned int)1;
1176 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "ecere::sys::StringBTNode", 0, sizeof(struct __ecereNameSpace__ecere__sys__StringBTNode), 0, 0, 0, module, 4, 1);
1177 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
1178 __ecereClass___ecereNameSpace__ecere__sys__StringBTNode = class;
1179 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "OnSerialize", 0, __ecereMethod___ecereNameSpace__ecere__sys__StringBTNode_OnSerialize, 1);
1180 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "OnUnserialize", 0, __ecereMethod___ecereNameSpace__ecere__sys__StringBTNode_OnUnserialize, 1);
1181 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "key", "String", arch_PointerSize, arch_PointerSize, 1);
1182 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "parent", "ecere::sys::StringBTNode", arch_PointerSize, arch_PointerSize, 1);
1183 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "left", "ecere::sys::StringBTNode", arch_PointerSize, arch_PointerSize, 1);
1184 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "right", "ecere::sys::StringBTNode", arch_PointerSize, arch_PointerSize, 1);
1185 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "depth", "int", 4, 4, 1);
1187 class->fixed = (unsigned int)1;
1190 void __ecereUnregisterModule_BTNode(struct __ecereNameSpace__ecere__com__Instance * module)
1193 __ecerePropM___ecereNameSpace__ecere__sys__BTNode_prev = (void *)0;
1194 __ecerePropM___ecereNameSpace__ecere__sys__BTNode_next = (void *)0;
1195 __ecerePropM___ecereNameSpace__ecere__sys__BTNode_minimum = (void *)0;
1196 __ecerePropM___ecereNameSpace__ecere__sys__BTNode_maximum = (void *)0;
1197 __ecerePropM___ecereNameSpace__ecere__sys__BTNode_count = (void *)0;
1198 __ecerePropM___ecereNameSpace__ecere__sys__BTNode_depthProp = (void *)0;
1199 __ecerePropM___ecereNameSpace__ecere__sys__BTNode_balanceFactor = (void *)0;