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/include.cxx | |
parent | 565ad74e164abdaaa31de146a1ef76f3d3f6734d (diff) |
Add support for defining composite values inside persistent classes, etc
Diffstat (limited to 'odb/include.cxx')
-rw-r--r-- | odb/include.cxx | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/odb/include.cxx b/odb/include.cxx index a6e8c53..cabef1e 100644 --- a/odb/include.cxx +++ b/odb/include.cxx @@ -70,16 +70,28 @@ namespace struct class_: traversal::class_, context { - class_ (include_map& map): main_file_loc_ (0), map_ (map) {} + class_ (include_map& map) + : typedefs_ (true), main_file_loc_ (0), map_ (map) + { + *this >> defines_ >> *this; + *this >> typedefs_ >> *this; + } virtual void traverse (type& c) { + class_kind_type ck (class_kind (c)); + + if (ck == class_other) + return; + + names (c); // Check nested classes. + // We only generate things for objects and composite value types. In // particular, we don't care about views since they cannot be used in // definitions of other views, objects, or composite values. // - if (!(object (c) || composite (c))) + if (ck != class_object && ck != class_composite) return; // Not interested in classes that we are generating. @@ -153,6 +165,9 @@ namespace } private: + traversal::defines defines_; + typedefs typedefs_; + location_t main_file_loc_; include_map& map_; }; |