aboutsummaryrefslogtreecommitdiff
path: root/odb/relational/context.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'odb/relational/context.hxx')
-rw-r--r--odb/relational/context.hxx23
1 files changed, 14 insertions, 9 deletions
diff --git a/odb/relational/context.hxx b/odb/relational/context.hxx
index fbd6059..c99b400 100644
--- a/odb/relational/context.hxx
+++ b/odb/relational/context.hxx
@@ -33,15 +33,6 @@ namespace relational
string
quote_id (string const&) const;
- public:
- context ();
-
- static context&
- current ()
- {
- return dynamic_cast<context&> (root_context::current ());
- }
-
protected:
// The default implementation returns false.
//
@@ -61,12 +52,26 @@ namespace relational
virtual string
quote_id_impl (string const&) const;
+ public:
+ virtual
+ ~context ();
+ context ();
+
+ static context&
+ current ()
+ {
+ return *current_;
+ }
+
protected:
struct data;
typedef context base_context;
context (data*);
+ private:
+ static context* current_;
+
protected:
struct data: root_context::data
{