From fe69d94f3d2dcb37d69ac2d7a0f88ad5fce2ad5c Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 1 Mar 2011 11:56:33 +0200 Subject: Add support for embedded database schemas New options: --schema-format, --default-schema. New example: schema/embedded. --- odb/context.hxx | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'odb/context.hxx') diff --git a/odb/context.hxx b/odb/context.hxx index 03a3871..b052a71 100644 --- a/odb/context.hxx +++ b/odb/context.hxx @@ -15,7 +15,6 @@ #include -#include #include #include #include @@ -148,11 +147,23 @@ public: string public_name (semantics::data_member&) const; + // "Flatten" fully-qualified C++ name by replacing '::' with '_' + // and removing leading '::', if any. + // + static string + flat_name (string const& fqname); + // Escape C++ keywords, reserved names, and illegal characters. // string escape (string const&) const; + // Return a string literal that can be used in C++ source code. It + // includes "". + // + string + strlit (string const&); + // Counts and other information. // public: @@ -302,6 +313,8 @@ public: typedef std::set keyword_set_type; keyword_set_type const& keyword_set; + bool embedded_schema; + struct db_type_type { db_type_type () {} @@ -355,6 +368,7 @@ public: options_type const&, data_ptr = data_ptr ()); context (context&); + context (context&, std::ostream&); virtual ~context (); -- cgit v1.1