paraslash Paraslash Audio Streaming
About   News   Download   Documentation   Development

Data Fields
btr_node_description Struct Reference

Structure for creating new buffer tree nodes. More...

#include <buffer_tree.h>

Data Fields

const char * name
 Name of the new node. More...
 
struct btr_node * parent
 Parent of the new node. More...
 
struct btr_node * child
 Child of the new node. More...
 
btr_command_handler handler
 Used for inter node communication. More...
 
void * context
 Points usually to the struct that contains the node pointer. More...
 

Detailed Description

Structure for creating new buffer tree nodes.

btr_new_node() takes a pointer to such a structure.

There are four different combinations of parent and child:

  1. both NULL. This creates a new buffer tree with a single isolated node.
  2. parent != NULL, child == NULL. This creates a new leaf node by adding the new node to the list of children of the given parent node.
  3. parent == NULL, child != NULL. The new node becomes the new root of the buffer tree. The child must be old root.
  4. both != NULL. This creates a new internal node. child must be child of p. This mode of operation is currently not needed and is thus not yet implemented.

Field Documentation

◆ name

const char* name

Name of the new node.

Referenced by btr_new_node().

◆ parent

struct btr_node* parent

Parent of the new node.

Referenced by btr_new_node().

◆ child

struct btr_node* child

Child of the new node.

◆ handler

Used for inter node communication.

Optional.

Referenced by btr_new_node().

◆ context

void* context

Points usually to the struct that contains the node pointer.

Referenced by btr_new_node().


The documentation for this struct was generated from the following file: