#include <sbacklnk.hpp>
Inheritance diagram for SExpressionBacklink:
Effectively this class is just a cons with a pointer for backwards direction, intended to point to the previous node of the list.
Definition at line 43 of file sbacklnk.hpp.
Public Member Functions | |
SExpressionBacklink (const SReference &acar, const SReference &acdr) | |
The constructor. | |
virtual SExpression * | Clone () const |
bool | ConnectBack (const SBacklinkRef &where_to) |
Connect this element to the end of another one. | |
bool | DisconnectBack () |
Destroy the connection between us and the item right back to us. | |
void | InsertAfter (const SReference &ref) |
Insert new item into the list right after this one. | |
bool | RemoveNext () |
Remove the next item from the list. | |
SBacklinkRef | Prev () const |
Get the previous item reference. | |
SBacklinkRef | Next () const |
Get the next item reference. | |
SReference & | Car () |
const SReference & | Car () const |
SReference & | Cdr () |
const SReference & | Cdr () const |
SString | CoreTextRepresentation (const char *delim, const char *dotdelim, SString(*repfun)(const SReference &)=0) const |
virtual SString | TextRepresentation () const |
const IntelibTypeId & | TermType () const |
Actual S-expression type. | |
bool | IsChangeable () const |
Can it be changed during the lifetime of the object? | |
virtual bool | SpecificEql (const SExpression *) const |
Are the two objects EQL (while not EQ). | |
Static Public Attributes | |
static IntelibTypeId | TypeId |
Type identifier. | |
Protected Member Functions | |
SExpressionBacklink (const SReference &acar, const SReference &acdr, const IntelibTypeId &t) | |
~SExpressionBacklink () | |
bool | CanDie () |
Is it OK to delete the object now? |
|
The constructor. Backward reference is set to NULL Definition at line 51 of file sbacklnk.hpp. References TypeId. Referenced by InsertAfter(). |
|
Definition at line 55 of file sbacklnk.hpp. |
|
Definition at line 26 of file sbacklnk.cpp. References back, SExpressionCons::Cdr(), SReference::DynamicCastGetPtr(), SReference::GetPtr(), and SReference::IsEmptyList(). |
|
Reimplemented from SExpressionCons. Definition at line 36 of file sbacklnk.cpp. |
|
Connect this element to the end of another one. If this element has something before the back or the where_to item has something after it, the function returns false. Otherwise, it connects them (thus changing our backlink and where_to's Cdr), returning true. Definition at line 41 of file sbacklnk.cpp. References SExpressionCons::Cdr(), and SReference::IsEmptyList(). |
|
Destroy the connection between us and the item right back to us. If there's no item backwards to us, simply returns false; Otherwise, destroys the link between us (thus changing our backlink and where_to's Cdr), returning true. Definition at line 49 of file sbacklnk.cpp. References SExpressionCons::Cdr(), and PTheEmptyList. Referenced by SBacklinkRef::Remove(). |
|
Insert new item into the list right after this one.
Definition at line 57 of file sbacklnk.cpp. References back, SExpressionCons::Cdr(), SReference::DynamicCastGetPtr(), and SExpressionBacklink(). Referenced by SBacklinkRef::InsertAfter(), and SBacklinkRef::operator,(). |
|
Remove the next item from the list.
Definition at line 68 of file sbacklnk.cpp. References back, SExpressionCons::Cdr(), SReference::DynamicCastGetPtr(), SReference::IsEmptyList(), and PTheEmptyList. |
|
Get the previous item reference.
Definition at line 91 of file sbacklnk.cpp. References PTheEmptyList. Referenced by SExpressionDoubleList::Iterator::IsBegin(), SBacklinkRef::operator--(), and SBacklinkRef::Remove(). |
|
Get the next item reference.
Definition at line 99 of file sbacklnk.cpp. References SExpressionCons::Cdr(). Referenced by SExpressionDoubleList::Iterator::IsEnd(). |
|
|
Definition at line 624 of file sexpress.hpp. |
|
|
Definition at line 625 of file sexpress.hpp. |
|
Used as a subroutine of TextRepresentation() to implement a representation of a part of a list
Referenced by SchReference::TextRepresentation(), and LReference::TextRepresentation(). |
|
List and dotted lists are represented just like in a real Lisp, that is, with traditional Lisp syntax. Implements SExpression. |
|
Actual S-expression type.
Definition at line 195 of file sexpress.hpp. Referenced by SReference::DynamicCastGetPtr(), SchReference::IsEql(), LReference::IsEql(), SReference::SimpleCastGetPtr(), SchReference::TextRepresentation(), and LReference::TextRepresentation(). |
|
Can it be changed during the lifetime of the object?
Definition at line 198 of file sexpress.hpp. References IntelibTypeId::IsChangeable(). |
|
Are the two objects EQL (while not EQ). This function is overriden by those SExpressions able to be EQL while being not EQ.
Reimplemented in SExpressionInt, SExpressionFloat, SExpressionChar, and SExpressionString. Definition at line 235 of file sexpress.hpp. Referenced by SchReference::IsEql(), and LReference::IsEql(). |
|
Is it OK to delete the object now? Our children have no access to the private attribute RefCount and should never need it except when checking if the destruction is not an error. This solves the problem. Definition at line 53 of file refcount.hpp. |
|
Type identifier.
Reimplemented from SExpressionCons. Referenced by SExpressionBacklink(). |