aboutsummaryrefslogtreecommitdiff
path: root/odb/context.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'odb/context.hxx')
-rw-r--r--odb/context.hxx29
1 files changed, 25 insertions, 4 deletions
diff --git a/odb/context.hxx b/odb/context.hxx
index 75becef..e00ec4e 100644
--- a/odb/context.hxx
+++ b/odb/context.hxx
@@ -57,6 +57,16 @@ enum container_kind
ck_multimap
};
+// The same as class_kind in libodb/odb/traits.hxx.
+//
+enum class_kind
+{
+ class_object,
+ class_view,
+ class_composite,
+ class_other
+};
+
class context
{
public:
@@ -84,6 +94,12 @@ public:
}
static bool
+ view (semantics::type& t)
+ {
+ return t.count ("view");
+ }
+
+ static bool
transient (semantics::data_member& m)
{
return m.count ("transient");
@@ -177,6 +193,11 @@ public:
bool
null (semantics::data_member&, string const& key_prefix);
+ typedef ::class_kind class_kind_type;
+
+ static class_kind_type
+ class_kind (semantics::class_&);
+
// Database names and types.
//
public:
@@ -377,7 +398,7 @@ public:
string const& key_prefix);
bool
- has_a (semantics::type&, unsigned short flags);
+ has_a (semantics::class_&, unsigned short flags);
public:
// Process include path by adding the prefix, putting it through
@@ -480,12 +501,12 @@ public:
bool embedded_schema;
- // Outermost object currently being traversed.
+ // Outermost object or view currently being traversed.
//
semantics::class_*& top_object;
- // Object currently being traversed. It can be the same as top_object
- // or it can a base of top_object.
+ // Object or view currently being traversed. It can be the same as
+ // top_object or it can a base of top_object.
//
semantics::class_*& cur_object;