abstract base class for notice receptors More...
#include <Notice.h>
Public Member Functions | |
virtual | ~NoticeTarget () |
Destructs this NoticeTarget . | |
Bool | isValid () const |
Returns a boolean value telling whether this NoticeTarget is still "valid". | |
Bool | isAttached () const |
Returns a boolean value telling whether this NoticeTarget is still attached to a NoticeSource or not. | |
void | invalidate () |
Makes the current NoticeTarget "invalid". | |
virtual void | notify (const Notice &)=0 |
Hook through which NoticeTarget s are notified (by NoticeSource s). | |
Protected Member Functions | |
NoticeTarget () | |
Creates an unlinked, "invalid" NoticeTarget . | |
NoticeTarget (NoticeSource *v) | |
Creates a "valid" NoticeTarget linked to the specified NoticeSource . | |
NoticeTarget (NoticeSource &v) | |
NoticeTarget (NoticeTarget &other) | |
Creates a "valid" NoticeTarget linked to the same NoticeSource as the other NoticeTarget . | |
NoticeTarget (NoticeTarget *other) | |
void | unlink () |
Unlinks this NoticeTarget from its NoticeSource . | |
void | link (const NoticeTarget &other) |
Links this NoticeTarget to the same NoticeSource as the other NoticeTarget . | |
void | link (const NoticeTarget *other) |
Link< NoticeTarget * > * | next () |
Retrieves the next NoticeTarget in the target list of the associated NoticeSource . | |
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 . | |
void | attach (NoticeSource &v) |
Protected Attributes | |
Link< NoticeTarget * > * | ilink |
NoticeSource * | container |
Bool | valid |
Friends | |
class | NoticeSource |
abstract base class for notice receptors
Public interface
A NoticeTarget
receives the Notice
s from the NoticeSource
to which it is linked. A target can only be linked to one source.
Classes which are dependent upon a particular NoticeSource
should derive from this class.
ListIter and its parent class ConstListIter are the iterators or "dynamic" cursors in the linked List . They are derived from NoticeTarget
, and the notice system ensures that multiple cursors are updated as elements are added and removed from the list, according to the following scheme:
NoticeSource
List . Definition at line 153 of file Notice.h.
virtual casacore::NoticeTarget::~NoticeTarget | ( | ) | [virtual] |
Destructs this NoticeTarget
.
casacore::NoticeTarget::NoticeTarget | ( | ) | [inline, protected] |
Creates an unlinked, "invalid" NoticeTarget
.
An invalid NoticeTarget
does not occur in the target list of any NoticeSource
.
casacore::NoticeTarget::NoticeTarget | ( | NoticeSource * | v | ) | [inline, protected] |
Creates a "valid" NoticeTarget
linked to the specified NoticeSource
.
The NoticeTarget
will be added to the target list in that NoticeSource
.
Definition at line 190 of file Notice.h.
References attach().
casacore::NoticeTarget::NoticeTarget | ( | NoticeSource & | v | ) | [inline, protected] |
casacore::NoticeTarget::NoticeTarget | ( | NoticeTarget & | other | ) | [inline, protected] |
Creates a "valid" NoticeTarget
linked to the same NoticeSource
as the other NoticeTarget
.
So, both NoticeTarget
s will occur in the same target list.
casacore::NoticeTarget::NoticeTarget | ( | NoticeTarget * | other | ) | [inline, protected] |
void casacore::NoticeTarget::attach | ( | NoticeSource & | v | ) | [protected] |
void casacore::NoticeTarget::attach | ( | NoticeSource * | v | ) | [protected] |
Adds this NoticeTarget
to the target list in the specified NoticeSource
, so that it will receive all notices sent out by that NoticeSource
.
Referenced by NoticeTarget().
void casacore::NoticeTarget::invalidate | ( | ) | [inline] |
Makes the current NoticeTarget
"invalid".
Definition at line 169 of file Notice.h.
References casacore::False, and valid.
Bool casacore::NoticeTarget::isAttached | ( | ) | const [inline] |
Returns a boolean value telling whether this NoticeTarget
is still attached to a NoticeSource
or not.
Reimplemented in casacore::RecordFieldPtr< T >, casacore::RecordFieldPtr< Array< DComplex > >, casacore::RecordFieldPtr< Float >, casacore::RecordFieldPtr< recordType >, casacore::RecordFieldPtr< Array< String > >, casacore::RecordFieldPtr< Double >, casacore::RecordFieldPtr< Short >, casacore::RecordFieldPtr< uChar >, casacore::RecordFieldPtr< String >, casacore::RecordFieldPtr< Int >, casacore::RecordFieldPtr< Array< T > >, casacore::RecordFieldPtr< Array< uChar > >, casacore::RecordFieldPtr< Array< Short > >, casacore::RecordFieldPtr< DComplex >, casacore::RecordFieldPtr< Array< Bool > >, casacore::RecordFieldPtr< Bool >, casacore::RecordFieldPtr< Array< recordType > >, casacore::RecordFieldPtr< Array< Complex > >, casacore::RecordFieldPtr< Complex >, casacore::RecordFieldPtr< Array< Float > >, casacore::RecordFieldPtr< outType >, casacore::RecordFieldPtr< inType >, casacore::RecordFieldPtr< Array< Double > >, and casacore::RecordFieldPtr< Array< Int > >.
Definition at line 166 of file Notice.h.
References casacore::False, ilink, and casacore::True.
Bool casacore::NoticeTarget::isValid | ( | ) | const [inline] |
Returns a boolean value telling whether this NoticeTarget
is still "valid".
Reimplemented in casacore::OrderedMapIterRep< key, value >.
Definition at line 162 of file Notice.h.
References valid.
Referenced by casacore::ListIter< OrderedPair< key, val > >::addRight(), casacore::ConstListIter< OrderedPair< key, val > >::atEnd(), casacore::ConstListIter< OrderedPair< key, val > >::atStart(), casacore::ConstListIter< OrderedPair< key, val > >::getRight(), casacore::ListIter< OrderedPair< key, val > >::getRight(), casacore::ConstListIter< OrderedPair< key, val > >::len(), NoticeTarget(), casacore::ConstListIter< OrderedPair< key, val > >::operator++(), casacore::ConstListIter< OrderedPair< key, val > >::pos(), casacore::ConstListIter< OrderedPair< key, val > >::step(), casacore::ConstListIter< OrderedPair< key, val > >::toEnd(), and casacore::ConstListIter< OrderedPair< key, val > >::toStart().
void casacore::NoticeTarget::link | ( | const NoticeTarget * | other | ) | [protected] |
void casacore::NoticeTarget::link | ( | const NoticeTarget & | other | ) | [protected] |
Links this NoticeTarget
to the same NoticeSource
as the other NoticeTarget
.
Any previous link will be undone.
const Link<NoticeTarget*>* casacore::NoticeTarget::next | ( | ) | const [inline, protected] |
Definition at line 223 of file Notice.h.
References ilink, and casacore::Link< t >::next().
Link<NoticeTarget*>* casacore::NoticeTarget::next | ( | ) | [inline, protected] |
Retrieves the next NoticeTarget
in the target list of the associated NoticeSource
.
Definition at line 220 of file Notice.h.
References ilink, and casacore::Link< t >::next().
virtual void casacore::NoticeTarget::notify | ( | const Notice & | ) | [pure virtual] |
Hook through which NoticeTarget
s are notified (by NoticeSource
s).
Implemented in casacore::ConstListIter< t >, casacore::OrderedMapIterRep< key, value >, casacore::RecordFieldPtr< T >, casacore::ConstListIter< OrderedPair< key, val > >, casacore::RecordFieldPtr< Array< DComplex > >, casacore::RecordFieldPtr< Float >, casacore::RecordFieldPtr< recordType >, casacore::RecordFieldPtr< Array< String > >, casacore::RecordFieldPtr< Double >, casacore::RecordFieldPtr< Short >, casacore::RecordFieldPtr< uChar >, casacore::RecordFieldPtr< String >, casacore::RecordFieldPtr< Int >, casacore::RecordFieldPtr< Array< T > >, casacore::RecordFieldPtr< Array< uChar > >, casacore::RecordFieldPtr< Array< Short > >, casacore::RecordFieldPtr< DComplex >, casacore::RecordFieldPtr< Array< Bool > >, casacore::RecordFieldPtr< Bool >, casacore::RecordFieldPtr< Array< recordType > >, casacore::RecordFieldPtr< Array< Complex > >, casacore::RecordFieldPtr< Complex >, casacore::RecordFieldPtr< Array< Float > >, casacore::RecordFieldPtr< outType >, casacore::RecordFieldPtr< inType >, casacore::RecordFieldPtr< Array< Double > >, and casacore::RecordFieldPtr< Array< Int > >.
void casacore::NoticeTarget::unlink | ( | ) | [protected] |
Unlinks this NoticeTarget
from its NoticeSource
.
The NoticeTarget
will be removed from the target list.
friend class NoticeSource [friend] |
NoticeSource* casacore::NoticeTarget::container [protected] |
Reimplemented in casacore::OrderedMapIterRep< key, value >.
Definition at line 178 of file Notice.h.
Referenced by NoticeTarget().
Link<NoticeTarget*>* casacore::NoticeTarget::ilink [protected] |
Definition at line 177 of file Notice.h.
Referenced by isAttached(), and next().
Bool casacore::NoticeTarget::valid [protected] |
Definition at line 179 of file Notice.h.
Referenced by invalidate(), and isValid().