diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2011-03-01 11:56:33 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2011-03-01 11:56:33 +0200 |
commit | fe69d94f3d2dcb37d69ac2d7a0f88ad5fce2ad5c (patch) | |
tree | d93f7ea21f66e9fe416c48766b99f987ad7b3804 /odb/context.hxx | |
parent | 6c97eb68924e7f9ea5b0d859182562ec8f812a1e (diff) |
Add support for embedded database schemas
New options: --schema-format, --default-schema. New example: schema/embedded.
Diffstat (limited to 'odb/context.hxx')
-rw-r--r-- | odb/context.hxx | 16 |
1 files changed, 15 insertions, 1 deletions
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 <cutl/shared-ptr.hxx> -#include <odb/database.hxx> #include <odb/options.hxx> #include <odb/semantics.hxx> #include <odb/traversal.hxx> @@ -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<string> 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 (); |