summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2010-01-29 18:09:23 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2010-01-29 18:09:23 +0000
commit0bb3026c7489e9038a8ab2afb381d88c9d243d75 (patch)
tree2cb911060758dafd4d0d283564fc50eafdd4c993
parentae49b3f13711adae951f328a373b310a9f37fef6 (diff)
downloadATCD-0bb3026c7489e9038a8ab2afb381d88c9d243d75.tar.gz
ChangeLogTag: Fri Jan 29 18:08:41 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu>
-rw-r--r--modules/TAO/ChangeLog41
-rw-r--r--modules/TAO/TAO_IDL/ast/ast_factory.cpp15
-rw-r--r--modules/TAO/TAO_IDL/ast/ast_finder.cpp63
-rw-r--r--modules/TAO/TAO_IDL/ast/ast_generator.cpp12
-rw-r--r--modules/TAO/TAO_IDL/ast/ast_visitor_reifying.cpp6
-rw-r--r--modules/TAO/TAO_IDL/ast/ast_visitor_tmpl_module_inst.cpp6
-rw-r--r--modules/TAO/TAO_IDL/be/be_factory.cpp2
-rw-r--r--modules/TAO/TAO_IDL/be/be_finder.cpp57
-rw-r--r--modules/TAO/TAO_IDL/be/be_generator.cpp12
-rw-r--r--modules/TAO/TAO_IDL/be/be_visitor.cpp9
-rw-r--r--modules/TAO/TAO_IDL/be_include/be_factory.h8
-rw-r--r--modules/TAO/TAO_IDL/be_include/be_finder.h46
-rw-r--r--modules/TAO/TAO_IDL/be_include/be_generator.h5
-rw-r--r--modules/TAO/TAO_IDL/be_include/be_visitor.h2
-rw-r--r--modules/TAO/TAO_IDL/fe/idl.yy1
-rw-r--r--modules/TAO/TAO_IDL/fe/y.tab.cpp1
-rw-r--r--modules/TAO/TAO_IDL/include/ast_decl.h3
-rw-r--r--modules/TAO/TAO_IDL/include/ast_factory.h3
-rw-r--r--modules/TAO/TAO_IDL/include/ast_finder.h33
-rw-r--r--modules/TAO/TAO_IDL/include/ast_generator.h6
-rw-r--r--modules/TAO/TAO_IDL/include/ast_visitor.h2
-rw-r--r--modules/TAO/TAO_IDL/include/ast_visitor_reifying.h1
-rw-r--r--modules/TAO/TAO_IDL/include/ast_visitor_tmpl_module_inst.h1
-rw-r--r--modules/TAO/TAO_IDL/narrow/narrow.cpp101
-rw-r--r--modules/TAO/orbsvcs/IFR_Service/ifr_adding_visitor.cpp15
-rw-r--r--modules/TAO/orbsvcs/IFR_Service/ifr_visitor.cpp12
-rw-r--r--modules/TAO/orbsvcs/IFR_Service/ifr_visitor.h2
27 files changed, 391 insertions, 74 deletions
diff --git a/modules/TAO/ChangeLog b/modules/TAO/ChangeLog
index 7a7389fcd35..46bffe2114f 100644
--- a/modules/TAO/ChangeLog
+++ b/modules/TAO/ChangeLog
@@ -1,3 +1,44 @@
+Fri Jan 29 18:08:41 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * TAO_IDL/include/ast_finder.h:
+ * TAO_IDL/be/be_finder.cpp:
+ * TAO_IDL/ast/ast_finder.cpp:
+ * TAO_IDL/be_include/be_finder.h:
+
+ New AST node classes, representing an IDL home
+ finder construct.
+
+ * orbsvcs/IFR_Service/ifr_visitor.h:
+ * orbsvcs/IFR_Service/ifr_visitor.cpp:
+ * orbsvcs/IFR_Service/ifr_adding_visitor.cpp:
+
+ Updated backend with no-op overrides of
+ visit_* methods added to the front end.
+
+ * TAO_IDL/include/ast_generator.h:
+ * TAO_IDL/include/ast_visitor_reifying.h:
+ * TAO_IDL/include/ast_decl.h:
+ * TAO_IDL/include/ast_factory.h:
+ * TAO_IDL/include/ast_visitor_tmpl_module_inst.h:
+ * TAO_IDL/include/ast_visitor.h:
+ * TAO_IDL/be/be_factory.cpp:
+ * TAO_IDL/be/be_visitor.cpp:
+ * TAO_IDL/be/be_generator.cpp:
+ * TAO_IDL/ast/ast_visitor_tmpl_module_inst.cpp:
+ * TAO_IDL/ast/ast_generator.cpp:
+ * TAO_IDL/ast/ast_visitor_reifying.cpp:
+ * TAO_IDL/ast/ast_factory.cpp:
+ * TAO_IDL/be_include/be_visitor.h:
+ * TAO_IDL/be_include/be_factory.h:
+ * TAO_IDL/be_include/be_generator.h:
+ * TAO_IDL/fe/y.tab.cpp:
+ * TAO_IDL/fe/idl.yy:
+ * TAO_IDL/narrow/narrow.cpp:
+
+ Other changes corresponding to the addition
+ of the new AST classes and visit_* methods
+ above.
+
Thu Jan 28 20:04:42 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu>
* TAO_IDL/include/ast_decl.h:
diff --git a/modules/TAO/TAO_IDL/ast/ast_factory.cpp b/modules/TAO/TAO_IDL/ast/ast_factory.cpp
index b04773ea070..7abb347a4d4 100644
--- a/modules/TAO/TAO_IDL/ast/ast_factory.cpp
+++ b/modules/TAO/TAO_IDL/ast/ast_factory.cpp
@@ -64,7 +64,8 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
*/
-// AST_Factory nodes denote OBV factory construct declarations
+// AST_Factory nodes denote OBV or component home factory
+// construct declarations.
// AST_Factory is a subclass of AST_Decl (it is not a type!)
// and of UTL_Scope (the arguments are managed in a scope).
@@ -90,8 +91,8 @@ AST_Factory::AST_Factory (void)
}
AST_Factory::AST_Factory (UTL_ScopedName *n)
- : COMMON_Base (1,
- 0), //@@ Always local, never abstract
+ : COMMON_Base (true,
+ false), //@@ Always local, never abstract
AST_Decl (AST_Decl::NT_factory,
n),
UTL_Scope (AST_Decl::NT_factory),
@@ -323,7 +324,7 @@ AST_Factory::fe_add_exceptions (UTL_NameList *t)
return t;
}
-// Dump this AST_Factory node (an OBV factory construct) to the ostream o.
+// Dump this AST_Factory node to the ostream o.
void
AST_Factory::dump (ACE_OSTREAM_TYPE &o)
{
@@ -335,7 +336,7 @@ AST_Factory::dump (ACE_OSTREAM_TYPE &o)
// Iterator must be explicitly advanced inside the loop.
for (UTL_ScopeActiveIterator i (this, IK_decls);
- !i.is_done();)
+ !i.is_done ();)
{
d = i.item ();
d->dump (o);
@@ -348,7 +349,6 @@ AST_Factory::dump (ACE_OSTREAM_TYPE &o)
}
this->dump_i (o, ")");
-
}
int
@@ -357,7 +357,6 @@ AST_Factory::ast_accept (ast_visitor *visitor)
return visitor->visit_factory (this);
}
-// Data accessors
-
IMPL_NARROW_FROM_DECL(AST_Factory)
IMPL_NARROW_FROM_SCOPE(AST_Factory)
+
diff --git a/modules/TAO/TAO_IDL/ast/ast_finder.cpp b/modules/TAO/TAO_IDL/ast/ast_finder.cpp
new file mode 100644
index 00000000000..4a3cd25fec0
--- /dev/null
+++ b/modules/TAO/TAO_IDL/ast/ast_finder.cpp
@@ -0,0 +1,63 @@
+// $Id$
+
+#include "ast_finder.h"
+#include "ast_visitor.h"
+
+#include "utl_identifier.h"
+
+AST_Finder::AST_Finder (UTL_ScopedName *n)
+ : COMMON_Base (true,
+ false), //@@ Always local, never abstract
+ AST_Decl (AST_Decl::NT_factory,
+ n),
+ UTL_Scope (AST_Decl::NT_factory),
+ AST_Factory (n)
+{
+}
+
+AST_Finder::~AST_Finder (void)
+{
+}
+
+void
+AST_Finder::destroy (void)
+{
+ this->AST_Factory::destroy ();
+}
+
+// Dump this AST_Factory node to the ostream o.
+void
+AST_Finder::dump (ACE_OSTREAM_TYPE &o)
+{
+ AST_Decl *d = 0;
+
+ this->dump_i (o, "finder ");
+ this->local_name ()->dump (o);
+ this->dump_i (o, "(");
+
+ // Iterator must be explicitly advanced inside the loop.
+ for (UTL_ScopeActiveIterator i (this, IK_decls);
+ !i.is_done ();)
+ {
+ d = i.item ();
+ d->dump (o);
+ i.next ();
+
+ if (!i.is_done())
+ {
+ this->dump_i (o, ", ");
+ }
+ }
+
+ this->dump_i (o, ")");
+}
+
+int
+AST_Finder::ast_accept (ast_visitor *visitor)
+{
+ return visitor->visit_finder (this);
+}
+
+IMPL_NARROW_FROM_DECL(AST_Finder)
+IMPL_NARROW_FROM_SCOPE(AST_Finder)
+
diff --git a/modules/TAO/TAO_IDL/ast/ast_generator.cpp b/modules/TAO/TAO_IDL/ast/ast_generator.cpp
index 358f8eee92a..e61bcd69cea 100644
--- a/modules/TAO/TAO_IDL/ast/ast_generator.cpp
+++ b/modules/TAO/TAO_IDL/ast/ast_generator.cpp
@@ -104,6 +104,7 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
#include "ast_typedef.h"
#include "ast_native.h"
#include "ast_factory.h"
+#include "ast_finder.h"
#include "utl_identifier.h"
@@ -921,6 +922,17 @@ AST_Generator::create_factory (UTL_ScopedName *n)
return retval;
}
+AST_Finder *
+AST_Generator::create_finder (UTL_ScopedName *n)
+{
+ AST_Finder *retval = 0;
+ ACE_NEW_RETURN (retval,
+ AST_Finder (n),
+ 0);
+
+ return retval;
+}
+
AST_ValueBox *
AST_Generator::create_valuebox (UTL_ScopedName *n,
AST_Type *boxed_type)
diff --git a/modules/TAO/TAO_IDL/ast/ast_visitor_reifying.cpp b/modules/TAO/TAO_IDL/ast/ast_visitor_reifying.cpp
index 7a2cdcf51db..5a58a5eb4d5 100644
--- a/modules/TAO/TAO_IDL/ast/ast_visitor_reifying.cpp
+++ b/modules/TAO/TAO_IDL/ast/ast_visitor_reifying.cpp
@@ -190,6 +190,12 @@ ast_visitor_reifying::visit_factory (AST_Factory *)
}
int
+ast_visitor_reifying::visit_finder (AST_Finder *)
+{
+ return 0;
+}
+
+int
ast_visitor_reifying::visit_structure (AST_Structure *node)
{
this->check_and_store (node);
diff --git a/modules/TAO/TAO_IDL/ast/ast_visitor_tmpl_module_inst.cpp b/modules/TAO/TAO_IDL/ast/ast_visitor_tmpl_module_inst.cpp
index a21216ca732..5a7eafa22d0 100644
--- a/modules/TAO/TAO_IDL/ast/ast_visitor_tmpl_module_inst.cpp
+++ b/modules/TAO/TAO_IDL/ast/ast_visitor_tmpl_module_inst.cpp
@@ -1165,6 +1165,12 @@ ast_visitor_tmpl_module_inst::visit_factory (AST_Factory *node)
return 0;
}
+int
+ast_visitor_tmpl_module_inst::visit_finder (AST_Finder *)
+{
+ return 0;
+}
+
AST_Decl *
ast_visitor_tmpl_module_inst::reify_type (AST_Decl *d)
{
diff --git a/modules/TAO/TAO_IDL/be/be_factory.cpp b/modules/TAO/TAO_IDL/be/be_factory.cpp
index 13653d72dba..63ddb993807 100644
--- a/modules/TAO/TAO_IDL/be/be_factory.cpp
+++ b/modules/TAO/TAO_IDL/be/be_factory.cpp
@@ -3,7 +3,7 @@
// ============================================================================
//
// = LIBRARY
-// TAO IDL
+// TAO_IDL_BE
//
// = FILENAME
// be_factory.cpp
diff --git a/modules/TAO/TAO_IDL/be/be_finder.cpp b/modules/TAO/TAO_IDL/be/be_finder.cpp
new file mode 100644
index 00000000000..a2323839dbd
--- /dev/null
+++ b/modules/TAO/TAO_IDL/be/be_finder.cpp
@@ -0,0 +1,57 @@
+// $Id$
+
+// ============================================================================
+//
+// = LIBRARY
+// TAO_IDL_BE
+//
+// = FILENAME
+// be_finder.cpp
+//
+// = DESCRIPTION
+// Extension of class AST_Finder that provides additional means for C++
+// mapping.
+//
+// = AUTHOR
+// Jeff Parsons
+//
+// ============================================================================
+
+#include "be_finder.h"
+#include "be_visitor.h"
+
+be_finder::be_finder (UTL_ScopedName *n)
+ : COMMON_Base (1,
+ 0), //@@ Always local, never abstract
+ AST_Decl (AST_Decl::NT_factory,
+ n),
+ UTL_Scope (AST_Decl::NT_factory),
+ AST_Factory (n),
+ AST_Finder (n),
+ be_scope (AST_Decl::NT_factory),
+ be_decl (AST_Decl::NT_factory,
+ n),
+ be_factory (n)
+{
+}
+
+be_finder::~be_finder (void)
+{
+}
+
+void
+be_finder::destroy (void)
+{
+ // Call the destroy methods of our base classes.
+ this->be_factory::destroy ();
+ this->AST_Finder::destroy ();
+}
+
+int
+be_finder::accept (be_visitor *visitor)
+{
+ return visitor->visit_finder (this);
+}
+
+IMPL_NARROW_FROM_DECL (be_finder)
+IMPL_NARROW_FROM_SCOPE (be_finder)
diff --git a/modules/TAO/TAO_IDL/be/be_generator.cpp b/modules/TAO/TAO_IDL/be/be_generator.cpp
index 24d62f6fc66..774a6926e69 100644
--- a/modules/TAO/TAO_IDL/be/be_generator.cpp
+++ b/modules/TAO/TAO_IDL/be/be_generator.cpp
@@ -114,6 +114,7 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
#include "be_typedef.h"
#include "be_native.h"
#include "be_factory.h"
+#include "be_finder.h"
#include "utl_identifier.h"
#include "nr_extern.h"
#include "ace/config-all.h"
@@ -926,6 +927,17 @@ be_generator::create_factory (UTL_ScopedName *n)
return retval;
}
+AST_Finder *
+be_generator::create_finder (UTL_ScopedName *n)
+{
+ be_finder *retval = 0;
+ ACE_NEW_RETURN (retval,
+ be_finder (n),
+ 0);
+
+ return retval;
+}
+
AST_PortType *
be_generator::create_porttype (UTL_ScopedName *n)
{
diff --git a/modules/TAO/TAO_IDL/be/be_visitor.cpp b/modules/TAO/TAO_IDL/be/be_visitor.cpp
index 264d86a8980..1d4c7871727 100644
--- a/modules/TAO/TAO_IDL/be/be_visitor.cpp
+++ b/modules/TAO/TAO_IDL/be/be_visitor.cpp
@@ -33,7 +33,8 @@ be_visitor::~be_visitor (void)
{
}
-// all the visit methods. Concrete visitors will selectively override each one
+// All the visit methods. Concrete visitors will selectively
+// override each one.
int be_visitor::visit_decl (be_decl *)
{
return 0;
@@ -207,6 +208,12 @@ be_visitor::visit_factory (be_factory *)
}
int
+be_visitor::visit_finder (be_finder *)
+{
+ return 0;
+}
+
+int
be_visitor::visit_structure (be_structure *)
{
return 0;
diff --git a/modules/TAO/TAO_IDL/be_include/be_factory.h b/modules/TAO/TAO_IDL/be_include/be_factory.h
index 08c9b61e7ee..42f04139d67 100644
--- a/modules/TAO/TAO_IDL/be_include/be_factory.h
+++ b/modules/TAO/TAO_IDL/be_include/be_factory.h
@@ -3,7 +3,7 @@
// ============================================================================
//
// = LIBRARY
-// TAO IDL
+// TAO_IDL_BE
//
// = FILENAME
// be_factory.h
@@ -37,13 +37,10 @@ class be_factory : public virtual AST_Factory,
{
public:
be_factory (void);
- // Default constructor.
be_factory (UTL_ScopedName *n);
- // Constructor
~be_factory (void);
- // Destructor.
virtual void destroy (void);
// Cleanup method.
@@ -55,9 +52,8 @@ public:
virtual AST_Argument *be_add_argument (AST_Argument *arg);
// Narrowing
-
DEF_NARROW_FROM_DECL (be_factory);
DEF_NARROW_FROM_SCOPE (be_factory);
};
-#endif
+#endif // BE_FACTORY_H
diff --git a/modules/TAO/TAO_IDL/be_include/be_finder.h b/modules/TAO/TAO_IDL/be_include/be_finder.h
new file mode 100644
index 00000000000..5bac7aefb6b
--- /dev/null
+++ b/modules/TAO/TAO_IDL/be_include/be_finder.h
@@ -0,0 +1,46 @@
+// $Id$
+
+// ============================================================================
+//
+// = LIBRARY
+// TAO_IDL_BE
+//
+// = FILENAME
+// be_finder.h
+//
+// = DESCRIPTION
+// Extension of class AST_Finder that provides additional means for C++
+// mapping.
+//
+// = AUTHOR
+// Jeff Parsons
+//
+// ============================================================================
+
+#ifndef BE_FINDER_H
+#define BE_FINDER_H
+
+#include "be_factory.h"
+
+#include "ast_finder.h"
+
+class be_finder : public virtual AST_Finder,
+ public virtual be_factory
+{
+public:
+ be_finder (UTL_ScopedName *n);
+
+ ~be_finder (void);
+
+ virtual void destroy (void);
+ // Cleanup method.
+
+ // Visiting.
+ virtual int accept (be_visitor *visitor);
+
+ // Narrowing
+ DEF_NARROW_FROM_DECL (be_finder);
+ DEF_NARROW_FROM_SCOPE (be_finder);
+};
+
+#endif // BE_FINDER_H
diff --git a/modules/TAO/TAO_IDL/be_include/be_generator.h b/modules/TAO/TAO_IDL/be_include/be_generator.h
index 4bd349c2673..6146a363bd1 100644
--- a/modules/TAO/TAO_IDL/be_include/be_generator.h
+++ b/modules/TAO/TAO_IDL/be_include/be_generator.h
@@ -262,9 +262,12 @@ public:
// Create a node representing a native
virtual AST_Native *create_native (UTL_ScopedName *n);
- // Create a node representing a OBV factory construct
+ // Create a node representing a OBV or home factory construct
virtual AST_Factory *create_factory (UTL_ScopedName *n);
+ // Create a node representing an home finder construct.
+ virtual AST_Finder *create_finder (UTL_ScopedName *n);
+
virtual
AST_PortType *create_porttype (UTL_ScopedName *n);
diff --git a/modules/TAO/TAO_IDL/be_include/be_visitor.h b/modules/TAO/TAO_IDL/be_include/be_visitor.h
index 3348f593e7a..0ea90f0929b 100644
--- a/modules/TAO/TAO_IDL/be_include/be_visitor.h
+++ b/modules/TAO/TAO_IDL/be_include/be_visitor.h
@@ -53,6 +53,7 @@ class be_mirror_port;
class be_connector;
class be_home;
class be_factory;
+class be_finder;
class be_structure;
class be_structure_fwd;
class be_exception;
@@ -123,6 +124,7 @@ public:
virtual int visit_connector (be_connector *node);
virtual int visit_home (be_home *node);
virtual int visit_factory (be_factory *node);
+ virtual int visit_finder (be_finder *node);
virtual int visit_structure (be_structure *node);
virtual int visit_structure_fwd (be_structure_fwd *node);
virtual int visit_exception (be_exception *node);
diff --git a/modules/TAO/TAO_IDL/fe/idl.yy b/modules/TAO/TAO_IDL/fe/idl.yy
index a5a1a992f1b..78915cbdbd1 100644
--- a/modules/TAO/TAO_IDL/fe/idl.yy
+++ b/modules/TAO/TAO_IDL/fe/idl.yy
@@ -103,6 +103,7 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
#include "ast_sequence.h"
#include "ast_string.h"
#include "ast_factory.h"
+#include "ast_finder.h"
#include "ast_exception.h"
#include "ast_param_holder.h"
#include "ast_visitor_tmpl_module_inst.h"
diff --git a/modules/TAO/TAO_IDL/fe/y.tab.cpp b/modules/TAO/TAO_IDL/fe/y.tab.cpp
index 2cf4c2e05f8..085e84cd935 100644
--- a/modules/TAO/TAO_IDL/fe/y.tab.cpp
+++ b/modules/TAO/TAO_IDL/fe/y.tab.cpp
@@ -273,6 +273,7 @@
#include "ast_sequence.h"
#include "ast_string.h"
#include "ast_factory.h"
+#include "ast_finder.h"
#include "ast_exception.h"
#include "ast_param_holder.h"
#include "ast_visitor_tmpl_module_inst.h"
diff --git a/modules/TAO/TAO_IDL/include/ast_decl.h b/modules/TAO/TAO_IDL/include/ast_decl.h
index 5599d0dbbb6..8d4b887cc6e 100644
--- a/modules/TAO/TAO_IDL/include/ast_decl.h
+++ b/modules/TAO/TAO_IDL/include/ast_decl.h
@@ -152,7 +152,8 @@ public:
, NT_native // Denotes a native type
// dependent on the programming
// language
- , NT_factory // Denotes a OBV factory construct
+ , NT_factory // Denotes a OBV or home factory construct
+ , NT_finder // Denotes a home finder construct
, NT_component // Denotes a CORBA component
, NT_component_fwd // Denotes a forward declared component
, NT_home // Denotes a CORBA component home
diff --git a/modules/TAO/TAO_IDL/include/ast_factory.h b/modules/TAO/TAO_IDL/include/ast_factory.h
index f11092b7f3d..b2dc4ba295f 100644
--- a/modules/TAO/TAO_IDL/include/ast_factory.h
+++ b/modules/TAO/TAO_IDL/include/ast_factory.h
@@ -67,7 +67,8 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
#ifndef _AST_FACTORY_AST_FACTORY_HH
#define _AST_FACTORY_AST_FACTORY_HH
-// Representation of OBV factory construct declaration.
+// Representation of OBV and component home factory
+// construct declaration.
#include "ast_decl.h"
#include "utl_scope.h"
diff --git a/modules/TAO/TAO_IDL/include/ast_finder.h b/modules/TAO/TAO_IDL/include/ast_finder.h
new file mode 100644
index 00000000000..ad363897b8c
--- /dev/null
+++ b/modules/TAO/TAO_IDL/include/ast_finder.h
@@ -0,0 +1,33 @@
+// This may look like C, but it's really -*- C++ -*-
+// $Id$
+
+#ifndef TAO_IDL_AST_FINDER_H
+#define TAO_IDL_AST_FINDER_H
+
+// Representation of component home finder construct declaration.
+
+#include "ast_factory.h"
+
+class TAO_IDL_FE_Export AST_Finder : public virtual AST_Factory
+{
+public:
+
+ AST_Finder (UTL_ScopedName *n);
+
+ virtual ~AST_Finder (void);
+ // Narrowing.
+
+ DEF_NARROW_FROM_DECL(AST_Finder);
+ DEF_NARROW_FROM_SCOPE(AST_Finder);
+
+ // AST Dumping.
+ virtual void dump (ACE_OSTREAM_TYPE &o);
+
+ // Cleanup function.
+ virtual void destroy (void);
+
+ // Visiting.
+ virtual int ast_accept (ast_visitor *visitor);
+};
+
+#endif // TAO_IDL_AST_FINDER_H
diff --git a/modules/TAO/TAO_IDL/include/ast_generator.h b/modules/TAO/TAO_IDL/include/ast_generator.h
index fa342900cad..291dd6efabc 100644
--- a/modules/TAO/TAO_IDL/include/ast_generator.h
+++ b/modules/TAO/TAO_IDL/include/ast_generator.h
@@ -92,6 +92,7 @@ class AST_Template_Module;
class AST_Template_Module_Inst;
class AST_Template_Module_Ref;
class AST_Param_Holder;
+class AST_Finder;
// Defines base class for node generators.
@@ -346,9 +347,12 @@ public:
// Create a node representing a native.
virtual AST_Native *create_native (UTL_ScopedName *n);
- // Create a node representing an OBV factory construct.
+ // Create a node representing an OBV or home factory construct.
virtual AST_Factory *create_factory (UTL_ScopedName *n);
+ // Create a node representing an home finder construct.
+ virtual AST_Finder *create_finder (UTL_ScopedName *n);
+
// Create a node representing a valuebox.
virtual AST_ValueBox *create_valuebox (UTL_ScopedName *n,
AST_Type *boxed_type);
diff --git a/modules/TAO/TAO_IDL/include/ast_visitor.h b/modules/TAO/TAO_IDL/include/ast_visitor.h
index d14253e0914..8596439b7a7 100644
--- a/modules/TAO/TAO_IDL/include/ast_visitor.h
+++ b/modules/TAO/TAO_IDL/include/ast_visitor.h
@@ -50,6 +50,7 @@ class AST_EventType;
class AST_EventTypeFwd;
class AST_Home;
class AST_Factory;
+class AST_Finder;
class AST_Structure;
class AST_StructureFwd;
class AST_Exception;
@@ -118,6 +119,7 @@ public:
virtual int visit_eventtype (AST_EventType *node) = 0;
virtual int visit_eventtype_fwd (AST_EventTypeFwd *node) = 0;
virtual int visit_factory (AST_Factory *node) = 0;
+ virtual int visit_finder (AST_Finder *node) = 0;
virtual int visit_structure (AST_Structure *node) = 0;
virtual int visit_structure_fwd (AST_StructureFwd *node) = 0;
virtual int visit_exception (AST_Exception *node) = 0;
diff --git a/modules/TAO/TAO_IDL/include/ast_visitor_reifying.h b/modules/TAO/TAO_IDL/include/ast_visitor_reifying.h
index 6ff09951b00..e42f0ab981f 100644
--- a/modules/TAO/TAO_IDL/include/ast_visitor_reifying.h
+++ b/modules/TAO/TAO_IDL/include/ast_visitor_reifying.h
@@ -76,6 +76,7 @@ public:
virtual int visit_connector (AST_Connector *node);
virtual int visit_eventtype_fwd (AST_EventTypeFwd *node);
virtual int visit_factory (AST_Factory *node);
+ virtual int visit_finder (AST_Finder *node);
virtual int visit_structure (AST_Structure *node);
virtual int visit_structure_fwd (AST_StructureFwd *node);
virtual int visit_expression (AST_Expression *node);
diff --git a/modules/TAO/TAO_IDL/include/ast_visitor_tmpl_module_inst.h b/modules/TAO/TAO_IDL/include/ast_visitor_tmpl_module_inst.h
index 6218689cec0..d41952b17c1 100644
--- a/modules/TAO/TAO_IDL/include/ast_visitor_tmpl_module_inst.h
+++ b/modules/TAO/TAO_IDL/include/ast_visitor_tmpl_module_inst.h
@@ -97,6 +97,7 @@ public:
virtual int visit_structure (AST_Structure *node);
virtual int visit_field (AST_Field *node);
virtual int visit_factory (AST_Factory *node);
+ virtual int visit_finder (AST_Finder *node);
private:
// If arg is a param holder, return the matching template arg,
diff --git a/modules/TAO/TAO_IDL/narrow/narrow.cpp b/modules/TAO/TAO_IDL/narrow/narrow.cpp
index a8546e9c977..534d1360e32 100644
--- a/modules/TAO/TAO_IDL/narrow/narrow.cpp
+++ b/modules/TAO/TAO_IDL/narrow/narrow.cpp
@@ -74,6 +74,7 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
#include "ast_home.h"
#include "ast_operation.h"
#include "ast_factory.h"
+#include "ast_finder.h"
#include "ast_exception.h"
#include "ast_union.h"
#include "ast_enum.h"
@@ -85,7 +86,10 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
TAO_IDL_FE_Export AST_Decl *
ScopeAsDecl (UTL_Scope *s)
{
- if (s == 0) return 0;
+ if (s == 0)
+ {
+ return 0;
+ }
switch (s->scope_node_type ())
{
@@ -111,6 +115,8 @@ ScopeAsDecl (UTL_Scope *s)
return AST_Operation::narrow_from_scope (s);
case AST_Decl::NT_factory:
return AST_Factory::narrow_from_scope (s);
+ case AST_Decl::NT_finder:
+ return AST_Finder::narrow_from_scope (s);
case AST_Decl::NT_except:
return AST_Exception::narrow_from_scope (s);
case AST_Decl::NT_union:
@@ -130,48 +136,53 @@ ScopeAsDecl (UTL_Scope *s)
TAO_IDL_FE_Export UTL_Scope *
DeclAsScope (AST_Decl *d)
{
- if (d == 0) return 0;
-
- switch (d->node_type ())
- {
- case AST_Decl::NT_interface_fwd:
- /*
- * Resolve forward declared interface by looking at full_definition()
- * field and iterating
- */
- d = (AST_InterfaceFwd::narrow_from_decl (d))->full_definition ();
- /*
- * Fall through
- */
- case AST_Decl::NT_interface:
- return AST_Interface::narrow_from_decl (d);
- case AST_Decl::NT_valuetype:
- return AST_ValueType::narrow_from_decl (d);
- case AST_Decl::NT_eventtype:
- return AST_EventType::narrow_from_decl (d);
- case AST_Decl::NT_component:
- return AST_Component::narrow_from_decl (d);
- case AST_Decl::NT_porttype:
- return AST_PortType::narrow_from_decl (d);
- case AST_Decl::NT_home:
- return AST_Home::narrow_from_decl (d);
- case AST_Decl::NT_module:
- return AST_Module::narrow_from_decl (d);
- case AST_Decl::NT_root:
- return AST_Root::narrow_from_decl (d);
- case AST_Decl::NT_except:
- return AST_Exception::narrow_from_decl (d);
- case AST_Decl::NT_union:
- return AST_Union::narrow_from_decl (d);
- case AST_Decl::NT_struct:
- return AST_Structure::narrow_from_decl (d);
- case AST_Decl::NT_enum:
- return AST_Enum::narrow_from_decl (d);
- case AST_Decl::NT_op:
- return AST_Operation::narrow_from_decl (d);
- case AST_Decl::NT_factory:
- return AST_Factory::narrow_from_decl (d);
- default:
- return 0;
- }
+ if (d == 0)
+ {
+ return 0;
+ }
+
+ switch (d->node_type ())
+ {
+ case AST_Decl::NT_interface_fwd:
+ /*
+ * Resolve forward declared interface by looking at full_definition()
+ * field and iterating
+ */
+ d = (AST_InterfaceFwd::narrow_from_decl (d))->full_definition ();
+ /*
+ * Fall through
+ */
+ case AST_Decl::NT_interface:
+ return AST_Interface::narrow_from_decl (d);
+ case AST_Decl::NT_valuetype:
+ return AST_ValueType::narrow_from_decl (d);
+ case AST_Decl::NT_eventtype:
+ return AST_EventType::narrow_from_decl (d);
+ case AST_Decl::NT_component:
+ return AST_Component::narrow_from_decl (d);
+ case AST_Decl::NT_porttype:
+ return AST_PortType::narrow_from_decl (d);
+ case AST_Decl::NT_home:
+ return AST_Home::narrow_from_decl (d);
+ case AST_Decl::NT_module:
+ return AST_Module::narrow_from_decl (d);
+ case AST_Decl::NT_root:
+ return AST_Root::narrow_from_decl (d);
+ case AST_Decl::NT_except:
+ return AST_Exception::narrow_from_decl (d);
+ case AST_Decl::NT_union:
+ return AST_Union::narrow_from_decl (d);
+ case AST_Decl::NT_struct:
+ return AST_Structure::narrow_from_decl (d);
+ case AST_Decl::NT_enum:
+ return AST_Enum::narrow_from_decl (d);
+ case AST_Decl::NT_op:
+ return AST_Operation::narrow_from_decl (d);
+ case AST_Decl::NT_factory:
+ return AST_Factory::narrow_from_decl (d);
+ case AST_Decl::NT_finder:
+ return AST_Finder::narrow_from_decl (d);
+ default:
+ return 0;
+ }
}
diff --git a/modules/TAO/orbsvcs/IFR_Service/ifr_adding_visitor.cpp b/modules/TAO/orbsvcs/IFR_Service/ifr_adding_visitor.cpp
index 4dadcf226da..e8e9d680ce3 100644
--- a/modules/TAO/orbsvcs/IFR_Service/ifr_adding_visitor.cpp
+++ b/modules/TAO/orbsvcs/IFR_Service/ifr_adding_visitor.cpp
@@ -52,16 +52,13 @@
#include "ace/Vector_T.h"
-ACE_RCSID (IFR_Service,
- ifr_adding_visitor,
- "$Id$")
-
-ifr_adding_visitor::ifr_adding_visitor (AST_Decl *scope,
- bool in_reopened,
- bool allow_duplicate_typedefs)
+ifr_adding_visitor::ifr_adding_visitor (
+ AST_Decl *scope,
+ bool in_reopened,
+ bool allow_duplicate_typedefs)
: scope_ (scope),
- in_reopened_ (in_reopened),
- allow_duplicate_typedefs_ (allow_duplicate_typedefs)
+ in_reopened_ (in_reopened),
+ allow_duplicate_typedefs_ (allow_duplicate_typedefs)
{
}
diff --git a/modules/TAO/orbsvcs/IFR_Service/ifr_visitor.cpp b/modules/TAO/orbsvcs/IFR_Service/ifr_visitor.cpp
index 6f3d13703a7..88ae3352b3b 100644
--- a/modules/TAO/orbsvcs/IFR_Service/ifr_visitor.cpp
+++ b/modules/TAO/orbsvcs/IFR_Service/ifr_visitor.cpp
@@ -198,6 +198,12 @@ ifr_visitor::visit_factory (AST_Factory *)
}
int
+ifr_visitor::visit_finder (AST_Finder *)
+{
+ return 0;
+}
+
+int
ifr_visitor::visit_structure (AST_Structure *)
{
return 0;
@@ -323,6 +329,12 @@ ifr_visitor::visit_native (AST_Native *)
return 0;
}
+int
+ifr_visitor::visit_param_holder (AST_Param_Holder *)
+{
+ return 0;
+}
+
ACE_Lock &
ifr_visitor::lock (void) const
{
diff --git a/modules/TAO/orbsvcs/IFR_Service/ifr_visitor.h b/modules/TAO/orbsvcs/IFR_Service/ifr_visitor.h
index fd265c5028d..a280bd84101 100644
--- a/modules/TAO/orbsvcs/IFR_Service/ifr_visitor.h
+++ b/modules/TAO/orbsvcs/IFR_Service/ifr_visitor.h
@@ -70,6 +70,7 @@ public:
virtual int visit_eventtype_fwd (AST_EventTypeFwd *node);
virtual int visit_home (AST_Home *node);
virtual int visit_factory (AST_Factory *node);
+ virtual int visit_finder (AST_Finder *node);
virtual int visit_structure (AST_Structure *node);
virtual int visit_structure_fwd (AST_StructureFwd *node);
virtual int visit_exception (AST_Exception *node);
@@ -91,6 +92,7 @@ public:
virtual int visit_typedef (AST_Typedef *node);
virtual int visit_root (AST_Root *node);
virtual int visit_native (AST_Native *node);
+ virtual int visit_param_holder (AST_Param_Holder *node);
ACE_Lock &lock (void) const;
// Accessor for our lock.