CWContainer


Discussion

This class is a simple placeholder used when doing message threading. A container is composed of a CWMessage instance which might be nil, a parent, child and next CWContainer instances. For a full description of the implemented algorithm, see message threading. Instance variables of this class must be accessed directly (ie., without an accessor) - for performance reasons.

Superclass

NSObject

Declared In

CWContainer.h



Methods

-childAtIndex:
-childrenEnumerator
-count
-setChild:
-setNext:
-setParent:

childAtIndex:


- (CWContainer *) childAtIndex: (unsigned int) theIndex; 
Parameters
theIndex

The index of the child, which is 0 based.

Return Value

The CWContainer instance.

Discussion

This method is used to get the child at the specified index.


childrenEnumerator


- (NSEnumerator *) childrenEnumerator; 
Return Value

All children, as a NSEnumerator instance.

Discussion

This method is used to obtain all children of the receiver.


count


- (unsigned int) count; 
Return Value

The number of children.

Discussion

This method is used to obtain the number of children of the receiver.


setChild:


- (void) setChild: (CWContainer *) theChild; 
Parameters
theChild

The child to add which can be nil to remove the first child.

Discussion

This method is used to add the specified child to the list of children.


setNext:


- (void) setNext: (CWContainer *) theNext; 
Parameters
theNext

The next element, or nil if there's none.

Discussion

This method is used to set the next element in sibling list.


setParent:


- (void) setParent: (CWContainer *) theParent; 
Parameters
theParent

The parent CWContainer, which might be nil if the receiver is part of the root set.

Discussion

This method is used to set the parent CWContainer of the receiver.


Member Data

child
message
next
parent

child


public

CWContainer *parent, *child, *next;

message


public

CWMessage *message;

next


public

CWContainer *parent, *child, *next;

parent


public

CWContainer *parent, *child, *next;