// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+// 02110-1301, USA.
/*
Config Database:
void watcher (key, options, appended?)
NOTE: The key is always UPPERCASE internally. Keys are converted
- automagically to uppercase by the anything that
+ automagically to uppercase.
*/
typedef std::string t_value;
typedef std::list<t_value> t_value_list;
- typedef void (*t_watcher) (std::string key, t_value_list vals, bool appended);
+ typedef void (*t_watcher)
+ (std::string key, t_value_list vals, bool appended);
typedef std::list<t_watcher> t_watcher_list;
typedef std::pair<t_value_list, t_watcher_list> t_option_values;
std::string config_filename;
public:
- BotConfig (std::string); // sets config_filename but DOES NOT read config!
+ BotConfig (std::string); // sets config_filename but DOES NOT read
+ // config!
- bool read_config (); // true if read successfully. This also clears the option_db.
+ bool read_config (); // true if read successfully. This also clears
+ // the option_db.
bool write_config (); // true if written succesfully
// Getters
// filename
bool add_watcher (std::string key, t_watcher new_watcher); // t if key
- // exists,
- // f
- // otherwise
+ // exists,
+ // f
+ // otherwise
bool clear_watchers (std::string key); // t if key exists, f
// otherwise