16#ifndef ROO_LINKED_LIST_ITER
17#define ROO_LINKED_LIST_ITER
67 if (!
fPtr)
return nullptr ;
97template<
class STLContainer>
147 const auto * castedOther =
149 return !castedOther || &
fSTLContainer != &(castedOther->fSTLContainer)
175 throw std::logic_error(
"A RooCollection should not be modified while iterating. "
176 "Only inserting at end is acceptable.");
255 if (&other==
this)
return *this ;
277 if (!
_ptr)
return nullptr ;
290 if (iter)
return (
_ptr != iter->
_ptr);
Interface for RooFIter-compatible iterators.
virtual ~GenericRooFIter()
virtual RooAbsArg * next()=0
Return next element or nullptr if at end.
RooAbsArg is the common abstract base class for objects that represent a value and a "shape" in RooFi...
Implementation of the GenericRooFIter interface for the RooLinkedList.
RooAbsArg * next() override
Return next element in collection.
RooFIterForLinkedList(const RooLinkedList *list)
const RooLinkedListElem * fPtr
A one-time forward iterator working on RooLinkedList or RooAbsCollection.
RooFIter(RooFIter &&)=default
RooFIter(const RooFIter &)=delete
RooAbsArg * next()
Return next element or nullptr if at end.
RooFIter & operator=(const RooFIter &)=delete
std::unique_ptr< GenericRooFIter > fIterImpl
RooFIter(std::unique_ptr< GenericRooFIter > &&itImpl)
RooFIter & operator=(RooFIter &&)=default
RooLinkedListElem is an link element for the RooLinkedList class.
RooLinkedListElem * _prev
RooLinkedListElem * _next
Implementation of the actual iterator on RooLinkedLists.
RooLinkedListIterImpl & operator++()
virtual TObject * operator*() const
Return current object or nullptr.
TIterator & operator=(const TIterator &other)
bool operator!=(const RooLinkedListIterImpl &aIter) const
RooLinkedListIterImpl(const RooLinkedList *list, bool forward)
bool _forward
Next link element.
const RooLinkedList * _list
virtual const TCollection * GetCollection() const
RooLinkedListIterImpl operator++(int)
bool operator!=(const TIterator &aIter) const
Compare two iterator objects.
RooLinkedListIterImpl(const RooLinkedList *list, const RooLinkedListElem *ptr, bool forward)
const RooLinkedListElem * _ptr
Collection iterated over.
A wrapper around TIterator derivatives.
RooLinkedListIter(std::shared_ptr< TIterator > iterImpl)
bool operator!=(const TIterator &other) const override
Compare two iterator objects.
const TCollection * GetCollection() const override
RooLinkedListIter(const RooLinkedListIter &)=delete
TObject * Next() override
TObject * operator*() const override
Return current object or nullptr.
RooLinkedListIter & operator=(const RooLinkedListIter &)=delete
RooLinkedListIter(RooLinkedListIter &&other)
TIterator & operator=(const TIterator &other) override
std::shared_ptr< TIterator > fIterImpl
RooLinkedListIter & operator=(RooLinkedListIter &&other)
RooLinkedList is an collection class for internal use, storing a collection of RooAbsArg pointers in ...
RooLinkedListElem * _last
Link to first element of list.
RooLinkedListElem * _first
Collection abstract base class.
TIterator and GenericRooFIter front end with STL back end.
TObject * Next() override
bool operator!=(const TIterator &other) const override
Compare two iterator objects.
RooAbsArg * next() override
Return next element or nullptr if at end.
const RooAbsArg * fCurrentElem
TIterator & operator=(const TIterator &) override
TIteratorToSTLInterface(const STLContainer &container)
RooAbsArg * nextChecked()
TObject * operator*() const override
Return current object or nullptr.
const TCollection * GetCollection() const override
const STLContainer & fSTLContainer
Iterator abstract base class.
Mother of all ROOT objects.