summaryrefslogtreecommitdiff
path: root/ACE/contrib/utility/Example/Introspection/Traversal/SyntaxTree.cpp
diff options
context:
space:
mode:
authorWilliam R. Otte <wotte@dre.vanderbilt.edu>2006-07-24 15:50:30 +0000
committerWilliam R. Otte <wotte@dre.vanderbilt.edu>2006-07-24 15:50:30 +0000
commit7a52d43a162b23d9e85e7b955e9b2c8e9caf550e (patch)
tree66a84b20d47f2269d8bdc6e0323f338763424d3a /ACE/contrib/utility/Example/Introspection/Traversal/SyntaxTree.cpp
parent0e49389337be86641451a5c36c24bf742fe97523 (diff)
downloadATCD-7a52d43a162b23d9e85e7b955e9b2c8e9caf550e.tar.gz
Repo restructuring
Diffstat (limited to 'ACE/contrib/utility/Example/Introspection/Traversal/SyntaxTree.cpp')
-rw-r--r--ACE/contrib/utility/Example/Introspection/Traversal/SyntaxTree.cpp119
1 files changed, 119 insertions, 0 deletions
diff --git a/ACE/contrib/utility/Example/Introspection/Traversal/SyntaxTree.cpp b/ACE/contrib/utility/Example/Introspection/Traversal/SyntaxTree.cpp
new file mode 100644
index 00000000000..71115ff2b24
--- /dev/null
+++ b/ACE/contrib/utility/Example/Introspection/Traversal/SyntaxTree.cpp
@@ -0,0 +1,119 @@
+// file : Example/Introspection/Traversal/SyntaxTree.cpp
+// author : Boris Kolpackov <boris@kolpackov.net>
+// copyright : Copyright (c) 2002-2003 Boris Kolpackov
+// license : http://kolpackov.net/license.html
+
+#include "SyntaxTree.hpp"
+
+using namespace Utility::Introspection;
+
+namespace SyntaxTree
+{
+
+ // Node
+ //
+ //
+
+ namespace
+ {
+ TypeInfo
+ node_init_ ()
+ {
+ TypeInfo ti (typeid (Node));
+ ti.add_base (Access::PUBLIC, true, Object::static_type_info ());
+ return ti;
+ }
+
+ TypeInfo node_ (node_init_ ());
+ }
+
+ TypeInfo const& Node::
+ static_type_info () { return node_; }
+
+
+ // Declaration
+ //
+ //
+
+ namespace
+ {
+ TypeInfo
+ declaration_init_ ()
+ {
+ TypeInfo ti (typeid (Declaration));
+ ti.add_base (Access::PUBLIC, true, Node::static_type_info ());
+ return ti;
+ }
+
+ TypeInfo declaration_ (declaration_init_ ());
+ }
+
+ TypeInfo const& Declaration::
+ static_type_info () { return declaration_; }
+
+
+ // Scope
+ //
+ //
+
+ namespace
+ {
+ TypeInfo
+ scope_init_ ()
+ {
+ TypeInfo ti (typeid (Scope));
+ ti.add_base (Access::PUBLIC, true, Declaration::static_type_info ());
+ return ti;
+ }
+
+ TypeInfo scope_ (scope_init_ ());
+ }
+
+ TypeInfo const& Scope::
+ static_type_info () { return scope_; }
+
+
+ // InterfaceDecl
+ //
+ //
+
+ namespace
+ {
+ TypeInfo
+ interface_decl_init_ ()
+ {
+ TypeInfo ti (typeid (InterfaceDecl));
+ ti.add_base (Access::PUBLIC, true, Declaration::static_type_info ());
+ return ti;
+ }
+
+ TypeInfo interface_decl_ (interface_decl_init_ ());
+ }
+
+ TypeInfo const& InterfaceDecl::
+ static_type_info () { return interface_decl_; }
+
+
+ // InterfaceDef
+ //
+ //
+
+ namespace
+ {
+ TypeInfo
+ interface_def_init_ ()
+ {
+ TypeInfo ti (typeid (InterfaceDef));
+ ti.add_base (Access::PUBLIC, true, InterfaceDecl::static_type_info ());
+ ti.add_base (Access::PUBLIC, true, Scope::static_type_info ());
+ return ti;
+ }
+
+ TypeInfo interface_def_ (interface_def_init_ ());
+ }
+
+ TypeInfo const& InterfaceDef::
+ static_type_info () { return interface_def_; }
+
+}
+//$Id$