Source code of Windows XP (NT5)
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.

95 lines
1.2 KiB

  1. /*++
  2. Copyright (c) 1990 Microsoft Corporation
  3. Module Name:
  4. contain.hxx
  5. Abstract:
  6. This module contains the definition for the CONTAINER class, the most
  7. primitive, abstract class in the container sub-hierarchy. CONTAINERs
  8. of all types are repositories for OBJECTs. CONTAINER is the most abstract
  9. in that it makes no assumptions about the ordering of it's contents.
  10. Author:
  11. David J. Gilman (davegi) 26-Oct-1990
  12. Environment:
  13. ULIB, User Mode
  14. --*/
  15. #if ! defined( _CONTAINER_ )
  16. #define _CONTAINER_
  17. DECLARE_CLASS( CONTAINER );
  18. class CONTAINER : public OBJECT {
  19. public:
  20. VIRTUAL
  21. ~CONTAINER(
  22. );
  23. VIRTUAL
  24. BOOLEAN
  25. Put(
  26. IN OUT POBJECT Member
  27. ) PURE;
  28. VIRTUAL
  29. ULONG
  30. QueryMemberCount(
  31. ) CONST PURE;
  32. VIRTUAL
  33. BOOLEAN
  34. DeleteAllMembers(
  35. ) PURE;
  36. NONVIRTUAL
  37. BOOLEAN
  38. IsEmpty(
  39. ) CONST;
  40. protected:
  41. DECLARE_CONSTRUCTOR( CONTAINER );
  42. };
  43. INLINE
  44. BOOLEAN
  45. CONTAINER::IsEmpty(
  46. ) CONST
  47. /*++
  48. Routine Description:
  49. Determine if the container is empty.
  50. Arguments:
  51. None.
  52. Return Value:
  53. BOOLEAN - TRUE if the container is empty.
  54. --*/
  55. {
  56. return QueryMemberCount() == 0;
  57. }
  58. #endif // _CONTAINER_