windows-nt/Source/XPSP1/NT/com/oleutest/oletest/stack.h
2020-09-26 16:20:57 +08:00

62 lines
1.4 KiB
C++
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//+-------------------------------------------------------------------------
//
// Microsoft Windows
// Copyright (C) Microsoft Corporation, 1992 - 1993.
//
// File: stack.h
//
// Contents: The class declaration of the task stack.
//
// Classes: TaskStack
//
// History: dd-mmm-yy Author Comment
// 06-Feb-93 alexgo author
//
//--------------------------------------------------------------------------
#ifndef _STACK_H
#define _STACK_H
typedef struct TaskNode
{
TaskItem ti;
struct TaskNode *pNext;
} TaskNode;
//+-------------------------------------------------------------------------
//
// Class: TaskStack
//
// Purpose: Stores the task list of tests to be run.
//
// History: dd-mmm-yy Author Comment
// 06-Feb-93 alexgo author
//
// Notes: TaskItems are passed in and returned from methods
// as structure copies. This is done to simply memory
// management (since the overriding design goal of the
// driver app is simplicity over efficiency).
//
//--------------------------------------------------------------------------
class TaskStack
{
public:
TaskStack( void ); //constructor
void AddToEnd( void (*)(void *), void *);
void AddToEnd( const TaskItem *);
void Empty(void);
BOOL IsEmpty(void);
void Pop( TaskItem * );
void PopAndExecute( TaskItem * );
void Push( void (*)(void *), void *);
void Push( const TaskItem *);
private:
TaskNode *m_pNodes;
};
#endif //!_STACK_H