aboutsummaryrefslogtreecommitdiff
path: root/odb/mssql/details
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-11-16 10:59:14 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-11-16 10:59:14 +0200
commit7e704a7e6e57cf877614fd762d4667ef32be2eea (patch)
tree167f6059a5a935585499fc006886abc69a4df6c8 /odb/mssql/details
parent9cce004234838754b8bd7776b4ed37686c9a17c2 (diff)
Add build infrastructure, options file and exceptions implementation
Diffstat (limited to 'odb/mssql/details')
-rw-r--r--odb/mssql/details/config.h.in14
-rw-r--r--odb/mssql/details/config.hxx20
-rw-r--r--odb/mssql/details/export.hxx41
-rw-r--r--odb/mssql/details/options.cli57
4 files changed, 132 insertions, 0 deletions
diff --git a/odb/mssql/details/config.h.in b/odb/mssql/details/config.h.in
new file mode 100644
index 0000000..de88c81
--- /dev/null
+++ b/odb/mssql/details/config.h.in
@@ -0,0 +1,14 @@
+/* file : odb/mssql/details/config.h.in
+ * author : Constantin Michael <constantin@codesynthesis.com>
+ * copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC
+ * license : ODB NCUEL; see accompanying LICENSE file
+ */
+
+/* This file is automatically processed by configure. */
+
+#ifndef ODB_MSSQL_DETAILS_CONFIG_H
+#define ODB_MSSQL_DETAILS_CONFIG_H
+
+#undef LIBODB_MSSQL_STATIC_LIB
+
+#endif /* ODB_MSSQL_DETAILS_CONFIG_H */
diff --git a/odb/mssql/details/config.hxx b/odb/mssql/details/config.hxx
new file mode 100644
index 0000000..f66d567
--- /dev/null
+++ b/odb/mssql/details/config.hxx
@@ -0,0 +1,20 @@
+// file : odb/mssql/details/config.hxx
+// author : Constantin Michael <constantin@codesynthesis.com>
+// copyright : Copyright (c) 2005-2011 Code Synthesis Tools CC
+// license : ODB NCUEL; see accompanying LICENSE file
+
+#ifndef ODB_MSSQL_DETAILS_CONFIG_HXX
+#define ODB_MSSQL_DETAILS_CONFIG_HXX
+
+// no pre
+
+#ifdef _MSC_VER
+#elif defined(ODB_COMPILER)
+# error libodb-mssql header included in odb-compiled header
+#else
+# include <odb/mssql/details/config.h>
+#endif
+
+// no post
+
+#endif // ODB_MSSQL_DETAILS_CONFIG_HXX
diff --git a/odb/mssql/details/export.hxx b/odb/mssql/details/export.hxx
new file mode 100644
index 0000000..3f24f3c
--- /dev/null
+++ b/odb/mssql/details/export.hxx
@@ -0,0 +1,41 @@
+// file : odb/mssql/details/export.hxx
+// author : Constantin Michael <constantin@codesynthesis.com>
+// copyright : Copyright (c) 2005-2011 Code Synthesis Tools CC
+// license : ODB NCUEL; see accompanying LICENSE file
+
+#ifndef ODB_MSSQL_DETAILS_EXPORT_HXX
+#define ODB_MSSQL_DETAILS_EXPORT_HXX
+
+#include <odb/pre.hxx>
+
+#include <odb/mssql/details/config.hxx>
+
+#ifdef LIBODB_MSSQL_STATIC_LIB
+# define LIBODB_MSSQL_EXPORT
+#else
+# ifdef _WIN32
+# ifdef _MSC_VER
+# ifdef LIBODB_MSSQL_DYNAMIC_LIB
+# define LIBODB_MSSQL_EXPORT __declspec(dllexport)
+# else
+# define LIBODB_MSSQL_EXPORT __declspec(dllimport)
+# endif
+# else
+# ifdef LIBODB_MSSQL_DYNAMIC_LIB
+# ifdef DLL_EXPORT
+# define LIBODB_MSSQL_EXPORT __declspec(dllexport)
+# else
+# define LIBODB_MSSQL_EXPORT
+# endif
+# else
+# define LIBODB_MSSQL_EXPORT __declspec(dllimport)
+# endif
+# endif
+# else
+# define LIBODB_MSSQL_EXPORT
+# endif
+#endif
+
+#include <odb/post.hxx>
+
+#endif // ODB_MSSQL_DETAILS_EXPORT_HXX
diff --git a/odb/mssql/details/options.cli b/odb/mssql/details/options.cli
new file mode 100644
index 0000000..693f644
--- /dev/null
+++ b/odb/mssql/details/options.cli
@@ -0,0 +1,57 @@
+// file : odb/mssql/details/options.cli
+// author : Constantin Michael <constantin@codesynthesis.com>
+// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC
+// license : GNU GPL v2; see accompanying LICENSE file
+
+include <string>;
+
+namespace odb
+{
+ namespace mssql
+ {
+ namespace details
+ {
+ class options
+ {
+ std::string --user | --username
+ {
+ "<name>",
+ "PostgreSQL database user."
+ };
+
+ std::string --password
+ {
+ "<str>",
+ "PostgreSQL database password."
+ };
+
+ std::string --database | --dbname
+ {
+ "<name>",
+ "PostgreSQL database name."
+ };
+
+ std::string --host
+ {
+ "<str>",
+ "PostgreSQL database host name or address (localhost by default)."
+ };
+
+ std::string --port
+ {
+ "<str>",
+ "PostgreSQL database port number or socket file name extension for
+ Unix-domain connections."
+ };
+
+ std::string --options-file
+ {
+ "<file>",
+ "Read additional options from <file>. Each option appearing on a
+ separate line optionally followed by space and an option value.
+ Empty lines and lines starting with \cb{#} are ignored."
+ };
+ };
+ }
+ }
+}