1
0

Database.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /* ---------------------------------------------------------------------------
  2. Nullsoft Database Engine
  3. --------------------
  4. codename: Near Death Experience
  5. --------------------------------------------------------------------------- */
  6. /* ---------------------------------------------------------------------------
  7. Database Class Prototypes
  8. --------------------------------------------------------------------------- */
  9. #ifndef __DATABASE_H
  10. #define __DATABASE_H
  11. #include "nde.h"
  12. #ifdef WIN32
  13. #include <io.h>
  14. #else
  15. #include <unistd.h>
  16. #endif
  17. #include <stdio.h>
  18. class Database
  19. {
  20. public:
  21. Database();
  22. #ifdef WIN32
  23. Database(HINSTANCE hinst);
  24. HINSTANCE GetInstance();
  25. void SetInstance(HINSTANCE hinst);
  26. #endif
  27. ~Database();
  28. #ifdef _WIN32
  29. Table *OpenTable(const wchar_t *table, const wchar_t *index, BOOL create, BOOL cached);
  30. #else
  31. Table *OpenTable(const char *table, const char *index, BOOL create, BOOL cached);
  32. #endif
  33. void CloseTable(Table *table);
  34. private:
  35. #ifdef WIN32
  36. HINSTANCE hInstance;
  37. #endif
  38. };
  39. #endif