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.

72 lines
1.2 KiB

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. mapstringtoint.h
  5. Abstract:
  6. This module defines the MAPSTRINGTOINT class and the STRINGTOINTASSOCIATION type.
  7. Author:
  8. Matt Bandy (t-mattba) 24-Jul-1998
  9. Revision History:
  10. 24-Jul-1998 t-mattba
  11. Modified module to conform to coding standards.
  12. --*/
  13. #ifndef _MAPSTRINGTOINT_
  14. #define _MAPSTRINGTOINT_
  15. typedef struct _STRINGTOINTASSOCIATION {
  16. LPTSTR Key;
  17. LONG Value;
  18. struct _STRINGTOINTASSOCIATION *Next;
  19. } STRINGTOINTASSOCIATION, *PSTRINGTOINTASSOCIATION;
  20. class MAPSTRINGTOINT
  21. {
  22. private:
  23. PSTRINGTOINTASSOCIATION Associations;
  24. public:
  25. MAPSTRINGTOINT(
  26. );
  27. ~MAPSTRINGTOINT(
  28. );
  29. LONG &
  30. operator [] (
  31. IN LPTSTR Key
  32. );
  33. BOOLEAN
  34. Lookup(
  35. IN LPTSTR Key,
  36. OUT LONG & Value
  37. );
  38. PSTRINGTOINTASSOCIATION
  39. GetStartPosition(
  40. );
  41. VOID
  42. GetNextAssociation(
  43. IN OUT PSTRINGTOINTASSOCIATION & Position,
  44. OUT LPTSTR & Key,
  45. OUT LONG & Value
  46. );
  47. };
  48. typedef MAPSTRINGTOINT * PMAPSTRINGTOINT;
  49. #endif // _MAPSTRINGTOINT_