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.

68 lines
1.6 KiB

  1. ///////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1998, Microsoft Corp. All rights reserved.
  4. //
  5. // FILE
  6. //
  7. // Match.h
  8. //
  9. // SYNOPSIS
  10. //
  11. // This file declares the class AttributeMatch.
  12. //
  13. // MODIFICATION HISTORY
  14. //
  15. // 02/04/1998 Original version.
  16. // 03/23/1999 Renamed Match to AttributeMatch.
  17. // 04/05/1999 Need custom UpdateRegistry method.
  18. //
  19. ///////////////////////////////////////////////////////////////////////////////
  20. #ifndef _MATCH_H_
  21. #define _MATCH_H_
  22. #include <condition.h>
  23. #include <regex.h>
  24. ///////////////////////////////////////////////////////////////////////////////
  25. //
  26. // CLASS
  27. //
  28. // AttributeMatch
  29. //
  30. // DESCRIPTION
  31. //
  32. // Applies a regular expression to a single attribute.
  33. //
  34. ///////////////////////////////////////////////////////////////////////////////
  35. class ATL_NO_VTABLE AttributeMatch :
  36. public Condition,
  37. public CComCoClass<AttributeMatch, &__uuidof(AttributeMatch)>
  38. {
  39. public:
  40. static HRESULT WINAPI UpdateRegistry(BOOL bRegister) throw ();
  41. AttributeMatch() throw ()
  42. : targetID(0)
  43. { }
  44. //////////
  45. // ICondition
  46. //////////
  47. STDMETHOD(IsTrue)(/*[in]*/ IRequest* pRequest,
  48. /*[out, retval]*/ VARIANT_BOOL *pVal);
  49. //////////
  50. // IConditionText
  51. //////////
  52. STDMETHOD(put_ConditionText)(/*[in]*/ BSTR newVal);
  53. protected:
  54. BOOL checkAttribute(PIASATTRIBUTE attr) const throw ();
  55. DWORD targetID; // The target attribute.
  56. RegularExpression regex; // Regular expression to test.
  57. };
  58. #endif //_MATCH_H_