Coin Logo Coin3D is Free Software,
published under the BSD 3-clause license.
https://bitbucket.org/Coin3D/
http://www.kongsberg.com/kogt/
rbptree.h File Reference
#include <Inventor/C/basic.h>
#include <stdarg.h>

Go to the source code of this file.

Classes

struct  cc_rbptree
 

Typedefs

typedef struct cc_rbptree_node cc_rbptree_node
 
typedef struct cc_rbptree cc_rbptree
 
typedef void cc_rbptree_traversecb(void *p, void *data, void *closure)
 

Functions

void cc_rbptree_init (cc_rbptree *t)
 
void cc_rbptree_clean (cc_rbptree *t)
 
void cc_rbptree_insert (cc_rbptree *t, void *p, void *data)
 
SbBool cc_rbptree_remove (cc_rbptree *t, void *p)
 
uint32_t cc_rbptree_size (const cc_rbptree *t)
 
void cc_rbptree_traverse (const cc_rbptree *t, cc_rbptree_traversecb *func, void *closure)
 
void cc_rbptree_debug (const cc_rbptree *t)
 

Typedef Documentation

◆ cc_rbptree_node

struct cc_rbptree_node cc_rbptree_node

The type definition for the rbptree node structure.

◆ cc_rbptree

The type definition for the whole rbptree structure.

◆ cc_rbptree_traversecb

void cc_rbptree_traversecb

The type definition for a tree traversal callback function.

Function Documentation

◆ cc_rbptree_init()

void cc_rbptree_init ( cc_rbptree t)

Initialize t. This is needed before making any operations on the tree.

◆ cc_rbptree_clean()

void cc_rbptree_clean ( cc_rbptree t)

Delete all nodes in t. After this call, the tree will be reinitialized to an empty tree.

◆ cc_rbptree_insert()

void cc_rbptree_insert ( cc_rbptree t,
void *  p,
void *  data 
)

Insert a new value p into t.

◆ cc_rbptree_remove()

SbBool cc_rbptree_remove ( cc_rbptree t,
void *  p 
)

Remove the (first) node with value p. Returns TRUE if p is found and removed, FALSE otherwise.

◆ cc_rbptree_size()

uint32_t cc_rbptree_size ( const cc_rbptree t)

Returns the total numbers of items in the tree

◆ cc_rbptree_traverse()

void cc_rbptree_traverse ( const cc_rbptree t,
cc_rbptree_traversecb func,
void *  closure 
)

Traverse the tree t

◆ cc_rbptree_debug()

void cc_rbptree_debug ( const cc_rbptree t)

for debugging only. Prints the tree to stdout.