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

/*++
Copyright (c) 1990 Microsoft Corporation
Module Name:
contain.hxx
Abstract:
This module contains the definition for the CONTAINER class, the most
primitive, abstract class in the container sub-hierarchy. CONTAINERs
of all types are repositories for OBJECTs. CONTAINER is the most abstract
in that it makes no assumptions about the ordering of it's contents.
Environment:
ULIB, User Mode
--*/
#if ! defined( _CONTAINER_ )
#define _CONTAINER_
DECLARE_CLASS( CONTAINER );
class CONTAINER : public OBJECT {
public:
VIRTUAL
~CONTAINER(
);
VIRTUAL
BOOLEAN
Put(
IN OUT POBJECT Member
) PURE;
VIRTUAL
ULONG
QueryMemberCount(
) CONST PURE;
VIRTUAL
BOOLEAN
DeleteAllMembers(
) PURE;
NONVIRTUAL
BOOLEAN
IsEmpty(
) CONST;
protected:
DECLARE_CONSTRUCTOR( CONTAINER );
};
INLINE
BOOLEAN
CONTAINER::IsEmpty(
) CONST
/*++
Routine Description:
Determine if the container is empty.
Arguments:
None.
Return Value:
BOOLEAN - TRUE if the container is empty.
--*/
{
return QueryMemberCount() == 0;
}
#endif // _CONTAINER_