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.

53 lines
1.4 KiB

  1. #ifndef __MemberCollection_h__
  2. #define __MemberCollection_h__
  3. class CParticipant;
  4. #include "NetMeeting.h"
  5. #include "ias.h"
  6. class ATL_NO_VTABLE CMemberCollection :
  7. public CComObjectRootEx<CComSingleThreadModel>,
  8. public IDispatchImpl<IMemberCollection, &IID_IMemberCollection, &LIBID_NetMeetingLib>
  9. {
  10. protected:
  11. CSimpleArray<IMember*> m_Members;
  12. public:
  13. DECLARE_NO_REGISTRY()
  14. DECLARE_NOT_AGGREGATABLE(CMemberCollection)
  15. DECLARE_PROTECT_FINAL_CONSTRUCT()
  16. BEGIN_COM_MAP(CMemberCollection)
  17. COM_INTERFACE_ENTRY(IMemberCollection)
  18. COM_INTERFACE_ENTRY(IDispatch)
  19. END_COM_MAP()
  20. //////////////////////////////////////////////////////////
  21. // Construction / destruction / initialization
  22. //////////////////////////////////////////////////////////
  23. ~CMemberCollection();
  24. static HRESULT CreateInstance(CSimpleArray<IMember*>& rMemberObjs, IMemberCollection** ppMemberCollection);
  25. //////////////////////////////////////////////////////////
  26. // IMemberCollection
  27. //////////////////////////////////////////////////////////
  28. STDMETHOD(get_Item)(VARIANT Index, IMember** ppMember);
  29. STDMETHOD(_NewEnum)(IUnknown** ppunk);
  30. STDMETHOD(get_Count)(LONG * pnCount);
  31. //////////////////////////////////////////////////////////
  32. // Helpers
  33. //////////////////////////////////////////////////////////
  34. HRESULT _Init(CSimpleArray<IMember*>& rMemberObjs);
  35. void _FreeMemberCollection();
  36. IMember* _GetMemberFromName(LPCTSTR pszName);
  37. };
  38. #endif // __MemberCollection_h__