#include <tHeap.h>
Public Member Functions | |
tHeapElement () | |
virtual | ~tHeapElement () |
REAL | Val () const |
void | SetVal (REAL value, tHeapBase &heap) |
void | RemoveFromHeap () |
Protected Member Functions | |
virtual tHeapBase * | Heap () const =0 |
Private Attributes | |
int | hID |
REAL | value_ |
Friends | |
class | tHeapBase |
Definition at line 88 of file tHeap.h.
tHeapElement::tHeapElement | ( | ) | [inline] |
tHeapElement::~tHeapElement | ( | ) | [virtual] |
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_;}
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 }
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 }
tHeapBase * tHeapElement::Heap | ( | ) | const [protected, pure virtual] |
Implemented in eHalfEdge, eWallView, planned_send, and nBandwidthArbitrator.
Definition at line 265 of file tHeap.cpp.
Referenced by tHeapBase::Remove(), RemoveFromHeap(), and SetVal().
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] |