31 #ifndef AIPS_USE_DEPRECATED
32 #error "List.h is deprecated; use -DBUILD_DEPRECATED=ON to use it"
55 template<
class t>
class List;
186 template<
class t>
class List :
public NoticeSource
410 prev = (*prev).prev();
417 prev = (*prev).prev();
440 return (*container_).length;}
455 toffset = offset < 0 && -offset >
Int(
curPos) ? -((-
curPos - offset) % ((*container_).length + 1))
456 : (
curPos + offset) % ((*container_).length + 1);
457 return(
pos(toffset >= 0 ? toffset : (*container_).length + toffset + 1));}
468 return((*cur).val());}
501 prev = (*container_).tail;
503 curPos = (*container_).length;
682 return((*this->
cur).val());}
756 #ifndef CASACORE_NO_AUTO_TEMPLATES
757 #include <casacore/casa/Containers/List.tcc>
758 #endif //# CASACORE_NO_AUTO_TEMPLATES
doubly linked list primitive
t & getRight()
Returns the element to the right of the cursor.
virtual ListIter< t > & assign(List< t > *other, Bool OWN=False)
This function changes the List which this ListIter tracks and specifies that the List should be delet...
ConstListIter(const ConstListIter< t > &other)
This constructor creates a "ConstListIter" which tracks the same list tracked by the "ConstListIter<t...
virtual Link< t > * newLink(t &e, Link< t > *p=0, Link< t > *n=0)
Bool atStart() const
This functions allows one to checked if the cursor is at an extreme list position.
abstract base class for notice receptors
ListIter(List< t > *st, Bool OWN=False)
This constructor allows one to construct a ListIter and attach it to the List parameter.
Link< t > * cur
enum outside class because of compiler errors on HPUX enum {ConstListIterVersion = 1}; ...
virtual void added(Link< t > *, Link< t > *)
Updates the extreme pointers, head or tail under the appropriate conditions.
void notify(const Notice &)
Hook through which NoticeTargets are notified (by NoticeSources).
void operator--()
This function allow for stepping the cursor toward the front of the list.
ListNotice(modification m, Link< t > *oc, Link< t > *op, Link< t > *nc, Link< t > *np, int of, int nf=0)
This is used to construct a list notice.
ListNotice()
This constructor is used to initialize a notice for a deleted "List".
List()
Creates an empty list.
Doubly linked constant list iterator.
const List< t > * container() const
Get the container over which we are iterating, could be null...
List< t > & operator=(const List< t > &other)
void throw_list_init_error()
base class for notice originators
void throw_list_swapright_same_error()
uInt len() const
Returns the length of the list.
virtual ListIter< t > & operator=(List< t > &other)
This assignment operator changes the List which this iterator tracks to the List parameter.
void toEnd()
This function moves the cursor to the end of the list.
virtual void removed(Link< t > *, Link< t > *, Link< t > *)
const t & getRight() const
uInt step(Int offset)
"step()" with no parameters advances the cursor forward one element.
virtual void swapRight(ListIter< t > &)
This function swaps the list section after the current position of the list with the right section of...
int operator==(const Notice &op) const
This operator can be used to compare two ListNotices.
#define AlwaysAssert(expr, exception)
These marcos are provided for use instead of simply using the constructors of assert_ to allow additi...
bool Bool
Define the standard types used by Casacore.
abstract base class for notices
Bool isValid() const
Returns a boolean value telling whether this NoticeTarget is still "valid".
Linked list update notice.
ConstListIter()
This is the default constructor.
void removeRight()
This function removes the element to the right of the current cursor position.
ConstListIter(const List< t > &st)
void addRight(t e)
This function adds the element to the right of the current cursor position.
void operator++()
This function is used to step the cursor forward through the list.
ListIter(const ListIter< t > *other)
uInt len() const
This function returns the number of elements in the list.
virtual ConstListIter< t > & operator=(const List< t > &other)
This assignment operator substitutes the "List<t>" tracked by this iterator to the "List<t>" passed a...
const Double e
e and functions thereof:
void throw_list_end_error()
The function which throws an exception for advancing the internal cursor past the end of a list...
Doubly linked non-constant list iterator The List class above only provides for the list framework...
const Double c
Fundamental physical constants (SI units):
uInt type() const
This function returns the Notice "type", which is retrieved from the "type registry".
const t & getRight() const
Returns the element to the right of the cursor.
Bool own
Indicates if this iterator "owns" the container it observes.
Link< NoticeTarget * > *& head()
void toStart()
This function moves the cursor to the beginning of the list.
void throw_list_start_error()
ListIter()
This is the default constructor.
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.
Invalide iteration error class.