diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2009-08-21 13:38:43 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2009-08-21 13:38:43 +0000 |
commit | 11a56e853d17ed36770e869c463995a03475f120 (patch) | |
tree | e36d926de031aee2450bd16c8b55fee834644a31 | |
parent | 24d952ab91c8c6365f3164849e9d5e41607d7e21 (diff) | |
download | ATCD-11a56e853d17ed36770e869c463995a03475f120.tar.gz |
ChangeLogTag: Fri Aug 21 13:27:50 UTC 2009 Jeff Parsons <j.parsons@vanderbilt.edu>
35 files changed, 789 insertions, 276 deletions
diff --git a/modules/TAO/ChangeLog b/modules/TAO/ChangeLog index 4096c2d3c06..ffc0e531f21 100644 --- a/modules/TAO/ChangeLog +++ b/modules/TAO/ChangeLog @@ -1,3 +1,49 @@ +Fri Aug 21 13:27:50 UTC 2009 Jeff Parsons <j.parsons@vanderbilt.edu> + + * TAO_IDL/ast/ast_instantiated_interface.cpp: + * TAO_IDL/include/ast_instantiated_connector.h: + * TAO_IDL/be/be_instantiated_connector.cpp: + * TAO_IDL/be_include/be_instantiated_connector.h: + + New files, defining a node type for the template + instantiation of a connector type, which is part + of a typedef construct. + + * TAO_IDL/ast/ast_connector.cpp: + * TAO_IDL/ast/ast_extended_port.cpp: + * TAO_IDL/ast/ast_generator.cpp: + * TAO_IDL/ast/ast_instantiated_connector.cpp: + * TAO_IDL/ast/ast_mirror_port.cpp: + * TAO_IDL/ast/ast_module.cpp: + * TAO_IDL/ast/ast_porttype.cpp: + * TAO_IDL/ast/ast_template_common.cpp: + * TAO_IDL/ast/ast_template_interface.cpp: + * TAO_IDL/be/be_connector.cpp: + * TAO_IDL/be/be_generator.cpp: + * TAO_IDL/be/be_instantiated_interface.cpp: + * TAO_IDL/be/be_porttype.cpp: + * TAO_IDL/be/be_template_interface.cpp: + * TAO_IDL/be/be_visitor.cpp: + * TAO_IDL/be_include/be_generator.h: + * TAO_IDL/be_include/be_instantiated_interface.h: + * TAO_IDL/be_include/be_visitor.h: + * TAO_IDL/fe/idl.yy: + * TAO_IDL/include/ast_connector.h: + * TAO_IDL/include/ast_extended_port.h: + * TAO_IDL/include/ast_generator.h: + * TAO_IDL/include/ast_instantiated_interface.h: + * TAO_IDL/include/ast_mirror_port.h: + * TAO_IDL/include/ast_module.h: + * TAO_IDL/include/ast_porttype.h: + * TAO_IDL/include/ast_template_common.h: + * TAO_IDL/include/ast_visitor.h: + * TAO_IDL/include/utl_scope.h: + * TAO_IDL/util/utl_scope.cpp: + + Changes associated with the new node types above and + with the semantic action that creates an instantiated + connector. + Thu Aug 20 17:27:16 UTC 2009 Jeff Parsons <j.parsons@vanderbilt.edu> * TAO_IDL/fe/idl.yy: diff --git a/modules/TAO/TAO_IDL/ast/ast_connector.cpp b/modules/TAO/TAO_IDL/ast/ast_connector.cpp index 8d297fa5e87..36383f8217f 100644 --- a/modules/TAO/TAO_IDL/ast/ast_connector.cpp +++ b/modules/TAO/TAO_IDL/ast/ast_connector.cpp @@ -36,7 +36,9 @@ AST_Connector::AST_Connector ( 0, 0, 0), - template_params_ (template_params) + AST_Template_Common (AST_Decl::NT_connector, + n, + template_params) { } diff --git a/modules/TAO/TAO_IDL/ast/ast_extended_port.cpp b/modules/TAO/TAO_IDL/ast/ast_extended_port.cpp index ff09904bfb1..8266386dfe8 100644 --- a/modules/TAO/TAO_IDL/ast/ast_extended_port.cpp +++ b/modules/TAO/TAO_IDL/ast/ast_extended_port.cpp @@ -14,7 +14,7 @@ ACE_RCSID (ast, AST_Extended_Port::AST_Extended_Port ( UTL_ScopedName *n, AST_PortType *porttype_ref, - AST_PortType::T_ARGLIST *template_args) + AST_Template_Common::T_ARGLIST *template_args) : COMMON_Base (false, false), AST_Decl (AST_Decl::NT_ext_port, @@ -36,7 +36,7 @@ AST_Extended_Port::port_type (void) const return AST_PortType::narrow_from_decl (this->field_type ()); } -AST_PortType::T_ARGLIST * +AST_Template_Common::T_ARGLIST * AST_Extended_Port::template_args (void) const { return this->template_args_; diff --git a/modules/TAO/TAO_IDL/ast/ast_generator.cpp b/modules/TAO/TAO_IDL/ast/ast_generator.cpp index 989b520ee6e..ae6adc9a602 100644 --- a/modules/TAO/TAO_IDL/ast/ast_generator.cpp +++ b/modules/TAO/TAO_IDL/ast/ast_generator.cpp @@ -83,6 +83,7 @@ trademarks or registered trademarks of Sun Microsystems, Inc. #include "ast_instantiated_interface.h" #include "ast_mirror_port.h" #include "ast_connector.h" +#include "ast_instantiated_connector.h" #include "ast_tmpl_mirror_port.h" #include "ast_provides.h" #include "ast_uses.h" @@ -957,7 +958,7 @@ AST_Instantiated_Interface * AST_Generator::create_instantiated_interface ( UTL_ScopedName *n, AST_Template_Interface *template_ref, - UTL_NameList *template_args) + AST_Template_Common::T_ARGLIST *template_args) { AST_Instantiated_Interface *retval = 0; ACE_NEW_RETURN (retval, @@ -1123,3 +1124,19 @@ AST_Generator::create_tmpl_mirror_port (UTL_ScopedName *n, return retval; } +AST_Instantiated_Connector * +AST_Generator::create_instantiated_connector ( + UTL_ScopedName *n, + AST_Connector *connector_type, + AST_Template_Common::T_ARGLIST *template_args) +{ + AST_Instantiated_Connector *retval = 0; + ACE_NEW_RETURN (retval, + AST_Instantiated_Connector (n, + connector_type, + template_args), + 0); + + return retval; +} + diff --git a/modules/TAO/TAO_IDL/ast/ast_instantiated_connector.cpp b/modules/TAO/TAO_IDL/ast/ast_instantiated_connector.cpp new file mode 100644 index 00000000000..dd81e4030f6 --- /dev/null +++ b/modules/TAO/TAO_IDL/ast/ast_instantiated_connector.cpp @@ -0,0 +1,74 @@ +// $Id$ + +#include "ast_instantiated_connector.h" +#include "ast_visitor.h" + +#include "utl_identifier.h" +#include "utl_indenter.h" +#include "utl_namelist.h" +#include "global_extern.h" + +ACE_RCSID (ast, + ast_instantiated_connector, + "$Id$") + +AST_Instantiated_Connector::AST_Instantiated_Connector ( + UTL_ScopedName *n, + AST_Connector *connector_type, + AST_Template_Common::T_ARGLIST *template_args) + : COMMON_Base (false, + false), + AST_Decl (AST_Decl::NT_connector, + n), + AST_Type (AST_Decl::NT_connector, + n), + AST_ConcreteType (AST_Decl::NT_connector, + n), + UTL_Scope (AST_Decl::NT_connector), + connector_type_ (connector_type), + template_args_ (template_args) +{ +} + +AST_Instantiated_Connector::~AST_Instantiated_Connector (void) +{ +} + +void +AST_Instantiated_Connector::destroy (void) +{ + delete this->template_args_; + this->template_args_ = 0; + + this->AST_ConcreteType::destroy (); + this->UTL_Scope::destroy (); +} + +void +AST_Instantiated_Connector::dump (ACE_OSTREAM_TYPE &o) +{ + this->dump_i (o, "connector "); + + this->local_name ()->dump (o); + this->dump_i (o, "<"); + unsigned long index = 0UL; + + // TODO - template args + + this->dump_i (o, " {\n"); + + UTL_Scope::dump (o); + idl_global->indent ()->skip_to (o); + + this->dump_i (o, "}\n"); +} + +int +AST_Instantiated_Connector::ast_accept (ast_visitor *visitor) +{ + return visitor->visit_instantiated_connector (this); +} + +IMPL_NARROW_FROM_DECL (AST_Instantiated_Connector) +IMPL_NARROW_FROM_SCOPE (AST_Instantiated_Connector) + diff --git a/modules/TAO/TAO_IDL/ast/ast_instantiated_interface.cpp b/modules/TAO/TAO_IDL/ast/ast_instantiated_interface.cpp index a7f97b8e5e6..e9ebc782414 100644 --- a/modules/TAO/TAO_IDL/ast/ast_instantiated_interface.cpp +++ b/modules/TAO/TAO_IDL/ast/ast_instantiated_interface.cpp @@ -15,7 +15,7 @@ ACE_RCSID (ast, AST_Instantiated_Interface::AST_Instantiated_Interface ( UTL_ScopedName *n, AST_Template_Interface *template_ref, - UTL_NameList *template_args) + AST_Template_Common::T_ARGLIST *template_args) : COMMON_Base (false, false), AST_Decl (AST_Decl::NT_interface, @@ -42,7 +42,6 @@ AST_Instantiated_Interface::~AST_Instantiated_Interface (void) void AST_Instantiated_Interface::destroy (void) { - this->template_args_->destroy (); delete this->template_args_; this->template_args_ = 0; diff --git a/modules/TAO/TAO_IDL/ast/ast_mirror_port.cpp b/modules/TAO/TAO_IDL/ast/ast_mirror_port.cpp index 8437cab0f03..813407fb99f 100644 --- a/modules/TAO/TAO_IDL/ast/ast_mirror_port.cpp +++ b/modules/TAO/TAO_IDL/ast/ast_mirror_port.cpp @@ -15,7 +15,7 @@ ACE_RCSID (ast, AST_Mirror_Port::AST_Mirror_Port ( UTL_ScopedName *n, AST_PortType *porttype_ref, - AST_PortType::T_ARGLIST *template_args) + AST_Template_Common::T_ARGLIST *template_args) : COMMON_Base (false, false), AST_Decl (AST_Decl::NT_mirror_port, diff --git a/modules/TAO/TAO_IDL/ast/ast_module.cpp b/modules/TAO/TAO_IDL/ast/ast_module.cpp index 7b75e56c5c9..f7b11b69cfd 100644 --- a/modules/TAO/TAO_IDL/ast/ast_module.cpp +++ b/modules/TAO/TAO_IDL/ast/ast_module.cpp @@ -79,6 +79,7 @@ trademarks or registered trademarks of Sun Microsystems, Inc. #include "ast_component_fwd.h" #include "ast_porttype.h" #include "ast_connector.h" +#include "ast_instantiated_connector.h" #include "ast_home.h" #include "ast_constant.h" #include "ast_exception.h" @@ -1768,6 +1769,45 @@ AST_Module::fe_add_porttype (AST_PortType *pt) return pt; } +AST_Instantiated_Connector * +AST_Module::fe_add_instantiated_connector ( + AST_Instantiated_Connector *ic) +{ + AST_Decl *d = 0; + + // Already defined? Or already used? + if ((d = this->lookup_for_add (ic, false)) != 0) + { + if (!can_be_redefined (d)) + { + idl_global->err ()->error3 (UTL_Error::EIDL_REDEF, + ic, + this, + d); + return 0; + } + + if (this->referenced (d, ic->local_name ())) + { + idl_global->err ()->error3 (UTL_Error::EIDL_DEF_USE, + ic, + this, + d); + return 0; + } + } + + // Add it to scope. + this->add_to_scope (ic); + + // Add it to set of locally referenced symbols. + this->add_to_referenced (ic, + false, + ic->local_name ()); + + return ic; +} + // Dump this AST_Module node to the ostream o. void AST_Module::dump (ACE_OSTREAM_TYPE &o) diff --git a/modules/TAO/TAO_IDL/ast/ast_porttype.cpp b/modules/TAO/TAO_IDL/ast/ast_porttype.cpp index af894f6ca02..9793e5e24c7 100644 --- a/modules/TAO/TAO_IDL/ast/ast_porttype.cpp +++ b/modules/TAO/TAO_IDL/ast/ast_porttype.cpp @@ -6,13 +6,8 @@ #include "ast_publishes.h" #include "ast_emits.h" #include "ast_consumes.h" -#include "ast_constant.h" #include "ast_visitor.h" -#include "utl_identifier.h" -#include "utl_namelist.h" -#include "utl_strlist.h" -#include "utl_string.h" #include "utl_err.h" #include "utl_indenter.h" #include "global_extern.h" @@ -31,7 +26,9 @@ AST_PortType::AST_PortType ( AST_Type (AST_Decl::NT_porttype, n), UTL_Scope (AST_Decl::NT_porttype), - AST_Template_Common (template_params) + AST_Template_Common (AST_Decl::NT_porttype, + n, + template_params) { } @@ -57,103 +54,6 @@ AST_PortType::ast_accept (ast_visitor *visitor) return visitor->visit_porttype (this); } -AST_PortType::T_ARGLIST * -AST_PortType::match_arg_names (UTL_NameList *arg_names) -{ - size_t names_len = static_cast<size_t> (arg_names->length ()); - - if (names_len != this->template_params_->size ()) - { - idl_global->err ()->error1 (UTL_Error::EIDL_T_ARG_LENGTH, - this); - return 0; - } - - size_t slot = 0UL; - bool good = true; - T_ARGLIST *retval = 0; - ACE_NEW_RETURN (retval, - T_ARGLIST, - 0); - - for (UTL_NamelistActiveIterator iter (arg_names); - !iter.is_done (); - iter.next (), ++slot) - { - UTL_ScopedName *name = iter.item (); - - AST_Decl *d = this->lookup_by_name (name, true); - - if (d == 0) - { - idl_global->err ()->lookup_error (name); - good = false; - break; - } - else if (d->node_type () == AST_Decl::NT_typedef) - { - AST_Typedef *td = - AST_Typedef::narrow_from_decl (d); - - d = td->primitive_base_type (); - } - - FE_Utils::T_Param_Info *param = 0; - (void) this->template_params_->get (param, slot); - - if (! this->match_param_type (param->type_, d)) - { - idl_global->err ()->mismatched_template_param (d->name ()); - good = false; - break; - } - - retval->enqueue_tail (d); - } - - if (! good) - { - delete retval; - retval = 0; - } - - return retval; -} - -bool -AST_PortType::match_params (UTL_StrList *param_names) -{ - size_t names_len = static_cast<size_t> (param_names->length ()); - - if (names_len != this->template_params_->size ()) - { - idl_global->err ()->error1 (UTL_Error::EIDL_T_ARG_LENGTH, - this); - return false; - } - - size_t slot = 0UL; - - for (UTL_StrlistActiveIterator i (param_names); - !i.is_done (); - i.next (), ++slot) - { - UTL_String *s = i.item (); - - FE_Utils::T_Param_Info *param = 0; - (void) this->template_params_->get (param, slot); - - if (param->name_ != s->get_string ()) - { - idl_global->err ()->mismatched_template_param (this->name ()); - - return false; - } - } - - return true; -} - AST_Provides * AST_PortType::fe_add_provides (AST_Provides *p) { @@ -344,68 +244,6 @@ AST_PortType::fe_add_consumes (AST_Consumes *c) return c; } -bool -AST_PortType::match_param_type (AST_Decl::NodeType my_type, - AST_Decl *d) -{ - if (my_type == AST_Decl::NT_type) - { - return true; - } - - AST_Decl::NodeType other_type = d->node_type (); - - if (other_type == AST_Decl::NT_field) - { - other_type = - AST_Field::narrow_from_decl (d)->field_type ()->node_type (); - } - - if (other_type == AST_Decl::NT_const) - { - AST_Constant *c = - AST_Constant::narrow_from_decl (d); - - switch (c->et ()) - { - case AST_Expression::EV_enum: - other_type = AST_Decl::NT_enum; - break; - case AST_Expression::EV_string: - other_type = AST_Decl::NT_string; - break; - case AST_Expression::EV_wstring: - other_type = AST_Decl::NT_wstring; - break; - case AST_Expression::EV_any: - case AST_Expression::EV_object: - return false; - default: - other_type = AST_Decl::NT_pre_defined; - break; - } - } - - // Mapping 'primitive' keyword to NT_pre_defined isn't - // clearly correct - need to raise an issue about what the - // keyword means. - switch (my_type) - { - case AST_Decl::NT_pre_defined: - switch (other_type) - { - case AST_Decl::NT_string: - case AST_Decl::NT_wstring: - case AST_Decl::NT_pre_defined: - return true; - default: - return false; - } - default: - return my_type == other_type; - } -} - IMPL_NARROW_FROM_DECL (AST_PortType) IMPL_NARROW_FROM_SCOPE (AST_PortType) diff --git a/modules/TAO/TAO_IDL/ast/ast_template_common.cpp b/modules/TAO/TAO_IDL/ast/ast_template_common.cpp index 0b9bc0ecb04..77998dffd59 100644 --- a/modules/TAO/TAO_IDL/ast/ast_template_common.cpp +++ b/modules/TAO/TAO_IDL/ast/ast_template_common.cpp @@ -1,14 +1,28 @@ // $Id$ #include "ast_template_common.h" +#include "ast_field.h" +#include "ast_constant.h" + +#include "utl_identifier.h" +#include "utl_namelist.h" +#include "utl_strlist.h" +#include "utl_string.h" +#include "utl_err.h" +#include "global_extern.h" ACE_RCSID (ast, ast_template_common, "$Id$") AST_Template_Common::AST_Template_Common ( + AST_Decl::NodeType nt, + UTL_ScopedName *n, FE_Utils::T_PARAMLIST_INFO *template_params) - : template_params_ (template_params) + : AST_Decl (nt, + n), + UTL_Scope (nt), + template_params_ (template_params) { } @@ -29,3 +43,162 @@ AST_Template_Common::destroy (void) this->template_params_ = 0; } +AST_Template_Common::T_ARGLIST * +AST_Template_Common::match_arg_names (UTL_NameList *arg_names) +{ + size_t names_len = static_cast<size_t> (arg_names->length ()); + + if (names_len != this->template_params_->size ()) + { + idl_global->err ()->error1 (UTL_Error::EIDL_T_ARG_LENGTH, + this); + return 0; + } + + size_t slot = 0UL; + bool good = true; + T_ARGLIST *retval = 0; + ACE_NEW_RETURN (retval, + T_ARGLIST, + 0); + + for (UTL_NamelistActiveIterator iter (arg_names); + !iter.is_done (); + iter.next (), ++slot) + { + UTL_ScopedName *name = iter.item (); + + AST_Decl *d = this->lookup_by_name (name, true); + + if (d == 0) + { + idl_global->err ()->lookup_error (name); + good = false; + break; + } + else if (d->node_type () == AST_Decl::NT_typedef) + { + AST_Typedef *td = + AST_Typedef::narrow_from_decl (d); + + d = td->primitive_base_type (); + } + + FE_Utils::T_Param_Info *param = 0; + (void) this->template_params_->get (param, slot); + + if (! this->match_param_type (param->type_, d)) + { + idl_global->err ()->mismatched_template_param (d->name ()); + good = false; + break; + } + + retval->enqueue_tail (d); + } + + if (! good) + { + delete retval; + retval = 0; + } + + return retval; +} + +bool +AST_Template_Common::match_params (UTL_StrList *param_names) +{ + size_t names_len = static_cast<size_t> (param_names->length ()); + + if (names_len != this->template_params_->size ()) + { + idl_global->err ()->error1 (UTL_Error::EIDL_T_ARG_LENGTH, + this); + return false; + } + + size_t slot = 0UL; + + for (UTL_StrlistActiveIterator i (param_names); + !i.is_done (); + i.next (), ++slot) + { + UTL_String *s = i.item (); + + FE_Utils::T_Param_Info *param = 0; + (void) this->template_params_->get (param, slot); + + if (param->name_ != s->get_string ()) + { + idl_global->err ()->mismatched_template_param (this->name ()); + + return false; + } + } + + return true; +} + +bool +AST_Template_Common::match_param_type (AST_Decl::NodeType my_type, + AST_Decl *d) +{ + if (my_type == AST_Decl::NT_type) + { + return true; + } + + AST_Decl::NodeType other_type = d->node_type (); + + if (other_type == AST_Decl::NT_field) + { + other_type = + AST_Field::narrow_from_decl (d)->field_type ()->node_type (); + } + + if (other_type == AST_Decl::NT_const) + { + AST_Constant *c = + AST_Constant::narrow_from_decl (d); + + switch (c->et ()) + { + case AST_Expression::EV_enum: + other_type = AST_Decl::NT_enum; + break; + case AST_Expression::EV_string: + other_type = AST_Decl::NT_string; + break; + case AST_Expression::EV_wstring: + other_type = AST_Decl::NT_wstring; + break; + case AST_Expression::EV_any: + case AST_Expression::EV_object: + return false; + default: + other_type = AST_Decl::NT_pre_defined; + break; + } + } + + // Mapping 'primitive' keyword to NT_pre_defined isn't + // clearly correct - need to raise an issue about what the + // keyword means. + switch (my_type) + { + case AST_Decl::NT_pre_defined: + switch (other_type) + { + case AST_Decl::NT_string: + case AST_Decl::NT_wstring: + case AST_Decl::NT_pre_defined: + return true; + default: + return false; + } + default: + return my_type == other_type; + } +} + diff --git a/modules/TAO/TAO_IDL/ast/ast_template_interface.cpp b/modules/TAO/TAO_IDL/ast/ast_template_interface.cpp index 826a35c637d..693b416837a 100644 --- a/modules/TAO/TAO_IDL/ast/ast_template_interface.cpp +++ b/modules/TAO/TAO_IDL/ast/ast_template_interface.cpp @@ -35,7 +35,9 @@ AST_Template_Interface::AST_Template_Interface ( nih_flat, false, false), - AST_Template_Common (template_params) + AST_Template_Common (AST_Decl::NT_interface, + n, + template_params) { } diff --git a/modules/TAO/TAO_IDL/be/be_connector.cpp b/modules/TAO/TAO_IDL/be/be_connector.cpp index 544de0bc68c..109a4bf7bbf 100644 --- a/modules/TAO/TAO_IDL/be/be_connector.cpp +++ b/modules/TAO/TAO_IDL/be/be_connector.cpp @@ -31,6 +31,9 @@ be_connector::be_connector ( 0, 0, 0), + AST_Template_Common (AST_Decl::NT_connector, + n, + template_params), AST_Connector (n, base_connector, template_params), diff --git a/modules/TAO/TAO_IDL/be/be_generator.cpp b/modules/TAO/TAO_IDL/be/be_generator.cpp index 2e2fa13ed36..73cb99e10d0 100644 --- a/modules/TAO/TAO_IDL/be/be_generator.cpp +++ b/modules/TAO/TAO_IDL/be/be_generator.cpp @@ -86,6 +86,7 @@ trademarks or registered trademarks of Sun Microsystems, Inc. #include "be_porttype.h" #include "be_mirror_port.h" #include "be_connector.h" +#include "be_instantiated_connector.h" #include "be_tmpl_port.h" #include "be_tmpl_mirror_port.h" #include "be_provides.h" @@ -950,7 +951,7 @@ AST_Instantiated_Interface * be_generator::create_instantiated_interface ( UTL_ScopedName *n, AST_Template_Interface *template_ref, - UTL_NameList *template_args) + AST_Template_Common::T_ARGLIST *template_args) { be_instantiated_interface *retval = 0; ACE_NEW_RETURN (retval, @@ -1116,4 +1117,20 @@ be_generator::create_tmpl_mirror_port (UTL_ScopedName *n, return retval; } +AST_Instantiated_Connector * +be_generator::create_instantiated_connector ( + UTL_ScopedName *n, + AST_Connector *connector_type, + AST_Template_Common::T_ARGLIST *template_args) +{ + be_instantiated_connector *retval = 0; + ACE_NEW_RETURN (retval, + be_instantiated_connector (n, + connector_type, + template_args), + 0); + + return retval; +} + diff --git a/modules/TAO/TAO_IDL/be/be_instantiated_connector.cpp b/modules/TAO/TAO_IDL/be/be_instantiated_connector.cpp new file mode 100644 index 00000000000..0255bea9791 --- /dev/null +++ b/modules/TAO/TAO_IDL/be/be_instantiated_connector.cpp @@ -0,0 +1,45 @@ +// $Id$ + +#include "be_instantiated_connector.h" +#include "be_visitor.h" + +be_instantiated_connector::be_instantiated_connector ( + UTL_ScopedName *n, + AST_Connector *connector_type, + AST_Template_Common::T_ARGLIST *template_args) + : COMMON_Base (false, + false), + AST_Decl (AST_Decl::NT_connector, + n), + AST_Type (AST_Decl::NT_connector, + n), + AST_ConcreteType (AST_Decl::NT_connector, + n), + UTL_Scope (AST_Decl::NT_interface), + AST_Instantiated_Connector (n, + connector_type, + template_args), + be_scope (AST_Decl::NT_connector) +{ +} + +be_instantiated_connector::~be_instantiated_connector (void) +{ +} + +void +be_instantiated_connector::destroy (void) +{ + this->AST_Instantiated_Connector::destroy (); + this->be_scope::destroy (); +} + +int +be_instantiated_connector::accept (be_visitor *visitor) +{ + return visitor->visit_instantiated_connector (this); +} + +IMPL_NARROW_FROM_DECL (be_instantiated_connector) +IMPL_NARROW_FROM_SCOPE (be_instantiated_connector) + diff --git a/modules/TAO/TAO_IDL/be/be_instantiated_interface.cpp b/modules/TAO/TAO_IDL/be/be_instantiated_interface.cpp index c4a94e7176c..eacbaf9488d 100644 --- a/modules/TAO/TAO_IDL/be/be_instantiated_interface.cpp +++ b/modules/TAO/TAO_IDL/be/be_instantiated_interface.cpp @@ -10,7 +10,7 @@ ACE_RCSID (be, be_instantiated_interface::be_instantiated_interface ( UTL_ScopedName *n, AST_Template_Interface *template_ref, - UTL_NameList *template_args) + AST_Template_Common::T_ARGLIST *template_args) : COMMON_Base (false, false), AST_Decl (AST_Decl::NT_interface, diff --git a/modules/TAO/TAO_IDL/be/be_porttype.cpp b/modules/TAO/TAO_IDL/be/be_porttype.cpp index cf333dfb668..0496f4e5f79 100644 --- a/modules/TAO/TAO_IDL/be/be_porttype.cpp +++ b/modules/TAO/TAO_IDL/be/be_porttype.cpp @@ -15,7 +15,9 @@ be_porttype::be_porttype ( AST_Decl (AST_Decl::NT_porttype, n), UTL_Scope (AST_Decl::NT_porttype), - AST_Template_Common (template_params), + AST_Template_Common (AST_Decl::NT_porttype, + n, + template_params), AST_PortType (n, template_params), be_scope (AST_Decl::NT_porttype), diff --git a/modules/TAO/TAO_IDL/be/be_template_interface.cpp b/modules/TAO/TAO_IDL/be/be_template_interface.cpp index ef320916bf4..a4daad8e87f 100644 --- a/modules/TAO/TAO_IDL/be/be_template_interface.cpp +++ b/modules/TAO/TAO_IDL/be/be_template_interface.cpp @@ -28,7 +28,9 @@ be_template_interface::be_template_interface ( nih_flat, false, false), - AST_Template_Common (template_params), + AST_Template_Common (AST_Decl::NT_porttype, + n, + template_params), AST_Template_Interface (n, ih, nih, diff --git a/modules/TAO/TAO_IDL/be/be_visitor.cpp b/modules/TAO/TAO_IDL/be/be_visitor.cpp index a1231a66c3f..e2ad55b0625 100644 --- a/modules/TAO/TAO_IDL/be/be_visitor.cpp +++ b/modules/TAO/TAO_IDL/be/be_visitor.cpp @@ -187,6 +187,13 @@ be_visitor::visit_connector (be_connector *) } int +be_visitor::visit_instantiated_connector ( + be_instantiated_connector *) +{ + return 0; +} + +int be_visitor::visit_tmpl_port (be_tmpl_port *) { return 0; diff --git a/modules/TAO/TAO_IDL/be_include/be_generator.h b/modules/TAO/TAO_IDL/be_include/be_generator.h index 8a651263b3d..17084612482 100644 --- a/modules/TAO/TAO_IDL/be_include/be_generator.h +++ b/modules/TAO/TAO_IDL/be_include/be_generator.h @@ -278,7 +278,7 @@ public: AST_Instantiated_Interface *create_instantiated_interface ( UTL_ScopedName *n, AST_Template_Interface *template_ref, - UTL_NameList *template_args); + AST_Template_Common::T_ARGLIST *template_args); virtual AST_PortType *create_porttype ( @@ -332,6 +332,12 @@ public: AST_Tmpl_Mirror_Port *create_tmpl_mirror_port ( UTL_ScopedName *n, AST_PortType *porttype_ref); + + virtual + AST_Instantiated_Connector *create_instantiated_connector ( + UTL_ScopedName *n, + AST_Connector *connector_type, + AST_Template_Common::T_ARGLIST *template_args); }; #endif // _BE_GENERATOR_BE_GENERATOR_HH diff --git a/modules/TAO/TAO_IDL/be_include/be_instantiated_connector.h b/modules/TAO/TAO_IDL/be_include/be_instantiated_connector.h new file mode 100644 index 00000000000..f3c1ceace5b --- /dev/null +++ b/modules/TAO/TAO_IDL/be_include/be_instantiated_connector.h @@ -0,0 +1,36 @@ +// -*- C++ -*- +// $Id$ + +#ifndef BE_INSTANTIATED_CONNECTOR_H +#define BE_INSTANTIATED_CONNECTOR_H + +#include "ast_instantiated_connector.h" + +#include "be_scope.h" + +class be_instantiated_connector + : public virtual AST_Instantiated_Connector, + public virtual be_scope +{ +public: + be_instantiated_connector ( + UTL_ScopedName *n, + AST_Connector *connector_type, + AST_Template_Common::T_ARGLIST *template_args); + + virtual ~be_instantiated_connector (void); + + // Cleanup function. + virtual void destroy (void); + + // Narrowing. + + DEF_NARROW_FROM_DECL (be_instantiated_connector); + DEF_NARROW_FROM_SCOPE (be_instantiated_connector); + + // Visiting. + virtual int accept (be_visitor *visitor); +}; + +#endif /* BE_INSTANTIATED_CONNECTOR_H */ + diff --git a/modules/TAO/TAO_IDL/be_include/be_instantiated_interface.h b/modules/TAO/TAO_IDL/be_include/be_instantiated_interface.h index 2ac4f2d71d5..cb9f8806d82 100644 --- a/modules/TAO/TAO_IDL/be_include/be_instantiated_interface.h +++ b/modules/TAO/TAO_IDL/be_include/be_instantiated_interface.h @@ -15,7 +15,7 @@ public: be_instantiated_interface ( UTL_ScopedName *n, AST_Template_Interface *template_ref, - UTL_NameList *template_args); + AST_Template_Common::T_ARGLIST *template_args); virtual ~be_instantiated_interface (void); diff --git a/modules/TAO/TAO_IDL/be_include/be_visitor.h b/modules/TAO/TAO_IDL/be_include/be_visitor.h index 8b91ae73373..36cdc2251bf 100644 --- a/modules/TAO/TAO_IDL/be_include/be_visitor.h +++ b/modules/TAO/TAO_IDL/be_include/be_visitor.h @@ -52,6 +52,7 @@ class be_mirror_port; class be_connector; class be_tmpl_port; class be_tmpl_mirror_port; +class be_instantiated_connector; class be_home; class be_factory; class be_structure; @@ -121,6 +122,8 @@ public: virtual int visit_extended_port (be_extended_port *node); virtual int visit_mirror_port (be_mirror_port *node); virtual int visit_connector (be_connector *node); + virtual int visit_instantiated_connector ( + be_instantiated_connector *node); virtual int visit_tmpl_port (be_tmpl_port *node); virtual int visit_tmpl_mirror_port (be_tmpl_mirror_port *node); virtual int visit_home (be_home *node); diff --git a/modules/TAO/TAO_IDL/fe/idl.yy b/modules/TAO/TAO_IDL/fe/idl.yy index 419178b5460..20026c8668b 100644 --- a/modules/TAO/TAO_IDL/fe/idl.yy +++ b/modules/TAO/TAO_IDL/fe/idl.yy @@ -2172,6 +2172,7 @@ template_type_spec : sequence_type_spec | string_type_spec | wstring_type_spec + | connector_inst_spec ; constructed_type_spec @@ -6640,8 +6641,10 @@ connector_header if (parent == 0) { - idl_global->err ()->error1 (UTL_Error::EIDL_CONNECTOR_EXPECTED, - d); + idl_global->err ()->error1 ( + UTL_Error::EIDL_CONNECTOR_EXPECTED, + d); + so_far_so_good = false; } @@ -6836,6 +6839,56 @@ template_ref_decl $2 = 0; } ; + +connector_inst_spec + : template_inst + { +// connector_inst_spec : template_inst + UTL_Scope *s = idl_global->scopes ().top_non_null (); + + AST_Decl *d = + s->lookup_by_name ($1->name_, true); + + if (d == 0) + { + idl_global->err ()->lookup_error ($1->name_); + } + else + { + AST_Connector *c = AST_Connector::narrow_from_decl (d); + + if (c == 0) + { + idl_global->err ()->error1 ( + UTL_Error::EIDL_CONNECTOR_EXPECTED, + d); + } + else + { + AST_Template_Common::T_ARGLIST *args = + c->match_arg_names ($1->args_); + + if (args != 0) + { + Identifier id ("connector"); + UTL_ScopedName sn (&id, 0); + + AST_Instantiated_Connector *ic = + idl_global->gen ()->create_instantiated_connector ( + &sn, + c, + args); + } + + (void) s->fe_add_instantiated_connector (ic); + } + } + + $1->destroy (); + delete $1; + $1 = 0; + } + ; %% /* programs */ diff --git a/modules/TAO/TAO_IDL/include/ast_connector.h b/modules/TAO/TAO_IDL/include/ast_connector.h index 29cb5de7afb..469727e8663 100644 --- a/modules/TAO/TAO_IDL/include/ast_connector.h +++ b/modules/TAO/TAO_IDL/include/ast_connector.h @@ -5,13 +5,15 @@ #define AST_CONNECTOR_H #include "ast_component.h" +#include "ast_template_common.h" #include "fe_utils.h" class AST_Tmpl_Port; class AST_Tmpl_Mirror_Port; class TAO_IDL_FE_Export AST_Connector - : public virtual AST_Component + : public virtual AST_Component, + public virtual AST_Template_Common { public: AST_Connector (void); @@ -42,9 +44,6 @@ protected: virtual AST_Tmpl_Port *fe_add_tmpl_port (AST_Tmpl_Port *p); virtual AST_Tmpl_Mirror_Port *fe_add_tmpl_mirror_port ( AST_Tmpl_Mirror_Port *p); - -private: - FE_Utils::T_PARAMLIST_INFO *template_params_; }; #endif // AST_CONNECTOR_H diff --git a/modules/TAO/TAO_IDL/include/ast_extended_port.h b/modules/TAO/TAO_IDL/include/ast_extended_port.h index 2a62cd7db6e..88ac3b0d116 100644 --- a/modules/TAO/TAO_IDL/include/ast_extended_port.h +++ b/modules/TAO/TAO_IDL/include/ast_extended_port.h @@ -14,12 +14,12 @@ public: AST_Extended_Port ( UTL_ScopedName *n, AST_PortType *porttype_ref, - AST_PortType::T_ARGLIST *template_args); + AST_Template_Common::T_ARGLIST *template_args); virtual ~AST_Extended_Port (void); AST_PortType *port_type (void) const; - AST_PortType::T_ARGLIST *template_args (void) const; + AST_Template_Common::T_ARGLIST *template_args (void) const; // Cleanup function. virtual void destroy (void); @@ -35,7 +35,7 @@ public: virtual int ast_accept (ast_visitor *visitor); protected: - AST_PortType::T_ARGLIST *template_args_; + AST_Template_Common::T_ARGLIST *template_args_; }; #endif /* AST_EXTENDED_PORT_H */ diff --git a/modules/TAO/TAO_IDL/include/ast_generator.h b/modules/TAO/TAO_IDL/include/ast_generator.h index ea3a67436ff..35d63fef075 100644 --- a/modules/TAO/TAO_IDL/include/ast_generator.h +++ b/modules/TAO/TAO_IDL/include/ast_generator.h @@ -72,6 +72,7 @@ trademarks or registered trademarks of Sun Microsystems, Inc. #include "ast_predefined_type.h" #include "ast_union_label.h" #include "ast_porttype.h" +#include "ast_template_common.h" #include "fe_utils.h" @@ -85,6 +86,7 @@ class AST_Instantiated_Interface; class AST_Extended_Port; class AST_Mirror_Port; class AST_Connector; +class AST_Instantiated_Connector; class AST_Tmpl_Port; class AST_Tmpl_Mirror_Port; class AST_Provides; @@ -366,7 +368,7 @@ public: AST_Instantiated_Interface *create_instantiated_interface ( UTL_ScopedName *n, AST_Template_Interface *template_ref, - UTL_NameList *template_args); + AST_Template_Common::T_ARGLIST *template_args); virtual AST_PortType *create_porttype ( @@ -421,6 +423,12 @@ public: AST_Tmpl_Mirror_Port *create_tmpl_mirror_port ( UTL_ScopedName *n, AST_PortType *porttype_ref); + + virtual + AST_Instantiated_Connector *create_instantiated_connector ( + UTL_ScopedName *n, + AST_Connector *connector_type, + AST_Template_Common::T_ARGLIST *template_args); }; #endif // _AST_GENERATOR_AST_GENERATOR_HH diff --git a/modules/TAO/TAO_IDL/include/ast_instantiated_connector.h b/modules/TAO/TAO_IDL/include/ast_instantiated_connector.h new file mode 100644 index 00000000000..4818c6090bf --- /dev/null +++ b/modules/TAO/TAO_IDL/include/ast_instantiated_connector.h @@ -0,0 +1,46 @@ +// -*- C++ -*- +// $Id$ + +#ifndef AST_INSTANTIATED_CONNECTOR_H +#define AST_INSTANTIATED_CONNECTOR_H + +#include "ast_concrete_type.h" +#include "ast_template_common.h" +#include "utl_scope.h" + +class AST_Connector; +class UTL_NameListl; + +class TAO_IDL_FE_Export AST_Instantiated_Connector + : public virtual AST_ConcreteType, + public virtual UTL_Scope +{ +public: + AST_Instantiated_Connector ( + UTL_ScopedName *n, + AST_Connector *connector_type, + AST_Template_Common::T_ARGLIST *template_args); + + virtual ~AST_Instantiated_Connector (void); + + // Cleanup function. + virtual void destroy (void); + + // Narrowing. + + DEF_NARROW_FROM_DECL (AST_Instantiated_Connector); + DEF_NARROW_FROM_SCOPE (AST_Instantiated_Connector); + + // AST Dumping. + virtual void dump (ACE_OSTREAM_TYPE &o); + + // Visiting. + virtual int ast_accept (ast_visitor *visitor); + +private: + AST_Connector *connector_type_; + AST_Template_Common::T_ARGLIST *template_args_; +}; + +#endif /* AST_INSTANTIATED_INTERFACE_H */ + diff --git a/modules/TAO/TAO_IDL/include/ast_instantiated_interface.h b/modules/TAO/TAO_IDL/include/ast_instantiated_interface.h index 216f97980ab..c552601942a 100644 --- a/modules/TAO/TAO_IDL/include/ast_instantiated_interface.h +++ b/modules/TAO/TAO_IDL/include/ast_instantiated_interface.h @@ -5,6 +5,7 @@ #define AST_INSTANTIATED_INTERFACE_H #include "ast_interface.h" +#include "ast_template_common.h" class AST_Template_Interface; @@ -15,7 +16,7 @@ public: AST_Instantiated_Interface ( UTL_ScopedName *n, AST_Template_Interface *template_ref, - UTL_NameList *template_args); + AST_Template_Common::T_ARGLIST *template_args); virtual ~AST_Instantiated_Interface (void); @@ -35,7 +36,7 @@ public: protected: AST_Template_Interface *template_ref_; - UTL_NameList *template_args_; + AST_Template_Common::T_ARGLIST *template_args_; }; #endif /* AST_INSTANTIATED_INTERFACE_H */ diff --git a/modules/TAO/TAO_IDL/include/ast_mirror_port.h b/modules/TAO/TAO_IDL/include/ast_mirror_port.h index 0e2d1f6b35c..d63333873ca 100644 --- a/modules/TAO/TAO_IDL/include/ast_mirror_port.h +++ b/modules/TAO/TAO_IDL/include/ast_mirror_port.h @@ -13,7 +13,7 @@ public: AST_Mirror_Port ( UTL_ScopedName *n, AST_PortType *porttype_ref, - AST_PortType::T_ARGLIST *template_args); + AST_Template_Common::T_ARGLIST *template_args); virtual ~AST_Mirror_Port (void); diff --git a/modules/TAO/TAO_IDL/include/ast_module.h b/modules/TAO/TAO_IDL/include/ast_module.h index 5d011d1ca32..e2bf3998f74 100644 --- a/modules/TAO/TAO_IDL/include/ast_module.h +++ b/modules/TAO/TAO_IDL/include/ast_module.h @@ -137,53 +137,81 @@ private: // Scope Management Protocol - virtual AST_PredefinedType *fe_add_predefined_type (AST_PredefinedType *t); + virtual + AST_PredefinedType *fe_add_predefined_type (AST_PredefinedType *t); - virtual AST_Module *fe_add_module (AST_Module *m); + virtual + AST_Module *fe_add_module (AST_Module *m); - virtual AST_Interface *fe_add_interface (AST_Interface *i); + virtual + AST_Interface *fe_add_interface (AST_Interface *i); - virtual AST_InterfaceFwd *fe_add_interface_fwd (AST_InterfaceFwd *i); + virtual + AST_InterfaceFwd *fe_add_interface_fwd (AST_InterfaceFwd *i); - virtual AST_ValueType *fe_add_valuetype (AST_ValueType *i); + virtual + AST_ValueType *fe_add_valuetype (AST_ValueType *i); - virtual AST_ValueTypeFwd *fe_add_valuetype_fwd (AST_ValueTypeFwd *i); + virtual + AST_ValueTypeFwd *fe_add_valuetype_fwd (AST_ValueTypeFwd *i); - virtual AST_EventType *fe_add_eventtype (AST_EventType *i); + virtual + AST_EventType *fe_add_eventtype (AST_EventType *i); - virtual AST_EventTypeFwd *fe_add_eventtype_fwd (AST_EventTypeFwd *i); + virtual + AST_EventTypeFwd *fe_add_eventtype_fwd (AST_EventTypeFwd *i); - virtual AST_Component *fe_add_component (AST_Component *i); + virtual + AST_Component *fe_add_component (AST_Component *i); - virtual AST_ComponentFwd *fe_add_component_fwd (AST_ComponentFwd *i); + virtual + AST_ComponentFwd *fe_add_component_fwd (AST_ComponentFwd *i); - virtual AST_Connector *fe_add_connector (AST_Connector *i); + virtual + AST_Connector *fe_add_connector (AST_Connector *i); - virtual AST_Home *fe_add_home (AST_Home *i); + virtual + AST_Home *fe_add_home (AST_Home *i); - virtual AST_Constant *fe_add_constant (AST_Constant *c); + virtual + AST_Constant *fe_add_constant (AST_Constant *c); - virtual AST_Exception *fe_add_exception (AST_Exception *e); + virtual + AST_Exception *fe_add_exception (AST_Exception *e); - virtual AST_Union *fe_add_union (AST_Union *u); + virtual + AST_Union *fe_add_union (AST_Union *u); - virtual AST_UnionFwd *fe_add_union_fwd (AST_UnionFwd *u); + virtual + AST_UnionFwd *fe_add_union_fwd (AST_UnionFwd *u); - virtual AST_Structure *fe_add_structure (AST_Structure *s); + virtual + AST_Structure *fe_add_structure (AST_Structure *s); - virtual AST_StructureFwd *fe_add_structure_fwd (AST_StructureFwd *s); + virtual + AST_StructureFwd *fe_add_structure_fwd (AST_StructureFwd *s); - virtual AST_Enum *fe_add_enum (AST_Enum *e); + virtual + AST_Enum *fe_add_enum (AST_Enum *e); - virtual AST_EnumVal *fe_add_enum_val (AST_EnumVal *v); + virtual + AST_EnumVal *fe_add_enum_val (AST_EnumVal *v); - virtual AST_Typedef *fe_add_typedef (AST_Typedef *t); + virtual + AST_Typedef *fe_add_typedef (AST_Typedef *t); - virtual AST_Native *fe_add_native (AST_Native *n); + virtual + AST_Native *fe_add_native (AST_Native *n); - virtual AST_ValueBox *fe_add_valuebox (AST_ValueBox *vb); + virtual + AST_ValueBox *fe_add_valuebox (AST_ValueBox *vb); - virtual AST_PortType *fe_add_porttype (AST_PortType *pt); + virtual + AST_PortType *fe_add_porttype (AST_PortType *pt); + + virtual + AST_Instantiated_Connector *fe_add_instantiated_connector ( + AST_Instantiated_Connector *ic); bool pd_has_nested_valuetype; diff --git a/modules/TAO/TAO_IDL/include/ast_porttype.h b/modules/TAO/TAO_IDL/include/ast_porttype.h index 7f0630e260c..62dfbf46780 100644 --- a/modules/TAO/TAO_IDL/include/ast_porttype.h +++ b/modules/TAO/TAO_IDL/include/ast_porttype.h @@ -40,14 +40,6 @@ public: // Visiting. virtual int ast_accept (ast_visitor *visitor); - typedef ACE_Unbounded_Queue<AST_Decl *> T_ARGLIST; - - // Called by extended port instantiations. - T_ARGLIST *match_arg_names (UTL_NameList *arg_names); - - // Called by porttype references in connectors. - bool match_params (UTL_StrList *param_names); - protected: virtual AST_Provides *fe_add_provides (AST_Provides *p); @@ -58,10 +50,6 @@ protected: virtual AST_Emits *fe_add_emits (AST_Emits *p); virtual AST_Consumes *fe_add_consumes (AST_Consumes *p); - -private: - bool match_param_type (AST_Decl::NodeType my_type, - AST_Decl *d); }; #endif // AST_PORTTYPE_H diff --git a/modules/TAO/TAO_IDL/include/ast_template_common.h b/modules/TAO/TAO_IDL/include/ast_template_common.h index 4f0b3353e0a..7ee122538ae 100644 --- a/modules/TAO/TAO_IDL/include/ast_template_common.h +++ b/modules/TAO/TAO_IDL/include/ast_template_common.h @@ -4,21 +4,41 @@ #ifndef AST_TEMPLATE_COMMON_H #define AST_TEMPLATE_COMMON_H +#include "ast_decl.h" +#include "utl_scope.h" + #include "fe_utils.h" class TAO_IDL_FE_Export AST_Template_Common + : public virtual AST_Decl, + public virtual UTL_Scope { public: - AST_Template_Common (FE_Utils::T_PARAMLIST_INFO *template_params); - - virtual ~AST_Template_Common (void); - FE_Utils::T_PARAMLIST_INFO *template_params (void); virtual void destroy (void); + typedef ACE_Unbounded_Queue<AST_Decl *> T_ARGLIST; + + // Called by extended port instantiations. + T_ARGLIST *match_arg_names (UTL_NameList *arg_names); + + // Called by porttype references in connectors. + bool match_params (UTL_StrList *param_names); + +protected: + AST_Template_Common (AST_Decl::NodeType nt, + UTL_ScopedName *n, + FE_Utils::T_PARAMLIST_INFO *template_params); + + virtual ~AST_Template_Common (void); + protected: FE_Utils::T_PARAMLIST_INFO * template_params_; + +private: + bool match_param_type (AST_Decl::NodeType my_type, + AST_Decl *d); }; #endif // AST_TEMPLATE_COMMON_H diff --git a/modules/TAO/TAO_IDL/include/ast_visitor.h b/modules/TAO/TAO_IDL/include/ast_visitor.h index 8e17cb0f492..595dd91565d 100644 --- a/modules/TAO/TAO_IDL/include/ast_visitor.h +++ b/modules/TAO/TAO_IDL/include/ast_visitor.h @@ -47,6 +47,7 @@ class AST_Mirror_Port; class AST_Tmpl_Port; class AST_Tmpl_Mirror_Port; class AST_Connector; +class AST_Instantiated_Connector; class AST_EventType; class AST_EventTypeFwd; class AST_Home; @@ -115,6 +116,8 @@ public: virtual int visit_extended_port (AST_Extended_Port *node) = 0; virtual int visit_mirror_port (AST_Mirror_Port *node) = 0; virtual int visit_connector (AST_Connector *node) = 0; + virtual int visit_instantiated_connector ( + AST_Instantiated_Connector *node) = 0; virtual int visit_tmpl_port (AST_Tmpl_Port *node) = 0; virtual int visit_tmpl_mirror_port ( AST_Tmpl_Mirror_Port *node) = 0; diff --git a/modules/TAO/TAO_IDL/include/utl_scope.h b/modules/TAO/TAO_IDL/include/utl_scope.h index f86ebc01de4..e05266ea4d1 100644 --- a/modules/TAO/TAO_IDL/include/utl_scope.h +++ b/modules/TAO/TAO_IDL/include/utl_scope.h @@ -128,6 +128,7 @@ class AST_Consumes; class AST_Extended_Port; class AST_Mirror_Port; class AST_Connector; +class AST_Instantiated_Connector; class AST_Tmpl_Port; class AST_Tmpl_Mirror_Port; class UTL_StrList; @@ -383,92 +384,139 @@ private: // Scope Management Protocol. virtual AST_PredefinedType *fe_add_predefined_type (AST_PredefinedType *t); - virtual AST_Module *fe_add_module (AST_Module *m); + virtual + AST_Module *fe_add_module (AST_Module *m); - virtual AST_Interface *fe_add_interface (AST_Interface *i); + virtual + AST_Interface *fe_add_interface (AST_Interface *i); - virtual AST_InterfaceFwd *fe_add_interface_fwd (AST_InterfaceFwd *i); + virtual + AST_InterfaceFwd *fe_add_interface_fwd (AST_InterfaceFwd *i); - virtual AST_ValueType *fe_add_valuetype (AST_ValueType *i); + virtual + AST_ValueType *fe_add_valuetype (AST_ValueType *i); - virtual AST_ValueTypeFwd *fe_add_valuetype_fwd (AST_ValueTypeFwd *i); + virtual + AST_ValueTypeFwd *fe_add_valuetype_fwd (AST_ValueTypeFwd *i); - virtual AST_EventType *fe_add_eventtype (AST_EventType *i); + virtual + AST_EventType *fe_add_eventtype (AST_EventType *i); - virtual AST_EventTypeFwd *fe_add_eventtype_fwd (AST_EventTypeFwd *i); + virtual + AST_EventTypeFwd *fe_add_eventtype_fwd (AST_EventTypeFwd *i); - virtual AST_Component *fe_add_component (AST_Component *i); + virtual + AST_Component *fe_add_component (AST_Component *i); - virtual AST_ComponentFwd *fe_add_component_fwd (AST_ComponentFwd *i); + virtual + AST_ComponentFwd *fe_add_component_fwd (AST_ComponentFwd *i); - virtual AST_Home *fe_add_home (AST_Home *i); + virtual + AST_Home *fe_add_home (AST_Home *i); - virtual AST_Connector *fe_add_connector (AST_Connector *i); + virtual + AST_Connector *fe_add_connector (AST_Connector *i); - virtual AST_Constant *fe_add_constant (AST_Constant *i); + virtual + AST_Constant *fe_add_constant (AST_Constant *i); - virtual AST_Exception *fe_add_exception (AST_Exception *e); + virtual + AST_Exception *fe_add_exception (AST_Exception *e); - virtual AST_Attribute *fe_add_attribute (AST_Attribute *a); + virtual + AST_Attribute *fe_add_attribute (AST_Attribute *a); - virtual AST_Operation *fe_add_operation (AST_Operation *o); + virtual + AST_Operation *fe_add_operation (AST_Operation *o); - virtual AST_Argument *fe_add_argument (AST_Argument *a); + virtual + AST_Argument *fe_add_argument (AST_Argument *a); - virtual AST_Union *fe_add_union (AST_Union *u); + virtual + AST_Union *fe_add_union (AST_Union *u); - virtual AST_UnionFwd *fe_add_union_fwd (AST_UnionFwd *u); + virtual + AST_UnionFwd *fe_add_union_fwd (AST_UnionFwd *u); - virtual AST_UnionBranch *fe_add_union_branch (AST_UnionBranch *b); + virtual + AST_UnionBranch *fe_add_union_branch (AST_UnionBranch *b); - virtual AST_Structure *fe_add_structure (AST_Structure *s); + virtual + AST_Structure *fe_add_structure (AST_Structure *s); - virtual AST_StructureFwd *fe_add_structure_fwd (AST_StructureFwd *s); + virtual + AST_StructureFwd *fe_add_structure_fwd (AST_StructureFwd *s); - virtual AST_Field *fe_add_field (AST_Field *f); + virtual + AST_Field *fe_add_field (AST_Field *f); - virtual AST_Enum *fe_add_enum (AST_Enum *e); + virtual + AST_Enum *fe_add_enum (AST_Enum *e); - virtual AST_EnumVal *fe_add_enum_val (AST_EnumVal *v); + virtual + AST_EnumVal *fe_add_enum_val (AST_EnumVal *v); - virtual AST_Typedef *fe_add_typedef (AST_Typedef *t); + virtual + AST_Typedef *fe_add_typedef (AST_Typedef *t); - virtual UTL_StrList *fe_add_context (UTL_StrList *c); + virtual + UTL_StrList *fe_add_context (UTL_StrList *c); - virtual UTL_NameList *fe_add_exceptions (UTL_NameList *e); + virtual + UTL_NameList *fe_add_exceptions (UTL_NameList *e); - virtual AST_Sequence *fe_add_sequence (AST_Sequence *s); + virtual + AST_Sequence *fe_add_sequence (AST_Sequence *s); - virtual AST_String *fe_add_string (AST_String *s); + virtual + AST_String *fe_add_string (AST_String *s); - virtual AST_Array *fe_add_array (AST_Array *a); + virtual + AST_Array *fe_add_array (AST_Array *a); - virtual AST_Native *fe_add_native (AST_Native *n); + virtual + AST_Native *fe_add_native (AST_Native *n); - virtual AST_Factory *fe_add_factory (AST_Factory *f); + virtual + AST_Factory *fe_add_factory (AST_Factory *f); - virtual AST_ValueBox *fe_add_valuebox (AST_ValueBox *vb); + virtual + AST_ValueBox *fe_add_valuebox (AST_ValueBox *vb); - virtual AST_PortType *fe_add_porttype (AST_PortType *pt); + virtual + AST_PortType *fe_add_porttype (AST_PortType *pt); - virtual AST_Provides *fe_add_provides (AST_Provides *p); + virtual + AST_Provides *fe_add_provides (AST_Provides *p); - virtual AST_Uses *fe_add_uses (AST_Uses *p); + virtual + AST_Uses *fe_add_uses (AST_Uses *p); - virtual AST_Publishes *fe_add_publishes (AST_Publishes *p); + virtual + AST_Publishes *fe_add_publishes (AST_Publishes *p); - virtual AST_Emits *fe_add_emits (AST_Emits *p); + virtual + AST_Emits *fe_add_emits (AST_Emits *p); - virtual AST_Consumes *fe_add_consumes (AST_Consumes *p); + virtual + AST_Consumes *fe_add_consumes (AST_Consumes *p); - virtual AST_Extended_Port *fe_add_extended_port (AST_Extended_Port *ep); + virtual + AST_Extended_Port *fe_add_extended_port (AST_Extended_Port *ep); - virtual AST_Mirror_Port *fe_add_mirror_port (AST_Mirror_Port *mp); + virtual + AST_Mirror_Port *fe_add_mirror_port (AST_Mirror_Port *mp); - virtual AST_Tmpl_Port *fe_add_tmpl_port (AST_Tmpl_Port *p); + virtual + AST_Tmpl_Port *fe_add_tmpl_port (AST_Tmpl_Port *p); - virtual AST_Tmpl_Mirror_Port *fe_add_tmpl_mirror_port ( + virtual + AST_Tmpl_Mirror_Port *fe_add_tmpl_mirror_port ( AST_Tmpl_Mirror_Port *p); + + virtual + AST_Instantiated_Connector *fe_add_instantiated_connector ( + AST_Instantiated_Connector *ic); }; // Active iterator for a UTL_Scope node diff --git a/modules/TAO/TAO_IDL/util/utl_scope.cpp b/modules/TAO/TAO_IDL/util/utl_scope.cpp index 35c722c3b86..6b9ffe1350a 100644 --- a/modules/TAO/TAO_IDL/util/utl_scope.cpp +++ b/modules/TAO/TAO_IDL/util/utl_scope.cpp @@ -1299,6 +1299,13 @@ UTL_Scope::fe_add_tmpl_mirror_port (AST_Tmpl_Mirror_Port *) return 0; } +AST_Instantiated_Connector * +UTL_Scope::fe_add_instantiated_connector ( + AST_Instantiated_Connector *) +{ + return 0; +} + // This is the second pass of the front end // It calls the public add protocol on everything in scope. // It calls the add_xx functions of the most derived AST_Node. |