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.

104 lines
3.1 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. /*++
  3. Copyright (C) Microsoft Corporation
  4. Module Name:
  5. NodeWithResultChildrenList.h
  6. Abstract:
  7. This is the header file for CNodeWithResultChildrenList, a class which
  8. implements a node that has a list of scope pane children.
  9. This is an inline template class.
  10. Include NodeWithScopeChildrenList.cpp in the .cpp files
  11. of the classes in which you use this template.
  12. Author:
  13. Michael A. Maguire 12/03/97
  14. Revision History:
  15. mmaguire 12/03/97 - created based on old ClientsNode.h
  16. --*/
  17. //////////////////////////////////////////////////////////////////////////////
  18. #if !defined(_NODE_WITH_RESULT_CHILDREN_LIST_H_)
  19. #define _NODE_WITH_RESULT_CHILDREN_LIST_H_
  20. //////////////////////////////////////////////////////////////////////////////
  21. // BEGIN INCLUDES
  22. //
  23. // where we can find what this class derives from:
  24. //
  25. #include "SnapinNode.h"
  26. //
  27. //
  28. // where we can find what this class has or uses:
  29. //
  30. #include <atlapp.h> // for CSimpleArray
  31. //
  32. // END INCLUDES
  33. //////////////////////////////////////////////////////////////////////////////
  34. template < class T, class CChildNode, class TArray, class TComponentData, class TComponent>
  35. class CNodeWithResultChildrenList : public CSnapinNode< T, TComponentData, TComponent >
  36. {
  37. // Constructor/Destructor
  38. public:
  39. CNodeWithResultChildrenList(
  40. CSnapInItem* pParentNode,
  41. unsigned int helpIndex = 0
  42. );
  43. ~CNodeWithResultChildrenList();
  44. // Child list management.
  45. public:
  46. virtual HRESULT AddSingleChildToListAndCauseViewUpdate( CChildNode * pChildNode );
  47. virtual HRESULT RemoveChild( CChildNode * pChildNode );
  48. virtual HRESULT UpdateResultPane(IResultData * pResultData);
  49. // Flag indicating whether list has been initially populated
  50. BOOL m_bResultChildrenListPopulated;
  51. protected:
  52. // Override these in your derived classes
  53. virtual HRESULT InsertColumns( IHeaderCtrl* pHeaderCtrl );
  54. virtual HRESULT PopulateResultChildrenList( void );
  55. virtual HRESULT RepopulateResultChildrenList( void );
  56. // Stuff which must be accessible to subclasses. These methods shouldn't need to be overidden.
  57. virtual HRESULT AddChildToList( CChildNode * pChildNode );
  58. virtual HRESULT EnumerateResultChildren( IResultData * pResultData );
  59. // Array of pointers to children nodes.
  60. // This is protected so that it can be visible in the derived classes.
  61. TArray m_ResultChildrenList;
  62. // Overrides for standard MMC functionality.
  63. public:
  64. virtual HRESULT OnShow(
  65. LPARAM arg
  66. , LPARAM param
  67. , IComponentData * pComponentData
  68. , IComponent * pComponent
  69. , DATA_OBJECT_TYPES type
  70. );
  71. virtual HRESULT OnRefresh(
  72. LPARAM arg
  73. , LPARAM param
  74. , IComponentData * pComponentData
  75. , IComponent * pComponent
  76. , DATA_OBJECT_TYPES type
  77. );
  78. };
  79. #endif // _NODE_WITH_RESULT_CHILDREN_LIST_H_