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.

81 lines
2.5 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1991 - 2000.
  5. //
  6. // File: IKREP.CXX
  7. //
  8. // Contents: Index Key Repository
  9. //
  10. // Classes: CIndexKeyRepository
  11. //
  12. // History: 30-May-91 t-WadeR Created.
  13. // 01-July-91 t-WadeR Added PutPropName
  14. //
  15. //----------------------------------------------------------------------------
  16. #include <pch.cxx>
  17. #pragma hdrstop
  18. #include <pfilter.hxx>
  19. #include "ikrep.hxx"
  20. //+---------------------------------------------------------------------------
  21. //
  22. // Member: CIndexKeyRepository::CIndexKeyRepository
  23. //
  24. // Synopsis: Creates a key repository
  25. //
  26. // History: 31-May-91 t-WadeR Created
  27. // 07-Feb-92 BartoszM Inherit unwind
  28. //----------------------------------------------------------------------------
  29. CIndexKeyRepository::CIndexKeyRepository( CEntryBufferHandler& entBufHdlr )
  30. : _entryBufHandler(entBufHdlr)
  31. {
  32. }
  33. //+---------------------------------------------------------------------------
  34. //
  35. // Member: CIndexKeyRepository::PutKey
  36. //
  37. // Synopsis: Puts a key into the entry buffer
  38. //
  39. // Arguments: cNoiseWordsSkipped -- ignored (used in CQueryKeyRepository::PutKey )
  40. //
  41. // History: 31-May-91 t-WadeR Created
  42. //
  43. // Notes: This could be inline, if not for the debugging code.
  44. //
  45. //----------------------------------------------------------------------------
  46. void CIndexKeyRepository::PutKey ( ULONG cNoiseWordsSkipped )
  47. {
  48. // ciAssert( _key.Pid() != pidAll );
  49. _entryBufHandler.AddEntry( _key, _occ );
  50. }
  51. //+---------------------------------------------------------------------------
  52. //
  53. // Member: CIndexKeyRepository::GetBuffers
  54. //
  55. // Synopsis: Returns address of repository's input buffers
  56. //
  57. // Effects:
  58. //
  59. // Arguments: [ppcbInBuf] -- pointer to pointer to size of input buffer
  60. // [ppbInBuf] -- pointer to pointer to recieve address of buffer
  61. // [ppocc] -- pointer to pointer to recieve address of occurrences
  62. //
  63. // History: 05-June-91 t-WadeR Created.
  64. //
  65. //----------------------------------------------------------------------------
  66. void CIndexKeyRepository::GetBuffers(
  67. UINT** ppcbWordBuf, BYTE** ppbWordBuf, OCCURRENCE** ppocc )
  68. {
  69. _key.SetCount(MAXKEYSIZE);
  70. *ppcbWordBuf = _key.GetCountAddress();
  71. *ppbWordBuf = _key.GetWritableBuf();
  72. *ppocc = &_occ;
  73. }