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.

107 lines
2.3 KiB

  1. /*++
  2. Copyright (C) 1996-1999 Microsoft Corporation
  3. Module Name:
  4. OPTVALSET.H
  5. History:
  6. --*/
  7. #pragma once
  8. #pragma warning(disable: 4275) // non dll-interface class 'foo' used
  9. // as base for dll-interface class 'bar'
  10. class LTAPIENTRY CLocOptionValEnumCallback : public CObject
  11. {
  12. public:
  13. CLocOptionValEnumCallback() {};
  14. void AssertValid(void) const;
  15. virtual BOOL ProcessOption(CLocOptionVal *) = 0;
  16. virtual BOOL ProcessOption(const CLocOptionVal *) = 0;
  17. private:
  18. CLocOptionValEnumCallback(const CLocOptionValEnumCallback &);
  19. void operator=(int);
  20. };
  21. class LTAPIENTRY CLocOptionValSet;
  22. class LTAPIENTRY CLocOptionValSetList :
  23. public CTypedPtrList<CPtrList, CLocOptionValSet *>
  24. {
  25. public:
  26. NOTHROW CLocOptionValSetList() {};
  27. void AssertValid(void) const;
  28. NOTHROW void ReleaseAll();
  29. NOTHROW ~CLocOptionValSetList();
  30. private:
  31. CLocOptionValSetList(const CLocOptionValSetList &);
  32. void operator=(const CLocOptionValSetList &);
  33. };
  34. class LTAPIENTRY CLocOptionValSet : public CRefCount, public CObject
  35. {
  36. public:
  37. NOTHROW CLocOptionValSet();
  38. void AssertValid(void) const;
  39. NOTHROW void AddOption(CLocOptionVal *);
  40. NOTHROW void AddOptionSet(CLocOptionValSet *);
  41. NOTHROW void SetName(const CLString &);
  42. NOTHROW const CLocOptionValList & GetOptionList(void) const;
  43. NOTHROW const CLocOptionValSetList & GetOptionSets(void) const;
  44. NOTHROW BOOL FindOptionVal(const CLString &, CLocOptionVal *&pOption);
  45. NOTHROW BOOL FindOptionVal(const CLString &, const CLocOptionVal *&pOption) const;
  46. NOTHROW const CLString & GetName(void) const;
  47. NOTHROW BOOL IsEmpty(void) const;
  48. BOOL EnumOptions(CLocOptionValEnumCallback *);
  49. BOOL EnumOptions(CLocOptionValEnumCallback *) const;
  50. //
  51. // Escape hatch.
  52. //
  53. NOTHROW void * GetPExtra(void) const;
  54. NOTHROW DWORD GetDWExtra(void) const;
  55. NOTHROW void SetExtra(void *);
  56. NOTHROW void SetExtra(DWORD);
  57. protected:
  58. NOTHROW virtual ~CLocOptionValSet();
  59. private:
  60. CLocOptionValList m_olOptions;
  61. CLocOptionValSetList m_oslSubOptions;
  62. CLString m_strName;
  63. union
  64. {
  65. void *m_pExtra;
  66. DWORD m_dwExtra;
  67. };
  68. CLocOptionValSet(const CLocOptionValSet &);
  69. void operator=(const CLocOptionValSet &);
  70. };
  71. #pragma warning(default: 4275)
  72. #if !defined(_DEBUG) || defined(IMPLEMENT)
  73. #include "optvalset.inl"
  74. #endif