From 83ba948c7276165ae0fbaa2d88cc0d78de522827 Mon Sep 17 00:00:00 2001 From: boris Date: Fri, 24 Oct 2003 22:13:53 +0000 Subject: ChangeLogTag: Fri Oct 24 17:14:51 2003 Boris Kolpackov --- TAO/CIAO/CCF/CCF/IDL2/Traversal/Typedef.hpp | 50 +++++++++++++++++++++-------- TAO/CIAO/ChangeLog | 19 +++++++---- 2 files changed, 49 insertions(+), 20 deletions(-) (limited to 'TAO') diff --git a/TAO/CIAO/CCF/CCF/IDL2/Traversal/Typedef.hpp b/TAO/CIAO/CCF/CCF/IDL2/Traversal/Typedef.hpp index 2c7736a8127..f8484dc12fd 100644 --- a/TAO/CIAO/CCF/CCF/IDL2/Traversal/Typedef.hpp +++ b/TAO/CIAO/CCF/CCF/IDL2/Traversal/Typedef.hpp @@ -14,38 +14,62 @@ namespace CCF { namespace Traversal { + struct TypedefDeclBase : Traverser + { + protected: + TypedefDeclBase () + { + map (typeid (SyntaxTree::TypedefDecl), this); + } + + virtual bool + traverse (SyntaxTree::NodePtr const& n) + { + traverse (n->dynamic_type ()); + return true; + } + + virtual void + traverse (SyntaxTree::TypedefDeclPtr const& n) + { + typedef_decl = n; + + SyntaxTree::NodePtr vt (n->virtual_type ()); + + disp_.dispatch (vt); + } + + protected: + Dispatcher disp_; + SyntaxTree::TypedefDeclPtr typedef_decl; + }; + + // // // template - struct TypedefDecl : Traverser + struct TypedefDecl : virtual TypedefDeclBase, Traverser { typedef - SyntaxTree::TypedefDeclPtr + SyntaxTree::StrictPtr NodePtr; TypedefDecl () { - map (typeid (SyntaxTree::TypedefDecl), this); + disp_.map (typeid (T), this); } virtual bool traverse (SyntaxTree::NodePtr const& n) { //@@ gcc bug - if (n->template is_a ()) - { - traverse (n); - return true; - } - else - { - return false; - } + traverse (typedef_decl, n->template dynamic_type ()); + return true; } virtual void - traverse (NodePtr const& n) + traverse (SyntaxTree::TypedefDeclPtr const& td, NodePtr const& n) { delegate (n); } diff --git a/TAO/CIAO/ChangeLog b/TAO/CIAO/ChangeLog index 4cdcd3f87b6..147647cbfe1 100644 --- a/TAO/CIAO/ChangeLog +++ b/TAO/CIAO/ChangeLog @@ -1,3 +1,8 @@ +Fri Oct 24 17:14:51 2003 Boris Kolpackov + + * CCF/CCF/IDL2/Traversal/Typedef.hpp: New implementation of + typedef traverser. + Fri Oct 24 11:31:34 2003 Venkita Subramonian * CIAO version 0.3.5 released. @@ -35,12 +40,12 @@ Thu Oct 16 16:45:35 2003 Boris Kolpackov * CCF/CCF/IDL3/SyntaxTree/Operation.hpp: * CCF/Example/CIDL/LocalExecutorMapping/ExecutorMappingGenerator.cpp: Added support for struct. - + * CCF/Example/CIDL/LocalExecutorMapping/test-2.idl: * CCF/Example/CIDL/LocalExecutorMapping/test-2_exec.idl.orig: Added a few structs for testing. - * CCF/Documentation/TODO: Marked some items as done or + * CCF/Documentation/TODO: Marked some items as done or partially done. Thu Oct 16 12:55:06 2003 Boris Kolpackov @@ -283,16 +288,16 @@ Sun Oct 12 20:44:41 2003 Jeff Parsons * CIDLC/ServantHeaderGenerator.hpp: * CIDLC/ServantSourceGenerator.cpp: * CIDLC/ServantSourceGenerator.hpp: - Changed top of files to match the title/author/cvs id format for + Changed top of files to match the title/author/cvs id format for all other CCF and CIDLC files. * CIDLC/TypeNameEmitter.cpp: * CIDLC/TypeNameEmitter.hpp: - New files, adding support for all basic IDL types, and factoring - out the typename emitter classes for operation return types and - parameters into a separate translation unit, to eliminate the - duplication in ServantHeaderGenerator.cpp and + New files, adding support for all basic IDL types, and factoring + out the typename emitter classes for operation return types and + parameters into a separate translation unit, to eliminate the + duplication in ServantHeaderGenerator.cpp and ServantSourceGenerator.cpp. * CIDLC/cidlc.mpc: -- cgit v1.2.1