aboutsummaryrefslogtreecommitdiff
path: root/odb/pragma.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-01-26 12:43:16 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-01-26 12:43:16 +0200
commitaf12ffe836de09ec84f666effa4df347eeb07a43 (patch)
treedc0aec9f8fee545c84be098414772cf2b277c30d /odb/pragma.hxx
parentc1d2ec5bbd5969332f3278f39d2a7a8f0abc0493 (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/pragma.hxx')
-rw-r--r--odb/pragma.hxx17
1 files changed, 17 insertions, 0 deletions
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<pragma>
typedef std::map<tree, pragma_list> 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_pragma> ns_loc_pragmas;
+extern ns_loc_pragmas ns_loc_pragmas_;
+
// Pragmas associated with this declaration.
//
typedef std::map<tree, pragma_set> decl_pragmas;