From d7662d2cc72668eee0a21737edfcc1bbe41c229b Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 25 Apr 2011 12:30:04 +0200 Subject: Reuse container traits from composite values --- odb/common.hxx | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'odb/common.hxx') diff --git a/odb/common.hxx b/odb/common.hxx index 2d220b8..548e2a2 100644 --- a/odb/common.hxx +++ b/odb/common.hxx @@ -18,16 +18,23 @@ struct object_members_base: traversal::class_, virtual context virtual void simple (semantics::data_member&); - // If you override this function, call the base if you want the composite - // to be recursively traversed. The second argument is the actual composite - // type, which is not necessarily the same as m.type() in case of - // traverse_composite(). + virtual void + container (semantics::data_member&); + + // If you override this function, you can call the base to traverse + // bases and members. The first argument is the data member and can + // be NULL if we are traversing the root type or a base. The second + // argument is the actual composite type, which is not necessarily + // the same as m.type (). // virtual void - composite (semantics::data_member&, semantics::class_&); + composite (semantics::data_member*, semantics::class_&); + // If you override this function, you can call the base to traverse + // bases and members. + // virtual void - container (semantics::data_member&); + object (semantics::class_&); public: object_members_base () -- cgit v1.1