casa
5.7.0-16
|
Doubly linked constant list iterator. More...
#include <List.h>
Public Member Functions | |
ConstListIter (const List< t > *st) | |
This constructor creates a "ConstListIter" which tracks the "List<t>" parameter. More... | |
ConstListIter (const List< t > &st) | |
ConstListIter (const ConstListIter< t > &other) | |
This constructor creates a "ConstListIter" which tracks the same list tracked by the "ConstListIter<t>" parameter. More... | |
ConstListIter (const ConstListIter< t > *other) | |
ConstListIter () | |
This is the default constructor. More... | |
~ConstListIter () | |
void | notify (const Notice &) |
Hook through which NoticeTarget s are notified (by NoticeSource s). More... | |
Bool | atStart () const |
This functions allows one to checked if the cursor is at an extreme list position. More... | |
Bool | atEnd () const |
void | operator++ () |
This function is used to step the cursor forward through the list. More... | |
void | operator++ (int) |
void | operator-- () |
This function allow for stepping the cursor toward the front of the list. More... | |
void | operator-- (int) |
virtual uInt | pos (uInt) |
"pos()" without arguments returns the current postion of the cursor. More... | |
uInt | pos () const |
uInt | len () const |
This function returns the number of elements in the list. More... | |
uInt | step (Int offset) |
"step()" with no parameters advances the cursor forward one element. More... | |
uInt | step () |
const t & | getRight () const |
Returns the element to the right of the cursor. More... | |
virtual ConstListIter< t > & | operator= (const List< t > &other) |
This assignment operator substitutes the "List<t>" tracked by this iterator to the "List<t>" passed as an argument. More... | |
virtual ConstListIter< t > & | operator= (const List< t > *other) |
virtual ConstListIter< t > & | operator= (const ConstListIter< t > &other) |
This assignment operator substitutes the "List<t>" tracked by this iterator to the "List<t>" tracked by the passed "ConstListIter<t>" argument. More... | |
virtual ConstListIter< t > & | operator= (const ConstListIter< t > *other) |
void | toStart () |
This function moves the cursor to the beginning of the list. More... | |
void | toEnd () |
This function moves the cursor to the end of the list. More... | |
const List< t > * | container () const |
Get the container over which we are iterating, could be null... More... | |
Public Member Functions inherited from casacore::NoticeTarget | |
virtual | ~NoticeTarget () |
Destructs this NoticeTarget . More... | |
Bool | isValid () const |
Returns a boolean value telling whether this NoticeTarget is still "valid". More... | |
Bool | isAttached () const |
Returns a boolean value telling whether this NoticeTarget is still attached to a NoticeSource or not. More... | |
void | invalidate () |
Makes the current NoticeTarget "invalid". More... | |
Protected Attributes | |
Link< t > * | cur |
enum outside class because of compiler errors on HPUX enum {ConstListIterVersion = 1}; More... | |
Link< t > * | prev |
uInt | curPos |
List< t > * | container_ |
Protected Attributes inherited from casacore::NoticeTarget | |
Link< NoticeTarget * > * | ilink |
NoticeSource * | container |
Bool | valid |
Additional Inherited Members | |
Protected Member Functions inherited from casacore::NoticeTarget | |
NoticeTarget () | |
Creates an unlinked, "invalid" NoticeTarget . More... | |
NoticeTarget (NoticeSource *v) | |
Creates a "valid" NoticeTarget linked to the specified NoticeSource . More... | |
NoticeTarget (NoticeSource &v) | |
NoticeTarget (NoticeTarget &other) | |
Creates a "valid" NoticeTarget linked to the same NoticeSource as the other NoticeTarget . More... | |
NoticeTarget (NoticeTarget *other) | |
void | unlink () |
Unlinks this NoticeTarget from its NoticeSource . More... | |
void | link (const NoticeTarget &other) |
Links this NoticeTarget to the same NoticeSource as the other NoticeTarget . More... | |
void | link (const NoticeTarget *other) |
Link< NoticeTarget * > * | next () |
Retrieves the next NoticeTarget in the target list of the associated NoticeSource . More... | |
const Link< NoticeTarget * > * | next () const |
void | attach (NoticeSource *v) |
Adds this NoticeTarget to the target list in the specified NoticeSource , so that it will receive all notices sent out by that NoticeSource . More... | |
void | attach (NoticeSource &v) |
Doubly linked constant list iterator.
The List class above only provides for the list framework. This is one of two classes which allow list iteration, insertion, and removal. This class cannot be used to modify a list, but rather, it can only be used to look at or observe a list. It provides no functions for modifying the list.
All of the operations take place to the right of a conceptual cursor. The cursor starts out before the first element of the list and can be incremented past the last element of the list. Going further than the end of the list results in an exception.
In this example, assume that this function is called at the end of the example above, i.e. assume that the line before the return, above, is uncommented.
The output which this function, iterate()
, would produce would look like:
2 8 len=4 pos=2 89 10 8 2
As shown above:
pos()
step()
, operator++()
, and operator--()
getRight()
In addition:
atStart()
, atEnd()
, and pos()
len()
Tip: This class uses the Notice classes to implement "dynamic" cursors so that multiple cursors are updated as elements are added and removed from the list;
casacore::ConstListIter< t >::ConstListIter | ( | const List< t > * | st | ) |
This constructor creates a "ConstListIter" which tracks the "List<t>" parameter.
|
inline |
|
inline |
casacore::ConstListIter< t >::ConstListIter | ( | const ConstListIter< t > * | other | ) |
|
inline |
This is the default constructor.
It allows one to create an initially invalid empty ConstListIter. The instantiated class will accept assignment and thus become valid later.
casacore::ConstListIter< t >::~ConstListIter | ( | ) |
|
inline |
Definition at line 373 of file List.h.
Referenced by MirField::clearIDs(), MirFreqSetup::clearIDs(), ConstMirPolSetup::clearIDs(), MirSource::clearIDs(), MirPolRecps::find(), MirField::findIn(), MirFreqSetup::findIn(), MirSource::findIn(), MirSource::findNameIn(), ConstMirPolSetup::getCurrentAipsType(), and MirVisReader::setTelescope().
|
inline |
|
inline |
|
inline |
Returns the element to the right of the cursor.
Definition at line 465 of file List.h.
Referenced by ConstMirPolSetup::clearIDs().
|
inline |
|
virtual |
Hook through which NoticeTarget
s are notified (by NoticeSource
s).
Implements casacore::NoticeTarget.
Referenced by casacore::ListIter< casacore::OrderedPair< key, val > >::addRight().
|
inline |
|
inline |
|
inline |
|
inline |
|
virtual |
This assignment operator substitutes the "List<t>" tracked by this iterator to the "List<t>" passed as an argument.
Reimplemented in casacore::ListIter< t >, casacore::ListIter< MirPolCorr >, casacore::ListIter< casacore::Stokes::StokesTypes >, and casacore::ListIter< casacore::OrderedPair< key, val > >.
|
virtual |
|
virtual |
This assignment operator substitutes the "List<t>" tracked by this iterator to the "List<t>" tracked by the passed "ConstListIter<t>" argument.
Reimplemented in casacore::ListIter< t >, casacore::ListIter< MirPolCorr >, casacore::ListIter< casacore::Stokes::StokesTypes >, and casacore::ListIter< casacore::OrderedPair< key, val > >.
|
virtual |
|
virtual |
"pos()" without arguments returns the current postion of the cursor.
"pos()" with an unsigned integer parameter moves the cursor to an absolute position.
Referenced by MirPolRecps::find(), and MirPolRecps::getPol().
|
inline |
Definition at line 430 of file List.h.
Referenced by casacore::ConstListIter< casacore::OrderedPair< key, val > >::step().
|
inline |
|
inline |
Definition at line 459 of file List.h.
Referenced by casacore::ConstListIter< casacore::OrderedPair< key, val > >::step().
|
inline |
This function moves the cursor to the end of the list.
Definition at line 499 of file List.h.
Referenced by MirPolRecps::addPol().
|
inline |
This function moves the cursor to the beginning of the list.
Definition at line 492 of file List.h.
Referenced by ConstMirPolSetup::clearIDs(), MirPolRecps::find(), and MirVisReader::setTelescope().
|
protected |
Definition at line 519 of file List.h.
Referenced by casacore::ListIter< casacore::OrderedPair< key, val > >::addRight(), and casacore::ConstListIter< casacore::OrderedPair< key, val > >::container().
|
protected |
enum outside class because of compiler errors on HPUX
enum {ConstListIterVersion = 1};
Definition at line 516 of file List.h.
Referenced by casacore::ListIter< casacore::OrderedPair< key, val > >::addRight(), casacore::ConstListIter< casacore::OrderedPair< key, val > >::atEnd(), casacore::ConstListIter< casacore::OrderedPair< key, val > >::getRight(), casacore::ListIter< casacore::OrderedPair< key, val > >::getRight(), casacore::ConstListIter< casacore::OrderedPair< key, val > >::operator++(), casacore::ConstListIter< casacore::OrderedPair< key, val > >::operator--(), casacore::ConstListIter< casacore::OrderedPair< key, val > >::toEnd(), and casacore::ConstListIter< casacore::OrderedPair< key, val > >::toStart().
|
protected |
Definition at line 518 of file List.h.
Referenced by casacore::ListIter< casacore::OrderedPair< key, val > >::addRight(), casacore::ConstListIter< casacore::OrderedPair< key, val > >::operator++(), casacore::ConstListIter< casacore::OrderedPair< key, val > >::operator--(), casacore::ConstListIter< casacore::OrderedPair< key, val > >::pos(), casacore::ConstListIter< casacore::OrderedPair< key, val > >::step(), casacore::ConstListIter< casacore::OrderedPair< key, val > >::toEnd(), and casacore::ConstListIter< casacore::OrderedPair< key, val > >::toStart().
|
protected |
Definition at line 517 of file List.h.
Referenced by casacore::ListIter< casacore::OrderedPair< key, val > >::addRight(), casacore::ConstListIter< casacore::OrderedPair< key, val > >::atStart(), casacore::ConstListIter< casacore::OrderedPair< key, val > >::operator++(), casacore::ConstListIter< casacore::OrderedPair< key, val > >::operator--(), casacore::ConstListIter< casacore::OrderedPair< key, val > >::toEnd(), and casacore::ConstListIter< casacore::OrderedPair< key, val > >::toStart().