diff options
Diffstat (limited to 'odb/processor.cxx')
-rw-r--r-- | odb/processor.cxx | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/odb/processor.cxx b/odb/processor.cxx new file mode 100644 index 0000000..601b6c1 --- /dev/null +++ b/odb/processor.cxx @@ -0,0 +1,34 @@ +// file : odb/processor.cxx +// author : Boris Kolpackov <boris@codesynthesis.com> +// copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC +// license : GNU GPL v3; see accompanying LICENSE file + +#include <iostream> + +#include <odb/context.hxx> +#include <odb/processor.hxx> + +#include <odb/relational/processor.hxx> + +using namespace std; + +void processor:: +process (options const& ops, semantics::unit& unit, semantics::path const&) +{ + try + { + // Process types. + // + if (ops.database () != database::tracer) + { + auto_ptr<context> ctx (create_context (cerr, unit, ops)); + relational::process (); + } + } + catch (generation_failed const&) + { + // Processing failed. Diagnostics has already been issued. + // + throw failed (); + } +} |