4 * Created by Peter Berger on 4/15/07.
20 # define DB_DBM_HSEARCH 1
23 #elif defined(USE_SQLITE_DBM)
26 # error DBM interfaces unavailable!
29 #define DPTR_COERCE char *
31 void databaseSystemInit();
32 void databaseSystemShutdown();
33 datum
database_fetch(DBM
*database
, const std::string
&key
);
35 typedef bool (*db_find_filter
)(std::string key
, std::string body
);
37 std::vector
<std::string
> database_find_keys(DBM
*database
,
38 const std::string
®ex
,
39 bool ignore_case
= false,
40 db_find_filter filter
= NULL
);
41 std::vector
<std::string
> database_find_bodies(DBM
*database
,
42 const std::string
®ex
,
43 bool ignore_case
= false,
44 db_find_filter filter
= NULL
);
47 std::string
getWeightedSpeechString(const std::string
&key
,
48 const std::string
&suffix
,
49 const int weight
= -1);
51 std::string
getQuoteString(const std::string
&key
);
52 std::string
getLongDescription(const std::string
&key
);
53 std::string
getWeightedRandomisedDescription(const std::string
&key
);
55 std::vector
<std::string
> getLongDescKeysByRegex(const std::string
®ex
,
56 db_find_filter filter
= NULL
);
57 std::vector
<std::string
> getLongDescBodiesByRegex(const std::string
®ex
,
58 db_find_filter filter
= NULL
);
60 std::string
getGameStartDescription(const std::string
&key
);
62 std::string
getShoutString(const std::string
&monst
,
63 const std::string
&suffix
= "");
64 std::string
getSpeakString(const std::string
&key
);
65 std::string
getRandNameString(const std::string
&itemtype
,
66 const std::string
&suffix
= "");
67 std::string
getHelpString(const std::string
&topic
);
68 std::string
getMiscString(const std::string
&misc
,
69 const std::string
&suffix
= "");
71 std::vector
<std::string
> getAllFAQKeys(void);
72 std::string
getFAQ_Question(const std::string
&key
);
73 std::string
getFAQ_Answer(const std::string
&question
);