summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libdbpp/command.h4
-rw-r--r--libdbpp/command_fwd.h21
-rw-r--r--libdbpp/connection.h2
-rw-r--r--libdbpp/connection_fwd.h12
-rw-r--r--libdbpp/modifycommand.h1
-rw-r--r--libdbpp/selectcommand.h1
6 files changed, 35 insertions, 6 deletions
diff --git a/libdbpp/command.h b/libdbpp/command.h
index 1647e50..aa91282 100644
--- a/libdbpp/command.h
+++ b/libdbpp/command.h
@@ -1,6 +1,7 @@
#ifndef DB_COMMAND_H
#define DB_COMMAND_H
+#include "command_fwd.h"
#include <glibmm/ustring.h>
#include <boost/date_time/posix_time/posix_time_types.hpp>
#include <boost/shared_ptr.hpp>
@@ -24,8 +25,6 @@ namespace DB {
ParameterOutOfRange();
};
- typedef std::map<std::string, std::string> CommandOptionsMap;
-
/// Represents the basic options that can be passed when creating new commands.
class DLL_PUBLIC CommandOptions {
public:
@@ -124,7 +123,6 @@ namespace DB {
/// Bind a (possibly null) c-string to parameter i.
void bindParamS(unsigned int, char * const);
};
- typedef boost::shared_ptr<Command> CommandPtr;
typedef AdHoc::Factory<CommandOptions, std::size_t, const CommandOptionsMap &> CommandOptionsFactory;
}
diff --git a/libdbpp/command_fwd.h b/libdbpp/command_fwd.h
new file mode 100644
index 0000000..0a35b18
--- /dev/null
+++ b/libdbpp/command_fwd.h
@@ -0,0 +1,21 @@
+#ifndef DB_COMMAND_FWD_H
+#define DB_COMMAND_FWD_H
+
+#include <string>
+#include <map>
+#include <boost/shared_ptr.hpp>
+
+namespace DB {
+ typedef std::map<std::string, std::string> CommandOptionsMap;
+ class CommandOptions;
+ class Command;
+ typedef boost::shared_ptr<Command> CommandPtr;
+ class ModifyCommand;
+ typedef boost::shared_ptr<ModifyCommand> ModifyCommandPtr;
+ class SelectCommand;
+ typedef boost::shared_ptr<SelectCommand> SelectCommandPtr;
+}
+
+
+#endif
+
diff --git a/libdbpp/connection.h b/libdbpp/connection.h
index 4b75c18..f3cd014 100644
--- a/libdbpp/connection.h
+++ b/libdbpp/connection.h
@@ -1,6 +1,7 @@
#ifndef DB_CONNECTION_H
#define DB_CONNECTION_H
+#include "connection_fwd.h"
#include <string>
#include <set>
#include <factory.h>
@@ -183,7 +184,6 @@ namespace DB {
Connection * conn;
};
- typedef boost::shared_ptr<Connection> ConnectionPtr;
typedef AdHoc::Factory<Connection, std::string> ConnectionFactory;
}
diff --git a/libdbpp/connection_fwd.h b/libdbpp/connection_fwd.h
new file mode 100644
index 0000000..0594490
--- /dev/null
+++ b/libdbpp/connection_fwd.h
@@ -0,0 +1,12 @@
+#ifndef DB_CONNECTION_FWD_H
+#define DB_CONNECTION_FWD_H
+
+#include <boost/shared_ptr.hpp>
+
+namespace DB {
+ class Connection;
+ typedef boost::shared_ptr<Connection> ConnectionPtr;
+}
+
+#endif
+
diff --git a/libdbpp/modifycommand.h b/libdbpp/modifycommand.h
index 0e225f4..53152aa 100644
--- a/libdbpp/modifycommand.h
+++ b/libdbpp/modifycommand.h
@@ -23,7 +23,6 @@ namespace DB {
/// Execute the command and return effected row count
virtual unsigned int execute(bool allowNoChange = true) = 0;
};
- typedef boost::shared_ptr<ModifyCommand> ModifyCommandPtr;
}
#endif
diff --git a/libdbpp/selectcommand.h b/libdbpp/selectcommand.h
index 5e48f4d..32b5cbe 100644
--- a/libdbpp/selectcommand.h
+++ b/libdbpp/selectcommand.h
@@ -136,7 +136,6 @@ namespace DB {
/// Columns in the result set.
Columns * columns;
};
- typedef boost::shared_ptr<SelectCommand> SelectCommandPtr;
}
#endif