Ignore:
Timestamp:
2008-05-22T15:39:06+12:00 (16 years ago)
Author:
mdewsnip
Message:

(Adding new DB support) Rearranging functions and making getkeydata() required by subclasses so they can be used with the history.db file.

File:
1 edited

Legend:

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

    r15630 r15645  
    5454  virtual ~dbclass();
    5555
    56   void setlogout(ostream *logout_arg) { logout = logout_arg; }
     56  void setlogout (ostream *logout_arg) { logout = logout_arg; }
    5757
    5858  // returns true if opened
    59   virtual bool opendatabase(const text_t &filename, int mode, int num_retrys, bool need_filelock) = 0;
    60   virtual void closedatabase() = 0;
     59  virtual bool opendatabase (const text_t &filename, int mode, int num_retrys, bool need_filelock) = 0;
     60
     61  virtual void closedatabase () = 0;
     62
     63  virtual void deletekey (const text_t &key) = 0;
    6164
    6265  // returns true if exists
    63   virtual bool exists(const text_t& key) = 0;
     66  virtual bool exists (const text_t& key) = 0;
    6467
    6568  // returns true on success
    66   virtual bool getinfo(const text_t& key, infodbclass &info) = 0;
     69  virtual bool getinfo (const text_t& key, infodbclass &info) = 0;
    6770
    6871  // returns true on success
    69   virtual bool setinfo(const text_t &key, const infodbclass &info) = 0;
     72  virtual bool getkeydata (const text_t& key, text_t &data) = 0;
    7073
     74  // returns array of keys
    7175  virtual text_tarray getkeys () = 0;
    7276
    73   virtual void deletekey(const text_t &key) = 0;
     77  // returns true on success
     78  virtual bool setinfo (const text_t &key, const infodbclass &info) = 0;
    7479
    7580  // replaces the .c, .p, .n, .l syntax (child, parent, next, previous)
Note: See TracChangeset for help on using the changeset viewer.