summaryrefslogtreecommitdiff
path: root/odb/semantics/union-template.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-03-25 13:47:43 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-03-25 13:47:43 +0200
commit01f77f6d38283b4efbe2b55fc9c7c837fd6498dc (patch)
tree12059fa0c514a3f2b9da2a9419593e3596cc6f5d /odb/semantics/union-template.hxx
parentad637abaa62a26461b276769c35dd1b67036b54b (diff)
Add support for union, enum, class/union template
Diffstat (limited to 'odb/semantics/union-template.hxx')
-rw-r--r--odb/semantics/union-template.hxx41
1 files changed, 41 insertions, 0 deletions
diff --git a/odb/semantics/union-template.hxx b/odb/semantics/union-template.hxx
new file mode 100644
index 0000000..1aaadb7
--- /dev/null
+++ b/odb/semantics/union-template.hxx
@@ -0,0 +1,41 @@
+// file : odb/semantics/union-template.hxx
+// author : Boris Kolpackov <boris@codesynthesis.com>
+// copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC
+// license : GNU GPL v2; see accompanying LICENSE file
+
+#ifndef ODB_SEMANTICS_UNION_TEMPLATE_HXX
+#define ODB_SEMANTICS_UNION_TEMPLATE_HXX
+
+#include <semantics/elements.hxx>
+#include <semantics/union.hxx>
+#include <semantics/template.hxx>
+
+namespace semantics
+{
+ class union_template: public type_template, public scope
+ {
+ public:
+ union_template (path const& file, size_t line, size_t column)
+ : node (file, line, column)
+ {
+ }
+
+ // Resolve conflict between scope::scope and nameable::scope.
+ //
+ using nameable::scope;
+ };
+
+ class union_instantiation: public union_, public type_instantiation
+ {
+ public:
+ union_instantiation (path const& file, size_t line, size_t column)
+ : node (file, line, column)
+ {
+ }
+
+ using union_::add_edge_left;
+ using type_instantiation::add_edge_left;
+ };
+}
+
+#endif // ODB_SEMANTICS_UNION_TEMPLATE_HXX