diff options
Diffstat (limited to 'odb/traversal/relational')
-rw-r--r-- | odb/traversal/relational/changelog.cxx | 63 | ||||
-rw-r--r-- | odb/traversal/relational/changelog.hxx | 53 | ||||
-rw-r--r-- | odb/traversal/relational/changeset.hxx | 18 | ||||
-rw-r--r-- | odb/traversal/relational/column.hxx | 21 | ||||
-rw-r--r-- | odb/traversal/relational/elements.hxx | 162 | ||||
-rw-r--r-- | odb/traversal/relational/foreign-key.hxx | 21 | ||||
-rw-r--r-- | odb/traversal/relational/index.hxx | 20 | ||||
-rw-r--r-- | odb/traversal/relational/key.cxx | 17 | ||||
-rw-r--r-- | odb/traversal/relational/key.hxx | 50 | ||||
-rw-r--r-- | odb/traversal/relational/model.hxx | 18 | ||||
-rw-r--r-- | odb/traversal/relational/primary-key.hxx | 18 | ||||
-rw-r--r-- | odb/traversal/relational/table.hxx | 21 |
12 files changed, 0 insertions, 482 deletions
diff --git a/odb/traversal/relational/changelog.cxx b/odb/traversal/relational/changelog.cxx deleted file mode 100644 index 149d93d..0000000 --- a/odb/traversal/relational/changelog.cxx +++ /dev/null @@ -1,63 +0,0 @@ -// file : odb/traversal/relational/changelog.cxx -// license : GNU GPL v3; see accompanying LICENSE file - -#include <odb/traversal/relational/changelog.hxx> -#include <odb/traversal/relational/model.hxx> -#include <odb/traversal/relational/changeset.hxx> - -namespace traversal -{ - namespace relational - { - // contains_model - // - void contains_model:: - traverse (type& c) - { - dispatch (c.model ()); - } - - // contains_changeset - // - void contains_changeset:: - traverse (type& c) - { - dispatch (c.changeset ()); - } - - // changelog - // - void changelog:: - traverse (type& cl) - { - contains_model (cl); - contains_changeset (cl); - } - - void changelog:: - contains_model (type& cl) - { - contains_model (cl, *this); - } - - void changelog:: - contains_model (type& cl, edge_dispatcher& d) - { - d.dispatch (cl.contains_model ()); - } - - void changelog:: - contains_changeset (type& cl) - { - contains_changeset (cl, *this); - } - - void changelog:: - contains_changeset (type& cl, edge_dispatcher& d) - { - iterate_and_dispatch (cl.contains_changeset_begin (), - cl.contains_changeset_end (), - d); - } - } -} diff --git a/odb/traversal/relational/changelog.hxx b/odb/traversal/relational/changelog.hxx deleted file mode 100644 index 4b7f18f..0000000 --- a/odb/traversal/relational/changelog.hxx +++ /dev/null @@ -1,53 +0,0 @@ -// file : odb/traversal/relational/changelog.hxx -// license : GNU GPL v3; see accompanying LICENSE file - -#ifndef ODB_TRAVERSAL_RELATIONAL_CHANGELOG_HXX -#define ODB_TRAVERSAL_RELATIONAL_CHANGELOG_HXX - -#include <odb/semantics/relational/changelog.hxx> -#include <odb/traversal/relational/elements.hxx> - -namespace traversal -{ - namespace relational - { - struct contains_model: edge<semantics::relational::contains_model> - { - contains_model () {} - contains_model (node_dispatcher& n) {node_traverser (n);} - - virtual void - traverse (type&); - }; - - struct contains_changeset: edge<semantics::relational::contains_changeset> - { - contains_changeset () {} - contains_changeset (node_dispatcher& n) {node_traverser (n);} - - virtual void - traverse (type&); - }; - - struct changelog: node<semantics::relational::changelog> - { - public: - virtual void - traverse (type&); - - virtual void - contains_model (type&); - - virtual void - contains_model (type&, edge_dispatcher&); - - virtual void - contains_changeset (type&); - - virtual void - contains_changeset (type&, edge_dispatcher&); - }; - } -} - -#endif // ODB_TRAVERSAL_RELATIONAL_CHANGELOG_HXX diff --git a/odb/traversal/relational/changeset.hxx b/odb/traversal/relational/changeset.hxx deleted file mode 100644 index 3cc522a..0000000 --- a/odb/traversal/relational/changeset.hxx +++ /dev/null @@ -1,18 +0,0 @@ -// file : odb/traversal/relational/changeset.hxx -// license : GNU GPL v3; see accompanying LICENSE file - -#ifndef ODB_TRAVERSAL_RELATIONAL_CHANGESET_HXX -#define ODB_TRAVERSAL_RELATIONAL_CHANGESET_HXX - -#include <odb/semantics/relational/changeset.hxx> -#include <odb/traversal/relational/elements.hxx> - -namespace traversal -{ - namespace relational - { - struct changeset: scope_template<semantics::relational::changeset> {}; - } -} - -#endif // ODB_TRAVERSAL_RELATIONAL_CHANGESET_HXX diff --git a/odb/traversal/relational/column.hxx b/odb/traversal/relational/column.hxx deleted file mode 100644 index b9c586d..0000000 --- a/odb/traversal/relational/column.hxx +++ /dev/null @@ -1,21 +0,0 @@ -// file : odb/traversal/relational/column.hxx -// license : GNU GPL v3; see accompanying LICENSE file - -#ifndef ODB_TRAVERSAL_RELATIONAL_COLUMN_HXX -#define ODB_TRAVERSAL_RELATIONAL_COLUMN_HXX - -#include <odb/semantics/relational/column.hxx> -#include <odb/traversal/relational/elements.hxx> - -namespace traversal -{ - namespace relational - { - struct column: node<semantics::relational::column> {}; - struct add_column: node<semantics::relational::add_column> {}; - struct drop_column: node<semantics::relational::drop_column> {}; - struct alter_column: node<semantics::relational::alter_column> {}; - } -} - -#endif // ODB_TRAVERSAL_RELATIONAL_COLUMN_HXX diff --git a/odb/traversal/relational/elements.hxx b/odb/traversal/relational/elements.hxx deleted file mode 100644 index 9ecdc6a..0000000 --- a/odb/traversal/relational/elements.hxx +++ /dev/null @@ -1,162 +0,0 @@ -// file : odb/traversal/relational/elements.hxx -// license : GNU GPL v3; see accompanying LICENSE file - -#ifndef ODB_TRAVERSAL_RELATIONAL_ELEMENTS_HXX -#define ODB_TRAVERSAL_RELATIONAL_ELEMENTS_HXX - -#include <cutl/compiler/traversal.hxx> -#include <odb/semantics/relational/elements.hxx> - -namespace traversal -{ - namespace relational - { - using namespace cutl; - - // - // - typedef compiler::dispatcher<semantics::relational::node> node_dispatcher; - typedef compiler::dispatcher<semantics::relational::edge> edge_dispatcher; - - // - // - struct node_base: node_dispatcher, edge_dispatcher - { - void - edge_traverser (edge_dispatcher& d) - { - edge_dispatcher::traverser (d); - } - - edge_dispatcher& - edge_traverser () - { - return *this; - } - - using node_dispatcher::dispatch; - using edge_dispatcher::dispatch; - - using edge_dispatcher::iterate_and_dispatch; - }; - - struct edge_base: edge_dispatcher, node_dispatcher - { - void - node_traverser (node_dispatcher& d) - { - node_dispatcher::traverser (d); - } - - node_dispatcher& - node_traverser () - { - return *this; - } - - using edge_dispatcher::dispatch; - using node_dispatcher::dispatch; - - using node_dispatcher::iterate_and_dispatch; - }; - - inline edge_base& - operator>> (node_base& n, edge_base& e) - { - n.edge_traverser (e); - return e; - } - - inline node_base& - operator>> (edge_base& e, node_base& n) - { - e.node_traverser (n); - return n; - } - - // - // - template <typename X> - struct node: compiler::traverser_impl<X, semantics::relational::node>, - virtual node_base - { - virtual void - traverse (X&) {} - }; - - template <typename X> - struct edge: compiler::traverser_impl<X, semantics::relational::edge>, - virtual edge_base - { - }; - - // - // Edges - // - - template <typename N> - struct names: edge<semantics::relational::names<N> > - { - names () - { - } - - names (node_dispatcher& n) - { - this->node_traverser (n); - } - - virtual void - traverse (semantics::relational::names<N>& e) - { - this->dispatch (e.nameable ()); - } - }; - - typedef names<semantics::relational::uname> unames; - typedef names<semantics::relational::qname> qnames; - - // - // Nodes - // - - template <typename N> - struct nameable: node<semantics::relational::nameable<N> > {}; - - typedef nameable<semantics::relational::uname> unameable; - typedef nameable<semantics::relational::qname> qnameable; - - // - // - template <typename T> - struct scope_template: node<T> - { - public: - virtual void - traverse (T& s) - { - names (s); - } - - virtual void - names (T& s) - { - names (s, *this); - } - - virtual void - names (T& s, edge_dispatcher& d) - { - this->iterate_and_dispatch (s.names_begin (), s.names_end (), d); - } - }; - - template <typename N> - struct scope: scope_template<semantics::relational::scope<N> > {}; - - typedef scope<semantics::relational::uname> uscope; - typedef scope<semantics::relational::qname> qscope; - } -} - -#endif // ODB_TRAVERSAL_RELATIONAL_ELEMENTS_HXX diff --git a/odb/traversal/relational/foreign-key.hxx b/odb/traversal/relational/foreign-key.hxx deleted file mode 100644 index b8ccba3..0000000 --- a/odb/traversal/relational/foreign-key.hxx +++ /dev/null @@ -1,21 +0,0 @@ -// file : odb/traversal/relational/foreign-key.hxx -// license : GNU GPL v3; see accompanying LICENSE file - -#ifndef ODB_TRAVERSAL_RELATIONAL_FOREIGN_KEY_HXX -#define ODB_TRAVERSAL_RELATIONAL_FOREIGN_KEY_HXX - -#include <odb/semantics/relational/foreign-key.hxx> -#include <odb/traversal/relational/key.hxx> - -namespace traversal -{ - namespace relational - { - struct foreign_key: key_template<semantics::relational::foreign_key> {}; - struct add_foreign_key: - key_template<semantics::relational::add_foreign_key> {}; - struct drop_foreign_key: node<semantics::relational::drop_foreign_key> {}; - } -} - -#endif // ODB_TRAVERSAL_RELATIONAL_FOREIGN_KEY_HXX diff --git a/odb/traversal/relational/index.hxx b/odb/traversal/relational/index.hxx deleted file mode 100644 index 2277fee..0000000 --- a/odb/traversal/relational/index.hxx +++ /dev/null @@ -1,20 +0,0 @@ -// file : odb/traversal/relational/index.hxx -// license : GNU GPL v3; see accompanying LICENSE file - -#ifndef ODB_TRAVERSAL_RELATIONAL_INDEX_HXX -#define ODB_TRAVERSAL_RELATIONAL_INDEX_HXX - -#include <odb/semantics/relational/index.hxx> -#include <odb/traversal/relational/key.hxx> - -namespace traversal -{ - namespace relational - { - struct index: key_template<semantics::relational::index> {}; - struct add_index: key_template<semantics::relational::add_index> {}; - struct drop_index: node<semantics::relational::drop_index> {}; - } -} - -#endif // ODB_TRAVERSAL_RELATIONAL_INDEX_HXX diff --git a/odb/traversal/relational/key.cxx b/odb/traversal/relational/key.cxx deleted file mode 100644 index 15a131c..0000000 --- a/odb/traversal/relational/key.cxx +++ /dev/null @@ -1,17 +0,0 @@ -// file : odb/traversal/relational/key.cxx -// license : GNU GPL v3; see accompanying LICENSE file - -#include <odb/traversal/relational/key.hxx> -#include <odb/traversal/relational/column.hxx> - -namespace traversal -{ - namespace relational - { - void contains:: - traverse (type& c) - { - dispatch (c.column ()); - } - } -} diff --git a/odb/traversal/relational/key.hxx b/odb/traversal/relational/key.hxx deleted file mode 100644 index d0ba2d7..0000000 --- a/odb/traversal/relational/key.hxx +++ /dev/null @@ -1,50 +0,0 @@ -// file : odb/traversal/relational/key.hxx -// license : GNU GPL v3; see accompanying LICENSE file - -#ifndef ODB_TRAVERSAL_RELATIONAL_KEY_HXX -#define ODB_TRAVERSAL_RELATIONAL_KEY_HXX - -#include <odb/semantics/relational/key.hxx> -#include <odb/traversal/relational/elements.hxx> - -namespace traversal -{ - namespace relational - { - struct contains: edge<semantics::relational::contains> - { - contains () {} - contains (node_dispatcher& n) {node_traverser (n);} - - virtual void - traverse (type&); - }; - - template <typename T> - struct key_template: node<T> - { - public: - virtual void - traverse (T& k) - { - contains (k); - } - - virtual void - contains (T& k) - { - contains (k, *this); - } - - virtual void - contains (T& k, edge_dispatcher& d) - { - this->iterate_and_dispatch (k.contains_begin (), k.contains_end (), d); - } - }; - - struct key: key_template<semantics::relational::key> {}; - } -} - -#endif // ODB_TRAVERSAL_RELATIONAL_KEY_HXX diff --git a/odb/traversal/relational/model.hxx b/odb/traversal/relational/model.hxx deleted file mode 100644 index 03d70b1..0000000 --- a/odb/traversal/relational/model.hxx +++ /dev/null @@ -1,18 +0,0 @@ -// file : odb/traversal/relational/model.hxx -// license : GNU GPL v3; see accompanying LICENSE file - -#ifndef ODB_TRAVERSAL_RELATIONAL_MODEL_HXX -#define ODB_TRAVERSAL_RELATIONAL_MODEL_HXX - -#include <odb/semantics/relational/model.hxx> -#include <odb/traversal/relational/elements.hxx> - -namespace traversal -{ - namespace relational - { - struct model: scope_template<semantics::relational::model> {}; - } -} - -#endif // ODB_TRAVERSAL_RELATIONAL_MODEL_HXX diff --git a/odb/traversal/relational/primary-key.hxx b/odb/traversal/relational/primary-key.hxx deleted file mode 100644 index dcefab6..0000000 --- a/odb/traversal/relational/primary-key.hxx +++ /dev/null @@ -1,18 +0,0 @@ -// file : odb/traversal/relational/primary-key.hxx -// license : GNU GPL v3; see accompanying LICENSE file - -#ifndef ODB_TRAVERSAL_RELATIONAL_PRIMARY_KEY_HXX -#define ODB_TRAVERSAL_RELATIONAL_PRIMARY_KEY_HXX - -#include <odb/semantics/relational/primary-key.hxx> -#include <odb/traversal/relational/key.hxx> - -namespace traversal -{ - namespace relational - { - struct primary_key: key_template<semantics::relational::primary_key> {}; - } -} - -#endif // ODB_TRAVERSAL_RELATIONAL_PRIMARY_KEY_HXX diff --git a/odb/traversal/relational/table.hxx b/odb/traversal/relational/table.hxx deleted file mode 100644 index d80e37e..0000000 --- a/odb/traversal/relational/table.hxx +++ /dev/null @@ -1,21 +0,0 @@ -// file : odb/traversal/relational/table.hxx -// license : GNU GPL v3; see accompanying LICENSE file - -#ifndef ODB_TRAVERSAL_RELATIONAL_TABLE_HXX -#define ODB_TRAVERSAL_RELATIONAL_TABLE_HXX - -#include <odb/semantics/relational/table.hxx> -#include <odb/traversal/relational/elements.hxx> - -namespace traversal -{ - namespace relational - { - struct table: scope_template<semantics::relational::table> {}; - struct add_table: scope_template<semantics::relational::add_table> {}; - struct drop_table: node<semantics::relational::drop_table> {}; - struct alter_table: scope_template<semantics::relational::alter_table> {}; - } -} - -#endif // ODB_TRAVERSAL_RELATIONAL_TABLE_HXX |