Ignore:
Timestamp:
2008-05-22T12:58:14+12:00 (16 years ago)
Author:
mdewsnip
Message:

(Adding new DB support) Replaced the "getfirstkey()" and "getnextkey()" functions in dbclass with "getkeys()" (which returns them all). These functions were only used in userdb.cpp, and having the one function is simpler without being (much) less efficient. Also, implementing getkeys() for the new sql db classes will be easier than getfirstkey() and getnextkey().

File:
1 edited

Legend:

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

    r15598 r15630  
    7373  void deletekey (const text_t &key);
    7474
    75   // getfirstkey and getnextkey are used for traversing the database
    76   // no insertions or deletions should be carried out while traversing
    77   // the database. when there are no keys left to visit in the database
    78   // an empty string is returned.
    79   text_t getfirstkey ();
    80   text_t getnextkey (const text_t &key);
     75  text_tarray getkeys ();
    8176
    8277    // returns true on success
     
    8782  GDBM_FILE gdbmfile;
    8883
     84  // getfirstkey and getnextkey are used for traversing the database
     85  // no insertions or deletions should be carried out while traversing
     86  // the database. when there are no keys left to visit in the database
     87  // an empty string is returned.
     88  text_t getfirstkey ();
     89  text_t getnextkey (const text_t &key);
     90
    8991  // returns true on success
    9092  bool getinfoline (text_t::iterator &here, text_t::iterator end,
Note: See TracChangeset for help on using the changeset viewer.