tHeapElement Class Reference

#include <tHeap.h>

Inheritance diagram for tHeapElement:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 tHeapElement ()
virtual ~tHeapElement ()
REAL Val () const
void SetVal (REAL value, tHeapBase &heap)
void RemoveFromHeap ()

Protected Member Functions

virtual tHeapBaseHeap () const =0

Private Attributes

int hID
REAL value_

Friends

class tHeapBase


Detailed Description

Definition at line 88 of file tHeap.h.


Constructor & Destructor Documentation

tHeapElement::tHeapElement (  )  [inline]

Definition at line 92 of file tHeap.h.

00092 :hID(-1),value_(0){}

tHeapElement::~tHeapElement (  )  [virtual]

Definition at line 231 of file tHeap.cpp.

References hID, and tASSERT.

00232 {
00233     tASSERT( hID < 0 );
00234 }


Member Function Documentation

REAL tHeapElement::Val (  )  const [inline]

Definition at line 95 of file tHeap.h.

References value_.

Referenced by tHeapBase::CheckHeap(), eHalfEdge::MinPathLength(), tHeapBase::SwapIf(), and eWallView::Value().

00095 {return value_;}

Here is the caller graph for this function:

void tHeapElement::SetVal ( REAL  value,
tHeapBase heap 
)

Definition at line 246 of file tHeap.cpp.

References Heap(), hID, tHeapBase::Insert(), tHeapBase::Replace(), tASSERT, and value_.

Referenced by nBandwidthArbitrator::Fill(), nBandwidthArbitrator::OnChange(), eHalfEdge::SetMinPathLength(), and eWallView::SetValue().

00247 {
00248     tASSERT( !Heap() || Heap() == &heap );
00249 
00250     this->value_ = value;
00251 
00252     if ( hID>=0 )
00253     {
00254         tASSERT( heap( hID ) == this );
00255 
00256         heap.Replace( this );
00257     }
00258     else
00259     {
00260         heap.Insert( this );
00261     }
00262 }

Here is the call graph for this function:

Here is the caller graph for this function:

void tHeapElement::RemoveFromHeap (  ) 

Definition at line 236 of file tHeap.cpp.

References Heap(), hID, tHeapBase::Remove(), and tASSERT.

Referenced by eHalfEdge::~eHalfEdge(), eWallView::~eWallView(), and nBandwidthArbitrator::~nBandwidthArbitrator().

00236                                  {
00237     tASSERT( this );
00238 
00239     if (hID>=0)
00240     {
00241         tASSERT( Heap() );
00242         Heap()->Remove(this);
00243     }
00244 }

Here is the call graph for this function:

Here is the caller graph for this function:

tHeapBase * tHeapElement::Heap (  )  const [protected, pure virtual]

Implemented in eHalfEdge, eWallView, planned_send, and nBandwidthArbitrator.

Definition at line 265 of file tHeap.cpp.

References NULL, and tASSERT.

Referenced by tHeapBase::Remove(), RemoveFromHeap(), and SetVal().

00266 {
00267     tASSERT( 0 );
00268     return NULL;
00269 }

Here is the caller graph for this function:


Friends And Related Function Documentation

friend class tHeapBase [friend]

Definition at line 89 of file tHeap.h.


Member Data Documentation

int tHeapElement::hID [private]

Definition at line 104 of file tHeap.h.

Referenced by tHeapBase::CheckHeap(), tHeapBase::Insert(), tHeapBase::Remove(), RemoveFromHeap(), tHeapBase::Replace(), SetVal(), tHeapBase::SwapIf(), and ~tHeapElement().

REAL tHeapElement::value_ [private]

Definition at line 105 of file tHeap.h.

Referenced by SetVal(), and Val().


The documentation for this class was generated from the following files:
Generated on Sat Mar 15 23:57:05 2008 for Armagetron Advanced by  doxygen 1.5.4