Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <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:


Construction and destruction


~CMarkedStack()

inline virtual ~CMarkedStack();

Description

Destructor.

It clears all marks.

[Top]


Member functions


MarkL(TInt)

inline void MarkL(TInt aMarkType);

Description

Marks the stack's head item.

Parameters

TInt aMarkType

Mark type


RemoveMark(TInt)

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(TInt)

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(TInt)

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:

Construction and destruction


TMarkPoint(TInt,TInt)

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 CMarkedStack::MarkL(TInt), CMarkedStack::RemoveMark(TInt) etc.