From dce8466f1ebaaec984db51b6b010b327431cbf50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Rombauts?= Date: Wed, 4 Apr 2012 14:12:38 +0200 Subject: [PATCH] Added a short description on the RAII design --- src/SQLiteC++/Database.h | 6 +++++- src/SQLiteC++/Statement.h | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/SQLiteC++/Database.h b/src/SQLiteC++/Database.h index 57cac2f..821c1d2 100644 --- a/src/SQLiteC++/Database.h +++ b/src/SQLiteC++/Database.h @@ -22,10 +22,14 @@ class Statement; class Exception; /** - * @brief Management of a SQLite Database Connection. + * @brief RAII management of a SQLite Database Connection. * * A Database object manage a list of all SQLite Statements associated with the * underlying SQLite 3 database connection. + * + * Resource Acquisition Is Initialization (RAII) means that the Database Connection + * is opened in the constructor and closed in the destructor, so that there is + * no need to worry about memory management or the validity of the underlying SQLite Connection. */ class Database { diff --git a/src/SQLiteC++/Statement.h b/src/SQLiteC++/Statement.h index 5c1c1ec..8099798 100644 --- a/src/SQLiteC++/Statement.h +++ b/src/SQLiteC++/Statement.h @@ -19,10 +19,14 @@ namespace SQLite class Database; /** - * @brief Encapsulation of a prepared SQLite Statement. + * @brief RAII encapsulation of a prepared SQLite Statement. * * A Statement is a compiled SQL query ready to be executed step by step * to provide results one row at a time. + * + * Resource Acquisition Is Initialization (RAII) means that the Statement + * is compiled in the constructor and finalized in the destructor, so that there is + * no need to worry about memory management or the validity of the underlying SQLite Statement. */ class Statement {