TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
rb.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define rb_node(a_type)
 
#define rb_tree(a_type)
 
#define rbtn_left_get(a_type, a_field, a_node)   ((a_node)->a_field.rbn_left)
 
#define rbtn_left_set(a_type, a_field, a_node, a_left)
 
#define rbtn_right_get(a_type, a_field, a_node)   ((a_node)->a_field.rbn_right)
 
#define rbtn_right_set(a_type, a_field, a_node, a_right)
 
#define rbtn_red_get(a_type, a_field, a_node)   ((a_node)->a_field.rbn_red)
 
#define rbtn_color_set(a_type, a_field, a_node, a_red)
 
#define rbtn_red_set(a_type, a_field, a_node)
 
#define rbtn_black_set(a_type, a_field, a_node)
 
#define rbt_node_new(a_type, a_field, a_rbt, a_node)
 
#define rb_new(a_type, a_field, a_rbt)
 
#define rbtn_first(a_type, a_field, a_rbt, a_root, r_node)
 
#define rbtn_last(a_type, a_field, a_rbt, a_root, r_node)
 
#define rbtn_rotate_left(a_type, a_field, a_node, r_node)
 
#define rbtn_rotate_right(a_type, a_field, a_node, r_node)
 
#define rb_proto(a_attr, a_prefix, a_rbt_type, a_type)
 
#define rb_gen(a_attr, a_prefix, a_rbt_type, a_type, a_field, a_cmp)
 

Macro Definition Documentation

#define rb_gen (   a_attr,
  a_prefix,
  a_rbt_type,
  a_type,
  a_field,
  a_cmp 
)
#define rb_new (   a_type,
  a_field,
  a_rbt 
)
Value:
do { \
(a_rbt)->rbt_root = &(a_rbt)->rbt_nil; \
rbt_node_new(a_type, a_field, a_rbt, &(a_rbt)->rbt_nil); \
rbtn_black_set(a_type, a_field, &(a_rbt)->rbt_nil); \
} while (0)
#define rbtn_black_set(a_type, a_field, a_node)
Definition: rb.h:99
#define rbt_node_new(a_type, a_field, a_rbt, a_node)
Definition: rb.h:105
#define rb_node (   a_type)
Value:
struct { \
a_type *rbn_left; \
a_type *rbn_right; \
bool rbn_red; \
}
#define bool
Definition: CascPort.h:16
#define rb_proto (   a_attr,
  a_prefix,
  a_rbt_type,
  a_type 
)
Value:
a_attr void \
a_prefix##new(a_rbt_type *rbtree); \
a_attr a_type * \
a_prefix##first(a_rbt_type *rbtree); \
a_attr a_type * \
a_prefix##last(a_rbt_type *rbtree); \
a_attr a_type * \
a_prefix##next(a_rbt_type *rbtree, a_type *node); \
a_attr a_type * \
a_prefix##prev(a_rbt_type *rbtree, a_type *node); \
a_attr a_type * \
a_prefix##search(a_rbt_type *rbtree, a_type *key); \
a_attr a_type * \
a_prefix##nsearch(a_rbt_type *rbtree, a_type *key); \
a_attr a_type * \
a_prefix##psearch(a_rbt_type *rbtree, a_type *key); \
a_attr void \
a_prefix##insert(a_rbt_type *rbtree, a_type *node); \
a_attr void \
a_prefix##remove(a_rbt_type *rbtree, a_type *node); \
a_attr a_type * \
a_prefix##iter(a_rbt_type *rbtree, a_type *start, a_type *(*cb)( \
a_rbt_type *, a_type *, void *), void *arg); \
a_attr a_type * \
a_prefix##reverse_iter(a_rbt_type *rbtree, a_type *start, \
a_type *(*cb)(a_rbt_type *, a_type *, void *), void *arg);
int next(int i, int n)
Definition: RecastContour.cpp:469
internal::NamedArg< char > arg(StringRef name, const T &arg)
Definition: format.h:3248
int prev(int i, int n)
Definition: RecastContour.cpp:468
#define rb_tree (   a_type)
Value:
struct { \
a_type *rbt_root; \
a_type rbt_nil; \
}
#define rbt_node_new (   a_type,
  a_field,
  a_rbt,
  a_node 
)
Value:
do { \
rbtn_left_set(a_type, a_field, (a_node), &(a_rbt)->rbt_nil); \
rbtn_right_set(a_type, a_field, (a_node), &(a_rbt)->rbt_nil); \
rbtn_red_set(a_type, a_field, (a_node)); \
} while (0)
#define rbtn_right_set(a_type, a_field, a_node, a_right)
Definition: rb.h:86
#define rbtn_left_set(a_type, a_field, a_node, a_left)
Definition: rb.h:51
#define rbtn_red_set(a_type, a_field, a_node)
Definition: rb.h:96
#define rbtn_black_set (   a_type,
  a_field,
  a_node 
)
Value:
do { \
(a_node)->a_field.rbn_red = false; \
} while (0)
#define rbtn_color_set (   a_type,
  a_field,
  a_node,
  a_red 
)
Value:
do { \
(a_node)->a_field.rbn_red = (a_red); \
} while (0)
#define rbtn_first (   a_type,
  a_field,
  a_rbt,
  a_root,
  r_node 
)
Value:
do { \
(r_node) = (a_root); \
if ((r_node) != &(a_rbt)->rbt_nil) { \
for (; \
rbtn_left_get(a_type, a_field, (r_node)) != &(a_rbt)->rbt_nil;\
(r_node) = rbtn_left_get(a_type, a_field, (r_node))) { \
} \
} \
} while (0)
#define rbtn_left_get(a_type, a_field, a_node)
Definition: rb.h:49
#define rbtn_last (   a_type,
  a_field,
  a_rbt,
  a_root,
  r_node 
)
Value:
do { \
(r_node) = (a_root); \
if ((r_node) != &(a_rbt)->rbt_nil) { \
for (; rbtn_right_get(a_type, a_field, (r_node)) != \
&(a_rbt)->rbt_nil; (r_node) = rbtn_right_get(a_type, a_field, \
(r_node))) { \
} \
} \
} while (0)
#define rbtn_right_get(a_type, a_field, a_node)
Definition: rb.h:84
#define rbtn_left_get (   a_type,
  a_field,
  a_node 
)    ((a_node)->a_field.rbn_left)
#define rbtn_left_set (   a_type,
  a_field,
  a_node,
  a_left 
)
Value:
do { \
(a_node)->a_field.rbn_left = a_left; \
} while (0)
#define rbtn_red_get (   a_type,
  a_field,
  a_node 
)    ((a_node)->a_field.rbn_red)
#define rbtn_red_set (   a_type,
  a_field,
  a_node 
)
Value:
do { \
(a_node)->a_field.rbn_red = true; \
} while (0)
#define rbtn_right_get (   a_type,
  a_field,
  a_node 
)    ((a_node)->a_field.rbn_right)
#define rbtn_right_set (   a_type,
  a_field,
  a_node,
  a_right 
)
Value:
do { \
(a_node)->a_field.rbn_right = a_right; \
} while (0)
#define rbtn_rotate_left (   a_type,
  a_field,
  a_node,
  r_node 
)
Value:
do { \
(r_node) = rbtn_right_get(a_type, a_field, (a_node)); \
rbtn_right_set(a_type, a_field, (a_node), \
rbtn_left_get(a_type, a_field, (r_node))); \
rbtn_left_set(a_type, a_field, (r_node), (a_node)); \
} while (0)
#define rbtn_left_get(a_type, a_field, a_node)
Definition: rb.h:49
#define rbtn_right_set(a_type, a_field, a_node, a_right)
Definition: rb.h:86
#define rbtn_left_set(a_type, a_field, a_node, a_left)
Definition: rb.h:51
#define rbtn_right_get(a_type, a_field, a_node)
Definition: rb.h:84
#define rbtn_rotate_right (   a_type,
  a_field,
  a_node,
  r_node 
)
Value:
do { \
(r_node) = rbtn_left_get(a_type, a_field, (a_node)); \
rbtn_left_set(a_type, a_field, (a_node), \
rbtn_right_get(a_type, a_field, (r_node))); \
rbtn_right_set(a_type, a_field, (r_node), (a_node)); \
} while (0)
#define rbtn_left_get(a_type, a_field, a_node)
Definition: rb.h:49
#define rbtn_right_set(a_type, a_field, a_node, a_right)
Definition: rb.h:86
#define rbtn_left_set(a_type, a_field, a_node, a_left)
Definition: rb.h:51
#define rbtn_right_get(a_type, a_field, a_node)
Definition: rb.h:84