imultiset.h File Reference

"Invasive" set of ordered, non-unique data More...

#include "ctl/tree.h"

Include dependency graph for imultiset.h:

Go to the source code of this file.

Defines

#define ctl_imultiset(type, mlabel, compare)   ctl_tree(ctlt_relative(offsetof(type,mlabel)),ctlt_multiple)
 Get the class name of the 'multiset'; a tree that can contain multiple instances of data.
#define ctl_imultiset_decllink(type, mlabel)   ctlt_node_type(ctlt_relative(offsetof(type,mlabel)),ctlt_multiple) mlabel
 Declare a tree link member.
#define ctl_imultiset_initlink(type, mlabel, curr)   ctl_tree_node_init(ctlt_relative(offsetof(type,mlabel)),ctlt_multiple, &curr->mlabel)
 Initialize a link.
#define ctl_imultiset_auto(type, mlabel, compare, ilabel)   ctl_tree_auto(ctlt_relative(offsetof(type,mlabel)),ctlt_multiple, compare, ilabel )
 Make a tree from auto variables for stack or global use Uses non-standard ANSI extension: non-const initializers.
#define ctl_imultiset_init(type, mlabel, compare, ilabel)   ctl_tree_init(ctlt_relative(offsetof(type,mlabel)),ctlt_multiple, compare, ilabel )
 Make a tree initially empty.
#define ctl_imultiset_size(type, mlabel, ilabel)   ctl_tree_size(ctlt_relative(offsetof(type,mlabel)),ctlt_multiple, ilabel )
 Get size of tree.
#define ctl_imultiset_insert(type, mlabel, ilabel, data)   (type*)ctl_tree_(ctlt_relative(offsetof(type,mlabel)),ctlt_multiple, insert)( (ilabel), (data) )
 Insert a new member (MUST NOT BE IN ANY OTHER TREE).
#define ctl_imultiset_find(type, mlabel, ilabel, value)   (type*)ctl_tree_(ctlt_relative(offsetof(type,mlabel)),ctlt_multiple, find)( (ilabel), (value) )
 Find a member, given a template member as a value.
#define ctl_imultiset_remove(type, mlabel, ilabel, value)   (type*)ctl_tree_(ctlt_relative(offsetof(type,mlabel)),ctlt_multiple, remove)( (ilabel), (value) )
 Remove a member.
#define ctl_imultiset_unlink(type, mlabel, ilabel, data)   (type*)ctl_tree_(ctlt_relative(offsetof(type,mlabel)),ctlt_multiple, unlink)( (ilabel), (data) )
 Remove a member.
#define ctl_imultiset_reset(type, mlabel, ilabel)   ctl_tree_(ctlt_relative(offsetof(type,mlabel)),ctlt_multiple, reset)( ilabel )
 Remove a all tree members member.
#define ctl_imultiset_front(type, mlabel, ilabel)   ctl_tree_(ctlt_relative(offsetof(type,mlabel)),ctlt_multiple, front)( ilabel )
 Get first member of set.
#define ctl_imultiset_back(type, mlabel, ilabel)   ctl_tree_(ctlt_relative(offsetof(type,mlabel)),ctlt_multiple, back)( ilabel )
 Get last member of set.
#define ctl_imultiset_pop_front(type, mlabel, ilabel)   ctl_tree_(ctlt_relative(offsetof(type,mlabel)),ctlt_multiple, pop_front)( ilabel )
 Get and remove the first member of the set.
#define ctl_imultiset_pop_back(type, mlabel, ilabel)   ctl_tree_(ctlt_relative(offsetof(type,mlabel)),ctlt_multiple, pop_back)( ilabel )
 Get and remove the last member of the set.
#define ctl_imultiset_foreach(type, mlabel, ilabel, label)
 set iterator Iterator is available after loop, so these loops should be wrapped in their own { } braces, if you don't want it interfering with other code
#define ctl_imultiset_foreach_const(type, mlabel, ilabel, label)
 Constant fixed C set iterator Iterator is available after loop, so these loops should be wrapped in their own { } braces, if you don't want it interfering with other code.
#define ctl_imultiset_foreach_reverse(type, mlabel, ilabel, label)
 Backward C set iterator Iterator is available after loop, so these loops should be wrapped in their own { } braces, if you don't want it interfering with other code.
#define ctl_imultiset_foreach_reverse_const(type, mlabel, ilabel, label)
 Backward, constant C set iterator Iterator is available after loop, so these loops should be wrapped in their own { } braces, if you don't want it interfering with other code.
#define ctl_imultiset_from(type, mlabel, ilabel, from, label)
 Iterators for avl data; from some point in tree to the end in a given direction.
#define ctl_imultiset_from_const(type, mlabel, ilabel, from, label)
 Const data variant.
#define ctl_imultiset_from_reverse(type, mlabel, ilabel, from, label)
 Iterate backwards variant.
#define ctl_imultiset_from_reverse_const(type, mlabel, ilabel, from, label)
 Const data variant of reverse variant.
#define ctl_imultiset_from_to(type, mlabel, ilabel, from, to, label)
 From->to iterators for avl data.
#define ctl_imultiset_from_to_const(type, mlabel, ilabel, from, to, label)
 Const data variant.
#define ctl_imultiset_from_to_reverse(type, mlabel, ilabel, from, to, label)
 Iterate backwards variant.
#define ctl_imultiset_from_to_reverse_const(type, mlabel, ilabel, from, to, label)
 Const data variant of reverse variant.


Detailed Description

"Invasive" set of ordered, non-unique data

Author:
David Mace Basically, this differs from std::multiset in a lot of ways, but the most fundamental way is that this integrates the tree node into the data. This change allows us to put a single allocated object into multiple sets without seperately allocated tree nodes.

Definition in file imultiset.h.


Generated on Fri Jan 2 15:28:35 2009 for Squat by  doxygen 1.5.6