Public Member Functions | |
short | daughter (void) const |
Node * | get (short daughter, short replica) |
Node (Node *parent, short daughter, short replica) | |
Node (void) | |
Node * | parent (void) const |
void | ref (void) |
short | replica (void) const |
void | unref (void) |
~Node (void) | |
Static Public Member Functions | |
static Node * | root (void) |
Private Attributes | |
Node * | m_children |
short | m_daughter |
Node * | m_parent |
unsigned | m_refs |
short | m_replica |
Node * | m_sibling |
Static Private Attributes | |
static Node * | s_root = new Node |
Definition at line 30 of file VisG4Path.h.
VisG4Path::Node::Node | ( | void | ) | [inline] |
Definition at line 88 of file VisG4Path.h.
Referenced by get().
00089 : m_parent (this), 00090 m_sibling (0), 00091 m_children (0), 00092 m_refs (1), 00093 m_daughter (-1), 00094 m_replica (-1) 00095 {}
VisG4Path::Node::Node | ( | Node * | parent, | |
short | daughter, | |||
short | replica | |||
) | [inline] |
Definition at line 98 of file VisG4Path.h.
References m_children, m_parent, and m_refs.
00099 : m_parent (parent), 00100 m_sibling (parent->m_children), 00101 m_children (0), 00102 m_refs (0), 00103 m_daughter (daughter), 00104 m_replica (replica) 00105 { m_parent->m_refs++; m_parent->m_children = this; }
VisG4Path::Node::~Node | ( | void | ) | [inline] |
Definition at line 108 of file VisG4Path.h.
References m_children, m_parent, m_refs, and m_sibling.
00109 { 00110 if (m_parent->m_children == this) 00111 m_parent->m_children = m_sibling; 00112 else 00113 { 00114 Node *prev = m_parent->m_children; 00115 while (prev->m_sibling != this) 00116 prev = prev->m_sibling; 00117 00118 prev->m_sibling = m_sibling; 00119 } 00120 00121 if (--m_parent->m_refs == 0) 00122 delete m_parent; 00123 }
short VisG4Path::Node::daughter | ( | void | ) | const [inline] |
Definition at line 137 of file VisG4Path.h.
References m_daughter.
Referenced by VisG4Path::daughter().
00138 { return m_daughter; }
VisG4Path::Node * VisG4Path::Node::get | ( | short | daughter, | |
short | replica | |||
) | [inline] |
Definition at line 149 of file VisG4Path.h.
References m_children, m_daughter, m_replica, m_sibling, n, and Node().
00150 { 00151 Node *n = m_children; 00152 while (n && ! (n->m_daughter == daughter && n->m_replica == replica)) 00153 n = n->m_sibling; 00154 00155 if (! n) 00156 n = new Node (this, daughter, replica); 00157 00158 return n; 00159 }
VisG4Path::Node * VisG4Path::Node::parent | ( | void | ) | const [inline] |
Definition at line 145 of file VisG4Path.h.
References m_parent.
Referenced by VisG4Path::prefix().
00146 { return m_parent; }
Definition at line 126 of file VisG4Path.h.
References m_refs.
Referenced by VisG4Path::operator=(), and VisG4Path::VisG4Path().
00127 { m_refs++; }
short VisG4Path::Node::replica | ( | void | ) | const [inline] |
Definition at line 141 of file VisG4Path.h.
References m_replica.
Referenced by VisG4Path::replica().
00142 { return m_replica; }
VisG4Path::Node * VisG4Path::Node::root | ( | void | ) | [inline, static] |
Definition at line 130 of file VisG4Path.h.
References m_refs.
Referenced by VisG4Path::operator=(), and VisG4Path::~VisG4Path().
00131 { 00132 if (--m_refs == 0) 00133 delete this; 00134 }
Node* VisG4Path::Node::m_children [private] |
short VisG4Path::Node::m_daughter [private] |
Node* VisG4Path::Node::m_parent [private] |
unsigned VisG4Path::Node::m_refs [private] |
short VisG4Path::Node::m_replica [private] |
Node* VisG4Path::Node::m_sibling [private] |
VisG4Path::Node * VisG4Path::Node::s_root = new Node [static, private] |