Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

SExpressionDoubleList::Iterator Class Reference

#include <sdbllist.hpp>

Inheritance diagram for SExpressionDoubleList::Iterator:

Inheritance graph
[legend]
Collaboration diagram for SExpressionDoubleList::Iterator:

Collaboration graph
[legend]
List of all members.

Detailed Description

Iterator for a doubly-linked list.

Definition at line 144 of file sdbllist.hpp.

Public Member Functions

 Iterator (const SDoubleListRef &m, bool from_end=false)
 Construct by a reference.
 Iterator (SExpressionDoubleList *m, bool from_end=false)
 Construct by a pointer to the master object.
void SetBegin ()
 Move the iterator to the first item of the list.
void SetEnd ()
 Move the iterator to the last item of the list.
void InsertBefore (const SReference &r)
 Insert a new item into the list before the current one.
void InsertAfter (const SReference &r)
 Insert a new item into the list after the current one.
bool Remove ()
 Remove the current item.
bool IsBegin () const
 Are we at the first element of the list?
bool IsEnd () const
 Are we at the last element of the list?
bool Exhausted () const
 Either the list is empty or we stepped past the last item.
const SDoubleListRefGetMaster ()
 Get the list obhect we are operating on.
SExpressionBacklinkGetPtr () const
 Get the pointer to the referenced object.
SExpressionBacklinkoperator-> () const
 Field/method selector.
SBacklinkRef operator, (const SReference &s)
 Append another element to the list.
SBacklinkRef Begin () const
 Get the first element of the list.
SBacklinkRef End () const
 Get the last element of the list.
SBacklinkRefoperator++ ()
 Move forward.
SBacklinkRef operator++ (int)
 Move forward.
SBacklinkRefoperator-- ()
 Move backward.
SBacklinkRef operator-- (int)
 Move backward.
SReferenceAddAnotherItemToList (const SReference &right)
 Add item to list.
SReferenceChangeListEnd (const SReference &new_last)
 Make/change dotted list.
SReference MakeCons (const SReference &right) const
 Make a cons.
SReferenceoperator|| (const SReference &t)
 dotted list composing operation
SReference operator^ (const SReference &t) const
 CONS operation.
bool operator== (const SReference &other) const
 Equality is just pointer comparision.
bool operator== (const SExpression *other) const
 Equality is just pointer comparision.
bool operator!= (const SReference &other) const
 Non-equality is just pointer comparision.
bool operator!= (const SExpression *other) const
 Non-equality is just pointer comparision.
bool IsEql (const SReference &other) const
bool IsEqual (const SReference &other) const
SReferenceCar () const
SReferenceCdr () const
SReferenceCCar () const
SReferenceCCdr () const
intelib_float_t GetFloat () const
intelib_integer_t GetInt () const
const char * GetString () const
char GetSingleChar () const
template<class Tp>
Tp * DynamicCastGetPtr () const
template<class Tp>
Tp * SimpleCastGetPtr () const
SReference Clone () const
SReference CopyList () const
SReference CopyTree () const
bool IsEmptyList () const
SExpressionoperator * () const
 Dereference.


Constructor & Destructor Documentation

SExpressionDoubleList::Iterator::Iterator const SDoubleListRef m,
bool  from_end = false
 

Construct by a reference.

Definition at line 148 of file sdbllist.hpp.

SExpressionDoubleList::Iterator::Iterator SExpressionDoubleList m,
bool  from_end = false
 

Construct by a pointer to the master object.

Definition at line 153 of file sdbllist.hpp.


Member Function Documentation

void SExpressionDoubleList::Iterator::SetBegin  ) 
 

Move the iterator to the first item of the list.

Definition at line 157 of file sdbllist.hpp.

References SBacklinkRef::operator=().

Referenced by InsertBefore().

void SExpressionDoubleList::Iterator::SetEnd  ) 
 

Move the iterator to the last item of the list.

Definition at line 159 of file sdbllist.hpp.

References SBacklinkRef::operator=().

Referenced by InsertAfter().

void SExpressionDoubleList::Iterator::InsertBefore const SReference r  ) 
 

Insert a new item into the list before the current one.

Definition at line 126 of file sdbllist.cpp.

References Exhausted(), IsBegin(), and SetBegin().

void SExpressionDoubleList::Iterator::InsertAfter const SReference r  ) 
 

Insert a new item into the list after the current one.

Reimplemented from SBacklinkRef.

Definition at line 138 of file sdbllist.cpp.

References Exhausted(), IsEnd(), and SetEnd().

bool SExpressionDoubleList::Iterator::Remove  ) 
 

Remove the current item.

Reimplemented from SBacklinkRef.

Definition at line 150 of file sdbllist.cpp.

References Exhausted(), SBacklinkRef::GetPtr(), IsBegin(), SReference::IsEmptyList(), IsEnd(), SReference::operator=(), SBacklinkRef::Remove(), and SReference::SReference().

bool SExpressionDoubleList::Iterator::IsBegin  )  const
 

Are we at the first element of the list?

Definition at line 169 of file sdbllist.hpp.

References SBacklinkRef::GetPtr(), SReference::IsEmptyList(), and SExpressionBacklink::Prev().

Referenced by InsertBefore(), and Remove().

bool SExpressionDoubleList::Iterator::IsEnd  )  const
 

Are we at the last element of the list?

Definition at line 171 of file sdbllist.hpp.

References SBacklinkRef::GetPtr(), SReference::IsEmptyList(), and SExpressionBacklink::Next().

Referenced by InsertAfter(), and Remove().

bool SExpressionDoubleList::Iterator::Exhausted  )  const
 

Either the list is empty or we stepped past the last item.

Definition at line 173 of file sdbllist.hpp.

References SBacklinkRef::GetPtr(), and SReference::IsEmptyList().

Referenced by InsertAfter(), InsertBefore(), and Remove().

const SDoubleListRef& SExpressionDoubleList::Iterator::GetMaster  ) 
 

Get the list obhect we are operating on.

Definition at line 176 of file sdbllist.hpp.

SExpressionBacklink * SBacklinkRef::GetPtr  )  const [inherited]
 

Get the pointer to the referenced object.

Warning:
Please note that the smart pointer SBacklinkRef may be pointing to the EmptyList object instead of an object of the SExpressionBacklink class. GetPtr() will simply return 0 (null pointer) in this case because the address of EmptyList can not be cast to SExpressionBacklink.

Reimplemented from SReference.

Definition at line 148 of file sbacklnk.cpp.

References SReference::GetPtr(), and SReference::IsEmptyList().

Referenced by SExpressionDoubleList::AddToBegin(), SExpressionDoubleList::AddToEnd(), SDoubleListRange::Copy(), Exhausted(), IsBegin(), SDoubleListRange::IsEmpty(), IsEnd(), SBacklinkRef::operator++(), SBacklinkRef::operator,(), SBacklinkRef::operator--(), SBacklinkRef::operator->(), Remove(), and SExpressionDoubleList::TextRepresentation().

SExpressionBacklink* SBacklinkRef::operator->  )  const [inherited]
 

Field/method selector.

Reimplemented from GenericReference< SExpression >.

Definition at line 145 of file sbacklnk.hpp.

References SBacklinkRef::GetPtr().

SBacklinkRef SBacklinkRef::operator, const SReference s  )  [inherited]
 

Append another element to the list.

Reimplemented from SReference.

Definition at line 186 of file sbacklnk.cpp.

References SExpressionCons::Cdr(), SReference::DynamicCastGetPtr(), SReference::GetPtr(), SBacklinkRef::GetPtr(), SExpressionBacklink::InsertAfter(), SReference::IsEmptyList(), PTheEmptyList, and SBacklinkRef::SBacklinkRef().

SBacklinkRef SBacklinkRef::Begin  )  const [inherited]
 

Get the first element of the list.

Definition at line 206 of file sbacklnk.cpp.

References SReference::IsEmptyList().

SBacklinkRef SBacklinkRef::End  )  const [inherited]
 

Get the last element of the list.

Definition at line 218 of file sbacklnk.cpp.

References SReference::IsEmptyList().

SBacklinkRef & SBacklinkRef::operator++  )  [inherited]
 

Move forward.

Definition at line 230 of file sbacklnk.cpp.

References SExpressionCons::Cdr(), SBacklinkRef::GetPtr(), and SReference::IsEmptyList().

SBacklinkRef SBacklinkRef::operator++ int   )  [inherited]
 

Move forward.

Definition at line 242 of file sbacklnk.cpp.

References SExpressionCons::Cdr(), SBacklinkRef::GetPtr(), and SReference::IsEmptyList().

SBacklinkRef & SBacklinkRef::operator--  )  [inherited]
 

Move backward.

Definition at line 236 of file sbacklnk.cpp.

References SBacklinkRef::GetPtr(), SReference::IsEmptyList(), and SExpressionBacklink::Prev().

SBacklinkRef SBacklinkRef::operator-- int   )  [inherited]
 

Move backward.

Definition at line 250 of file sbacklnk.cpp.

References SBacklinkRef::GetPtr(), SReference::IsEmptyList(), and SExpressionBacklink::Prev().

SReference& SReference::AddAnotherItemToList const SReference right  )  [inherited]
 

Add item to list.

For a list, adds another dotted pair to its end. For non-lists, the result is undefined.

Referenced by SReference::operator,().

SReference& SReference::ChangeListEnd const SReference new_last  )  [inherited]
 

Make/change dotted list.

  • For a proper (non-dotted) list, replaces its terminating () with the given argument, therefore producing a dotted list.
    • for a dotted list, changes it's terminating value (the value which is after the dot)
    • for other types, the result is undefined

Referenced by SReference::operator||().

SReference SReference::MakeCons const SReference right  )  const [inherited]
 

Make a cons.

Produces a cons (dotted pair) using *this as the CAR and the given argument as the CDR

Referenced by SReference::operator^().

SReference& SReference::operator|| const SReference t  )  [inherited]
 

dotted list composing operation

Operator "||" is used to construct dotted lists, like this: ((L| 1, 2, 3) || 4) // (1 2 3 . 4)

See also:
LListConstructor class

Reimplemented in LReference, and SchReference.

Definition at line 548 of file sexpress.hpp.

References SReference::ChangeListEnd().

Referenced by SchReference::operator||(), and LReference::operator||().

SReference SReference::operator^ const SReference t  )  const [inherited]
 

CONS operation.

Operator "^" is used to produce conses

Definition at line 552 of file sexpress.hpp.

References SReference::MakeCons().

bool SReference::operator== const SReference other  )  const [inherited]
 

Equality is just pointer comparision.

Definition at line 556 of file sexpress.hpp.

References SReference::GetPtr().

bool SReference::operator== const SExpression other  )  const [inherited]
 

Equality is just pointer comparision.

Definition at line 562 of file sexpress.hpp.

References SReference::GetPtr().

bool SReference::operator!= const SReference other  )  const [inherited]
 

Non-equality is just pointer comparision.

Definition at line 559 of file sexpress.hpp.

References SReference::GetPtr().

bool SReference::operator!= const SExpression other  )  const [inherited]
 

Non-equality is just pointer comparision.

Definition at line 565 of file sexpress.hpp.

References SReference::GetPtr().

bool SReference::IsEql const SReference other  )  const [inherited]
 

Reimplemented in LReference, and SchReference.

Referenced by SExprsAreEql().

bool SReference::IsEqual const SReference other  )  const [inherited]
 

Reimplemented in LReference, and SchReference.

Referenced by SExprsAreEqual().

SReference& SReference::Car  )  const [inherited]
 

Referenced by LExpressionMacro::Call(), SDoubleListRange::Copy(), IntelibGenericReader::Get(), RetrieveFunctionObject(), and stack_representation().

SReference& SReference::Cdr  )  const [inherited]
 

Referenced by LExpressionMacro::Call(), SBacklinkRef::Remove(), SQueue::RemoveFirst(), RetrieveFunctionObject(), and stack_representation().

SReference& SReference::CCar  )  const [inherited]
 

SReference& SReference::CCdr  )  const [inherited]
 

intelib_float_t SReference::GetFloat  )  const [inherited]
 

Referenced by SExpressionIndirectTemplate< Tt >::Setf().

intelib_integer_t SReference::GetInt  )  const [inherited]
 

Referenced by SExpressionIndirectTemplate< Tt >::Setf().

const char* SReference::GetString  )  const [inherited]
 

Referenced by SExpressionIndirectTemplate< Tt >::Setf().

char SReference::GetSingleChar  )  const [inherited]
 

template<class Tp>
Tp * SReference::DynamicCastGetPtr  )  const [inherited]
 

Definition at line 687 of file sexpress.hpp.

References SReference::GetPtr(), IntelibTypeId::IsSubtypeOf(), and SExpression::TermType().

Referenced by LispLambdaBody::DoAnalyseLambdaList(), SExpressionBacklink::InsertAfter(), SBacklinkRef::operator,(), pretty_print(), IntelibGenericReader::Read(), SBacklinkRef::Remove(), SExpressionBacklink::RemoveNext(), RetrieveFunctionObject(), SQueue::SQueue(), and SExpressionBacklink::~SExpressionBacklink().

template<class Tp>
Tp * SReference::SimpleCastGetPtr  )  const [inherited]
 

Definition at line 695 of file sexpress.hpp.

References SReference::GetPtr(), and SExpression::TermType().

SReference SReference::Clone  )  const [inherited]
 

Referenced by SExpressionVector::Clone(), and SExpressionHashTable::Clone().

SReference SReference::CopyList  )  const [inherited]
 

SReference SReference::CopyTree  )  const [inherited]
 

bool SReference::IsEmptyList  )  const [inherited]
 

Referenced by SBacklinkRef::Begin(), LExpressionMacro::Call(), SExpressionBacklink::ConnectBack(), SDoubleListRange::Copy(), SBacklinkRef::End(), SExpressionDoubleList::Exclude(), SDoubleListRange::Exhausted(), Exhausted(), SDoubleListRange::GetLast(), SBacklinkRef::GetPtr(), SBacklinkRef::InsertAfter(), SExpressionDoubleList::InsertListAfter(), IsBegin(), SQueue::IsEmpty(), IsEnd(), SBacklinkRef::operator++(), SBacklinkRef::operator,(), SDoubleListRange::RightEndMover::operator--(), SDoubleListRange::LeftEndMover::operator--(), SBacklinkRef::operator--(), pretty_print(), Remove(), SBacklinkRef::Remove(), SExpressionBacklink::RemoveNext(), SQueue::SQueue(), stack_representation(), SchReference::TextRepresentation(), LReference::TextRepresentation(), and SExpressionBacklink::~SExpressionBacklink().

SExpression & GenericReference< SExpression >::operator *  )  const [inherited]
 

Dereference.

Reimplemented in GenericSReference< Tp, X_wrongtype >, GenericSReference< SExpressionStream, IntelibX_not_a_stream >, GenericSReference< SchExpressionContext, IntelibX_scheme_not_a_context >, GenericSReference< SExpressionWrapper< Data >, IntelibX_wrong_expression_type >, GenericSReference< LExpressionSymbol, IntelibX_lisp_not_a_symbol >, GenericSReference< SExpressionDoubleList, IntelibX_not_a_doublelist >, GenericSReference< SExpressionString, IntelibX_not_a_string >, GenericSReference< SExpressionHashPackage, IntelibX_not_a_package >, GenericSReference< SExpressionVector, IntelibX_not_a_vector >, GenericSReference< SExpressionHashTable, IntelibX_not_a_hash_table >, GenericSReference< SchExpressionSymbol, IntelibX_scheme_not_a_symbol >, and GenericSReference< LExpressionContext, IntelibX_lisp_not_a_context >.

Definition at line 179 of file refcount.hpp.

References GenericReference< Tp >::GetPtr().


The documentation for this class was generated from the following files:
Generated on Tue Dec 18 00:41:10 2007 for InteLib by  doxygen 1.4.1