JX Application Framework
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
JTaskIterator< T > Class Template Reference

#include <JTaskIterator.h>

Inheritance diagram for JTaskIterator< T >:
[legend]

Public Member Functions

 JTaskIterator (const JPtrArray< T > &theArray, const JListT::Position start=JListT::kStartAtBeginning, const JIndex index=0)
 
 JTaskIterator (JPtrArray< T > *theArray, const JListT::Position start=JListT::kStartAtBeginning, const JIndex index=0)
 
- Public Member Functions inherited from JPtrArrayIterator< T >
 JPtrArrayIterator (const JPtrArray< T > &theArray, const JListT::Position start=JListT::kStartAtBeginning, const JIndex index=0)
 
 JPtrArrayIterator (JPtrArray< T > *theArray, const JListT::Position start=JListT::kStartAtBeginning, const JIndex index=0)
 
bool SetPrev (T *dataPtr, const JPtrArrayT::SetAction action, const JListT::Action move=JListT::kMove)
 
bool SetNext (T *dataPtr, const JPtrArrayT::SetAction action, const JListT::Action move=JListT::kMove)
 
bool DeletePrev ()
 
bool DeleteNext ()
 
bool DeletePrevAsArray ()
 
bool DeleteNextAsArray ()
 
- Public Member Functions inherited from JArrayIterator< T * >
 JArrayIterator (const JArray< T * > &theArray, const JListT::Position start=JListT::kStartAtBeginning, const JIndex index=0)
 
 JArrayIterator (JArray< T * > *theArray, const JListT::Position start=JListT::kStartAtBeginning, const JIndex index=0)
 
 JArrayIterator (const JArrayIterator< T * > &source)
 
 ~JArrayIterator () override
 
bool Prev (T * *data, const JListT::Action move=JListT::kMove) override
 
bool Next (T * *data, const JListT::Action move=JListT::kMove) override
 
void SkipPrev (const JSize count=1) override
 
void SkipNext (const JSize count=1) override
 
bool SetPrev (const T * &data, const JListT::Action move=JListT::kMove) override
 
bool SetNext (const T * &data, const JListT::Action move=JListT::kMove) override
 
bool RemovePrev (const JSize count=1) override
 
bool RemoveNext (const JSize count=1) override
 
bool Insert (const T * &data) override
 
- Public Member Functions inherited from JListIterator< T >
 JListIterator (const JList< T > &theList, const JListT::Position start=JListT::kStartAtBeginning, const JIndex index=0)
 
 JListIterator (JList< T > *theList, const JListT::Position start=JListT::kStartAtBeginning, const JIndex index=0)
 
virtual ~JListIterator ()
 
const JList< T > * GetList () const
 
bool GetList (JList< T > **obj) const
 
bool Prev (std::function< bool(const T &)> match, T *item)
 
bool Next (std::function< bool(const T &)> match, T *item)
 
virtual void MoveTo (const JListT::Position newPosition, const JIndex index)
 
bool AtBeginning () const
 
bool AtEnd () const
 
JIndex GetPrevItemIndex () const
 
JIndex GetNextItemIndex () const
 
bool GetPrevItemIndex (JIndex *i) const
 
bool GetNextItemIndex (JIndex *i) const
 
operator* () const
 
JListIterator< T > & operator++ ()
 
bool operator== (const JListIterator< T > &it) const
 

Protected Member Functions

virtual void ListChanged (const JBroadcaster::Message &message)
 
- Protected Member Functions inherited from JListIterator< T >
 JListIterator (const JListIterator< T > &source)
 
JCursorPosition GetCursor () const
 
void SetCursor (const JCursorPosition pos)
 

Constructor & Destructor Documentation

◆ JTaskIterator() [1/2]

template<class T >
JTaskIterator< T >::JTaskIterator ( const JPtrArray< T > &  theArray,
const JListT::Position  start = JListT::kStartAtBeginning,
const JIndex  index = 0 
)
                The Task Iterator Class

When iterating over a list of tasks, new ones should be added to the front of the list so the current pass will be guaranteed to finish. This class ensures that newly prepended tasks will not be executed during the current pass.

Refer to JListIterator.tmpl for information about interators in general.

◆ JTaskIterator() [2/2]

template<class T >
JTaskIterator< T >::JTaskIterator ( JPtrArray< T > *  theArray,
const JListT::Position  start = JListT::kStartAtBeginning,
const JIndex  index = 0 
)

Member Function Documentation

◆ ListChanged()

template<class T >
void JTaskIterator< T >::ListChanged ( const JBroadcaster::Message message)
protectedvirtual

When the cursor is at the very front of the list, it must move when items are inserted at the front of the list. This ensures that the object only receives the next message, not the current one.

Reimplemented from JArrayIterator< T * >.


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