diff --git a/src/SQLiteC++/Database.cpp b/src/SQLiteC++/Database.cpp index 6f485e0..614ec88 100644 --- a/src/SQLiteC++/Database.cpp +++ b/src/SQLiteC++/Database.cpp @@ -59,7 +59,7 @@ void Database::registerStatement(Statement& aStatement) // throw(SQLite::Excepti // Unregister a Statement object void Database::unregisterStatement(Statement& aStatement) // throw(SQLite::Exception) { - std::vector::iterator iStatement; + TStatementList::iterator iStatement; iStatement = std::find(mStatementList.begin(), mStatementList.end(), &aStatement); if (mStatementList.end() != iStatement) { diff --git a/src/SQLiteC++/Database.h b/src/SQLiteC++/Database.h index 5e48c9e..26efc0f 100644 --- a/src/SQLiteC++/Database.h +++ b/src/SQLiteC++/Database.h @@ -31,6 +31,9 @@ class Database { friend class Statement; +public: + typedef std::vector TStatementList; /// List of statements pointers + public: /** * @brief Open the provided database UTF-8 filename. @@ -73,6 +76,14 @@ public: return mFilename; } + /** + * @brief List of registered statements + */ + inline const TStatementList& getStatementList(void) const + { + return mStatementList; + } + private: // Database must not be copyable Database(void); @@ -80,9 +91,9 @@ private: Database& operator=(const Database&); private: - sqlite3* mpSQLite; //!< Pointer to SQLite Database Connection Handle - std::string mFilename; //!< UTF-8 filename used to open the database - std::vector mStatementList; //!< Liste of SQL statements used with this database connexion + sqlite3* mpSQLite; //!< Pointer to SQLite Database Connection Handle + std::string mFilename; //!< UTF-8 filename used to open the database + TStatementList mStatementList; //!< List of SQL registered statements used with this database connexion };