Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
1.5 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1993.
  5. //
  6. // File: stack.h
  7. //
  8. // Contents: The class declaration of the task stack.
  9. //
  10. // Classes: TaskStack
  11. //
  12. // History: dd-mmm-yy Author Comment
  13. // 06-Feb-93 alexgo author
  14. //
  15. //--------------------------------------------------------------------------
  16. #ifndef _STACK_H
  17. #define _STACK_H
  18. typedef struct TaskNode
  19. {
  20. TaskItem ti;
  21. struct TaskNode *pNext;
  22. } TaskNode;
  23. //+-------------------------------------------------------------------------
  24. //
  25. // Class: TaskStack
  26. //
  27. // Purpose: Stores the task list of tests to be run.
  28. //
  29. // History: dd-mmm-yy Author Comment
  30. // 06-Feb-93 alexgo author
  31. //
  32. // Notes: TaskItems are passed in and returned from methods
  33. // as structure copies. This is done to simply memory
  34. // management (since the overriding design goal of the
  35. // driver app is simplicity over efficiency).
  36. //
  37. //--------------------------------------------------------------------------
  38. class TaskStack
  39. {
  40. public:
  41. TaskStack( void ); //constructor
  42. void AddToEnd( void (*)(void *), void *);
  43. void AddToEnd( const TaskItem *);
  44. void Empty(void);
  45. BOOL IsEmpty(void);
  46. void Pop( TaskItem * );
  47. void PopAndExecute( TaskItem * );
  48. void Push( void (*)(void *), void *);
  49. void Push( const TaskItem *);
  50. private:
  51. TaskNode *m_pNodes;
  52. };
  53. #endif //!_STACK_H
  54.