diff options
Diffstat (limited to 'TAO')
-rw-r--r-- | TAO/CIAO/CCF/CCF/IDL2/Traversal/Typedef.hpp | 50 | ||||
-rw-r--r-- | TAO/CIAO/ChangeLog | 19 |
2 files changed, 49 insertions, 20 deletions
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<SyntaxTree::TypedefDecl> ()); + 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 <typename T> - struct TypedefDecl : Traverser + struct TypedefDecl : virtual TypedefDeclBase, Traverser { typedef - SyntaxTree::TypedefDeclPtr + SyntaxTree::StrictPtr<T> 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<T> ()) - { - traverse (n); - return true; - } - else - { - return false; - } + traverse (typedef_decl, n->template dynamic_type<T> ()); + 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 <boris@dre.vanderbilt.edu> + + * CCF/CCF/IDL2/Traversal/Typedef.hpp: New implementation of + typedef traverser. + Fri Oct 24 11:31:34 2003 Venkita Subramonian <venkita@cs.wustl.edu> * CIAO version 0.3.5 released. @@ -35,12 +40,12 @@ Thu Oct 16 16:45:35 2003 Boris Kolpackov <boris@dre.vanderbilt.edu> * 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 <boris@dre.vanderbilt.edu> @@ -283,16 +288,16 @@ Sun Oct 12 20:44:41 2003 Jeff Parsons <j.parsons@vanderbilt.edu> * 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: |