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.

77 lines
1.7 KiB

  1. ///////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1999, Microsoft Corp. All rights reserved.
  4. //
  5. // FILE
  6. //
  7. // attrdnry.h
  8. //
  9. // SYNOPSIS
  10. //
  11. // Declares the class AttributeDictionary.
  12. //
  13. // MODIFICATION HISTORY
  14. //
  15. // 02/04/2000 Original version.
  16. //
  17. ///////////////////////////////////////////////////////////////////////////////
  18. #ifndef ATTRDNRY_H
  19. #define ATTRDNRY_H
  20. #if _MSC_VER >= 1000
  21. #pragma once
  22. #endif
  23. #include <attridx.h>
  24. //////////
  25. // Struct representing an attribute definition.
  26. //////////
  27. struct AttributeDefinition
  28. {
  29. ULONG id;
  30. ULONG syntax;
  31. ULONG vendorID;
  32. ULONG vendorType;
  33. BOOL excludeFromLog;
  34. };
  35. class AttributeDictionary
  36. {
  37. public:
  38. AttributeDictionary() throw ()
  39. : first(NULL), last(NULL)
  40. { }
  41. ~AttributeDictionary() throw ();
  42. HRESULT FinalConstruct() throw ();
  43. typedef const AttributeDefinition* const_iterator;
  44. const_iterator begin() const throw ()
  45. { return first; }
  46. const_iterator end() const throw ()
  47. { return last; }
  48. const AttributeDefinition* findByID(ULONG id) const throw ();
  49. const AttributeDefinition* findByVendorInfo(
  50. ULONG vendorID,
  51. ULONG vendorType
  52. ) const throw ();
  53. private:
  54. void initialize();
  55. AttributeDefinition* first;
  56. AttributeDefinition* last;
  57. AttributeIndex byID;
  58. AttributeIndex byVendorInfo;
  59. // Not implemented.
  60. AttributeDictionary(const AttributeDictionary&) throw ();
  61. AttributeDictionary& operator=(const AttributeDictionary&) throw ();
  62. };
  63. #endif // ATTRDNRY_H