library: libCore #include "TSortedList.h"

# TSortedList

class description - source file - inheritance tree (.pdf)

## class TSortedList : public TList

| Inheritance Chart:
`TObject`
| <- | `TCollection`
| <- | `TSeqCollection`
| <- | `TList`
| <- | `TSortedList` |

        public:

                          TSortedList(Bool_t order = kSortAscending)
                          ~TSortedList()
             virtual void Add(TObject* obj)
             virtual void Add(TObject* obj, Option_t* opt)
             virtual void AddAfter(const TObject*, TObject* obj)
             virtual void AddAfter(TObjLink*, TObject* obj)
             virtual void AddAt(TObject* obj, Int_t)
             virtual void AddBefore(const TObject*, TObject* obj)
             virtual void AddBefore(TObjLink*, TObject* obj)
             virtual void AddFirst(TObject* obj)
             virtual void AddFirst(TObject* obj, Option_t* opt)
             virtual void AddLast(TObject* obj)
             virtual void AddLast(TObject* obj, Option_t* opt)
           static TClass* Class()
          virtual TClass* IsA() const
           virtual Bool_t IsSorted() const
             virtual void ShowMembers(TMemberInspector& insp, char* parent)
             virtual void Sort(Bool_t = kSortAscending)
             virtual void Streamer(TBuffer& b)
                     void StreamerNVirtual(TBuffer& b)

### Data Members

## Class Description

     A sorted doubly linked list. All sortable classes inheriting from
     TObject can be inserted in a TSortedList.

void Add(TObject *obj)

     Add object in sorted list. Uses object Compare() member to find right
     position.

void Add(TObject *obj, Option_t *opt)

     Add object in sorted list. Uses object Compare() member to find right
     position and also store option. See TList::Add for explanation of
     usage of option.

### Inline Functions

                   void ~TSortedList()
            TSortedList TSortedList(Bool_t order = kSortAscending)
                 Bool_t IsSorted() const
                   void AddFirst(TObject* obj)
                   void AddFirst(TObject* obj, Option_t* opt)
                   void AddLast(TObject* obj)
                   void AddLast(TObject* obj, Option_t* opt)
                   void AddAt(TObject* obj, Int_t)
                   void AddAfter(const TObject*, TObject* obj)
                   void AddAfter(TObjLink*, TObject* obj)
                   void AddBefore(const TObject*, TObject* obj)
                   void AddBefore(TObjLink*, TObject* obj)
                   void Sort(Bool_t = kSortAscending)
                TClass* Class()
                TClass* IsA() const
                   void ShowMembers(TMemberInspector& insp, char* parent)
                   void Streamer(TBuffer& b)
                   void StreamerNVirtual(TBuffer& b)

Author: Fons Rademakers 14/09/95
Last update: root/cont:$Name: $:$Id: TSortedList.cxx,v 1.1.1.1 2000/05/16 17:00:40 rdm Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *