16#ifndef ROO_LINKED_LIST_ITER
17#define ROO_LINKED_LIST_ITER
95template<
class STLContainer>
145 const auto * castedOther =
147 return !castedOther || &
fSTLContainer != &(castedOther->fSTLContainer)
173 throw std::logic_error(
"A RooCollection should not be modified while iterating. "
174 "Only inserting at end is acceptable.");
256 if (&other==
this)
return *this ;
298 if (iter)
return *
this != *iter;
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
Interface for RooFIter-compatible iterators.
virtual ~GenericRooFIter()
virtual RooAbsArg * next()=0
Return next element or nullptr if at end.
Common abstract base class for objects that represent a value and a "shape" in RooFit.
Implementation of the GenericRooFIter interface for the RooLinkedList.
RooAbsArg * next() override
Return next element in collection.
const RooLinkedList * fList
! Collection iterated over
Int_t fIndex
! Index of the next element
RooFIterForLinkedList(const RooLinkedList *list)
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
Implementation of the actual iterator on RooLinkedLists.
RooLinkedListIterImpl & operator++()
bool operator!=(const RooLinkedListIterImpl &aIter) const
Int_t _index
! Index of the current element
RooLinkedListIterImpl(const RooLinkedList *list, bool forward)
bool _forward
! Iterator direction
TObject * _next
! Element that NextNV() returns next
const RooLinkedList * _list
! Collection iterated over
RooLinkedListIterImpl(const RooLinkedList *list, Int_t index, bool forward)
const TCollection * GetCollection() const override
TObject * Next() override
bool operator!=(const TIterator &aIter) const override
Compare two iterator objects.
TObject * operator*() const override
Return current object or nullptr.
RooLinkedListIterImpl operator++(int)
TIterator & operator=(const TIterator &other) override
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)
Collection class for internal use, storing a collection of TObject pointers in a vector.
TObject * At(int index) const
Return object stored in sequential position given by index.
Int_t IndexOf(const char *name) const
Return position of given object in list.
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.