home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / vbdatabs / strdb_sh.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-03-17  |  3.1 KB  |  87 lines

  1. // ------------------------------- //
  2. // -------- Start of File -------- //
  3. // ------------------------------- //
  4. // ----------------------------------------------------------- // 
  5. // C++ Header File Name: strdb_sh.h
  6. // C++ Compiler Used: MSVC40 
  7. // Produced By: Doug Gaer 
  8. // File Creation Date: 12/16/1997 
  9. // Date Last Modified: 03/18/1999
  10. // Copyright (c) 1997 Douglas M. Gaer
  11. // ----------------------------------------------------------- // 
  12. // ---------- Include File Description and Details  ---------- // 
  13. // ----------------------------------------------------------- // 
  14. /*
  15. The VBD C++ classes are copyright (c) 1997, by Douglas M. Gaer.
  16. All those who put this code or its derivatives in a commercial
  17. product MUST mention this copyright in their documentation for
  18. users of the products in which this code or its derivative
  19. classes are used. Otherwise, you have the freedom to redistribute
  20. verbatim copies of this source code, adapt it to your specific
  21. needs, or improve the code and release your improvements to the
  22. public provided that the modified files carry prominent notices
  23. stating that you changed the files and the date of any change.
  24.  
  25. THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND.
  26. THE ENTIRE RISK OF THE QUALITY AND PERFORMANCE OF THIS SOFTWARE
  27. IS WITH YOU. SHOULD ANY ELEMENT OF THIS SOFTWARE PROVE DEFECTIVE,
  28. YOU WILL ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR
  29. CORRECTION.
  30.  
  31. General purpose search functions used with the string database.
  32.  
  33. Changes:
  34. ================================================================
  35. 10/09/1998: Removed the FlushCache() function used for flushing
  36. the cache to keep the file in sync during multiple file access.
  37. NOTE: The Btree class was modified to test the file to determine
  38. when to flush the cache.
  39. Changed by: Doug Gaer
  40.  
  41. 10/09/1998: Removed the DummyLoad() function.
  42. Changed by: Doug Gaer
  43. */
  44. // ----------------------------------------------------------- //
  45. #ifndef __STRDB_SH_HPP__
  46. #define __STRDB_SH_HPP__
  47.  
  48. #include "strdb.h"
  49. #include "dllist.h"
  50. #include "btwalk.h"
  51.  
  52. enum StrDBItem { // Database items used in global database searches
  53.   KEYMEMBER,
  54.   M2NAME,
  55.   M3NAME,
  56.   M4NAME,
  57.   M5NAME,
  58.   M6NAME,
  59.   M7NAME,
  60.   M8NAME,
  61.   COMMENTS
  62. };
  63.  
  64. // Variable used to count the number of object found during a search
  65. extern int ObjectsFound;
  66.  
  67. // Global data structures used to organize and store btree nodes
  68. extern DLList<InMemCopy> StrDB_SH_DLList; // Doubly Linked
  69. extern DLList<InMemCopy> *dllist;         // Doubly Linked
  70. extern DNode<InMemCopy> *dllistptr;       // DLList node pointer
  71.  
  72. // Recursive functions used to search the btree.
  73. void BtreeSearch(Btree *btx, int item, StrDB &strdb,
  74.          UString &str, int find_all = 0); 
  75.  
  76. void BtreeKeySearch(EntryKey &e, int item, StrDB &strdb, UString &str,
  77.             int find_all);
  78.  
  79. // Visit functions used by the btree iterator
  80. void LoadKeys(EntryKey &e);
  81.  
  82. #endif  // __STRDB_SH_HPP__ 
  83. // ----------------------------------------------------------- //
  84. // ------------------------------- //
  85. // --------- End of File --------- //
  86. // ------------------------------- //
  87.