From 982cd4f5ce2b691441f55b88382eadef2edc953e Mon Sep 17 00:00:00 2001 From: Yen Chi Hsuan Date: Sat, 14 Mar 2015 19:06:16 +0800 Subject: [PATCH] Add documents for class sqlite::backup --- include/sqlite/backup.hpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/include/sqlite/backup.hpp b/include/sqlite/backup.hpp index 448ed2b..f6324f9 100644 --- a/include/sqlite/backup.hpp +++ b/include/sqlite/backup.hpp @@ -7,11 +7,37 @@ struct sqlite3_backup; namespace sqlite { + /** \brief \a backup is a class for representing SQLite backup operations + * An object of this class is not copyable + */ struct backup: boost::noncopyable { + /** \brief \a backup constructor + * \param conn_to takes a reference to the \a connection object + * of the destination database + * \param conn_from takes a reference to the \a connection object + * of the source database + */ backup(connection& conn_to, connection& conn_from); + + /** \brief \a backup destructor. The backup operation is automatically + * finished after the object destructed. + */ ~backup(); + + + /** \brief Do a backup step + * \param nPage the number of pages to backup in this step. If a + * negative integer is given, all pages are backuped. If this + * parameter is omitted, -1 is used. + */ bool step(int nPage = -1); + + /** \brief Finish the backup operation + * This is used for flushing current backup operation. After + * this call, the backup object should not be used anymore. + */ void finish(); + private: sqlite3* get_to_handle() const; private: