Changeset 15679

Show
Ignore:
Timestamp:
23.05.2008 14:27:11 (11 years ago)
Author:
mdewsnip
Message:

(Adding new DB support) Adding a new "getfileextension()" function that is implemented differently between gdbmclass (which is endian-specific) and sqlitedbclass (which isn't).

Location:
gsdl/trunk/lib
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/lib/dbclass.h

    r15655 r15679  
    6767  virtual void deletekey (const text_t &key) = 0; 
    6868 
     69  // returns file extension string 
     70  virtual text_t getfileextension () = 0; 
     71 
    6972  // returns true on success 
    7073  virtual bool getkeydata (const text_t& key, text_t &data) = 0; 
  • gsdl/trunk/lib/gdbmclass.cpp

    r15655 r15679  
    2525 
    2626#include "gdbmclass.h" 
    27 #include "unitool.h" 
     27#include "gsdltools.h" 
    2828#include "gsdlunicode.h" 
    29 #include "OIDtools.h" 
    3029 
    3130 
     
    115114 
    116115 
     116// returns file extension string 
     117text_t gdbmclass::getfileextension () 
     118{ 
     119  if (littleEndian()) return ".ldb"; 
     120  return ".bdb"; 
     121} 
     122 
     123 
    117124// returns true on success 
    118125bool gdbmclass::getkeydata (const text_t& key, text_t &data) 
  • gsdl/trunk/lib/gdbmclass.h

    r15655 r15679  
    6262  void deletekey (const text_t &key); 
    6363 
     64  // returns file extension string 
     65  text_t getfileextension (); 
     66 
    6467  // returns true on success 
    6568  bool getkeydata (const text_t& key, text_t &data); 
  • gsdl/trunk/lib/sqlitedbclass.cpp

    r15655 r15679  
    8989 
    9090 
     91// returns file extension string 
     92text_t sqlitedbclass::getfileextension () 
     93{ 
     94  return ".db"; 
     95} 
     96 
     97 
    9198// returns true on success 
    9299bool sqlitedbclass::getkeydata (const text_t& key, text_t &data) 
  • gsdl/trunk/lib/sqlitedbclass.h

    r15655 r15679  
    4545  void deletekey (const text_t &key); 
    4646 
     47  // returns file extension string 
     48  text_t getfileextension (); 
     49 
    4750  // returns true on success 
    4851  bool getkeydata (const text_t& key, text_t &data);