|
gwenhywfar 5.14.1
|
#include "tree2_p.h"#include <gwenhywfar/misc.h>#include <gwenhywfar/debug.h>
Go to the source code of this file.
Macros | |
| #define | DISABLE_DEBUGLOG |
Functions | |
| void | GWEN_Tree2_AddChild (GWEN_TREE2_ELEMENT *where, GWEN_TREE2_ELEMENT *el) |
| void | GWEN_Tree2_InsertChild (GWEN_TREE2_ELEMENT *where, GWEN_TREE2_ELEMENT *el) |
| void | GWEN_Tree2_Replace (GWEN_TREE2_ELEMENT *elToReplace, GWEN_TREE2_ELEMENT *elReplacement) |
| void | GWEN_Tree2_Unlink (GWEN_TREE2_ELEMENT *el) |
| void | GWEN_Tree2Element_free (GWEN_TREE2_ELEMENT *el) |
| void * | GWEN_Tree2Element_GetBelow (const GWEN_TREE2_ELEMENT *el) |
| void * | GWEN_Tree2Element_GetFirstChild (const GWEN_TREE2_ELEMENT *el) |
| void * | GWEN_Tree2Element_GetLastChild (const GWEN_TREE2_ELEMENT *el) |
| void * | GWEN_Tree2Element_GetNext (const GWEN_TREE2_ELEMENT *el) |
| void * | GWEN_Tree2Element_GetParent (const GWEN_TREE2_ELEMENT *el) |
| void * | GWEN_Tree2Element_GetPrevious (const GWEN_TREE2_ELEMENT *el) |
| GWEN_TREE2_ELEMENT * | GWEN_Tree2Element_new (void *d) |
| void GWEN_Tree2_AddChild | ( | GWEN_TREE2_ELEMENT * | where, |
| GWEN_TREE2_ELEMENT * | el ) |
Add a child below the given element.
Definition at line 122 of file tree2.c.
References GWEN_TREE2_ELEMENT, and NULL.
| void GWEN_Tree2_InsertChild | ( | GWEN_TREE2_ELEMENT * | where, |
| GWEN_TREE2_ELEMENT * | el ) |
Insert a child below the given element.
Definition at line 137 of file tree2.c.
References GWEN_TREE2_ELEMENT, and NULL.
| void GWEN_Tree2_Replace | ( | GWEN_TREE2_ELEMENT * | elToReplace, |
| GWEN_TREE2_ELEMENT * | elReplacement ) |
Replaces a tree element with another one, so the replacement takes the place of the given element. The given element to replace is unlinked in the process and can be free'd. The replacement MUST NOT be part of any tree.
Definition at line 90 of file tree2.c.
References GWEN_TREE2_ELEMENT, and NULL.
| void GWEN_Tree2_Unlink | ( | GWEN_TREE2_ELEMENT * | el | ) |
Unlinks (removes) a tree element from the tree it used to belong to. The tree element is not free'd or anything, it is only removed from the tree it used to belong to. (This operation is also called "remove" elsewhere.)
Definition at line 64 of file tree2.c.
References GWEN_TREE2_ELEMENT, and NULL.
| void GWEN_Tree2Element_free | ( | GWEN_TREE2_ELEMENT * | el | ) |
Free (delete) a list element structure.
Definition at line 51 of file tree2.c.
References DBG_ERROR, GWEN_FREE_OBJECT, GWEN_LOGDOMAIN, and GWEN_TREE2_ELEMENT.
| void * GWEN_Tree2Element_GetBelow | ( | const GWEN_TREE2_ELEMENT * | el | ) |
Returns the element which is logically below the given one. The order of search is this:
Definition at line 168 of file tree2.c.
References GWEN_TREE2_ELEMENT, and NULL.
| void * GWEN_Tree2Element_GetFirstChild | ( | const GWEN_TREE2_ELEMENT * | el | ) |
Returns the first child of the given element.
Definition at line 189 of file tree2.c.
References GWEN_TREE2_ELEMENT, and NULL.
| void * GWEN_Tree2Element_GetLastChild | ( | const GWEN_TREE2_ELEMENT * | el | ) |
Returns the last child of the given element.
Definition at line 198 of file tree2.c.
References GWEN_TREE2_ELEMENT, and NULL.
| void * GWEN_Tree2Element_GetNext | ( | const GWEN_TREE2_ELEMENT * | el | ) |
Returns the data pointer of the list element that is the next one (successor) to the given one in its list. If there is no such prepending list element, returns NULL.
Definition at line 159 of file tree2.c.
References GWEN_TREE2_ELEMENT.
| void * GWEN_Tree2Element_GetParent | ( | const GWEN_TREE2_ELEMENT * | el | ) |
Definition at line 207 of file tree2.c.
References GWEN_TREE2_ELEMENT, and NULL.
| void * GWEN_Tree2Element_GetPrevious | ( | const GWEN_TREE2_ELEMENT * | el | ) |
Returns the data pointer of the list element that is the previous (predecessor) to the given one in its list. If there is no such prepending list element, returns NULL.
Definition at line 150 of file tree2.c.
References GWEN_TREE2_ELEMENT.
| GWEN_TREE2_ELEMENT * GWEN_Tree2Element_new | ( | void * | d | ) |
Allocate (create) a new list element structure.
Definition at line 39 of file tree2.c.
References GWEN_NEW_OBJECT, and GWEN_TREE2_ELEMENT.