From af12ffe836de09ec84f666effa4df347eeb07a43 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 26 Jan 2012 12:43:16 +0200 Subject: 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. --- odb/pragma.hxx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'odb/pragma.hxx') diff --git a/odb/pragma.hxx b/odb/pragma.hxx index 57531ba..78cfd55 100644 --- a/odb/pragma.hxx +++ b/odb/pragma.hxx @@ -103,6 +103,23 @@ struct pragma_set: std::set typedef std::map loc_pragmas; extern loc_pragmas loc_pragmas_; +// Position pragmas for namespaces. Because re-opened namespaces do +// not have any representation in the GCC tree, these are handled in +// a special way. They are stored as a list of pragmas and their outer +// namespaces. +// +struct ns_loc_pragma +{ + typedef ::pragma pragma_type; + ns_loc_pragma (tree n, pragma_type const& p): ns (n), pragma (p) {} + + tree ns; + pragma_type pragma; +}; + +typedef std::vector ns_loc_pragmas; +extern ns_loc_pragmas ns_loc_pragmas_; + // Pragmas associated with this declaration. // typedef std::map decl_pragmas; -- cgit v1.1