Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: CMarkedStack.h

Class CMarkedStack

class CMarkedStack : public CStack< T, Owner >;

Description

Provides a templated stack that allows items in the stack to be marked.

The class allows each mark to have an associated TInt value, which allows different types of mark to be used on the same stack.

Template parameter T specifies the type of object on the stack. Owner should be set to ETrue if the object's destructor should delete the objects on the stack.

Derivation

Members

Defined in CMarkedStack:
CMarks, DeleteToMark(), MarkL(), RemoveMark(), ResetToMark(), TMarkPoint, iMarks, ~CMarkedStack()


Construction and destruction


~CMarkedStack()

inline virtual ~CMarkedStack();

Description

Destructor.

It clears all marks.

[Top]


Member functions


MarkL()

inline void MarkL(TInt aMarkType);

Description

Marks the stack's head item.

Parameters

TInt aMarkType

Mark type


RemoveMark()

inline TInt RemoveMark(TInt aMarkType);

Description

Removes all marks until a mark of the specified type is found.

Parameters

TInt aMarkType

Mark type

Return value

TInt

Index of the stack item marked by the found mark


DeleteToMark()

inline void DeleteToMark(TInt aMarkType);

Description

Pops and deletes items from the stack until the item marked with the specified mark type is at the head.

Parameters

TInt aMarkType

Mark type


ResetToMark()

inline void ResetToMark(TInt aMarkType);

Description

Pops items from the stack until the item marked with the specified mark type is at the head.

Parameters

TInt aMarkType

Mark type

[Top]


Member classes


Class TMarkPoint

protected: class TMarkPoint;

Description

Represents a mark.

Members

Defined in CMarkedStack::TMarkPoint:
TMarkPoint(), iMarkType, iStackIndex

Construction and destruction


TMarkPoint()

inline TMarkPoint(TInt aMarkType, TInt aIndex);

Description

Represents a mark.

Parameters

TInt aMarkType

TInt aIndex

Member data


iMarkType

TInt iMarkType;

Description

Mark type.


iStackIndex

TInt iStackIndex;

Description

Index of the marked stack item.

[Top]


Member type definitions


Typedef CMarks

protected: typedef CStack<TMarkPoint, ETrue> CMarkedStack< T, Owner >::CMarks;

Description

Defines a stack of marks.

[Top]


Member data


iMarks

protected: CMarks iMarks;

Description

A stack of marks.

Items are added and removed from this stack by MarkL(), RemoveMark() etc.