diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2013-09-17 11:11:43 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2013-09-17 11:11:43 +0200 |
commit | 791b94b894f93bc037637907616efc844f3d9414 (patch) | |
tree | 27b8d92cbe5f7918109842d36484fb4b639a020c /odb/inline.cxx | |
parent | 565ad74e164abdaaa31de146a1ef76f3d3f6734d (diff) |
Add support for defining composite values inside persistent classes, etc
Diffstat (limited to 'odb/inline.cxx')
-rw-r--r-- | odb/inline.cxx | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/odb/inline.cxx b/odb/inline.cxx index 036a728..79398c5 100644 --- a/odb/inline.cxx +++ b/odb/inline.cxx @@ -67,16 +67,30 @@ namespace inline_ struct class_: traversal::class_, virtual context { + class_ () + : typedefs_ (false) + { + *this >> defines_ >> *this; + *this >> typedefs_ >> *this; + } + virtual void traverse (type& c) { - if (!options.at_once () && class_file (c) != unit.file ()) + class_kind_type ck (class_kind (c)); + + if (ck == class_other || + (!options.at_once () && class_file (c) != unit.file ())) return; - if (object (c)) - traverse_object (c); - else if (view (c)) - traverse_view (c); + names (c); + + switch (ck) + { + case class_object: traverse_object (c); break; + case class_view: traverse_view (c); break; + default: break; + } } void @@ -86,6 +100,9 @@ namespace inline_ traverse_view (type&); private: + traversal::defines defines_; + typedefs typedefs_; + callback_calls callback_calls_; }; } |