Skip to content

Commit 1f55ddb

Browse files
committed
Cleaning of include dependencies
1 parent 833aeea commit 1f55ddb

File tree

7 files changed

+55
-48
lines changed

7 files changed

+55
-48
lines changed

src/Database.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@
1212

1313
#include "Statement.h"
1414

15+
1516
namespace SQLite
1617
{
1718

19+
1820
// Open the provided database UTF-8 filename with SQLITE_OPEN_xxx provided flags.
1921
Database::Database(const char* apFilename, const int aFlags /*= SQLITE_OPEN_READONLY*/) : // throw(SQLite::Exception)
2022
mpSQLite(NULL),
@@ -80,4 +82,5 @@ void Database::check(const int aRet) const // throw(SQLite::Exception)
8082
}
8183
}
8284

85+
8386
} // namespace SQLite

src/Database.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,14 @@
1111
#pragma once
1212

1313
#include <sqlite3.h>
14-
#include "Exception.h"
14+
1515
#include "Column.h"
1616

17+
1718
namespace SQLite
1819
{
1920

21+
2022
/**
2123
* @brief RAII management of a SQLite Database Connection.
2224
*

src/Exception.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
namespace SQLite
3434
{
3535

36+
3637
/**
3738
* @brief Encapsulation of the error message from SQLite3, based on std::runtime_error.
3839
*/

src/SQLiteC++.h

Lines changed: 41 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,41 @@
1-
/**
2-
* @file SQLiteC++.h
3-
* @ingroup SQLiteCpp
4-
* @brief SQLiteC++ is a smart and simple C++ SQLite3 wrapper. This file is only "easy include" for other files.
5-
*
6-
* Include this main header file in your project to gain access to all functionality provided by the wrapper.
7-
*
8-
* Copyright (c) 2012-2013 Sebastien Rombauts (sebastien.rombauts@gmail.com)
9-
*
10-
* Distributed under the MIT License (MIT) (See accompanying file LICENSE.txt
11-
* or copy at http://opensource.org/licenses/MIT)
12-
*/
13-
/**
14-
* @defgroup SQLiteCpp SQLiteC++
15-
* @brief SQLiteC++ is a smart and simple C++ SQLite3 wrapper. This file is only "easy include" for other files.
16-
*/
17-
#pragma once
18-
19-
20-
// SQLiteC++.h requires sqlite3, and the corresponding library header
21-
#include <sqlite3.h>
22-
23-
// Include useful headers of SQLiteC++
24-
#include "Exception.h"
25-
#include "Database.h"
26-
#include "Statement.h"
27-
#include "Column.h"
28-
#include "Transaction.h"
29-
30-
31-
/**
32-
* @brief Version numbers for SQLiteC++ are provided in the same way as sqlite3.h
33-
*
34-
* The [SQLITECPP_VERSION] C preprocessor macro in the SQLiteC++.h header
35-
* evaluates to a string literal that is the SQLite version in the
36-
* format "X.Y.Z" where X is the major version number
37-
* and Y is the minor version number and Z is the release number.
38-
*
39-
* The [SQLITECPP_VERSION_NUMBER] C preprocessor macro resolves to an integer
40-
* with the value (X*1000000 + Y*1000 + Z) where X, Y, and Z are the same
41-
* numbers used in [SQLITECPP_VERSION].
42-
*/
43-
#define SQLITECPP_VERSION "0.5.0"
44-
#define SQLITECPP_VERSION_NUMBER 0005000
1+
/**
2+
* @file SQLiteC++.h
3+
* @ingroup SQLiteCpp
4+
* @brief SQLiteC++ is a smart and simple C++ SQLite3 wrapper. This file is only "easy include" for other files.
5+
*
6+
* Include this main header file in your project to gain access to all functionality provided by the wrapper.
7+
*
8+
* Copyright (c) 2012-2013 Sebastien Rombauts (sebastien.rombauts@gmail.com)
9+
*
10+
* Distributed under the MIT License (MIT) (See accompanying file LICENSE.txt
11+
* or copy at http://opensource.org/licenses/MIT)
12+
*/
13+
/**
14+
* @defgroup SQLiteCpp SQLiteC++
15+
* @brief SQLiteC++ is a smart and simple C++ SQLite3 wrapper. This file is only "easy include" for other files.
16+
*/
17+
#pragma once
18+
19+
20+
// Include useful headers of SQLiteC++
21+
#include "Exception.h"
22+
#include "Database.h"
23+
#include "Statement.h"
24+
#include "Column.h"
25+
#include "Transaction.h"
26+
27+
28+
/**
29+
* @brief Version numbers for SQLiteC++ are provided in the same way as sqlite3.h
30+
*
31+
* The [SQLITECPP_VERSION] C preprocessor macro in the SQLiteC++.h header
32+
* evaluates to a string literal that is the SQLite version in the
33+
* format "X.Y.Z" where X is the major version number
34+
* and Y is the minor version number and Z is the release number.
35+
*
36+
* The [SQLITECPP_VERSION_NUMBER] C preprocessor macro resolves to an integer
37+
* with the value (X*1000000 + Y*1000 + Z) where X, Y, and Z are the same
38+
* numbers used in [SQLITECPP_VERSION].
39+
*/
40+
#define SQLITECPP_VERSION "0.5.0"
41+
#define SQLITECPP_VERSION_NUMBER 0005000

src/Statement.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@
1111
#pragma once
1212

1313
#include <sqlite3.h>
14-
#include "Exception.h"
14+
#include <string>
15+
1516

1617
namespace SQLite
1718
{
1819

20+
1921
// Forward declaration
2022
class Database;
2123
class Column;
@@ -310,4 +312,5 @@ class Statement
310312
bool mbDone; //!< true when the last executeStep() had no more row to fetch
311313
};
312314

315+
313316
} // namespace SQLite

src/Transaction.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@
1212

1313
#include "Database.h"
1414

15+
1516
namespace SQLite
1617
{
1718

19+
1820
// Begins the SQLite transaction
1921
Transaction::Transaction(Database& aDatabase) : // throw(SQLite::Exception)
2022
mDatabase(aDatabase),

src/Transaction.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,11 @@
1010
*/
1111
#pragma once
1212

13-
#include <sqlite3.h>
14-
#include "Exception.h"
1513

1614
namespace SQLite
1715
{
1816

17+
1918
// Forward declaration
2019
class Database;
2120

0 commit comments

Comments
 (0)