TIntList Class Reference

#include <TIntList.h>

List of all members.

Public Member Functions

 TIntList ()
 ~TIntList ()
void Add (Int_t num)
void AddFirst (Int_t num)
void AddLast (Int_t num)
void AddAt (Int_t num, Int_t idx)
Int_t First (void)
Int_t Last (void)
void Remove (Int_t element)
void Delete (Option_t *option="")
Int_t At (Int_t slot)
Int_t NumberOfElements (void)
Bool_t Exists (Int_t num)
void Sort ()
void Print (Option_t *="") const

Private Attributes

TList * fList
TObjNumfNum

Detailed Description

Definition at line 39 of file TIntList.h.


Constructor & Destructor Documentation

TIntList::TIntList (  ) 

Definition at line 6 of file TIntList.cxx.

00007 {
00008     fNum = new TObjNum(1);
00009     fList = new TList(fNum);
00010 }

TIntList::~TIntList (  ) 

Definition at line 12 of file TIntList.cxx.

References fList, and fNum.

00013 { 
00014     fList->Delete();
00015     delete fList;
00016     delete fNum;
00017 }


Member Function Documentation

void TIntList::Add ( Int_t  num  ) 
void TIntList::AddAt ( Int_t  num,
Int_t  idx 
)

Definition at line 39 of file TIntList.cxx.

References fList.

Referenced by BFLWingedEdge::DeleteFirstAvailableEdgeID(), BFLWingedEdge::DeleteFirstAvailableVtxID(), and BFLVoronoiMaker::IncreaseEntropy().

00040 {
00041    fList->AddAt(new TObjNum(num),idx);
00042 }

void TIntList::AddFirst ( Int_t  num  ) 

Definition at line 24 of file TIntList.cxx.

References fList.

00025 {
00026     fList->AddFirst(new TObjNum(num));
00027 }

void TIntList::AddLast ( Int_t  num  ) 
Int_t TIntList::At ( Int_t  slot  ) 
void TIntList::Delete ( Option_t *  option = ""  ) 
Bool_t TIntList::Exists ( Int_t  num  ) 

Definition at line 72 of file TIntList.cxx.

References fList, and TObjNum::GetNum().

Referenced by BFLVoronoiMaker::DeleteSubstructure(), BFLVoronoiMaker::GetAnotherEdgeAround(), BFLVoronoiMaker::MarkEdgesToDelete(), BFLVoronoiMaker::MarkVerticesToDelete(), and BFLVorOperator::VtxIsInsideNewPolyg().

00073 {
00074   Bool_t Exists = kFALSE;
00075   TObjNum * IntObj;
00076   TIter next(fList);
00077   
00078   while( (IntObj = (TObjNum *)next()) ) {
00079     if(num == IntObj->GetNum())  Exists = kTRUE;
00080   }
00081   delete IntObj;
00082 
00083   return Exists;
00084 }

Int_t TIntList::First ( void   ) 

Definition at line 49 of file TIntList.cxx.

References fList.

Referenced by BFLWingedEdge::DeleteFirstAvailableEdgeID(), BFLWingedEdge::DeleteFirstAvailableVtxID(), BFLWingedEdge::FirstAvailableEdgeID(), and BFLWingedEdge::FirstAvailableVtxID().

00050 {
00051   return ((TObjNum *)fList->First())->GetNum();
00052 }

Int_t TIntList::Last ( void   ) 

Definition at line 54 of file TIntList.cxx.

References fList.

Referenced by BFLWingedEdge::MaxAvailableEdgeID(), and BFLWingedEdge::MaxAvailableVtxID().

00055 {
00056   return ((TObjNum *)fList->Last())->GetNum();
00057 }

Int_t TIntList::NumberOfElements ( void   ) 
void TIntList::Print ( Option_t *  = ""  )  const [inline]

Definition at line 66 of file TIntList.h.

References fList.

00066 { fList->Print(); }

void TIntList::Remove ( Int_t  element  ) 

Definition at line 86 of file TIntList.cxx.

References fList, and TObjNum::GetNum().

Referenced by BFLWingedEdge::DeleteFirstAvailableEdgeID(), BFLWingedEdge::DeleteFirstAvailableVtxID(), and BFLVorOperator::GetNextIntersectEdge().

00087 {
00088 // Remove all occurences of 'element' from the list
00089 
00090   TObjNum * IntObj;
00091   TObjNum * FndObj;
00092   TIter next(fList);
00093   
00094   while( (IntObj = (TObjNum *)next()) ) {
00095     if(element == IntObj->GetNum()) {
00096        FndObj = (TObjNum*) fList->Remove(IntObj);
00097        delete FndObj;
00098     }
00099   }
00100 
00101 }

void TIntList::Sort (  )  [inline]

Member Data Documentation

TList* TIntList::fList [private]
TObjNum* TIntList::fNum [private]

Definition at line 43 of file TIntList.h.

Referenced by ~TIntList().


The documentation for this class was generated from the following files:

Generated on 19 Jun 2017 for loon by  doxygen 1.6.1