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.

91 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. Environment:
  11. ULIB, User Mode
  12. --*/
  13. #if ! defined( _CONTAINER_ )
  14. #define _CONTAINER_
  15. DECLARE_CLASS( CONTAINER );
  16. class CONTAINER : public OBJECT {
  17. public:
  18. VIRTUAL
  19. ~CONTAINER(
  20. );
  21. VIRTUAL
  22. BOOLEAN
  23. Put(
  24. IN OUT POBJECT Member
  25. ) PURE;
  26. VIRTUAL
  27. ULONG
  28. QueryMemberCount(
  29. ) CONST PURE;
  30. VIRTUAL
  31. BOOLEAN
  32. DeleteAllMembers(
  33. ) PURE;
  34. NONVIRTUAL
  35. BOOLEAN
  36. IsEmpty(
  37. ) CONST;
  38. protected:
  39. DECLARE_CONSTRUCTOR( CONTAINER );
  40. };
  41. INLINE
  42. BOOLEAN
  43. CONTAINER::IsEmpty(
  44. ) CONST
  45. /*++
  46. Routine Description:
  47. Determine if the container is empty.
  48. Arguments:
  49. None.
  50. Return Value:
  51. BOOLEAN - TRUE if the container is empty.
  52. --*/
  53. {
  54. return QueryMemberCount() == 0;
  55. }
  56. #endif // _CONTAINER_