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.

65 lines
1.7 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 2000 - 2001.
  5. //
  6. // File: enumaz.h
  7. //
  8. // Contents:
  9. //
  10. // History: 08-13-2001 Hiteshr Created
  11. //
  12. //----------------------------------------------------------------------------
  13. //
  14. //Forward Declaration
  15. //
  16. class CApplicationAz;
  17. class CGroupAz;
  18. class COperationAz;
  19. class CTaskAz;
  20. class CScopeAz;
  21. class CRoleAz;
  22. class CBaseAz;
  23. class CContainerAz;
  24. class CBaseAzCollection
  25. {
  26. public:
  27. virtual ~CBaseAzCollection(){}
  28. virtual HRESULT Count(LONG* plCount) = 0;
  29. virtual CBaseAz* GetItem(UINT iIndex) = 0;
  30. };
  31. template<class IAzCollection, class IAzInterface, class CObjectAz>
  32. class CAzCollection:public CBaseAzCollection
  33. {
  34. public:
  35. CAzCollection(CComPtr<IAzCollection>& spAzCollection,
  36. CContainerAz* pParentContainerAz);
  37. virtual ~CAzCollection();
  38. HRESULT Count(LONG* plCount);
  39. CBaseAz* GetItem(UINT iIndex);
  40. CBaseAz* GetParentAzObject(){return m_pParentBaseAz;}
  41. private:
  42. CComPtr<IAzCollection> m_spAzCollection;
  43. //
  44. //This is the parent of all the AzObjects returned by
  45. //Next method.
  46. //
  47. CContainerAz* m_pParentContainerAz;
  48. };
  49. #include"enumaz.cpp"
  50. typedef CAzCollection<IAzApplications,IAzApplication,CApplicationAz> APPLICATION_COLLECTION;
  51. typedef CAzCollection<IAzApplicationGroups,IAzApplicationGroup,CGroupAz> GROUP_COLLECTION;
  52. typedef CAzCollection<IAzOperations,IAzOperation,COperationAz> OPERATION_COLLECTION;
  53. typedef CAzCollection<IAzTasks,IAzTask,CTaskAz> TASK_COLLECTION;
  54. typedef CAzCollection<IAzScopes,IAzScope,CScopeAz> SCOPE_COLLECTION;
  55. typedef CAzCollection<IAzRoles,IAzRole,CRoleAz> ROLE_COLLECTION;