#ifndef LOADERS_H__ #define LOADERS_H__ #include #include #include #include #include #include "TodoDB.h" using namespace std; /* 21/04/01 Initial creation */ /* These functions load and save the database in a variety of user-selectable formats. The default is "xml", but "binary" is *much* faster. */ struct load_error : public runtime_error { load_error(string const &what) : runtime_error(what.c_str()) {} }; struct save_error : public runtime_error { save_error(string const &what) : runtime_error(what.c_str()) {} }; typedef map Loader; typedef map Saver; Loader getLoaders(); Saver getSavers(); bool xmlLoad(TodoDB &out, string const &file); bool xmlSave(TodoDB const &in, string const &file); bool binaryLoad(TodoDB &out, string const &file); bool binarySave(TodoDB const &in, string const &file); #endif