diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2006-04-19 09:45:01 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2006-04-19 09:45:01 +0000 |
commit | 8e6d2b3638898ca921939762c0934d1be7da3b23 (patch) | |
tree | 95a7bfd2ae5dbe44cfe36766ed6f76097489cf4c /TAO/TAO_IDL | |
parent | be940eef5758561869db96ab820fb21774e3942f (diff) | |
download | ATCD-8e6d2b3638898ca921939762c0934d1be7da3b23.tar.gz |
ChangeLogTag: Wed Apr 19 07:44:49 UTC 2006 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'TAO/TAO_IDL')
-rw-r--r-- | TAO/TAO_IDL/ast/ast_type.cpp | 10 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_codegen.cpp | 22 | ||||
-rw-r--r-- | TAO/TAO_IDL/be/be_visitor_traits.cpp | 78 |
3 files changed, 44 insertions, 66 deletions
diff --git a/TAO/TAO_IDL/ast/ast_type.cpp b/TAO/TAO_IDL/ast/ast_type.cpp index ffbdb1f81ed..7719f80bb5c 100644 --- a/TAO/TAO_IDL/ast/ast_type.cpp +++ b/TAO/TAO_IDL/ast/ast_type.cpp @@ -401,11 +401,6 @@ AST_Type::nested_name (const char* local_name, len_to_match) == 0) { - // Initial prefix matches i.e., they have a common root. - // Start by initializing the macro. - ACE_OS::sprintf (this->nested_type_name_, - "ACE_NESTED_CLASS ("); - // Initialize the first argument. ACE_OS::strncat (this->nested_type_name_, def_curr, @@ -479,7 +474,7 @@ AST_Type::nested_name (const char* local_name, } // Start the 2nd argument of the macro. - ACE_OS::strcat (this->nested_type_name_, ", "); + ACE_OS::strcat (this->nested_type_name_, "::"); // Copy the remaining def_name (if any are left). if (def_curr != 0) @@ -506,9 +501,6 @@ AST_Type::nested_name (const char* local_name, suffix); } - ACE_OS::strcat (this->nested_type_name_, - ")"); - return this->nested_type_name_; } // End of if the root prefixes match. } diff --git a/TAO/TAO_IDL/be/be_codegen.cpp b/TAO/TAO_IDL/be/be_codegen.cpp index 8d3efb98a50..c47878e2d6b 100644 --- a/TAO/TAO_IDL/be/be_codegen.cpp +++ b/TAO/TAO_IDL/be/be_codegen.cpp @@ -30,7 +30,6 @@ ACE_RCSID (be, be_codegen, "$Id$") - TAO_CodeGen * tao_cg = 0; TAO_CodeGen::TAO_CodeGen (void) @@ -1638,7 +1637,7 @@ TAO_CodeGen::gen_stub_hdr_includes (void) // Generated if (w)string member of struct/union/exception/array/valuetype // has been seen. this->gen_cond_file_include (idl_global->string_member_seen_, - "tao/Managed_Types.h", + "tao/String_Manager_T.h", this->client_header_); // Include the Messaging library entry point, if AMI is enabled. @@ -1787,27 +1786,8 @@ TAO_CodeGen::gen_stub_src_includes (void) this->gen_standard_include (this->client_stubs_, "tao/Messaging/Asynch_Invocation_Adapter.h"); -#if !defined (TAO_HAS_DEPRECATED_EXCEPTION_HOLDER) this->gen_standard_include (this->client_stubs_, "tao/Messaging/ExceptionHolder_i.h"); -#endif - -#if defined (TAO_HAS_DEPRECATED_EXCEPTION_HOLDER) - // If a valuetype has been seen, this will already be in the header file. - if (!idl_global->valuetype_seen_) - { - // This may already be in the generated header file. - if (!idl_global->valuebase_seen_) - { - // For AMI exception holders. - this->gen_standard_include (this->client_stubs_, - "tao/Valuetype/ValueBase.h"); - } - - this->gen_standard_include (this->client_stubs_, - "tao/Valuetype/Valuetype_Adapter_Impl.h"); - } -#endif } // If valuefactory_seen_ was set, this was generated in the stub header file, diff --git a/TAO/TAO_IDL/be/be_visitor_traits.cpp b/TAO/TAO_IDL/be/be_visitor_traits.cpp index 40c94c16bc8..920bc63e736 100644 --- a/TAO/TAO_IDL/be/be_visitor_traits.cpp +++ b/TAO/TAO_IDL/be/be_visitor_traits.cpp @@ -19,6 +19,7 @@ #include "be_interface.h" #include "be_valuebox.h" #include "be_valuetype.h" +#include "be_valuebox.h" #include "be_interface_fwd.h" #include "be_valuetype_fwd.h" #include "be_eventtype.h" @@ -62,7 +63,7 @@ be_visitor_traits::visit_root (be_root *node) << "// " << __FILE__ << ":" << __LINE__; *os << be_global->core_versioning_begin () << be_nl; - + *os << be_nl << be_nl << "// Traits specializations." << be_nl << "namespace TAO" << be_nl @@ -176,41 +177,6 @@ be_visitor_traits::visit_interface_fwd (be_interface_fwd *node) } int -be_visitor_traits::visit_valuebox (be_valuebox *node) -{ - if (node->cli_traits_gen ()) - { - return 0; - } - - TAO_OutStream *os = this->ctx_->stream (); - - // I think we need to generate this only for non-defined forward - // declarations. - if (!node->imported ()) - { - os->gen_ifdef_macro (node->flat_name (), "traits", false); - - *os << be_nl << be_nl - << "template<>" << be_nl - << "struct " << be_global->stub_export_macro () << " Value_Traits<" - << node->name () << ">" << be_nl - << "{" << be_idt_nl - << "static void add_ref (" << node->name () << " *);" << be_nl - << "static void remove_ref (" << node->name () << " *);" - << be_nl - << "static void release (" << node->name () << " *);" - << be_uidt_nl - << "};"; - - os->gen_endif (); - } - - node->cli_traits_gen (true); - return 0; -} - -int be_visitor_traits::visit_valuetype (be_valuetype *node) { if (node->cli_traits_gen ()) @@ -283,6 +249,41 @@ be_visitor_traits::visit_valuetype_fwd (be_valuetype_fwd *node) } int +be_visitor_traits::visit_valuebox (be_valuebox *node) +{ + if (node->cli_traits_gen ()) + { + return 0; + } + + TAO_OutStream *os = this->ctx_->stream (); + + // I think we need to generate this only for non-defined forward + // declarations. + if (!node->imported ()) + { + os->gen_ifdef_macro (node->flat_name (), "traits", false); + + *os << be_nl << be_nl + << "template<>" << be_nl + << "struct " << be_global->stub_export_macro () << " Value_Traits<" + << node->name () << ">" << be_nl + << "{" << be_idt_nl + << "static void add_ref (" << node->name () << " *);" << be_nl + << "static void remove_ref (" << node->name () << " *);" + << be_nl + << "static void release (" << node->name () << " *);" + << be_uidt_nl + << "};"; + + os->gen_endif (); + } + + node->cli_traits_gen (true); + return 0; +} + +int be_visitor_traits::visit_component (be_component *node) { return this->visit_interface (node); @@ -451,6 +452,11 @@ be_visitor_traits::visit_array (be_array *node) << be_uidt_nl << ");" << be_uidt_nl << "static " << name << "_slice * alloc (void);" + << "static void zero (" << be_idt << be_idt_nl + << name << "_slice * _tao_slice" + << be_uidt_nl + << ");" << be_uidt_nl + << be_uidt_nl << "};"; |