diff options
Diffstat (limited to 'ACE/contrib/utility/Example/Introspection/InheritanceTree/Hierarchy.hpp')
-rw-r--r-- | ACE/contrib/utility/Example/Introspection/InheritanceTree/Hierarchy.hpp | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/ACE/contrib/utility/Example/Introspection/InheritanceTree/Hierarchy.hpp b/ACE/contrib/utility/Example/Introspection/InheritanceTree/Hierarchy.hpp new file mode 100644 index 00000000000..213e0593f6b --- /dev/null +++ b/ACE/contrib/utility/Example/Introspection/InheritanceTree/Hierarchy.hpp @@ -0,0 +1,61 @@ +// file : Example/Introspection/InheritanceTree/Hierarchy.hpp +// author : Boris Kolpackov <boris@kolpackov.net> +// copyright : Copyright (c) 2002-2003 Boris Kolpackov +// license : http://kolpackov.net/license.html + +#ifndef HIERARCHY_HPP +#define HIERARCHY_HPP + +#include "Utility/Introspection/Introspection.hpp" + +namespace Introspection = Utility::Introspection; + +using Introspection::TypeInfo; +using Introspection::TypeId; + +struct A : virtual Introspection::Object +{ + A () + { + type_info (static_type_info ()); + } + + static TypeInfo const& + static_type_info (); +}; + +struct B : virtual A +{ + B () + { + type_info (static_type_info ()); + } + + static TypeInfo const& + static_type_info (); +}; + +struct C : virtual A +{ + C () + { + type_info (static_type_info ()); + } + + static TypeInfo const& + static_type_info (); +}; + +struct D : virtual B, C +{ + D () + { + type_info (static_type_info ()); + } + + static TypeInfo const& + static_type_info (); +}; + +#endif // HIERARCHY_HPP +//$Id$ |