summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2010-02-12 22:09:05 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2010-02-12 22:09:05 +0000
commit5f1ac152046fb3b06e67b0302a5db817cd9658db (patch)
tree1c2bf0fdc57bb2be4f8aa40439ff54ee0196419e /TAO/TAO_IDL
parenta037a42153bd34c0761322eec0d15ab3456c2ca3 (diff)
downloadATCD-5f1ac152046fb3b06e67b0302a5db817cd9658db.tar.gz
ChangeLogTag: Fri Feb 12 22:08:24 UTC 2010 Jeff Parsons <j.parsons@vanderbilt.edu>
Diffstat (limited to 'TAO/TAO_IDL')
-rw-r--r--TAO/TAO_IDL/be/be_codegen.cpp326
-rw-r--r--TAO/TAO_IDL/be/be_produce.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_component/component_exh.cpp5
-rw-r--r--TAO/TAO_IDL/be/be_visitor_module.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_module/module.cpp37
-rw-r--r--TAO/TAO_IDL/be/be_visitor_root.cpp2
-rw-r--r--TAO/TAO_IDL/be/be_visitor_root/root.cpp46
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_module/module.h44
-rw-r--r--TAO/TAO_IDL/be_include/be_visitor_root/root.h45
-rw-r--r--TAO/TAO_IDL/fe/idl.ll5
-rw-r--r--TAO/TAO_IDL/fe/lex.yy.cpp5
-rw-r--r--TAO/TAO_IDL/include/idl_global.h7
-rw-r--r--TAO/TAO_IDL/util/utl_global.cpp12
13 files changed, 301 insertions, 237 deletions
diff --git a/TAO/TAO_IDL/be/be_codegen.cpp b/TAO/TAO_IDL/be/be_codegen.cpp
index 310f7548dc1..bc9bb7d2596 100644
--- a/TAO/TAO_IDL/be/be_codegen.cpp
+++ b/TAO/TAO_IDL/be/be_codegen.cpp
@@ -1381,13 +1381,14 @@ TAO_CodeGen::start_ciao_conn_header (const char *fname)
<< "\"\n";
}
- this->gen_standard_include (
- this->ciao_conn_header_,
- "dds4ccm/impl/ndds/DDS4CCM_Traits.h");
-
- this->gen_standard_include (
- this->ciao_conn_header_,
- "dds4ccm/impl/ndds/DDS_Event_Connector_T.h");
+ // This will almost certainly be true, but just in case...
+ if (be_global->conn_export_include () != 0)
+ {
+ this->gen_standard_include (
+ this->ciao_conn_header_,
+ be_global->conn_export_include (),
+ true);
+ }
// Some compilers don't optimize the #ifndef header include
// protection, but do optimize based on #pragma once.
@@ -2359,35 +2360,32 @@ TAO_CodeGen::gen_stub_hdr_includes (void)
// Non-abstract interface or keyword 'Object'.
this->gen_cond_file_include (
- idl_global->non_local_iface_seen_
+ idl_global->non_local_iface_seen_
| idl_global->local_iface_seen_
| idl_global->base_object_seen_,
- "tao/Object.h",
- this->client_header_
- );
+ "tao/Object.h",
+ this->client_header_);
// This is true if we have a typecode or TCKind in the IDL file.
// If not included here, it will appear in *C.cpp, if TCs not suppressed.
this->gen_cond_file_include (
- idl_global->typecode_seen_
+ idl_global->typecode_seen_
| idl_global->any_seen_,
- "tao/AnyTypeCode/TypeCode.h",
- this->client_header_
- );
+ "tao/AnyTypeCode/TypeCode.h",
+ this->client_header_);
this->gen_cond_file_include (
- idl_global->any_seen_
+ idl_global->any_seen_
| idl_global->typecode_seen_,
- "tao/AnyTypeCode/TypeCode_Constants.h",
- this->client_header_);
+ "tao/AnyTypeCode/TypeCode_Constants.h",
+ this->client_header_);
// This is true if we have an 'any' in the IDL file.
// If not included here, it will appear in *C.cpp, if Anys not suppressed.
this->gen_cond_file_include (
- idl_global->any_seen_,
- "tao/AnyTypeCode/Any.h",
- this->client_header_
- );
+ idl_global->any_seen_,
+ "tao/AnyTypeCode/Any.h",
+ this->client_header_);
// Generated if (w)string member of struct/union/exception/array/valuetype
// has been seen.
@@ -2662,26 +2660,30 @@ TAO_CodeGen::gen_skel_src_includes (void)
{
case BE_GlobalData::TAO_DYNAMIC_HASH:
{
- this->gen_standard_include (this->server_skeletons_,
- "tao/PortableServer/Operation_Table_Dynamic_Hash.h");
+ this->gen_standard_include (
+ this->server_skeletons_,
+ "tao/PortableServer/Operation_Table_Dynamic_Hash.h");
}
break;
case BE_GlobalData::TAO_LINEAR_SEARCH:
{
- this->gen_standard_include (this->server_skeletons_,
- "tao/PortableServer/Operation_Table_Linear_Search.h");
+ this->gen_standard_include (
+ this->server_skeletons_,
+ "tao/PortableServer/Operation_Table_Linear_Search.h");
}
break;
case BE_GlobalData::TAO_BINARY_SEARCH:
{
- this->gen_standard_include (this->server_skeletons_,
- "tao/PortableServer/Operation_Table_Binary_Search.h");
+ this->gen_standard_include (
+ this->server_skeletons_,
+ "tao/PortableServer/Operation_Table_Binary_Search.h");
}
break;
case BE_GlobalData::TAO_PERFECT_HASH:
{
- this->gen_standard_include (this->server_skeletons_,
- "tao/PortableServer/Operation_Table_Perfect_Hash.h");
+ this->gen_standard_include (
+ this->server_skeletons_,
+ "tao/PortableServer/Operation_Table_Perfect_Hash.h");
}
break;
}
@@ -3017,30 +3019,39 @@ TAO_CodeGen::gen_skel_arg_file_includes (TAO_OutStream * stream)
stream
);
- this->gen_standard_include (stream,
- "tao/PortableServer/TypeCode_SArg_Traits.h");
- this->gen_standard_include (stream,
- "tao/PortableServer/Object_SArg_Traits.h");
+ this->gen_standard_include (
+ stream,
+ "tao/PortableServer/TypeCode_SArg_Traits.h");
+
+ this->gen_standard_include (
+ stream,
+ "tao/PortableServer/Object_SArg_Traits.h");
if (be_global->gen_thru_poa_collocation ())
{
// Thru-POA/skeleton argument selection function templates.
- this->gen_cond_file_include (idl_global->non_local_iface_seen_,
- "tao/PortableServer/get_arg.h",
- stream);
+ this->gen_cond_file_include (
+ idl_global->non_local_iface_seen_,
+ "tao/PortableServer/get_arg.h",
+ stream);
// We need the stub side argument templates when thru-POA
// collocation is enabled for type resolution.
// this->gen_stub_arg_file_includes (stream);
- // Always needed for CORBA::Boolean handling in _is_a() skeleton
- // code when an unconstrained (non-local) IDL interface is defined.
- this->gen_cond_file_include (idl_global->non_local_iface_seen_,
- "tao/Special_Basic_Arguments.h",
- stream);
-
- // Always needed for string argument handling in _is_a() skeleton
- // code when an unconstrained (non-local) IDL interface is defined.
+ // Always needed for CORBA::Boolean
+ // handling in _is_a() skeleton
+ // code when an unconstrained (non-local)
+ // IDL interface is defined.
+ this->gen_cond_file_include (
+ idl_global->non_local_iface_seen_,
+ "tao/Special_Basic_Arguments.h",
+ stream);
+
+ // Always needed for string argument
+ // handling in _is_a() skeleton
+ // code when an unconstrained (non-local)
+ // IDL interface is defined.
this->gen_cond_file_include (idl_global->non_local_iface_seen_,
"tao/UB_String_Arguments.h",
stream);
@@ -3062,65 +3073,74 @@ TAO_CodeGen::gen_cond_file_include (bool condition_green,
void
TAO_CodeGen::gen_typecode_includes (TAO_OutStream * stream)
{
- this->gen_standard_include (stream,
- "tao/AnyTypeCode/Null_RefCount_Policy.h");
+ this->gen_standard_include (
+ stream,
+ "tao/AnyTypeCode/Null_RefCount_Policy.h");
- this->gen_standard_include (stream,
- "tao/AnyTypeCode/TypeCode_Constants.h");
+ this->gen_standard_include (
+ stream,
+ "tao/AnyTypeCode/TypeCode_Constants.h");
// Just assume we're going to need alias TypeCodes since there is
// currently no alias_seen_ or typedef_seen_ flag in idl_global.
- this->gen_standard_include (stream,
- "tao/AnyTypeCode/Alias_TypeCode_Static.h");
+ this->gen_standard_include (
+ stream,
+ "tao/AnyTypeCode/Alias_TypeCode_Static.h");
- this->gen_cond_file_include (idl_global->enum_seen_,
- "tao/AnyTypeCode/Enum_TypeCode_Static.h",
- stream);
+ this->gen_cond_file_include (
+ idl_global->enum_seen_,
+ "tao/AnyTypeCode/Enum_TypeCode_Static.h",
+ stream);
- this->gen_cond_file_include (idl_global->interface_seen_,
- "tao/AnyTypeCode/Objref_TypeCode_Static.h",
- stream);
+ this->gen_cond_file_include (
+ idl_global->interface_seen_,
+ "tao/AnyTypeCode/Objref_TypeCode_Static.h",
+ stream);
- this->gen_cond_file_include (idl_global->seq_seen_
- | idl_global->array_seen_,
- "tao/AnyTypeCode/Sequence_TypeCode_Static.h",
- stream);
+ this->gen_cond_file_include (
+ idl_global->seq_seen_ | idl_global->array_seen_,
+ "tao/AnyTypeCode/Sequence_TypeCode_Static.h",
+ stream);
- this->gen_cond_file_include (idl_global->string_seen_,
- "tao/AnyTypeCode/String_TypeCode_Static.h",
- stream);
+ this->gen_cond_file_include (
+ idl_global->string_seen_,
+ "tao/AnyTypeCode/String_TypeCode_Static.h",
+ stream);
this->gen_cond_file_include (
- idl_global->exception_seen_
- | idl_global->aggregate_seen_,
+ idl_global->exception_seen_ | idl_global->aggregate_seen_,
"tao/AnyTypeCode/Struct_TypeCode_Static.h",
stream);
this->gen_cond_file_include (
- idl_global->exception_seen_
- | idl_global->aggregate_seen_,
+ idl_global->exception_seen_ | idl_global->aggregate_seen_,
"tao/AnyTypeCode/TypeCode_Struct_Field.h",
stream);
- this->gen_cond_file_include (idl_global->union_seen_,
- "tao/AnyTypeCode/TypeCode_Case_T.h",
- stream);
+ this->gen_cond_file_include (
+ idl_global->union_seen_,
+ "tao/AnyTypeCode/TypeCode_Case_T.h",
+ stream);
- this->gen_cond_file_include (idl_global->union_seen_,
- "tao/AnyTypeCode/Union_TypeCode_Static.h",
- stream);
+ this->gen_cond_file_include (
+ idl_global->union_seen_,
+ "tao/AnyTypeCode/Union_TypeCode_Static.h",
+ stream);
- this->gen_cond_file_include (idl_global->valuetype_seen_,
- "tao/AnyTypeCode/Value_TypeCode_Static.h",
- stream);
+ this->gen_cond_file_include (
+ idl_global->valuetype_seen_,
+ "tao/AnyTypeCode/Value_TypeCode_Static.h",
+ stream);
- this->gen_cond_file_include (idl_global->valuetype_seen_,
- "tao/AnyTypeCode/TypeCode_Value_Field.h",
- stream);
+ this->gen_cond_file_include (
+ idl_global->valuetype_seen_,
+ "tao/AnyTypeCode/TypeCode_Value_Field.h",
+ stream);
- this->gen_cond_file_include (idl_global->recursive_type_seen_,
- "tao/AnyTypeCode/Recursive_Type_TypeCode.h",
- stream);
+ this->gen_cond_file_include (
+ idl_global->recursive_type_seen_,
+ "tao/AnyTypeCode/Recursive_Type_TypeCode.h",
+ stream);
}
void
@@ -3134,12 +3154,13 @@ TAO_CodeGen::gen_svnt_hdr_includes (void)
this->ciao_svnt_header_,
"ciao/Contexts/Context_Impl_T.h");
- this->gen_standard_include (this->ciao_svnt_header_,
- "ciao/Servants/Servant_Impl_T.h");
+ this->gen_standard_include (
+ this->ciao_svnt_header_,
+ "ciao/Servants/Servant_Impl_T.h");
this->gen_standard_include (
this->ciao_svnt_header_,
- "ciao/Servants/Home_Servant_Impl_T.h");
+ "ciao/Servants/Home_Servant_Impl_T.h");
*this->ciao_svnt_header_ << be_nl;
@@ -3208,52 +3229,6 @@ TAO_CodeGen::gen_exec_hdr_includes (void)
this->gen_standard_include (
this->ciao_exec_header_,
"tao/LocalObject.h");
-
- // Placeholder until we get real-world logic in place.
- bool dds_connector_seen = true;
-
- if (dds_connector_seen)
- {
- *this->ciao_exec_header_ << be_nl;
-
- size_t const nfiles = idl_global->n_included_idl_files ();
-
- for (size_t j = 0; j < nfiles; ++j)
- {
- char* idl_name = idl_global->included_idl_files ()[j];
-
- // Make a String out of it.
- UTL_String idl_name_str = idl_name;
-
- // No *_svnt.h version of this one.
- if (ACE_OS::strcmp (idl_name, "Components.idl") == 0)
- {
- continue;
- }
-
- // Get the constructed IDL file name.
- const char* ts_hdr =
- BE_GlobalData::be_get_dds_typesupport_header (
- &idl_name_str);
-
- idl_name_str.destroy ();
-
- // Sanity check and then print.
- if (ts_hdr != 0)
- {
-// this->gen_standard_include (
-// this->ciao_exec_header_,
-// ts_hdr);
- }
- else
- {
- ACE_ERROR ((LM_ERROR,
- ACE_TEXT ("\nERROR, invalid ")
- ACE_TEXT ("file '%C' included"),
- ts_hdr));
- }
- }
- }
}
void
@@ -3268,8 +3243,15 @@ TAO_CodeGen::gen_exec_src_includes (void)
void
TAO_CodeGen::gen_exec_idl_includes (void)
{
- this->ciao_exec_idl_->print (
- "#include \"ccm/CCM_Container.idl\"");
+ ACE_Unbounded_Queue<char *> &lem_file_names =
+ idl_global->ciao_lem_file_names ();
+
+ // Otherwise it will be included indirectly.
+ if (lem_file_names.size () == 0)
+ {
+ this->ciao_exec_idl_->print (
+ "#include \"ccm/CCM_Container.idl\"");
+ }
if (be_global->ami4ccm_call_back ())
{
@@ -3284,36 +3266,45 @@ TAO_CodeGen::gen_exec_idl_includes (void)
char **path_tmp = 0;
for (ACE_Unbounded_Queue_Iterator<char *>riter (
- idl_global->ciao_lem_file_names ()
- );
+ lem_file_names);
riter.done () == 0;
riter.advance ())
{
riter.next (path_tmp);
- // No newline first time for better formatting.
- this->ciao_exec_idl_->print ("\n#include \"%s\"", *path_tmp);
+ this->gen_standard_include (this->ciao_exec_idl_,
+ *path_tmp);
}
}
void
TAO_CodeGen::gen_conn_hdr_includes (void)
{
- if (be_global->conn_export_include () != 0)
+ // We'll probably need some kind of flag to check
+ // to tell which DDS vendor.
+ this->gen_standard_include (
+ this->ciao_conn_header_,
+ "connectors/dds4ccm/impl/ndds/DDS4CCM_Traits.h");
+
+ // Placeholder for forthcoming real-world logic.
+ bool dds_event_connector = true;
+
+ if (dds_event_connector)
{
this->gen_standard_include (
this->ciao_conn_header_,
- be_global->conn_export_include (),
- true);
-
- *this->ciao_conn_header_ << be_nl;
+ "connectors/dds4ccm/impl/ndds/DDS_Event_Connector_T.h");
}
+ *this->ciao_conn_header_ << be_nl;
+
+ ACE_Unbounded_Queue<char *> &lem_file_names =
+ idl_global->ciao_lem_file_names ();
+
char **path_tmp = 0;
- for (ACE_Unbounded_Queue_Iterator<char *>riter (
- idl_global->ciao_lem_file_names ()
- );
+ for (ACE_Unbounded_Queue_Iterator<char *> riter (
+ lem_file_names);
riter.done () == 0;
riter.advance ())
{
@@ -3327,8 +3318,49 @@ TAO_CodeGen::gen_conn_hdr_includes (void)
lem_str.c_str ());
}
- *this->ciao_conn_header_ << be_nl;
+ for (size_t j = 0; j < idl_global->n_included_idl_files (); ++j)
+ {
+ if (j == 0)
+ {
+ *this->ciao_conn_header_ << be_nl;
+ }
+
+ char * const idl_name =
+ idl_global->included_idl_files ()[j];
+
+ if (ACE_OS::strcmp (idl_name, "Components.idl") == 0)
+ {
+ continue;
+ }
+
+ UTL_String str (idl_name);
+
+ this->gen_standard_include (
+ this->ciao_conn_header_,
+ BE_GlobalData::be_get_client_hdr (&str));
+
+ str.destroy ();
+ }
+
+ ACE_Unbounded_Queue<char *> &rti_ts_files =
+ idl_global->ciao_rti_ts_file_names ();
+
+ if (rti_ts_files.size () > 0)
+ {
+ *this->ciao_conn_header_ << be_nl;
+ }
+
+ for (ACE_Unbounded_Queue_Iterator<char *> iter (
+ rti_ts_files);
+ iter.done () == 0;
+ iter.advance ())
+ {
+ iter.next (path_tmp);
+ this->gen_standard_include (
+ this->ciao_conn_header_,
+ *path_tmp);
+ }
}
void
diff --git a/TAO/TAO_IDL/be/be_produce.cpp b/TAO/TAO_IDL/be/be_produce.cpp
index c3e34342d7e..8d031b588f3 100644
--- a/TAO/TAO_IDL/be/be_produce.cpp
+++ b/TAO/TAO_IDL/be/be_produce.cpp
@@ -210,7 +210,7 @@ BE_produce (void)
BE_visit_root (root_is_visitor, "implementation skeleton");
}
- if (be_global->gen_ciao_svnt ())
+ if (be_global->gen_ciao_svnt () && idl_global->component_seen_)
{
ctx.state (TAO_CodeGen::TAO_ROOT_SVH);
be_visitor_root_svh root_svh_visitor (&ctx);
diff --git a/TAO/TAO_IDL/be/be_visitor_component/component_exh.cpp b/TAO/TAO_IDL/be/be_visitor_component/component_exh.cpp
index b761cea0738..02c22e5aef9 100644
--- a/TAO/TAO_IDL/be/be_visitor_component/component_exh.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_component/component_exh.cpp
@@ -13,13 +13,14 @@
//=============================================================================
-be_visitor_component_exh::be_visitor_component_exh (be_visitor_context *ctx)
+be_visitor_component_exh::be_visitor_component_exh (
+ be_visitor_context *ctx)
: be_visitor_component_scope (ctx)
{
// This is initialized in the base class to svnt_export_macro()
// or skel_export_macro(), since there are many more visitor
// classes generating servant code. So we can just override
- // all that here
+ // all that here.
export_macro_ = be_global->exec_export_macro ();
}
diff --git a/TAO/TAO_IDL/be/be_visitor_module.cpp b/TAO/TAO_IDL/be/be_visitor_module.cpp
index 54246a8af01..a7f84583a71 100644
--- a/TAO/TAO_IDL/be/be_visitor_module.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_module.cpp
@@ -33,6 +33,7 @@
#include "be_component.h"
#include "be_component_fwd.h"
#include "be_home.h"
+#include "be_connector.h"
#include "be_extern.h"
#include "be_helper.h"
#include "utl_err.h"
@@ -55,6 +56,7 @@
#include "be_visitor_component.h"
#include "be_visitor_component_fwd.h"
#include "be_visitor_home.h"
+#include "be_visitor_connector.h"
#include "be_visitor_context.h"
#include "be_visitor_module/module.cpp"
diff --git a/TAO/TAO_IDL/be/be_visitor_module/module.cpp b/TAO/TAO_IDL/be/be_visitor_module/module.cpp
index 84b2a332c3d..0006970a970 100644
--- a/TAO/TAO_IDL/be/be_visitor_module/module.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_module/module.cpp
@@ -1001,6 +1001,43 @@ be_visitor_module::visit_home (be_home *node)
}
int
+be_visitor_module::visit_connector (be_connector *node)
+{
+ // Instantiate a visitor context with a copy of our context. This info
+ // will be modified based on what type of node we are visiting.
+ be_visitor_context ctx (*this->ctx_);
+ ctx.node (node);
+ int status = 0;
+
+ switch (this->ctx_->state ())
+ {
+ case TAO_CodeGen::TAO_ROOT_CNH:
+ {
+ be_visitor_connector_dds_exh visitor (&ctx);
+ status = node->accept (&visitor);
+ break;
+ }
+ case TAO_CodeGen::TAO_ROOT_CNS:
+ {
+ be_visitor_connector_dds_exs visitor (&ctx);
+ status = node->accept (&visitor);
+ break;
+ }
+ // Skip these contexts, the connector impl is
+ // generated in a separate pass, using the states
+ // above.
+ case TAO_CodeGen::TAO_ROOT_EXH:
+ case TAO_CodeGen::TAO_ROOT_EXS:
+ break;
+ default:
+ // In all other cases, same as component.
+ return this->visit_component (node);
+ }
+
+ return 0;
+}
+
+int
be_visitor_module::visit_structure (be_structure *node)
{
// Instantiate a visitor context with a copy of our context. This info
diff --git a/TAO/TAO_IDL/be/be_visitor_root.cpp b/TAO/TAO_IDL/be/be_visitor_root.cpp
index 783c45b8720..59f1b25e64c 100644
--- a/TAO/TAO_IDL/be/be_visitor_root.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_root.cpp
@@ -33,6 +33,7 @@
#include "be_component.h"
#include "be_component_fwd.h"
#include "be_home.h"
+#include "be_connector.h"
#include "be_helper.h"
#include "be_extern.h"
#include "be_native.h"
@@ -55,6 +56,7 @@
#include "be_visitor_component.h"
#include "be_visitor_component_fwd.h"
#include "be_visitor_home.h"
+#include "be_visitor_connector.h"
#include "be_visitor_traits.h"
#include "be_visitor_arg_traits.h"
#include "be_visitor_template_export.h"
diff --git a/TAO/TAO_IDL/be/be_visitor_root/root.cpp b/TAO/TAO_IDL/be/be_visitor_root/root.cpp
index 95e26f06557..b969860bb86 100644
--- a/TAO/TAO_IDL/be/be_visitor_root/root.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_root/root.cpp
@@ -1478,6 +1478,52 @@ be_visitor_root::visit_home (be_home *node)
}
int
+be_visitor_root::visit_connector (be_connector *node)
+{
+ // Instantiate a visitor context with a copy of our context. This info
+ // will be modified based on what type of node we are visiting.
+ be_visitor_context ctx (*this->ctx_);
+ ctx.node (node);
+ int status = 0;
+
+ switch (this->ctx_->state ())
+ {
+ case TAO_CodeGen::TAO_ROOT_CNH:
+ {
+ be_visitor_connector_dds_exh visitor (&ctx);
+ status = node->accept (&visitor);
+ break;
+ }
+ case TAO_CodeGen::TAO_ROOT_CNS:
+ {
+ be_visitor_connector_dds_exs visitor (&ctx);
+ status = node->accept (&visitor);
+ break;
+ }
+ // Skip these contexts, the connector impl is
+ // generated in a separate pass, using the states
+ // above.
+ case TAO_CodeGen::TAO_ROOT_EXH:
+ case TAO_CodeGen::TAO_ROOT_EXS:
+ break;
+ default:
+ // In all other cases, same as component.
+ return this->visit_component (node);
+ }
+
+ if (status == -1)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT ("be_visitor_root::")
+ ACE_TEXT ("visit_connector - ")
+ ACE_TEXT ("failed to accept visitor\n")),
+ -1);
+ }
+
+ return 0;
+}
+
+int
be_visitor_root::visit_module (be_module *node)
{
// Instantiate a visitor context with a copy of our context. This info
diff --git a/TAO/TAO_IDL/be_include/be_visitor_module/module.h b/TAO/TAO_IDL/be_include/be_visitor_module/module.h
index 92525e370ad..3c290107758 100644
--- a/TAO/TAO_IDL/be_include/be_visitor_module/module.h
+++ b/TAO/TAO_IDL/be_include/be_visitor_module/module.h
@@ -29,72 +29,30 @@ class be_visitor_module : public be_visitor_scope
{
public:
- /// constructor
be_visitor_module (be_visitor_context *ctx);
- /// destructor
~be_visitor_module (void);
- // =visit methods on all elements syntactically valid in a Module scope
-
- /// visit a constant
virtual int visit_constant (be_constant *node);
-
- /// visit an enum
virtual int visit_enum (be_enum *node);
-
- /// visit a native
virtual int visit_native (be_native *node);
-
- /// visit an exception
virtual int visit_exception (be_exception *node);
-
- /// visit an interface
virtual int visit_interface (be_interface *node);
-
- /// visit a forward declared interface
virtual int visit_interface_fwd (be_interface_fwd *node);
-
- /// visit the valuebox node
virtual int visit_valuebox (be_valuebox *node);
-
- /// visit a valuetype
virtual int visit_valuetype (be_valuetype *node);
-
- /// visit a forward declared valuetype
virtual int visit_valuetype_fwd (be_valuetype_fwd *node);
-
- /// visit an eventtype
virtual int visit_eventtype (be_eventtype *node);
-
- /// visit a forward declared eventtype
virtual int visit_eventtype_fwd (be_eventtype_fwd *node);
-
- /// visit a component
virtual int visit_component (be_component *node);
-
- /// visit a forward declared component
virtual int visit_component_fwd (be_component_fwd *node);
-
- /// visit a home
virtual int visit_home (be_home *node);
-
- /// visit a module
+ virtual int visit_connector (be_connector *node);
virtual int visit_module (be_module *node);
-
- /// visit a structure
virtual int visit_structure (be_structure *node);
-
- /// visit a structure
virtual int visit_structure_fwd (be_structure_fwd *node);
-
- /// visit a union
virtual int visit_union (be_union *node);
-
- /// visit a union
virtual int visit_union_fwd (be_union_fwd *node);
-
- /// visit the typedef node
virtual int visit_typedef (be_typedef *node);
};
diff --git a/TAO/TAO_IDL/be_include/be_visitor_root/root.h b/TAO/TAO_IDL/be_include/be_visitor_root/root.h
index 2b87522e230..44518121c54 100644
--- a/TAO/TAO_IDL/be_include/be_visitor_root/root.h
+++ b/TAO/TAO_IDL/be_include/be_visitor_root/root.h
@@ -29,74 +29,31 @@ class be_visitor_root : public be_visitor_scope
{
public:
- /// constructor
be_visitor_root (be_visitor_context *ctx);
- /// destructor
~be_visitor_root (void);
- /// visit root
virtual int visit_root (be_root *node);
-
- // =visit methods on all elements syntactically valid in a Root scope
-
- /// visit a constant
virtual int visit_constant (be_constant *node);
-
- /// visit an enum
virtual int visit_enum (be_enum *node);
-
- /// visit an exception
virtual int visit_exception (be_exception *node);
-
- /// visit an interface
virtual int visit_interface (be_interface *node);
-
- /// visit a forward declared interface
virtual int visit_interface_fwd (be_interface_fwd *node);
-
- /// visit a valuebox
virtual int visit_valuebox (be_valuebox *node);
-
- /// visit a valuetype
virtual int visit_valuetype (be_valuetype *node);
-
- /// visit a forward declared valuetype
virtual int visit_valuetype_fwd (be_valuetype_fwd *node);
-
- /// visit an eventtype
virtual int visit_eventtype (be_eventtype *node);
-
- /// visit a forward declared eventtype
virtual int visit_eventtype_fwd (be_eventtype_fwd *node);
-
- /// visit a component
virtual int visit_component (be_component *node);
-
- /// visit a forward declared component
virtual int visit_component_fwd (be_component_fwd *node);
-
- /// visit a home
virtual int visit_home (be_home *node);
-
- /// visit a module
+ virtual int visit_connector (be_connector *node);
virtual int visit_module (be_module *node);
-
- /// visit a structure
virtual int visit_structure (be_structure *node);
-
- /// visit a forward declared structure
virtual int visit_structure_fwd (be_structure_fwd *node);
-
- /// visit a union
virtual int visit_union (be_union *node);
-
- /// visit a forward declared union
virtual int visit_union_fwd (be_union_fwd *node);
-
- /// visit the typedef node
virtual int visit_typedef (be_typedef *node);
-
virtual int visit_native (be_native *node);
// =helper. This is used by derived clases to set the right context
diff --git a/TAO/TAO_IDL/fe/idl.ll b/TAO/TAO_IDL/fe/idl.ll
index 69545e07757..3392a1a55ad 100644
--- a/TAO/TAO_IDL/fe/idl.ll
+++ b/TAO/TAO_IDL/fe/idl.ll
@@ -813,6 +813,11 @@ idl_store_pragma (char *buf)
char *tmp = idl_get_pragma_string (buf);
idl_global->add_ciao_lem_file_names (tmp);
}
+ else if (ACE_OS::strncmp (buf + 8, "rti typesupport", 15) == 0)
+ {
+ char *tmp = idl_get_pragma_string (buf);
+ idl_global->add_ciao_rti_ts_file_names (tmp);
+ }
}
/*
diff --git a/TAO/TAO_IDL/fe/lex.yy.cpp b/TAO/TAO_IDL/fe/lex.yy.cpp
index 37ad1ea14d3..336a1087404 100644
--- a/TAO/TAO_IDL/fe/lex.yy.cpp
+++ b/TAO/TAO_IDL/fe/lex.yy.cpp
@@ -3299,6 +3299,11 @@ idl_store_pragma (char *buf)
char *tmp = idl_get_pragma_string (buf);
idl_global->add_ciao_lem_file_names (tmp);
}
+ else if (ACE_OS::strncmp (buf + 8, "rti typesupport", 15) == 0)
+ {
+ char *tmp = idl_get_pragma_string (buf);
+ idl_global->add_ciao_rti_ts_file_names (tmp);
+ }
}
/*
diff --git a/TAO/TAO_IDL/include/idl_global.h b/TAO/TAO_IDL/include/idl_global.h
index 09b82ab510c..e865ae68bf6 100644
--- a/TAO/TAO_IDL/include/idl_global.h
+++ b/TAO/TAO_IDL/include/idl_global.h
@@ -597,6 +597,10 @@ public:
ACE_Unbounded_Queue<char *> & ciao_lem_file_names (void);
// Accessor/mutator for the ciao_lem_file_names_ member.
+ void add_ciao_rti_ts_file_names (const char *s);
+ ACE_Unbounded_Queue<char *> & ciao_rti_ts_file_names (void);
+ // Accessor/mutator for the ciao_rti_ts_file_names_ member.
+
FILE * open_included_file (char const * filename,
char const *& directory);
// Attempt to open file for reading until it is found in one of the
@@ -818,6 +822,9 @@ private:
ACE_Unbounded_Queue<char *> ciao_lem_file_names_;
// Files parsed with ciao lem pragma
+
+ ACE_Unbounded_Queue<char *> ciao_rti_ts_file_names_;
+ // Files parsed with rti typesupport pragma
};
#endif //_IDL_IDL_GLOBAL_HH
diff --git a/TAO/TAO_IDL/util/utl_global.cpp b/TAO/TAO_IDL/util/utl_global.cpp
index 692c90628b9..9306c9ce867 100644
--- a/TAO/TAO_IDL/util/utl_global.cpp
+++ b/TAO/TAO_IDL/util/utl_global.cpp
@@ -1309,6 +1309,18 @@ IDL_GlobalData::ciao_lem_file_names (void)
return this->ciao_lem_file_names_;
}
+void
+IDL_GlobalData::add_ciao_rti_ts_file_names (const char *s)
+{
+ this->ciao_rti_ts_file_names_.enqueue_tail (ACE::strnew (s));
+}
+
+ACE_Unbounded_Queue<char *> &
+IDL_GlobalData::ciao_rti_ts_file_names (void)
+{
+ return this->ciao_rti_ts_file_names_;
+}
+
ACE_Hash_Map_Manager<char *, char *, ACE_Null_Mutex> &
IDL_GlobalData::file_prefixes (void)
{