Dyninst::IBSTree< ITYPE > Class Template Reference

#include <IBSTree.h>

Public Member Functions

 IBSTree ()
 ~IBSTree ()
int size () const
int CountMarks () const
bool empty () const
void insert (ITYPE *)
void remove (ITYPE *)
int find (interval_type, set< ITYPE * > &) const
int find (ITYPE *I, set< ITYPE * > &) const
void successor (interval_type X, set< ITYPE * > &) const
ITYPE * successor (interval_type X) const
void clear ()
void PrintPreorder ()

Private Types

typedef ITYPE::type interval_type

Private Member Functions

void leftRotate (IBSNode< ITYPE > *)
void rightRotate (IBSNode< ITYPE > *)
void deleteFixup (IBSNode< ITYPE > *)
void removeInterval (IBSNode< ITYPE > *R, ITYPE *range)
IBSNode< ITYPE > * addLeft (ITYPE *I, IBSNode< ITYPE > *R)
IBSNode< ITYPE > * addRight (ITYPE *I, IBSNode< ITYPE > *R)
interval_type rightUp (IBSNode< ITYPE > *R)
interval_type leftUp (IBSNode< ITYPE > *R)
void insertFixup (IBSNode< ITYPE > *x)
void destroy (IBSNode< ITYPE > *)
void findIntervals (interval_type X, IBSNode< ITYPE > *R, set< ITYPE * > &S) const
void findIntervals (ITYPE *I, IBSNode< ITYPE > *R, set< ITYPE * > &S) const
void PrintPreorder (IBSNode< ITYPE > *n)
int height (IBSNode< ITYPE > *n)
int CountMarks (IBSNode< ITYPE > *R) const
unsigned MemUse () const

Private Attributes

IBSNode< ITYPE > * nil
int treeSize
IBSNode< ITYPE > * root

Detailed Description

template<class ITYPE = interval<>>
class Dyninst::IBSTree< ITYPE >

Definition at line 163 of file IBSTree.h.


Member Typedef Documentation

template<class ITYPE = interval<>>
typedef ITYPE::type Dyninst::IBSTree< ITYPE >::interval_type [private]

Definition at line 164 of file IBSTree.h.


Constructor & Destructor Documentation

template<class ITYPE = interval<>>
Dyninst::IBSTree< ITYPE >::IBSTree (  )  [inline]

public for debugging purposes

Definition at line 226 of file IBSTree.h.

References Dyninst::IBSTree< ITYPE >::nil, and Dyninst::IBSTree< ITYPE >::root.

template<class ITYPE = interval<>>
Dyninst::IBSTree< ITYPE >::~IBSTree (  )  [inline]

Member Function Documentation

template<class ITYPE >
IBSNode< ITYPE > * Dyninst::IBSTree< ITYPE >::addLeft ( ITYPE *  I,
IBSNode< ITYPE > *  R 
) [inline, private]
template<class ITYPE >
IBSNode< ITYPE > * Dyninst::IBSTree< ITYPE >::addRight ( ITYPE *  I,
IBSNode< ITYPE > *  R 
) [inline, private]
template<class ITYPE >
void Dyninst::IBSTree< ITYPE >::clear (  )  [inline]
template<class ITYPE >
int Dyninst::IBSTree< ITYPE >::CountMarks (  )  const [inline]

Definition at line 883 of file IBSTree.h.

References Dyninst::IBSTree< ITYPE >::root.

Referenced by Dyninst::IBSTree< ITYPE >::CountMarks().

template<class ITYPE >
int Dyninst::IBSTree< ITYPE >::CountMarks ( IBSNode< ITYPE > *  R  )  const [inline, private]
template<class ITYPE = interval<>>
void Dyninst::IBSTree< ITYPE >::deleteFixup ( IBSNode< ITYPE > *   )  [private]

Node deletion

template<class ITYPE >
void Dyninst::IBSTree< ITYPE >::destroy ( IBSNode< ITYPE > *  n  )  [inline, private]

Finds the precessor of the node; this node will have its value copied to the target node of a deletion and will itself be deleted Find a node with the provided value (interval endpoint) Delete all nodes in the subtree rooted at the parameter

Definition at line 617 of file IBSTree.h.

References Dyninst::IBSNode< ITYPE >::left, Dyninst::IBSTree< ITYPE >::nil, and Dyninst::IBSNode< ITYPE >::right.

Referenced by Dyninst::IBSTree< ITYPE >::clear(), and Dyninst::IBSTree< ITYPE >::~IBSTree().

template<class ITYPE = interval<>>
bool Dyninst::IBSTree< ITYPE >::empty (  )  const [inline]

Definition at line 241 of file IBSTree.h.

References Dyninst::IBSTree< ITYPE >::nil, and Dyninst::IBSTree< ITYPE >::root.

template<class ITYPE >
int Dyninst::IBSTree< ITYPE >::find ( ITYPE *  I,
set< ITYPE * > &  out 
) const [inline]
template<class ITYPE >
int Dyninst::IBSTree< ITYPE >::find ( interval_type  X,
set< ITYPE * > &  out 
) const [inline]

Find all intervals that overlap the provided point. Returns the number of intervals found

Definition at line 772 of file IBSTree.h.

References Dyninst::IBSTree< ITYPE >::findIntervals(), Dyninst::IBSTree< ITYPE >::root, and Dyninst::IBSTree< ITYPE >::size().

template<class ITYPE >
void Dyninst::IBSTree< ITYPE >::findIntervals ( ITYPE *  I,
IBSNode< ITYPE > *  R,
set< ITYPE * > &  S 
) const [inline, private]
template<class ITYPE >
void Dyninst::IBSTree< ITYPE >::findIntervals ( interval_type  X,
IBSNode< ITYPE > *  R,
set< ITYPE * > &  S 
) const [inline, private]
template<class ITYPE >
int Dyninst::IBSTree< ITYPE >::height ( IBSNode< ITYPE > *  n  )  [inline, private]
template<class ITYPE >
void Dyninst::IBSTree< ITYPE >::insert ( ITYPE *  range  )  [inline]
template<class ITYPE >
void Dyninst::IBSTree< ITYPE >::insertFixup ( IBSNode< ITYPE > *  x  )  [inline, private]
template<class ITYPE >
void Dyninst::IBSTree< ITYPE >::leftRotate ( IBSNode< ITYPE > *  pivot  )  [inline, private]
template<class ITYPE >
ITYPE::type Dyninst::IBSTree< ITYPE >::leftUp ( IBSNode< ITYPE > *  R  )  [inline, private]

Symmetric to rightUp

Definition at line 559 of file IBSTree.h.

References Dyninst::IBSNode< ITYPE >::parent.

Referenced by Dyninst::IBSTree< ITYPE >::addRight().

template<class ITYPE = interval<>>
unsigned Dyninst::IBSTree< ITYPE >::MemUse (  )  const [private]
template<class ITYPE = interval<>>
void Dyninst::IBSTree< ITYPE >::PrintPreorder (  )  [inline]
template<class ITYPE >
void Dyninst::IBSTree< ITYPE >::PrintPreorder ( IBSNode< ITYPE > *  n  )  [inline, private]
template<class ITYPE >
void Dyninst::IBSTree< ITYPE >::remove ( ITYPE *  range  )  [inline]
template<class ITYPE >
void Dyninst::IBSTree< ITYPE >::removeInterval ( IBSNode< ITYPE > *  R,
ITYPE *  range 
) [inline, private]
template<class ITYPE >
void Dyninst::IBSTree< ITYPE >::rightRotate ( IBSNode< ITYPE > *  pivot  )  [inline, private]
template<class ITYPE >
ITYPE::type Dyninst::IBSTree< ITYPE >::rightUp ( IBSNode< ITYPE > *  R  )  [inline, private]

Find the lowest valued ancestor of node R that has R in its left subtree -- used in addLeft to determine whether all of the values in R's right subtree are covered by an interval

Definition at line 545 of file IBSTree.h.

References Dyninst::IBSNode< ITYPE >::parent.

Referenced by Dyninst::IBSTree< ITYPE >::addLeft().

template<class ITYPE = interval<>>
int Dyninst::IBSTree< ITYPE >::size (  )  const [inline]

Definition at line 238 of file IBSTree.h.

References Dyninst::IBSTree< ITYPE >::treeSize.

Referenced by Dyninst::IBSTree< ITYPE >::find().

template<class ITYPE >
ITYPE * Dyninst::IBSTree< ITYPE >::successor ( interval_type  X  )  const [inline]

Use only when no two intervals share the same lower bound

Definition at line 833 of file IBSTree.h.

References Dyninst::IBSTree< ITYPE >::successor().

template<class ITYPE >
void Dyninst::IBSTree< ITYPE >::successor ( interval_type  X,
set< ITYPE * > &  out 
) const [inline]

Field Documentation

template<class ITYPE = interval<>>
IBSNode<ITYPE>* Dyninst::IBSTree< ITYPE >::nil [private]
template<class ITYPE = interval<>>
IBSNode<ITYPE>* Dyninst::IBSTree< ITYPE >::root [private]
template<class ITYPE = interval<>>
int Dyninst::IBSTree< ITYPE >::treeSize [private]

The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 12 Jul 2013 for SymtabAPI by  doxygen 1.6.1