Changeset 15650

Show
Ignore:
Timestamp:
22.05.2008 15:59:47 (11 years ago)
Author:
mdewsnip
Message:

(Adding new DB support) Adding some more comments, and making the setkeydata() function compulsory as well.

Files:
1 modified

Legend:

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

    r15645 r15650  
    5454  virtual ~dbclass(); 
    5555 
    56   void setlogout (ostream *logout_arg) { logout = logout_arg; } 
    57  
    58   // returns true if opened 
     56  // Must be implemented by subclasses; returns true if opened 
    5957  virtual bool opendatabase (const text_t &filename, int mode, int num_retrys, bool need_filelock) = 0; 
    6058 
     59  // Must be implemented by subclasses 
    6160  virtual void closedatabase () = 0; 
    6261 
     62  // Must be implemented by subclasses 
    6363  virtual void deletekey (const text_t &key) = 0; 
    6464 
    65   // returns true if exists 
     65  // Must be implemented by subclasses; returns true if exists 
    6666  virtual bool exists (const text_t& key) = 0; 
    6767 
    68   // returns true on success 
     68  // Must be implemented by subclasses; returns true on success 
    6969  virtual bool getinfo (const text_t& key, infodbclass &info) = 0; 
    7070 
    71   // returns true on success 
     71  // Must be implemented by subclasses; returns true on success 
    7272  virtual bool getkeydata (const text_t& key, text_t &data) = 0; 
    7373 
    74   // returns array of keys 
     74  // Must be implemented by subclasses; returns array of keys 
    7575  virtual text_tarray getkeys () = 0; 
    7676 
    77   // returns true on success 
     77  // Must be implemented by subclasses; returns true on success 
    7878  virtual bool setinfo (const text_t &key, const infodbclass &info) = 0; 
     79 
     80  // Must be implemented by subclasses; returns true on success 
     81  virtual bool setkeydata (const text_t &key, const text_t &data) = 0; 
     82 
     83 
     84  void setlogout (ostream *logout_arg) { logout = logout_arg; } 
    7985 
    8086  // replaces the .c, .p, .n, .l syntax (child, parent, next, previous)