diff options
Diffstat (limited to 'crawl-ref/source/database.h')
-rw-r--r-- | crawl-ref/source/database.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/crawl-ref/source/database.h b/crawl-ref/source/database.h index 357ab62a9a..09b90364ea 100644 --- a/crawl-ref/source/database.h +++ b/crawl-ref/source/database.h @@ -40,16 +40,22 @@ void databaseSystemShutdown(); DBM *openDB(const char *dbFilename); datum database_fetch(DBM *database, const std::string &key); +typedef bool (*db_find_filter)(std::string key, std::string body); + std::vector<std::string> database_find_keys(DBM *database, const std::string ®ex, - bool ignore_case = false); + bool ignore_case = false, + db_find_filter filter = NULL); std::vector<std::string> database_find_bodies(DBM *database, const std::string ®ex, - bool ignore_case = false); + bool ignore_case = false, + db_find_filter filter = NULL); std::string getLongDescription(const std::string &key); -std::vector<std::string> getLongDescKeysByRegex(const std::string ®ex); -std::vector<std::string> getLongDescBodiesByRegex(const std::string ®ex); +std::vector<std::string> getLongDescKeysByRegex(const std::string ®ex, + db_find_filter filter = NULL); +std::vector<std::string> getLongDescBodiesByRegex(const std::string ®ex, + db_find_filter filter = NULL); std::string getShoutString(const std::string &monst, const std::string &suffix = ""); |