31#if (__GNUC__ >= 3) && !defined(__INTEL_COMPILER)
34#pragma GCC system_header
127class TObjLink :
public std::enable_shared_from_this<TObjLink> {
185#if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40600
186#pragma GCC diagnostic push
187#pragma GCC diagnostic ignored "-Weffc++"
198 public std::iterator<std::bidirectional_iterator_tag,
199 TObject*, std::ptrdiff_t,
200 const TObject**, const TObject*&> {
242 return NewLink(obj, prev ? prev->shared_from_this() :
nullptr);
245 return NewOptLink(obj, opt, prev ? prev->shared_from_this() :
nullptr);
249#if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40600
250#pragma GCC diagnostic pop
#define ClassDef(name, id)
const Bool_t kIterForward
bool operator==(TObjOptLink *l, const std::shared_ptr< TObjLink > &r)
const Bool_t kSortAscending
const Bool_t kSortDescending
Collection abstract base class.
Iterator abstract base class.
TObject * Next()
Return next object in the list. Returns 0 when no more objects in list.
std::shared_ptr< TObjLink > TObjLinkPtr_t
void Reset()
Reset list iterator.
void SetOption(Option_t *option)
Sets the object option stored in the list.
const TCollection * GetCollection() const
Bool_t operator!=(const TIterator &aIter) const
This operator compares two TIterator objects.
TObject * operator*() const
Return current object or nullptr.
TIterator & operator=(const TIterator &rhs)
Overridden assignment operator.
Option_t * GetOption() const
Returns the object option stored in the list.
Bool_t LnkCompare(const TObjLinkPtr_t &l1, const TObjLinkPtr_t &l2)
Compares the objects stored in the TObjLink objects.
TObjLinkPtr_t NewOptLink(TObject *obj, Option_t *opt, const TObjLinkPtr_t &prev=nullptr)
Return a new TObjOptLink (a TObjLink that also stores the option).
virtual void Add(TObject *obj)
virtual TObject * After(const TObject *obj) const
Returns the object after object obj.
virtual TObjLink * LastLink() const
virtual ~TList()
Delete the list.
std::weak_ptr< TObjLink > TObjLinkWeakPtr_t
Bool_t fAscending
cache to speedup sequential calling of Before() and After() functions
virtual TObject * Remove(TObject *obj)
Remove object from the list.
virtual TObject ** GetObjectRef(const TObject *obj) const
Return address of pointer to obj.
virtual void AddAt(TObject *obj, Int_t idx)
Insert object at position idx in the list.
TObjLink * FindLink(const TObject *obj, Int_t &idx) const
Returns the TObjLink object that contains object obj.
std::shared_ptr< TObjLink > TObjLinkPtr_t
TObject * Remove(const TObjLinkPtr_t &lnk)
virtual void AddFirst(TObject *obj)
Add object at the beginning of the list.
TObjLinkPtr_t fLast
pointer to first entry in linked list
void InsertAfter(const TObjLinkPtr_t &newlink, const TObjLinkPtr_t &prev)
Insert a new link in the chain.
virtual void RemoveLast()
Remove the last object of the list.
virtual TObject * FindObject(const char *name) const
Delete a TObjLink object.
TObjLink * LinkAt(Int_t idx) const
sorting order (when calling Sort() or for TSortedList)
virtual TObjLink * FirstLink() const
virtual TObject * At(Int_t idx) const
Returns the object at position idx. Returns 0 if idx is out of range.
TObjLinkPtr_t NewLink(TObject *obj, const TObjLinkPtr_t &prev=nullptr)
Return a new TObjLink.
virtual TObject * Last() const
Return the last object in the list. Returns 0 when list is empty.
virtual void AddAfter(const TObject *after, TObject *obj)
Insert object after object after in the list.
virtual void RecursiveRemove(TObject *obj)
Remove object from this collection and recursively remove the object from all other objects (and coll...
virtual void Add(TObject *obj, Option_t *opt)
virtual void AddBefore(const TObject *before, TObject *obj)
Insert object before object before in the list.
TList & operator=(const TList &)
virtual TIterator * MakeIterator(Bool_t dir=kIterForward) const
Return a list iterator.
TObjLinkWeakPtr_t fCache
pointer to last entry in linked list
virtual TObject * Before(const TObject *obj) const
Returns the object before object obj.
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
virtual void AddLast(TObject *obj)
Add object at the end of the list.
TObjLinkPtr_t * DoSort(TObjLinkPtr_t *head, Int_t n)
Sort linked list.
virtual void Clear(Option_t *option="")
Remove all objects from the list.
virtual void Sort(Bool_t order=kSortAscending)
Sort linked list.
Wrapper around a TObject so it can be stored in a TList.
virtual void SetOption(Option_t *)
void SetObject(TObject *obj)
TObject ** GetObjectRef()
std::shared_ptr< TObjLink > TObjLinkPtr_t
virtual Option_t * GetAddOption() const
TObject * GetObject() const
TObjLink(const TObjLink &)=delete
virtual Option_t * GetOption() const
std::weak_ptr< TObjLink > TObjLinkWeakPtr_t
TObjLink & operator=(const TObjLink &)=delete
Option_t * GetOption() const
TObjOptLink(TObject *obj, Option_t *opt)
Option_t * GetAddOption() const
void SetOption(Option_t *option)
Mother of all ROOT objects.
virtual Option_t * GetOption() const
Sequenceable collection abstract base class.
const char * Data() const