diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2012-01-26 12:43:16 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2012-01-26 12:43:16 +0200 |
commit | af12ffe836de09ec84f666effa4df347eeb07a43 (patch) | |
tree | dc0aec9f8fee545c84be098414772cf2b277c30d /odb/semantics/namespace.hxx | |
parent | c1d2ec5bbd5969332f3278f39d2a7a8f0abc0493 (diff) |
Implement support for database schema
New pragma qualifier: namespace. New pragma specifier: schema. The table
specifier was extended to accept a schema prefix. New option: --default-
schema. The common/schema test was extended to cover the new functionality.
Diffstat (limited to 'odb/semantics/namespace.hxx')
-rw-r--r-- | odb/semantics/namespace.hxx | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/odb/semantics/namespace.hxx b/odb/semantics/namespace.hxx index 7a886c5..96db4a7 100644 --- a/odb/semantics/namespace.hxx +++ b/odb/semantics/namespace.hxx @@ -13,6 +13,25 @@ namespace semantics class namespace_: public scope { public: + bool + extension () const + { + return original_ != 0; + } + + namespace_& + original () + { + return *original_; + } + + void + original (namespace_& ns) + { + original_ = &ns; + } + + public: namespace_ (path const&, size_t line, size_t column, tree); // Resolve conflict between scope::scope and nameable::scope. @@ -21,6 +40,9 @@ namespace semantics protected: namespace_ (); + + private: + namespace_* original_; }; } |