diff options
Diffstat (limited to 'TAO/TAO_IDL')
245 files changed, 2131 insertions, 1887 deletions
diff --git a/TAO/TAO_IDL/ast/ast_argument.cpp b/TAO/TAO_IDL/ast/ast_argument.cpp index c1f53cdc18b..877590c6827 100644 --- a/TAO/TAO_IDL/ast/ast_argument.cpp +++ b/TAO/TAO_IDL/ast/ast_argument.cpp @@ -53,8 +53,8 @@ Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR Sun, Sun Microsystems and the Sun logo are trademarks or registered trademarks of Sun Microsystems, Inc. -SunSoft, Inc. -2550 Garcia Avenue +SunSoft, Inc. +2550 Garcia Avenue Mountain View, California 94043 NOTE: @@ -81,7 +81,7 @@ ACE_RCSID(ast, ast_argument, "$Id$") static const char * direction_to_string (AST_Argument::Direction d) { - switch (d) + switch (d) { case AST_Argument::dir_IN: return "in"; @@ -101,13 +101,13 @@ AST_Argument::AST_Argument (void) { } -AST_Argument::AST_Argument (Direction d, - AST_Type *ft, +AST_Argument::AST_Argument (Direction d, + AST_Type *ft, UTL_ScopedName *n) - : AST_Field (AST_Decl::NT_argument, - ft, + : AST_Field (AST_Decl::NT_argument, + ft, n), - AST_Decl (AST_Decl::NT_argument, + AST_Decl (AST_Decl::NT_argument, n), pd_direction (d) { diff --git a/TAO/TAO_IDL/ast/ast_attribute.cpp b/TAO/TAO_IDL/ast/ast_attribute.cpp index f229ecde2c3..306fe3a5386 100644 --- a/TAO/TAO_IDL/ast/ast_attribute.cpp +++ b/TAO/TAO_IDL/ast/ast_attribute.cpp @@ -86,12 +86,12 @@ AST_Attribute::AST_Attribute (idl_bool ro, UTL_ScopedName *n, idl_bool local, idl_bool abstract) - : AST_Field (AST_Decl::NT_attr, - ft, + : AST_Field (AST_Decl::NT_attr, + ft, n), - AST_Decl (AST_Decl::NT_attr, + AST_Decl (AST_Decl::NT_attr, n), - COMMON_Base (local, + COMMON_Base (local, abstract), pd_readonly (ro) { diff --git a/TAO/TAO_IDL/ast/ast_check.cpp b/TAO/TAO_IDL/ast/ast_check.cpp index 34d86def55d..70aafe42f82 100644 --- a/TAO/TAO_IDL/ast/ast_check.cpp +++ b/TAO/TAO_IDL/ast/ast_check.cpp @@ -53,8 +53,8 @@ Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR Sun, Sun Microsystems and the Sun logo are trademarks or registered trademarks of Sun Microsystems, Inc. -SunSoft, Inc. -2550 Garcia Avenue +SunSoft, Inc. +2550 Garcia Avenue Mountain View, California 94043 NOTE: @@ -88,15 +88,15 @@ AST_record_fwd_interface (AST_InterfaceFwd *n) long o_ast_n_fwds_alloc = 0; // Make sure there's space to store one more. - if (ast_n_fwds_used == ast_n_fwds_alloc) + if (ast_n_fwds_used == ast_n_fwds_alloc) { - if (ast_n_fwds_alloc == 0) + if (ast_n_fwds_alloc == 0) { ast_n_fwds_alloc = INCREMENT; ACE_NEW (ast_fwds, AST_InterfaceFwd *[ast_n_fwds_alloc]); - } - else + } + else { o_ast_fwds = ast_fwds; o_ast_n_fwds_alloc = ast_n_fwds_alloc; @@ -125,7 +125,7 @@ AST_check_fwd_interface (void) AST_InterfaceFwd *d = 0; AST_Interface *itf = 0; - for (long i = 0; i < ast_n_fwds_used; i++) + for (long i = 0; i < ast_n_fwds_used; i++) { d = ast_fwds[i]; itf = d->full_definition (); diff --git a/TAO/TAO_IDL/ast/ast_concrete_type.cpp b/TAO/TAO_IDL/ast/ast_concrete_type.cpp index 75da41444db..cbdeaf9643a 100644 --- a/TAO/TAO_IDL/ast/ast_concrete_type.cpp +++ b/TAO/TAO_IDL/ast/ast_concrete_type.cpp @@ -53,8 +53,8 @@ Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR Sun, Sun Microsystems and the Sun logo are trademarks or registered trademarks of Sun Microsystems, Inc. -SunSoft, Inc. -2550 Garcia Avenue +SunSoft, Inc. +2550 Garcia Avenue Mountain View, California 94043 NOTE: @@ -77,9 +77,9 @@ AST_ConcreteType::AST_ConcreteType (void) { } -AST_ConcreteType::AST_ConcreteType (AST_Decl::NodeType nt, +AST_ConcreteType::AST_ConcreteType (AST_Decl::NodeType nt, UTL_ScopedName *n) - : AST_Decl (nt, + : AST_Decl (nt, n) { } diff --git a/TAO/TAO_IDL/ast/ast_constant.cpp b/TAO/TAO_IDL/ast/ast_constant.cpp index e4aab6b7f03..b79f18b51f1 100644 --- a/TAO/TAO_IDL/ast/ast_constant.cpp +++ b/TAO/TAO_IDL/ast/ast_constant.cpp @@ -140,7 +140,7 @@ AST_Constant::AST_Constant (AST_Expression::ExprType t, AST_Decl::NodeType nt, AST_Expression *v, UTL_ScopedName *n) - : AST_Decl (nt, + : AST_Decl (nt, n), pd_constant_value (idl_global->gen ()->create_expr (v, t)), pd_et (t), @@ -152,7 +152,7 @@ AST_Constant::AST_Constant (AST_Expression::ExprType t, AST_Constant::AST_Constant (AST_Expression::ExprType t, AST_Expression *v, UTL_ScopedName *n) - : AST_Decl (AST_Decl::NT_const, + : AST_Decl (AST_Decl::NT_const, n), pd_constant_value (idl_global->gen ()->create_expr (v, t)), pd_et (t), diff --git a/TAO/TAO_IDL/ast/ast_decl.cpp b/TAO/TAO_IDL/ast/ast_decl.cpp index 7a19560e0f0..92d25f06138 100644 --- a/TAO/TAO_IDL/ast/ast_decl.cpp +++ b/TAO/TAO_IDL/ast/ast_decl.cpp @@ -411,7 +411,7 @@ AST_Decl::compute_repoID (void) "%s", "IDL:"); - ACE_OS::strcat (this->repoID_, + ACE_OS::strcat (this->repoID_, this->prefix_); // Add the "/" only if there is a prefix. @@ -437,7 +437,7 @@ AST_Decl::compute_repoID (void) } // Print the identifier. - ACE_OS::strcat (this->repoID_, + ACE_OS::strcat (this->repoID_, j.item ()->get_string ()); if (first) @@ -465,7 +465,7 @@ AST_Decl::compute_repoID (void) } else { - ACE_OS::strcat (this->repoID_, + ACE_OS::strcat (this->repoID_, ":1.0"); } } diff --git a/TAO/TAO_IDL/ast/ast_enum.cpp b/TAO/TAO_IDL/ast/ast_enum.cpp index 4181d8d5d1a..435db829fae 100644 --- a/TAO/TAO_IDL/ast/ast_enum.cpp +++ b/TAO/TAO_IDL/ast/ast_enum.cpp @@ -80,10 +80,10 @@ AST_Enum::AST_Enum (void) AST_Enum::AST_Enum (UTL_ScopedName *n, idl_bool local, idl_bool abstract) - : AST_Decl (AST_Decl::NT_enum, + : AST_Decl (AST_Decl::NT_enum, n), UTL_Scope (AST_Decl::NT_enum), - COMMON_Base (local, + COMMON_Base (local, abstract), pd_enum_counter (0), member_count_ (-1) diff --git a/TAO/TAO_IDL/ast/ast_enum_val.cpp b/TAO/TAO_IDL/ast/ast_enum_val.cpp index 7489c9b66ac..77ceeabc8c9 100644 --- a/TAO/TAO_IDL/ast/ast_enum_val.cpp +++ b/TAO/TAO_IDL/ast/ast_enum_val.cpp @@ -78,13 +78,13 @@ AST_EnumVal::AST_EnumVal (void) { } -AST_EnumVal::AST_EnumVal (unsigned long v, +AST_EnumVal::AST_EnumVal (unsigned long v, UTL_ScopedName *n) : AST_Constant (AST_Expression::EV_ulong, AST_Decl::NT_enum_val, - new AST_Expression (v), + new AST_Expression (v), n), - AST_Decl (AST_Decl::NT_enum_val, + AST_Decl (AST_Decl::NT_enum_val, n) { } diff --git a/TAO/TAO_IDL/ast/ast_exception.cpp b/TAO/TAO_IDL/ast/ast_exception.cpp index 27c04286cb8..a61f3fb74be 100644 --- a/TAO/TAO_IDL/ast/ast_exception.cpp +++ b/TAO/TAO_IDL/ast/ast_exception.cpp @@ -81,14 +81,14 @@ AST_Exception::AST_Exception (void) AST_Exception::AST_Exception(UTL_ScopedName *n, idl_bool local, idl_bool abstract) - : AST_Structure (AST_Decl::NT_except, - n, - local, + : AST_Structure (AST_Decl::NT_except, + n, + local, abstract), UTL_Scope (AST_Decl::NT_except), - AST_Decl (AST_Decl::NT_except, + AST_Decl (AST_Decl::NT_except, n), - COMMON_Base (local, + COMMON_Base (local, abstract) { } diff --git a/TAO/TAO_IDL/ast/ast_factory.cpp b/TAO/TAO_IDL/ast/ast_factory.cpp index 53567ff97d3..c5307a80ecc 100644 --- a/TAO/TAO_IDL/ast/ast_factory.cpp +++ b/TAO/TAO_IDL/ast/ast_factory.cpp @@ -82,10 +82,10 @@ AST_Factory::AST_Factory (void) } AST_Factory::AST_Factory (UTL_ScopedName *n) - : AST_Decl(AST_Decl::NT_factory, + : AST_Decl(AST_Decl::NT_factory, n), UTL_Scope(AST_Decl::NT_factory), - COMMON_Base (1, + COMMON_Base (1, 0), //@@ Always local, never abstract argument_count_ (-1), has_native_ (0) @@ -142,7 +142,7 @@ AST_Factory::compute_argument_attr (void) if (this->nmembers () > 0) { // Instantiate a scope iterator. - UTL_ScopeActiveIterator si (this, + UTL_ScopeActiveIterator si (this, UTL_Scope::IK_decls); while (!si.is_done ()) @@ -179,29 +179,29 @@ AST_Factory::fe_add_argument (AST_Argument *t) AST_Decl *d = 0; // Already defined and cannot be redefined? Or already used? - if ((d = lookup_by_name_local (t->local_name(), 0)) != 0) + if ((d = lookup_by_name_local (t->local_name(), 0)) != 0) { - if (!can_be_redefined (d)) + if (!can_be_redefined (d)) { - idl_global->err ()->error3 (UTL_Error::EIDL_REDEF, - t, - this, + idl_global->err ()->error3 (UTL_Error::EIDL_REDEF, + t, + this, d); return 0; } - if (this->referenced (d, t->local_name ())) + if (this->referenced (d, t->local_name ())) { - idl_global->err ()->error3 (UTL_Error::EIDL_DEF_USE, - t, - this, + idl_global->err ()->error3 (UTL_Error::EIDL_DEF_USE, + t, + this, d); return 0; } - if (t->has_ancestor (d)) + if (t->has_ancestor (d)) { - idl_global->err ()->redefinition_in_scope (t, + idl_global->err ()->redefinition_in_scope (t, d); return 0; } @@ -211,8 +211,8 @@ AST_Factory::fe_add_argument (AST_Argument *t) this->add_to_scope (t); // Add it to set of locally referenced symbols. - this->add_to_referenced (t, - I_FALSE, + this->add_to_referenced (t, + I_FALSE, t->local_name ()); return t; @@ -223,14 +223,14 @@ void AST_Factory::dump (ostream &o) { AST_Decl *d = 0; - UTL_ScopeActiveIterator i (this, + UTL_ScopeActiveIterator i (this, IK_decls); o << "factory "; this->local_name ()->dump (o); o << "("; - while (!i.is_done()) + while (!i.is_done()) { d = i.item (); d->dump (o); diff --git a/TAO/TAO_IDL/ast/ast_field.cpp b/TAO/TAO_IDL/ast/ast_field.cpp index 7904d773c44..7d2c40dd351 100644 --- a/TAO/TAO_IDL/ast/ast_field.cpp +++ b/TAO/TAO_IDL/ast/ast_field.cpp @@ -89,12 +89,12 @@ AST_Field::AST_Field (void) } // To be used when constructing an AST_Field node. -AST_Field::AST_Field (AST_Type *ft, +AST_Field::AST_Field (AST_Type *ft, UTL_ScopedName *n, Visibility vis) - : AST_Decl (AST_Decl::NT_field, + : AST_Decl (AST_Decl::NT_field, n), - pd_field_type (ft), + pd_field_type (ft), pd_visibility (vis) { } @@ -102,11 +102,11 @@ AST_Field::AST_Field (AST_Type *ft, // To be used when constructing a node of a subclass of AST_Field. AST_Field::AST_Field (AST_Decl::NodeType nt, AST_Type *ft, - UTL_ScopedName *n, + UTL_ScopedName *n, Visibility vis) - : AST_Decl (nt, + : AST_Decl (nt, n), - pd_field_type (ft), + pd_field_type (ft), pd_visibility (vis) { } diff --git a/TAO/TAO_IDL/ast/ast_generator.cpp b/TAO/TAO_IDL/ast/ast_generator.cpp index 832920820c0..f3cbc233004 100644 --- a/TAO/TAO_IDL/ast/ast_generator.cpp +++ b/TAO/TAO_IDL/ast/ast_generator.cpp @@ -86,7 +86,7 @@ AST_Generator::create_predefined_type (AST_PredefinedType::PredefinedType t, { AST_PredefinedType *retval = 0; ACE_NEW_RETURN (retval, - AST_PredefinedType (t, + AST_PredefinedType (t, n), 0); @@ -216,12 +216,12 @@ AST_Generator::create_interface_fwd (UTL_ScopedName *n, { AST_InterfaceFwd *retval = 0; ACE_NEW_RETURN (retval, - AST_InterfaceFwd (this->create_interface (n, - 0, - -1, - 0, - 0, - local, + AST_InterfaceFwd (this->create_interface (n, + 0, + -1, + 0, + 0, + local, abstract), n), 0); @@ -237,8 +237,8 @@ AST_Generator::create_valuetype (UTL_ScopedName *n, { AST_Interface *retval = 0; ACE_NEW_RETURN (retval, - AST_Interface (n, - ih, + AST_Interface (n, + ih, nih, 0, 0, @@ -294,8 +294,8 @@ AST_Generator::create_exception (UTL_ScopedName *n, { AST_Exception *retval = 0; ACE_NEW_RETURN (retval, - AST_Exception (n, - local, + AST_Exception (n, + local, abstract), 0); @@ -310,8 +310,8 @@ AST_Generator::create_structure (UTL_ScopedName *n, { AST_Structure *retval = 0; ACE_NEW_RETURN (retval, - AST_Structure (n, - local, + AST_Structure (n, + local, abstract), 0); @@ -326,8 +326,8 @@ AST_Generator::create_enum (UTL_ScopedName *n, { AST_Enum *retval = 0; ACE_NEW_RETURN (retval, - AST_Enum (n, - local, + AST_Enum (n, + local, abstract), 0); @@ -344,10 +344,10 @@ AST_Generator::create_operation (AST_Type *rt, { AST_Operation *retval = 0; ACE_NEW_RETURN (retval, - AST_Operation (rt, - fl, - n, - local, + AST_Operation (rt, + fl, + n, + local, abstract), 0); @@ -362,8 +362,8 @@ AST_Generator::create_field (AST_Type *ft, { AST_Field *retval = 0; ACE_NEW_RETURN (retval, - AST_Field (ft, - n, + AST_Field (ft, + n, vis), 0); @@ -378,8 +378,8 @@ AST_Generator::create_argument (AST_Argument::Direction d, { AST_Argument *retval = 0; ACE_NEW_RETURN (retval, - AST_Argument (d, - ft, + AST_Argument (d, + ft, n), 0); @@ -432,8 +432,8 @@ AST_Generator::create_union_branch (UTL_LabelList *ll, { AST_UnionBranch *retval = 0; ACE_NEW_RETURN (retval, - AST_UnionBranch (ll, - ft, + AST_UnionBranch (ll, + ft, n), 0); @@ -447,7 +447,7 @@ AST_Generator::create_union_label (AST_UnionLabel::UnionLabel ul, { AST_UnionLabel *retval = 0; ACE_NEW_RETURN (retval, - AST_UnionLabel (ul, + AST_UnionLabel (ul, v), 0); @@ -462,8 +462,8 @@ AST_Generator::create_constant (AST_Expression::ExprType et, { AST_Constant *retval = 0; ACE_NEW_RETURN (retval, - AST_Constant (et, - ev, + AST_Constant (et, + ev, n), 0); @@ -489,7 +489,7 @@ AST_Generator::create_expr (AST_Expression *v, { AST_Expression *retval = 0; ACE_NEW_RETURN (retval, - AST_Expression (v, + AST_Expression (v, t), 0); @@ -505,8 +505,8 @@ AST_Generator::create_expr (AST_Expression::ExprComb c, { AST_Expression *retval = 0; ACE_NEW_RETURN (retval, - AST_Expression (c, - v1, + AST_Expression (c, + v1, v2), 0); @@ -528,12 +528,12 @@ AST_Generator::create_expr (long v) // Construct an AST_Expression node denoting a long integer being used. // as a boolean AST_Expression * -AST_Generator::create_expr (long v, +AST_Generator::create_expr (long v, AST_Expression::ExprType t) { AST_Expression *retval = 0; ACE_NEW_RETURN (retval, - AST_Expression (v, + AST_Expression (v, t), 0); @@ -620,7 +620,7 @@ AST_Generator::create_enum_val (unsigned long v, { AST_EnumVal *retval = 0; ACE_NEW_RETURN (retval, - AST_EnumVal (v, + AST_EnumVal (v, n), 0); @@ -656,9 +656,9 @@ AST_Generator::create_sequence (AST_Expression *ms, { AST_Sequence *retval = 0; ACE_NEW_RETURN (retval, - AST_Sequence (ms, - bt, - local, + AST_Sequence (ms, + bt, + local, abstract), 0); @@ -683,7 +683,7 @@ AST_Generator::create_wstring (AST_Expression *ms) { AST_String *retval = 0; ACE_NEW_RETURN (retval, - AST_String (ms, + AST_String (ms, sizeof (ACE_OS::WChar)), 0); @@ -699,9 +699,9 @@ AST_Generator::create_typedef (AST_Type *bt, { AST_Typedef *retval = 0; ACE_NEW_RETURN (retval, - AST_Typedef (bt, - n, - local, + AST_Typedef (bt, + n, + local, abstract), 0); diff --git a/TAO/TAO_IDL/ast/ast_interface.cpp b/TAO/TAO_IDL/ast/ast_interface.cpp index c549987dc23..d1a7df65cd0 100644 --- a/TAO/TAO_IDL/ast/ast_interface.cpp +++ b/TAO/TAO_IDL/ast/ast_interface.cpp @@ -94,7 +94,7 @@ AST_Interface::AST_Interface(UTL_ScopedName *n, long nih_flat, idl_bool local, idl_bool abstract) - : AST_Decl (AST_Decl::NT_interface, + : AST_Decl (AST_Decl::NT_interface, n), UTL_Scope (AST_Decl::NT_interface), COMMON_Base (local, diff --git a/TAO/TAO_IDL/ast/ast_interface_fwd.cpp b/TAO/TAO_IDL/ast/ast_interface_fwd.cpp index acfa38aa60b..fe5e2f7bfe9 100644 --- a/TAO/TAO_IDL/ast/ast_interface_fwd.cpp +++ b/TAO/TAO_IDL/ast/ast_interface_fwd.cpp @@ -82,7 +82,7 @@ AST_InterfaceFwd::AST_InterfaceFwd (void) AST_InterfaceFwd::AST_InterfaceFwd (AST_Interface *dummy, UTL_ScopedName *n) - : AST_Decl (AST_Decl::NT_interface_fwd, + : AST_Decl (AST_Decl::NT_interface_fwd, n) { // Create a dummy placeholder for the forward declared interface. This diff --git a/TAO/TAO_IDL/ast/ast_module.cpp b/TAO/TAO_IDL/ast/ast_module.cpp index f173a7fad58..9e6534b9cb1 100644 --- a/TAO/TAO_IDL/ast/ast_module.cpp +++ b/TAO/TAO_IDL/ast/ast_module.cpp @@ -82,7 +82,7 @@ AST_Module::AST_Module () } AST_Module::AST_Module (UTL_ScopedName *n) - : AST_Decl (AST_Decl::NT_module, + : AST_Decl (AST_Decl::NT_module, n), UTL_Scope (AST_Decl::NT_module), pd_has_nested_valuetype (0) diff --git a/TAO/TAO_IDL/ast/ast_native.cpp b/TAO/TAO_IDL/ast/ast_native.cpp index 89032f1de31..d62ac7a5d38 100644 --- a/TAO/TAO_IDL/ast/ast_native.cpp +++ b/TAO/TAO_IDL/ast/ast_native.cpp @@ -15,7 +15,7 @@ AST_Native::AST_Native (void) } AST_Native::AST_Native(UTL_ScopedName *n) - : AST_Decl (AST_Decl::NT_native, + : AST_Decl (AST_Decl::NT_native, n) { } diff --git a/TAO/TAO_IDL/ast/ast_operation.cpp b/TAO/TAO_IDL/ast/ast_operation.cpp index f66f59d05d9..454371e6954 100644 --- a/TAO/TAO_IDL/ast/ast_operation.cpp +++ b/TAO/TAO_IDL/ast/ast_operation.cpp @@ -96,7 +96,7 @@ AST_Operation::AST_Operation (AST_Type *rt, UTL_ScopedName *n, idl_bool local, idl_bool abstract) - : AST_Decl(AST_Decl::NT_op, + : AST_Decl(AST_Decl::NT_op, n), UTL_Scope(AST_Decl::NT_op), COMMON_Base (local, diff --git a/TAO/TAO_IDL/ast/ast_predefined_type.cpp b/TAO/TAO_IDL/ast/ast_predefined_type.cpp index 2d21884e054..2db404de631 100644 --- a/TAO/TAO_IDL/ast/ast_predefined_type.cpp +++ b/TAO/TAO_IDL/ast/ast_predefined_type.cpp @@ -82,9 +82,9 @@ AST_PredefinedType::AST_PredefinedType (void) { } -AST_PredefinedType::AST_PredefinedType (PredefinedType t, +AST_PredefinedType::AST_PredefinedType (PredefinedType t, UTL_ScopedName *n) - : AST_Decl (AST_Decl::NT_pre_defined, + : AST_Decl (AST_Decl::NT_pre_defined, n, I_TRUE), pd_pt (t) diff --git a/TAO/TAO_IDL/ast/ast_recursive.cpp b/TAO/TAO_IDL/ast/ast_recursive.cpp index b4e6f0dc27f..da51c83656d 100644 --- a/TAO/TAO_IDL/ast/ast_recursive.cpp +++ b/TAO/TAO_IDL/ast/ast_recursive.cpp @@ -53,8 +53,8 @@ Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR Sun, Sun Microsystems and the Sun logo are trademarks or registered trademarks of Sun Microsystems, Inc. -SunSoft, Inc. -2550 Garcia Avenue +SunSoft, Inc. +2550 Garcia Avenue Mountain View, California 94043 NOTE: @@ -87,13 +87,13 @@ ACE_RCSID(ast, ast_recursive, "$Id$") idl_bool AST_illegal_recursive_type (AST_Decl *t) { - if (t == 0) + if (t == 0) { return I_FALSE; } - + // We only care about structs and unions. - if (t->node_type () != AST_Decl::NT_struct + if (t->node_type () != AST_Decl::NT_struct && t->node_type () != AST_Decl::NT_union) { return I_FALSE; // NOT ILLEGAL. @@ -105,7 +105,7 @@ AST_illegal_recursive_type (AST_Decl *t) AST_Union *un1 = 0; // Narrow the type appropriately so comparison will work. - if (t->node_type () == AST_Decl::NT_struct) + if (t->node_type () == AST_Decl::NT_struct) { check_for_struct = I_TRUE; st1 = AST_Structure::narrow_from_decl (t); @@ -114,8 +114,8 @@ AST_illegal_recursive_type (AST_Decl *t) { return I_FALSE; // NOT ILLEGAL. } - } - else if (t->node_type () == AST_Decl::NT_union) + } + else if (t->node_type () == AST_Decl::NT_union) { check_for_union = I_TRUE; un1 = AST_Union::narrow_from_decl (t); @@ -136,36 +136,36 @@ AST_illegal_recursive_type (AST_Decl *t) AST_Structure *st2 = 0; AST_Union *un2 = 0; - while (!i->is_done ()) + while (!i->is_done ()) { s = i->item (); // If we hit a NULL we're done since it means that we're nested inside // a sequence, where recursive types may be used. - if (s == 0) + if (s == 0) { delete i; return I_FALSE; // NOT ILLEGAL. } // OK, must check this scope. - if (s->scope_node_type () == AST_Decl::NT_struct - && check_for_struct == I_TRUE) + if (s->scope_node_type () == AST_Decl::NT_struct + && check_for_struct == I_TRUE) { st2 = AST_Structure::narrow_from_scope (s); - if (st2 != 0 && st2 == st1) + if (st2 != 0 && st2 == st1) { delete i; return I_TRUE; // ILLEGAL RECURSIVE TYPE USE. } - } - else if (s->scope_node_type () == AST_Decl::NT_union - && check_for_union == I_TRUE) + } + else if (s->scope_node_type () == AST_Decl::NT_union + && check_for_union == I_TRUE) { un2 = AST_Union::narrow_from_scope (s); - if (un2 != 0 && un2 == un1) + if (un2 != 0 && un2 == un1) { delete i; return I_TRUE; // ILLEGAL RECURSIVE TYPE USE. diff --git a/TAO/TAO_IDL/ast/ast_redef.cpp b/TAO/TAO_IDL/ast/ast_redef.cpp index c018ab97118..433ff34d957 100644 --- a/TAO/TAO_IDL/ast/ast_redef.cpp +++ b/TAO/TAO_IDL/ast/ast_redef.cpp @@ -53,8 +53,8 @@ Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR Sun, Sun Microsystems and the Sun logo are trademarks or registered trademarks of Sun Microsystems, Inc. -SunSoft, Inc. -2550 Garcia Avenue +SunSoft, Inc. +2550 Garcia Avenue Mountain View, California 94043 NOTE: @@ -74,7 +74,7 @@ ACE_RCSID(ast, ast_redef, "$Id$") idl_bool can_be_redefined (AST_Decl *d) { - switch (d->node_type ()) + switch (d->node_type ()) { case AST_Decl::NT_module: case AST_Decl::NT_interface: diff --git a/TAO/TAO_IDL/ast/ast_root.cpp b/TAO/TAO_IDL/ast/ast_root.cpp index 1b08ab56cdf..7146dfb2baf 100644 --- a/TAO/TAO_IDL/ast/ast_root.cpp +++ b/TAO/TAO_IDL/ast/ast_root.cpp @@ -80,7 +80,7 @@ AST_Root::AST_Root (void) } AST_Root::AST_Root (UTL_ScopedName *n) - : AST_Decl (AST_Decl::NT_module, + : AST_Decl (AST_Decl::NT_module, n), UTL_Scope (AST_Decl::NT_module) { diff --git a/TAO/TAO_IDL/ast/ast_string.cpp b/TAO/TAO_IDL/ast/ast_string.cpp index d9ee786d29d..c71af9dc02d 100644 --- a/TAO/TAO_IDL/ast/ast_string.cpp +++ b/TAO/TAO_IDL/ast/ast_string.cpp @@ -92,10 +92,10 @@ AST_String::AST_String (AST_Expression *ms) AST_String::AST_String (AST_Expression *ms, long wide) - : AST_Decl + : AST_Decl ( wide == (long) sizeof (char) ? AST_Decl::NT_string : AST_Decl::NT_wstring, - new UTL_ScopedName + new UTL_ScopedName ( new Identifier ((wide == (long) sizeof (char)) ? "string" : "wstring"), 0 diff --git a/TAO/TAO_IDL/ast/ast_structure.cpp b/TAO/TAO_IDL/ast/ast_structure.cpp index 8292258397f..76a146c4e4b 100644 --- a/TAO/TAO_IDL/ast/ast_structure.cpp +++ b/TAO/TAO_IDL/ast/ast_structure.cpp @@ -83,7 +83,7 @@ AST_Structure::AST_Structure (void) AST_Structure::AST_Structure (UTL_ScopedName *n, idl_bool local, idl_bool abstract) - : AST_Decl (AST_Decl::NT_struct, + : AST_Decl (AST_Decl::NT_struct, n), UTL_Scope (AST_Decl::NT_struct), COMMON_Base (local, @@ -97,7 +97,7 @@ AST_Structure::AST_Structure (AST_Decl::NodeType nt, UTL_ScopedName *n, idl_bool local, idl_bool abstract) - : AST_Decl (nt, + : AST_Decl (nt, n), UTL_Scope (nt), COMMON_Base (local, diff --git a/TAO/TAO_IDL/ast/ast_type.cpp b/TAO/TAO_IDL/ast/ast_type.cpp index 20a1383f9d8..63d6d727f72 100644 --- a/TAO/TAO_IDL/ast/ast_type.cpp +++ b/TAO/TAO_IDL/ast/ast_type.cpp @@ -81,7 +81,7 @@ AST_Type::AST_Type (void) AST_Type::AST_Type (AST_Decl::NodeType nt, UTL_ScopedName *n) - : AST_Decl (nt, + : AST_Decl (nt, n), ifr_added_ (0), ifr_fwd_added_ (0) @@ -109,25 +109,25 @@ AST_Type::is_defined (void) return 1; } -idl_bool +idl_bool AST_Type::ifr_added (void) { return this->ifr_added_; } -void +void AST_Type::ifr_added (idl_bool val) { this->ifr_added_ = val; } -idl_bool +idl_bool AST_Type::ifr_fwd_added (void) { return this->ifr_fwd_added_; } -void +void AST_Type::ifr_fwd_added (idl_bool val) { this->ifr_fwd_added_ = val; diff --git a/TAO/TAO_IDL/ast/ast_typedef.cpp b/TAO/TAO_IDL/ast/ast_typedef.cpp index d319d6d58dc..6e006f816ea 100644 --- a/TAO/TAO_IDL/ast/ast_typedef.cpp +++ b/TAO/TAO_IDL/ast/ast_typedef.cpp @@ -85,9 +85,9 @@ AST_Typedef::AST_Typedef (AST_Type *bt, UTL_ScopedName *n, idl_bool local, idl_bool abstract) - : AST_Decl (AST_Decl::NT_typedef, + : AST_Decl (AST_Decl::NT_typedef, n), - COMMON_Base (bt->is_local () || local, + COMMON_Base (bt->is_local () || local, abstract), pd_base_type (bt) { diff --git a/TAO/TAO_IDL/ast/ast_union.cpp b/TAO/TAO_IDL/ast/ast_union.cpp index 16b6ee564b7..06e32f438cc 100644 --- a/TAO/TAO_IDL/ast/ast_union.cpp +++ b/TAO/TAO_IDL/ast/ast_union.cpp @@ -87,7 +87,7 @@ AST_Union::AST_Union (AST_ConcreteType *dt, UTL_ScopedName *n, idl_bool local, idl_bool abstract) - : AST_Decl (AST_Decl::NT_union, + : AST_Decl (AST_Decl::NT_union, n), UTL_Scope (AST_Decl::NT_union), COMMON_Base (local, diff --git a/TAO/TAO_IDL/ast/ast_union_branch.cpp b/TAO/TAO_IDL/ast/ast_union_branch.cpp index 53aba9bb907..61309c2bdbb 100644 --- a/TAO/TAO_IDL/ast/ast_union_branch.cpp +++ b/TAO/TAO_IDL/ast/ast_union_branch.cpp @@ -83,10 +83,10 @@ AST_UnionBranch::AST_UnionBranch (void) AST_UnionBranch::AST_UnionBranch (UTL_LabelList *ll, AST_Type *ft, UTL_ScopedName *n) - : AST_Field (AST_Decl::NT_union_branch, - ft, + : AST_Field (AST_Decl::NT_union_branch, + ft, n), - AST_Decl (AST_Decl::NT_union_branch, + AST_Decl (AST_Decl::NT_union_branch, n), pd_ll (ll) { diff --git a/TAO/TAO_IDL/be/be_argument.cpp b/TAO/TAO_IDL/be/be_argument.cpp index 0030e0882ce..82c9d2e64d1 100644 --- a/TAO/TAO_IDL/be/be_argument.cpp +++ b/TAO/TAO_IDL/be/be_argument.cpp @@ -29,16 +29,16 @@ be_argument::be_argument (void) { } -be_argument::be_argument (AST_Argument::Direction d, +be_argument::be_argument (AST_Argument::Direction d, AST_Type *ft, UTL_ScopedName *n) - : AST_Argument (d, - ft, + : AST_Argument (d, + ft, n), - AST_Field (AST_Decl::NT_argument, - ft, + AST_Field (AST_Decl::NT_argument, + ft, n), - AST_Decl (AST_Decl::NT_argument, + AST_Decl (AST_Decl::NT_argument, n) { } diff --git a/TAO/TAO_IDL/be/be_array.cpp b/TAO/TAO_IDL/be/be_array.cpp index 4771a00999d..3499d1ec200 100644 --- a/TAO/TAO_IDL/be/be_array.cpp +++ b/TAO/TAO_IDL/be/be_array.cpp @@ -35,15 +35,15 @@ be_array::be_array (UTL_ScopedName *n, UTL_ExprList *dims, idl_bool local, idl_bool abstract) - : AST_Array (n, - ndims, - dims, - local, + : AST_Array (n, + ndims, + dims, + local, abstract), - AST_Decl (AST_Decl::NT_array, - n, + AST_Decl (AST_Decl::NT_array, + n, I_TRUE), - COMMON_Base (local, + COMMON_Base (local, abstract), tao_name_ (0) { @@ -191,7 +191,7 @@ be_array::create_name (void) // Code generation int -be_array::gen_dimensions (TAO_OutStream *os, +be_array::gen_dimensions (TAO_OutStream *os, unsigned short slice) { // Loop index. diff --git a/TAO/TAO_IDL/be/be_attribute.cpp b/TAO/TAO_IDL/be/be_attribute.cpp index b7bde916774..fe7f4e604bf 100644 --- a/TAO/TAO_IDL/be/be_attribute.cpp +++ b/TAO/TAO_IDL/be/be_attribute.cpp @@ -43,17 +43,17 @@ be_attribute::be_attribute (idl_bool ro, UTL_ScopedName *n, idl_bool local, idl_bool abstract) - : AST_Attribute (ro, - ft, - n, - local, + : AST_Attribute (ro, + ft, + n, + local, abstract), - AST_Field (AST_Decl::NT_attr, - ft, + AST_Field (AST_Decl::NT_attr, + ft, n), - AST_Decl (AST_Decl::NT_attr, + AST_Decl (AST_Decl::NT_attr, n), - COMMON_Base (local, + COMMON_Base (local, abstract) { be_operation_default_strategy *bods = 0; diff --git a/TAO/TAO_IDL/be/be_constant.cpp b/TAO/TAO_IDL/be/be_constant.cpp index 74db9dcea4d..96bf7c9c6ad 100644 --- a/TAO/TAO_IDL/be/be_constant.cpp +++ b/TAO/TAO_IDL/be/be_constant.cpp @@ -33,10 +33,10 @@ be_constant::be_constant (void) be_constant::be_constant (AST_Expression::ExprType et, AST_Expression *v, UTL_ScopedName *n) - : AST_Constant (et, - v, + : AST_Constant (et, + v, n), - AST_Decl (AST_Decl::NT_const, + AST_Decl (AST_Decl::NT_const, n) { this->size_type (be_decl::FIXED); diff --git a/TAO/TAO_IDL/be/be_decl.cpp b/TAO/TAO_IDL/be/be_decl.cpp index 93ffec62731..05b1983313b 100644 --- a/TAO/TAO_IDL/be/be_decl.cpp +++ b/TAO/TAO_IDL/be/be_decl.cpp @@ -50,7 +50,7 @@ be_decl::be_decl (void) // Constructor be_decl::be_decl (AST_Decl::NodeType type, UTL_ScopedName *n) - : AST_Decl (type, + : AST_Decl (type, n), cli_hdr_gen_ (I_FALSE), cli_stub_gen_ (I_FALSE), @@ -380,12 +380,12 @@ be_decl::scope (void) { be_decl *d = this; - switch (this->node_type ()) + switch (this->node_type ()) { case AST_Decl::NT_interface_fwd: // Resolve forward declared interface by looking at full_definition() // field and iterating. - d = + d = be_interface::narrow_from_decl ( (be_interface_fwd::narrow_from_decl (this))->full_definition () ); diff --git a/TAO/TAO_IDL/be/be_enum.cpp b/TAO/TAO_IDL/be/be_enum.cpp index 61a761908f8..51b02972995 100644 --- a/TAO/TAO_IDL/be/be_enum.cpp +++ b/TAO/TAO_IDL/be/be_enum.cpp @@ -33,13 +33,13 @@ be_enum::be_enum (void) be_enum::be_enum (UTL_ScopedName *n, idl_bool local, idl_bool abstract) - : AST_Enum (n, - local, + : AST_Enum (n, + local, abstract), - AST_Decl (AST_Decl::NT_enum, + AST_Decl (AST_Decl::NT_enum, n), UTL_Scope (AST_Decl::NT_enum), - COMMON_Base (local, + COMMON_Base (local, abstract) { this->size_type (be_decl::FIXED); diff --git a/TAO/TAO_IDL/be/be_enum_val.cpp b/TAO/TAO_IDL/be/be_enum_val.cpp index 467182d36b8..84f0b1b7953 100644 --- a/TAO/TAO_IDL/be/be_enum_val.cpp +++ b/TAO/TAO_IDL/be/be_enum_val.cpp @@ -29,13 +29,13 @@ be_enum_val::be_enum_val (void) { } -be_enum_val::be_enum_val (unsigned long v, +be_enum_val::be_enum_val (unsigned long v, UTL_ScopedName *n) : AST_Constant (AST_Expression::EV_ulong, AST_Decl::NT_enum_val, new AST_Expression(v), n), - AST_Decl (AST_Decl::NT_enum_val, + AST_Decl (AST_Decl::NT_enum_val, n) { } diff --git a/TAO/TAO_IDL/be/be_exception.cpp b/TAO/TAO_IDL/be/be_exception.cpp index 84edf8dd324..1df3a76eeec 100644 --- a/TAO/TAO_IDL/be/be_exception.cpp +++ b/TAO/TAO_IDL/be/be_exception.cpp @@ -34,14 +34,14 @@ be_exception::be_exception (void) be_exception::be_exception (UTL_ScopedName *n, idl_bool local, idl_bool abstract) - : AST_Decl (AST_Decl::NT_except, + : AST_Decl (AST_Decl::NT_except, n), - AST_Structure (AST_Decl::NT_except, - n, - local, + AST_Structure (AST_Decl::NT_except, + n, + local, abstract), UTL_Scope (AST_Decl::NT_except), - COMMON_Base (local, + COMMON_Base (local, abstract) { // Always the case. diff --git a/TAO/TAO_IDL/be/be_expression.cpp b/TAO/TAO_IDL/be/be_expression.cpp index 51039a7490a..1510eb257cf 100644 --- a/TAO/TAO_IDL/be/be_expression.cpp +++ b/TAO/TAO_IDL/be/be_expression.cpp @@ -31,7 +31,7 @@ be_expression::be_expression (UTL_ScopedName *n) } be_expression::be_expression (AST_Expression *b, AST_Expression::ExprType t) - : AST_Expression (b, + : AST_Expression (b, t) { } @@ -39,8 +39,8 @@ be_expression::be_expression (AST_Expression *b, AST_Expression::ExprType t) be_expression::be_expression (AST_Expression::ExprComb c, AST_Expression *v1, AST_Expression *v2) - : AST_Expression (c, - v1, + : AST_Expression (c, + v1, v2) { } @@ -50,9 +50,9 @@ be_expression::be_expression (long l) { } -be_expression::be_expression (long l, +be_expression::be_expression (long l, AST_Expression::ExprType t) - : AST_Expression (l, + : AST_Expression (l, t) { } diff --git a/TAO/TAO_IDL/be/be_factory.cpp b/TAO/TAO_IDL/be/be_factory.cpp index f34748ac21a..0729b1872eb 100644 --- a/TAO/TAO_IDL/be/be_factory.cpp +++ b/TAO/TAO_IDL/be/be_factory.cpp @@ -30,13 +30,13 @@ be_factory::be_factory (void) } be_factory::be_factory (UTL_ScopedName *n) - : + : AST_Factory (n), - - AST_Decl (AST_Decl::NT_factory, + + AST_Decl (AST_Decl::NT_factory, n), UTL_Scope (AST_Decl::NT_factory), - COMMON_Base (1, + COMMON_Base (1, 0) //@@ Always local, never abstract { } diff --git a/TAO/TAO_IDL/be/be_field.cpp b/TAO/TAO_IDL/be/be_field.cpp index e013b6c55e6..2eeaaba83ff 100644 --- a/TAO/TAO_IDL/be/be_field.cpp +++ b/TAO/TAO_IDL/be/be_field.cpp @@ -29,15 +29,15 @@ be_field::be_field (void) { } -be_field::be_field (AST_Type *ft, - UTL_ScopedName *n, +be_field::be_field (AST_Type *ft, + UTL_ScopedName *n, Visibility vis) - : AST_Field (ft, - n, + : AST_Field (ft, + n, vis), - AST_Decl (AST_Decl::NT_field, + AST_Decl (AST_Decl::NT_field, n), - COMMON_Base (ft->is_local (), + COMMON_Base (ft->is_local (), ft->is_abstract ()) { } diff --git a/TAO/TAO_IDL/be/be_generator.cpp b/TAO/TAO_IDL/be/be_generator.cpp index e22b03879cf..09c0088646a 100644 --- a/TAO/TAO_IDL/be/be_generator.cpp +++ b/TAO/TAO_IDL/be/be_generator.cpp @@ -233,8 +233,8 @@ be_generator::create_valuetype (UTL_ScopedName *n, { be_valuetype *retval = 0; ACE_NEW_RETURN (retval, - be_valuetype (n, - ih, + be_valuetype (n, + ih, nih), 0); @@ -246,8 +246,8 @@ be_generator::create_valuetype_fwd (UTL_ScopedName *n) { be_valuetype_fwd *retval = 0; ACE_NEW_RETURN (retval, - be_valuetype_fwd (this->create_valuetype (n, - 0, + be_valuetype_fwd (this->create_valuetype (n, + 0, -1), n), 0); @@ -292,8 +292,8 @@ be_generator::create_enum (UTL_ScopedName *n, { be_enum *retval = 0; ACE_NEW_RETURN (retval, - be_enum (n, - local, + be_enum (n, + local, abstract), 0); @@ -326,8 +326,8 @@ be_generator::create_field (AST_Type *ft, { be_field *retval = 0; ACE_NEW_RETURN (retval, - be_field (ft, - n, + be_field (ft, + n, vis), 0); @@ -341,8 +341,8 @@ be_generator::create_argument (AST_Argument::Direction d, { be_argument *retval = 0; ACE_NEW_RETURN (retval, - be_argument (d, - ft, + be_argument (d, + ft, n), 0); @@ -392,8 +392,8 @@ be_generator::create_union_branch (UTL_LabelList *ll, { be_union_branch *retval = 0; ACE_NEW_RETURN (retval, - be_union_branch (ll, - ft, + be_union_branch (ll, + ft, n), 0); @@ -406,7 +406,7 @@ be_generator::create_union_label (AST_UnionLabel::UnionLabel ul, { be_union_label *retval = 0; ACE_NEW_RETURN (retval, - be_union_label (ul, + be_union_label (ul, lv), 0); @@ -420,8 +420,8 @@ be_generator::create_constant (AST_Expression::ExprType et, { be_constant *retval = 0; ACE_NEW_RETURN (retval, - be_constant (et, - ev, + be_constant (et, + ev, n), 0); @@ -440,12 +440,12 @@ be_generator::create_expr (UTL_ScopedName *n) } AST_Expression * -be_generator::create_expr (AST_Expression *b, +be_generator::create_expr (AST_Expression *b, AST_Expression::ExprType t) { be_expression *retval = 0; ACE_NEW_RETURN (retval, - be_expression (b, + be_expression (b, t), 0); @@ -459,7 +459,7 @@ be_generator::create_expr (AST_Expression::ExprComb c, { be_expression *retval = 0; ACE_NEW_RETURN (retval, - be_expression (c, + be_expression (c, v1, v2), 0); @@ -479,12 +479,12 @@ be_generator::create_expr (long l) } AST_Expression * -be_generator::create_expr (long l, +be_generator::create_expr (long l, AST_Expression::ExprType t) { be_expression *retval = 0; ACE_NEW_RETURN (retval, - be_expression (l, + be_expression (l, t), 0); @@ -563,7 +563,7 @@ be_generator::create_enum_val (unsigned long v, { be_enum_val *retval = 0; ACE_NEW_RETURN (retval, - be_enum_val (v, + be_enum_val (v, n), 0); @@ -637,9 +637,9 @@ be_generator::create_typedef (AST_Type *bt, { be_typedef *retval = 0; ACE_NEW_RETURN (retval, - be_typedef (bt, - n, - local, + be_typedef (bt, + n, + local, abstract), 0); diff --git a/TAO/TAO_IDL/be/be_global.cpp b/TAO/TAO_IDL/be/be_global.cpp index 4c883e1dea7..232abfa9944 100644 --- a/TAO/TAO_IDL/be/be_global.cpp +++ b/TAO/TAO_IDL/be/be_global.cpp @@ -14,7 +14,7 @@ // // = AUTHOR // Jeff Parsons <parsons@cs.wustl.edu> -// +// // ============================================================================ #include "idl.h" @@ -73,7 +73,7 @@ BE_GlobalData::BE_GlobalData (void) } BE_GlobalData::~BE_GlobalData (void) -{ +{ } // To switch between changing or non-changing standard include files @@ -739,7 +739,7 @@ BE_GlobalData::exception_support (void) return this->exception_support_; } -void +void BE_GlobalData::use_raw_throw (idl_bool val) { this->use_raw_throw_ = val; diff --git a/TAO/TAO_IDL/be/be_interface_fwd.cpp b/TAO/TAO_IDL/be/be_interface_fwd.cpp index bb1f0a88717..00e1f623e9c 100644 --- a/TAO/TAO_IDL/be/be_interface_fwd.cpp +++ b/TAO/TAO_IDL/be/be_interface_fwd.cpp @@ -28,18 +28,18 @@ ACE_RCSID(be, be_interface_fwd, "$Id$") be_interface_fwd::be_interface_fwd (void) { // Always the case. - this->size_type (be_decl::VARIABLE); + this->size_type (be_decl::VARIABLE); } be_interface_fwd::be_interface_fwd (AST_Interface *dummy, UTL_ScopedName *n) - : AST_InterfaceFwd (dummy, + : AST_InterfaceFwd (dummy, n), - AST_Decl (AST_Decl::NT_interface_fwd, + AST_Decl (AST_Decl::NT_interface_fwd, n) { // Always the case. - this->size_type (be_decl::VARIABLE); + this->size_type (be_decl::VARIABLE); } be_interface_fwd::~be_interface_fwd (void) diff --git a/TAO/TAO_IDL/be/be_interface_strategy.cpp b/TAO/TAO_IDL/be/be_interface_strategy.cpp index 241cd44ec8e..ef9e1f5a621 100644 --- a/TAO/TAO_IDL/be/be_interface_strategy.cpp +++ b/TAO/TAO_IDL/be/be_interface_strategy.cpp @@ -686,7 +686,7 @@ be_interface_default_strategy::client_scope (void) ACE_OS::strncpy (this->client_scope_, full_name, length); this->client_scope_[length] = '\0'; - + return this->client_scope_; } const char * @@ -704,7 +704,7 @@ be_interface_default_strategy::flat_client_scope (void) ACE_OS::strncpy (this->flat_client_scope_, full_name, length); this->flat_client_scope_[length] = '\0'; - + return this->flat_client_scope_; } @@ -717,16 +717,16 @@ be_interface_default_strategy::server_scope (void) const char *full_name = this->node_->full_coll_name (be_interface::DIRECT); - + const char *name = this->node_->local_coll_name (be_interface::DIRECT); - + int offset = ACE_OS::strlen (name); int length = ACE_OS::strlen (full_name) - offset; this->server_scope_ = new char[length+1]; ACE_OS::strncpy (this->server_scope_, full_name, length); this->server_scope_[length] = '\0'; - + return this->server_scope_; } @@ -745,7 +745,7 @@ be_interface_default_strategy::flat_server_scope (void) ACE_OS::strncpy (this->flat_server_scope_, full_name, length); this->flat_server_scope_[length] = '\0'; - + return this->flat_server_scope_; } @@ -857,7 +857,7 @@ be_interface_default_strategy::full_direct_proxy_impl_name (void) const char *scope = this->server_scope (); const char *base_name = this->direct_proxy_impl_name (); - + int length = ACE_OS::strlen (scope) + ACE_OS::strlen (base_name); this->full_direct_proxy_impl_name_ = new char[length+1]; ACE_OS::strcpy (this->full_direct_proxy_impl_name_, scope); @@ -982,6 +982,8 @@ be_interface_amh_strategy::next_state (TAO_CodeGen::CG_STATE current_state, { switch (current_state) { + case TAO_CodeGen::TAO_INTERFACE_SH: + return TAO_CodeGen::TAO_INTERFACE_AMH_SH; case TAO_CodeGen::TAO_INTERFACE_SS: return TAO_CodeGen::TAO_INTERFACE_AMH_SS; default: diff --git a/TAO/TAO_IDL/be/be_module.cpp b/TAO/TAO_IDL/be/be_module.cpp index d808eaee384..043dab1f1a3 100644 --- a/TAO/TAO_IDL/be/be_module.cpp +++ b/TAO/TAO_IDL/be/be_module.cpp @@ -31,7 +31,7 @@ be_module::be_module (void) be_module::be_module (UTL_ScopedName *n) : AST_Module (n), - AST_Decl (AST_Decl::NT_module, + AST_Decl (AST_Decl::NT_module, n), UTL_Scope (AST_Decl::NT_module) { diff --git a/TAO/TAO_IDL/be/be_native.cpp b/TAO/TAO_IDL/be/be_native.cpp index cd1065cb7aa..93e3d1e3d1a 100644 --- a/TAO/TAO_IDL/be/be_native.cpp +++ b/TAO/TAO_IDL/be/be_native.cpp @@ -29,7 +29,7 @@ be_native::be_native (void) be_native::be_native (UTL_ScopedName *n) : AST_Native (n), - AST_Decl (AST_Decl::NT_native, + AST_Decl (AST_Decl::NT_native, n) { } diff --git a/TAO/TAO_IDL/be/be_operation.cpp b/TAO/TAO_IDL/be/be_operation.cpp index 0e251e7f8ab..4af73933e07 100644 --- a/TAO/TAO_IDL/be/be_operation.cpp +++ b/TAO/TAO_IDL/be/be_operation.cpp @@ -36,15 +36,15 @@ be_operation::be_operation (AST_Type *rt, UTL_ScopedName *n, idl_bool local, idl_bool abstract) - : AST_Operation (rt, - fl, - n, - local, + : AST_Operation (rt, + fl, + n, + local, abstract), - AST_Decl (AST_Decl::NT_op, + AST_Decl (AST_Decl::NT_op, n), UTL_Scope (AST_Decl::NT_op), - COMMON_Base (local, + COMMON_Base (local, abstract) { ACE_NEW (this->strategy_, @@ -77,8 +77,8 @@ be_argument * be_operation::add_argument_to_scope (be_argument *arg) { this->add_to_scope (arg); - this->add_to_referenced (arg, - 0, + this->add_to_referenced (arg, + 0, 0); return arg; } @@ -96,7 +96,7 @@ be_operation::compute_size_type (void) // If there are elements in this scope, // instantiate a scope iterator. ACE_NEW_RETURN (si, - UTL_ScopeActiveIterator (this, + UTL_ScopeActiveIterator (this, UTL_Scope::IK_decls), -1); diff --git a/TAO/TAO_IDL/be/be_operation_strategy.cpp b/TAO/TAO_IDL/be/be_operation_strategy.cpp index d230eceb93e..ad5550ac1de 100644 --- a/TAO/TAO_IDL/be/be_operation_strategy.cpp +++ b/TAO/TAO_IDL/be/be_operation_strategy.cpp @@ -278,18 +278,12 @@ be_operation_amh_strategy::~be_operation_amh_strategy (void) TAO_CodeGen::CG_STATE be_operation_amh_strategy::next_state ( TAO_CodeGen::CG_STATE current_state, - int /*is_extra_state*/ + int is_extra_state ) { - switch (current_state) - { - case TAO_CodeGen::TAO_OPERATION_SS: - return TAO_CodeGen::TAO_OPERATION_AMH_SS; - case TAO_CodeGen::TAO_INTERFACE_SS: - return TAO_CodeGen::TAO_INTERFACE_AMH_SS; - default: - return current_state; - } +// We don't know yet if we need extra state for AMH but +// we''ll leave the placeholder code her anyways ... + return current_state; } be_operation* diff --git a/TAO/TAO_IDL/be/be_predefined_type.cpp b/TAO/TAO_IDL/be/be_predefined_type.cpp index a5263719724..ddab9500d21 100644 --- a/TAO/TAO_IDL/be/be_predefined_type.cpp +++ b/TAO/TAO_IDL/be/be_predefined_type.cpp @@ -31,10 +31,10 @@ be_predefined_type::be_predefined_type (void) be_predefined_type::be_predefined_type (AST_PredefinedType::PredefinedType t, UTL_ScopedName *n) - : AST_PredefinedType (t, + : AST_PredefinedType (t, n), - AST_Decl (AST_Decl::NT_pre_defined, - n, + AST_Decl (AST_Decl::NT_pre_defined, + n, I_TRUE) { // Generate a new Scoped Name for us such that we belong to the CORBA @@ -222,7 +222,7 @@ be_predefined_type::compute_tc_name (void) case AST_PredefinedType::PT_pseudo: { char tcname [100]; - ACE_OS::sprintf (tcname, + ACE_OS::sprintf (tcname, "_tc_%s", this->name ()->last_component ()->get_string ()); @@ -234,7 +234,7 @@ be_predefined_type::compute_tc_name (void) ACE_ERROR ((LM_WARNING, "Unknown or invalid predefined type")); break; } - + ACE_NEW (conc_name, UTL_ScopedName (id, 0)); diff --git a/TAO/TAO_IDL/be/be_produce.cpp b/TAO/TAO_IDL/be/be_produce.cpp index d6e95069c6c..ad7b39a558c 100644 --- a/TAO/TAO_IDL/be/be_produce.cpp +++ b/TAO/TAO_IDL/be/be_produce.cpp @@ -102,7 +102,7 @@ BE_abort (void) ACE_OS::exit (1); } - + // Do the work of this BE. This is the starting point for code generation. TAO_IDL_BE_Export void BE_produce (void) @@ -142,7 +142,7 @@ BE_produce (void) ACE_NEW (visitor, be_visitor_ami_pre_proc (local_ctx)); - + if (root->accept (visitor) == -1) { ACE_ERROR ((LM_ERROR, @@ -164,7 +164,7 @@ BE_produce (void) ACE_NEW (visitor, be_visitor_amh_pre_proc (local_ctx)); - + if (root->accept (visitor) == -1) { ACE_ERROR ((LM_ERROR, @@ -308,11 +308,11 @@ BE_produce (void) } } - // Check if the flags are set for generating the + // Check if the flags are set for generating the // the implementation header and skeleton files. if (be_global->gen_impl_files ()) { - // (8) generate implementation header. + // (8) generate implementation header. ctx.reset (); ctx.state (TAO_CodeGen::TAO_ROOT_IH); @@ -327,16 +327,16 @@ BE_produce (void) "implementation skeletons for Root failed\n")); BE_abort (); } - + delete visitor; - - // (9) Generate implementation source. + + // (9) Generate implementation source. ctx.reset (); ctx.state (TAO_CodeGen::TAO_ROOT_IS); // Create a visitor. visitor = tao_cg->make_visitor (&ctx); - + // Generate code for the implementation source. if (root->accept (visitor) == -1) { @@ -345,7 +345,7 @@ BE_produce (void) "implementation skeletons for Root failed\n")); BE_abort (); } - + delete visitor; } diff --git a/TAO/TAO_IDL/be/be_root.cpp b/TAO/TAO_IDL/be/be_root.cpp index d3a9048f596..65385b6255c 100644 --- a/TAO/TAO_IDL/be/be_root.cpp +++ b/TAO/TAO_IDL/be/be_root.cpp @@ -33,7 +33,7 @@ be_root::be_root (void) // Constructor used to build the root of the abstract syntax tree (AST). be_root::be_root (UTL_ScopedName *n) : AST_Root (n), - AST_Decl (AST_Decl::NT_root, + AST_Decl (AST_Decl::NT_root, n), UTL_Scope (AST_Decl::NT_root) diff --git a/TAO/TAO_IDL/be/be_scope.cpp b/TAO/TAO_IDL/be/be_scope.cpp index 277aad714f1..ef16389e033 100644 --- a/TAO/TAO_IDL/be/be_scope.cpp +++ b/TAO/TAO_IDL/be/be_scope.cpp @@ -73,7 +73,7 @@ be_scope::destroy (void) { AST_Decl *i = 0; UTL_ScopeActiveIterator *iter = 0; - + ACE_NEW (iter, UTL_ScopeActiveIterator (this, IK_decls)); diff --git a/TAO/TAO_IDL/be/be_sequence.cpp b/TAO/TAO_IDL/be/be_sequence.cpp index fa8e37aec83..7ae229dc6a2 100644 --- a/TAO/TAO_IDL/be/be_sequence.cpp +++ b/TAO/TAO_IDL/be/be_sequence.cpp @@ -39,14 +39,14 @@ be_sequence::be_sequence (AST_Expression *v, AST_Type *t, idl_bool local, idl_bool abstract) - : AST_Sequence (v, - t, - t->is_local () || local, + : AST_Sequence (v, + t, + t->is_local () || local, abstract), AST_Decl (AST_Decl::NT_sequence, 0, I_TRUE), - COMMON_Base (t->is_local () || local, + COMMON_Base (t->is_local () || local, abstract), mt_ (be_sequence::MNG_UNKNOWN) { @@ -65,8 +65,8 @@ be_sequence::gen_name (void) be_type *bt = 0; // Base type. // Reset the buffer. - ACE_OS::memset (namebuf, - '\0', + ACE_OS::memset (namebuf, + '\0', NAMEBUFSIZE); // Retrieve the base type. @@ -107,14 +107,14 @@ be_sequence::gen_name (void) UTL_Scope *parent = this->defined_in (); seq->set_defined_in (parent); parent->add_sequence (seq); - ACE_OS::sprintf (namebuf, - "_tao_seq_%s", + ACE_OS::sprintf (namebuf, + "_tao_seq_%s", seq->gen_name ()); } else { - ACE_OS::sprintf (namebuf, - "_tao_seq_%s", + ACE_OS::sprintf (namebuf, + "_tao_seq_%s", bt->local_name ()->get_string ()); } @@ -248,7 +248,7 @@ be_sequence::managed_type (void) break; case AST_Decl::NT_pre_defined: { - be_predefined_type *bpd = + be_predefined_type *bpd = be_predefined_type::narrow_from_decl (prim_type); if (bpd->pt () == AST_PredefinedType::PT_pseudo) @@ -310,8 +310,8 @@ const char * be_sequence::instance_name () { static char namebuf[NAMEBUFSIZE]; - ACE_OS::memset (namebuf, - '\0', + ACE_OS::memset (namebuf, + '\0', NAMEBUFSIZE); be_type *bt = 0; @@ -407,7 +407,7 @@ be_sequence::instance_name () be_predefined_type *predef = be_predefined_type::narrow_from_decl (prim_type); - if (predef != 0 + if (predef != 0 && predef->pt() == AST_PredefinedType::PT_octet) { ACE_OS::sprintf (namebuf, diff --git a/TAO/TAO_IDL/be/be_string.cpp b/TAO/TAO_IDL/be/be_string.cpp index ea293d78f01..d2f5dff0608 100644 --- a/TAO/TAO_IDL/be/be_string.cpp +++ b/TAO/TAO_IDL/be/be_string.cpp @@ -42,7 +42,7 @@ be_string::be_string (AST_Expression *v) this->size_type (be_decl::VARIABLE); } -be_string::be_string (AST_Expression *v, +be_string::be_string (AST_Expression *v, long wide) : AST_String (v, wide), AST_Decl (wide == (long) sizeof (char) diff --git a/TAO/TAO_IDL/be/be_structure.cpp b/TAO/TAO_IDL/be/be_structure.cpp index 0530a2db8bf..1df45009625 100644 --- a/TAO/TAO_IDL/be/be_structure.cpp +++ b/TAO/TAO_IDL/be/be_structure.cpp @@ -32,10 +32,10 @@ be_structure::be_structure (void) be_structure::be_structure (UTL_ScopedName *n, idl_bool local, idl_bool abstract) - : AST_Decl (AST_Decl::NT_struct, + : AST_Decl (AST_Decl::NT_struct, n), UTL_Scope (AST_Decl::NT_struct), - COMMON_Base (local, + COMMON_Base (local, abstract) { } @@ -90,7 +90,7 @@ be_structure::gen_var_defn (char *) *ch << be_nl; // Assignment operator from a pointer. - *ch << namebuf << " &operator= (" << this->local_name () + *ch << namebuf << " &operator= (" << this->local_name () << " *);" << be_nl; // Assignment from _var. @@ -164,20 +164,20 @@ be_structure::gen_var_impl (char *, char fname [NAMEBUFSIZE]; char lname [NAMEBUFSIZE]; - ACE_OS::memset (fname, - '\0', + ACE_OS::memset (fname, + '\0', NAMEBUFSIZE); - ACE_OS::sprintf (fname, - "%s_var", + ACE_OS::sprintf (fname, + "%s_var", this->full_name ()); - ACE_OS::memset (lname, - '\0', + ACE_OS::memset (lname, + '\0', NAMEBUFSIZE); - ACE_OS::sprintf (lname, - "%s_var", + ACE_OS::sprintf (lname, + "%s_var", this->local_name ()->get_string ()); ci = tao_cg->client_inline (); @@ -273,7 +273,7 @@ be_structure::gen_var_impl (char *, << "else" << be_idt_nl << "{" << be_idt_nl << this->local_name () << " *deep_copy =" << be_idt_nl - << "new " << this->local_name () << " (*p.ptr_);" + << "new " << this->local_name () << " (*p.ptr_);" << be_uidt_nl << be_nl << "if (deep_copy != 0)" << be_idt_nl << "{" << be_idt_nl @@ -515,7 +515,7 @@ be_structure::gen_out_defn (char *) *ch << "private:" << be_idt_nl; *ch << local_name () << " *&ptr_;" << be_nl; *ch << "// Assignment from T_var not allowed." << be_nl; - *ch << "void operator= (const " << this->local_name () + *ch << "void operator= (const " << this->local_name () << "_var &);" << be_uidt_nl; *ch << "};" << be_nl << be_nl; diff --git a/TAO/TAO_IDL/be/be_sunsoft.cpp b/TAO/TAO_IDL/be/be_sunsoft.cpp index ece0a19776d..643d83af2cc 100644 --- a/TAO/TAO_IDL/be/be_sunsoft.cpp +++ b/TAO/TAO_IDL/be/be_sunsoft.cpp @@ -16,16 +16,16 @@ TAO_SunSoft_OutStream::~TAO_SunSoft_OutStream (void) { } -TAO_OutStream & +TAO_OutStream & TAO_SunSoft_OutStream::print (Identifier *id) { - ACE_OS::fprintf (this->fp_, + ACE_OS::fprintf (this->fp_, id->get_string ()); return *this; } -TAO_OutStream & +TAO_OutStream & TAO_SunSoft_OutStream::print (UTL_IdList *idl) { long first = I_TRUE; @@ -36,7 +36,7 @@ TAO_SunSoft_OutStream::print (UTL_IdList *idl) UTL_IdListActiveIterator (idl), *this); - while (!i->is_done ()) + while (!i->is_done ()) { if (!first) { @@ -50,7 +50,7 @@ TAO_SunSoft_OutStream::print (UTL_IdList *idl) // Print the identifier. *this << i->item (); - if (first) + if (first) { if (ACE_OS::strcmp (i->item ()->get_string (), "") != 0) { @@ -97,8 +97,8 @@ TAO_SunSoft_OutStream::print (AST_Expression *expr) break; case AST_Expression::EV_ulonglong: #if ! defined (ACE_LACKS_LONGLONG_T) - this->TAO_OutStream::print (ACE_UINT64_FORMAT_SPECIFIER "%c", - ev->u.ullval, + this->TAO_OutStream::print (ACE_UINT64_FORMAT_SPECIFIER "%c", + ev->u.ullval, 'U'); #endif /* ! defined (ACE_LACKS_LONGLONG_T) */ break; @@ -126,7 +126,7 @@ TAO_SunSoft_OutStream::print (AST_Expression *expr) else if (isprint (ev->u.cval)) this->TAO_OutStream::print ("'%c'", ev->u.cval); else if (iscntrl (ev->u.cval)) - switch (ev->u.cval) + switch (ev->u.cval) { case '\n': this->TAO_OutStream::print ("'\\n'"); @@ -155,7 +155,7 @@ TAO_SunSoft_OutStream::print (AST_Expression *expr) default: this->TAO_OutStream::print ("'\\x%x'", ev->u.cval); } - else + else this->TAO_OutStream::print ("'\\x%x'", ev->u.cval); break; case AST_Expression::EV_wchar: diff --git a/TAO/TAO_IDL/be/be_type.cpp b/TAO/TAO_IDL/be/be_type.cpp index ec34b33ad20..8133cf0a620 100644 --- a/TAO/TAO_IDL/be/be_type.cpp +++ b/TAO/TAO_IDL/be/be_type.cpp @@ -31,9 +31,9 @@ be_type::be_type (void) { } -be_type::be_type (AST_Decl::NodeType nt, +be_type::be_type (AST_Decl::NodeType nt, UTL_ScopedName *n) - : AST_Decl (nt, + : AST_Decl (nt, n), tc_name_ (0), nested_type_name_ (0) @@ -57,8 +57,8 @@ be_type::compute_tc_name (void) this->tc_name_ = 0; - ACE_OS::memset (namebuf, - '\0', + ACE_OS::memset (namebuf, + '\0', NAMEBUFSIZE); while (n->tail () != 0) @@ -83,8 +83,8 @@ be_type::compute_tc_name (void) n = (UTL_ScopedName *)n->tail (); } - ACE_OS::sprintf (namebuf, - "_tc_%s", + ACE_OS::sprintf (namebuf, + "_tc_%s", n->last_component ()->get_string ()); Identifier *id = 0; @@ -134,7 +134,7 @@ be_type::tc_name (void) // Return the type name using the ACE_NESTED_CLASS macro const char * -be_type::nested_type_name (be_decl *use_scope, +be_type::nested_type_name (be_decl *use_scope, const char *suffix, const char *prefix) { @@ -152,8 +152,8 @@ be_type::nested_type_name (be_decl *use_scope, // We can use the flat_name() method for the local_name parm but have // to construct the full name ourselves. const char * -be_type::nested_sp_type_name (be_decl *use_scope, - const char *suffix, +be_type::nested_sp_type_name (be_decl *use_scope, + const char *suffix, const char *prefix) { // Our defining scope. @@ -161,38 +161,38 @@ be_type::nested_sp_type_name (be_decl *use_scope, char fu_name [NAMEBUFSIZE]; char fl_name [NAMEBUFSIZE]; - - ACE_OS::memset (fu_name, - '\0', + + ACE_OS::memset (fu_name, + '\0', NAMEBUFSIZE); - ACE_OS::memset (fl_name, - '\0', + ACE_OS::memset (fl_name, + '\0', NAMEBUFSIZE); - + fu_scope = this->defined_in () ? be_scope::narrow_from_scope (this->defined_in ())->decl () : 0; - - ACE_OS::strcat (fu_name, + + ACE_OS::strcat (fu_name, fu_scope->full_name ()); - ACE_OS::strcat (fu_name, + ACE_OS::strcat (fu_name, "::TAO_"); - ACE_OS::strcat (fu_name, + ACE_OS::strcat (fu_name, this->flat_name()); - - ACE_OS::strcat (fl_name, + + ACE_OS::strcat (fl_name, "TAO_"); - ACE_OS::strcat (fl_name, + ACE_OS::strcat (fl_name, this->flat_name()); - - return this->nested_name (fl_name, + + return this->nested_name (fl_name, fu_name, - use_scope, - suffix, + use_scope, + suffix, prefix); } @@ -200,8 +200,8 @@ be_type::nested_sp_type_name (be_decl *use_scope, const char * be_type::nested_name (const char* local_name, const char* full_name, - be_decl *use_scope, - const char *suffix, + be_decl *use_scope, + const char *suffix, const char *prefix) { // Some compilers do not like generating a fully scoped name for a type that @@ -219,8 +219,8 @@ be_type::nested_name (const char* local_name, if (this->nested_type_name_ == 0) { - ACE_NEW_RETURN (this->nested_type_name_, - char[NAMEBUFSIZE], + ACE_NEW_RETURN (this->nested_type_name_, + char[NAMEBUFSIZE], 0); } @@ -241,16 +241,16 @@ be_type::nested_name (const char* local_name, int len_to_match = 0; // Initialize the buffers. - ACE_OS::memset (this->nested_type_name_, - '\0', + ACE_OS::memset (this->nested_type_name_, + '\0', NAMEBUFSIZE); - ACE_OS::memset (def_name, - '\0', + ACE_OS::memset (def_name, + '\0', NAMEBUFSIZE); - ACE_OS::memset (use_name, - '\0', + ACE_OS::memset (use_name, + '\0', NAMEBUFSIZE); // Traverse every component of the def_scope and use_scope beginning at the @@ -264,47 +264,47 @@ be_type::nested_name (const char* local_name, ? be_scope::narrow_from_scope (this->defined_in ())->decl () : 0; - if (def_scope - && def_scope->node_type () != AST_Decl::NT_root + if (def_scope + && def_scope->node_type () != AST_Decl::NT_root && use_scope) // If both scopes exist and that we are not in the root scope. { - ACE_OS::strcpy (def_name, + ACE_OS::strcpy (def_name, def_scope->full_name ()); - ACE_OS::strcpy (use_name, + ACE_OS::strcpy (use_name, use_scope->full_name ()); - // Find the first occurrence of a :: and advance + // Find the first occurrence of a :: and advance // the next pointers accordingly. def_next = ACE_OS::strstr (def_curr, "::"); use_next = ACE_OS::strstr (use_curr, "::"); // If the scopes are identical, don't supply them. - if (ACE_OS::strcmp (def_name, + if (ACE_OS::strcmp (def_name, use_name) == 0) { if (prefix != 0) { - ACE_OS::strcat (this->nested_type_name_, + ACE_OS::strcat (this->nested_type_name_, prefix); } - ACE_OS::strcat (this->nested_type_name_, + ACE_OS::strcat (this->nested_type_name_, local_name); if (suffix != 0) { - ACE_OS::strcat (this->nested_type_name_, + ACE_OS::strcat (this->nested_type_name_, suffix); } - + return this->nested_type_name_; } - + if (def_next != 0) { - len_to_match = + len_to_match = ACE_OS::strlen (def_curr) - ACE_OS::strlen (def_next); } else @@ -314,7 +314,7 @@ be_type::nested_name (const char* local_name, if (use_next != 0) { - int len = + int len = ACE_OS::strlen (use_curr) - ACE_OS::strlen (use_next); if (len > len_to_match) @@ -331,20 +331,20 @@ be_type::nested_name (const char* local_name, len_to_match = len; } } - - if (ACE_OS::strncmp (def_curr, - use_curr, + + if (ACE_OS::strncmp (def_curr, + use_curr, 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_OS::sprintf (this->nested_type_name_, "ACE_NESTED_CLASS ("); // Initialize the first argument. - ACE_OS::strncat (this->nested_type_name_, - def_curr, + ACE_OS::strncat (this->nested_type_name_, + def_curr, len_to_match); // Shift the current scopes to the next level. @@ -353,14 +353,14 @@ be_type::nested_name (const char* local_name, while (def_curr && use_curr) { - // Find the first occurrence of a :: and advance the + // Find the first occurrence of a :: and advance the // next pointers accordingly. def_next = ACE_OS::strstr (def_curr, "::"); use_next = ACE_OS::strstr (use_curr, "::"); if (def_next != 0) { - len_to_match = + len_to_match = ACE_OS::strlen (def_curr) - ACE_OS::strlen (def_next); } else @@ -370,7 +370,7 @@ be_type::nested_name (const char* local_name, if (use_next != 0) { - int len = + int len = ACE_OS::strlen (use_curr) - ACE_OS::strlen (use_next); if (len > len_to_match) @@ -387,18 +387,18 @@ be_type::nested_name (const char* local_name, len_to_match = len; } } - - if (ACE_OS::strncmp (def_curr, + + if (ACE_OS::strncmp (def_curr, use_curr, len_to_match) == 0) { // They have same prefix, append to arg1. - ACE_OS::strcat (this->nested_type_name_, + ACE_OS::strcat (this->nested_type_name_, "::"); - ACE_OS::strncat (this->nested_type_name_, - def_curr, + ACE_OS::strncat (this->nested_type_name_, + def_curr, len_to_match); def_curr = (def_next ? (def_next + 2) : 0); // Skip the :: @@ -418,10 +418,10 @@ be_type::nested_name (const char* local_name, // Copy the remaining def_name (if any are left). if (def_curr != 0) { - ACE_OS::strcat (this->nested_type_name_, + ACE_OS::strcat (this->nested_type_name_, def_curr); - ACE_OS::strcat (this->nested_type_name_, + ACE_OS::strcat (this->nested_type_name_, "::"); } @@ -431,16 +431,16 @@ be_type::nested_name (const char* local_name, ACE_OS::strcat (this->nested_type_name_, prefix); } - ACE_OS::strcat (this->nested_type_name_, + ACE_OS::strcat (this->nested_type_name_, local_name); if (suffix != 0) { - ACE_OS::strcat (this->nested_type_name_, + ACE_OS::strcat (this->nested_type_name_, suffix); } - ACE_OS::strcat (this->nested_type_name_, + ACE_OS::strcat (this->nested_type_name_, ")"); return this->nested_type_name_; @@ -453,12 +453,12 @@ be_type::nested_name (const char* local_name, ACE_OS::strcat (this->nested_type_name_, prefix); } - ACE_OS::strcat (this->nested_type_name_, + ACE_OS::strcat (this->nested_type_name_, full_name); if (suffix != 0) { - ACE_OS::strcat (this->nested_type_name_, + ACE_OS::strcat (this->nested_type_name_, suffix); } @@ -479,7 +479,7 @@ be_type::gen_var_defn (char *) // Implementation of the _var class. All of these get generated // in the inline file int -be_type::gen_var_impl (char *, +be_type::gen_var_impl (char *, char *) { return 0; @@ -493,7 +493,7 @@ be_type::gen_out_defn (char *) } int -be_type::gen_out_impl (char *, +be_type::gen_out_impl (char *, char *) { return 0; diff --git a/TAO/TAO_IDL/be/be_typedef.cpp b/TAO/TAO_IDL/be/be_typedef.cpp index 14533244c72..9487318da85 100644 --- a/TAO/TAO_IDL/be/be_typedef.cpp +++ b/TAO/TAO_IDL/be/be_typedef.cpp @@ -35,13 +35,13 @@ be_typedef::be_typedef (AST_Type *bt, UTL_ScopedName *n, idl_bool local, idl_bool abstract) - : AST_Typedef (bt, - n, - bt->is_local () || local, + : AST_Typedef (bt, + n, + bt->is_local () || local, abstract), - AST_Decl (AST_Decl::NT_typedef, + AST_Decl (AST_Decl::NT_typedef, n), - COMMON_Base (bt->is_local () || local, + COMMON_Base (bt->is_local () || local, abstract) { } diff --git a/TAO/TAO_IDL/be/be_union.cpp b/TAO/TAO_IDL/be/be_union.cpp index 36ba45049ae..569a2705857 100644 --- a/TAO/TAO_IDL/be/be_union.cpp +++ b/TAO/TAO_IDL/be/be_union.cpp @@ -36,18 +36,18 @@ be_union::be_union (AST_ConcreteType *dt, UTL_ScopedName *n, idl_bool local, idl_bool abstract) - : AST_Union (dt, - n, - local, + : AST_Union (dt, + n, + local, abstract), - AST_Structure (AST_Decl::NT_union, - n, - local, + AST_Structure (AST_Decl::NT_union, + n, + local, abstract), - AST_Decl (AST_Decl::NT_union, + AST_Decl (AST_Decl::NT_union, n), UTL_Scope (AST_Decl::NT_union), - COMMON_Base (local, + COMMON_Base (local, abstract) { // Always the case. @@ -88,7 +88,7 @@ be_union::gen_var_defn (char *) *ch << namebuf << " (" << this->local_name () << " *);" << be_nl; // Copy constructor. - *ch << namebuf << " (const " << namebuf + *ch << namebuf << " (const " << namebuf << " &);" << be_nl; // Fixed-size types only. @@ -154,9 +154,9 @@ be_union::gen_var_defn (char *) *ch << this->local_name () << " *_retn (void);" << be_nl; } - // Generate an additional member function that + // Generate an additional member function that // returns the underlying pointer. - *ch << this->local_name () << " *ptr (void) const;" + *ch << this->local_name () << " *ptr (void) const;" << be_uidt_nl << be_nl; // Generate the private section @@ -224,7 +224,7 @@ be_union::gen_var_impl (char *, // Copy constructor. ci->indent (); *ci << "ACE_INLINE" << be_nl; - *ci << fname << "::" << lname << " (const ::" << fname + *ci << fname << "::" << lname << " (const ::" << fname << " &p) // copy constructor" << be_nl; *ci << "{\n"; ci->incr_indent (); @@ -290,7 +290,7 @@ be_union::gen_var_impl (char *, << "else" << be_idt_nl << "{" << be_idt_nl << this->local_name () << " *deep_copy =" << be_idt_nl - << "new " << this->local_name () << " (*p.ptr_);" + << "new " << this->local_name () << " (*p.ptr_);" << be_uidt_nl << be_nl << "if (deep_copy != 0)" << be_idt_nl << "{" << be_idt_nl @@ -517,7 +517,7 @@ be_union::gen_out_defn (char *) // -> and any other extra operators. // Assignment. - *ch << namebuf << " &operator= (" << this->local_name () + *ch << namebuf << " &operator= (" << this->local_name () << " *);" << be_nl; // operator (). @@ -533,7 +533,7 @@ be_union::gen_out_defn (char *) *ch << "private:" << be_idt_nl; *ch << this->local_name () << " *&ptr_;" << be_nl; *ch << "// assignment from T_var not allowed." << be_nl; - *ch << "void operator= (const " << this->local_name () + *ch << "void operator= (const " << this->local_name () << "_var &);" << be_uidt_nl; *ch << "};" << be_nl << be_nl; diff --git a/TAO/TAO_IDL/be/be_union_branch.cpp b/TAO/TAO_IDL/be/be_union_branch.cpp index b1c5c0d8835..71c9cc6e445 100644 --- a/TAO/TAO_IDL/be/be_union_branch.cpp +++ b/TAO/TAO_IDL/be/be_union_branch.cpp @@ -32,15 +32,15 @@ be_union_branch::be_union_branch (void) be_union_branch::be_union_branch (UTL_LabelList *ll, AST_Type *ft, UTL_ScopedName *n) - : AST_UnionBranch (ll, - ft, + : AST_UnionBranch (ll, + ft, n), - AST_Field (AST_Decl::NT_union_branch, - ft, + AST_Field (AST_Decl::NT_union_branch, + ft, n), - AST_Decl (AST_Decl::NT_union_branch, + AST_Decl (AST_Decl::NT_union_branch, n), - COMMON_Base (ft->is_local (), + COMMON_Base (ft->is_local (), ft->is_abstract ()) { } @@ -55,7 +55,7 @@ be_union_branch::compute_size_type (void) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_field::compute_size_type - " - "bad field type\n"), + "bad field type\n"), -1); } diff --git a/TAO/TAO_IDL/be/be_union_label.cpp b/TAO/TAO_IDL/be/be_union_label.cpp index 6a1cd05dbec..ff9ee596a3c 100644 --- a/TAO/TAO_IDL/be/be_union_label.cpp +++ b/TAO/TAO_IDL/be/be_union_label.cpp @@ -12,7 +12,7 @@ be_union_label::be_union_label() } be_union_label::be_union_label (AST_UnionLabel::UnionLabel ul, AST_Expression *v) - : AST_UnionLabel (ul, + : AST_UnionLabel (ul, v) { } diff --git a/TAO/TAO_IDL/be/be_valuetype.cpp b/TAO/TAO_IDL/be/be_valuetype.cpp index f062c614f4c..af49c92b545 100644 --- a/TAO/TAO_IDL/be/be_valuetype.cpp +++ b/TAO/TAO_IDL/be/be_valuetype.cpp @@ -51,24 +51,24 @@ be_valuetype::be_valuetype (UTL_ScopedName *n, AST_Interface **ih, long nih, idl_bool set_abstract) - : be_interface (n, - ih, - nih, - 0, - 0, - 0, + : be_interface (n, + ih, + nih, + 0, + 0, + 0, set_abstract), - AST_Interface (n, - ih, - nih, - 0, - 0, - 0, + AST_Interface (n, + ih, + nih, + 0, + 0, + 0, set_abstract), AST_Decl (AST_Decl::NT_interface, // It's like an interface. n), UTL_Scope (AST_Decl::NT_interface), - COMMON_Base (0, + COMMON_Base (0, set_abstract), full_obv_skel_name_ (0) { @@ -200,7 +200,7 @@ be_valuetype::gen_var_defn (char *) *ch << this->local_name () << "* &out (void);" << be_nl; *ch << this->local_name () << "* _retn (void);" << be_nl; - // Generate an additional member function that returns + // Generate an additional member function that returns // the underlying pointer. *ch << this->local_name () << "* ptr (void) const;"; @@ -267,7 +267,7 @@ be_valuetype::gen_var_impl (char *, // Constructor from a pointer. cs->indent (); *cs << "ACE_INLINE" << be_nl; - *cs << fname << "::" << lname << " (" + *cs << fname << "::" << lname << " (" << this->local_name () << "* p)" << be_nl; *cs << " : ptr_ (p)" << be_nl; *cs << "{}\n\n"; @@ -279,7 +279,7 @@ be_valuetype::gen_var_impl (char *, *cs << "ACE_INLINE" << be_nl; *cs << fname << "::" << lname << " (const " << this->local_name () << "* p)" << be_nl; - *cs << " : ptr_ (ACE_const_cast(" + *cs << " : ptr_ (ACE_const_cast(" << this->local_name () << "*, p))" << be_nl; *cs << "{}\n\n"; @@ -321,7 +321,7 @@ be_valuetype::gen_var_impl (char *, cs->indent (); *cs << "ACE_INLINE" << be_nl; *cs << fname << " &" << be_nl; - *cs << fname << "::operator= (" << this->local_name () + *cs << fname << "::operator= (" << this->local_name () << "* p)" << be_nl; *cs << "{\n"; cs->incr_indent (); @@ -335,7 +335,7 @@ be_valuetype::gen_var_impl (char *, cs->indent (); *cs << "ACE_INLINE" << be_nl; *cs << fname << " &" << be_nl; - *cs << fname << "::operator= (const " << lname + *cs << fname << "::operator= (const " << lname << " &p)" << be_nl; *cs << "{\n"; cs->incr_indent (); @@ -498,7 +498,7 @@ be_valuetype::gen_out_defn (char *) } int -be_valuetype::gen_out_impl (char *, +be_valuetype::gen_out_impl (char *, char *) { TAO_OutStream *cs = 0; @@ -588,7 +588,7 @@ be_valuetype::gen_out_impl (char *, cs->indent (); *cs << "ACE_INLINE" << be_nl; *cs << fname << " &" << be_nl; - *cs << fname << "::operator= (const " << this->local_name () + *cs << fname << "::operator= (const " << this->local_name () << "_var &p)" << be_nl; *cs << "{\n"; cs->incr_indent (); @@ -603,7 +603,7 @@ be_valuetype::gen_out_impl (char *, cs->indent (); *cs << "ACE_INLINE" << be_nl; *cs << fname << " &" << be_nl; - *cs << fname << "::operator= (" << this->local_name () + *cs << fname << "::operator= (" << this->local_name () << "* p)" << be_nl; *cs << "{\n"; cs->incr_indent (); @@ -648,7 +648,7 @@ be_valuetype::gen_out_impl (char *, return 0; } -int +int be_valuetype::gen_helper_header (char* , char* ) { @@ -670,7 +670,7 @@ be_valuetype::gen_helper_header (char* , return 0; } -int +int be_valuetype::gen_helper_inline (char* , char* ) { @@ -691,9 +691,9 @@ be_valuetype::gen_helper_inline (char* , return 0; } - -int + +int be_valuetype::gen_helper_stubs (char* , char* ) { @@ -705,27 +705,27 @@ be_valuetype::gen_helper_stubs (char* , // add_ref << "void" << be_nl << "CORBA::add_ref (" << this->full_name () << " * vt)" << be_nl - << "{" + << "{" << be_idt_nl << "if (vt != 0)" << be_nl - << "{" + << "{" << be_idt_nl - << "vt->_add_ref ();" + << "vt->_add_ref ();" << be_uidt_nl - << "}" + << "}" << be_uidt_nl << "}" << be_nl << be_nl // remove_ref << "void" << be_nl << "CORBA::remove_ref (" << this->full_name () << " * vt)" << be_nl - << "{" + << "{" << be_idt_nl << "if (vt != 0)" << be_nl - << "{" + << "{" << be_idt_nl - << "vt->_remove_ref ();" + << "vt->_remove_ref ();" << be_uidt_nl - << "}" + << "}" << be_uidt_nl << "}" << be_nl << be_nl << "//@@ Boris: end experimental" << be_nl; @@ -755,7 +755,7 @@ be_valuetype::statefull_inherit (void) { rval = be_valuetype::narrow_from_decl (this->inherits ()[0]); - if (rval && (rval->is_valuetype ()) + if (rval && (rval->is_valuetype ()) && (!rval->is_abstract_valuetype ())) { return rval; diff --git a/TAO/TAO_IDL/be/be_valuetype_fwd.cpp b/TAO/TAO_IDL/be/be_valuetype_fwd.cpp index 8c7452fb4ed..7a40580c295 100644 --- a/TAO/TAO_IDL/be/be_valuetype_fwd.cpp +++ b/TAO/TAO_IDL/be/be_valuetype_fwd.cpp @@ -33,11 +33,11 @@ be_valuetype_fwd::be_valuetype_fwd (void) be_valuetype_fwd::be_valuetype_fwd (AST_Interface *dummy, UTL_ScopedName *n) - : be_interface_fwd (dummy, + : be_interface_fwd (dummy, n), - AST_InterfaceFwd (dummy, + AST_InterfaceFwd (dummy, n), - AST_Decl (AST_Decl::NT_interface_fwd, + AST_Decl (AST_Decl::NT_interface_fwd, n) { } diff --git a/TAO/TAO_IDL/be/be_visitor_amh_pre_proc.cpp b/TAO/TAO_IDL/be/be_visitor_amh_pre_proc.cpp index 90e1ed10b13..e03bdd4e6b4 100644 --- a/TAO/TAO_IDL/be/be_visitor_amh_pre_proc.cpp +++ b/TAO/TAO_IDL/be/be_visitor_amh_pre_proc.cpp @@ -35,7 +35,7 @@ be_visitor_amh_pre_proc::visit_root (be_root *node) "(%N:%l) be_visitor_amh_pre_proc::" "visit_root - visit scope failed\n"), -1); - + return 0; } @@ -49,7 +49,7 @@ be_visitor_amh_pre_proc::visit_module (be_module *node) "(%N:%l) be_visitor_amh_pre_proc::" "visit_module - visit scope failed\n"), -1); - + return 0; } @@ -60,7 +60,7 @@ be_visitor_amh_pre_proc::visit_interface (be_interface *node) { if (!node->imported () && !node->is_local ()) { - AST_Module *module = + AST_Module *module = AST_Module::narrow_from_scope (node->defined_in ()); if (!module) @@ -68,16 +68,17 @@ be_visitor_amh_pre_proc::visit_interface (be_interface *node) "(%N:%l) be_visitor_amh_pre_proc::" "visit_interface - module is null\n"), -1); - + + // Create the AMH-skeleton node be_interface *amh_class = this->create_amh_class (node); - + if (amh_class) { amh_class->set_defined_in (node->defined_in ()); - + // Insert the new amh class after the node module->be_add_interface (amh_class, node); - + // Remember from whom we were cloned amh_class->original_interface (node); } @@ -89,7 +90,7 @@ be_visitor_amh_pre_proc::visit_interface (be_interface *node) "creating the amh_class failed\n"), -1); } - + // Since this is server side only, don't generate the client stuff. // We do this by pretending that all this stuff has already been // generated. @@ -101,14 +102,14 @@ be_visitor_amh_pre_proc::visit_interface (be_interface *node) amh_class->cli_stub_cdr_op_gen (1); amh_class->cli_inline_cdr_op_gen (1); amh_class->cli_inline_gen (1); - + // Set the proper strategy be_interface_strategy *old_strategy = amh_class->set_strategy (new be_interface_amh_strategy (amh_class)); - + if (old_strategy) delete old_strategy; - +/* be_valuetype *excep_holder = this->create_exception_holder (node); if (excep_holder) { @@ -116,10 +117,12 @@ be_visitor_amh_pre_proc::visit_interface (be_interface *node) // Insert the exception holder after the original node, // this way we ensure that it is *before* the // ami handler, which is the way we want to have it. - module->be_add_interface (excep_holder, node); - module->set_has_nested_valuetype (); + //module->be_add_interface (excep_holder, node); + module->be_add_interface (excep_holder, amh_class); + module->set_has_nested_valuetype (); // Remember from whom we were cloned excep_holder->original_interface (node); +*/ /* // Set the strategy be_interface_strategy *old_strategy = @@ -129,7 +132,7 @@ be_visitor_amh_pre_proc::visit_interface (be_interface *node) if (old_strategy) delete old_strategy; */ - } +/* } else { ACE_ERROR_RETURN ((LM_ERROR, @@ -138,31 +141,70 @@ be_visitor_amh_pre_proc::visit_interface (be_interface *node) "creating the exception holder failed\n"), -1); } - - be_interface *response_handler = - this->create_response_handler (node, excep_holder); - if (response_handler) +*/ + + // Create the Server side ResponseHandler class + be_interface *response_handler_s = this->create_skeleton_response_handler (node); //, excep_holder); + if (response_handler_s) { - response_handler->set_defined_in (node->defined_in ()); - + response_handler_s->set_defined_in (node->defined_in ()); + // Insert the ami handler after the node, the // exception holder will be placed between these two later. - module->be_add_interface (response_handler, node); - + module->be_add_interface (response_handler_s, amh_class); + // Remember from whom we were cloned - response_handler->original_interface (node); - + response_handler_s->original_interface (node); + // Since this is server side only, don't generate the client stuff. // We do this by pretending that all this stuff has already been // generated. - response_handler->cli_hdr_gen (1); - response_handler->cli_stub_gen (1); - response_handler->cli_hdr_any_op_gen (1); - response_handler->cli_stub_any_op_gen (1); - response_handler->cli_hdr_cdr_op_gen (1); - response_handler->cli_stub_cdr_op_gen (1); - response_handler->cli_inline_cdr_op_gen (1); - response_handler->cli_inline_gen (1); + response_handler_s->cli_hdr_gen (1); + response_handler_s->cli_stub_gen (1); + response_handler_s->cli_hdr_any_op_gen (1); + response_handler_s->cli_stub_any_op_gen (1); + response_handler_s->cli_hdr_cdr_op_gen (1); + response_handler_s->cli_stub_cdr_op_gen (1); + response_handler_s->cli_inline_cdr_op_gen (1); + response_handler_s->cli_inline_gen (1); + } + else + { + ACE_ERROR_RETURN ((LM_ERROR, + "(%N:%l) be_visitor_amh_pre_proc::" + "visit_interface - " + "creating the response handler failed\n"), + -1); + } + + // Create the Client side ResponseHandler class + be_interface *response_handler_c = this->create_client_response_handler (node); //, excep_holder); + if (response_handler_c) + { + response_handler_c->set_defined_in (node->defined_in ()); + + // Insert the ami handler after the node, the + // exception holder will be placed between these two later. + module->be_add_interface (response_handler_c, amh_class); + + // Remember from whom we were cloned + response_handler_c->original_interface (node); + + // Since this is client side only, don't generate the server side stuff. + // We do this by pretending that all this stuff has already been + // generated. + response_handler_c->srv_hdr_gen (1); + response_handler_c->srv_skel_gen (1); + response_handler_c->srv_inline_gen (1); + // We need to generate only client header; so we do not generate any of the + // other client stuff + response_handler_s->cli_stub_gen (1); + response_handler_s->cli_hdr_any_op_gen (1); + response_handler_s->cli_stub_any_op_gen (1); + response_handler_s->cli_hdr_cdr_op_gen (1); + response_handler_s->cli_stub_cdr_op_gen (1); + response_handler_s->cli_inline_cdr_op_gen (1); + response_handler_s->cli_inline_gen (1); } else { @@ -172,16 +214,16 @@ be_visitor_amh_pre_proc::visit_interface (be_interface *node) "creating the response handler failed\n"), -1); } - - /* + + /* // Set the proper strategy be_interface_strategy *old_strategy = node->set_strategy (new be_interface_ami_strategy (node, response_handler)); - + if (old_strategy) delete old_strategy; - + */ if (this->visit_scope (node) == -1) ACE_ERROR_RETURN ((LM_ERROR, @@ -189,7 +231,7 @@ be_visitor_amh_pre_proc::visit_interface (be_interface *node) "visit_interface - visit scope failed\n"), -1); } - + return 0; } @@ -201,31 +243,31 @@ be_visitor_amh_pre_proc::visit_operation (be_operation *node) // We do nothing for oneways! if (node->flags () == AST_Operation::OP_oneway) return 0; - + // Set the proper strategy be_operation_strategy *old_strategy = node->set_strategy (new be_operation_amh_strategy (node)); - + if (old_strategy) delete old_strategy; - + /* be_operation *sendc_marshaling = this->create_sendc_operation (node, 0); // for arguments = FALSE - + be_operation *sendc_arguments = this->create_sendc_operation (node, 1); // for arguments = TRUE - + if (sendc_marshaling && sendc_arguments) { sendc_marshaling->set_defined_in (node->defined_in ()); - + sendc_arguments->set_defined_in (node->defined_in ()); - + // We do not copy the exceptions because the exceptions // are delivered by the excep methods. - + // Set the proper strategy, and store the specialized // marshaling and arguments operations in it. be_operation_strategy *old_strategy = @@ -247,34 +289,34 @@ be_visitor_amh_pre_proc::visit_attribute (be_attribute *node) // Temporarily generate the set operation. be_operation *set_operation = this->generate_set_operation (node); - + this->visit_operation (set_operation); - + // Retrieve the strategy set by the visit operation be_operation_strategy *set_operation_strategy = set_operation->set_strategy ( new be_operation_default_strategy (set_operation) ); - + // Assign it to the attribute as set_operation strategy if (set_operation_strategy) delete node->set_set_strategy (set_operation_strategy); - + // Temporerily generate the get operation. be_operation *get_operation = this->generate_get_operation (node); - + this->visit_operation (get_operation); - + be_operation_strategy *get_operation_strategy = get_operation->set_strategy ( new be_operation_default_strategy (get_operation) ); - + if (get_operation_strategy) delete node->set_get_strategy (get_operation_strategy); - - + + return 0; } @@ -283,56 +325,60 @@ be_visitor_amh_pre_proc::visit_attribute (be_attribute *node) be_valuetype * be_visitor_amh_pre_proc::create_exception_holder (be_interface *node) { - + // Create a virtual module named "Messaging" and a valuetype // "ExceptionHolder" from which we inherit. UTL_ScopedName *inherit_name = new UTL_ScopedName (new Identifier ("Messaging"), 0); - + inherit_name->nconc (new UTL_ScopedName (new Identifier ("ExceptionHolder"), 0)); - + be_valuetype *inherit_vt = new be_valuetype (inherit_name, 0, 0, 0); inherit_vt->set_name (inherit_name); - - be_module *msg = + +// be_module *msg = new be_module (new UTL_ScopedName (new Identifier ("Messaging"), +// 0), +// 0); + + be_module *msg = new be_module (new UTL_ScopedName (new Identifier ("Messaging"), 0)); // Notice the valuetype "ExceptionHolder" that it is defined in the // "Messaging" module inherit_vt->set_defined_in (msg); - + // Create the excpetion holder name ACE_CString excep_holder_local_name; this->generate_name (excep_holder_local_name, "AMH_", node->name ()->last_component ()->get_string(), ""); - - UTL_ScopedName *excep_holder_name = + + UTL_ScopedName *excep_holder_name = ACE_static_cast (UTL_ScopedName *, node->name ()->copy ()); excep_holder_name->last_component ()->replace_string ( excep_holder_local_name.rep () ); - + AST_Interface_ptr *p_intf = new AST_Interface_ptr[1]; p_intf[0] = ACE_static_cast (AST_Interface *, inherit_vt); - - be_valuetype *excep_holder = + + be_valuetype *excep_holder = new be_valuetype (excep_holder_name, // name p_intf, // list of inherited 1, // number of inherited 0); // set abstract excep_holder->set_name (excep_holder_name); - + // Now our customized valuetype is created, we have to // add now the operations and attributes to the scope. - + if (node->nmembers () > 0) { // initialize an iterator to iterate thru our scope @@ -354,29 +400,29 @@ be_visitor_amh_pre_proc::create_exception_holder (be_interface *node) "visit_interface - " "bad node in this scope\n"), 0); - + } be_decl *op = be_decl::narrow_from_decl (d); - + if (d->node_type () == AST_Decl::NT_attr) { AST_Attribute *attribute = AST_Attribute::narrow_from_decl (d); - + if (!attribute) return 0; - + this->create_raise_operation (op, excep_holder, GET_OPERATION); - + if (!attribute->readonly ()) { this->create_raise_operation (op, excep_holder, SET_OPERATION); } - + } else { @@ -403,7 +449,7 @@ be_visitor_amh_pre_proc::create_amh_class (be_interface *node) node->name ()->last_component ()->get_string(), ""); - UTL_ScopedName *amh_class_name = + UTL_ScopedName *amh_class_name = ACE_static_cast (UTL_ScopedName *, node->name ()->copy ()); amh_class_name->last_component ()->replace_string ( amh_class_local_name.rep () @@ -454,7 +500,7 @@ be_visitor_amh_pre_proc::create_amh_class (be_interface *node) if (!attribute) return 0; - /* + /* be_operation *get_operation = this->generate_get_operation (attribute); this->create_response_handler_operation (get_operation, @@ -515,7 +561,7 @@ be_visitor_amh_pre_proc::create_amh_class (be_interface *node) node->name ()->last_component ()->get_string(), "ResponseHandler"); - UTL_ScopedName *rh_class_name = + UTL_ScopedName *rh_class_name = ACE_static_cast (UTL_ScopedName *, node->name ()->copy ()); rh_class_name->last_component ()->replace_string ( rh_class_local_name.rep () @@ -551,7 +597,7 @@ be_visitor_amh_pre_proc::create_amh_operation (be_operation *node, return 0; // Create the return type, which is "void" - be_predefined_type *rt = + be_predefined_type *rt = new be_predefined_type (AST_PredefinedType::PT_void, new UTL_ScopedName (new Identifier ("void"), 0)); @@ -560,7 +606,7 @@ be_visitor_amh_pre_proc::create_amh_operation (be_operation *node, node->name ()->last_component ()->get_string () ); - UTL_ScopedName *op_name = + UTL_ScopedName *op_name = ACE_static_cast (UTL_ScopedName *, amh_class->name ()-> copy ()); op_name->nconc (new UTL_ScopedName (new Identifier (original_op_name.rep ()), 0)); @@ -576,7 +622,7 @@ be_visitor_amh_pre_proc::create_amh_operation (be_operation *node, ACE_CString new_op_name = ACE_CString ("reply_") + original_op_name; - UTL_ScopedName *rtop_name = + UTL_ScopedName *rtop_name = ACE_static_cast (UTL_ScopedName *, node->name ()-> copy ()); op_name->last_component ()->replace_string (new_op_name.rep ()); @@ -672,10 +718,8 @@ be_visitor_amh_pre_proc::create_amh_operation (be_operation *node, be_interface * -be_visitor_amh_pre_proc::create_response_handler ( - be_interface *node, - be_valuetype * /*excep_holder*/ - ) +be_visitor_amh_pre_proc::create_skeleton_response_handler (be_interface *node) + //, be_valuetype * /*excep_holder*/) { // Generate 'Stock::AMH_QuoterResponseHandler' ACE_CString class_name (node->client_enclosing_scope ()); @@ -685,7 +729,7 @@ be_visitor_amh_pre_proc::create_response_handler ( UTL_ScopedName *inherit_name = new UTL_ScopedName (new Identifier (class_name.rep ()), 0); - be_interface *inherit_intf = + be_interface *inherit_intf = new be_interface (inherit_name, 0, // inherited interfaces 0, // number of inherited interfaces @@ -700,13 +744,13 @@ be_visitor_amh_pre_proc::create_response_handler ( UTL_ScopedName *tao_inherit_name = new UTL_ScopedName (new Identifier (tao_rh_name.rep ()), 0); - be_interface *tao_inherit_intf = + be_interface *tao_inherit_intf = new be_interface (tao_inherit_name, 0, // inherited interfaces 0, // number of inherited interfaces 0, // ancestors 0, // number of ancestors - 1, // not local + 1, // local 0); // not abstract tao_inherit_intf->set_name (tao_inherit_name); @@ -719,7 +763,7 @@ be_visitor_amh_pre_proc::create_response_handler ( node->name ()->last_component ()->get_string(), "ResponseHandler"); - UTL_ScopedName *response_handler_name = + UTL_ScopedName *response_handler_name = ACE_static_cast (UTL_ScopedName *, node->name ()->copy ()); response_handler_name->last_component ()->replace_string ( response_handler_local_name.rep () @@ -735,11 +779,21 @@ be_visitor_amh_pre_proc::create_response_handler ( 2, // number of inherited p_intf, // list of ancestors 1, // number of ancestors - 0, // non-local + 1, // local 0); // non-abstract response_handler->set_name (response_handler_name); - // Now our customized valuetype is created, we have to + add_rh_node_members (node, response_handler); + + return response_handler; + +} + +int +be_visitor_amh_pre_proc::add_rh_node_members ( be_interface *node, + be_interface *response_handler) +{ + // Now our customized valuetype is created, we have to // add now the operations and attributes to the scope. if (node->nmembers () > 0) @@ -775,7 +829,7 @@ be_visitor_amh_pre_proc::create_response_handler ( return 0; } /* - be_operation *get_operation = + be_operation *get_operation = this->generate_get_operation (attribute); this->create_response_handler_operation (get_operation, response_handler); @@ -805,7 +859,7 @@ be_visitor_amh_pre_proc::create_response_handler ( this->create_response_handler_operation (operation, response_handler); - /* + /* this->create_excep_operation (be_operation::narrow_from_decl (d), response_handler, excep_holder); @@ -819,11 +873,39 @@ be_visitor_amh_pre_proc::create_response_handler ( delete si; } // end of if - - return response_handler; + return 1; } +be_interface * +be_visitor_amh_pre_proc::create_client_response_handler (be_interface *node) +{ + // Generate 'AMH_QuoterResponseHandler' + // Create the response handler name + ACE_CString rh_local_name; + this->generate_name (rh_local_name, + "AMH_", + node->name ()->last_component ()->get_string(), + "ResponseHandler"); + + UTL_ScopedName *rh_class_name = ACE_static_cast (UTL_ScopedName *, node->name ()->copy ()); + rh_class_name->last_component ()->replace_string (rh_local_name.rep ()); + + be_interface *rh_class = + new be_interface (rh_class_name, // name + 0, // list of inherited + 0, // number of inherited + 0, // list of ancestors + 0, // number of ancestors + 1, // local + 1); // abstract + rh_class->set_name (rh_class_name); + + add_rh_node_members (node, rh_class); + + return rh_class; +} + int be_visitor_amh_pre_proc::create_raise_operation (be_decl *node, be_valuetype *excep_holder, @@ -842,7 +924,7 @@ be_visitor_amh_pre_proc::create_raise_operation (be_decl *node, } // Create the return type, which is "void" - be_predefined_type *rt = + be_predefined_type *rt = new be_predefined_type (AST_PredefinedType::PT_void, new UTL_ScopedName (new Identifier ("void"), 0)); @@ -924,7 +1006,7 @@ be_visitor_amh_pre_proc::create_response_handler_operation ( } // Create the return type, which is "void" - be_predefined_type *rt = + be_predefined_type *rt = new be_predefined_type (AST_PredefinedType::PT_void, new UTL_ScopedName (new Identifier ("void"), 0)); @@ -933,9 +1015,9 @@ be_visitor_amh_pre_proc::create_response_handler_operation ( node->name ()->last_component ()->get_string () ); - UTL_ScopedName *op_name = + UTL_ScopedName *op_name = ACE_static_cast (UTL_ScopedName *, response_handler->name ()-> copy ()); - op_name->nconc (new UTL_ScopedName (new Identifier (original_op_name.rep ()), + op_name->nconc (new UTL_ScopedName (new Identifier (original_op_name.rep ()), 0)); // Create the operation @@ -952,10 +1034,10 @@ be_visitor_amh_pre_proc::create_response_handler_operation ( { // Create the argument - be_argument *arg = + be_argument *arg = new be_argument (AST_Argument::dir_IN, node->return_type (), - new UTL_ScopedName (new Identifier ("return_value"), + new UTL_ScopedName (new Identifier ("return_value"), 0)); // Add the response handler to the argument list @@ -1229,9 +1311,9 @@ be_visitor_amh_pre_proc::generate_set_operation (be_attribute *node) set_name->last_component ()->replace_string (new_op_name.rep ()); // the return type is "void" - be_predefined_type *rt = + be_predefined_type *rt = new be_predefined_type (AST_PredefinedType::PT_void, - new UTL_ScopedName (new Identifier ("void"), + new UTL_ScopedName (new Identifier ("void"), 0)); // argument type is the same as the attribute type diff --git a/TAO/TAO_IDL/be/be_visitor_ami_pre_proc.cpp b/TAO/TAO_IDL/be/be_visitor_ami_pre_proc.cpp index d0dec09ed9a..fe648ad8736 100644 --- a/TAO/TAO_IDL/be/be_visitor_ami_pre_proc.cpp +++ b/TAO/TAO_IDL/be/be_visitor_ami_pre_proc.cpp @@ -606,7 +606,7 @@ be_visitor_ami_pre_proc::create_sendc_operation (be_operation *node, field_type->set_defined_in (node->defined_in ()); // Create the argument - be_argument *arg = + be_argument *arg = new be_argument (AST_Argument::dir_IN, field_type, // is also a valuetype new UTL_ScopedName (new Identifier ("ami_handler"), @@ -678,7 +678,7 @@ be_visitor_ami_pre_proc::create_reply_handler_operation (be_operation *node, return 0; // Create the return type, which is "void" - be_predefined_type *rt = + be_predefined_type *rt = new be_predefined_type (AST_PredefinedType::PT_void, new UTL_ScopedName (new Identifier ("void"), 0)); @@ -708,7 +708,7 @@ be_visitor_ami_pre_proc::create_reply_handler_operation (be_operation *node, { // Create the argument - be_argument *arg = + be_argument *arg = new be_argument (AST_Argument::dir_IN, node->return_type (), new UTL_ScopedName (new Identifier ("ami_return_val"), @@ -791,13 +791,13 @@ be_visitor_ami_pre_proc::create_excep_operation (be_operation *node, return 0; // Create the return type, which is "void" - be_predefined_type *rt = + be_predefined_type *rt = new be_predefined_type (AST_PredefinedType::PT_void, new UTL_ScopedName (new Identifier ("void"), 0)); // Create the argument - be_argument *arg = + be_argument *arg = new be_argument (AST_Argument::dir_IN, excep_holder, // is also a valuetype new UTL_ScopedName (new Identifier ("excep_holder"), @@ -977,9 +977,9 @@ be_visitor_ami_pre_proc::generate_set_operation (be_attribute *node) set_name->last_component ()->replace_string (new_op_name.rep ()); // the return type is "void" - be_predefined_type *rt = + be_predefined_type *rt = new be_predefined_type (AST_PredefinedType::PT_void, - new UTL_ScopedName (new Identifier ("void"), + new UTL_ScopedName (new Identifier ("void"), 0)); // argument type is the same as the attribute type diff --git a/TAO/TAO_IDL/be/be_visitor_argument/argument.cpp b/TAO/TAO_IDL/be/be_visitor_argument/argument.cpp index 870ba6618cc..58f17a07a22 100644 --- a/TAO/TAO_IDL/be/be_visitor_argument/argument.cpp +++ b/TAO/TAO_IDL/be/be_visitor_argument/argument.cpp @@ -42,7 +42,7 @@ int be_visitor_args::visit_argument (be_argument *) // files) or as a fully scoped name. In addition, we make sure that if the type // is an alias, we use that name const char * -be_visitor_args::type_name (be_type *node, +be_visitor_args::type_name (be_type *node, const char *suffix) { static char namebuf [NAMEBUFSIZE]; @@ -56,12 +56,12 @@ be_visitor_args::type_name (be_type *node, else bt = node; - ACE_OS::sprintf (namebuf, - "%s", + ACE_OS::sprintf (namebuf, + "%s", bt->full_name ()); if (suffix) - ACE_OS::strcat (namebuf, + ACE_OS::strcat (namebuf, suffix); return namebuf; diff --git a/TAO/TAO_IDL/be/be_visitor_argument/post_invoke_cs.cpp b/TAO/TAO_IDL/be/be_visitor_argument/post_invoke_cs.cpp index 5ea660064ca..a054c4eff34 100644 --- a/TAO/TAO_IDL/be/be_visitor_argument/post_invoke_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_argument/post_invoke_cs.cpp @@ -93,7 +93,7 @@ be_visitor_args_post_invoke_cs::visit_interface (be_interface *node) } else { - *os << "tao_" << node->flat_name () << "_release (" + *os << "tao_" << node->flat_name () << "_release (" << arg->local_name () << ");" << be_nl; } } @@ -123,7 +123,7 @@ be_visitor_args_post_invoke_cs::visit_interface_fwd (be_interface_fwd *node) } else { - *os << "tao_" << node->flat_name () << "_release (" + *os << "tao_" << node->flat_name () << "_release (" << arg->local_name () << ");" << be_nl; } } @@ -199,12 +199,12 @@ be_visitor_args_post_invoke_cs::visit_string (be_string *node) if (node->width () == (long) sizeof (char)) { - *os << "CORBA::string_free (" << arg->local_name () + *os << "CORBA::string_free (" << arg->local_name () << ");" << be_nl; } else { - *os << "CORBA::wstring_free (" << arg->local_name () + *os << "CORBA::wstring_free (" << arg->local_name () << ");" << be_nl; } diff --git a/TAO/TAO_IDL/be/be_visitor_argument/pre_invoke_cs.cpp b/TAO/TAO_IDL/be/be_visitor_argument/pre_invoke_cs.cpp index 171bd871688..43c173b574d 100644 --- a/TAO/TAO_IDL/be/be_visitor_argument/pre_invoke_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_argument/pre_invoke_cs.cpp @@ -146,9 +146,9 @@ be_visitor_args_pre_invoke_cs::visit_array (be_array *node) if (!this->void_return_type ()) { *os << "ACE_ALLOCATOR_RETURN (" << be_idt << be_idt_nl - << arg->local_name () << ".ptr ()," << be_nl + << arg->local_name () << ".ptr ()," << be_nl << bt->name () << "_alloc ()," << be_nl; - + if (this->cannot_return_zero ()) { *os <<"_tao_retval"; @@ -161,7 +161,7 @@ be_visitor_args_pre_invoke_cs::visit_array (be_array *node) else { *os << "ACE_ALLOCATOR (" << be_idt << be_idt_nl - << arg->local_name () << ".ptr ()," << be_nl + << arg->local_name () << ".ptr ()," << be_nl << bt->name () << "_alloc ()"; } @@ -221,7 +221,7 @@ be_visitor_args_pre_invoke_cs::visit_predefined_type (be_predefined_type *node) *os << "ACE_NEW_RETURN (" << be_idt << be_idt_nl << arg->local_name () << ".ptr ()," << be_nl << "CORBA::Any," << be_nl; - + if (this->cannot_return_zero ()) { *os << "_tao_retval"; @@ -281,7 +281,7 @@ be_visitor_args_pre_invoke_cs::visit_sequence (be_sequence *node) *os << "ACE_NEW_RETURN (" << be_idt << be_idt_nl << arg->local_name () << ".ptr ()," << be_nl << bt->name () << "," << be_nl; - + if (this->cannot_return_zero ()) { *os << "_tao_retval"; @@ -344,7 +344,7 @@ be_visitor_args_pre_invoke_cs::visit_structure (be_structure *node) *os << "ACE_NEW_RETURN (" << be_idt << be_idt_nl << arg->local_name () << ".ptr ()," << be_nl << bt->name () << "," << be_nl; - + if (this->cannot_return_zero ()) { *os << "_tao_retval"; @@ -402,7 +402,7 @@ be_visitor_args_pre_invoke_cs::visit_union (be_union *node) *os << "ACE_NEW_RETURN (" << be_idt << be_idt_nl << arg->local_name () << ".ptr ()," << be_nl << bt->name () << "," << be_nl; - + if (this->cannot_return_zero ()) { *os << "_tao_retval"; diff --git a/TAO/TAO_IDL/be/be_visitor_argument/request_info_cs.cpp b/TAO/TAO_IDL/be/be_visitor_argument/request_info_cs.cpp index 50dd8a118b4..09d7050b34e 100644 --- a/TAO/TAO_IDL/be/be_visitor_argument/request_info_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_argument/request_info_cs.cpp @@ -62,7 +62,7 @@ int be_visitor_args_request_info_cs::visit_argument (be_argument *node) { // Generate the memberlist definition for the constructor. *os << " " << node->local_name () - << "_ " << "(" << node->local_name () << ")"; + << "_ " << "(" << node->local_name () << ")"; break; } case TAO_CodeGen::TAO_ARGUMENT_INTERCEPTORS_INFO_ARGLIST_CS: diff --git a/TAO/TAO_IDL/be/be_visitor_argument/request_info_ss.cpp b/TAO/TAO_IDL/be/be_visitor_argument/request_info_ss.cpp index 937c7a75edf..e68b5b16c07 100644 --- a/TAO/TAO_IDL/be/be_visitor_argument/request_info_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_argument/request_info_ss.cpp @@ -53,15 +53,15 @@ int be_visitor_args_request_info_ss::visit_argument (be_argument *node) "Bad argument type\n"), -1); } - + os->indent (); switch (this->ctx_->state ()) { case TAO_CodeGen::TAO_ARGUMENT_INTERCEPTORS_ARGLIST_SS: { // Generate the memberlist definition for the constructor. - *os << node->local_name () << "_ " << "("<< node->local_name () - <<")"; + *os << node->local_name () << "_ " << "("<< node->local_name () + <<")"; break; } case TAO_CodeGen::TAO_ARGUMENT_INTERCEPTORS_INFO_ARGLIST_SS: @@ -79,7 +79,7 @@ int be_visitor_args_request_info_ss::visit_argument (be_argument *node) "Bad argument type\n"), -1); } - + // Different types have different mappings when used as in/out or // inout parameters. Let this visitor deal with the type if (bt->accept (this) == -1) diff --git a/TAO/TAO_IDL/be/be_visitor_array/array_ch.cpp b/TAO/TAO_IDL/be/be_visitor_array/array_ch.cpp index a0a9d80cb3c..c7d0f9b8976 100644 --- a/TAO/TAO_IDL/be/be_visitor_array/array_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_array/array_ch.cpp @@ -214,59 +214,59 @@ int be_visitor_array_ch::visit_array (be_array *node) if (this->ctx_->tdef ()) { // Typedefed array. - *os << storage_class << node->nested_type_name (scope, "_slice") + *os << storage_class << node->nested_type_name (scope, "_slice") << " *"; *os << node->nested_type_name (scope, "_alloc") << " (void);" << be_nl; - *os << storage_class << "void " - << node->nested_type_name (scope, "_free") + *os << storage_class << "void " + << node->nested_type_name (scope, "_free") << " (" << be_idt << be_idt_nl; - *os << node->nested_type_name (scope, "_slice") - << " *_tao_slice " << be_uidt_nl + *os << node->nested_type_name (scope, "_slice") + << " *_tao_slice " << be_uidt_nl << ");" << be_uidt_nl; *os << storage_class << node->nested_type_name (scope, "_slice") << " *"; - *os << node->nested_type_name (scope, "_dup") + *os << node->nested_type_name (scope, "_dup") << " (" << be_idt << be_idt_nl << "const "; - *os << node->nested_type_name (scope, "_slice") + *os << node->nested_type_name (scope, "_slice") << " *_tao_slice" << be_uidt_nl << ");" << be_uidt_nl; - *os << storage_class << "void " - << node->nested_type_name (scope, "_copy") + *os << storage_class << "void " + << node->nested_type_name (scope, "_copy") << " (" << be_idt << be_idt_nl; *os << node->nested_type_name (scope, "_slice") << " *_tao_to," << be_nl << "const "; - *os << node->nested_type_name (scope, "_slice") + *os << node->nested_type_name (scope, "_slice") << " *_tao_from" << be_uidt_nl << ");" << be_uidt_nl; } else { // Anonymous array. - *os << storage_class << node->nested_type_name (scope, "_slice", "_") + *os << storage_class << node->nested_type_name (scope, "_slice", "_") << " *"; - *os << node->nested_type_name (scope, "_alloc", "_") + *os << node->nested_type_name (scope, "_alloc", "_") << " (void);" << be_nl; *os << storage_class << "void " - << node->nested_type_name (scope, "_free", "_") + << node->nested_type_name (scope, "_free", "_") << " (" << be_idt << be_idt_nl; - *os << node->nested_type_name (scope, "_slice", "_") + *os << node->nested_type_name (scope, "_slice", "_") << " *_tao_slice" << be_uidt_nl << ");" << be_uidt_nl; - *os << storage_class << node->nested_type_name (scope, "_slice", "_") + *os << storage_class << node->nested_type_name (scope, "_slice", "_") << " *"; - *os << node->nested_type_name (scope, "_dup", "_") + *os << node->nested_type_name (scope, "_dup", "_") << " (" << be_idt << be_idt_nl << "const "; - *os << node->nested_type_name (scope, "_slice", "_") + *os << node->nested_type_name (scope, "_slice", "_") << " *_tao_slice" << be_uidt_nl << ");" << be_uidt_nl; *os << storage_class << "void " - << node->nested_type_name (scope, "_copy", "_") + << node->nested_type_name (scope, "_copy", "_") << " (" << be_idt << be_idt_nl; - *os << node->nested_type_name (scope, "_slice", "_") + *os << node->nested_type_name (scope, "_slice", "_") << " *_tao_to," << be_nl << "const "; - *os << node->nested_type_name (scope, "_slice", "_") + *os << node->nested_type_name (scope, "_slice", "_") << " *_tao_from" << be_uidt_nl << ");" << be_uidt_nl; } @@ -288,30 +288,30 @@ be_visitor_array_ch::gen_var_defn (be_array *node) char namebuf [NAMEBUFSIZE]; char varnamebuf [NAMEBUFSIZE]; - ACE_OS::memset (namebuf, - '\0', + ACE_OS::memset (namebuf, + '\0', NAMEBUFSIZE); - ACE_OS::memset (varnamebuf, - '\0', + ACE_OS::memset (varnamebuf, + '\0', NAMEBUFSIZE); if (this->ctx_->tdef ()) { // Typedefed array. - ACE_OS::sprintf (namebuf, - "%s", + ACE_OS::sprintf (namebuf, + "%s", node->local_name ()->get_string ()); - ACE_OS::sprintf (varnamebuf, - "%s_var", + ACE_OS::sprintf (varnamebuf, + "%s_var", node->local_name ()->get_string ()); } else { - ACE_OS::sprintf (namebuf, - "_%s", + ACE_OS::sprintf (namebuf, + "_%s", node->local_name ()->get_string ()); - ACE_OS::sprintf (varnamebuf, - "_%s_var", + ACE_OS::sprintf (varnamebuf, + "_%s_var", node->local_name ()->get_string ()); } @@ -385,7 +385,7 @@ be_visitor_array_ch::gen_var_defn (be_array *node) *os << namebuf << "_slice *&out (void);" << be_nl; *os << namebuf << "_slice *_retn (void);" << be_nl; - // Generate an additional member function that returns the + // Generate an additional member function that returns the // underlying pointer. *os << namebuf << "_slice *ptr (void) const;" << be_uidt_nl; @@ -405,30 +405,30 @@ be_visitor_array_ch::gen_out_defn (be_array *node) char namebuf [NAMEBUFSIZE]; char outnamebuf [NAMEBUFSIZE]; - ACE_OS::memset (namebuf, - '\0', + ACE_OS::memset (namebuf, + '\0', NAMEBUFSIZE); - ACE_OS::memset (outnamebuf, - '\0', + ACE_OS::memset (outnamebuf, + '\0', NAMEBUFSIZE); if (this->ctx_->tdef ()) { - ACE_OS::sprintf (namebuf, - "%s", + ACE_OS::sprintf (namebuf, + "%s", node->local_name ()->get_string ()); - ACE_OS::sprintf (outnamebuf, - "%s_out", + ACE_OS::sprintf (outnamebuf, + "%s_out", node->local_name ()->get_string ()); } else { // Anonymous array. - ACE_OS::sprintf (namebuf, - "_%s", + ACE_OS::sprintf (namebuf, + "_%s", node->local_name ()->get_string ()); - ACE_OS::sprintf (outnamebuf, - "_%s_out", + ACE_OS::sprintf (outnamebuf, + "_%s_out", node->local_name ()->get_string ()); } @@ -482,29 +482,29 @@ be_visitor_array_ch::gen_forany_defn (be_array *node) char namebuf [NAMEBUFSIZE]; char foranyname [NAMEBUFSIZE]; - ACE_OS::memset (namebuf, - '\0', + ACE_OS::memset (namebuf, + '\0', NAMEBUFSIZE); - ACE_OS::memset (foranyname, - '\0', + ACE_OS::memset (foranyname, + '\0', NAMEBUFSIZE); if (this->ctx_->tdef ()) { - ACE_OS::sprintf (namebuf, - "%s", + ACE_OS::sprintf (namebuf, + "%s", node->local_name ()->get_string ()); - ACE_OS::sprintf (foranyname, - "%s_forany", + ACE_OS::sprintf (foranyname, + "%s_forany", node->local_name ()->get_string ()); } else { // Anonymous array case. - ACE_OS::sprintf (namebuf, - "_%s", + ACE_OS::sprintf (namebuf, + "_%s", node->local_name ()->get_string ()); - ACE_OS::sprintf (foranyname, + ACE_OS::sprintf (foranyname, "_%s_forany", node->local_name ()->get_string ()); } @@ -521,7 +521,7 @@ be_visitor_array_ch::gen_forany_defn (be_array *node) // Default constuctor. *os << foranyname << " (void);" << be_nl; // Constuctor from pointer to slice. - *os << foranyname << " (" << be_idt << be_idt_nl + *os << foranyname << " (" << be_idt << be_idt_nl << namebuf << "_slice *," << be_nl << "CORBA::Boolean nocopy = 0" << be_uidt_nl << ");" << be_uidt_nl; @@ -537,7 +537,7 @@ be_visitor_array_ch::gen_forany_defn (be_array *node) *os << foranyname << " &operator= (" << namebuf << "_slice *);" << be_nl; // assignment from _var - *os << foranyname << " &operator= (const " << foranyname << " &);" + *os << foranyname << " &operator= (const " << foranyname << " &);" << be_nl << be_nl; // Other extra types (cast operators, [] operator, and others) @@ -559,7 +559,7 @@ be_visitor_array_ch::gen_forany_defn (be_array *node) *os << namebuf << "_slice *&out (void);" << be_nl; *os << namebuf << "_slice *_retn (void);" << be_nl; - // Generate an additional member function that returns the + // Generate an additional member function that returns the // underlying pointer. *os << namebuf << "_slice *ptr (void) const;" << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_array/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_array/cdr_op_cs.cpp index 2fc2afadd82..7bccb8e308f 100644 --- a/TAO/TAO_IDL/be/be_visitor_array/cdr_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_array/cdr_op_cs.cpp @@ -53,13 +53,13 @@ be_visitor_array_cdr_op_cs::visit_array (be_array *node) -1); } - // If we contain an anonymous sequence, + // If we contain an anonymous sequence, // generate code for the sequence here. if (bt->node_type () == AST_Decl::NT_sequence) { - if (this->gen_anonymous_base_type (bt, - TAO_CodeGen::TAO_SEQUENCE_CDR_OP_CS) + if (this->gen_anonymous_base_type (bt, + TAO_CodeGen::TAO_SEQUENCE_CDR_OP_CS) == -1) { ACE_ERROR_RETURN ((LM_ERROR, @@ -67,7 +67,7 @@ be_visitor_array_cdr_op_cs::visit_array (be_array *node) "visit_array - " "gen_anonymous_base_type failed\n"), -1); - } + } } return 0; diff --git a/TAO/TAO_IDL/be/be_visitor_attribute/attribute.cpp b/TAO/TAO_IDL/be/be_visitor_attribute/attribute.cpp index 556c516f9c9..c95b0d52563 100644 --- a/TAO/TAO_IDL/be/be_visitor_attribute/attribute.cpp +++ b/TAO/TAO_IDL/be/be_visitor_attribute/attribute.cpp @@ -118,7 +118,7 @@ be_visitor_attribute::visit_attribute (be_attribute *node) case TAO_CodeGen::TAO_ATTRIBUTE_DIRECT_COLLOCATED_SS: ctx.state (TAO_CodeGen::TAO_OPERATION_DIRECT_COLLOCATED_SS); break; - + case TAO_CodeGen::TAO_ATTRIBUTE_BASE_PROXY_IMPL_CH: ctx.state (TAO_CodeGen::TAO_OPERATION_BASE_PROXY_IMPL_CH); break; @@ -217,9 +217,9 @@ be_visitor_attribute::visit_attribute (be_attribute *node) // Create the set method. // the return type is "void" - be_predefined_type *rt = + be_predefined_type *rt = new be_predefined_type (AST_PredefinedType::PT_void, - new UTL_ScopedName (new Identifier ("void"), + new UTL_ScopedName (new Identifier ("void"), 0)); // argument type is the same as the attribute type be_argument *arg = new be_argument (AST_Argument::dir_IN, diff --git a/TAO/TAO_IDL/be/be_visitor_decl.cpp b/TAO/TAO_IDL/be/be_visitor_decl.cpp index 0e27e8545b3..d2c25510d90 100644 --- a/TAO/TAO_IDL/be/be_visitor_decl.cpp +++ b/TAO/TAO_IDL/be/be_visitor_decl.cpp @@ -44,7 +44,7 @@ be_visitor_decl::gen_anonymous_base_type (be_type *bt, TAO_CodeGen::CG_STATE cg_state) { be_typedef *tdef = be_typedef::narrow_from_decl (bt); - + if (!tdef) { be_visitor_context ctx (*this->ctx_); @@ -76,5 +76,5 @@ be_visitor_decl::gen_anonymous_base_type (be_type *bt, delete visitor; } - return 0; + return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_enum/enum_ch.cpp b/TAO/TAO_IDL/be/be_visitor_enum/enum_ch.cpp index fcd2b30f412..e6c6bd01342 100644 --- a/TAO/TAO_IDL/be/be_visitor_enum/enum_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_enum/enum_ch.cpp @@ -48,7 +48,7 @@ be_visitor_enum_ch::visit_enum (be_enum *node) TAO_OutStream *os = this->ctx_->stream (); // Comma to be generated by the scope visitor. - this->ctx_->comma (1); + this->ctx_->comma (1); if (!node->cli_hdr_gen () && !node->imported ()) { @@ -61,7 +61,7 @@ be_visitor_enum_ch::visit_enum (be_enum *node) "(%N:%l) be_visitor_enum_ch::" "visit_enum - " "scope generation failed\n" - ), + ), -1); } @@ -87,7 +87,7 @@ be_visitor_enum_ch::visit_enum (be_enum *node) "(%N:%l) be_visitor_enum_ch::" "visit_enum - " "TypeCode declaration failed\n" - ), + ), -1); } } diff --git a/TAO/TAO_IDL/be/be_visitor_exception/ctor_assign.cpp b/TAO/TAO_IDL/be/be_visitor_exception/ctor_assign.cpp index df4826cde53..78725dac850 100644 --- a/TAO/TAO_IDL/be/be_visitor_exception/ctor_assign.cpp +++ b/TAO/TAO_IDL/be/be_visitor_exception/ctor_assign.cpp @@ -42,7 +42,7 @@ be_visitor_exception_ctor_assign::~be_visitor_exception_ctor_assign (void) { } -int +int be_visitor_exception_ctor_assign::visit_exception (be_exception *node) { // Save the argument node. @@ -60,7 +60,7 @@ be_visitor_exception_ctor_assign::visit_exception (be_exception *node) return 0; } -int +int be_visitor_exception_ctor_assign::visit_field (be_field *node) { // Save the argument node. @@ -93,7 +93,7 @@ be_visitor_exception_ctor_assign::visit_field (be_field *node) return 0; } -int +int be_visitor_exception_ctor_assign::visit_array (be_array *node) { TAO_OutStream *os = this->ctx_->stream (); @@ -128,7 +128,7 @@ be_visitor_exception_ctor_assign::visit_array (be_array *node) return 0; } -int +int be_visitor_exception_ctor_assign::visit_enum (be_enum *) { TAO_OutStream *os = this->ctx_->stream (); @@ -138,19 +138,19 @@ be_visitor_exception_ctor_assign::visit_enum (be_enum *) if (this->ctx_->exception ()) // Special constructor. { - *os << "this->" << bd->local_name () << " = _tao_" + *os << "this->" << bd->local_name () << " = _tao_" << bd->local_name () << ";\n"; } else { - *os << "this->" << bd->local_name () << " = _tao_excp." + *os << "this->" << bd->local_name () << " = _tao_excp." << bd->local_name () << ";\n"; } return 0; } -int +int be_visitor_exception_ctor_assign::visit_interface (be_interface *node) { TAO_OutStream *os = this->ctx_->stream (); @@ -263,7 +263,7 @@ int be_visitor_exception_ctor_assign::visit_sequence (be_sequence *) } else { - *os << "this->" << bd->local_name () << " = _tao_excp." + *os << "this->" << bd->local_name () << " = _tao_excp." << bd->local_name () << ";\n"; } @@ -281,13 +281,13 @@ int be_visitor_exception_ctor_assign::visit_string (be_string *node) { if (node->width () == (long) sizeof (char)) { - *os << "this->" << bd->local_name () + *os << "this->" << bd->local_name () << " = CORBA::string_dup (_tao_" << bd->local_name () << ");\n"; } else { - *os << "this->" << bd->local_name () + *os << "this->" << bd->local_name () << " = CORBA::wstring_dup (_tao_" << bd->local_name () << ");\n"; } @@ -297,13 +297,13 @@ int be_visitor_exception_ctor_assign::visit_string (be_string *node) if (node->width () == (long) sizeof (char)) { *os << "this->" << bd->local_name () - << " = CORBA::string_dup (_tao_excp." + << " = CORBA::string_dup (_tao_excp." << bd->local_name () << ".in ());\n"; } else { *os << "this->" << bd->local_name () - << " = CORBA::wstring_dup (_tao_excp." + << " = CORBA::wstring_dup (_tao_excp." << bd->local_name () << ".in ());\n"; } } @@ -325,7 +325,7 @@ int be_visitor_exception_ctor_assign::visit_structure (be_structure *) } else { - *os << "this->" << bd->local_name () << " = _tao_excp." + *os << "this->" << bd->local_name () << " = _tao_excp." << bd->local_name () << ";\n"; } @@ -346,7 +346,7 @@ int be_visitor_exception_ctor_assign::visit_union (be_union *) } else { - *os << "this->" << bd->local_name () << " = _tao_excp." + *os << "this->" << bd->local_name () << " = _tao_excp." << bd->local_name () << ";\n"; } diff --git a/TAO/TAO_IDL/be/be_visitor_exception/exception_ctor.cpp b/TAO/TAO_IDL/be/be_visitor_exception/exception_ctor.cpp index d47d96b08b7..db7cb836e3a 100644 --- a/TAO/TAO_IDL/be/be_visitor_exception/exception_ctor.cpp +++ b/TAO/TAO_IDL/be/be_visitor_exception/exception_ctor.cpp @@ -264,7 +264,7 @@ int be_visitor_exception_ctor::visit_sequence (be_sequence *node) int be_visitor_exception_ctor::visit_string (be_string *node) { TAO_OutStream *os = this->ctx_->stream (); // get output stream - + if (node->width () == (long) sizeof (char)) { *os << "const char *"; diff --git a/TAO/TAO_IDL/be/be_visitor_field/cdr_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_field/cdr_op_ch.cpp index 93be4a933f5..35f083cec82 100644 --- a/TAO/TAO_IDL/be/be_visitor_field/cdr_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_field/cdr_op_ch.cpp @@ -237,8 +237,8 @@ be_visitor_field_cdr_op_ch::visit_typedef (be_typedef *node) { // save the node for use in code generation and // indicate that the field of the field node - // is a typedefed quantity - this->ctx_->alias (node); + // is a typedefed quantity + this->ctx_->alias (node); // make a decision based on the primitive base type be_type *bt = node->primitive_base_type (); diff --git a/TAO/TAO_IDL/be/be_visitor_field/cdr_op_ci.cpp b/TAO/TAO_IDL/be/be_visitor_field/cdr_op_ci.cpp index b6644dcc018..6761af03dca 100644 --- a/TAO/TAO_IDL/be/be_visitor_field/cdr_op_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_field/cdr_op_ci.cpp @@ -87,7 +87,7 @@ be_visitor_field_cdr_op_ci::visit_array (be_array *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_field_cdr_op_ci::" "visit_array - " - "cannot retrieve field node\n"), + "cannot retrieve field node\n"), -1); } @@ -110,23 +110,23 @@ be_visitor_field_cdr_op_ci::visit_array (be_array *node) { be_decl *parent = be_scope::narrow_from_scope (node->defined_in ())->decl (); - ACE_OS::sprintf (fname, - "%s::_%s", + ACE_OS::sprintf (fname, + "%s::_%s", parent->full_name (), node->local_name ()->get_string ()); } else { - ACE_OS::sprintf (fname, - "_%s", + ACE_OS::sprintf (fname, + "_%s", node->full_name ()); } } else { // Typedefed node. - ACE_OS::sprintf (fname, - "%s", + ACE_OS::sprintf (fname, + "%s", node->full_name ()); } @@ -165,7 +165,7 @@ be_visitor_field_cdr_op_ci::visit_array (be_array *node) // will be modified based on what type of node we are visiting. be_visitor_context ctx (*this->ctx_); - // Set the node to be the node being visited. The scope is + // Set the node to be the node being visited. The scope is // still the same. ctx.node (node); @@ -178,7 +178,7 @@ be_visitor_field_cdr_op_ci::visit_array (be_array *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_field_cdr_op_ci::" "visit_array - " - "Bad visitor\n"), + "Bad visitor\n"), -1); } @@ -187,7 +187,7 @@ be_visitor_field_cdr_op_ci::visit_array (be_array *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_field_cdr_op_ci::" "visit_array - " - "codegen failed\n"), + "codegen failed\n"), -1); } @@ -211,7 +211,7 @@ be_visitor_field_cdr_op_ci::visit_enum (be_enum *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_field_cdr_op_ci::" "visit_array - " - "cannot retrieve field node\n"), + "cannot retrieve field node\n"), -1); } @@ -233,7 +233,7 @@ be_visitor_field_cdr_op_ci::visit_enum (be_enum *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_field_cdr_op_ci::" "visit_enum - " - "bad sub state\n"), + "bad sub state\n"), -1); } @@ -245,7 +245,7 @@ be_visitor_field_cdr_op_ci::visit_enum (be_enum *node) // will be modified based on what type of node we are visiting. be_visitor_context ctx (*this->ctx_); - // Set the node to be the node being visited. The scope + // Set the node to be the node being visited. The scope // is still the same. ctx.node (node); @@ -743,7 +743,7 @@ be_visitor_field_cdr_op_ci::visit_union (be_union *node) // Set the node to be the node being visited. The scope is - // still the same. + // still the same. ctx.node (node); // Generate the inline code for union. @@ -855,23 +855,23 @@ be_visitor_cdr_op_field_decl::visit_array (be_array *node) if (node->is_nested ()) { be_decl *parent = be_scope::narrow_from_scope (node->defined_in ())->decl (); - ACE_OS::sprintf (fname, - "%s::_%s", + ACE_OS::sprintf (fname, + "%s::_%s", parent->full_name (), node->local_name ()->get_string ()); } else { - ACE_OS::sprintf (fname, - "_%s", + ACE_OS::sprintf (fname, + "_%s", node->full_name ()); } } else { // Typedefed node. - ACE_OS::sprintf (fname, - "%s", + ACE_OS::sprintf (fname, + "%s", node->full_name ()); } diff --git a/TAO/TAO_IDL/be/be_visitor_field/field_ch.cpp b/TAO/TAO_IDL/be/be_visitor_field/field_ch.cpp index 724e9c8c958..c7e21bf4db3 100644 --- a/TAO/TAO_IDL/be/be_visitor_field/field_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_field/field_ch.cpp @@ -57,7 +57,7 @@ be_visitor_field_ch::visit_field (be_field *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_field_ch::" "visit_field - " - "Bad field type\n"), + "Bad field type\n"), -1); } @@ -68,7 +68,7 @@ be_visitor_field_ch::visit_field (be_field *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_field_ch::" "visit_field - " - "codegen for field type failed\n"), + "codegen for field type failed\n"), -1); } @@ -117,7 +117,7 @@ be_visitor_field_ch::visit_array (be_array *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_field_ch::" "visit_array - " - "Bad visitor\n"), + "Bad visitor\n"), -1); } @@ -126,7 +126,7 @@ be_visitor_field_ch::visit_array (be_array *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_field_ch::" "visit_array - " - "codegen failed\n"), + "codegen failed\n"), -1); } @@ -188,7 +188,7 @@ be_visitor_field_ch::visit_enum (be_enum *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_field_ch::" "visit_enum - " - "Bad visitor\n"), + "Bad visitor\n"), -1); } @@ -197,7 +197,7 @@ be_visitor_field_ch::visit_enum (be_enum *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_field_ch::" "visit_enum - " - "codegen failed\n"), + "codegen failed\n"), -1); } @@ -436,7 +436,7 @@ be_visitor_field_ch::visit_sequence (be_sequence *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_field_ch::" "visit_sequence - " - "Bad visitor\n"), + "Bad visitor\n"), -1); } @@ -445,7 +445,7 @@ be_visitor_field_ch::visit_sequence (be_sequence *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_field_ch::" "visit_sequence - " - "codegen failed\n"), + "codegen failed\n"), -1); } @@ -542,7 +542,7 @@ be_visitor_field_ch::visit_structure (be_structure *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_field_ch::" "visit_struct - " - "Bad visitor\n"), + "Bad visitor\n"), -1); } @@ -551,7 +551,7 @@ be_visitor_field_ch::visit_structure (be_structure *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_field_ch::" "visit_struct - " - "codegen failed\n"), + "codegen failed\n"), -1); } @@ -586,7 +586,7 @@ be_visitor_field_ch::visit_typedef (be_typedef *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_field_ch::" "visit_typedef - " - "Bad primitive type\n"), + "Bad primitive type\n"), -1); } @@ -629,7 +629,7 @@ be_visitor_field_ch::visit_union (be_union *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_field_ch::" "visit_union - " - "Bad visitor\n"), + "Bad visitor\n"), -1); } @@ -638,7 +638,7 @@ be_visitor_field_ch::visit_union (be_union *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_field_ch::" "visit_union - " - "codegen failed\n"), + "codegen failed\n"), -1); } diff --git a/TAO/TAO_IDL/be/be_visitor_interface/amh_ss.cpp b/TAO/TAO_IDL/be/be_visitor_interface/amh_ss.cpp index bcf23849187..b11b1beeeab 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/amh_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/amh_ss.cpp @@ -32,7 +32,7 @@ be_visitor_amh_interface_ss::this_method (be_interface *node) // the _this () operation //const char *non_amh_name = node->full_name () + 4; - ACE_CString non_amh_name = " "; + ACE_CString non_amh_name = ""; non_amh_name += node->client_enclosing_scope (); non_amh_name += node->original_interface ()->local_name (); @@ -43,6 +43,25 @@ be_visitor_amh_interface_ss::this_method (be_interface *node) << "TAO_Stub *stub = this->_create_stub (TAO_ENV_SINGLE_ARG_PARAMETER);" << be_nl << "ACE_CHECK_RETURN (0);" << be_nl << be_nl; + + *os << "CORBA::Object_ptr tmp = CORBA::Object::_nil ();" << be_nl + << be_nl + << "if (stub->servant_orb_var ()->orb_core ()->optimize_collocation_objects ())" + << be_idt_nl // idt = 2 + << "ACE_NEW_RETURN (tmp, CORBA::Object (stub, 1, this), 0);" + << be_uidt_nl // idt = 1 + << "else" + << be_idt_nl // idt = 2 + << "ACE_NEW_RETURN (tmp, CORBA::Object (stub, 0, this), 0);" + << be_uidt_nl << be_nl // idt = 1 + << "CORBA::Object_var obj = tmp;" << be_nl << be_nl; + +// *os << "(void) safe_stub.release ();" << be_nl << be_nl; + + *os << "return " << "::" << non_amh_name.c_str() << "::_unchecked_narrow (obj.in ());" + << be_uidt_nl // idt = 0 + << "}" << be_nl; + } void @@ -58,8 +77,8 @@ be_visitor_amh_interface_ss::dispatch_method (be_interface *node) // @todo ACE_TRY_ENV without check; *os << "this->asynchronous_upcall_dispatch" << be_idt_nl << " (req, context, this TAO_ENV_ARG_PARAMETER);" << be_uidt_nl; - *os << "this->asynchronous_upcall_reply (req);" << be_uidt_nl; - *os << "}" << be_nl; +// *os << "this->asynchronous_upcall_reply (req);" << be_uidt_nl; + *os << be_uidt_nl << "}" << be_nl; } diff --git a/TAO/TAO_IDL/be/be_visitor_interface/cdr_op_ci.cpp b/TAO/TAO_IDL/be/be_visitor_interface/cdr_op_ci.cpp index f8701d4e073..ac2d4b52d17 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/cdr_op_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/cdr_op_ci.cpp @@ -47,7 +47,7 @@ be_visitor_interface_cdr_op_ci::visit_interface (be_interface *node) // Already generated and/or we are imported. Don't do anything. // No CDR operations for locality constrained interfaces. if (node->cli_inline_cdr_op_gen () - || node->imported () + || node->imported () || node->is_local ()) { return 0; @@ -73,15 +73,15 @@ be_visitor_interface_cdr_op_ci::visit_interface (be_interface *node) // Generate the CDR << and >> operator declarations. os->indent (); - *os << be_global->stub_export_macro () - << " CORBA::Boolean operator<< (" + *os << be_global->stub_export_macro () + << " CORBA::Boolean operator<< (" << be_idt << be_idt_nl << "TAO_OutputCDR &," << be_nl << "const " << node->full_name () << "_ptr" << be_uidt_nl << ");" << be_uidt_nl << be_nl; - *os << be_global->stub_export_macro () - << " CORBA::Boolean operator>> (" + *os << be_global->stub_export_macro () + << " CORBA::Boolean operator>> (" << be_idt << be_idt_nl << "TAO_InputCDR &," << be_nl << node->full_name () << "_ptr &" << be_uidt_nl diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface.cpp index b2286ff37fa..563f20dced9 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface.cpp @@ -142,11 +142,13 @@ be_visitor_interface::visit_attribute (be_attribute *node) // AMH stuff case TAO_CodeGen::TAO_INTERFACE_AMH_SH: - ctx.state (TAO_CodeGen::TAO_OPERATION_AMH_SH); - break; + case TAO_CodeGen::TAO_INTERFACE_AMH_RH_SH: + ctx.state (TAO_CodeGen::TAO_ATTRIBUTE_SH); + break; case TAO_CodeGen::TAO_INTERFACE_AMH_SS: - ctx.state (TAO_CodeGen::TAO_OPERATION_AMH_SS); - break; + case TAO_CodeGen::TAO_INTERFACE_AMH_RH_SS: + ctx.state (TAO_CodeGen::TAO_ATTRIBUTE_SS); + break; case TAO_CodeGen::TAO_INTERFACE_PROXY_IMPLS_CH: case TAO_CodeGen::TAO_INTERFACE_PROXY_IMPLS_CS: @@ -277,9 +279,11 @@ be_visitor_interface::visit_constant (be_constant *node) case TAO_CodeGen::TAO_INTERFACE_AMH_SH: case TAO_CodeGen::TAO_INTERFACE_AMH_SS: + case TAO_CodeGen::TAO_INTERFACE_AMH_RH_SH: + case TAO_CodeGen::TAO_INTERFACE_AMH_RH_SS: + return 0; // nothing to be done - return 0; // nothing to be done - default: + default: { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_interface::" @@ -393,8 +397,10 @@ be_visitor_interface::visit_enum (be_enum *node) case TAO_CodeGen::TAO_INTERFACE_AMH_SH: case TAO_CodeGen::TAO_INTERFACE_AMH_SS: + case TAO_CodeGen::TAO_INTERFACE_AMH_RH_SH: + case TAO_CodeGen::TAO_INTERFACE_AMH_RH_SS: + return 0; // nothing to be done - return 0; // nothing to be done default: { ACE_ERROR_RETURN ((LM_ERROR, @@ -510,8 +516,10 @@ be_visitor_interface::visit_exception (be_exception *node) case TAO_CodeGen::TAO_INTERFACE_AMH_SH: case TAO_CodeGen::TAO_INTERFACE_AMH_SS: + case TAO_CodeGen::TAO_INTERFACE_AMH_RH_SH: + case TAO_CodeGen::TAO_INTERFACE_AMH_RH_SS: + return 0; // nothing to be done - return 0; // nothing to be done default: { ACE_ERROR_RETURN ((LM_ERROR, @@ -629,14 +637,14 @@ be_visitor_interface::visit_operation (be_operation *node) ctx.state (TAO_CodeGen::TAO_OPERATION_AMH_SH); break; case TAO_CodeGen::TAO_INTERFACE_AMH_SS: - return 0; // don't do anything for now + ctx.state (TAO_CodeGen::TAO_OPERATION_AMH_SS); + break; case TAO_CodeGen::TAO_INTERFACE_AMH_RH_SH: ctx.state (TAO_CodeGen::TAO_OPERATION_AMH_RH_SH); break; case TAO_CodeGen::TAO_INTERFACE_AMH_RH_SS: - //ctx.state (TAO_CodeGen::TAO_OPERATION_SS); - //break; - return 0; // don't do anything for now + ctx.state (TAO_CodeGen::TAO_OPERATION_AMH_RH_SS); + break; case TAO_CodeGen::TAO_INTERFACE_REMOTE_PROXY_IMPL_CS: ctx.state (TAO_CodeGen::TAO_OPERATION_REMOTE_PROXY_IMPL_CS); @@ -812,7 +820,8 @@ be_visitor_interface::visit_structure (be_structure *node) case TAO_CodeGen::TAO_INTERFACE_AMH_SH: case TAO_CodeGen::TAO_INTERFACE_AMH_SS: - + case TAO_CodeGen::TAO_INTERFACE_AMH_RH_SH: + case TAO_CodeGen::TAO_INTERFACE_AMH_RH_SS: return 0; // nothing to be done default: { @@ -929,7 +938,9 @@ be_visitor_interface::visit_union (be_union *node) case TAO_CodeGen::TAO_INTERFACE_AMH_SH: case TAO_CodeGen::TAO_INTERFACE_AMH_SS: - return 0; // nothing to be done + case TAO_CodeGen::TAO_INTERFACE_AMH_RH_SH: + case TAO_CodeGen::TAO_INTERFACE_AMH_RH_SS: + return 0; // nothing to be done default: { ACE_ERROR_RETURN ((LM_ERROR, @@ -1045,7 +1056,9 @@ be_visitor_interface::visit_typedef (be_typedef *node) case TAO_CodeGen::TAO_INTERFACE_AMH_SH: case TAO_CodeGen::TAO_INTERFACE_AMH_SS: - return 0; // nothing to be done + case TAO_CodeGen::TAO_INTERFACE_AMH_RH_SH: + case TAO_CodeGen::TAO_INTERFACE_AMH_RH_SS: + return 0; // nothing to be done default: { ACE_ERROR_RETURN ((LM_ERROR, diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_ih.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_ih.cpp index b0cdd100ce7..d1b29aa441b 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_ih.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_ih.cpp @@ -57,11 +57,11 @@ be_visitor_interface_ih::visit_interface (be_interface *node) ACE_OS::sprintf (namebuf, "%s", node->flat_name ()); - *os << "//Class " << be_global->impl_class_prefix () + *os << "//Class " << be_global->impl_class_prefix () << namebuf << be_global->impl_class_suffix () << be_nl; // now generate the class definition *os << "class " << be_global->stub_export_macro () - << " " << be_global->impl_class_prefix () << namebuf + << " " << be_global->impl_class_prefix () << namebuf << be_global->impl_class_suffix () << " : "; //inherit from the base skeleton file *os <<"public virtual "<< node->full_skel_name (); @@ -70,30 +70,30 @@ be_visitor_interface_ih::visit_interface (be_interface *node) << "{" << be_nl << "public:" << be_idt_nl << "//Constructor " << be_nl - << be_global->impl_class_prefix () << namebuf + << be_global->impl_class_prefix () << namebuf << be_global->impl_class_suffix () << " (void);" << be_nl << be_nl; if (be_global->gen_copy_ctor ()) { *os << "//Copy Constructor"<<be_nl - << be_global->impl_class_prefix () << namebuf + << be_global->impl_class_prefix () << namebuf << be_global->impl_class_suffix () << " (const " - << be_global->impl_class_prefix () << namebuf + << be_global->impl_class_prefix () << namebuf << be_global->impl_class_suffix () << "&);" <<be_nl <<be_nl; } if (be_global->gen_assign_op ()) { *os << "//Copy Assignment" << be_nl - << be_global->impl_class_prefix () << namebuf - << be_global->impl_class_suffix () << "& " << "operator=(const " - << be_global->impl_class_prefix () << namebuf + << be_global->impl_class_prefix () << namebuf + << be_global->impl_class_suffix () << "& " << "operator=(const " + << be_global->impl_class_prefix () << namebuf << be_global->impl_class_suffix () << "&);" << be_nl << be_nl; } *os << "//Destructor " << be_nl - << "virtual " << "~" << be_global->impl_class_prefix () << namebuf + << "virtual " << "~" << be_global->impl_class_prefix () << namebuf << be_global->impl_class_suffix () << " (void);" << be_nl << be_uidt_nl; @@ -129,7 +129,7 @@ be_visitor_interface_ih::visit_interface (be_interface *node) } */ - + //Generate the code for the members of the derived classes if (node->traverse_inheritance_graph (be_visitor_interface_ih::method_helper, os) == -1) { @@ -139,7 +139,7 @@ be_visitor_interface_ih::visit_interface (be_interface *node) "traversal of inhertance graph failed\n"), -1); } - + *os << "};" << be_nl <<be_nl; return 0; @@ -159,7 +159,7 @@ be_visitor_interface_ih::method_helper (be_interface *derived, ctx.state (TAO_CodeGen::TAO_INTERFACE_IH); ctx.interface (derived); ctx.stream (os); - + be_visitor* visitor = tao_cg->make_visitor (&ctx); if (visitor == 0 || visitor->visit_scope (node) == -1) { diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_is.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_is.cpp index 1d9249dc417..243e6bb1e61 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_is.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_is.cpp @@ -60,10 +60,10 @@ be_visitor_interface_is::visit_interface (be_interface *node) // constructor *os << "// Implementation skeleton constructor" << be_nl; // find if we are at the top scope or inside some module - *os << be_global->impl_class_prefix () << node->flat_name () - << be_global->impl_class_suffix () <<"::" - << be_global->impl_class_prefix () << node->flat_name () - << be_global->impl_class_suffix () + *os << be_global->impl_class_prefix () << node->flat_name () + << be_global->impl_class_suffix () <<"::" + << be_global->impl_class_prefix () << node->flat_name () + << be_global->impl_class_suffix () << " (void)" << be_idt_nl; *os << "{" << be_nl @@ -73,10 +73,10 @@ be_visitor_interface_is::visit_interface (be_interface *node) os->indent (); *os << "// Implementation skeleton destructor" << be_nl; - *os << be_global->impl_class_prefix () << node->flat_name () - << be_global->impl_class_suffix () <<"::~" - << be_global->impl_class_prefix () << node->flat_name () - << be_global->impl_class_suffix () + *os << be_global->impl_class_prefix () << node->flat_name () + << be_global->impl_class_suffix () <<"::~" + << be_global->impl_class_prefix () << node->flat_name () + << be_global->impl_class_suffix () << " (void)" << be_idt_nl; *os << "{" <<be_nl; @@ -86,11 +86,11 @@ be_visitor_interface_is::visit_interface (be_interface *node) { *os << "//Implementation Skeleton Copy Constructor" << be_nl; - *os << be_global->impl_class_prefix () << node->flat_name () + *os << be_global->impl_class_prefix () << node->flat_name () << be_global->impl_class_suffix () <<"::" - << be_global->impl_class_prefix () << node->flat_name () + << be_global->impl_class_prefix () << node->flat_name () << be_global->impl_class_suffix () << " (const " - << be_global->impl_class_prefix () << node->flat_name () + << be_global->impl_class_prefix () << node->flat_name () << be_global->impl_class_suffix () << "& t)"<< be_idt_nl; if(node->n_inherits () >0) @@ -106,11 +106,11 @@ be_visitor_interface_is::visit_interface (be_interface *node) { *os << "//Implementation Skeleton Copy Assignment" << be_nl; - *os << be_global->impl_class_prefix () << node->flat_name () + *os << be_global->impl_class_prefix () << node->flat_name () << be_global->impl_class_suffix () << "& " - << be_global->impl_class_prefix () << node->flat_name () + << be_global->impl_class_prefix () << node->flat_name () << be_global->impl_class_suffix () << "::operator=(const " - << be_global->impl_class_prefix () << node->flat_name () + << be_global->impl_class_prefix () << node->flat_name () << be_global->impl_class_suffix () << "& t)" <<be_idt_nl << "{" << be_idt_nl << "return *this;" << be_uidt_nl diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp index 0470519da3d..a8d8c28bb8a 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_ss.cpp @@ -428,24 +428,6 @@ be_visitor_interface_ss::visit_interface (be_interface *node) this->this_method (node); - *os << "CORBA::Object_ptr tmp = CORBA::Object::_nil ();" << be_nl - << be_nl - << "if (stub->servant_orb_var ()->orb_core ()->optimize_collocation_objects ())" - << be_idt_nl // idt = 2 - << "ACE_NEW_RETURN (tmp, CORBA::Object (stub, 1, this), 0);" - << be_uidt_nl // idt = 1 - << "else" - << be_idt_nl // idt = 2 - << "ACE_NEW_RETURN (tmp, CORBA::Object (stub, 0, this), 0);" - << be_uidt_nl << be_nl // idt = 1 - << "CORBA::Object_var obj = tmp;" << be_nl << be_nl; - - *os << "(void) safe_stub.release ();" << be_nl << be_nl; - - *os << "return " << "::" << node->full_name () << "::_unchecked_narrow (obj.in ());" - << be_uidt_nl // idt = 0 - << "}" << be_nl; - // the _create_collocated_objref method. If the idl compiler does // not generate the type of collocated stub but the orb is asking // for it, simply return null so a remote stub will be used. @@ -521,6 +503,24 @@ be_visitor_interface_ss::this_method (be_interface *node) << "TAO_Stub *stub = this->_create_stub (TAO_ENV_SINGLE_ARG_PARAMETER);" << be_nl << "ACE_CHECK_RETURN (0);" << be_nl << be_nl << "TAO_Stub_Auto_Ptr safe_stub (stub);" << be_nl << be_nl; + + *os << "CORBA::Object_ptr tmp = CORBA::Object::_nil ();" << be_nl + << be_nl + << "if (stub->servant_orb_var ()->orb_core ()->optimize_collocation_objects ())" + << be_idt_nl // idt = 2 + << "ACE_NEW_RETURN (tmp, CORBA::Object (stub, 1, this), 0);" + << be_uidt_nl // idt = 1 + << "else" + << be_idt_nl // idt = 2 + << "ACE_NEW_RETURN (tmp, CORBA::Object (stub, 0, this), 0);" + << be_uidt_nl << be_nl // idt = 1 + << "CORBA::Object_var obj = tmp;" << be_nl << be_nl; + + *os << "(void) safe_stub.release ();" << be_nl << be_nl; + + *os << "return " << "::" << node->full_name () << "::_unchecked_narrow (obj.in ());" + << be_uidt_nl // idt = 0 + << "}" << be_nl; } void diff --git a/TAO/TAO_IDL/be/be_visitor_interface/proxy_impls_ch.cpp b/TAO/TAO_IDL/be/be_visitor_interface/proxy_impls_ch.cpp index bc902079089..cca6a5e8a65 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/proxy_impls_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/proxy_impls_ch.cpp @@ -24,9 +24,9 @@ be_visitor_interface_proxy_impls_ch::visit_interface (be_interface *node) TAO_OutStream *os = this->ctx_->stream (); // Generate Guards. - *os << "// The Proxy Implementations are used by each interface to" + *os << "// The Proxy Implementations are used by each interface to" << be_nl - << "// perform a call. Each different implementation encapsulate" + << "// perform a call. Each different implementation encapsulate" << be_nl << "// an invocation logics." << be_nl << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_interface/remote_proxy_impl_ch.cpp b/TAO/TAO_IDL/be/be_visitor_interface/remote_proxy_impl_ch.cpp index 63495aaa3a6..ebdd838fd64 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/remote_proxy_impl_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/remote_proxy_impl_ch.cpp @@ -24,7 +24,7 @@ be_visitor_interface_remote_proxy_impl_ch::visit_interface (be_interface *node) TAO_OutStream *os = this->ctx_->stream (); *os << be_nl - << "///////////////////////////////////////////////////////////////////////" + << "///////////////////////////////////////////////////////////////////////" << be_nl << "// Remote Proxy Impl. Declaration" << be_nl << "//" << be_nl << be_nl; @@ -73,7 +73,7 @@ be_visitor_interface_remote_proxy_impl_ch::visit_interface (be_interface *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_interface_ch::" "visit_interface - " - "codegen for scope failed\n"), + "codegen for scope failed\n"), -1); } diff --git a/TAO/TAO_IDL/be/be_visitor_interface/thru_poa_proxy_impl_sh.cpp b/TAO/TAO_IDL/be/be_visitor_interface/thru_poa_proxy_impl_sh.cpp index c0b0a72140b..b638b69469a 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/thru_poa_proxy_impl_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/thru_poa_proxy_impl_sh.cpp @@ -59,7 +59,7 @@ be_visitor_interface_thru_poa_proxy_impl_sh::visit_interface (be_interface *node *os << node->thru_poa_proxy_impl_name () << " (void);" << be_nl << be_nl; // Dtor - *os << "virtual ~" << node->thru_poa_proxy_impl_name () + *os << "virtual ~" << node->thru_poa_proxy_impl_name () << " (void) { }" << be_nl << be_nl; if (this->visit_scope (node) == -1) diff --git a/TAO/TAO_IDL/be/be_visitor_interface/tie_sh.cpp b/TAO/TAO_IDL/be/be_visitor_interface/tie_sh.cpp index 628b7d7c9c1..38fe9b00cf7 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/tie_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/tie_sh.cpp @@ -52,11 +52,11 @@ be_visitor_interface_tie_sh::visit_interface (be_interface *node) return 0; } - ACE_OS::memset (namebuf, - '\0', + ACE_OS::memset (namebuf, + '\0', NAMEBUFSIZE); - ACE_OS::memset (tiename, - '\0', + ACE_OS::memset (tiename, + '\0', NAMEBUFSIZE); TAO_OutStream *os = this->ctx_->stream (); @@ -67,20 +67,20 @@ be_visitor_interface_tie_sh::visit_interface (be_interface *node) // We shall have a POA_ prefix only if we are at the topmost level. if (node->is_nested ()) { - ACE_OS::sprintf (namebuf, - "%s", + ACE_OS::sprintf (namebuf, + "%s", node->local_name ()); - ACE_OS::sprintf (tiename, + ACE_OS::sprintf (tiename, "%s_tie", node->local_name ()); } else { // We are outermost. - ACE_OS::sprintf (namebuf, - "POA_%s", + ACE_OS::sprintf (namebuf, + "POA_%s", node->local_name ()); - ACE_OS::sprintf (tiename, + ACE_OS::sprintf (tiename, "POA_%s_tie", node->local_name ()); } @@ -122,7 +122,7 @@ be_visitor_interface_tie_sh::visit_interface (be_interface *node) << ");" << be_uidt << "\n"; if (node->traverse_inheritance_graph ( - be_visitor_interface_tie_sh::method_helper, + be_visitor_interface_tie_sh::method_helper, os ) == -1) { diff --git a/TAO/TAO_IDL/be/be_visitor_interface_fwd/any_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_interface_fwd/any_op_ch.cpp index 4c4f8bc6692..f2d10e97d1c 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface_fwd/any_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface_fwd/any_op_ch.cpp @@ -11,7 +11,7 @@ // any_op_ch.cpp // // = DESCRIPTION -// Visitor generating code for Any operators for a forward declared interface +// Visitor generating code for Any operators for a forward declared interface // in the client header. // // = AUTHOR @@ -55,8 +55,8 @@ be_visitor_interface_fwd_any_op_ch::visit_interface_fwd (be_interface_fwd *node) return 0; } - if (node->cli_hdr_any_op_gen () - || node->imported () + if (node->cli_hdr_any_op_gen () + || node->imported () || node->is_local ()) { return 0; diff --git a/TAO/TAO_IDL/be/be_visitor_interface_fwd/cdr_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_interface_fwd/cdr_op_ch.cpp index 4b2c33666a8..51806a8387b 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface_fwd/cdr_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface_fwd/cdr_op_ch.cpp @@ -28,7 +28,7 @@ ACE_RCSID(be_visitor_interface_fwd, cdr_op_ch, "$Id$") // *************************************************************************** -// Forward declared interface visitor for generating CDR operator declarations +// Forward declared interface visitor for generating CDR operator declarations // in the client header. Called if this node is not later defined in the file. // *************************************************************************** @@ -57,8 +57,8 @@ be_visitor_interface_fwd_cdr_op_ch::visit_interface_fwd (be_interface_fwd *node) } // No CDR operations for locality constraint interfaces. - if (node->cli_hdr_cdr_op_gen () - || node->imported () + if (node->cli_hdr_cdr_op_gen () + || node->imported () || node->is_local ()) { return 0; diff --git a/TAO/TAO_IDL/be/be_visitor_interface_fwd/cdr_op_ci.cpp b/TAO/TAO_IDL/be/be_visitor_interface_fwd/cdr_op_ci.cpp index 7d27f6af919..b947cc6c1b8 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface_fwd/cdr_op_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface_fwd/cdr_op_ci.cpp @@ -29,7 +29,7 @@ ACE_RCSID(be_visitor_interface_fwd, cdr_op_ci, "$Id$") // **************************************************************** // Interface visitor for generating CDR operator declarations in the -// client header +// client header // **************************************************************** be_visitor_interface_fwd_cdr_op_ci::be_visitor_interface_fwd_cdr_op_ci ( @@ -50,7 +50,7 @@ be_visitor_interface_fwd_cdr_op_ci::visit_interface_fwd ( be_interface_fwd *node ) { - if (node->cli_inline_cdr_decl_gen () + if (node->cli_inline_cdr_decl_gen () || node->imported () || node->is_local ()) { @@ -61,13 +61,13 @@ be_visitor_interface_fwd_cdr_op_ci::visit_interface_fwd ( // generate the CDR << and >> operator declarations os->indent (); - *os << be_global->stub_export_macro () << " CORBA::Boolean operator<< (" + *os << be_global->stub_export_macro () << " CORBA::Boolean operator<< (" << be_idt << be_idt_nl << "TAO_OutputCDR &," << be_nl << "const " << node->name () << "_ptr" << be_uidt_nl << ");" << be_uidt_nl << be_nl; - *os << be_global->stub_export_macro () << " CORBA::Boolean operator>> (" + *os << be_global->stub_export_macro () << " CORBA::Boolean operator>> (" << be_idt << be_idt_nl << "TAO_InputCDR &," << be_nl << node->name () << "_ptr &" << be_uidt_nl diff --git a/TAO/TAO_IDL/be/be_visitor_interface_fwd/interface_fwd_ch.cpp b/TAO/TAO_IDL/be/be_visitor_interface_fwd/interface_fwd_ch.cpp index 9157fa79405..4607652d508 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface_fwd/interface_fwd_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface_fwd/interface_fwd_ch.cpp @@ -82,7 +82,7 @@ be_visitor_interface_fwd_ch::visit_interface_fwd (be_interface_fwd *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_interface_fwd_ch::" "visit_interface_fwd - " - "codegen for _var failed\n"), + "codegen for _var failed\n"), -1); } @@ -98,7 +98,7 @@ be_visitor_interface_fwd_ch::visit_interface_fwd (be_interface_fwd *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_interface_fwd_ch::" "visit_interface_fwd - " - "codegen for _out failed\n"), + "codegen for _out failed\n"), -1); } diff --git a/TAO/TAO_IDL/be/be_visitor_module/module_ih.cpp b/TAO/TAO_IDL/be/be_visitor_module/module_ih.cpp index d2c47ea3bd4..4c715342240 100644 --- a/TAO/TAO_IDL/be/be_visitor_module/module_ih.cpp +++ b/TAO/TAO_IDL/be/be_visitor_module/module_ih.cpp @@ -42,7 +42,7 @@ be_visitor_module_ih::visit_module (be_module *node) { if (!node->impl_hdr_gen () && !node->imported ()) // not generated and not imported { - + if (this->visit_scope (node) == -1) { ACE_ERROR_RETURN ((LM_ERROR, @@ -50,7 +50,7 @@ be_visitor_module_ih::visit_module (be_module *node) "visit_module - " "codegen for scope failed\n"), -1); } - + } return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_module/module_sh.cpp b/TAO/TAO_IDL/be/be_visitor_module/module_sh.cpp index 18b70f9237c..f6173c11bf2 100644 --- a/TAO/TAO_IDL/be/be_visitor_module/module_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_module/module_sh.cpp @@ -45,7 +45,7 @@ be_visitor_module_sh::visit_module (be_module *node) TAO_OutStream *os; // Not generated and not imported. - if (!node->srv_hdr_gen () && !node->imported ()) + if (!node->srv_hdr_gen () && !node->imported ()) { os = this->ctx_->stream (); @@ -79,7 +79,7 @@ be_visitor_module_sh::visit_module (be_module *node) } os->decr_indent (); - *os << "}" << be_nl << "TAO_NAMESPACE_CLOSE // module " + *os << "}" << be_nl << "TAO_NAMESPACE_CLOSE // module " << node->name () << "\n\n"; } diff --git a/TAO/TAO_IDL/be/be_visitor_operation/amh_sh.cpp b/TAO/TAO_IDL/be/be_visitor_operation/amh_sh.cpp index bdbc5763080..6ace3481bea 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/amh_sh.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/amh_sh.cpp @@ -50,18 +50,18 @@ be_visitor_amh_operation_sh::visit_operation (be_operation *node) { return 0; } - + // Output stream. TAO_OutStream *os = this->ctx_->stream (); this->ctx_->node (node); - + *os << "\n// \t *** AMH operation declaration starts here ***\n"; - + be_interface *intf; intf = this->ctx_->attribute () ? be_interface::narrow_from_scope (this->ctx_->attribute()->defined_in ()) : be_interface::narrow_from_scope (node->defined_in ()); - + if (!intf) { ACE_ERROR_RETURN ((LM_ERROR, @@ -70,13 +70,13 @@ be_visitor_amh_operation_sh::visit_operation (be_operation *node) "bad interface scope\n"), -1); } - + // Step 1 : Generate return type: always void os->indent (); *os << "virtual void "; // only for source: *os << intf->full_skel_name () << "::"; - - + + // Step 2: Generate the method name // Check if we are an attribute node in disguise. if (this->ctx_->attribute ()) @@ -92,13 +92,13 @@ be_visitor_amh_operation_sh::visit_operation (be_operation *node) } } *os << node->local_name(); - + /* // STEP 3: Generate the argument list with the appropriate // mapping. For these we grab a visitor that generates the // parameter listing. We also generate the ResponseHandler // argument 'on the fly' and add it to the argument list - + //ACE_CString rh_name; //ACE_OSTREAM temp; AST_Decl *parent = ScopeAsDecl (intf->defined_in ()); @@ -109,7 +109,7 @@ be_visitor_amh_operation_sh::visit_operation (be_operation *node) *os << intf->local_name () ; //<< "ResponseHandler *response_handler, "; AST_Type *rh_field_type = new AST_Type; - + // Create the argument Identifier *id = new Identifier ("ResponseHandler"); UTL_IdList *list = new UTL_IdList (id, 0); @@ -119,11 +119,11 @@ be_visitor_amh_operation_sh::visit_operation (be_operation *node) 0); node->add_argument_to_scope (rh_arg); */ - + be_visitor_context ctx (*this->ctx_); ctx.state (TAO_CodeGen::TAO_OPERATION_ARGLIST_SH); be_visitor *visitor = tao_cg->make_visitor (&ctx); - + if (!visitor) { ACE_ERROR_RETURN ((LM_ERROR, @@ -132,7 +132,7 @@ be_visitor_amh_operation_sh::visit_operation (be_operation *node) "Bad visitor to return type\n"), -1); } - + if (node->accept (visitor) == -1) { delete visitor; @@ -142,11 +142,11 @@ be_visitor_amh_operation_sh::visit_operation (be_operation *node) "codegen for argument list failed\n"), -1); } - + delete visitor; - + *os << be_nl; - + return 0; } @@ -173,18 +173,18 @@ be_visitor_amh_rh_operation_sh::visit_operation (be_operation *node) { return 0; } - + // Output stream. TAO_OutStream *os = this->ctx_->stream (); this->ctx_->node (node); - + *os << "\n// \t *** AMH-RH operation declaration starts here ***\n"; - + be_interface *intf; intf = this->ctx_->attribute () ? be_interface::narrow_from_scope (this->ctx_->attribute()->defined_in ()) : be_interface::narrow_from_scope (node->defined_in ()); - + if (!intf) { ACE_ERROR_RETURN ((LM_ERROR, @@ -193,13 +193,13 @@ be_visitor_amh_rh_operation_sh::visit_operation (be_operation *node) "bad interface scope\n"), -1); } - + // Step 1 : Generate return type: always void os->indent (); *os << "virtual void "; // only for source: *os << intf->full_skel_name () << "::"; - - + + // Step 2: Generate the method name // Check if we are an attribute node in disguise. if (this->ctx_->attribute ()) @@ -215,11 +215,11 @@ be_visitor_amh_rh_operation_sh::visit_operation (be_operation *node) } } *os << node->local_name(); - + be_visitor_context ctx (*this->ctx_); ctx.state (TAO_CodeGen::TAO_OPERATION_ARGLIST_SH); be_visitor *visitor = tao_cg->make_visitor (&ctx); - + if (!visitor) { ACE_ERROR_RETURN ((LM_ERROR, @@ -228,7 +228,7 @@ be_visitor_amh_rh_operation_sh::visit_operation (be_operation *node) "Bad visitor to return type\n"), -1); } - + if (node->accept (visitor) == -1) { delete visitor; @@ -238,10 +238,10 @@ be_visitor_amh_rh_operation_sh::visit_operation (be_operation *node) "codegen for argument list failed\n"), -1); } - + delete visitor; - + *os << be_nl; - + return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp b/TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp index 7218da114ed..4bff0fd7f96 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/amh_ss.cpp @@ -43,52 +43,174 @@ be_visitor_amh_operation_ss::visit_operation (be_operation *node) ? be_interface::narrow_from_scope (this->ctx_->attribute ()->defined_in ()) : be_interface::narrow_from_scope (node->defined_in ()); -if (!intf) - { - ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_visitor_operation_ss::" - "visit_operation - " - "bad interface scope\n"), - -1); - } - - os->indent (); - *os << "void " << intf->full_skel_name () << "::"; - - // Check if we are an attribute node in disguise - if (this->ctx_->attribute ()) - { - // now check if we are a "get" or "set" operation - if (node->nmembers () == 1) // set - *os << "_set_"; - else - *os << "_get_"; - } - - *os << node->local_name () - << "_skel (" << be_idt << be_idt_nl - << "TAO_ServerRequest &_tao_server_request," << be_nl - << "void *_tao_object_reference, " << be_nl - << "void * /* context */ " << be_nl - << "TAO_ENV_ARG_DECL" << be_uidt_nl - << ")" << be_uidt_nl; - - // Generate the actual code for the skeleton. However, if any of the argument - // types is "native", we do not generate any skeleton - // last argument - is always TAO_ENV_ARG_PARAMETER. - *os << "{" << be_idt_nl; - - *os << "// foo" << be_uidt_nl; - - *os << "}" << be_nl << be_nl; - - - // see <be_visitor_operation_ss::visit_operation> for more info - - return 0; + if (!intf) + { + ACE_ERROR_RETURN ((LM_ERROR, + "(%N:%l) be_visitor_operation_ss::" + "visit_operation - " + "bad interface scope\n"), + -1); + } + + os->indent (); + *os << "void " << intf->full_skel_name () << "::"; + + // Check if we are an attribute node in disguise + if (this->ctx_->attribute ()) + { + // now check if we are a "get" or "set" operation + if (node->nmembers () == 1) // set + *os << "_set_"; + else + *os << "_get_"; + } + + *os << node->local_name () + << "_skel (" << be_idt << be_idt_nl + << "TAO_ServerRequest &_tao_server_request," << be_nl + << "void *_tao_object_reference, " << be_nl + << "void * /* context */ " << be_nl + << "TAO_ENV_ARG_DECL" << be_uidt_nl + << ")" << be_uidt_nl; + + // Generate the actual code for the skeleton. However, if any of the argument + // types is "native", we do not generate any skeleton + // last argument - is always TAO_ENV_ARG_PARAMETER. + *os << "{" << be_idt_nl; + + *os << "// special code generation for AMH starts here: " << be_nl; + + // Get the right object implementation. + *os << intf->full_skel_name () << " *_tao_impl =" << be_idt_nl + << "ACE_static_cast (" << be_idt << be_idt_nl + << intf->full_skel_name () << " *," << be_nl + << "_tao_object_reference" << be_uidt << be_uidt_nl + << ");" << be_uidt << be_uidt<< be_uidt_nl; + + // Declare a return type variable. + // AMH operations do not have return | OUT + *os << be_idt_nl << "_tao_server_request.argument_flag (0);" << be_uidt_nl << be_nl; + + // Declare variables for arguments. + *os << be_idt; + be_visitor_context ctx = *this->ctx_; + ctx.state (TAO_CodeGen::TAO_OPERATION_ARG_DECL_SS); + be_visitor *visitor = tao_cg->make_visitor (&ctx); + + if (!visitor || (node->accept (visitor) == -1)) + { + delete visitor; + ACE_ERROR_RETURN ((LM_ERROR, + "(%N:%l) be_visitor_operation_ss::" + "visit_operation - " + "codegen for return var decl failed\n"), + -1); + } + + // Demarshal parameters. + if (this->demarshal_params (node) == -1) + { + ACE_ERROR_RETURN ((LM_ERROR, + "(%N:%l) be_visitor_operation_ss::" + "visit_operation - " + "gen_demarshal_params failed\n"), + -1); + } + + // NO interceptors code + + // Make the upcall. + *os << be_uidt_nl + << "_tao_impl->" << node->local_name () << " (" << be_idt << be_idt_nl; + ctx = *this->ctx_; + ctx.state (TAO_CodeGen::TAO_OPERATION_ARG_UPCALL_SS); + visitor = tao_cg->make_visitor (&ctx); + + if (!visitor || (node->accept (visitor) == -1)) + { + delete visitor; + ACE_ERROR_RETURN ((LM_ERROR, + "(%N:%l) be_visitor_operation_ss::" + "visit_operation - " + "codegen for making upcall failed\n"), + -1); + } + + // End the upcall. + *os << be_uidt << be_uidt_nl << ");" << be_uidt_nl << be_nl; + + if (!be_global->exception_support ()) + { + *os << "TAO_INTERCEPTOR_CHECK;"; + } + + *os << be_idt_nl + << "// In case _tao_servant_upcall is not used in this function" + << be_nl + << "ACE_UNUSED_ARG (_tao_servant_upcall);" << be_uidt_nl << be_nl; + + *os << be_uidt << "}\n" << be_uidt_nl; + + return 0; + } +int +be_visitor_amh_operation_ss::demarshal_params (be_operation *node) +{ + TAO_OutStream *os = this->ctx_->stream (); + be_visitor *visitor; + be_visitor_context ctx; + + // Now make sure that we have some in and inout parameters. Otherwise, there + // is nothing to be marshaled in. + if (this->has_param_type (node, AST_Argument::dir_IN) || + this->has_param_type (node, AST_Argument::dir_INOUT)) + { + os->indent (); + + // demarshal the in and inout arguments + *os << "if (!(\n" << be_idt; + + // Marshal each in and inout argument. + ctx = *this->ctx_; + ctx.state (TAO_CodeGen::TAO_OPERATION_ARG_DEMARSHAL_SS); + ctx.sub_state (TAO_CodeGen::TAO_CDR_INPUT); + visitor = tao_cg->make_visitor (&ctx); + + if (!visitor || (node->accept (visitor) == -1)) + { + delete visitor; + ACE_ERROR_RETURN ((LM_ERROR, + "(%N:%l) be_compiled_visitor_operation_ss::" + "gen_demarshal_params - " + "codegen for demarshal failed\n"), + -1); + } + + *os << be_uidt_nl << "))\n" << be_idt; + + // Look into this in detail later + /* // If marshaling fails, raise exception. + if (this->gen_raise_exception (bt, "CORBA::MARSHAL", + "", + "ACE_TRY_ENV") == -1) + { + ACE_ERROR_RETURN ((LM_ERROR, + "(%N:%l) be_compiled_visitor_operation_ss::" + "gen_marshal_and invoke - " + "codegen for return var failed\n"), + -1); + } + + *os << be_uidt << "\n"; + */ + }; + + return 0; +} + // ------------------------- RH ------------------------------------------- @@ -104,62 +226,65 @@ be_visitor_amh_rh_operation_ss::~be_visitor_amh_rh_operation_ss (void) int be_visitor_amh_rh_operation_ss::visit_operation (be_operation *node) { - this->ctx_->node (node); + // Nothing to be done for oneway operations. + if (node->flags () == AST_Operation::OP_oneway) + { + return 0; + } + + // Output stream. TAO_OutStream *os = this->ctx_->stream (); + this->ctx_->node (node); - // If there is an argument of type "native", return immediately. - if (node->has_native ()) - return 0; + *os << "\n// \t *** AMH-RH operation definition starts here ***\n"; - // We need the interface node in which this operation was defined. However, - // if this operation node was an attribute node in disguise, we get this - // information from the context be_interface *intf; intf = this->ctx_->attribute () - ? be_interface::narrow_from_scope (this->ctx_->attribute ()->defined_in ()) + ? be_interface::narrow_from_scope (this->ctx_->attribute()->defined_in ()) : be_interface::narrow_from_scope (node->defined_in ()); if (!intf) { ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_visitor_operation_ss::" + "(%N:%l) be_visitor_operation_sh::" "visit_operation - " "bad interface scope\n"), -1); } + // Step 1 : Generate return type: always void os->indent (); - *os << "void " << intf->full_skel_name () << "::"; + *os << "virtual void "; + // only for source: *os << intf->full_skel_name () << "::"; - // Check if we are an attribute node in disguise - if (this->ctx_->attribute ()) - { - // now check if we are a "get" or "set" operation - if (node->nmembers () == 1) // set - *os << "_set_"; - else - *os << "_get_"; - } + *os << node->local_name(); - *os << node->local_name () - << "_skel (" << be_idt << be_idt_nl - << "TAO_ServerRequest &_tao_server_request," << be_nl - << "void *_tao_object_reference, " << be_nl - << "void * /* context */, " << be_nl - << "CORBA::Environment &ACE_TRY_ENV" << be_uidt_nl - << ")" << be_uidt_nl; + be_visitor_context ctx (*this->ctx_); + ctx.state (TAO_CodeGen::TAO_OPERATION_ARGLIST_SH); + be_visitor *visitor = tao_cg->make_visitor (&ctx); - // Generate the actual code for the skeleton. However, if any of the argument - // types is "native", we do not generate any skeleton - // last argument - is always CORBA::Environment. - *os << "{" << be_idt_nl; - - *os << "// foo" << be_uidt_nl; + if (!visitor) + { + ACE_ERROR_RETURN ((LM_ERROR, + "be_visitor_operation_amh_sh::" + "visit_operation - " + "Bad visitor to return type\n"), + -1); + } - *os << "}" << be_nl << be_nl; + if (node->accept (visitor) == -1) + { + delete visitor; + ACE_ERROR_RETURN ((LM_ERROR, + "(%N:%l) be_visitor_operation_sh::" + "visit_operation - " + "codegen for argument list failed\n"), + -1); + } + delete visitor; - // see <be_visitor_operation_ss::visit_operation> for more info + *os << be_nl; return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_operation/ami_ch.cpp b/TAO/TAO_IDL/be/be_visitor_operation/ami_ch.cpp index 04cda155428..aef71be2e41 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/ami_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/ami_ch.cpp @@ -12,7 +12,7 @@ // // = DESCRIPTION // Visitor generating AMI stub code for Operation node in the -// client header. +// client header. // // = AUTHOR // Alexander Babu Arulanthu <alex@cs.wustl.edu> @@ -26,12 +26,12 @@ #include "be_visitor_operation.h" ACE_RCSID(be_visitor_operation, operation_ami_ch, "$Id$") - + // ****************************************************** // Visitor for generating AMI stub for "operation" in client header. // ****************************************************** - + be_visitor_operation_ami_ch::be_visitor_operation_ami_ch (be_visitor_context *ctx) : be_visitor_operation (ctx) { @@ -49,7 +49,7 @@ be_visitor_operation_ami_ch::visit_operation (be_operation *node) { return 0; } - + // Output stream. TAO_OutStream *os = this->ctx_->stream (); this->ctx_->node (node); @@ -59,9 +59,9 @@ be_visitor_operation_ami_ch::visit_operation (be_operation *node) // STEP I: Return type is void. *os << "void "; - + // STEP 2: Generate the operation name. - + // First the sendc prefix. *os << "sendc_"; diff --git a/TAO/TAO_IDL/be/be_visitor_operation/argument_invoke.cpp b/TAO/TAO_IDL/be/be_visitor_operation/argument_invoke.cpp index ab97bf649f1..cb4d38bb115 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/argument_invoke.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/argument_invoke.cpp @@ -30,7 +30,7 @@ ACE_RCSID(be_visitor_operation, argument_invoke, "$Id$") // ************************************************************ -// operation visitor to handle the passing of arguments to the CDR operators +// operation visitor to handle the passing of arguments to the CDR operators // ************************************************************ be_compiled_visitor_operation_argument_invoke:: @@ -62,14 +62,14 @@ be_compiled_visitor_operation_argument_invoke::pre_process (be_decl *bd) "Bad argument node\n"), -1); } - + switch (arg->direction ()) { case AST_Argument::dir_IN: if (this->ctx_->sub_state () == TAO_CodeGen::TAO_CDR_OUTPUT) { if (this->last_arg_printed_ != - be_compiled_visitor_operation_argument_invoke::TAO_ARG_NONE) + be_compiled_visitor_operation_argument_invoke::TAO_ARG_NONE) *os << " &&\n"; } else if (this->ctx_->sub_state () == TAO_CodeGen::TAO_CDR_INPUT) @@ -81,13 +81,13 @@ be_compiled_visitor_operation_argument_invoke::pre_process (be_decl *bd) if (this->ctx_->sub_state () == TAO_CodeGen::TAO_CDR_OUTPUT) { if (this->last_arg_printed_ != - be_compiled_visitor_operation_argument_invoke::TAO_ARG_NONE) + be_compiled_visitor_operation_argument_invoke::TAO_ARG_NONE) *os << " &&\n"; } else if (this->ctx_->sub_state () == TAO_CodeGen::TAO_CDR_INPUT) { if (this->last_arg_printed_ != - be_compiled_visitor_operation_argument_invoke::TAO_ARG_NONE) + be_compiled_visitor_operation_argument_invoke::TAO_ARG_NONE) *os << " &&\n"; } break; @@ -99,7 +99,7 @@ be_compiled_visitor_operation_argument_invoke::pre_process (be_decl *bd) else if (this->ctx_->sub_state () == TAO_CodeGen::TAO_CDR_INPUT) { if (this->last_arg_printed_ != - be_compiled_visitor_operation_argument_invoke::TAO_ARG_NONE) + be_compiled_visitor_operation_argument_invoke::TAO_ARG_NONE) *os << " &&\n"; } break; @@ -130,12 +130,12 @@ be_compiled_visitor_operation_argument_invoke::post_process (be_decl *bd) case AST_Argument::dir_IN: // only these arguments get printed this->last_arg_printed_ = - be_compiled_visitor_operation_argument_invoke::TAO_ARG_IN; + be_compiled_visitor_operation_argument_invoke::TAO_ARG_IN; break; case AST_Argument::dir_INOUT: // only these arguments get printed this->last_arg_printed_ = - be_compiled_visitor_operation_argument_invoke::TAO_ARG_INOUT; + be_compiled_visitor_operation_argument_invoke::TAO_ARG_INOUT; break; case AST_Argument::dir_OUT: // these arguments don't get printed for the << operator on the stub @@ -151,12 +151,12 @@ be_compiled_visitor_operation_argument_invoke::post_process (be_decl *bd) case AST_Argument::dir_INOUT: // only these arguments get printed this->last_arg_printed_ = - be_compiled_visitor_operation_argument_invoke::TAO_ARG_INOUT; + be_compiled_visitor_operation_argument_invoke::TAO_ARG_INOUT; break; case AST_Argument::dir_OUT: // only these arguments get printed this->last_arg_printed_ = - be_compiled_visitor_operation_argument_invoke::TAO_ARG_OUT; + be_compiled_visitor_operation_argument_invoke::TAO_ARG_OUT; break; } break; diff --git a/TAO/TAO_IDL/be/be_visitor_operation/direct_proxy_impl_ss.cpp b/TAO/TAO_IDL/be/be_visitor_operation/direct_proxy_impl_ss.cpp index f1002a736d1..64b7e6587ad 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/direct_proxy_impl_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/direct_proxy_impl_ss.cpp @@ -17,7 +17,7 @@ be_visitor_operation_direct_proxy_impl_ss::~be_visitor_operation_direct_proxy_im } -int +int be_visitor_operation_direct_proxy_impl_ss::visit_operation (be_operation *node) { TAO_OutStream *os = this->ctx_->stream (); @@ -112,7 +112,7 @@ be_visitor_operation_direct_proxy_impl_ss::visit_operation (be_operation *node) *os << "return "; } - *os << "ACE_reinterpret_cast (" + *os << "ACE_reinterpret_cast (" << be_idt << be_idt_nl //idt = 3 << intf->full_skel_name () << "_ptr," << be_nl @@ -131,7 +131,7 @@ be_visitor_operation_direct_proxy_impl_ss::visit_operation (be_operation *node) -int +int be_visitor_operation_direct_proxy_impl_ss::gen_invoke (be_visitor_context &ctx, be_operation *node) { @@ -155,7 +155,7 @@ be_visitor_operation_direct_proxy_impl_ss::gen_invoke (be_visitor_context &ctx, // end the upcall *os << be_uidt_nl - << ");" << be_uidt << be_uidt << be_uidt_nl; + << ");" << be_uidt << be_uidt << be_uidt_nl; return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_operation/interceptors_exceptlist.cpp b/TAO/TAO_IDL/be/be_visitor_operation/interceptors_exceptlist.cpp index b2efcc9012f..daefb28aa37 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/interceptors_exceptlist.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/interceptors_exceptlist.cpp @@ -94,12 +94,12 @@ be_visitor_operation_interceptors_exceptlist::gen_exceptlist (be_operation *node LM_ERROR, "(%N:%l) be_visitor_operation_interceptors_exceptlist" "gen_exceptlist - " - "be_exception::narrow_from_decl failed\n"), + "be_exception::narrow_from_decl failed\n"), -1 ); - } - + } + *os << excp->tc_name (); ei.next (); diff --git a/TAO/TAO_IDL/be/be_visitor_operation/interceptors_result.cpp b/TAO/TAO_IDL/be/be_visitor_operation/interceptors_result.cpp index 556eb6d41b3..a45a45785d6 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/interceptors_result.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/interceptors_result.cpp @@ -39,7 +39,7 @@ be_visitor_operation_interceptors_result::~be_visitor_operation_interceptors_res { } -int +int be_visitor_operation_interceptors_result::visit_array (be_array *node) { TAO_OutStream *os = this->ctx_->stream (); // get output stream @@ -63,7 +63,7 @@ be_visitor_operation_interceptors_result::visit_array (be_array *node) return 0; } -int +int be_visitor_operation_interceptors_result::visit_enum (be_enum *) { TAO_OutStream *os = this->ctx_->stream (); // get output stream @@ -73,7 +73,7 @@ be_visitor_operation_interceptors_result::visit_enum (be_enum *) return 0; } -int +int be_visitor_operation_interceptors_result::visit_interface (be_interface *) { TAO_OutStream *os = this->ctx_->stream (); // get output stream @@ -83,7 +83,7 @@ be_visitor_operation_interceptors_result::visit_interface (be_interface *) return 0; } -int +int be_visitor_operation_interceptors_result::visit_interface_fwd (be_interface_fwd *) { TAO_OutStream *os = this->ctx_->stream (); // get output stream @@ -94,7 +94,7 @@ be_visitor_operation_interceptors_result::visit_interface_fwd (be_interface_fwd } #ifdef IDL_HAS_VALUETYPE -int +int be_visitor_operation_interceptors_result::visit_valuetype (be_valuetype *) { // Not supported since TAO doesnt support Any operators for valuetype yet. @@ -106,7 +106,7 @@ be_visitor_operation_interceptors_result::visit_valuetype (be_valuetype *) return 0; } -int +int be_visitor_operation_interceptors_result::visit_valuetype_fwd (be_valuetype_fwd *) { // Not supported since TAO doesnt support Any operators for valuetype yet. @@ -166,7 +166,7 @@ be_visitor_operation_interceptors_result::visit_predefined_type (be_predefined_t return 0; } -int +int be_visitor_operation_interceptors_result::visit_sequence (be_sequence *) { TAO_OutStream *os = this->ctx_->stream (); // get output stream @@ -208,7 +208,7 @@ be_visitor_operation_interceptors_result::visit_string (be_string *node) return 0; } -int +int be_visitor_operation_interceptors_result::visit_structure (be_structure *) { TAO_OutStream *os = this->ctx_->stream (); // get output stream @@ -219,7 +219,7 @@ be_visitor_operation_interceptors_result::visit_structure (be_structure *) } -int +int be_visitor_operation_interceptors_result::visit_union (be_union *) { TAO_OutStream *os = this->ctx_->stream (); // get output stream @@ -229,7 +229,7 @@ be_visitor_operation_interceptors_result::visit_union (be_union *) return 0; } -int +int be_visitor_operation_interceptors_result::visit_typedef (be_typedef *node) { node->primitive_base_type ()->accept (this); diff --git a/TAO/TAO_IDL/be/be_visitor_operation/inv_arglist.cpp b/TAO/TAO_IDL/be/be_visitor_operation/inv_arglist.cpp index 5ce6a0f2ec7..0e7b149472d 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/inv_arglist.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/inv_arglist.cpp @@ -31,7 +31,7 @@ be_visitor_operation_inv_arglist::visit_operation (be_operation *node) "codegen for scope failed\n"), -1); } - + return 0; } @@ -73,9 +73,9 @@ be_visitor_operation_inv_arglist::visit_argument (be_argument *node) -1); } ctx.scope (intf); // set new scope - + ctx.state (TAO_CodeGen::TAO_ARGUMENT_INVOKE_ARG_LIST); - + // grab a visitor be_visitor *visitor = tao_cg->make_visitor (&ctx); diff --git a/TAO/TAO_IDL/be/be_visitor_operation/operation_is.cpp b/TAO/TAO_IDL/be/be_visitor_operation/operation_is.cpp index eb8bd41d298..fab89122083 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/operation_is.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/operation_is.cpp @@ -19,7 +19,7 @@ #include "idl.h" #include "idl_extern.h" #include "be.h" -#include "ace/SString.h" +#include "ace/SString.h" #include "be_visitor_operation.h" @@ -48,14 +48,14 @@ be_visitor_operation_is::visit_operation (be_operation *node) os = this->ctx_->stream (); be_interface *intf = this->ctx_->interface (); - - - + + + this->ctx_->node (node); // save the node os->indent (); // start with the current indentation level - + // STEP I: generate the return type @@ -100,23 +100,23 @@ be_visitor_operation_is::visit_operation (be_operation *node) { //If derived class classname = intf->flat_name (); - + } else { ACE_CString str(node->flat_name ()); - + int lnmlength = ACE_OS::strlen (node->local_name ()->get_string ()); - + int fnmlength = ACE_OS::strlen (node->flat_name ()); fnmlength--; classname = str.substr (0,(fnmlength-lnmlength) ).rep (); } - + // STEP 2: generate the operation name - *os << " " << be_global->impl_class_prefix () << classname + *os << " " << be_global->impl_class_prefix () << classname << be_global->impl_class_suffix () << "::" << node->local_name (); // STEP 3: generate the argument list with the appropriate mapping. For these @@ -169,7 +169,7 @@ be_visitor_operation_is::visit_operation (be_operation *node) "Bad visitor to return type\n"), -1); } - + if (bt->accept (visitor) == -1) { @@ -185,7 +185,7 @@ be_visitor_operation_is::visit_operation (be_operation *node) *os << "}" << be_nl << be_uidt_nl; - + return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp b/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp index fcd5480a52d..e1b14bb6861 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/operation_ss.cpp @@ -610,15 +610,15 @@ be_visitor_operation_ss::gen_marshal_params (be_operation *node, TAO_OutStream *os = this->ctx_->stream (); be_visitor *visitor; be_visitor_context ctx; - + // Setup parameters for marshaling and marshal them into the // outgoing stream. // The code below this is for 2way operations only. - + // We will be here only if we are 2way // first initialize a reply message *os << "_tao_server_request.init_reply ();" << be_nl << be_nl; - + // We still need the following check because we maybe 2way and yet have no // parameters and a void return type. if (this->void_return_type (bt) && @@ -627,19 +627,19 @@ be_visitor_operation_ss::gen_marshal_params (be_operation *node, { return 0; } - + // Create temporary variables for the out and return parameters. if (!this->void_return_type (bt)) { ctx = *this->ctx_; - + be_visitor_context *new_ctx = 0; ACE_NEW_RETURN (new_ctx, be_visitor_context (ctx), 0); be_visitor_operation_rettype_post_upcall_ss visitor (new_ctx); - + if (bt->accept (&visitor) == -1) { ACE_ERROR_RETURN ((LM_ERROR, @@ -649,7 +649,7 @@ be_visitor_operation_ss::gen_marshal_params (be_operation *node, -1); } } - + // Generate any temporary variables to demarshal the arguments. ctx = *this->ctx_; be_visitor_args_post_upcall_ss vis1 (new be_visitor_context (ctx)); diff --git a/TAO/TAO_IDL/be/be_visitor_operation/rettype.cpp b/TAO/TAO_IDL/be/be_visitor_operation/rettype.cpp index 5dde548727f..e93e197ad8f 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/rettype.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/rettype.cpp @@ -48,7 +48,7 @@ be_visitor_operation_rettype::visit_array (be_array *node) TAO_OutStream *os = this->ctx_->stream (); be_type *bt; - if (this->ctx_->alias ()) + if (this->ctx_->alias ()) { // A typedefed return type. bt = this->ctx_->alias (); @@ -69,7 +69,7 @@ be_visitor_operation_rettype::visit_enum (be_enum *node) TAO_OutStream *os = this->ctx_->stream (); be_type *bt; - if (this->ctx_->alias ()) + if (this->ctx_->alias ()) { // A typedefed return type. bt = this->ctx_->alias (); @@ -90,7 +90,7 @@ be_visitor_operation_rettype::visit_interface (be_interface *node) TAO_OutStream *os = this->ctx_->stream (); be_type *bt; - if (this->ctx_->alias ()) + if (this->ctx_->alias ()) { // A typedefed return type. bt = this->ctx_->alias (); @@ -111,7 +111,7 @@ be_visitor_operation_rettype::visit_interface_fwd (be_interface_fwd *node) TAO_OutStream *os = this->ctx_->stream (); be_type *bt; - if (this->ctx_->alias ()) + if (this->ctx_->alias ()) { // A typedefed return type. bt = this->ctx_->alias (); @@ -132,7 +132,7 @@ be_visitor_operation_rettype::visit_native (be_native *node) TAO_OutStream *os = this->ctx_->stream (); be_type *bt; - if (this->ctx_->alias ()) + if (this->ctx_->alias ()) { // A typedefed return type. bt = this->ctx_->alias (); @@ -153,7 +153,7 @@ be_visitor_operation_rettype::visit_predefined_type (be_predefined_type *node) TAO_OutStream *os = this->ctx_->stream (); be_type *bt; - if (this->ctx_->alias ()) + if (this->ctx_->alias ()) { // A typedefed return type. bt = this->ctx_->alias (); @@ -200,7 +200,7 @@ be_visitor_operation_rettype::visit_sequence (be_sequence *node) TAO_OutStream *os = this->ctx_->stream (); be_type *bt; - if (this->ctx_->alias ()) + if (this->ctx_->alias ()) { // A typedefed return type. bt = this->ctx_->alias (); @@ -238,7 +238,7 @@ be_visitor_operation_rettype::visit_structure (be_structure *node) TAO_OutStream *os = this->ctx_->stream (); be_type *bt; - if (this->ctx_->alias ()) + if (this->ctx_->alias ()) { // A typedefed return type. bt = this->ctx_->alias (); @@ -285,7 +285,7 @@ be_visitor_operation_rettype::visit_union (be_union *node) TAO_OutStream *os = this->ctx_->stream (); be_type *bt; - if (this->ctx_->alias ()) + if (this->ctx_->alias ()) { // A typedefed return type. bt = this->ctx_->alias (); @@ -315,7 +315,7 @@ be_visitor_operation_rettype::visit_valuetype (be_valuetype *node) TAO_OutStream *os = this->ctx_->stream (); be_type *bt; - if (this->ctx_->alias ()) + if (this->ctx_->alias ()) { // A typedefed return type. bt = this->ctx_->alias (); @@ -336,7 +336,7 @@ be_visitor_operation_rettype::visit_valuetype_fwd (be_valuetype_fwd *node) TAO_OutStream *os = this->ctx_->stream (); be_type *bt; - if (this->ctx_->alias ()) + if (this->ctx_->alias ()) { // A typedefed return type. bt = this->ctx_->alias (); diff --git a/TAO/TAO_IDL/be/be_visitor_operation/rettype_is.cpp b/TAO/TAO_IDL/be/be_visitor_operation/rettype_is.cpp index dc8222ae52e..9578bd33269 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/rettype_is.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/rettype_is.cpp @@ -136,7 +136,7 @@ be_visitor_operation_rettype_is::visit_structure (be_structure *) { TAO_OutStream *os = this->ctx_->stream (); // grab the out stream - + *os << "return 0;" <<be_nl; return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_operation/rettype_marshal_ss.cpp b/TAO/TAO_IDL/be/be_visitor_operation/rettype_marshal_ss.cpp index c363122e4cb..d4f3e25b813 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/rettype_marshal_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/rettype_marshal_ss.cpp @@ -68,7 +68,7 @@ visit_operation (be_operation *node) if (this->ctx_->sub_state () == TAO_CodeGen::TAO_CDR_OUTPUT) { - os->indent (); + os->indent (); *os << "(_tao_out << "; } else if (this->ctx_->sub_state () == TAO_CodeGen::TAO_CDR_INPUT) diff --git a/TAO/TAO_IDL/be/be_visitor_operation/rettype_vardecl_cs.cpp b/TAO/TAO_IDL/be/be_visitor_operation/rettype_vardecl_cs.cpp index 66c072718ad..90cb0f81c4d 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/rettype_vardecl_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/rettype_vardecl_cs.cpp @@ -104,7 +104,7 @@ be_visitor_operation_rettype_vardecl_cs::visit_interface (be_interface *node) } else { - *os << bt->name () << "_ptr _tao_retval = tao_" + *os << bt->name () << "_ptr _tao_retval = tao_" << node->flat_name () << "_nil ();" << be_nl; } @@ -137,7 +137,7 @@ be_visitor_operation_rettype_vardecl_cs::visit_interface_fwd ( } else { - *os << bt->name () << "_ptr _tao_retval = tao_" + *os << bt->name () << "_ptr _tao_retval = tao_" << node->flat_name () << "_nil ();" << be_nl; } @@ -213,7 +213,7 @@ be_visitor_operation_rettype_vardecl_cs::visit_predefined_type (be_predefined_ty switch (node->pt ()) { case AST_PredefinedType::PT_pseudo: - *os << bt->name () << "_ptr _tao_retval = " + *os << bt->name () << "_ptr _tao_retval = " << bt->name () << "::_nil ();" << be_nl; *os << bt->name () << "_var _tao_safe_retval (_tao_retval);"; break; @@ -223,11 +223,11 @@ be_visitor_operation_rettype_vardecl_cs::visit_predefined_type (be_predefined_ty case AST_PredefinedType::PT_void: break; case AST_PredefinedType::PT_longdouble: - *os << bt->name () + *os << bt->name () << " _tao_retval = ACE_CDR_LONG_DOUBLE_INITIALIZER;"; break; case AST_PredefinedType::PT_longlong: - *os << bt->name () + *os << bt->name () << " _tao_retval = ACE_CDR_LONGLONG_INITIALIZER;"; break; default: diff --git a/TAO/TAO_IDL/be/be_visitor_operation/rettype_vardecl_ss.cpp b/TAO/TAO_IDL/be/be_visitor_operation/rettype_vardecl_ss.cpp index ace4e41c8b9..5903a957956 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/rettype_vardecl_ss.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/rettype_vardecl_ss.cpp @@ -154,11 +154,11 @@ visit_predefined_type (be_predefined_type *node) case AST_PredefinedType::PT_void: break; case AST_PredefinedType::PT_longdouble: - *os << bt->name () + *os << bt->name () << " _tao_retval = ACE_CDR_LONG_DOUBLE_INITIALIZER;\n"; break; case AST_PredefinedType::PT_longlong: - *os << bt->name () + *os << bt->name () << " _tao_retval = ACE_CDR_LONGLONG_INITIALIZER;\n"; break; default: diff --git a/TAO/TAO_IDL/be/be_visitor_operation/smart_proxy_cs.cpp b/TAO/TAO_IDL/be/be_visitor_operation/smart_proxy_cs.cpp index 5875b61103a..715d774c75b 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/smart_proxy_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/smart_proxy_cs.cpp @@ -106,14 +106,14 @@ int be_visitor_operation_smart_proxy_cs::visit_operation (be_operation *node) // (i.e. be_interface), so for deciding the exact scope use intf. be_decl* scope = be_scope::narrow_from_scope (intf->defined_in ())->decl (); - + *os << " "; *os << scope->full_name (); - + // Only if there exists any nesting "::" is needed! if (intf->is_nested ()) - *os << "::"; - + *os << "::"; + *os << "TAO_" << intf->flat_name () <<"_Smart_Proxy_Base::"; *os << node->local_name () << " "; @@ -154,7 +154,7 @@ int be_visitor_operation_smart_proxy_cs::visit_operation (be_operation *node) } *os << "this->get_proxy ()"; - + if (this->gen_invoke (ctx, node) == -1) return -1; diff --git a/TAO/TAO_IDL/be/be_visitor_operation/tie_si.cpp b/TAO/TAO_IDL/be/be_visitor_operation/tie_si.cpp index 098429b1537..2a53fe4a408 100644 --- a/TAO/TAO_IDL/be/be_visitor_operation/tie_si.cpp +++ b/TAO/TAO_IDL/be/be_visitor_operation/tie_si.cpp @@ -45,7 +45,7 @@ int be_visitor_operation_tie_si::visit_operation (be_operation *node) { TAO_OutStream *os = this->ctx_->stream (); - be_interface *intf = + be_interface *intf = this->ctx_->interface (); if (!intf) diff --git a/TAO/TAO_IDL/be/be_visitor_root/root_sth.cpp b/TAO/TAO_IDL/be/be_visitor_root/root_sth.cpp index 8fc964ff1c4..32c4b826614 100644 --- a/TAO/TAO_IDL/be/be_visitor_root/root_sth.cpp +++ b/TAO/TAO_IDL/be/be_visitor_root/root_sth.cpp @@ -55,7 +55,7 @@ be_visitor_root_sth::init (void) "(%N:%l) be_visitor_root_sth::init - " "Error:Unable to open server template header file : %s\n", be_global->be_get_server_template_hdr_fname () - ), + ), -1 ); } @@ -83,7 +83,7 @@ be_visitor_root_sth::visit_scope (be_scope *node) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_root_sth::visit_scope - " - "bad node in this scope\n"), + "bad node in this scope\n"), -1); } @@ -113,7 +113,7 @@ be_visitor_root_sth::visit_scope (be_scope *node) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_root_sth::visit_scope - " - "codegen for scope failed\n"), + "codegen for scope failed\n"), -1); } @@ -168,12 +168,12 @@ be_visitor_root_sth::visit_module (be_module *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_root_sth::" "visit_module - " - "codegen for scope failed\n"), + "codegen for scope failed\n"), -1); } os->decr_indent (); - *os << "}" << be_nl << "TAO_NAMESPACE_CLOSE // module " + *os << "}" << be_nl << "TAO_NAMESPACE_CLOSE // module " << node->name () << "\n"; if (!node->is_nested ()) @@ -194,7 +194,7 @@ be_visitor_root_sth::visit_interface (be_interface *node) // Generate the TIE class. - this->ctx_->state (TAO_CodeGen::TAO_INTERFACE_TIE_SH); + this->ctx_->state (TAO_CodeGen::TAO_INTERFACE_TIE_SH); this->ctx_->node (node); be_visitor_interface_tie_sh visitor (this->ctx_); diff --git a/TAO/TAO_IDL/be/be_visitor_scope.cpp b/TAO/TAO_IDL/be/be_visitor_scope.cpp index 5c3c00d2a15..3e12efb3841 100644 --- a/TAO/TAO_IDL/be/be_visitor_scope.cpp +++ b/TAO/TAO_IDL/be/be_visitor_scope.cpp @@ -69,7 +69,7 @@ be_visitor_scope::visit_scope (be_scope *node) delete si; ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_scope::visit_scope - " - "bad node in this scope\n"), + "bad node in this scope\n"), -1); } @@ -85,13 +85,13 @@ be_visitor_scope::visit_scope (be_scope *node) this->ctx_->node (bd); this->elem_number_++; - // Do any pre processing using the next item info. + // Do any pre processing using the next item info. if (this->pre_process (bd) == -1) { delete si; ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_scope::visit_scope - " - "pre processing failed\n"), + "pre processing failed\n"), -1); } @@ -101,7 +101,7 @@ be_visitor_scope::visit_scope (be_scope *node) delete si; ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_scope::visit_scope - " - "codegen for scope failed\n"), + "codegen for scope failed\n"), -1); } @@ -112,7 +112,7 @@ be_visitor_scope::visit_scope (be_scope *node) delete si; ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_scope::visit_scope - " - "post processing failed\n"), + "post processing failed\n"), -1); } @@ -161,7 +161,7 @@ be_visitor_scope::next_elem (be_decl *elem, { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_scope::next_elem - " - "bad scope\n"), + "bad scope\n"), -1); } @@ -188,7 +188,7 @@ be_visitor_scope::next_elem (be_decl *elem, delete si; ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_scope::next_elem - " - "bad node in this scope\n"), + "bad node in this scope\n"), -1); } @@ -212,7 +212,7 @@ be_visitor_scope::next_elem (be_decl *elem, delete si; ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_scope::next_elem - " - "bad node in this scope\n"), + "bad node in this scope\n"), -1); } @@ -238,7 +238,7 @@ idl_bool be_visitor_scope::last_node (be_decl *bd) { be_decl *next = 0; - (void) this->next_elem (bd, + (void) this->next_elem (bd, next); if (next != 0) @@ -271,7 +271,7 @@ be_visitor_scope::last_inout_or_out_node (be_decl *) } be_decl *next_next = 0; - this->next_elem (next, + this->next_elem (next, next_next); next = next_next; diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_obj_sequence_ci.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_obj_sequence_ci.cpp index 73c86e19f8e..23c63bc255d 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_obj_sequence_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_obj_sequence_ci.cpp @@ -40,7 +40,7 @@ be_visitor_sequence_ci::gen_bounded_obj_sequence (be_sequence *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_sequence_ci::" "visit_sequence - " - "Bad element type\n"), + "Bad element type\n"), -1); } @@ -58,7 +58,7 @@ be_visitor_sequence_ci::gen_bounded_obj_sequence (be_sequence *node) pt = bt; } - const char *name = + const char *name = be_decl::narrow_from_decl (pt)->full_name (); idl_bool bt_is_defined; @@ -83,22 +83,22 @@ be_visitor_sequence_ci::gen_bounded_obj_sequence (be_sequence *node) const char * class_name = node->instance_name (); static char full_class_name [NAMEBUFSIZE]; - ACE_OS::memset (full_class_name, - '\0', + ACE_OS::memset (full_class_name, + '\0', NAMEBUFSIZE); if (node->is_nested ()) { be_scope *parent = be_scope::narrow_from_scope (node->defined_in ()); - ACE_OS::sprintf (full_class_name, + ACE_OS::sprintf (full_class_name, "%s::%s", parent->decl ()->full_name (), class_name); } else { - ACE_OS::sprintf (full_class_name, + ACE_OS::sprintf (full_class_name, "%s", class_name); } @@ -146,7 +146,7 @@ be_visitor_sequence_ci::gen_bounded_obj_sequence (be_sequence *node) *os << "*[" << node->max_size () << "], 0);" << be_nl << be_nl - << "for (CORBA::ULong i = 0; i < " << node->max_size () + << "for (CORBA::ULong i = 0; i < " << node->max_size () << "; i++)" << be_idt_nl << "{" << be_idt_nl << "buf[i] = "; @@ -192,7 +192,7 @@ be_visitor_sequence_ci::gen_bounded_obj_sequence (be_sequence *node) *os << " **buffer)" << be_nl << "{" << be_idt_nl - << "for (CORBA::ULong i = 0; i < " << node->max_size () + << "for (CORBA::ULong i = 0; i < " << node->max_size () << "; ++i)" << be_idt_nl << "{" << be_idt_nl << "if (buffer[i] != "; @@ -226,7 +226,7 @@ be_visitor_sequence_ci::gen_bounded_obj_sequence (be_sequence *node) << "tao_" << pt->flat_name () << "_nil ();" << be_uidt_nl; } - *os << "}" << be_uidt << be_uidt_nl + *os << "}" << be_uidt << be_uidt_nl << "}" << be_uidt_nl << be_nl << "delete[] buffer;" << be_uidt_nl << "} " << be_nl @@ -252,7 +252,7 @@ be_visitor_sequence_ci::gen_bounded_obj_sequence (be_sequence *node) *os <<"* *value," << be_nl << "CORBA::Boolean release)" << be_uidt_nl << "// Constructor from data." << be_nl - << " : TAO_Bounded_Base_Sequence (" << node->max_size () + << " : TAO_Bounded_Base_Sequence (" << node->max_size () << ", length, value, release)" << be_nl << "{" << be_nl << "}" << be_nl @@ -363,7 +363,7 @@ be_visitor_sequence_ci::gen_bounded_obj_sequence (be_sequence *node) << "}" << be_uidt << be_uidt_nl << "}" << be_nl << "else" << be_idt_nl - << "this->buffer_ = " << class_name + << "this->buffer_ = " << class_name << "::allocbuf (rhs.maximum_);" << be_uidt_nl << be_nl << "TAO_Bounded_Base_Sequence::operator= (rhs);" << be_nl @@ -474,7 +474,7 @@ be_visitor_sequence_ci::gen_bounded_obj_sequence (be_sequence *node) bt->accept(visitor); *os << " **" << be_nl; - *os << full_class_name << "::get_buffer (CORBA::Boolean orphan)" + *os << full_class_name << "::get_buffer (CORBA::Boolean orphan)" << be_nl << "{" << be_idt_nl; @@ -486,7 +486,7 @@ be_visitor_sequence_ci::gen_bounded_obj_sequence (be_sequence *node) << "// We retain ownership." << be_nl << "if (this->buffer_ == 0)" << be_nl << "{" << be_idt_nl - << "result = " << class_name << "::allocbuf (this->maximum_);" + << "result = " << class_name << "::allocbuf (this->maximum_);" << be_nl << "this->buffer_ = result;" << be_nl << "this->release_ = 1;" << be_uidt_nl diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_sequence_ch.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_sequence_ch.cpp index a6349b08b0c..ee01027a5ff 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_sequence_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_sequence_ch.cpp @@ -154,7 +154,7 @@ be_visitor_sequence_ch::gen_bounded_sequence (be_sequence *node) *os << " *get_buffer (void) const;" << be_nl; // replace - *os << "void replace (" << be_idt << be_idt_nl + *os << "void replace (" << be_idt << be_idt_nl << "CORBA::ULong max," << be_nl << "CORBA::ULong length," << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_sequence_ci.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_sequence_ci.cpp index 7cef7f0c027..0a239629207 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_sequence_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_sequence_ci.cpp @@ -74,8 +74,8 @@ be_visitor_sequence_ci::gen_bounded_sequence (be_sequence *node) const char * class_name = node->instance_name (); static char full_class_name [NAMEBUFSIZE]; - ACE_OS::memset (full_class_name, - '\0', + ACE_OS::memset (full_class_name, + '\0', NAMEBUFSIZE); if (node->is_nested ()) @@ -83,14 +83,14 @@ be_visitor_sequence_ci::gen_bounded_sequence (be_sequence *node) be_scope *s = be_scope::narrow_from_scope (node->defined_in ()); - ACE_OS::sprintf (full_class_name, + ACE_OS::sprintf (full_class_name, "%s::%s", s->decl ()->full_name (), class_name); } else { - ACE_OS::sprintf (full_class_name, + ACE_OS::sprintf (full_class_name, "%s", class_name); } diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_str_sequence_ch.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_str_sequence_ch.cpp index 9d9fe7d4078..89fc707468b 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_str_sequence_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_str_sequence_ch.cpp @@ -116,7 +116,7 @@ be_visitor_sequence_ch::gen_bounded_str_sequence (be_sequence *node) *os << "// = Accessors." << be_nl; // operator[] - *os << "TAO_SeqElem_String_Manager operator[] (CORBA::ULong index) const;" + *os << "TAO_SeqElem_String_Manager operator[] (CORBA::ULong index) const;" << be_nl << be_nl; // Static operations diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_str_sequence_ci.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_str_sequence_ci.cpp index 0eefcffb00d..4837f699946 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_str_sequence_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_str_sequence_ci.cpp @@ -128,7 +128,7 @@ be_visitor_sequence_ci::gen_bounded_str_sequence (be_sequence *node) // constructor *os << "ACE_INLINE" << be_nl - << full_class_name << "::" << class_name << " (const " + << full_class_name << "::" << class_name << " (const " << class_name << " &rhs)" << be_idt_nl << ": TAO_Bounded_Base_Sequence (rhs)" << be_uidt_nl << "{" << be_idt_nl @@ -151,7 +151,7 @@ be_visitor_sequence_ci::gen_bounded_str_sequence (be_sequence *node) // operator= *os << "ACE_INLINE " << full_class_name << "& " << be_nl - << full_class_name << "::operator= (const " + << full_class_name << "::operator= (const " << class_name << " &rhs)" << be_nl << "{" << be_idt_nl << "if (this == &rhs)" << be_idt_nl diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_str_sequence_cs.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_str_sequence_cs.cpp index c299eade4a8..dee7d1881bd 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_str_sequence_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_str_sequence_cs.cpp @@ -77,10 +77,10 @@ be_visitor_sequence_cs::gen_bounded_str_sequence (be_sequence *node) // allocate_buffer *os << "void" << be_nl - << full_class_name << "::_allocate_buffer (CORBA::ULong /* length */)" + << full_class_name << "::_allocate_buffer (CORBA::ULong /* length */)" << be_nl << "{" << be_idt_nl - << "// For this class memory is never reallocated so the implementation" + << "// For this class memory is never reallocated so the implementation" << be_nl << "// is *really* simple." << be_nl << "this->buffer_ = " << class_name << "::allocbuf (" @@ -94,7 +94,7 @@ be_visitor_sequence_cs::gen_bounded_str_sequence (be_sequence *node) << "{" << be_idt_nl << "if (this->buffer_ == 0 || this->release_ == 0)" << be_idt_nl << "return;" << be_uidt_nl - << "char **tmp = ACE_reinterpret_cast (char **, this->buffer_);" + << "char **tmp = ACE_reinterpret_cast (char **, this->buffer_);" << be_nl << class_name << "::freebuf (tmp);" << be_nl << "this->buffer_ = 0;" << be_uidt_nl diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_wstr_sequence_ch.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_wstr_sequence_ch.cpp index c683a7e2764..75654b7c89c 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_wstr_sequence_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_wstr_sequence_ch.cpp @@ -115,7 +115,7 @@ be_visitor_sequence_ch::gen_bounded_wstr_sequence (be_sequence *node) *os << "// = Accessors." << be_nl; // operator[] - *os << "TAO_SeqElem_WString_Manager operator[] (CORBA::ULong index) const;" + *os << "TAO_SeqElem_WString_Manager operator[] (CORBA::ULong index) const;" << be_nl << be_nl; // Static operations diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_wstr_sequence_ci.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_wstr_sequence_ci.cpp index 497ac4acf6d..164e72ff3c3 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_wstr_sequence_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_wstr_sequence_ci.cpp @@ -117,7 +117,7 @@ be_visitor_sequence_ci::gen_bounded_wstr_sequence (be_sequence *node) << full_class_name << "::" << class_name << " (CORBA::ULong length," << be_idt_nl << "CORBA::WChar* *value," << be_nl << "CORBA::Boolean release)" << be_uidt_nl - << " : TAO_Bounded_Base_Sequence (" << node->max_size () + << " : TAO_Bounded_Base_Sequence (" << node->max_size () << ", length, value, release)" << be_nl << "{" << be_nl << "}" << be_nl @@ -125,16 +125,16 @@ be_visitor_sequence_ci::gen_bounded_wstr_sequence (be_sequence *node) // constructor *os << "ACE_INLINE" << be_nl - << full_class_name << "::" << class_name << " (const " + << full_class_name << "::" << class_name << " (const " << class_name << " &rhs)" << be_idt_nl << ": TAO_Bounded_Base_Sequence (rhs)" << be_uidt_nl << "{" << be_idt_nl << "if (rhs.buffer_ != 0)" << be_nl << "{" << be_idt_nl - << "CORBA::WChar **tmp1 = " << class_name + << "CORBA::WChar **tmp1 = " << class_name << "::allocbuf (this->maximum_);" << be_nl - << "CORBA::WChar ** const tmp2 =" << be_idt_nl - << "ACE_reinterpret_cast (CORBA::WChar ** ACE_CAST_CONST, rhs.buffer_);" + << "CORBA::WChar ** const tmp2 =" << be_idt_nl + << "ACE_reinterpret_cast (CORBA::WChar ** ACE_CAST_CONST, rhs.buffer_);" << be_uidt_nl << be_nl << "for (CORBA::ULong i=0; i < rhs.length_; i++)" << be_idt_nl @@ -151,7 +151,7 @@ be_visitor_sequence_ci::gen_bounded_wstr_sequence (be_sequence *node) // operator= *os << "ACE_INLINE " << full_class_name << "& " << be_nl - << full_class_name << "::operator= (const " << class_name + << full_class_name << "::operator= (const " << class_name << " &rhs)" << be_nl << "{" << be_idt_nl << "if (this == &rhs)" << be_idt_nl @@ -159,8 +159,8 @@ be_visitor_sequence_ci::gen_bounded_wstr_sequence (be_sequence *node) << be_nl << "if (this->release_ && this->buffer_ != 0)" << be_nl << "{ " << be_idt_nl - << "CORBA::WChar **tmp =" << be_idt_nl - << "ACE_reinterpret_cast (CORBA::WChar **, this->buffer_);" + << "CORBA::WChar **tmp =" << be_idt_nl + << "ACE_reinterpret_cast (CORBA::WChar **, this->buffer_);" << be_uidt_nl << be_nl << "for (CORBA::ULong i = 0; i < this->length_; ++i)" << be_nl @@ -170,16 +170,16 @@ be_visitor_sequence_ci::gen_bounded_wstr_sequence (be_sequence *node) << "}" << be_uidt_nl << "}" << be_nl << "else" << be_idt_nl - << "this->buffer_ = " << class_name + << "this->buffer_ = " << class_name << "::allocbuf (rhs.maximum_);" << be_uidt_nl << be_nl << "TAO_Bounded_Base_Sequence::operator= (rhs);" << be_nl << be_nl - << "CORBA::WChar **tmp1 =" << be_idt_nl - << "ACE_reinterpret_cast (CORBA::WChar **, this->buffer_);" + << "CORBA::WChar **tmp1 =" << be_idt_nl + << "ACE_reinterpret_cast (CORBA::WChar **, this->buffer_);" << be_uidt_nl - << "CORBA::WChar ** const tmp2 =" << be_idt_nl - << "ACE_reinterpret_cast (CORBA::WChar ** ACE_CAST_CONST, rhs.buffer_);" + << "CORBA::WChar ** const tmp2 =" << be_idt_nl + << "ACE_reinterpret_cast (CORBA::WChar ** ACE_CAST_CONST, rhs.buffer_);" << be_uidt_nl << be_nl << "for (CORBA::ULong i = 0; i < rhs.length_; i++)" << be_idt_nl @@ -209,14 +209,14 @@ be_visitor_sequence_ci::gen_bounded_wstr_sequence (be_sequence *node) << "// We retain ownership. " << be_nl << "if (this->buffer_ == 0)" << be_nl << "{" << be_idt_nl - << "result = " << class_name << "::allocbuf (this->maximum_);" + << "result = " << class_name << "::allocbuf (this->maximum_);" << be_nl << "this->buffer_ = result;" << be_nl << "this->release_ = 1;" << be_uidt_nl << "}" << be_nl << "else" << be_nl << "{" << be_idt_nl - << "result = ACE_reinterpret_cast (CORBA::WChar **, this->buffer_);" + << "result = ACE_reinterpret_cast (CORBA::WChar **, this->buffer_);" << be_uidt_nl << "}" << be_uidt_nl << "}" << be_nl @@ -226,7 +226,7 @@ be_visitor_sequence_ci::gen_bounded_wstr_sequence (be_sequence *node) << "{" << be_idt_nl << "// We set state back to default and relinquish" << be_nl << "// ownership." << be_nl - << "result = ACE_reinterpret_cast (CORBA::WChar **, this->buffer_);" + << "result = ACE_reinterpret_cast (CORBA::WChar **, this->buffer_);" << be_nl << "this->maximum_ = 0;" << be_nl << "this->length_ = 0;" << be_nl diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_wstr_sequence_cs.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_wstr_sequence_cs.cpp index 5c7091f6c39..d6c0170bdb2 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_wstr_sequence_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/gen_bounded_wstr_sequence_cs.cpp @@ -73,10 +73,10 @@ be_visitor_sequence_cs::gen_bounded_wstr_sequence (be_sequence *node) // allocate_buffer *os << "void" << be_nl - << full_class_name << "::_allocate_buffer (CORBA::ULong /* length */)" + << full_class_name << "::_allocate_buffer (CORBA::ULong /* length */)" << be_nl << "{" << be_idt_nl - << "// For this class memory is never reallocated so the implementation" + << "// For this class memory is never reallocated so the implementation" << be_nl << "// is *really* simple." << be_nl << "this->buffer_ = " << class_name << "::allocbuf (" @@ -90,8 +90,8 @@ be_visitor_sequence_cs::gen_bounded_wstr_sequence (be_sequence *node) << "{" << be_idt_nl << "if (this->buffer_ == 0 || this->release_ == 0)" << be_idt_nl << "return;" << be_uidt_nl - << "CORBA::WChar **tmp =" << be_idt_nl - << "ACE_reinterpret_cast (CORBA::WChar **, this->buffer_);" + << "CORBA::WChar **tmp =" << be_idt_nl + << "ACE_reinterpret_cast (CORBA::WChar **, this->buffer_);" << be_uidt_nl << class_name << "::freebuf (tmp);" << be_nl << "this->buffer_ = 0;" << be_uidt_nl diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_obj_sequence_ci.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_obj_sequence_ci.cpp index d3801f4644a..ca6c891e885 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_obj_sequence_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_obj_sequence_ci.cpp @@ -39,7 +39,7 @@ be_visitor_sequence_ci::gen_unbounded_obj_sequence (be_sequence *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_sequence_ci::" "visit_sequence - " - "Bad element type\n"), + "Bad element type\n"), -1); } @@ -57,7 +57,7 @@ be_visitor_sequence_ci::gen_unbounded_obj_sequence (be_sequence *node) pt = bt; } - const char *name = + const char *name = be_decl::narrow_from_decl (pt)->full_name (); idl_bool bt_is_defined; @@ -82,22 +82,22 @@ be_visitor_sequence_ci::gen_unbounded_obj_sequence (be_sequence *node) const char *class_name = node->instance_name (); static char full_class_name [NAMEBUFSIZE]; - ACE_OS::memset (full_class_name, - '\0', + ACE_OS::memset (full_class_name, + '\0', NAMEBUFSIZE); if (node->is_nested ()) { be_scope *parent = be_scope::narrow_from_scope (node->defined_in ()); - ACE_OS::sprintf (full_class_name, + ACE_OS::sprintf (full_class_name, "%s::%s", parent->decl ()->full_name (), class_name); } else { - ACE_OS::sprintf (full_class_name, + ACE_OS::sprintf (full_class_name, "%s", class_name); } @@ -175,7 +175,7 @@ be_visitor_sequence_ci::gen_unbounded_obj_sequence (be_sequence *node) *os << "tao_" << pt->flat_name () << "_nil ();"; } - *os << be_uidt_nl + *os << be_uidt_nl << "}" << be_uidt_nl << be_nl << "return buf;" << be_uidt_nl << "}" << be_nl << be_nl; @@ -203,7 +203,7 @@ be_visitor_sequence_ci::gen_unbounded_obj_sequence (be_sequence *node) // Constructor. *os << "ACE_INLINE" << be_nl - << full_class_name << "::" << class_name + << full_class_name << "::" << class_name << " (CORBA::ULong maximum)" << be_idt_nl << ": TAO_Unbounded_Base_Sequence (maximum, " << class_name << "::allocbuf (maximum))" << be_uidt_nl @@ -213,7 +213,7 @@ be_visitor_sequence_ci::gen_unbounded_obj_sequence (be_sequence *node) // Constructor. *os << "ACE_INLINE" << be_nl - << full_class_name << "::" << class_name + << full_class_name << "::" << class_name << " (CORBA::ULong maximum," << be_idt_nl << "CORBA::ULong length," << be_nl; @@ -238,7 +238,7 @@ be_visitor_sequence_ci::gen_unbounded_obj_sequence (be_sequence *node) bt->accept(visitor); - *os <<" **tmp1 = " << class_name << "::allocbuf (this->maximum_);" + *os <<" **tmp1 = " << class_name << "::allocbuf (this->maximum_);" << be_nl; bt->accept (visitor); @@ -286,7 +286,7 @@ be_visitor_sequence_ci::gen_unbounded_obj_sequence (be_sequence *node) // Operator =. *os << "ACE_INLINE " << full_class_name << " &" << be_nl - << full_class_name << "::operator= (const " + << full_class_name << "::operator= (const " << class_name << " &rhs)" << be_nl << "{" << be_idt_nl << "if (this == &rhs)" << be_idt_nl @@ -410,7 +410,7 @@ be_visitor_sequence_ci::gen_unbounded_obj_sequence (be_sequence *node) *os << bt->name () << "," << bt->name () << "_var>" << be_nl - << full_class_name << "::operator[] (CORBA::ULong index) const" + << full_class_name << "::operator[] (CORBA::ULong index) const" << be_nl << "// read-write accessor" << be_nl << "{" << be_idt_nl @@ -459,7 +459,7 @@ be_visitor_sequence_ci::gen_unbounded_obj_sequence (be_sequence *node) << "// We retain ownership." << be_nl << "if (this->buffer_ == 0)" << be_nl << "{" << be_idt_nl - << "result = " << class_name << "::allocbuf (this->maximum_);" + << "result = " << class_name << "::allocbuf (this->maximum_);" << be_nl << "this->buffer_ = result;" << be_nl << "this->release_ = 1;" << be_uidt_nl diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_sequence_ci.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_sequence_ci.cpp index c0cd44ecd0d..efde5904e65 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_sequence_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/gen_unbounded_sequence_ci.cpp @@ -107,7 +107,7 @@ be_visitor_sequence_ci::gen_unbounded_sequence (be_sequence *node) // allocbuf *os << "// = Static operations." << be_nl << "ACE_INLINE "; - // the accept is here the first time used and if an + // the accept is here the first time used and if an // error occurs, it will occur here. Later no check // for errors will be done. if (bt->accept (visitor) == -1) @@ -125,15 +125,15 @@ be_visitor_sequence_ci::gen_unbounded_sequence (be_sequence *node) bt->accept (visitor); *os << " *retval = 0;" << be_nl << "ACE_NEW_RETURN (retval, "; - bt->accept (visitor); + bt->accept (visitor); *os << "[size], 0);" << be_nl << "return retval;" << be_uidt_nl << "}" << be_nl << be_nl; *os << "ACE_INLINE void " - << full_class_name << "::freebuf ("; - bt->accept (visitor); + << full_class_name << "::freebuf ("; + bt->accept (visitor); *os << " *buffer)" << be_nl << "// Free the sequence." << be_nl << "{" << be_idt_nl @@ -173,7 +173,7 @@ be_visitor_sequence_ci::gen_unbounded_sequence (be_sequence *node) // constructor *os << "ACE_INLINE" << be_nl - << full_class_name << "::" << class_name << " (const " + << full_class_name << "::" << class_name << " (const " << class_name << " &rhs)" << be_nl << "// Copy constructor." << be_idt_nl; *os << ": TAO_Unbounded_Base_Sequence (rhs)" << be_uidt_nl @@ -208,7 +208,7 @@ be_visitor_sequence_ci::gen_unbounded_sequence (be_sequence *node) << "}" << be_uidt_nl << "}" << be_nl << be_nl; - + // operator = *os << "ACE_INLINE " << full_class_name << " &" << be_nl << full_class_name << "::operator= (const " << class_name << " &rhs)" << be_nl @@ -222,28 +222,28 @@ be_visitor_sequence_ci::gen_unbounded_sequence (be_sequence *node) << "if (this->maximum_ < rhs.maximum_)" << be_nl << "{" << be_idt_nl << "// free the old buffer" << be_nl; - bt->accept (visitor); + bt->accept (visitor); *os <<" *tmp = ACE_reinterpret_cast ("; - bt->accept (visitor); + bt->accept (visitor); *os << " *, this->buffer_);" << be_nl << class_name << "::freebuf (tmp);" << be_nl - << "this->buffer_ = " << class_name + << "this->buffer_ = " << class_name << "::allocbuf (rhs.maximum_);" << be_uidt_nl << "}" << be_uidt_nl << "}" << be_nl << "else" << be_idt_nl - << "this->buffer_ = " << class_name + << "this->buffer_ = " << class_name << "::allocbuf (rhs.maximum_);" << be_uidt_nl << be_nl << "TAO_Unbounded_Base_Sequence::operator= (rhs);" << be_nl << be_nl; - bt->accept (visitor); + bt->accept (visitor); *os <<" *tmp1 = ACE_reinterpret_cast ("; - bt->accept (visitor); + bt->accept (visitor); *os << " *, this->buffer_);" << be_nl; - bt->accept (visitor); + bt->accept (visitor); *os <<" * const tmp2 = ACE_reinterpret_cast ("; - bt->accept (visitor); + bt->accept (visitor); *os << " * ACE_CAST_CONST, rhs.buffer_);" << be_nl << be_nl << "for (CORBA::ULong i = 0; i < this->length_; ++i)" << be_idt_nl; @@ -266,31 +266,31 @@ be_visitor_sequence_ci::gen_unbounded_sequence (be_sequence *node) // Accessors *os << "// = Accessors." << be_nl; *os << "ACE_INLINE "; - bt->accept (visitor); + bt->accept (visitor); *os <<" &" << be_nl << full_class_name << "::operator[] (CORBA::ULong i)" << be_nl << "// operator []" << be_nl << "{" << be_idt_nl << "ACE_ASSERT (i < this->maximum_);" << be_nl; - bt->accept (visitor); + bt->accept (visitor); *os <<"* tmp = ACE_reinterpret_cast("; - bt->accept (visitor); + bt->accept (visitor); *os << "*,this->buffer_);" << be_nl << "return tmp[i];" << be_uidt_nl << "}" << be_nl << be_nl; - + // operator[] - *os << "ACE_INLINE const "; - bt->accept (visitor); + *os << "ACE_INLINE const "; + bt->accept (visitor); *os << " &" << be_nl << full_class_name << "::operator[] (CORBA::ULong i) const" << be_nl << "// operator []" << be_nl << "{" << be_idt_nl << "ACE_ASSERT (i < this->maximum_);" << be_nl; - bt->accept (visitor); + bt->accept (visitor); *os <<" * const tmp = ACE_reinterpret_cast ("; - bt->accept (visitor); + bt->accept (visitor); *os << "* ACE_CAST_CONST, this->buffer_);" << be_nl << "return tmp[i];" << be_uidt_nl << "}" << be_nl @@ -300,11 +300,11 @@ be_visitor_sequence_ci::gen_unbounded_sequence (be_sequence *node) *os << "// Implement the TAO_Base_Sequence methods (see Sequence.h)" << be_nl << be_nl; *os << "ACE_INLINE "; - bt->accept(visitor); + bt->accept(visitor); *os << " *" << be_nl << full_class_name << "::get_buffer (CORBA::Boolean orphan)" << be_nl << "{" << be_idt_nl; - bt->accept(visitor); + bt->accept(visitor); *os <<" *result = 0;" << be_nl << "if (orphan == 0)" << be_nl << "{" << be_idt_nl @@ -317,8 +317,8 @@ be_visitor_sequence_ci::gen_unbounded_sequence (be_sequence *node) << "}" << be_nl << "else" << be_nl << "{" << be_idt_nl - << "result = ACE_reinterpret_cast ("; - bt->accept (visitor); + << "result = ACE_reinterpret_cast ("; + bt->accept (visitor); *os << "*, this->buffer_);" << be_uidt_nl << "}" << be_uidt_nl << "}" << be_nl @@ -328,8 +328,8 @@ be_visitor_sequence_ci::gen_unbounded_sequence (be_sequence *node) << "{" << be_idt_nl << "// We set the state back to default and relinquish" << be_nl << "// ownership." << be_nl - << "result = ACE_reinterpret_cast("; - bt->accept (visitor); + << "result = ACE_reinterpret_cast("; + bt->accept (visitor); *os << "*,this->buffer_);" << be_nl << "this->maximum_ = 0;" << be_nl << "this->length_ = 0;" << be_nl @@ -342,8 +342,8 @@ be_visitor_sequence_ci::gen_unbounded_sequence (be_sequence *node) << be_nl; // get_buffer - *os << "ACE_INLINE const "; - bt->accept (visitor); + *os << "ACE_INLINE const "; + bt->accept (visitor); *os << " *" << be_nl << full_class_name << "::get_buffer (void) const" << be_nl << "{" << be_idt_nl @@ -357,7 +357,7 @@ be_visitor_sequence_ci::gen_unbounded_sequence (be_sequence *node) *os << "ACE_INLINE void" << be_nl << full_class_name << "::replace (CORBA::ULong max," << be_nl << "CORBA::ULong length," << be_nl; - bt->accept(visitor); + bt->accept(visitor); *os <<" *data," << be_nl << "CORBA::Boolean release)" << be_nl << "{" << be_idt_nl @@ -365,9 +365,9 @@ be_visitor_sequence_ci::gen_unbounded_sequence (be_sequence *node) << "this->length_ = length;" << be_nl << "if (this->buffer_ && this->release_ == 1)" << be_nl << "{" << be_idt_nl; - bt->accept(visitor); - *os <<" *tmp = ACE_reinterpret_cast("; - bt->accept (visitor); + bt->accept(visitor); + *os <<" *tmp = ACE_reinterpret_cast("; + bt->accept (visitor); *os << "*,this->buffer_);" << be_nl << class_name << "::freebuf (tmp);" << be_uidt_nl << "}" << be_nl diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp index a61157f193c..c5c3cdb1cde 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp @@ -155,7 +155,7 @@ be_visitor_sequence_ch::gen_base_sequence_class (be_sequence *node) be_visitor_context (*this->ctx_), 0); - be_visitor_sequence_base_template_args visitor (ctx, + be_visitor_sequence_base_template_args visitor (ctx, node); ctx->state (TAO_CodeGen::TAO_SEQUENCE_BASE_CH); @@ -169,7 +169,7 @@ be_visitor_sequence_ch::gen_base_sequence_class (be_sequence *node) -1); } - // Find out if the sequence is of a managed type and if + // Find out if the sequence is of a managed type and if // it is bounded or not. if (node->managed_type () == be_sequence::MNG_STRING || node->managed_type () == be_sequence::MNG_WSTRING) @@ -387,7 +387,7 @@ int be_visitor_sequence_ch::visit_sequence (be_sequence *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_sequence_ch::" "visit_sequence - " - "codegen for base sequence class\n"), + "codegen for base sequence class\n"), -1); } @@ -422,7 +422,7 @@ int be_visitor_sequence_ch::visit_sequence (be_sequence *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_sequence_ch::" "visit_sequence - " - "Bad visitor\n"), + "Bad visitor\n"), -1); } @@ -449,7 +449,7 @@ int be_visitor_sequence_ch::visit_sequence (be_sequence *node) // but we must protect against certain versions of g++. if (this->ctx_->tdef () != 0) { - *os << "\n#if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8)" + *os << "\n#if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8)" << be_nl; *os << "typedef " << node->local_name () << "_var _var_type;\n" << "#endif /* ! __GNUC__ || g++ >= 2.8 */" << be_nl << be_nl; @@ -597,7 +597,7 @@ be_visitor_sequence_ch::gen_var_defn (be_sequence *node) *os << be_nl; // Assignment operator from a pointer. - *os << namebuf << " &operator= (" + *os << namebuf << " &operator= (" << node->local_name () << " *);" << be_nl; // Assignment from _var. @@ -613,7 +613,7 @@ be_visitor_sequence_ch::gen_var_defn (be_sequence *node) // Arrow operator. *os << node->local_name () << " *operator-> (void);" << be_nl; - *os << "const " << node->local_name () + *os << "const " << node->local_name () << " *operator-> (void) const;" << be_nl; *os << be_nl; @@ -678,7 +678,7 @@ be_visitor_sequence_ch::gen_var_defn (be_sequence *node) pdt = p->pt (); } - // @@ (JP) Problems with constant instantiations of TAO_Object_Manager, + // @@ (JP) Problems with constant instantiations of TAO_Object_Manager, // TAO_Pseudo_Object_Manager, TAO_SeqElem_WString_Manager and // TAO_SeqElem_String_Manager make these impossible right now [BUGID:676]. if (nt != AST_Decl::NT_string @@ -715,7 +715,7 @@ be_visitor_sequence_ch::gen_var_defn (be_sequence *node) *os << node->local_name () << " *&out (void);" << be_nl; *os << node->local_name () << " *_retn (void);" << be_nl; - // Generate an additional member function that + // Generate an additional member function that // returns the underlying pointer. *os << node->local_name () << " *ptr (void) const;" << be_uidt_nl << be_nl; @@ -736,11 +736,11 @@ be_visitor_sequence_ch::gen_out_defn (be_sequence *node) char namebuf [NAMEBUFSIZE]; be_type *bt = 0; - ACE_OS::memset (namebuf, - '\0', + ACE_OS::memset (namebuf, + '\0', NAMEBUFSIZE); - ACE_OS::sprintf (namebuf, - "%s_out", + ACE_OS::sprintf (namebuf, + "%s_out", node->local_name ()->get_string ()); // Retrieve base type. @@ -820,7 +820,7 @@ be_visitor_sequence_ch::gen_out_defn (be_sequence *node) *os << node->local_name () << " *&ptr_;" << be_nl; *os << "// Assignment from T_var not allowed." << be_nl; - *os << "void operator= (const " << node->local_name () + *os << "void operator= (const " << node->local_name () << "_var &);" << be_uidt_nl; *os << "};" << be_nl << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ci.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ci.cpp index 397f094f9c8..8b902e3326c 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ci.cpp @@ -158,7 +158,7 @@ be_visitor_sequence_ci::instantiate_sequence (be_sequence *node) } else { - predef = + predef = be_predefined_type::narrow_from_decl ( alias->primitive_base_type () ); @@ -195,20 +195,20 @@ be_visitor_sequence_ci::gen_var_impl (be_sequence *node) char fname [NAMEBUFSIZE]; char lname [NAMEBUFSIZE]; - ACE_OS::memset (fname, - '\0', + ACE_OS::memset (fname, + '\0', NAMEBUFSIZE); - ACE_OS::sprintf (fname, - "%s_var", + ACE_OS::sprintf (fname, + "%s_var", node->full_name ()); - ACE_OS::memset (lname, - '\0', + ACE_OS::memset (lname, + '\0', NAMEBUFSIZE); - ACE_OS::sprintf (lname, - "%s_var", + ACE_OS::sprintf (lname, + "%s_var", node->local_name ()->get_string ()); // Retrieve base type. @@ -240,18 +240,18 @@ be_visitor_sequence_ci::gen_var_impl (be_sequence *node) // Constuctorr from a _ptr. *os << "ACE_INLINE" << be_nl; - *os << fname << "::" << lname << " (" << node->local_name () + *os << fname << "::" << lname << " (" << node->local_name () << " *p)" << be_nl; *os << " : ptr_ (p)" << be_nl; *os << "{}" << be_nl << be_nl; // Copy constructor. *os << "ACE_INLINE" << be_nl; - *os << fname << "::" << lname << " (const ::" << fname + *os << fname << "::" << lname << " (const ::" << fname << " &p) // copy constructor" << be_nl; *os << "{" << be_idt_nl; *os << "if (p.ptr_)" << be_idt_nl; - *os << "ACE_NEW (this->ptr_, ::" << node->name () + *os << "ACE_NEW (this->ptr_, ::" << node->name () << " (*p.ptr_));" << be_uidt_nl; *os << "else" << be_nl; *os << " this->ptr_ = 0;" << be_uidt_nl; @@ -262,10 +262,10 @@ be_visitor_sequence_ci::gen_var_impl (be_sequence *node) { *os << "// fixed-size base types only" << be_nl; *os << "ACE_INLINE" << be_nl; - *os << fname << "::" << lname << " (const ::" + *os << fname << "::" << lname << " (const ::" << node->name () << " &p)" << be_nl; *os << "{" << be_idt_nl; - *os << "ACE_NEW (this->ptr_, ::" << node->name () + *os << "ACE_NEW (this->ptr_, ::" << node->name () << " (p));" << be_uidt_nl; *os << "}" << be_nl << be_nl; } @@ -279,7 +279,7 @@ be_visitor_sequence_ci::gen_var_impl (be_sequence *node) // Assignment operator from a pointer. *os << "ACE_INLINE " << fname << " &" << be_nl; - *os << fname << "::operator= (" << node->local_name () + *os << fname << "::operator= (" << node->local_name () << " *p)" << be_nl; *os << "{" << be_idt_nl; *os << "delete this->ptr_;" << be_nl; @@ -302,7 +302,7 @@ be_visitor_sequence_ci::gen_var_impl (be_sequence *node) << "else" << be_idt_nl << "{" << be_idt_nl << node->local_name () << " *deep_copy =" << be_idt_nl - << "new " << node->local_name () << " (*p.ptr_);" + << "new " << node->local_name () << " (*p.ptr_);" << be_uidt_nl << be_nl << "if (deep_copy != 0)" << be_idt_nl << "{" << be_idt_nl @@ -321,13 +321,13 @@ be_visitor_sequence_ci::gen_var_impl (be_sequence *node) { *os << "// fixed-size types only" << be_nl; *os << "ACE_INLINE ::" << fname << " &" << be_nl; - *os << fname << "::operator= (const ::" << node->name () + *os << fname << "::operator= (const ::" << node->name () << " &p)" << be_nl; *os << "{" << be_idt_nl; *os << "if (this->ptr_ != &p)" << be_nl; *os << "{" << be_idt_nl; *os << "delete this->ptr_;" << be_nl; - *os << "ACE_NEW_RETURN (this->ptr_, ::" + *os << "ACE_NEW_RETURN (this->ptr_, ::" << node->name () << " (p), *this);" << be_uidt_nl; *os << "}" << be_nl; *os << "return *this;" << be_uidt_nl; @@ -349,21 +349,21 @@ be_visitor_sequence_ci::gen_var_impl (be_sequence *node) // Other extra methods - 3 cast operator (). *os << "ACE_INLINE " << be_nl; - *os << fname << "::operator const ::" << node->name () + *os << fname << "::operator const ::" << node->name () << " &() const // cast" << be_nl; *os << "{" << be_idt_nl; *os << "return *this->ptr_;" << be_uidt_nl; *os << "}" << be_nl << be_nl; *os << "ACE_INLINE " << be_nl; - *os << fname << "::operator ::" << node->name () + *os << fname << "::operator ::" << node->name () << " &() // cast " << be_nl; *os << "{" << be_idt_nl; *os << "return *this->ptr_;" << be_uidt_nl; *os << "}" << be_nl << be_nl; *os << "ACE_INLINE " << be_nl; - *os << fname << "::operator ::" << node->name () + *os << fname << "::operator ::" << node->name () << " &() const // cast " << be_nl; *os << "{" << be_idt_nl; *os << "return *this->ptr_;" << be_uidt_nl; @@ -374,7 +374,7 @@ be_visitor_sequence_ci::gen_var_impl (be_sequence *node) { *os << "// variable-size types only" << be_nl; *os << "ACE_INLINE" << be_nl; - *os << fname << "::operator ::" << node->name () + *os << fname << "::operator ::" << node->name () << " *&() // cast " << be_nl; *os << "{" << be_idt_nl; *os << "return this->ptr_;" << be_uidt_nl; @@ -435,7 +435,7 @@ be_visitor_sequence_ci::gen_var_impl (be_sequence *node) pdt = p->pt (); } - // @@ (JP) Problems with constant instantiations of TAO_Object_Manager, + // @@ (JP) Problems with constant instantiations of TAO_Object_Manager, // TAO_Pseudo_Object_Manager, TAO_SeqElem_WString_Manager and // TAO_SeqElem_String_Manager make these impossible right now [BUGID:676]. if (nt != AST_Decl::NT_string @@ -462,7 +462,7 @@ be_visitor_sequence_ci::gen_var_impl (be_sequence *node) *os << "{" << be_idt_nl; *os << "return ACE_const_cast (const "; - + if (bt->accept (visitor) == -1) { ACE_ERROR_RETURN ((LM_ERROR, @@ -556,7 +556,7 @@ be_visitor_sequence_ci::gen_out_impl (be_sequence *node) // Constuctorr from a pointer. *os << "ACE_INLINE" << be_nl; - *os << fname << "::" << lname << " (" << node->local_name () + *os << fname << "::" << lname << " (" << node->local_name () << " *&p)" << be_nl; *os << " : ptr_ (p)" << be_nl; *os << "{" << be_idt_nl; @@ -565,7 +565,7 @@ be_visitor_sequence_ci::gen_out_impl (be_sequence *node) // Constructor from _var &. *os << "ACE_INLINE" << be_nl; - *os << fname << "::" << lname << " (" << node->local_name () + *os << fname << "::" << lname << " (" << node->local_name () << "_var &p) // constructor from _var" << be_nl; *os << " : ptr_ (p.out ())" << be_nl; *os << "{" << be_idt_nl; @@ -575,18 +575,18 @@ be_visitor_sequence_ci::gen_out_impl (be_sequence *node) // Copy constructor. *os << "ACE_INLINE" << be_nl; - *os << fname << "::" << lname << " (const ::" << fname + *os << fname << "::" << lname << " (const ::" << fname << " &p) // copy constructor" << be_nl; - *os << " : ptr_ (ACE_const_cast (" << lname + *os << " : ptr_ (ACE_const_cast (" << lname << "&, p).ptr_)" << be_nl; *os << "{}" << be_nl << be_nl; // Assignment operator from _out &. *os << "ACE_INLINE ::" << fname << " &" << be_nl; - *os << fname << "::operator= (const ::" << fname + *os << fname << "::operator= (const ::" << fname << " &p)" << be_nl; *os << "{" << be_idt_nl; - *os << "this->ptr_ = ACE_const_cast (" << lname + *os << "this->ptr_ = ACE_const_cast (" << lname << "&, p).ptr_;" << be_nl; *os << "return *this;" << be_uidt_nl; *os << "}" << be_nl << be_nl; @@ -595,7 +595,7 @@ be_visitor_sequence_ci::gen_out_impl (be_sequence *node) // Assignment operator from pointer. *os << "ACE_INLINE ::" << fname << " &" << be_nl; - *os << fname << "::operator= (" << node->local_name () + *os << fname << "::operator= (" << node->local_name () << " *p)" << be_nl; *os << "{" << be_idt_nl; *os << "this->ptr_ = p;" << be_nl; @@ -604,7 +604,7 @@ be_visitor_sequence_ci::gen_out_impl (be_sequence *node) // Other extra methods - cast operator (). *os << "ACE_INLINE " << be_nl; - *os << fname << "::operator ::" << node->name () + *os << fname << "::operator ::" << node->name () << " *&() // cast" << be_nl; *os << "{" << be_idt_nl; *os << "return this->ptr_;" << be_uidt_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_structure/structure_ch.cpp b/TAO/TAO_IDL/be/be_visitor_structure/structure_ch.cpp index fc63cb633f5..5f85d0f3954 100644 --- a/TAO/TAO_IDL/be/be_visitor_structure/structure_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_structure/structure_ch.cpp @@ -65,7 +65,7 @@ int be_visitor_structure_ch::visit_structure (be_structure *node) if (!node->is_local ()) { - *os << "static void _tao_any_destructor (void*);" + *os << "static void _tao_any_destructor (void*);" << be_nl << be_nl; } @@ -75,7 +75,7 @@ int be_visitor_structure_ch::visit_structure (be_structure *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_structure_ch::" "visit_structure - " - "codegen for scope failed\n"), + "codegen for scope failed\n"), -1); } @@ -88,11 +88,11 @@ int be_visitor_structure_ch::visit_structure (be_structure *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_structure_ch::" "visit_structure - " - "codegen for _var failed\n"), + "codegen for _var failed\n"), -1); } - // A class is generated for an out defn only for a variable + // A class is generated for an out defn only for a variable // length struct. if (node->size_type () == be_decl::VARIABLE) { @@ -101,13 +101,13 @@ int be_visitor_structure_ch::visit_structure (be_structure *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_structure_ch::" "visit_structure - " - "codegen for _out failed\n"), + "codegen for _out failed\n"), -1); } } else { - *os << "typedef " << node->local_name () << " &" + *os << "typedef " << node->local_name () << " &" << node->local_name () << "_out;" << be_nl << be_nl; } @@ -124,7 +124,7 @@ int be_visitor_structure_ch::visit_structure (be_structure *node) "(%N:%l) be_visitor_structure_ch::" "visit_structure - " "TypeCode declaration failed\n" - ), + ), -1); } } diff --git a/TAO/TAO_IDL/be/be_visitor_structure/structure_cs.cpp b/TAO/TAO_IDL/be/be_visitor_structure/structure_cs.cpp index a0911ad041f..de509e4ae97 100644 --- a/TAO/TAO_IDL/be/be_visitor_structure/structure_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_structure/structure_cs.cpp @@ -65,7 +65,7 @@ int be_visitor_structure_cs::visit_structure (be_structure *node) os->indent (); if (!node->is_local ()) *os << "void " - << node->name () + << node->name () << "::_tao_any_destructor (void *_tao_void_pointer)" << be_nl << "{" << be_idt_nl << node->local_name () << " *tmp = ACE_static_cast (" diff --git a/TAO/TAO_IDL/be/be_visitor_typecode/typecode_decl.cpp b/TAO/TAO_IDL/be/be_visitor_typecode/typecode_decl.cpp index ba084af03c9..c0b1a64306a 100644 --- a/TAO/TAO_IDL/be/be_visitor_typecode/typecode_decl.cpp +++ b/TAO/TAO_IDL/be/be_visitor_typecode/typecode_decl.cpp @@ -61,15 +61,15 @@ be_visitor_typecode_decl::visit_type (be_type *node) } *os << "CORBA::TypeCode_ptr " - << node->tc_name ()->last_component () + << node->tc_name ()->last_component () << ";" << be_nl << be_nl; } else { // We are in the ROOT scope. - *os << "extern " << be_global->stub_export_macro () + *os << "extern " << be_global->stub_export_macro () << " CORBA::TypeCode_ptr " - << " " << node->tc_name ()->last_component () + << " " << node->tc_name ()->last_component () << ";" << be_nl << be_nl; } diff --git a/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp b/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp index d1832e8f5b2..1a166f2ee6b 100644 --- a/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp +++ b/TAO/TAO_IDL/be/be_visitor_typecode/typecode_defn.cpp @@ -71,14 +71,14 @@ be_visitor_typecode_defn::visit_members (AST_Structure *node) this->elem_number_++; - // Do any pre processing using the next item info. + // Do any pre processing using the next item info. if (this->pre_process (bd) == -1) { ACE_ERROR_RETURN (( LM_ERROR, "(%N:%l) be_visitor_typecode_defn::visit_members - " "pre processing failed\n" - ), + ), -1 ); } @@ -90,7 +90,7 @@ be_visitor_typecode_defn::visit_members (AST_Structure *node) LM_ERROR, "(%N:%l) be_visitor_typecode_defn::visit_members - " "codegen for scope failed\n" - ), + ), -1 ); @@ -103,7 +103,7 @@ be_visitor_typecode_defn::visit_members (AST_Structure *node) LM_ERROR, "(%N:%l) be_visitor_typecode_defn::visit_members - " "post processing failed\n" - ), + ), -1 ); } @@ -179,16 +179,16 @@ be_visitor_typecode_defn::visit_type (be_type *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_typecode_defn::" "visit_type - " - "queue insert failed\n"), + "queue insert failed\n"), -1); } } - + os->indent (); // start from current indentation level // Generate the typecode information here *os << "static const CORBA::Long _oc_"; - + // Flat name generation. *os << node->flat_name (); @@ -198,18 +198,18 @@ be_visitor_typecode_defn::visit_type (be_type *node) // Add the sizeof the enum tk_* and the encap length that we do not put into // this array but which will exist in the CDR buffer. - this->tc_offset_ = 4 + 4; - + this->tc_offset_ = 4 + 4; + // Note that we just need the parameters here and hence we generate the // encapsulation for the parameters. this->ctx_->sub_state (TAO_CodeGen::TAO_TC_DEFN_ENCAPSULATION); - + if (node->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_typecode_defn::" "visit_type - " - "codegen for typecode encapsulation failed\n"), + "codegen for typecode encapsulation failed\n"), -1); } *os << be_uidt << "};" << be_nl << be_nl; @@ -219,9 +219,9 @@ be_visitor_typecode_defn::visit_type (be_type *node) // Flat name generation. *os << node->flat_name (); - + *os << " (" << be_idt << be_idt_nl; - + switch (node->node_type ()) { case AST_Decl::NT_array: @@ -254,22 +254,22 @@ be_visitor_typecode_defn::visit_type (be_type *node) *os << "," << be_nl << "sizeof (_oc_"; - + // Flat name generation. *os << node->flat_name (); - + *os << ")," << be_nl << "(char *) &_oc_"; // Flat name generation. *os << node->flat_name (); - + // Name generation. *os << "," << be_nl << "0," << be_nl << "sizeof (" << node->name () << ")" << be_uidt_nl << ");" << be_uidt_nl << be_nl; - + // Is our enclosing scope a module? We need this check because for // platforms that support namespaces, the typecode must be declared // extern. @@ -286,17 +286,17 @@ be_visitor_typecode_defn::visit_type (be_type *node) -1); } *os << "TAO_NAMESPACE_DEFINE (CORBA::TypeCode_ptr, _tc_"; - + // Local name generation. *os << node->local_name (); - + *os << ", &_tc_TAO_tc_"; // Flat name generation. *os << node->flat_name (); *os << ")" << be_nl; - + if (this->gen_nested_namespace_end (module) == -1) { ACE_ERROR_RETURN ((LM_ERROR, @@ -314,13 +314,13 @@ be_visitor_typecode_defn::visit_type (be_type *node) // Tc name generation. *os << node->tc_name (); - + *os << " =" << be_idt_nl << "&_tc_TAO_tc_"; // Flat name generation. *os << node->flat_name (); - + *os << ";" << be_uidt_nl << "\n"; } @@ -572,7 +572,7 @@ be_visitor_typecode_defn::visit_string (be_string *node) { case TAO_CodeGen::TAO_TC_DEFN_TYPECODE: // top level typecode for string is not permitted. It has to be a - // typedefed string + // typedefed string break; case TAO_CodeGen::TAO_TC_DEFN_TYPECODE_NESTED: return this->gen_typecode (node); @@ -741,7 +741,7 @@ be_visitor_typecode_defn::gen_typecode (be_array *node) ACE_TEXT ("Failed to get encap length\n")), -1); } - *os << this->computed_encap_len_ << ", // encapsulation length" + *os << this->computed_encap_len_ << ", // encapsulation length" << be_idt << "\n"; // size of the encap length this->tc_offset_ += sizeof (ACE_CDR::ULong); @@ -811,7 +811,7 @@ be_visitor_typecode_defn::gen_encapsulation (be_array *node) // size of the encap length this->tc_offset_ += sizeof (ACE_CDR::ULong); } - + // now generate the typecode of the base type *os << "TAO_ENCAP_BYTE_ORDER, // byte order\n"; // size of the encapsulation byte order flag. Although it is 1 byte, the @@ -848,7 +848,7 @@ be_visitor_typecode_defn::gen_typecode (be_enum *node) os->indent (); // start from whatever indentation level we were at // check if we are repeated - const be_visitor_typecode_defn::QNode *qnode = + const be_visitor_typecode_defn::QNode *qnode = this->queue_lookup (this->tc_queue_, node); if (qnode) { @@ -857,8 +857,8 @@ be_visitor_typecode_defn::gen_typecode (be_enum *node) this->tc_offset_ += sizeof (ACE_CDR::ULong); // the offset must point to the tc_kind value of the first occurrence of // this type - os->print ("0x%x, // negative offset (%ld)\n", - (qnode->offset - this->tc_offset_), + os->print ("0x%x, // negative offset (%ld)\n", + (qnode->offset - this->tc_offset_), (qnode->offset - this->tc_offset_)); this->tc_offset_ += sizeof (ACE_CDR::ULong); } @@ -871,7 +871,7 @@ be_visitor_typecode_defn::gen_typecode (be_enum *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_typecode_defn::" "visit_type - " - "queue insert failed\n"), + "queue insert failed\n"), -1); } } @@ -895,10 +895,10 @@ be_visitor_typecode_defn::gen_typecode (be_enum *node) -1); } // reset the compute queue since we must not affect computation of other - // nodes + // nodes this->queue_reset (this->compute_queue_); - *os << this->computed_encap_len_ << ", // encapsulation length" + *os << this->computed_encap_len_ << ", // encapsulation length" << be_idt << "\n"; // size of the encap length this->tc_offset_ += sizeof (ACE_CDR::ULong); @@ -949,7 +949,7 @@ be_visitor_typecode_defn::gen_encapsulation (be_enum *node) this->ctx_->sub_state (TAO_CodeGen::TAO_TC_DEFN_SCOPE); if (node->accept (this) == -1) { - ACE_ERROR_RETURN ((LM_ERROR, + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") ACE_TEXT ("::gen_encapsulation (enum) - ") ACE_TEXT ("cannot generate typecode for members\n")), @@ -980,7 +980,7 @@ be_visitor_typecode_defn::gen_typecode (be_exception *node) os->indent (); // start from whatever indentation level we were at // check if we are repeated - const be_visitor_typecode_defn::QNode *qnode = + const be_visitor_typecode_defn::QNode *qnode = this->queue_lookup (this->tc_queue_, node); if (qnode) { @@ -989,8 +989,8 @@ be_visitor_typecode_defn::gen_typecode (be_exception *node) this->tc_offset_ += sizeof (ACE_CDR::ULong); // the offset must point to the tc_kind value of the first occurrence of // this type - os->print ("0x%x, // negative offset (%ld)\n", - (qnode->offset - this->tc_offset_), + os->print ("0x%x, // negative offset (%ld)\n", + (qnode->offset - this->tc_offset_), (qnode->offset - this->tc_offset_)); this->tc_offset_ += sizeof (ACE_CDR::ULong); } @@ -1004,7 +1004,7 @@ be_visitor_typecode_defn::gen_typecode (be_exception *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_typecode_defn::" "visit_type - " - "queue insert failed\n"), + "queue insert failed\n"), -1); } } @@ -1028,10 +1028,10 @@ be_visitor_typecode_defn::gen_typecode (be_exception *node) -1); } // reset the compute queue since we must not affect computation of other - // nodes + // nodes this->queue_reset (this->compute_queue_); - *os << this->computed_encap_len_ << ", // encapsulation length" + *os << this->computed_encap_len_ << ", // encapsulation length" << be_idt << "\n"; // size of the encap length this->tc_offset_ += sizeof (ACE_CDR::ULong); @@ -1057,7 +1057,7 @@ int be_visitor_typecode_defn::gen_encapsulation (be_exception *node) { TAO_OutStream *os = this->ctx_->stream (); // output stream - + os->indent (); // start from whatever indentation level we were at *os << "TAO_ENCAP_BYTE_ORDER, // byte order" << be_nl; @@ -1074,7 +1074,7 @@ be_visitor_typecode_defn::gen_encapsulation (be_exception *node) // generate the member count os->indent (); - *os << node->nfields () << ", // member count\n"; + *os << node->nfields () << ", // member count\n"; // size of the member count this->tc_offset_ += sizeof (ACE_CDR::ULong); @@ -1088,7 +1088,7 @@ be_visitor_typecode_defn::gen_encapsulation (be_exception *node) if (node->accept (this) == -1) { - ACE_ERROR_RETURN ((LM_ERROR, + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") ACE_TEXT ("::gen_encapsulation (exception) - ") ACE_TEXT ("cannot generate typecode for members\n")), @@ -1122,7 +1122,7 @@ be_visitor_typecode_defn::gen_encapsulation (be_field *node) } // revert the state to what it was before because we may be dealing with // subsequent fields for which we have to be in the "gen scope" - // substate + // substate this->ctx_->sub_state (TAO_CodeGen::TAO_TC_DEFN_SCOPE); return 0; } @@ -1135,7 +1135,7 @@ be_visitor_typecode_defn::gen_typecode (be_interface *node) os->indent (); // start from whatever indentation level we were at // check if we are repeated - const be_visitor_typecode_defn::QNode *qnode = + const be_visitor_typecode_defn::QNode *qnode = this->queue_lookup (this->tc_queue_, node); if (qnode) { @@ -1144,8 +1144,8 @@ be_visitor_typecode_defn::gen_typecode (be_interface *node) this->tc_offset_ += sizeof (ACE_CDR::ULong); // the offset must point to the tc_kind value of the first occurrence of // this type - os->print ("0x%x, // negative offset (%ld)\n", - (qnode->offset - this->tc_offset_), + os->print ("0x%x, // negative offset (%ld)\n", + (qnode->offset - this->tc_offset_), (qnode->offset - this->tc_offset_)); this->tc_offset_ += sizeof (ACE_CDR::ULong); } @@ -1159,7 +1159,7 @@ be_visitor_typecode_defn::gen_typecode (be_interface *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_typecode_defn::" "visit_type - " - "queue insert failed\n"), + "queue insert failed\n"), -1); } } @@ -1183,10 +1183,10 @@ be_visitor_typecode_defn::gen_typecode (be_interface *node) -1); } // reset the compute queue since we must not affect computation of other - // nodes + // nodes this->queue_reset (this->compute_queue_); - *os << this->computed_encap_len_ << ", // encapsulation length" + *os << this->computed_encap_len_ << ", // encapsulation length" << be_idt << "\n"; // size of the encap length this->tc_offset_ += sizeof (ACE_CDR::ULong); @@ -1306,7 +1306,7 @@ be_visitor_typecode_defn::gen_typecode (be_predefined_type *node) if (!ACE_OS::strcmp (node->local_name ()->get_string (), "Object")) { // check if we are repeated - const be_visitor_typecode_defn::QNode *qnode = + const be_visitor_typecode_defn::QNode *qnode = this->queue_lookup (this->tc_queue_, node); if (qnode) { @@ -1315,8 +1315,8 @@ be_visitor_typecode_defn::gen_typecode (be_predefined_type *node) this->tc_offset_ += sizeof (ACE_CDR::ULong); // the offset must point to the tc_kind value of the first occurrence of // this type - os->print ("0x%x, // negative offset (%ld)\n", - (qnode->offset - this->tc_offset_), + os->print ("0x%x, // negative offset (%ld)\n", + (qnode->offset - this->tc_offset_), (qnode->offset - this->tc_offset_)); this->tc_offset_ += sizeof (ACE_CDR::ULong); } @@ -1330,13 +1330,13 @@ be_visitor_typecode_defn::gen_typecode (be_predefined_type *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_typecode_defn::" "visit_type - " - "queue insert failed\n"), + "queue insert failed\n"), -1); } } - + *os << "CORBA::tk_objref," << be_nl; - + // reset the compute queue to set the stage for computing our // encapsulation length this->queue_reset (this->compute_queue_); @@ -1352,14 +1352,14 @@ be_visitor_typecode_defn::gen_typecode (be_predefined_type *node) -1); } // reset the compute queue since we must not affect - // computation of other nodes + // computation of other nodes this->queue_reset (this->compute_queue_); - *os << this->computed_encap_len_ + *os << this->computed_encap_len_ << ", // encapsulation length" << be_idt << "\n"; // size of the encap length this->tc_offset_ += sizeof (ACE_CDR::ULong); - + // now emit the encapsulation this->ctx_->sub_state (TAO_CodeGen::TAO_TC_DEFN_ENCAPSULATION); if (node->accept (this) == -1) @@ -1432,10 +1432,10 @@ be_visitor_typecode_defn::gen_typecode (be_sequence *node) -1); } // reset the compute queue since we must not affect computation of other - // nodes + // nodes this->queue_reset (this->compute_queue_); - *os << this->computed_encap_len_ << ", // encapsulation length" + *os << this->computed_encap_len_ << ", // encapsulation length" << be_idt << "\n"; // size of the encap length this->tc_offset_ += sizeof (ACE_CDR::ULong); @@ -1530,9 +1530,9 @@ be_visitor_typecode_defn::gen_typecode (be_structure *node) TAO_OutStream *os = this->ctx_->stream (); // output stream os->indent (); // start from whatever indentation level we were at - + // check if we are repeated - const be_visitor_typecode_defn::QNode *qnode = + const be_visitor_typecode_defn::QNode *qnode = this->queue_lookup (this->tc_queue_, node); if (qnode) { @@ -1541,8 +1541,8 @@ be_visitor_typecode_defn::gen_typecode (be_structure *node) this->tc_offset_ += sizeof (ACE_CDR::ULong); // the offset must point to the tc_kind value of the first occurrence of // this type - os->print ("0x%x, // negative offset (%ld)\n", - (qnode->offset - this->tc_offset_), + os->print ("0x%x, // negative offset (%ld)\n", + (qnode->offset - this->tc_offset_), (qnode->offset - this->tc_offset_)); this->tc_offset_ += sizeof (ACE_CDR::ULong); } @@ -1556,7 +1556,7 @@ be_visitor_typecode_defn::gen_typecode (be_structure *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_typecode_defn::" "visit_type - " - "queue insert failed\n"), + "queue insert failed\n"), -1); } } @@ -1580,10 +1580,10 @@ be_visitor_typecode_defn::gen_typecode (be_structure *node) -1); } // reset the compute queue since we must not affect computation of other - // nodes + // nodes this->queue_reset (this->compute_queue_); - *os << this->computed_encap_len_ << ", // encapsulation length" + *os << this->computed_encap_len_ << ", // encapsulation length" << be_idt << "\n"; // size of the encap length this->tc_offset_ += sizeof (ACE_CDR::ULong); @@ -1648,7 +1648,7 @@ be_visitor_typecode_defn::gen_typecode (be_typedef *node) os->indent (); // start from whatever indentation level we were at // check if we are repeated - const be_visitor_typecode_defn::QNode *qnode = + const be_visitor_typecode_defn::QNode *qnode = this->queue_lookup (this->tc_queue_, node); if (qnode) { @@ -1657,8 +1657,8 @@ be_visitor_typecode_defn::gen_typecode (be_typedef *node) this->tc_offset_ += sizeof (ACE_CDR::ULong); // the offset must point to the tc_kind value of the first occurrence of // this type - os->print ("0x%x, // negative offset (%ld)\n", - (qnode->offset - this->tc_offset_), + os->print ("0x%x, // negative offset (%ld)\n", + (qnode->offset - this->tc_offset_), (qnode->offset - this->tc_offset_)); this->tc_offset_ += sizeof (ACE_CDR::ULong); } @@ -1672,7 +1672,7 @@ be_visitor_typecode_defn::gen_typecode (be_typedef *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_typecode_defn::" "visit_type - " - "queue insert failed\n"), + "queue insert failed\n"), -1); } } @@ -1696,10 +1696,10 @@ be_visitor_typecode_defn::gen_typecode (be_typedef *node) -1); } // reset the compute queue since we must not affect computation of other - // nodes + // nodes this->queue_reset (this->compute_queue_); - *os << this->computed_encap_len_ << ", // encapsulation length" + *os << this->computed_encap_len_ << ", // encapsulation length" << be_idt << "\n"; // size of the encap length this->tc_offset_ += sizeof (ACE_CDR::ULong); @@ -1762,7 +1762,7 @@ be_visitor_typecode_defn::gen_typecode (be_union *node) os->indent (); // start from whatever indentation level we were at // check if we are repeated - const be_visitor_typecode_defn::QNode *qnode = + const be_visitor_typecode_defn::QNode *qnode = this->queue_lookup (this->tc_queue_, node); if (qnode) { @@ -1771,8 +1771,8 @@ be_visitor_typecode_defn::gen_typecode (be_union *node) this->tc_offset_ += sizeof (ACE_CDR::ULong); // the offset must point to the tc_kind value of the first occurrence of // this type - os->print ("0x%x, // negative offset (%ld)\n", - (qnode->offset - this->tc_offset_), + os->print ("0x%x, // negative offset (%ld)\n", + (qnode->offset - this->tc_offset_), (qnode->offset - this->tc_offset_)); this->tc_offset_ += sizeof (ACE_CDR::ULong); } @@ -1786,7 +1786,7 @@ be_visitor_typecode_defn::gen_typecode (be_union *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_typecode_defn::" "visit_type - " - "queue insert failed\n"), + "queue insert failed\n"), -1); } } @@ -1810,10 +1810,10 @@ be_visitor_typecode_defn::gen_typecode (be_union *node) -1); } // reset the compute queue since we must not affect computation of other - // nodes + // nodes this->queue_reset (this->compute_queue_); - *os << this->computed_encap_len_ << ", // encapsulation length" + *os << this->computed_encap_len_ << ", // encapsulation length" << be_idt << "\n"; // size of the encap length this->tc_offset_ += sizeof (ACE_CDR::ULong); @@ -1902,10 +1902,10 @@ be_visitor_typecode_defn::gen_encapsulation (be_union_branch *node) ACE_OS::memset (buf, 0, sizeof (buf)); os->indent (); - + // Emit the case label value. We use only the first value in the // label list even if there are multiple case labels for this node. - // The TypeCode class does not have any way of dealing with + // The TypeCode class does not have any way of dealing with // any count but member count. We make sure in the generation of // the union's _discriminant(0 function (called by (de)marshaling // code) that the same value is returned that is generated here. @@ -1913,17 +1913,17 @@ be_visitor_typecode_defn::gen_encapsulation (be_union_branch *node) { AST_Expression *expression = node->label (0)->label_val (); AST_Expression::AST_ExprValue *ev = expression->ev (); - switch (ub->udisc_type ()) + switch (ub->udisc_type ()) { case AST_Expression::EV_char: - os->print ("ACE_IDL_NCTOHL (0x%02.2x)", + os->print ("ACE_IDL_NCTOHL (0x%02.2x)", (unsigned char)ev->u.cval); // size of char aligned to 4 bytes this->tc_offset_ += sizeof (ACE_CDR::ULong); break; case AST_Expression::EV_bool: - os->print ("ACE_IDL_NCTOHL (0x%02.2x)", + os->print ("ACE_IDL_NCTOHL (0x%02.2x)", (unsigned char)ev->u.bval); // size of bool aligned to 4 bytes this->tc_offset_ += sizeof (ACE_CDR::ULong); @@ -1931,14 +1931,14 @@ be_visitor_typecode_defn::gen_encapsulation (be_union_branch *node) case AST_Expression::EV_wchar: case AST_Expression::EV_short: - os->print ("ACE_IDL_NSTOHL (0x%04.4x)", + os->print ("ACE_IDL_NSTOHL (0x%04.4x)", (unsigned short)ev->u.sval); // size of short/wchar aligned to 4 bytes this->tc_offset_ += sizeof (ACE_CDR::ULong); break; case AST_Expression::EV_ushort: - os->print ("ACE_IDL_NSTOHL (0x%04.4x)", + os->print ("ACE_IDL_NSTOHL (0x%04.4x)", (unsigned short)ev->u.usval); // size of unsigned short aligned to 4 bytes this->tc_offset_ += sizeof (ACE_CDR::ULong); @@ -1993,35 +1993,35 @@ be_visitor_typecode_defn::gen_encapsulation (be_union_branch *node) switch (ub->udisc_type ()) { case AST_Expression::EV_char: - os->print ("ACE_IDL_NCTOHL (0x%02.2x)", + os->print ("ACE_IDL_NCTOHL (0x%02.2x)", (unsigned char)dv.u.char_val); // size of bool/char aligned to 4 bytes this->tc_offset_ += sizeof (ACE_CDR::ULong); break; case AST_Expression::EV_bool: - os->print ("ACE_IDL_NCTOHL (0x%02.2x)", + os->print ("ACE_IDL_NCTOHL (0x%02.2x)", (unsigned char)dv.u.bool_val); // size of bool/char aligned to 4 bytes this->tc_offset_ += sizeof (ACE_CDR::ULong); break; case AST_Expression::EV_wchar: - os->print ("ACE_IDL_NSTOHL (0x%04.4x)", + os->print ("ACE_IDL_NSTOHL (0x%04.4x)", (unsigned short)dv.u.wchar_val); // size of short/wchar aligned to 4 bytes this->tc_offset_ += sizeof (ACE_CDR::ULong); break; case AST_Expression::EV_short: - os->print ("ACE_IDL_NSTOHL (0x%04.4x)", + os->print ("ACE_IDL_NSTOHL (0x%04.4x)", (unsigned short)dv.u.short_val); // size of short/wchar aligned to 4 bytes this->tc_offset_ += sizeof (ACE_CDR::ULong); break; case AST_Expression::EV_ushort: - os->print ("ACE_IDL_NSTOHL (0x%04.4x)", + os->print ("ACE_IDL_NSTOHL (0x%04.4x)", (unsigned short)dv.u.ushort_val); // size of short/wchar aligned to 4 bytes this->tc_offset_ += sizeof (ACE_CDR::ULong); @@ -2053,13 +2053,13 @@ be_visitor_typecode_defn::gen_encapsulation (be_union_branch *node) default: ACE_ERROR_RETURN ((LM_DEBUG, "be_union_branch: (%N:%l) Label value " - "type (%d) is invalid\n", - ub->udisc_type ()), + "type (%d) is invalid\n", + ub->udisc_type ()), -1); ACE_NOTREACHED (break;) } - *os << ", // union default label (evaluated value)" << be_nl; + *os << ", // union default label (evaluated value)" << be_nl; } // emit name @@ -2087,7 +2087,7 @@ be_visitor_typecode_defn::gen_encapsulation (be_union_branch *node) // = methods for computing typecode and encapsulation sizes -ACE_CDR::Long +ACE_CDR::Long be_visitor_typecode_defn::compute_tc_size (be_array *node) { // 4 bytes for enumeration, 4 bytes for storing encap length val, followed by the @@ -2096,19 +2096,19 @@ be_visitor_typecode_defn::compute_tc_size (be_array *node) this->ctx_->sub_state (TAO_CodeGen::TAO_TC_DEFN_ENCAP_LEN); if (node->accept (this) == -1) { - ACE_ERROR_RETURN ((LM_ERROR, + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") ACE_TEXT ("::compute_tc_size (array) - ") ACE_TEXT ("cannot compute encap len\n")), -1); } - + this->computed_tc_size_ = 4 + 4 + this->computed_encap_len_; return this->computed_tc_size_; } -ACE_CDR::Long +ACE_CDR::Long be_visitor_typecode_defn::compute_encap_length (be_array *node) { // Suppose "N" is the number of dimensions, then for a N dimensional array, @@ -2123,26 +2123,26 @@ be_visitor_typecode_defn::compute_encap_length (be_array *node) ACE_CDR::Long encap_len = // N byte order flags and dimensions - node->n_dims () * (4 + 4) + node->n_dims () * (4 + 4) + // N-1 of tk_array and that many encapsulation lengths - (node->n_dims () - 1) * (4 + 4); - + (node->n_dims () - 1) * (4 + 4); + this->ctx_->sub_state (TAO_CodeGen::TAO_TC_DEFN_TC_SIZE); if (!bt || bt->accept (this) == -1) { - ACE_ERROR_RETURN ((LM_ERROR, + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") ACE_TEXT ("::compute_encap_len (array) - ") ACE_TEXT ("cannot compute tc size for base\n")), -1); } - + this->computed_encap_len_ = encap_len + this->computed_tc_size_; return this->computed_encap_len_; } -ACE_CDR::Long +ACE_CDR::Long be_visitor_typecode_defn::compute_tc_size (be_enum *node) { // while computing the encapsulation length we must keep in mind the typecode @@ -2158,7 +2158,7 @@ be_visitor_typecode_defn::compute_tc_size (be_enum *node) { this->computed_tc_size_ = 4 + 4; } - else + else { if (be_global->opt_tc () || node->in_recursion ()) @@ -2168,7 +2168,7 @@ be_visitor_typecode_defn::compute_tc_size (be_enum *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_typecode_defn::" "compute_tc_size (enum) - " - "queue insert failed\n"), + "queue insert failed\n"), -1); } } @@ -2179,19 +2179,19 @@ be_visitor_typecode_defn::compute_tc_size (be_enum *node) this->ctx_->sub_state (TAO_CodeGen::TAO_TC_DEFN_ENCAP_LEN); if (node->accept (this) == -1) { - ACE_ERROR_RETURN ((LM_ERROR, + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") ACE_TEXT ("::compute_tc_size (enum) - ") ACE_TEXT ("cannot compute encap len\n")), -1); } - + this->computed_tc_size_ = 4 + 4 + this->computed_encap_len_; } return this->computed_tc_size_; } -ACE_CDR::Long +ACE_CDR::Long be_visitor_typecode_defn::compute_encap_length (be_enum *node) { ACE_CDR::Long encap_len; @@ -2221,13 +2221,13 @@ be_visitor_typecode_defn::compute_encap_length (be_enum *node) this->ctx_->sub_state (TAO_CodeGen::TAO_TC_DEFN_SCOPE_LEN); if (node->accept (this) == -1) { - ACE_ERROR_RETURN ((LM_ERROR, + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") ACE_TEXT ("::compute_encap_len (enum) - ") ACE_TEXT ("cannot compute scope tc size\n")), -1); } - + this->computed_encap_len_ = encap_len + this->computed_scope_encap_len_; // pop off the previous value of computed_scope_len_ @@ -2244,7 +2244,7 @@ be_visitor_typecode_defn::compute_encap_length (be_enum *node) } -ACE_CDR::Long +ACE_CDR::Long be_visitor_typecode_defn::compute_encap_length (be_enum_val *node) { this->computed_encap_len_ = this->name_encap_len (node); @@ -2252,7 +2252,7 @@ be_visitor_typecode_defn::compute_encap_length (be_enum_val *node) } -ACE_CDR::Long +ACE_CDR::Long be_visitor_typecode_defn::compute_tc_size (be_exception *node) { // while computing the encapsulation length we must keep in mind the typecode @@ -2278,7 +2278,7 @@ be_visitor_typecode_defn::compute_tc_size (be_exception *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_typecode_defn::" "compute_tc_size (exception) - " - "queue insert failed\n"), + "queue insert failed\n"), -1); } } @@ -2286,7 +2286,7 @@ be_visitor_typecode_defn::compute_tc_size (be_exception *node) this->ctx_->sub_state (TAO_CodeGen::TAO_TC_DEFN_ENCAP_LEN); if (node->accept (this) == -1) { - ACE_ERROR_RETURN ((LM_ERROR, + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") ACE_TEXT ("::compute_tc_size (array) - ") ACE_TEXT ("cannot compute encap len\n")), @@ -2297,7 +2297,7 @@ be_visitor_typecode_defn::compute_tc_size (be_exception *node) return this->computed_tc_size_; } -ACE_CDR::Long +ACE_CDR::Long be_visitor_typecode_defn::compute_encap_length (be_exception *node) { ACE_CDR::Long encap_len; @@ -2326,7 +2326,7 @@ be_visitor_typecode_defn::compute_encap_length (be_exception *node) this->ctx_->sub_state (TAO_CodeGen::TAO_TC_DEFN_SCOPE_LEN); if (node->accept (this) == -1) { - ACE_ERROR_RETURN ((LM_ERROR, + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") ACE_TEXT ("::compute_encap_len (exception) - ") ACE_TEXT ("cannot compute scope tc size\n")), @@ -2348,30 +2348,30 @@ be_visitor_typecode_defn::compute_encap_length (be_exception *node) return this->computed_encap_len_; } -ACE_CDR::Long +ACE_CDR::Long be_visitor_typecode_defn::compute_encap_length (be_field *node) { be_type *bt; - + // struct member is represented as the "name" followed by the typecode - + ACE_CDR::Long encap_len = this->name_encap_len (node); // for name - + // add to this, the size of our typecode bt = be_type::narrow_from_decl (node->field_type ()); this->ctx_->sub_state (TAO_CodeGen::TAO_TC_DEFN_TC_SIZE); if (!bt || bt->accept (this) == -1) { - ACE_ERROR_RETURN ((LM_ERROR, + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") ACE_TEXT ("::compute_encap_len (array) - ") ACE_TEXT ("cannot compute tc size\n")), -1); } - + // note that we must add typecode size of base type - this->computed_encap_len_ = encap_len + this->computed_tc_size_; + this->computed_encap_len_ = encap_len + this->computed_tc_size_; // revert the sub state this->ctx_->sub_state (TAO_CodeGen::TAO_TC_DEFN_SCOPE_LEN); @@ -2379,7 +2379,7 @@ be_visitor_typecode_defn::compute_encap_length (be_field *node) return this->computed_encap_len_; } -ACE_CDR::Long +ACE_CDR::Long be_visitor_typecode_defn::compute_tc_size (be_interface *node) { // while computing the encapsulation length we must keep in mind the typecode @@ -2395,7 +2395,7 @@ be_visitor_typecode_defn::compute_tc_size (be_interface *node) { this->computed_tc_size_ = 4 + 4; } - else + else { if (be_global->opt_tc () || node->in_recursion ()) @@ -2405,7 +2405,7 @@ be_visitor_typecode_defn::compute_tc_size (be_interface *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_typecode_defn::" "compute_tc_size (interface) - " - "queue insert failed\n"), + "queue insert failed\n"), -1); } } @@ -2413,51 +2413,51 @@ be_visitor_typecode_defn::compute_tc_size (be_interface *node) this->ctx_->sub_state (TAO_CodeGen::TAO_TC_DEFN_ENCAP_LEN); if (node->accept (this) == -1) { - ACE_ERROR_RETURN ((LM_ERROR, + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") ACE_TEXT ("::compute_tc_size (interface) - ") ACE_TEXT ("cannot compute encap len\n")), -1); } - + this->computed_tc_size_ = 4 + 4 + this->computed_encap_len_; } return this->computed_tc_size_; } -ACE_CDR::Long +ACE_CDR::Long be_visitor_typecode_defn::compute_encap_length (be_interface *node) { this->computed_encap_len_ = 4; // holds the byte order flag - - this->computed_encap_len_ += + + this->computed_encap_len_ += this->repoID_encap_len (node); // for repoID - + // do the same thing for the local name - this->computed_encap_len_ += + this->computed_encap_len_ += this->name_encap_len (node); return this->computed_encap_len_; } -ACE_CDR::Long +ACE_CDR::Long be_visitor_typecode_defn::compute_tc_size (be_interface_fwd *) { return 0; } -ACE_CDR::Long +ACE_CDR::Long be_visitor_typecode_defn::compute_encap_length (be_interface_fwd *) { return 0; } -ACE_CDR::Long +ACE_CDR::Long be_visitor_typecode_defn::compute_tc_size (be_predefined_type *node) { - if (!ACE_OS::strcmp (node->local_name ()->get_string (), + if (!ACE_OS::strcmp (node->local_name ()->get_string (), "Object")) // not same { // while computing the encapsulation length we must keep in mind the typecode @@ -2473,9 +2473,9 @@ be_visitor_typecode_defn::compute_tc_size (be_predefined_type *node) { this->computed_tc_size_ = 4 + 4; } - else + else { - + if (be_global->opt_tc () || node->in_recursion ()) { @@ -2484,21 +2484,21 @@ be_visitor_typecode_defn::compute_tc_size (be_predefined_type *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_typecode_defn::" "compute_tc_size (predefined type) - " - "queue insert failed\n"), + "queue insert failed\n"), -1); } } - + this->ctx_->sub_state (TAO_CodeGen::TAO_TC_DEFN_ENCAP_LEN); if (node->accept (this) == -1) { - ACE_ERROR_RETURN ((LM_ERROR, + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") ACE_TEXT ("::compute_tc_size (predefined objref) - ") ACE_TEXT ("cannot compute encap len\n")), -1); } - + this->computed_tc_size_ = 4 + 4 + this->computed_encap_len_; } } @@ -2509,50 +2509,50 @@ be_visitor_typecode_defn::compute_tc_size (be_predefined_type *node) } -ACE_CDR::Long +ACE_CDR::Long be_visitor_typecode_defn::compute_encap_length (be_predefined_type *node) { - if (!ACE_OS::strcmp (node->local_name ()->get_string (), + if (!ACE_OS::strcmp (node->local_name ()->get_string (), "Object")) // not same { this->computed_encap_len_ = 4; // holds the byte order flag - this->computed_encap_len_ += + this->computed_encap_len_ += this->repoID_encap_len (node); // for repoID // do the same thing for the local name - this->computed_encap_len_ += + this->computed_encap_len_ += this->name_encap_len (node); } else this->computed_encap_len_ = 0; - + return this->computed_encap_len_; } -ACE_CDR::Long +ACE_CDR::Long be_visitor_typecode_defn::compute_tc_size (be_sequence *node) { this->ctx_->sub_state (TAO_CodeGen::TAO_TC_DEFN_ENCAP_LEN); if (node->accept (this) == -1) { - ACE_ERROR_RETURN ((LM_ERROR, + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") ACE_TEXT ("::compute_tc_size (sequence) - ") ACE_TEXT ("cannot compute encap len\n")), -1); } - + this->computed_tc_size_ = 4 + 4 + this->computed_encap_len_; return this->computed_tc_size_; } -ACE_CDR::Long +ACE_CDR::Long be_visitor_typecode_defn::compute_encap_length (be_sequence *node) { be_type *bt; // base type - + ACE_CDR::Long encap_len = 4; // holds the byte order flag // add the encapsulation length of our base type @@ -2560,13 +2560,13 @@ be_visitor_typecode_defn::compute_encap_length (be_sequence *node) this->ctx_->sub_state (TAO_CodeGen::TAO_TC_DEFN_TC_SIZE); if (!bt || bt->accept (this) == -1) { - ACE_ERROR_RETURN ((LM_ERROR, + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") ACE_TEXT ("::compute_encap_len (sequence) - ") ACE_TEXT ("cannot compute tc size\n")), -1); } - + this->computed_encap_len_ = encap_len + this->computed_tc_size_; this->computed_encap_len_ += 4; // to hold the max size @@ -2574,7 +2574,7 @@ be_visitor_typecode_defn::compute_encap_length (be_sequence *node) } -ACE_CDR::Long +ACE_CDR::Long be_visitor_typecode_defn::compute_tc_size (be_string *) { this->computed_tc_size_ = 4 + 4; @@ -2582,7 +2582,7 @@ be_visitor_typecode_defn::compute_tc_size (be_string *) } -ACE_CDR::Long +ACE_CDR::Long be_visitor_typecode_defn::compute_encap_length (be_string *) { this->computed_encap_len_ = 0; @@ -2590,7 +2590,7 @@ be_visitor_typecode_defn::compute_encap_length (be_string *) } -ACE_CDR::Long +ACE_CDR::Long be_visitor_typecode_defn::compute_tc_size (be_structure *node) { // while computing the encapsulation length we must keep in mind the typecode @@ -2606,7 +2606,7 @@ be_visitor_typecode_defn::compute_tc_size (be_structure *node) { this->computed_tc_size_ = 4 + 4; } - else + else { if (be_global->opt_tc () || @@ -2617,7 +2617,7 @@ be_visitor_typecode_defn::compute_tc_size (be_structure *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_typecode_defn::" "compute_tc_size (structure) - " - "queue insert failed\n"), + "queue insert failed\n"), -1); } } @@ -2625,20 +2625,20 @@ be_visitor_typecode_defn::compute_tc_size (be_structure *node) this->ctx_->sub_state (TAO_CodeGen::TAO_TC_DEFN_ENCAP_LEN); if (node->accept (this) == -1) { - ACE_ERROR_RETURN ((LM_ERROR, + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") ACE_TEXT ("::compute_tc_size (structure) - ") ACE_TEXT ("cannot compute encap len\n")), -1); } - + this->computed_tc_size_ = 4 + 4 + this->computed_encap_len_; } return this->computed_tc_size_; } -ACE_CDR::Long +ACE_CDR::Long be_visitor_typecode_defn::compute_encap_length (be_structure *node) { ACE_CDR::Long encap_len = 4; // holds the byte order flag @@ -2666,7 +2666,7 @@ be_visitor_typecode_defn::compute_encap_length (be_structure *node) this->ctx_->sub_state (TAO_CodeGen::TAO_TC_DEFN_SCOPE_LEN); if (node->accept (this) == -1) { - ACE_ERROR_RETURN ((LM_ERROR, + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") ACE_TEXT ("::compute_encap_len (structure) - ") ACE_TEXT ("cannot compute scope tc size\n")), @@ -2689,7 +2689,7 @@ be_visitor_typecode_defn::compute_encap_length (be_structure *node) } -ACE_CDR::Long +ACE_CDR::Long be_visitor_typecode_defn::compute_tc_size (be_typedef *node) { // while computing the encapsulation length we must keep in mind the typecode @@ -2705,7 +2705,7 @@ be_visitor_typecode_defn::compute_tc_size (be_typedef *node) { this->computed_tc_size_ = 4 + 4; } - else + else { if (be_global->opt_tc () || @@ -2716,38 +2716,38 @@ be_visitor_typecode_defn::compute_tc_size (be_typedef *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_typecode_defn::" "compute_tc_size (typedef) - " - "queue insert failed\n"), + "queue insert failed\n"), -1); } } - + this->ctx_->sub_state (TAO_CodeGen::TAO_TC_DEFN_ENCAP_LEN); if (node->accept (this) == -1) { - ACE_ERROR_RETURN ((LM_ERROR, + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") ACE_TEXT ("::compute_tc_size (array) - ") ACE_TEXT ("cannot compute encap len\n")), -1); } - + this->computed_tc_size_ = 4 + 4 + this->computed_encap_len_; } return this->computed_tc_size_; } -ACE_CDR::Long +ACE_CDR::Long be_visitor_typecode_defn::compute_encap_length (be_typedef *node) { be_type *bt; // base type ACE_CDR::Long encap_len = 4; // holds the byte order flag - encap_len += + encap_len += this->repoID_encap_len (node); // repoID - + // do the same thing for the local name - encap_len += + encap_len += this->name_encap_len (node); // add the encapsulation length of our base type @@ -2755,20 +2755,20 @@ be_visitor_typecode_defn::compute_encap_length (be_typedef *node) this->ctx_->sub_state (TAO_CodeGen::TAO_TC_DEFN_TC_SIZE); if (!bt || bt->accept (this) == -1) { - ACE_ERROR_RETURN ((LM_ERROR, + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") ACE_TEXT ("::compute_encap_len (typedef) - ") ACE_TEXT ("cannot compute tc size\n")), -1); } - + this->computed_encap_len_ = encap_len + this->computed_tc_size_; return this->computed_encap_len_; } -ACE_CDR::Long +ACE_CDR::Long be_visitor_typecode_defn::compute_tc_size (be_union *node) { // while computing the encapsulation length we must keep in mind the typecode @@ -2784,7 +2784,7 @@ be_visitor_typecode_defn::compute_tc_size (be_union *node) { this->computed_tc_size_ = 4 + 4; } - else + else { if (be_global->opt_tc () || node->in_recursion ()) @@ -2794,7 +2794,7 @@ be_visitor_typecode_defn::compute_tc_size (be_union *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_typecode_defn::" "compute_tc_size (union) - " - "queue insert failed\n"), + "queue insert failed\n"), -1); } } @@ -2802,48 +2802,48 @@ be_visitor_typecode_defn::compute_tc_size (be_union *node) this->ctx_->sub_state (TAO_CodeGen::TAO_TC_DEFN_ENCAP_LEN); if (node->accept (this) == -1) { - ACE_ERROR_RETURN ((LM_ERROR, + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") ACE_TEXT ("::compute_tc_size (union) - ") ACE_TEXT ("cannot compute encap len\n")), -1); } - + this->computed_tc_size_ = 4 + 4 + this->computed_encap_len_; } return this->computed_tc_size_; } -ACE_CDR::Long +ACE_CDR::Long be_visitor_typecode_defn::compute_encap_length (be_union *node) { be_type *discrim; - + ACE_CDR::Long encap_len = 4; // holds the byte order flag - + encap_len += this->repoID_encap_len (node); // for repoID - + // do the same thing for the local name encap_len += this->name_encap_len (node); // for name - + // add encapsulation size of discriminant typecode discrim = be_type::narrow_from_decl (node->disc_type ()); this->ctx_->sub_state (TAO_CodeGen::TAO_TC_DEFN_TC_SIZE); if (!discrim || discrim->accept (this) == -1) { - ACE_ERROR_RETURN ((LM_ERROR, + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") ACE_TEXT ("::compute_encap_len (union) - ") ACE_TEXT ("cannot compute tc size\n")), -1); } - + encap_len += this->computed_tc_size_; - + encap_len += 4; // to hold the "default used" flag encap_len += 4; // to hold the member count - + // save the current value of scope len and start with a fresh one for our // scope length computation if (this->push (this->computed_scope_encap_len_) == -1) @@ -2860,7 +2860,7 @@ be_visitor_typecode_defn::compute_encap_length (be_union *node) this->ctx_->sub_state (TAO_CodeGen::TAO_TC_DEFN_SCOPE_LEN); if (node->accept (this) == -1) { - ACE_ERROR_RETURN ((LM_ERROR, + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") ACE_TEXT ("::compute_encap_len (union) - ") ACE_TEXT ("cannot compute scope tc size\n")), @@ -2897,7 +2897,7 @@ be_visitor_typecode_defn::compute_encap_length (be_union_branch *node) this->ctx_->sub_state (TAO_CodeGen::TAO_TC_DEFN_TC_SIZE); if (!bt || bt->accept (this) == -1) { - ACE_ERROR_RETURN ((LM_ERROR, + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("(%N:%l) be_visitor_typecode_defn") ACE_TEXT ("::compute_encap_len (union branch) - ") ACE_TEXT ("cannot compute tc size\n")), @@ -2961,20 +2961,20 @@ be_visitor_typecode_defn::gen_repoID (be_decl *node) // optimized case *os << "1, 0x0,"; *os << " // repository ID = "; - + // repoID generation. *os << node->repoID (); - + // size of the repoID filed this->tc_offset_ += (2 * sizeof (ACE_CDR::ULong)); } else { // Unoptimized case. - - *os << (ACE_OS::strlen (node->repoID ()) + 1) + + *os << (ACE_OS::strlen (node->repoID ()) + 1) << "," << be_nl; - + ACE_CDR::ULong *arr, i, arrlen; (void) this->tc_name2long (node->repoID (), arr, arrlen); @@ -2988,7 +2988,7 @@ be_visitor_typecode_defn::gen_repoID (be_decl *node) *os << be_nl; } } - + // Comment. *os << " // repository ID = " << node->repoID (); @@ -3006,7 +3006,7 @@ be_visitor_typecode_defn::gen_name (be_decl *node) TAO_OutStream *os = this->ctx_->stream (); // @@ AMI code generation should be done for this optimized - // case. (Alex). + // case. (Alex). // Generate name. if (be_global->opt_tc ()) @@ -3020,7 +3020,7 @@ be_visitor_typecode_defn::gen_name (be_decl *node) { ACE_CDR::ULong *arr, i, arrlen; - *os << (ACE_OS::strlen (node->local_name ()->get_string ()) + 1) + *os << (ACE_OS::strlen (node->local_name ()->get_string ()) + 1) << "," << be_nl; (void) this->tc_name2long (node->local_name ()->get_string (), arr, arrlen); @@ -3034,7 +3034,7 @@ be_visitor_typecode_defn::gen_name (be_decl *node) *os << be_nl; } } - + *os << " // name = " << node->local_name (); // size of the name field. @@ -3093,9 +3093,9 @@ be_visitor_typecode_defn::repoID_encap_len (be_decl *node) } else { - ACE_CDR::ULong slen = ACE_OS::strlen (node->repoID ()) + 1; - // + 1 for NULL terminating char - + ACE_CDR::ULong slen = ACE_OS::strlen (node->repoID ()) + 1; + // + 1 for NULL terminating char + // the number of bytes to hold the string must be a multiple of 4 since this // will be represented as an array of longs return 4 + 4 * (slen/4 + (slen%4 ? 1:0)); @@ -3114,19 +3114,19 @@ be_visitor_typecode_defn::name_encap_len (be_decl *node) } else { - ACE_CDR::ULong slen = - ACE_OS::strlen (node->local_name ()->get_string ()) + 1; - + ACE_CDR::ULong slen = + ACE_OS::strlen (node->local_name ()->get_string ()) + 1; + // the number of bytes to hold the string must be a multiple of 4 since this // will be represented as an array of longs return 4 + 4 * (slen/4 + (slen%4 ? 1:0)); } } - + // converts a string name into an array of 4 byte longs int -be_visitor_typecode_defn::tc_name2long (const char *name, - ACE_CDR::ULong *&larr, +be_visitor_typecode_defn::tc_name2long (const char *name, + ACE_CDR::ULong *&larr, ACE_CDR::ULong &arrlen) { const int bytes_per_word = sizeof (ACE_CDR::ULong); diff --git a/TAO/TAO_IDL/be/be_visitor_typedef/typedef_ch.cpp b/TAO/TAO_IDL/be/be_visitor_typedef/typedef_ch.cpp index 5d29ef38910..76c9f997b42 100644 --- a/TAO/TAO_IDL/be/be_visitor_typedef/typedef_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_typedef/typedef_ch.cpp @@ -84,7 +84,7 @@ be_visitor_typedef_ch::visit_typedef (be_typedef *node) "(%N:%l) be_visitor_typedef_ch::" "visit_typedef - " "bad primitive base type\n" - ), + ), -1); } @@ -95,7 +95,7 @@ be_visitor_typedef_ch::visit_typedef (be_typedef *node) "(%N:%l) be_visitor_typedef_ch::" "visit_typedef - " "failed to accept visitor\n" - ), + ), -1); } @@ -116,7 +116,7 @@ be_visitor_typedef_ch::visit_typedef (be_typedef *node) "(%N:%l) be_visitor_typedef_ch::" "visit_typedef - " "bad base type\n" - ), + ), -1); } @@ -127,7 +127,7 @@ be_visitor_typedef_ch::visit_typedef (be_typedef *node) "(%N:%l) be_visitor_typedef_ch::" "visit_typedef - " "failed to accept visitor\n" - ), + ), -1); } @@ -147,7 +147,7 @@ be_visitor_typedef_ch::visit_typedef (be_typedef *node) "(%N:%l) be_visitor_typedef_ch::" "visit_typedef - " "TypeCode declaration failed\n" - ), + ), -1); } } @@ -265,7 +265,7 @@ be_visitor_typedef_ch::visit_enum (be_enum *node) "(%N:%l) be_visitor_typedef_ch::" "visit_enum - " "base class visitor failed \n" - ), + ), -1); } } diff --git a/TAO/TAO_IDL/be/be_visitor_typedef/typedef_ci.cpp b/TAO/TAO_IDL/be/be_visitor_typedef/typedef_ci.cpp index 4d6a67fb84a..b52ec2b573d 100644 --- a/TAO/TAO_IDL/be/be_visitor_typedef/typedef_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_typedef/typedef_ci.cpp @@ -136,7 +136,7 @@ be_visitor_typedef_ci::visit_array (be_array *node) be_type *bt; // This doesn't catch 'typedef of a typedef' if the node is - // imported, so we check for that below before generating + // imported, so we check for that below before generating // any code. if (this->ctx_->alias ()) { @@ -163,7 +163,7 @@ be_visitor_typedef_ci::visit_array (be_array *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_typedef_ci::" "visit_array - " - "base class visitor failed \n"), + "base class visitor failed \n"), -1); } } diff --git a/TAO/TAO_IDL/be/be_visitor_union/union_ch.cpp b/TAO/TAO_IDL/be/be_visitor_union/union_ch.cpp index 9a7277aa641..5475cc456fc 100644 --- a/TAO/TAO_IDL/be/be_visitor_union/union_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union/union_ch.cpp @@ -75,7 +75,7 @@ int be_visitor_union_ch::visit_union (be_union *node) if (!node->is_local ()) { - *os << "static void _tao_any_destructor (void*);" + *os << "static void _tao_any_destructor (void*);" << be_nl << be_nl; } @@ -120,7 +120,7 @@ int be_visitor_union_ch::visit_union (be_union *node) // Generate the _var_type typedef // but we must protect against certain versions of g++. - *os << "\n#if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8)" + *os << "\n#if !defined(__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8)" << be_nl; *os << "typedef " << node->local_name () << "_var _var_type;\n" << "#endif /* ! __GNUC__ || g++ >= 2.8 */" << be_nl << be_nl; @@ -223,7 +223,7 @@ int be_visitor_union_ch::visit_union (be_union *node) // Generate the ifdefined macro for the array type. os->gen_ifdef_macro (node->flat_name (), "_out"); - // A class is generated for an out defn only for a variable + // A class is generated for an out defn only for a variable // length struct. if (node->size_type () == be_decl::VARIABLE) { @@ -237,7 +237,7 @@ int be_visitor_union_ch::visit_union (be_union *node) } else { - *os << "typedef " << node->local_name () << " &" + *os << "typedef " << node->local_name () << " &" << node->local_name () << "_out;" << be_nl << be_nl; } diff --git a/TAO/TAO_IDL/be/be_visitor_union/union_cs.cpp b/TAO/TAO_IDL/be/be_visitor_union/union_cs.cpp index 9e1f82ad93b..20b70bab04d 100644 --- a/TAO/TAO_IDL/be/be_visitor_union/union_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union/union_cs.cpp @@ -192,7 +192,7 @@ int be_visitor_union_cs::visit_union (be_union *node) if (!node->is_local ()) *os << "void " - << node->name () + << node->name () << "::_tao_any_destructor (void *_tao_void_pointer)" << be_nl << "{" << be_idt_nl << node->local_name () << " *tmp = ACE_static_cast (" diff --git a/TAO/TAO_IDL/be/be_visitor_union_branch/cdr_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_union_branch/cdr_op_ch.cpp index 74108181d13..d066471016b 100644 --- a/TAO/TAO_IDL/be/be_visitor_union_branch/cdr_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union_branch/cdr_op_ch.cpp @@ -238,8 +238,8 @@ be_visitor_union_branch_cdr_op_ch::visit_typedef (be_typedef *node) { // save the node for use in code generation and // indicate that the union_branch of the union_branch node - // is a typedefed quantity - this->ctx_->alias (node); + // is a typedefed quantity + this->ctx_->alias (node); // make a decision based on the primitive base type be_type *bt = node->primitive_base_type (); diff --git a/TAO/TAO_IDL/be/be_visitor_union_branch/cdr_op_ci.cpp b/TAO/TAO_IDL/be/be_visitor_union_branch/cdr_op_ci.cpp index a6d567bd521..be713ac0b25 100644 --- a/TAO/TAO_IDL/be/be_visitor_union_branch/cdr_op_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union_branch/cdr_op_ci.cpp @@ -423,7 +423,7 @@ be_visitor_union_branch_cdr_op_ci::visit_predefined_type (be_predefined_type *no << "if (result)" << be_idt_nl << "{" << be_idt_nl << "_tao_union." << f->local_name () << " (_tao_union_tmp.in ());"; - + } else if (node->pt () == AST_PredefinedType::PT_char) *os << "CORBA::Char _tao_union_tmp;" << be_nl @@ -871,7 +871,7 @@ be_visitor_union_branch_cdr_op_ci::visit_union (be_union *node) return 0; } -int +int be_visitor_union_branch_cdr_op_ci::explicit_default (void) { be_union *bu = be_union::narrow_from_decl (this->ctx_->scope ()); @@ -879,12 +879,12 @@ be_visitor_union_branch_cdr_op_ci::explicit_default (void) if (def_index != -1) { - be_union_branch *ub = + be_union_branch *ub = be_union_branch::narrow_from_decl (this->ctx_->node ()); // instantiate a scope iterator. - UTL_ScopeActiveIterator *si = - new UTL_ScopeActiveIterator (bu, + UTL_ScopeActiveIterator *si = + new UTL_ScopeActiveIterator (bu, UTL_Scope::IK_decls); int i = 0; // counter diff --git a/TAO/TAO_IDL/be/be_visitor_union_branch/private_ch.cpp b/TAO/TAO_IDL/be/be_visitor_union_branch/private_ch.cpp index 6702c1703b0..3b71f0e6d59 100644 --- a/TAO/TAO_IDL/be/be_visitor_union_branch/private_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union_branch/private_ch.cpp @@ -55,7 +55,7 @@ be_visitor_union_branch_private_ch::visit_union_branch (be_union_branch *node) "(%N:%l) be_visitor_union_branch_private_ch::" "visit_union_branch - " "Bad union_branch type\n" - ), + ), -1); } @@ -67,7 +67,7 @@ be_visitor_union_branch_private_ch::visit_union_branch (be_union_branch *node) "(%N:%l) be_visitor_union_branch_private_ch::" "visit_union_branch - " "codegen for union_branch type failed\n" - ), + ), -1); } @@ -99,7 +99,7 @@ be_visitor_union_branch_private_ch::visit_array (be_array *node) "(%N:%l) be_visitor_union_branch_private_ch::" "visit_array - " "bad context information\n" - ), + ), -1); } @@ -145,13 +145,13 @@ be_visitor_union_branch_private_ch::visit_enum (be_enum *node) "(%N:%l) be_visitor_union_branch_private_ch::" "visit_enum - " "bad context information\n" - ), + ), -1); } TAO_OutStream *os = this->ctx_->stream (); - *os << bt->nested_type_name (bu) << " " << ub->local_name () + *os << bt->nested_type_name (bu) << " " << ub->local_name () << "_;" << be_nl; return 0; @@ -180,7 +180,7 @@ be_visitor_union_branch_private_ch::visit_interface (be_interface *node) "(%N:%l) be_visitor_union_branch_private_ch::" "visit_interface - " "bad context information\n" - ), + ), -1); } @@ -215,7 +215,7 @@ be_visitor_union_branch_private_ch::visit_interface_fwd (be_interface_fwd *node) "(%N:%l) be_visitor_union_branch_private_ch::" "visit_interface_fwd - " "bad context information\n" - ), + ), -1); } @@ -252,7 +252,7 @@ be_visitor_union_branch_private_ch::visit_predefined_type ( "(%N:%l) be_visitor_union_branch_private_ch::" "visit_predefined_type - " "bad context information\n" - ), + ), -1); } @@ -275,12 +275,12 @@ be_visitor_union_branch_private_ch::visit_predefined_type ( { // Cannot have an object inside of a union. In addition, an Any is a // variable data type. - *os << bt->nested_type_name (bu) << " *" << ub->local_name () + *os << bt->nested_type_name (bu) << " *" << ub->local_name () << "_;" << be_nl; } else { - *os << bt->nested_type_name (bu) << " " << ub->local_name () + *os << bt->nested_type_name (bu) << " " << ub->local_name () << "_;" << be_nl; } @@ -310,7 +310,7 @@ be_visitor_union_branch_private_ch::visit_sequence (be_sequence *node) "(%N:%l) be_visitor_union_branch_private_ch::" "visit_sequence - " "bad context information\n" - ), + ), -1); } @@ -318,7 +318,7 @@ be_visitor_union_branch_private_ch::visit_sequence (be_sequence *node) // C++ doesn't allow object instances inside unions, so we need a // pointer. - *os << bt->nested_type_name (bu) << " *" << ub->local_name () + *os << bt->nested_type_name (bu) << " *" << ub->local_name () << "_;" << be_nl; return 0; @@ -336,7 +336,7 @@ be_visitor_union_branch_private_ch::visit_string (be_string *node) "(%N:%l) be_visitor_union_branch_private_ch::" "visit_string - " "bad context information\n" - ), + ), -1); } @@ -377,7 +377,7 @@ be_visitor_union_branch_private_ch::visit_structure (be_structure *node) "(%N:%l) be_visitor_union_branch_private_ch::" "visit_structure - " "bad context information\n" - ), + ), -1); } @@ -387,12 +387,12 @@ be_visitor_union_branch_private_ch::visit_structure (be_structure *node) if (node->size_type () == be_decl::VARIABLE || node->has_constructor ()) { - *os << bt->nested_type_name (bu) << " *" << ub->local_name () + *os << bt->nested_type_name (bu) << " *" << ub->local_name () << "_;" << be_nl; } else { - *os << bt->nested_type_name (bu) << " " << ub->local_name () + *os << bt->nested_type_name (bu) << " " << ub->local_name () << "_;" << be_nl; } @@ -413,7 +413,7 @@ be_visitor_union_branch_private_ch::visit_typedef (be_typedef *node) "(%N:%l) be_visitor_union_branch_private_ch::" "visit_typedef - " "Bad primitive type\n" - ), + ), -1); } @@ -444,7 +444,7 @@ be_visitor_union_branch_private_ch::visit_union (be_union *node) "(%N:%l) be_visitor_union_branch_private_ch::" "visit_union - " "bad context information\n" - ), + ), -1); } @@ -452,7 +452,7 @@ be_visitor_union_branch_private_ch::visit_union (be_union *node) // C++ doesn't allow object instances inside unions, so we need a // pointer. - *os << bt->nested_type_name (bu) << " *" << ub->local_name () + *os << bt->nested_type_name (bu) << " *" << ub->local_name () << "_;" << be_nl; return 0; diff --git a/TAO/TAO_IDL/be/be_visitor_union_branch/public_ch.cpp b/TAO/TAO_IDL/be/be_visitor_union_branch/public_ch.cpp index 8cf37ffe661..b0ba75fe91c 100644 --- a/TAO/TAO_IDL/be/be_visitor_union_branch/public_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union_branch/public_ch.cpp @@ -55,7 +55,7 @@ be_visitor_union_branch_public_ch::visit_union_branch (be_union_branch *node) "(%N:%l) be_visitor_union_branch_public_ch::" "visit_union_branch - " "Bad union_branch type\n" - ), + ), -1); } @@ -67,7 +67,7 @@ be_visitor_union_branch_public_ch::visit_union_branch (be_union_branch *node) "(%N:%l) be_visitor_union_branch_public_ch::" "visit_union_branch - " "codegen for union_branch type failed\n" - ), + ), -1); } @@ -100,7 +100,7 @@ be_visitor_union_branch_public_ch::visit_array (be_array *node) "(%N:%l) be_visitor_union_branch_public_ch::" "visit_array - " "bad context information\n" - ), + ), -1); } @@ -127,7 +127,7 @@ be_visitor_union_branch_public_ch::visit_array (be_array *node) "(%N:%l) be_visitor_union_branch_public_ch::" "visit_array - " "Bad visitor\n" - ), + ), -1); } @@ -137,7 +137,7 @@ be_visitor_union_branch_public_ch::visit_array (be_array *node) "(%N:%l) be_visitor_union_branch_public_ch::" "visit_array - " "codegen failed\n" - ), + ), -1); } @@ -190,7 +190,7 @@ be_visitor_union_branch_public_ch::visit_enum (be_enum *node) "(%N:%l) be_visitor_union_branch_public_ch::" "visit_enum - " "bad context information\n" - ), + ), -1); } @@ -215,7 +215,7 @@ be_visitor_union_branch_public_ch::visit_enum (be_enum *node) "(%N:%l) be_visitor_union_branch_public_ch::" "visit_enum - " "Bad visitor\n" - ), + ), -1); } @@ -225,7 +225,7 @@ be_visitor_union_branch_public_ch::visit_enum (be_enum *node) "(%N:%l) be_visitor_union_branch_public_ch::" "visit_enum - " "codegen failed\n" - ), + ), -1); } @@ -268,7 +268,7 @@ be_visitor_union_branch_public_ch::visit_interface (be_interface *node) "(%N:%l) be_visitor_union_branch_public_ch::" "visit_interface - " "bad context information\n" - ), + ), -1); } @@ -308,7 +308,7 @@ be_visitor_union_branch_public_ch::visit_interface_fwd (be_interface_fwd *node) "(%N:%l) be_visitor_union_branch_public_ch::" "visit_interface_fwd - " "bad context information\n" - ), + ), -1); } @@ -351,7 +351,7 @@ be_visitor_union_branch_public_ch::visit_valuetype (be_valuetype *node) "(%N:%l) be_visitor_union_branch_public_ch::" "visit_valuetype - " "bad context information\n" - ), + ), -1); } @@ -392,7 +392,7 @@ be_visitor_union_branch_public_ch::visit_valuetype_fwd (be_valuetype_fwd *node) "(%N:%l) be_visitor_union_branch_public_ch::" "visit_valuetype_fwd - " "bad context information\n" - ), + ), -1); } @@ -435,7 +435,7 @@ be_visitor_union_branch_public_ch::visit_predefined_type (be_predefined_type *no "(%N:%l) be_visitor_union_branch_public_ch::" "visit_predefined_type - " "bad context information\n" - ), + ), -1); } @@ -493,7 +493,7 @@ be_visitor_union_branch_public_ch::visit_sequence (be_sequence *node) "(%N:%l) be_visitor_union_branch_public_ch::" "visit_sequence - " "bad context information\n" - ), + ), -1); } @@ -518,7 +518,7 @@ be_visitor_union_branch_public_ch::visit_sequence (be_sequence *node) "(%N:%l) be_visitor_union_branch_public_ch::" "visit_sequence - " "Bad visitor\n" - ), + ), -1); } @@ -528,7 +528,7 @@ be_visitor_union_branch_public_ch::visit_sequence (be_sequence *node) "(%N:%l) be_visitor_union_branch_public_ch::" "visit_sequence - " "codegen failed\n" - ), + ), -1); } @@ -540,9 +540,9 @@ be_visitor_union_branch_public_ch::visit_sequence (be_sequence *node) // implementation-specific name. *os << "\n#if !defined (__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8)" << be_nl - << "typedef " << bt->nested_type_name (bu) + << "typedef " << bt->nested_type_name (bu) << " _" << ub->local_name () << "_seq;\n"; - *os << "#endif /* ! __GNUC__ || ACE_HAS_GNUG_PRE_2_8 */" + *os << "#endif /* ! __GNUC__ || ACE_HAS_GNUG_PRE_2_8 */" << be_nl << be_nl; } @@ -570,7 +570,7 @@ be_visitor_union_branch_public_ch::visit_string (be_string *node) "(%N:%l) be_visitor_union_branch_public_ch::" "visit_string - " "bad context information\n" - ), + ), -1); } @@ -625,7 +625,7 @@ be_visitor_union_branch_public_ch::visit_structure (be_structure *node) "(%N:%l) be_visitor_union_branch_public_ch::" "visit_structure - " "bad context information\n" - ), + ), -1); } @@ -651,7 +651,7 @@ be_visitor_union_branch_public_ch::visit_structure (be_structure *node) "(%N:%l) be_visitor_union_branch_public_ch::" "visit_structure - " "Bad visitor\n" - ), + ), -1); } @@ -661,7 +661,7 @@ be_visitor_union_branch_public_ch::visit_structure (be_structure *node) "(%N:%l) be_visitor_union_branch_public_ch::" "visit_structure - " "codegen failed\n" - ), + ), -1); } @@ -694,7 +694,7 @@ be_visitor_union_branch_public_ch::visit_typedef (be_typedef *node) "(%N:%l) be_visitor_union_branch_spec_ch::" "visit_typedef - " "Bad primitive type\n" - ), + ), -1); } @@ -726,7 +726,7 @@ be_visitor_union_branch_public_ch::visit_union (be_union *node) "(%N:%l) be_visitor_union_branch_public_ch::" "visit_union - " "bad context information\n" - ), + ), -1); } @@ -751,7 +751,7 @@ be_visitor_union_branch_public_ch::visit_union (be_union *node) "(%N:%l) be_visitor_union_branch_public_ch::" "visit_union - " "Bad visitor\n" - ), + ), -1); } @@ -761,7 +761,7 @@ be_visitor_union_branch_public_ch::visit_union (be_union *node) "(%N:%l) be_visitor_union_branch_public_ch::" "visit_union - " "codegen failed\n" - ), + ), -1); } diff --git a/TAO/TAO_IDL/be/be_visitor_union_branch/public_ci.cpp b/TAO/TAO_IDL/be/be_visitor_union_branch/public_ci.cpp index 241d1885cc4..593c57366b6 100644 --- a/TAO/TAO_IDL/be/be_visitor_union_branch/public_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union_branch/public_ci.cpp @@ -143,8 +143,8 @@ be_visitor_union_branch_public_ci::visit_array (be_array *node) // For anonymous arrays, the type name has a _ prepended. We compute the // full_name with or without the underscore and use it later on. char fname [NAMEBUFSIZE]; - ACE_OS::memset (fname, - '\0', + ACE_OS::memset (fname, + '\0', NAMEBUFSIZE); // If bt is not a typedef and is defined inside the union @@ -157,25 +157,25 @@ be_visitor_union_branch_public_ci::visit_array (be_array *node) if (bt->is_nested ()) { - be_decl *parent = + be_decl *parent = be_scope::narrow_from_scope (bt->defined_in ())->decl (); - ACE_OS::sprintf (fname, - "%s::_%s", + ACE_OS::sprintf (fname, + "%s::_%s", parent->full_name (), bt->local_name ()->get_string ()); } else { - ACE_OS::sprintf (fname, - "_%s", + ACE_OS::sprintf (fname, + "_%s", bt->full_name ()); } } else { // Typedefed node. - ACE_OS::sprintf (fname, - "%s", + ACE_OS::sprintf (fname, + "%s", bt->full_name ()); } @@ -546,7 +546,7 @@ be_visitor_union_branch_public_ci::visit_predefined_type ( *os << "typedef CORBA::Object_var OBJECT_FIELD;" << be_nl << "ACE_NEW (" << be_idt << be_idt_nl << "this->u_." << ub->local_name () << "_," << be_nl - << "OBJECT_FIELD (CORBA::Object::_duplicate (val))" + << "OBJECT_FIELD (CORBA::Object::_duplicate (val))" << be_uidt_nl << ");" << be_uidt << be_uidt_nl; } @@ -782,7 +782,7 @@ be_visitor_union_branch_public_ci::visit_string (be_string *node) } else { - *os << bu->name () << "::" << ub->local_name () + *os << bu->name () << "::" << ub->local_name () << " (CORBA::WChar *val)"; } @@ -851,12 +851,12 @@ be_visitor_union_branch_public_ci::visit_string (be_string *node) if (node->width () == (long) sizeof (char)) { - *os << "CORBA::string_dup (val);" << be_uidt_nl + *os << "CORBA::string_dup (val);" << be_uidt_nl << "}" << be_nl << be_nl; } else { - *os << "CORBA::wstring_dup (val);" << be_uidt_nl + *os << "CORBA::wstring_dup (val);" << be_uidt_nl << "}" << be_nl << be_nl; } @@ -1080,7 +1080,7 @@ int be_visitor_union_branch_public_ci::visit_typedef (be_typedef *node) { // Save the typedef node for use in code generation. - this->ctx_->alias (node); + this->ctx_->alias (node); // The node to be visited in the base primitve type that gets typedefed. be_type *bt = node->primitive_base_type (); diff --git a/TAO/TAO_IDL/be/be_visitor_union_branch/public_reset_cs.cpp b/TAO/TAO_IDL/be/be_visitor_union_branch/public_reset_cs.cpp index 2e191f3f820..3f5e80ba612 100644 --- a/TAO/TAO_IDL/be/be_visitor_union_branch/public_reset_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_union_branch/public_reset_cs.cpp @@ -85,7 +85,7 @@ visit_union_branch (be_union_branch *node) else *os << be_nl; } - + if (bt->accept (this) == -1) { ACE_ERROR_RETURN ((LM_ERROR, diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/ami_exception_holder_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/ami_exception_holder_ch.cpp index 33aff951ba3..129104f1a06 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/ami_exception_holder_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/ami_exception_holder_ch.cpp @@ -70,7 +70,7 @@ be_visitor_valuetype_ami_exception_holder_ch::visit_valuetype (be_valuetype *nod ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_ami_exception_holder_cs::" "visit_valuetype - " - "codegen for scope failed\n"), + "codegen for scope failed\n"), -1); } diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_ch.cpp index 6d0eb38c78f..06bfc23f4da 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_ch.cpp @@ -64,12 +64,12 @@ be_visitor_valuetype_cdr_op_ch::visit_valuetype (be_valuetype *node) // generate the CDR << and >> operator declarations (prototypes) os->indent (); //start with whatever indentation level we are at now - - *os << be_global->stub_export_macro () - << "CORBA::Boolean operator<< (TAO_OutputCDR &, const " + + *os << be_global->stub_export_macro () + << "CORBA::Boolean operator<< (TAO_OutputCDR &, const " << node->full_name () << " *);" << be_nl; - - *os << be_global->stub_export_macro () + + *os << be_global->stub_export_macro () << "CORBA::Boolean operator>> (TAO_InputCDR &, " << node->full_name () << " *&);" << be_nl; @@ -85,7 +85,7 @@ be_visitor_valuetype_cdr_op_ch::visit_valuetype (be_valuetype *node) "(%N:%l) be_visitor_valuetype_cdr_op_ch::" "visit_valuetype - " "codegen for scope failed\n"), -1); - } + } //@@ Boris: that's suck! if (!node->is_abstract_valuetype ()) diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_ci.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_ci.cpp index 074f7c95084..a73fd530ad8 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_ci.cpp @@ -62,13 +62,13 @@ be_visitor_valuetype_cdr_op_ci::visit_valuetype (be_valuetype *node) // Generate CDR << and >> operator signatures //@@ Boris: Can I move this to be_valuetype? (as with _var, _out, etc?) - + //This is just declaration so no ACE_INLINE - *os << be_global->stub_export_macro () - << "CORBA::Boolean operator<< (TAO_OutputCDR &, const " + *os << be_global->stub_export_macro () + << "CORBA::Boolean operator<< (TAO_OutputCDR &, const " << node->full_name () << " *);" << be_nl; - *os << be_global->stub_export_macro () + *os << be_global->stub_export_macro () << "CORBA::Boolean operator>> (TAO_InputCDR &, " << node->full_name () << " *&);" << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_cs.cpp index 490b3bc6ec1..574b3cd3131 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/cdr_op_cs.cpp @@ -118,7 +118,7 @@ be_visitor_valuetype_cdr_op_cs::visit_valuetype (be_valuetype *node) //@@ Boris: ment to be refactored if (!node->is_abstract_valuetype ()) - { + { // functions that marshal state be_visitor_context* new_ctx = new be_visitor_context (*this->ctx_); be_visitor_valuetype_marshal_cs visitor (new_ctx); @@ -126,6 +126,6 @@ be_visitor_valuetype_cdr_op_cs::visit_valuetype (be_valuetype *node) } node->cli_stub_cdr_op_gen (I_TRUE); - + return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/field_cdr_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/field_cdr_ch.cpp index ab108a83da4..494b8378eb1 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/field_cdr_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/field_cdr_ch.cpp @@ -238,8 +238,8 @@ be_visitor_valuetype_field_cdr_ch::visit_typedef (be_typedef *node) { // save the node for use in code generation and // indicate that the field of the field node - // is a typedefed quantity - this->ctx_->alias (node); + // is a typedefed quantity + this->ctx_->alias (node); // make a decision based on the primitive base type be_type *bt = node->primitive_base_type (); diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/field_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/field_ch.cpp index b4b0dc8e468..0cd37403575 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/field_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/field_ch.cpp @@ -51,7 +51,7 @@ be_visitor_valuetype_field_ch::visit_field (be_field *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_field_ch::" "visit_union_branch - " - "Bad type\n"), + "Bad type\n"), -1); } @@ -62,7 +62,7 @@ be_visitor_valuetype_field_ch::visit_field (be_field *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_field_ch::" "visit_union_branch - " - "codegen failed\n"), + "codegen failed\n"), -1); } @@ -94,7 +94,7 @@ be_visitor_valuetype_field_ch::visit_array (be_array *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_field_ch::" "visit_array - " - "bad context information\n"), + "bad context information\n"), -1); } @@ -119,7 +119,7 @@ be_visitor_valuetype_field_ch::visit_array (be_array *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_field_ch::" "visit_array - " - "Bad visitor\n"), + "Bad visitor\n"), -1); } @@ -128,7 +128,7 @@ be_visitor_valuetype_field_ch::visit_array (be_array *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_field_ch::" "visit_array - " - "codegen failed\n"), + "codegen failed\n"), -1); } @@ -189,7 +189,7 @@ be_visitor_valuetype_field_ch::visit_enum (be_enum *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_field_ch::" "visit_enum - " - "bad context information\n"), + "bad context information\n"), -1); } @@ -212,7 +212,7 @@ be_visitor_valuetype_field_ch::visit_enum (be_enum *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_field_ch::" "visit_enum - " - "Bad visitor\n"), + "Bad visitor\n"), -1); } @@ -221,7 +221,7 @@ be_visitor_valuetype_field_ch::visit_enum (be_enum *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_field_ch::" "visit_enum - " - "codegen failed\n"), + "codegen failed\n"), -1); } @@ -235,7 +235,7 @@ be_visitor_valuetype_field_ch::visit_enum (be_enum *node) << be_nl; // The get method. *os << pre_op () << bt->name () << " " << ub->local_name () - << " (void) const" << post_op () << " // get method" + << " (void) const" << post_op () << " // get method" << be_nl << be_nl; return 0; @@ -264,7 +264,7 @@ be_visitor_valuetype_field_ch::visit_interface (be_interface *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_field_ch::" "visit_interface - " - "bad context information\n"), + "bad context information\n"), -1); } @@ -306,7 +306,7 @@ be_visitor_valuetype_field_ch::visit_interface_fwd (be_interface_fwd *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_field_ch::" "visit_interface_fwd - " - "bad context information\n"), + "bad context information\n"), -1); } @@ -348,7 +348,7 @@ be_visitor_valuetype_field_ch::visit_valuetype (be_valuetype *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_field_ch::" "visit_valuetype - " - "bad context information\n"), + "bad context information\n"), -1); } @@ -390,7 +390,7 @@ be_visitor_valuetype_field_ch::visit_valuetype_fwd (be_valuetype_fwd *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_field_ch::" "visit_valuetype_fwd - " - "bad context information\n"), + "bad context information\n"), -1); } @@ -432,7 +432,7 @@ be_visitor_valuetype_field_ch::visit_predefined_type (be_predefined_type *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_field_ch::" "visit_predefined_type - " - "bad context information\n"), + "bad context information\n"), -1); } @@ -505,7 +505,7 @@ be_visitor_valuetype_field_ch::visit_sequence (be_sequence *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_field_ch::" "visit_sequence - " - "bad context information\n"), + "bad context information\n"), -1); } @@ -529,7 +529,7 @@ be_visitor_valuetype_field_ch::visit_sequence (be_sequence *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_field_ch::" "visit_sequence - " - "Bad visitor\n"), + "Bad visitor\n"), -1); } @@ -538,7 +538,7 @@ be_visitor_valuetype_field_ch::visit_sequence (be_sequence *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_field_ch::" "visit_sequence - " - "codegen failed\n"), + "codegen failed\n"), -1); } @@ -551,7 +551,7 @@ be_visitor_valuetype_field_ch::visit_sequence (be_sequence *node) os->decr_indent (0); *os << "#if !defined (__GNUC__) || !defined (ACE_HAS_GNUG_PRE_2_8)" << be_idt_nl - << "typedef " << bt->nested_type_name (bu) + << "typedef " << bt->nested_type_name (bu) << " _" << ub->local_name () << "_seq;" << be_uidt_nl; *os << "#endif /* ! __GNUC__ || ACE_HAS_GNUG_PRE_2_8 */\n" << be_nl; os->incr_indent (); @@ -587,7 +587,7 @@ be_visitor_valuetype_field_ch::visit_string (be_string *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_field_ch::" "visit_string - " - "bad context information\n"), + "bad context information\n"), -1); } @@ -653,7 +653,7 @@ be_visitor_valuetype_field_ch::visit_structure (be_structure *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_field_ch::" "visit_structure - " - "bad context information\n"), + "bad context information\n"), -1); } @@ -677,7 +677,7 @@ be_visitor_valuetype_field_ch::visit_structure (be_structure *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_field_ch::" "visit_structure - " - "Bad visitor\n"), + "Bad visitor\n"), -1); } @@ -686,7 +686,7 @@ be_visitor_valuetype_field_ch::visit_structure (be_structure *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_field_ch::" "visit_structure - " - "codegen failed\n"), + "codegen failed\n"), -1); } @@ -723,7 +723,7 @@ be_visitor_valuetype_field_ch::visit_typedef (be_typedef *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_spec_ch::" "visit_typedef - " - "Bad primitive type\n"), + "Bad primitive type\n"), -1); } @@ -754,7 +754,7 @@ be_visitor_valuetype_field_ch::visit_union (be_union *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_field_ch::" "visit_union - " - "bad context information\n"), + "bad context information\n"), -1); } @@ -778,7 +778,7 @@ be_visitor_valuetype_field_ch::visit_union (be_union *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_field_ch::" "visit_union - " - "Bad visitor\n"), + "Bad visitor\n"), -1); } @@ -787,7 +787,7 @@ be_visitor_valuetype_field_ch::visit_union (be_union *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_field_ch::" "visit_union - " - "codegen failed\n"), + "codegen failed\n"), -1); } diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/field_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/field_cs.cpp index 4bd7adf690b..3a80831f824 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/field_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/field_cs.cpp @@ -524,7 +524,7 @@ be_visitor_valuetype_field_cs::visit_predefined_type (be_predefined_type *node) switch (node->pt ()) { case AST_PredefinedType::PT_pseudo: - *os << "this->" << bu->field_pd_prefix() << ub->local_name () + *os << "this->" << bu->field_pd_prefix() << ub->local_name () << bu->field_pd_postfix() << " = " << bt->name () << "::_duplicate (val);" << be_uidt_nl; break; @@ -542,7 +542,7 @@ be_visitor_valuetype_field_cs::visit_predefined_type (be_predefined_type *node) default: *os << "// set the value" << be_nl - << "this->" << bu->field_pd_prefix () << ub->local_name () + << "this->" << bu->field_pd_prefix () << ub->local_name () << bu->field_pd_postfix () << " = val;" << be_uidt_nl; } @@ -671,9 +671,9 @@ be_visitor_valuetype_field_cs::visit_sequence (be_sequence *node) << " (const " << bt->name () << " &val)" << be_nl << "{" << be_idt_nl; - *os << "this->" - << bu->field_pd_prefix() << ub->local_name () - << bu->field_pd_postfix() + *os << "this->" + << bu->field_pd_prefix() << ub->local_name () + << bu->field_pd_postfix() << " = val;" << be_uidt_nl; *os << "}" << be_nl << be_nl; @@ -728,7 +728,7 @@ be_visitor_valuetype_field_cs::visit_string (be_string *node) os->indent (); // start from current indentation *os << "// accessor to set the member" << be_nl << this->pre_op () << "void" << be_nl; - this->op_name (bu, + this->op_name (bu, os); if (node->width () == (long) sizeof (char)) @@ -912,7 +912,7 @@ be_visitor_valuetype_field_cs::visit_structure (be_structure *node) if (0) // %! (bt->size_type () == be_type::VARIABLE) { cerr <<"!t VARIABLE struct in field_cs\n"; *os << "delete this->" - << bu->field_pd_prefix() << ub->local_name () + << bu->field_pd_prefix() << ub->local_name () << bu->field_pd_postfix() << ";" << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/marshal_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/marshal_ch.cpp index da337df77fb..ced4eefeeb5 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/marshal_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/marshal_ch.cpp @@ -67,7 +67,7 @@ be_visitor_valuetype_marshal_ch::visit_valuetype (be_valuetype *node) delete si; ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_scope::visit_scope - " - "bad node in this scope\n"), + "bad node in this scope\n"), -1); } @@ -87,7 +87,7 @@ be_visitor_valuetype_marshal_ch::visit_valuetype (be_valuetype *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_marshal_ch::" "visit_valuetype - " - "codegen for scope failed\n"), + "codegen for scope failed\n"), -1); } } diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/obv_module.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/obv_module.cpp index 760fc4de8af..e53d67fa7d2 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/obv_module.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/obv_module.cpp @@ -148,7 +148,7 @@ be_visitor_obv_module::visit_valuetype (be_valuetype *node) // Do addtional "extra" code generation if necessary if (node->has_extra_code_generation (ctx.state ())) - { + { // Change the state depending on the kind of node strategy ctx.state (node->next_state (ctx.state (), 1)); @@ -174,6 +174,6 @@ be_visitor_obv_module::visit_valuetype (be_valuetype *node) delete visitor; visitor = 0; } - + return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype.cpp index dd059c42b3a..daaba05c495 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype.cpp @@ -217,9 +217,9 @@ be_visitor_valuetype::visit_attribute (be_attribute *node) // the set method. // the return type is "void" - be_predefined_type *rt = + be_predefined_type *rt = new be_predefined_type (AST_PredefinedType::PT_void, - new UTL_ScopedName (new Identifier ("void"), + new UTL_ScopedName (new Identifier ("void"), 0)); // argument type is the same as the attribute type be_argument *arg = new be_argument (AST_Argument::dir_IN, @@ -869,7 +869,7 @@ be_visitor_valuetype::determine_factory_style (be_valuetype* node) idl_bool have_factory = 0; - + // Try only our own scope if (node->nmembers () > 0) { @@ -881,13 +881,13 @@ be_visitor_valuetype::determine_factory_style (be_valuetype* node) for (; !si.is_done (); si.next()) { AST_Decl *d = si.item (); - + if (!d) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_init::" "determine_factory_style" - "bad node in this scope\n"), + "bad node in this scope\n"), factory_style); } @@ -919,11 +919,11 @@ be_visitor_valuetype::determine_factory_style (be_valuetype* node) return factory_style; } -idl_bool +idl_bool be_visitor_valuetype::have_operation(be_valuetype* node) { // Check whatever scope we get for operations/attributes - + if (node == 0) { return 0; @@ -935,7 +935,7 @@ be_visitor_valuetype::have_operation(be_valuetype* node) // -its own // -derived (abstract VT | VT | abstract iface | iface) // - + // First try our own scope if (node->nmembers () > 0) { @@ -947,13 +947,13 @@ be_visitor_valuetype::have_operation(be_valuetype* node) for (; !si.is_done (); si.next()) { AST_Decl *d = si.item (); - + if (!d) { ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_init::" "has_operation" - "bad node in this scope\n"), + "bad node in this scope\n"), 0); } @@ -981,7 +981,7 @@ be_visitor_valuetype::have_operation(be_valuetype* node) { continue; } - + } // end of for loop } // end of if @@ -1053,11 +1053,11 @@ be_visitor_valuetype::obv_need_ref_counter (be_valuetype* node) } } } // end of for loop - + return 1; } -idl_bool +idl_bool be_visitor_valuetype::obv_have_ref_counter (be_valuetype* node) { @@ -1096,6 +1096,6 @@ be_visitor_valuetype::obv_have_ref_counter (be_valuetype* node) } } } // end of for loop - + return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp index 3d9efe86477..a530996d54a 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ch.cpp @@ -55,7 +55,7 @@ be_visitor_valuetype_ch::visit_valuetype (be_valuetype *node) // Forward declaration. *os << "class " << node->local_name () << ";" << be_nl; - + os->gen_ifdef_macro (node->flat_name (), "_ptr"); *os << "typedef " << node->local_name () @@ -72,7 +72,7 @@ be_visitor_valuetype_ch::visit_valuetype (be_valuetype *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_ch::" "visit_valuetype - " - "codegen for _var failed\n"), + "codegen for _var failed\n"), -1); } @@ -91,14 +91,14 @@ be_visitor_valuetype_ch::visit_valuetype (be_valuetype *node) } // generate the endif macro. - os->gen_endif (); + os->gen_endif (); } if (node->imported ()) { return 0; } - + // Now the valuetype definition itself. os->gen_ifdef_macro (node->flat_name ()); @@ -123,7 +123,7 @@ be_visitor_valuetype_ch::visit_valuetype (be_valuetype *node) be_interface *inherited = be_interface::narrow_from_decl (node->inherits ()[i]); - if (!inherited->is_valuetype () + if (!inherited->is_valuetype () && !inherited->is_abstract ()) { continue; @@ -155,7 +155,7 @@ be_visitor_valuetype_ch::visit_valuetype (be_valuetype *node) if (inherited->is_nested ()) { // Inherited node is used in the scope of "node" node. - scope = + scope = be_scope::narrow_from_scope (node->defined_in ())->decl (); } @@ -222,7 +222,7 @@ be_visitor_valuetype_ch::visit_valuetype (be_valuetype *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_ch::" "visit_valuetype - " - "codegen for scope failed\n"), + "codegen for scope failed\n"), -1); } @@ -267,7 +267,7 @@ be_visitor_valuetype_ch::visit_valuetype (be_valuetype *node) *os << "CORBA::Boolean " << "_tao_marshal_state (TAO_OutputCDR &);" << be_nl << "CORBA::Boolean " - << "_tao_unmarshal_state (TAO_InputCDR &);" + << "_tao_unmarshal_state (TAO_InputCDR &);" << be_uidt_nl << be_nl; *os << "private:" << be_idt_nl; this->gen_pd (node); diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ci.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ci.cpp index 584f1777f9d..6fa624a44fe 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_ci.cpp @@ -97,7 +97,7 @@ be_visitor_valuetype_ci::visit_valuetype (be_valuetype *node) "NULL visitor.\n" ), -1); } - + if (visitor->visit_valuetype(node) == -1) { ACE_ERROR_RETURN ((LM_ERROR, diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_cs.cpp index 29f150dc868..417e2c58ea4 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_cs.cpp @@ -73,7 +73,7 @@ be_visitor_valuetype_cs::visit_valuetype (be_valuetype *node) "codegen for _out failed\n"), -1); } - + // The _downcast method // %! use ACE_xxx_cast here ? *os << node->name() << "* " << node->name() << "::_downcast (CORBA::ValueBase* v)" << be_nl @@ -111,7 +111,7 @@ be_visitor_valuetype_cs::visit_valuetype (be_valuetype *node) { ++n_inherits_downcastable; *os << "if (rval == 0)" << be_idt_nl - << "rval = "; + << "rval = "; if (inherited->defined_in ()->scope_node_type () == AST_Decl::NT_module) { @@ -246,7 +246,7 @@ be_visitor_valuetype_cs::visit_valuetype (be_valuetype *node) "NULL visitor.\n" ), -1); } - + if (visitor->visit_valuetype(node) == -1) { ACE_ERROR_RETURN ((LM_ERROR, diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init.cpp index 0a2db0f822b..780004ba2d8 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init.cpp @@ -45,13 +45,13 @@ be_visitor_valuetype_init::visit_attribute (be_attribute *) return 0; } -int +int be_visitor_valuetype_init::visit_constant (be_constant *) { return 0; } -int +int be_visitor_valuetype_init::visit_enum (be_enum *) { return 0; @@ -69,7 +69,7 @@ be_visitor_valuetype_init::visit_exception (be_exception *) return 0; } -int +int be_visitor_valuetype_init::visit_structure (be_structure *) { return 0; @@ -81,7 +81,7 @@ be_visitor_valuetype_init::visit_union (be_union *) return 0; } -int +int be_visitor_valuetype_init::visit_typedef (be_typedef *) { return 0; @@ -93,7 +93,7 @@ be_visitor_valuetype_init::visit_field (be_field *) return 0; } -int +int be_visitor_valuetype_init::visit_factory (be_factory *) { return 0; diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_arglist_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_arglist_ch.cpp index 4013f3552ea..5b621ca3272 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_arglist_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_arglist_ch.cpp @@ -11,7 +11,7 @@ // valuetype_init_arglist_ch.cpp // // = DESCRIPTION -// Visitor generating code for the parameter list of the OBV factory +// Visitor generating code for the parameter list of the OBV factory // signature. // // = AUTHOR diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_ch.cpp index 2344ff7ed80..ffa84c7497c 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_ch.cpp @@ -53,7 +53,7 @@ be_visitor_valuetype_init_ch::visit_valuetype (be_valuetype *node) // In this case we don't need to bother about factory. // // (2) There are no (operations or initializers) (i.e. only state - // members) then we need a concrete type-specific factory + // members) then we need a concrete type-specific factory // class whose create_for_unmarshal creates OBV_ class. // // (3) There is at least one operation and at least one initializer. @@ -65,7 +65,7 @@ be_visitor_valuetype_init_ch::visit_valuetype (be_valuetype *node) { return 0; // bail out } - + TAO_OutStream& os = *(this->ctx_->stream ()); // Generate the ifdef macro for the _init class. @@ -125,7 +125,7 @@ be_visitor_valuetype_init_ch::visit_valuetype (be_valuetype *node) os << "// TAO-specific extensions" << be_uidt_nl << "public:" << be_idt_nl; - + os << "virtual const char* tao_repository_id (void);\n"; if(factory_style == FS_ABSTRACT_FACTORY) @@ -133,7 +133,7 @@ be_visitor_valuetype_init_ch::visit_valuetype (be_valuetype *node) // protected ctor os << be_uidt_nl << "protected:" << be_idt_nl; - + os << node->local_name () << "_init ();"; } @@ -146,7 +146,7 @@ be_visitor_valuetype_init_ch::visit_valuetype (be_valuetype *node) return 0; } -int +int be_visitor_valuetype_init_ch::visit_factory (be_factory *node) { diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_ci.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_ci.cpp index 2255defdcd0..87ef979a821 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_ci.cpp @@ -45,7 +45,7 @@ be_visitor_valuetype_init_ci::visit_valuetype (be_valuetype *) return 0; } -int +int be_visitor_valuetype_init_ci::visit_factory (be_factory *) { return 0; diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_cs.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_cs.cpp index 73fbcde518f..5c4d7caf51c 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_init_cs.cpp @@ -53,7 +53,7 @@ be_visitor_valuetype_init_cs::visit_valuetype (be_valuetype *node) // In this case we don't need to bother about factory. // // (2) There are no (operations or initializers) (i.e. only state - // members) then we need a concrete type-specific factory + // members) then we need a concrete type-specific factory // class whose create_for_unmarshal creates OBV_ class. // // (3) There is at least one operation and at least one initializer. @@ -85,14 +85,14 @@ be_visitor_valuetype_init_cs::visit_valuetype (be_valuetype *node) // ctor *os << fname << "::" << lname << " ()" << be_nl << "{" << be_nl << "}\n"; - + // dtor *os << be_nl << fname << "::~" << lname << " ()" << be_nl << "{" << be_nl << "}\n"; //tao_repository_id - *os << be_nl + *os << be_nl << "const char* " << be_nl << fname << "::tao_repository_id (void)" << be_nl << "{" << be_idt_nl @@ -120,7 +120,7 @@ be_visitor_valuetype_init_cs::visit_valuetype (be_valuetype *node) return 0; } -int +int be_visitor_valuetype_init_cs::visit_factory (be_factory *) { return 0; diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_ch.cpp index 353d08649e7..772bd32d98f 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype/valuetype_obv_ch.cpp @@ -86,18 +86,18 @@ be_visitor_valuetype_obv_ch::visit_valuetype (be_valuetype *node) << ": public virtual " << node->full_name (); - // STEP 1a (about which previous implementer forgot ): + // STEP 1a (about which previous implementer forgot ): // Generate inheritance from corresponding OBV_ classes. //------>>> - + // Here we need to be careful. There are few cases to consider: // // (1) We have VT with concrete factory and no inhereted VT with // concrete factory then we need to mix-in RefCounter // - // (2) We have VT with concerete factory and inheretence from - // another (not abstract or empty abstract <would like to + // (2) We have VT with concerete factory and inheretence from + // another (not abstract or empty abstract <would like to // know how to go there>) then its OBV_ already has mix-in // (3) The rest. Don't need to bother about anything, just inherit // whatever there is. @@ -107,18 +107,18 @@ be_visitor_valuetype_obv_ch::visit_valuetype (be_valuetype *node) idl_bool inherited_from_value = 0; for (; i < node->n_inherits (); ++i) { - AST_Interface *inherited = + AST_Interface *inherited = AST_Interface::narrow_from_decl(node->inherits ()[i]); - + // we need only concrete valuetypes - if (!inherited->is_valuetype () + if (!inherited->is_valuetype () || inherited->is_abstract ()) { continue; } - + *os << "," << be_nl; - + // dump the scoped name. *os << " public virtual OBV_"; *os << inherited->full_name(); @@ -128,13 +128,13 @@ be_visitor_valuetype_obv_ch::visit_valuetype (be_valuetype *node) if (obv_need_ref_counter (node)) { *os << "," << be_nl; - + // dump the scoped name. *os << " public virtual CORBA_DefaultValueRefCountBase"; } - - *os << be_uidt_nl; - + + *os << be_uidt_nl; + //------>>> // STEP 2: Generate the body == diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype_fwd/cdr_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype_fwd/cdr_op_ch.cpp index 6f2387900f4..80468d7193f 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype_fwd/cdr_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype_fwd/cdr_op_ch.cpp @@ -16,7 +16,7 @@ // // = AUTHOR // Boris Kolpackov <bosk@ipmce.ru> -// base on code from Torsten Kuepper +// base on code from Torsten Kuepper // based on code from Aniruddha Gokhale & Carlos O'Ryan (cdr_op_ci.cpp) // // ================================================================ @@ -70,7 +70,7 @@ be_visitor_valuetype_fwd_cdr_op_ch::visit_valuetype_fwd ( ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_cdr_op_ch::" "visit_valuetype - " - "codegen for helper functions failed\n"), -1); + "codegen for helper functions failed\n"), -1); } TAO_OutStream *os = this->ctx_->stream (); @@ -78,12 +78,12 @@ be_visitor_valuetype_fwd_cdr_op_ch::visit_valuetype_fwd ( // generate the CDR << and >> operator declarations (prototypes) //@@ Boris: Can I move this to be_valuetype? (as with _var, _out, etc?) - - *os << be_global->stub_export_macro () - << "CORBA::Boolean operator<< (TAO_OutputCDR &, const " + + *os << be_global->stub_export_macro () + << "CORBA::Boolean operator<< (TAO_OutputCDR &, const " << node->full_name () << " *);" << be_nl; - - *os << be_global->stub_export_macro () + + *os << be_global->stub_export_macro () << "CORBA::Boolean operator>> (TAO_InputCDR &, " << node->full_name () << " *&);" << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype_fwd/cdr_op_ci.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype_fwd/cdr_op_ci.cpp index 917d0ce7a11..c498b75b902 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype_fwd/cdr_op_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype_fwd/cdr_op_ci.cpp @@ -71,21 +71,21 @@ be_visitor_valuetype_fwd_cdr_op_ci::visit_valuetype_fwd ( ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_cdr_op_ch::" "visit_valuetype - " - "codegen for helper functions failed\n"), -1); + "codegen for helper functions failed\n"), -1); } - + TAO_OutStream *os = this->ctx_->stream (); // generate the CDR << and >> operator declarations (prototypes) //@@ Boris: Can I move this to be_valuetype? (as with _var, _out, etc?) - + //This is just declaration so no ACE_INLINE - *os << be_global->stub_export_macro () - << "CORBA::Boolean operator<< (TAO_OutputCDR &, const " + *os << be_global->stub_export_macro () + << "CORBA::Boolean operator<< (TAO_OutputCDR &, const " << node->full_name () << " *);" << be_nl; - *os << be_global->stub_export_macro () + *os << be_global->stub_export_macro () << "CORBA::Boolean operator>> (TAO_InputCDR &, " << node->full_name () << " *&);" << be_nl; diff --git a/TAO/TAO_IDL/be/be_visitor_valuetype_fwd/valuetype_fwd_ch.cpp b/TAO/TAO_IDL/be/be_visitor_valuetype_fwd/valuetype_fwd_ch.cpp index 704ab42516b..01a7497e552 100644 --- a/TAO/TAO_IDL/be/be_visitor_valuetype_fwd/valuetype_fwd_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_valuetype_fwd/valuetype_fwd_ch.cpp @@ -66,7 +66,7 @@ be_visitor_valuetype_fwd_ch::visit_valuetype_fwd (be_valuetype_fwd *node) *os << "class " << node->local_name () << ";" << be_nl; // Generate _ptr declaration - os->gen_ifdef_macro (node->flat_name (), "_ptr"); + os->gen_ifdef_macro (node->flat_name (), "_ptr"); *os << "typedef " << node->local_name () << " *" << node->local_name () << "_ptr;" << be_nl; @@ -82,7 +82,7 @@ be_visitor_valuetype_fwd_ch::visit_valuetype_fwd (be_valuetype_fwd *node) ACE_ERROR_RETURN ((LM_ERROR, "(%N:%l) be_visitor_valuetype_ch::" "visit_valuetype - " - "codegen for _var failed\n"), + "codegen for _var failed\n"), -1); } diff --git a/TAO/TAO_IDL/be_include/be.h b/TAO/TAO_IDL/be_include/be.h index 888cec56aef..732cfa46729 100644 --- a/TAO/TAO_IDL/be_include/be.h +++ b/TAO/TAO_IDL/be_include/be.h @@ -98,7 +98,7 @@ trademarks or registered trademarks of Sun Microsystems, Inc. #include "be_generator.h" // class BE_generator #include "be_global.h" // global data for back end -#include "be_extern.h" // pointer to global BE +#include "be_extern.h" // pointer to global BE // data object #include "be_type.h" diff --git a/TAO/TAO_IDL/be_include/be_argument.h b/TAO/TAO_IDL/be_include/be_argument.h index 4096eab1b35..8ecc9fa638f 100644 --- a/TAO/TAO_IDL/be_include/be_argument.h +++ b/TAO/TAO_IDL/be_include/be_argument.h @@ -36,8 +36,8 @@ public: be_argument (void); // Constructor. - be_argument (AST_Argument::Direction d, - AST_Type *ft, + be_argument (AST_Argument::Direction d, + AST_Type *ft, UTL_ScopedName *n); // Visiting. diff --git a/TAO/TAO_IDL/be_include/be_array.h b/TAO/TAO_IDL/be_include/be_array.h index f009ff90bc6..a70776479fa 100644 --- a/TAO/TAO_IDL/be_include/be_array.h +++ b/TAO/TAO_IDL/be_include/be_array.h @@ -45,7 +45,7 @@ public: ~be_array (void); - virtual int gen_dimensions (TAO_OutStream *os, + virtual int gen_dimensions (TAO_OutStream *os, unsigned short slice = 0); // Generate dimensions. If slice == 1, generate dimensions for the slice // definition. diff --git a/TAO/TAO_IDL/be_include/be_constant.h b/TAO/TAO_IDL/be_include/be_constant.h index f113e7c9a83..64486bc999c 100644 --- a/TAO/TAO_IDL/be_include/be_constant.h +++ b/TAO/TAO_IDL/be_include/be_constant.h @@ -29,7 +29,7 @@ class be_visitor; -class be_constant : public virtual AST_Constant, +class be_constant : public virtual AST_Constant, public virtual be_decl { public: diff --git a/TAO/TAO_IDL/be_include/be_decl.h b/TAO/TAO_IDL/be_include/be_decl.h index a43f0d9b9f3..a5c5191097c 100644 --- a/TAO/TAO_IDL/be_include/be_decl.h +++ b/TAO/TAO_IDL/be_include/be_decl.h @@ -48,7 +48,7 @@ public: be_decl (void); // Default constructor. - be_decl (AST_Decl::NodeType type, + be_decl (AST_Decl::NodeType type, UTL_ScopedName *n); // Constructor that sets the node type. diff --git a/TAO/TAO_IDL/be_include/be_enum_val.h b/TAO/TAO_IDL/be_include/be_enum_val.h index 12d4947c3f2..36040c96752 100644 --- a/TAO/TAO_IDL/be_include/be_enum_val.h +++ b/TAO/TAO_IDL/be_include/be_enum_val.h @@ -35,7 +35,7 @@ public: be_enum_val (void); // Default constructor. - be_enum_val (unsigned long v, + be_enum_val (unsigned long v, UTL_ScopedName *n); // Constructor. diff --git a/TAO/TAO_IDL/be_include/be_expression.h b/TAO/TAO_IDL/be_include/be_expression.h index 1c2350898b5..fd923c006cf 100644 --- a/TAO/TAO_IDL/be_include/be_expression.h +++ b/TAO/TAO_IDL/be_include/be_expression.h @@ -32,7 +32,7 @@ public: // Constructors. be_expression (UTL_ScopedName *n); - be_expression (AST_Expression *b, + be_expression (AST_Expression *b, AST_Expression::ExprType t); be_expression (AST_Expression::ExprComb c, @@ -41,7 +41,7 @@ public: be_expression (long l); - be_expression (long l, + be_expression (long l, AST_Expression::ExprType t); be_expression (unsigned long l); diff --git a/TAO/TAO_IDL/be_include/be_field.h b/TAO/TAO_IDL/be_include/be_field.h index 33fbc73148a..1c9a8dae93d 100644 --- a/TAO/TAO_IDL/be_include/be_field.h +++ b/TAO/TAO_IDL/be_include/be_field.h @@ -34,8 +34,8 @@ public: be_field (void); // Default constructor. - be_field (AST_Type *ft, - UTL_ScopedName *n, + be_field (AST_Type *ft, + UTL_ScopedName *n, Visibility vis = vis_NA); // Constructor. diff --git a/TAO/TAO_IDL/be_include/be_generator.h b/TAO/TAO_IDL/be_include/be_generator.h index 4b3f036d8b6..1ab9f79b753 100644 --- a/TAO/TAO_IDL/be_include/be_generator.h +++ b/TAO/TAO_IDL/be_include/be_generator.h @@ -74,7 +74,7 @@ trademarks or registered trademarks of Sun Microsystems, Inc. #include "TAO_IDL_BE_Export.h" -class TAO_IDL_BE_Export be_generator : public AST_Generator +class TAO_IDL_BE_Export be_generator : public AST_Generator { public: // Create a node representing a module which is the root of an AST made @@ -126,7 +126,7 @@ public: idl_bool abstract); virtual AST_Field *create_field (AST_Type *ft, UTL_ScopedName *n, - AST_Field::Visibility vis = + AST_Field::Visibility vis = AST_Field::vis_NA); virtual AST_Argument *create_argument (AST_Argument::Direction d, diff --git a/TAO/TAO_IDL/be_include/be_interface_fwd.h b/TAO/TAO_IDL/be_include/be_interface_fwd.h index d99bae65eb4..58f8a357795 100644 --- a/TAO/TAO_IDL/be_include/be_interface_fwd.h +++ b/TAO/TAO_IDL/be_include/be_interface_fwd.h @@ -34,14 +34,14 @@ class be_interface_fwd : public virtual AST_InterfaceFwd, { // =TITLE // be_interface_fwd - // + // // =DESCRIPTION // Extensions to the AST_Interface_Fwd class public: be_interface_fwd (void); // Default constructor. - be_interface_fwd (AST_Interface *dummy, + be_interface_fwd (AST_Interface *dummy, UTL_ScopedName *n); // Constructor. diff --git a/TAO/TAO_IDL/be_include/be_interface_strategy.h b/TAO/TAO_IDL/be_include/be_interface_strategy.h index b415accf388..fb726ff107c 100644 --- a/TAO/TAO_IDL/be_include/be_interface_strategy.h +++ b/TAO/TAO_IDL/be_include/be_interface_strategy.h @@ -112,21 +112,21 @@ public: virtual const char *full_strategized_proxy_broker_name (void) = 0; // retrieve the fully qualified name of the strategized proxy broker // implementation. - + virtual const char *client_scope (void) = 0; - // Return the scope that encloses the client related + // Return the scope that encloses the client related // interface. virtual const char *flat_client_scope (void) = 0; - // Return the "flat" version of the scope + // Return the "flat" version of the scope //that encloses the interface. - + virtual const char *server_scope (void) = 0; - // Return the scope that encloses the server related + // Return the scope that encloses the server related // interface. virtual const char *flat_server_scope (void) = 0; - // Return the "flat" version of the scope + // Return the "flat" version of the scope //that encloses the interface. @@ -283,19 +283,19 @@ public: // implementation. virtual const char *client_scope (void); - // Return the scope that encloses the client related + // Return the scope that encloses the client related // interface. virtual const char *flat_client_scope (void); - // Return the "flat" version of the scope + // Return the "flat" version of the scope //that encloses the interface. - + virtual const char *server_scope (void); - // Return the scope that encloses the server related + // Return the scope that encloses the server related // interface. virtual const char *flat_server_scope (void); - // Return the "flat" version of the scope + // Return the "flat" version of the scope //that encloses the interface. @@ -358,7 +358,7 @@ protected: char *client_scope_; char *flat_client_scope_; - + char *server_scope_; char *flat_server_scope_; }; diff --git a/TAO/TAO_IDL/be_include/be_native.h b/TAO/TAO_IDL/be_include/be_native.h index 78d0602569e..01b581413e7 100644 --- a/TAO/TAO_IDL/be_include/be_native.h +++ b/TAO/TAO_IDL/be_include/be_native.h @@ -28,7 +28,7 @@ class be_visitor; // Representation of "native" IDL type added by the POA spec. -class be_native : public virtual AST_Native, +class be_native : public virtual AST_Native, public virtual be_type { public: diff --git a/TAO/TAO_IDL/be_include/be_string.h b/TAO/TAO_IDL/be_include/be_string.h index a081bc75370..236cb1bc64c 100644 --- a/TAO/TAO_IDL/be_include/be_string.h +++ b/TAO/TAO_IDL/be_include/be_string.h @@ -38,7 +38,7 @@ public: be_string (AST_Expression *v); // Constructor. - be_string (AST_Expression *v, + be_string (AST_Expression *v, long wide); // Constructor. diff --git a/TAO/TAO_IDL/be_include/be_type.h b/TAO/TAO_IDL/be_include/be_type.h index 747dac1ba69..53981f7c67a 100644 --- a/TAO/TAO_IDL/be_include/be_type.h +++ b/TAO/TAO_IDL/be_include/be_type.h @@ -34,7 +34,7 @@ public: be_type (void); // Default constructor. - be_type (AST_Decl::NodeType nt, + be_type (AST_Decl::NodeType nt, UTL_ScopedName *n); // Constructor. @@ -74,8 +74,8 @@ public: const char *prefix = 0); // Type name of a node used when generating declarations. - virtual const char *nested_sp_type_name (be_decl *use_scope, - const char *suffix = 0, + virtual const char *nested_sp_type_name (be_decl *use_scope, + const char *suffix = 0, const char *prefix = 0); // Type name of a node used when generating declarations for smart // proxies. @@ -102,8 +102,8 @@ protected: virtual const char *nested_name (const char* local_name, const char* full_name, - be_decl *use_scope, - const char *suffix, + be_decl *use_scope, + const char *suffix, const char *prefix); // Type name of a node used when generating declarations. diff --git a/TAO/TAO_IDL/be_include/be_union_branch.h b/TAO/TAO_IDL/be_include/be_union_branch.h index fbe5d32cdb0..d98f1519ec6 100644 --- a/TAO/TAO_IDL/be_include/be_union_branch.h +++ b/TAO/TAO_IDL/be_include/be_union_branch.h @@ -36,12 +36,12 @@ public: be_union_branch (void); // default constructor. - be_union_branch (UTL_LabelList *ll, - AST_Type *ft, + be_union_branch (UTL_LabelList *ll, + AST_Type *ft, UTL_ScopedName *n); // Constructor. - int gen_label_value (TAO_OutStream *os, + int gen_label_value (TAO_OutStream *os, unsigned long index = 0); // Generate the label value (as in a switch/case statement). diff --git a/TAO/TAO_IDL/be_include/be_union_label.h b/TAO/TAO_IDL/be_include/be_union_label.h index f2670e882a2..6093f7191a8 100644 --- a/TAO/TAO_IDL/be_include/be_union_label.h +++ b/TAO/TAO_IDL/be_include/be_union_label.h @@ -13,7 +13,7 @@ public: be_union_label (void); // Default constructor. - be_union_label (AST_UnionLabel::UnionLabel ul, + be_union_label (AST_UnionLabel::UnionLabel ul, AST_Expression *v); // Constructor. diff --git a/TAO/TAO_IDL/be_include/be_valuetype.h b/TAO/TAO_IDL/be_include/be_valuetype.h index 1457eb94f9a..cb01a210ee2 100644 --- a/TAO/TAO_IDL/be_include/be_valuetype.h +++ b/TAO/TAO_IDL/be_include/be_valuetype.h @@ -35,8 +35,8 @@ public: be_valuetype (void); // Default constructor. - be_valuetype (UTL_ScopedName *n, - AST_Interface **ih, + be_valuetype (UTL_ScopedName *n, + AST_Interface **ih, long nih, idl_bool set_abstract = 0); // Constructor that sets its scoped name <n>, a list of inherited valuetypes @@ -68,14 +68,14 @@ public: virtual int gen_helper_header (char *local_name = 0, char *full_name = 0); // Generate the helper functions definition. - + virtual int gen_helper_inline (char *local_name = 0, char *full_name = 0); - // Generate the helper functions inline implementation. + // Generate the helper functions inline implementation. virtual int gen_helper_stubs (char *local_name = 0, char *full_name = 0); - // Generate the helper functions implementation. + // Generate the helper functions implementation. const char *full_obv_skel_name (void); // Retrieve the fully scoped skel class name. diff --git a/TAO/TAO_IDL/be_include/be_valuetype_fwd.h b/TAO/TAO_IDL/be_include/be_valuetype_fwd.h index 433edc98b42..61f483a8892 100644 --- a/TAO/TAO_IDL/be_include/be_valuetype_fwd.h +++ b/TAO/TAO_IDL/be_include/be_valuetype_fwd.h @@ -37,7 +37,7 @@ public: be_valuetype_fwd (void); // Default constructor. - be_valuetype_fwd (AST_Interface *dummy, + be_valuetype_fwd (AST_Interface *dummy, UTL_ScopedName *n); // Constructor. diff --git a/TAO/TAO_IDL/be_include/be_visitor_amh_pre_proc.h b/TAO/TAO_IDL/be_include/be_visitor_amh_pre_proc.h index cb8f2e48a61..4bd45ae7c08 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_amh_pre_proc.h +++ b/TAO/TAO_IDL/be_include/be_visitor_amh_pre_proc.h @@ -71,11 +71,18 @@ class be_visitor_amh_pre_proc : public be_visitor_scope int create_amh_operation (be_operation *node, be_interface *amh_class); - /// Create the reponse handler interface - be_interface *create_response_handler (be_interface *node, - be_valuetype *excep_holder); + /// Create the skeleton reponse handler interface + be_interface *create_skeleton_response_handler (be_interface *node); - /// Create the exception holder valuetype + /// Create the client reponse handler interface + be_interface *create_client_response_handler (be_interface *node); //, + //be_valuetype *excep_holder); + + /// method to add memebers to the response handler interfaces + int add_rh_node_members ( be_interface *node, + be_interface *response_handler); + + /// Create the exception holder valuetype be_valuetype *create_exception_holder (be_interface *node); /// Create a method with "sendc_" prepended, if for_arguments diff --git a/TAO/TAO_IDL/be_include/be_visitor_ami_pre_proc.h b/TAO/TAO_IDL/be_include/be_visitor_ami_pre_proc.h index 64da323713f..53d98fdf0ff 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_ami_pre_proc.h +++ b/TAO/TAO_IDL/be_include/be_visitor_ami_pre_proc.h @@ -45,12 +45,12 @@ class be_visitor_ami_pre_proc : public be_visitor_scope // Adds AMI implied IDL code to the AST // private: - typedef AST_Interface *AST_Interface_ptr; + typedef AST_Interface *AST_Interface_ptr; typedef enum { NORMAL, GET_OPERATION, - SET_OPERATION + SET_OPERATION } Operation_Kind; public: @@ -80,18 +80,18 @@ private: // Creates a raise operation from node and inserts it in // excep_holder, while obeying if it is a normal operation // or a set or get attribute. - + be_interface *create_reply_handler (be_interface *node, be_valuetype *excep_holder); // create the reply handler interface be_valuetype *create_exception_holder (be_interface *node); // create the exception holder valuetype - + be_operation *create_sendc_operation (be_operation *node, int for_arguments); // create a method with "sendc_" prepended, if for_arguments - // equals one the sendc operation contains also the + // equals one the sendc operation contains also the // object reference to the reply handler as the first argument, // but this should not be marhaled, therefor we need the switch @@ -105,7 +105,7 @@ private: // create an operation with only the OUT and INOUT arguments int visit_scope (be_scope *node); - // specialized visit_scope + // specialized visit_scope int generate_name (ACE_CString &desintation, const char *prefix, diff --git a/TAO/TAO_IDL/be_include/be_visitor_interface/interface_ih.h b/TAO/TAO_IDL/be_include/be_visitor_interface/interface_ih.h index c5ade1dc812..f553c5581c1 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_interface/interface_ih.h +++ b/TAO/TAO_IDL/be_include/be_visitor_interface/interface_ih.h @@ -46,7 +46,7 @@ public: static int method_helper (be_interface *derived, be_interface *node, TAO_OutStream *os); - + }; diff --git a/TAO/TAO_IDL/be_include/be_visitor_interface/interface_is.h b/TAO/TAO_IDL/be_include/be_visitor_interface/interface_is.h index 9237e860152..20279502967 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_interface/interface_is.h +++ b/TAO/TAO_IDL/be_include/be_visitor_interface/interface_is.h @@ -39,7 +39,7 @@ public: virtual int visit_interface (be_interface *node); // set the right context and make a visitor - + static int method_helper (be_interface *derived, be_interface *node, diff --git a/TAO/TAO_IDL/be_include/be_visitor_interface_fwd/any_op_ch.h b/TAO/TAO_IDL/be_include/be_visitor_interface_fwd/any_op_ch.h index 9cf98aa549d..2c53d3aabd6 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_interface_fwd/any_op_ch.h +++ b/TAO/TAO_IDL/be_include/be_visitor_interface_fwd/any_op_ch.h @@ -29,7 +29,7 @@ class be_visitor_interface_fwd_any_op_ch : public be_visitor_decl // be_visitor_interface_fwd_any_op_ch // // = DESCRIPTION - // This is a concrete visitor for forward declared interfaces that + // This is a concrete visitor for forward declared interfaces that // generates the Any operator declaration. // diff --git a/TAO/TAO_IDL/be_include/be_visitor_interface_fwd/cdr_op_ch.h b/TAO/TAO_IDL/be_include/be_visitor_interface_fwd/cdr_op_ch.h index 6c310ac62a7..4befc6aca9e 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_interface_fwd/cdr_op_ch.h +++ b/TAO/TAO_IDL/be_include/be_visitor_interface_fwd/cdr_op_ch.h @@ -31,7 +31,7 @@ class be_visitor_interface_fwd_cdr_op_ch : public be_visitor_decl // be_visitor_interface_fwd_cdr_op_ch // // = DESCRIPTION - // This is a concrete visitor for forward declared interface that generates + // This is a concrete visitor for forward declared interface that generates // the CDR operator declarations, if the node is not later defined. // diff --git a/TAO/TAO_IDL/be_include/be_visitor_interface_fwd/cdr_op_ci.h b/TAO/TAO_IDL/be_include/be_visitor_interface_fwd/cdr_op_ci.h index 3e7953ee80f..4b1449eeae0 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_interface_fwd/cdr_op_ci.h +++ b/TAO/TAO_IDL/be_include/be_visitor_interface_fwd/cdr_op_ci.h @@ -15,7 +15,7 @@ // Concrete visitor for the interface_fwd class // This one provides code generation for the CDR operators // (actually just their declarations) for the interface forward -// declaration in the client inline. +// declaration in the client inline. // // = AUTHOR // Aniruddha Gokhale & Carlos O'Ryan diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/amh_ss.h b/TAO/TAO_IDL/be_include/be_visitor_operation/amh_ss.h index fd2cd4e5e86..62ae8166ef1 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_operation/amh_ss.h +++ b/TAO/TAO_IDL/be_include/be_visitor_operation/amh_ss.h @@ -14,20 +14,22 @@ #define AMH_OPERATION_SS_H /** -* @class be_visitor_operation_amh_ss -* -* @brief This is a concrete visitor to generate the server source for -* AMH operations -*/ + * @class be_visitor_operation_amh_ss + * + * @brief This is a concrete visitor to generate the server source for + * AMH operations + */ class be_visitor_amh_operation_ss : public be_visitor_operation { public: be_visitor_amh_operation_ss (be_visitor_context *ctx); - + ~be_visitor_amh_operation_ss (void); - + virtual int visit_operation (be_operation *node); + protected: + virtual int demarshal_params (be_operation *node); }; #endif /* AMH_OPERATION_SS_H */ @@ -37,20 +39,20 @@ class be_visitor_amh_operation_ss : public be_visitor_operation #define AMH_RH_OPERATION_SS_H /** -* @class be_visitor_operation_amh_rh_ss -* -* @brief This is a concrete visitor to generate the server source for -* AMH operations -*/ + * @class be_visitor_operation_amh_rh_ss + * + * @brief This is a concrete visitor to generate the server source for + * AMH operations + */ class be_visitor_amh_rh_operation_ss : public be_visitor_operation { public: be_visitor_amh_rh_operation_ss (be_visitor_context *ctx); - + ~be_visitor_amh_rh_operation_ss (void); - + virtual int visit_operation (be_operation *node); - + }; #endif /* AMH_RH_OPERATION_SS_H */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/ami_ch.h b/TAO/TAO_IDL/be_include/be_visitor_operation/ami_ch.h index 2377916168d..2c962022eca 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_operation/ami_ch.h +++ b/TAO/TAO_IDL/be_include/be_visitor_operation/ami_ch.h @@ -12,7 +12,7 @@ // // = DESCRIPTION // Visitor for generating AMI stub code for IDL operations in -// client header. +// client header. // // = AUTHOR // Alexander Babu Arulanthu <alex@cs.wustl.edu> diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/ami_handler_reply_stub_operation_ch.h b/TAO/TAO_IDL/be_include/be_visitor_operation/ami_handler_reply_stub_operation_ch.h index ce80109e16f..2160d14f007 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_operation/ami_handler_reply_stub_operation_ch.h +++ b/TAO/TAO_IDL/be_include/be_visitor_operation/ami_handler_reply_stub_operation_ch.h @@ -12,11 +12,11 @@ // // = DESCRIPTION // Visitor for generating code for AMI Handler call back operations -// in client header. +// in client header. // // = AUTHOR // Aniruddha Gokhale and Alexander Babu Arulanthu -// <alex@cs.wustl.edu> +// <alex@cs.wustl.edu> // // ============================================================================ diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/direct_proxy_impl_ss.h b/TAO/TAO_IDL/be_include/be_visitor_operation/direct_proxy_impl_ss.h index e1d8c5269fc..ab46cfb33c8 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_operation/direct_proxy_impl_ss.h +++ b/TAO/TAO_IDL/be_include/be_visitor_operation/direct_proxy_impl_ss.h @@ -18,13 +18,13 @@ // ============================================================================ #ifndef _BE_VISITOR_OPERATION_DIRECT_PROXY_IMPL_SS_H_ -#define _BE_VISITOR_OPERATION_DIRECT_PROXY_IMPL_SS_H_ +#define _BE_VISITOR_OPERATION_DIRECT_PROXY_IMPL_SS_H_ class be_visitor_operation_direct_proxy_impl_ss : public be_visitor_scope { // // = TITLE - // be_visitor_operation_direct_proxy_impl_ss + // be_visitor_operation_direct_proxy_impl_ss // // = DESCRIPTION // This visitor generates the code for the diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/interceptors_exceptlist.h b/TAO/TAO_IDL/be_include/be_visitor_operation/interceptors_exceptlist.h index 56c98047093..bd9b1aac9b0 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_operation/interceptors_exceptlist.h +++ b/TAO/TAO_IDL/be_include/be_visitor_operation/interceptors_exceptlist.h @@ -43,7 +43,7 @@ public: // visit operation. protected: virtual int gen_exceptlist (be_operation *node); - + }; diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/inv_arglist.h b/TAO/TAO_IDL/be_include/be_visitor_operation/inv_arglist.h index fdc1fc6e3aa..3b1cb7d4db3 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_operation/inv_arglist.h +++ b/TAO/TAO_IDL/be_include/be_visitor_operation/inv_arglist.h @@ -10,7 +10,7 @@ // // = DESCRIPTION // Visitor for generating signature needed to invoke a given -// operation. +// operation. // // = AUTHOR // Angelo Corsaro diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/operation_cs.h b/TAO/TAO_IDL/be_include/be_visitor_operation/operation_cs.h index 968738c6e2c..d59fa55d7ec 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_operation/operation_cs.h +++ b/TAO/TAO_IDL/be_include/be_visitor_operation/operation_cs.h @@ -47,11 +47,11 @@ public: virtual int visit_argument (be_argument *node); // visit argument to generate ParamData entries - + // =helper virtual int post_process (be_decl *); // stuff to output after every member of the scope is handled - + }; #endif /* _BE_VISITOR_OPERATION_OPERATION_CS_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/operation_ss.h b/TAO/TAO_IDL/be_include/be_visitor_operation/operation_ss.h index 1b73adb8edd..eec9632fe95 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_operation/operation_ss.h +++ b/TAO/TAO_IDL/be_include/be_visitor_operation/operation_ss.h @@ -53,11 +53,11 @@ public: virtual int gen_pre_skel_info (be_operation *node); // generate any pre skeleton code info - virtual int gen_demarshal_params (be_operation *node, + virtual int gen_demarshal_params (be_operation *node, be_type *bt); // generate code for demarshaling incoming parameters - virtual int gen_marshal_params (be_operation *node, + virtual int gen_marshal_params (be_operation *node, be_type *bt); // generate code for marshaling outgoing parameters diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/rettype_pre_invoke_cs.h b/TAO/TAO_IDL/be_include/be_visitor_operation/rettype_pre_invoke_cs.h index 3ffbc85229c..67cb9d70bfb 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_operation/rettype_pre_invoke_cs.h +++ b/TAO/TAO_IDL/be_include/be_visitor_operation/rettype_pre_invoke_cs.h @@ -34,7 +34,7 @@ class be_visitor_operation_rettype_pre_invoke_cs : public be_visitor_decl // be_visitor_operation_rettype_pre_invoke_cs // // = DESCRIPTION - // This is a visitor to generate any pre processing before + // This is a visitor to generate any pre processing before // the invocation is made. // public: diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/smart_proxy_cs.h b/TAO/TAO_IDL/be_include/be_visitor_operation/smart_proxy_cs.h index 8451d70ad07..5e63484c0c8 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_operation/smart_proxy_cs.h +++ b/TAO/TAO_IDL/be_include/be_visitor_operation/smart_proxy_cs.h @@ -42,12 +42,12 @@ public: virtual int visit_operation (be_operation *node); // visit operation. - + virtual int gen_invoke (be_visitor_context &ctx, be_operation *node); // A helper method to generate operation invocation code. virtual int void_return_type (be_type *bt); - // is my return type void? + // is my return type void? }; #endif /* _BE_VISITOR_OPERATION_OPERATION_SMART_PROXY_CS_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_operation/thru_poa_proxy_impl_ss.h b/TAO/TAO_IDL/be_include/be_visitor_operation/thru_poa_proxy_impl_ss.h index e69394fbabf..e90cf91461b 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_operation/thru_poa_proxy_impl_ss.h +++ b/TAO/TAO_IDL/be_include/be_visitor_operation/thru_poa_proxy_impl_ss.h @@ -44,8 +44,8 @@ public: virtual int visit_operation (be_operation *node); // visit operation_thru_poa_proxy_impl. - - + + virtual int gen_invoke (be_visitor_context &ctx, be_operation *node); // A helper method to generate operation invocation code. diff --git a/TAO/TAO_IDL/be_include/be_visitor_root/root_sth.h b/TAO/TAO_IDL/be_include/be_visitor_root/root_sth.h index e99caffd6a6..359091eaa4a 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_root/root_sth.h +++ b/TAO/TAO_IDL/be_include/be_visitor_root/root_sth.h @@ -31,7 +31,7 @@ class be_visitor_root_sth : public be_visitor_root // be_visitor_root_sth // // = DESCRIPTION - // This is a concrete visitor to generate the server template + // This is a concrete visitor to generate the server template // header for root. // // diff --git a/TAO/TAO_IDL/be_include/be_visitor_valuetype/ami_exception_holder_ch.h b/TAO/TAO_IDL/be_include/be_visitor_valuetype/ami_exception_holder_ch.h index 097703d4e8c..a23c7e444fb 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_valuetype/ami_exception_holder_ch.h +++ b/TAO/TAO_IDL/be_include/be_visitor_valuetype/ami_exception_holder_ch.h @@ -16,7 +16,7 @@ // in client headers. // // = AUTHOR -// Michael Kircher <Michael.Kircher@mchp.siemens.de> +// Michael Kircher <Michael.Kircher@mchp.siemens.de> // // ============================================================================ diff --git a/TAO/TAO_IDL/be_include/be_visitor_valuetype/valuetype.h b/TAO/TAO_IDL/be_include/be_visitor_valuetype/valuetype.h index 84196336afe..fdb74a70d9f 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_valuetype/valuetype.h +++ b/TAO/TAO_IDL/be_include/be_visitor_valuetype/valuetype.h @@ -105,7 +105,7 @@ protected: // In this case we don't need to bother about factory. // // (2) There are no (operations or initializers) (i.e. only state - // members) then we need a concrete type-specific factory + // members) then we need a concrete type-specific factory // class whose create_for_unmarshal creates OBV_ class. // // (3) There is at least one operation and at least one initializer. diff --git a/TAO/TAO_IDL/be_include/be_visitor_valuetype/valuetype_init.h b/TAO/TAO_IDL/be_include/be_visitor_valuetype/valuetype_init.h index b507ccf5f2d..9a3deef7f5b 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_valuetype/valuetype_init.h +++ b/TAO/TAO_IDL/be_include/be_visitor_valuetype/valuetype_init.h @@ -13,11 +13,11 @@ // = DESCRIPTION // Coomon visitor for the Valuetype node. // This one provides code generation for valuetype factory construct. -// +// // // = AUTHOR // Boris Kolpackov <bosk@ipmce.ru> -// +// // // ============================================================================ @@ -74,7 +74,7 @@ public: virtual int visit_factory (be_factory *node); // visit a factory - + void begin_public (void); void begin_private (void); }; diff --git a/TAO/TAO_IDL/be_include/be_visitor_valuetype/valuetype_init_ch.h b/TAO/TAO_IDL/be_include/be_visitor_valuetype/valuetype_init_ch.h index d38e9ab8240..509980771a2 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_valuetype/valuetype_init_ch.h +++ b/TAO/TAO_IDL/be_include/be_visitor_valuetype/valuetype_init_ch.h @@ -12,12 +12,12 @@ // // = DESCRIPTION // Concrete visitor for the Valuetype node. -// This one provides code generation for valuetype factory +// This one provides code generation for valuetype factory // in the (client) header. // // = AUTHOR // Boris Kolpackov <bosk@ipmce.ru> -// +// // // ============================================================================ @@ -32,7 +32,7 @@ class be_visitor_valuetype_init_ch : public be_visitor_valuetype_init // be_visitor_valuetype_init_ch // // = DESCRIPTION - // This is a concrete visitor to generate valuetype factory in + // This is a concrete visitor to generate valuetype factory in // the client header // // diff --git a/TAO/TAO_IDL/be_include/be_visitor_valuetype/valuetype_init_ci.h b/TAO/TAO_IDL/be_include/be_visitor_valuetype/valuetype_init_ci.h index dbb81438b8d..49632f5217d 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_valuetype/valuetype_init_ci.h +++ b/TAO/TAO_IDL/be_include/be_visitor_valuetype/valuetype_init_ci.h @@ -12,12 +12,12 @@ // // = DESCRIPTION // Concrete visitor for the Valuetype node. -// This one provides code generation for valuetype factory +// This one provides code generation for valuetype factory // in the (client) inline. // // = AUTHOR // Boris Kolpackov <bosk@ipmce.ru> -// +// // // ============================================================================ @@ -32,7 +32,7 @@ class be_visitor_valuetype_init_ci : public be_visitor_valuetype_init // be_visitor_valuetype_init_ci // // = DESCRIPTION - // This is a concrete visitor to generate valuetype factory in + // This is a concrete visitor to generate valuetype factory in // the client header // // @@ -46,7 +46,7 @@ public: virtual int visit_valuetype (be_valuetype *node); virtual int visit_factory (be_factory *node); - // visit a factory + // visit a factory }; #endif /* _BE_VALUETYPE_VALUETYPE_INIT_CI_H_ */ diff --git a/TAO/TAO_IDL/be_include/be_visitor_valuetype/valuetype_init_cs.h b/TAO/TAO_IDL/be_include/be_visitor_valuetype/valuetype_init_cs.h index aa7544f521c..87584641443 100644 --- a/TAO/TAO_IDL/be_include/be_visitor_valuetype/valuetype_init_cs.h +++ b/TAO/TAO_IDL/be_include/be_visitor_valuetype/valuetype_init_cs.h @@ -12,12 +12,12 @@ // // = DESCRIPTION // Concrete visitor for the Valuetype node. -// This one provides code generation for valuetype factory +// This one provides code generation for valuetype factory // in the (client) source. // // = AUTHOR // Boris Kolpackov <bosk@ipmce.ru> -// +// // // ============================================================================ @@ -32,7 +32,7 @@ class be_visitor_valuetype_init_cs : public be_visitor_valuetype_init // be_visitor_valuetype_init_cs // // = DESCRIPTION - // This is a concrete visitor to generate valuetype factory in + // This is a concrete visitor to generate valuetype factory in // the client header // // diff --git a/TAO/TAO_IDL/driver/drv_args.cpp b/TAO/TAO_IDL/driver/drv_args.cpp index 85c40b3a79f..6a3fd064770 100644 --- a/TAO/TAO_IDL/driver/drv_args.cpp +++ b/TAO/TAO_IDL/driver/drv_args.cpp @@ -91,8 +91,8 @@ DRV_prep_cpp_arg (char *s) newarg[0] = '\0'; - for (farg = ACE_OS::strtok (s, ","); - farg != NULL; + for (farg = ACE_OS::strtok (s, ","); + farg != NULL; farg = ACE_OS::strtok (0, ",")) { ACE_OS::strcat (newarg, farg); @@ -103,7 +103,7 @@ DRV_prep_cpp_arg (char *s) // Prepare an argument for a BE void -DRV_prep_be_arg (char *s, +DRV_prep_be_arg (char *s, idl_bool) { const char arg_macro[] = "export_macro="; @@ -664,7 +664,7 @@ DRV_parse_args (long ac, char **av) { ACE_ERROR ((LM_ERROR, ACE_TEXT ("%s: unknown operation lookup <%s>\n"), - av[0], + av[0], av[i+1])); } @@ -773,13 +773,13 @@ DRV_parse_args (long ac, char **av) idl_global->append_idl_flag (av[i+1]); ACE_NEW (buffer, - char[ACE_OS::strlen (av[i]) - + ACE_OS::strlen (av[i + 1]) + char[ACE_OS::strlen (av[i]) + + ACE_OS::strlen (av[i + 1]) + 2]); - ACE_OS::sprintf (buffer, - "%s%s", - av[i], + ACE_OS::sprintf (buffer, + "%s%s", + av[i], av[i+1]); DRV_cpp_putarg (buffer); diff --git a/TAO/TAO_IDL/driver/drv_init.cpp b/TAO/TAO_IDL/driver/drv_init.cpp index 5c845f7db5f..f0ad80e2d84 100644 --- a/TAO/TAO_IDL/driver/drv_init.cpp +++ b/TAO/TAO_IDL/driver/drv_init.cpp @@ -53,8 +53,8 @@ Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR Sun, Sun Microsystems and the Sun logo are trademarks or registered trademarks of Sun Microsystems, Inc. -SunSoft, Inc. -2550 Garcia Avenue +SunSoft, Inc. +2550 Garcia Avenue Mountain View, California 94043 NOTE: @@ -108,8 +108,8 @@ DRV_init (void) #endif /* TAO_IDL_PREPROCESSOR */ char local_escapes[LOCAL_ESCAPES_BUFFER_SIZE]; - ACE_OS::memset (&local_escapes, - 0, + ACE_OS::memset (&local_escapes, + 0, LOCAL_ESCAPES_BUFFER_SIZE); idl_global->set_local_escapes (local_escapes); @@ -129,6 +129,6 @@ DRV_init (void) // Initialize driver private data DRV_nfiles = 0; - DRV_file_index = 0; + DRV_file_index = 0; } diff --git a/TAO/TAO_IDL/driver/drv_preproc.cpp b/TAO/TAO_IDL/driver/drv_preproc.cpp index 28cabc2953a..885e82956ca 100644 --- a/TAO/TAO_IDL/driver/drv_preproc.cpp +++ b/TAO/TAO_IDL/driver/drv_preproc.cpp @@ -117,7 +117,7 @@ DRV_cpp_expand_output_arg (const char *filename) if (output_arg_format != 0) { delete [] ACE_const_cast (char *, arglist[output_arg_index]); - arglist[output_arg_index] = 0; + arglist[output_arg_index] = 0; char *output_arg = 0; ACE_NEW (output_arg, @@ -155,7 +155,7 @@ DRV_cpp_init (void) else { // Check for the deprecated CPP_LOCATION environment variable - ACE_Env_Value<char*> cpp_path ("CPP_LOCATION", + ACE_Env_Value<char*> cpp_path ("CPP_LOCATION", (char *) 0); if (cpp_path != 0) @@ -183,8 +183,8 @@ DRV_cpp_init (void) char version_option[128]; ACE_OS::sprintf (version_option, "-D__TAO_IDL=0x%2.2d%2.2d%2.2d", - ACE_MAJOR_VERSION, - ACE_MINOR_VERSION, + ACE_MAJOR_VERSION, + ACE_MINOR_VERSION, ACE_BETA_VERSION); DRV_cpp_putarg (version_option); @@ -192,7 +192,7 @@ DRV_cpp_init (void) // Added some customizable preprocessor options - ACE_Env_Value<char*> args1 ("TAO_IDL_PREPROCESSOR_ARGS", + ACE_Env_Value<char*> args1 ("TAO_IDL_PREPROCESSOR_ARGS", (char *) 0); if (args1 != 0) @@ -202,7 +202,7 @@ DRV_cpp_init (void) else { // Check for the deprecated TAO_IDL_DEFAULT_CPP_FLAGS environment variable - ACE_Env_Value<char*> args2 ("TAO_IDL_DEFAULT_CPP_FLAGS", + ACE_Env_Value<char*> args2 ("TAO_IDL_DEFAULT_CPP_FLAGS", (char *) 0); if (args2 != 0) diff --git a/TAO/TAO_IDL/fe/fe_declarator.cpp b/TAO/TAO_IDL/fe/fe_declarator.cpp index 295790ab91c..ddb991f8bad 100644 --- a/TAO/TAO_IDL/fe/fe_declarator.cpp +++ b/TAO/TAO_IDL/fe/fe_declarator.cpp @@ -53,8 +53,8 @@ Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR Sun, Sun Microsystems and the Sun logo are trademarks or registered trademarks of Sun Microsystems, Inc. -SunSoft, Inc. -2550 Garcia Avenue +SunSoft, Inc. +2550 Garcia Avenue Mountain View, California 94043 NOTE: @@ -72,7 +72,7 @@ ACE_RCSID(fe, fe_declarator, "$Id$") // Constructor(s) and destructor -FE_Declarator::FE_Declarator (UTL_ScopedName *n, +FE_Declarator::FE_Declarator (UTL_ScopedName *n, DeclaratorType dt, AST_Decl *cp) : pd_complex_part (cp), @@ -109,24 +109,24 @@ FE_Declarator::compose (AST_Decl *d) } } - if (ct == 0) + if (ct == 0) { idl_global->err ()->not_a_type (d); return 0; } - if (ct->node_type () == AST_Decl::NT_except) + if (ct->node_type () == AST_Decl::NT_except) { idl_global->err ()->not_a_type (d); return 0; } - if (this->pd_decl_type == FD_simple || this->pd_complex_part == 0) + if (this->pd_decl_type == FD_simple || this->pd_complex_part == 0) { return ct; } - if (this->pd_complex_part->node_type () == AST_Decl::NT_array) + if (this->pd_complex_part->node_type () == AST_Decl::NT_array) { arr = AST_Array::narrow_from_decl (this->pd_complex_part); arr->set_base_type (ct); diff --git a/TAO/TAO_IDL/fe/fe_extern.cpp b/TAO/TAO_IDL/fe/fe_extern.cpp index e5be205dc6b..872b8a434e2 100644 --- a/TAO/TAO_IDL/fe/fe_extern.cpp +++ b/TAO/TAO_IDL/fe/fe_extern.cpp @@ -54,8 +54,8 @@ Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR Sun, Sun Microsystems and the Sun logo are trademarks or registered trademarks of Sun Microsystems, Inc. -SunSoft, Inc. -2550 Garcia Avenue +SunSoft, Inc. +2550 Garcia Avenue Mountain View, California 94043 NOTE: @@ -90,7 +90,7 @@ FE_yyparse (void) { int result = tao_yyparse (); - if (idl_global->err_count () == 0) + if (idl_global->err_count () == 0) { idl_global->root ()->call_add (); } diff --git a/TAO/TAO_IDL/fe/fe_init.cpp b/TAO/TAO_IDL/fe/fe_init.cpp index f80c9d097e8..5a70070a7ca 100644 --- a/TAO/TAO_IDL/fe/fe_init.cpp +++ b/TAO/TAO_IDL/fe/fe_init.cpp @@ -96,7 +96,7 @@ create_scoped_name (const char *s) UTL_ScopedName *retval = 0; ACE_NEW_RETURN (retval, - UTL_ScopedName (id, + UTL_ScopedName (id, 0), 0); @@ -109,7 +109,7 @@ fe_populate_global_scope (AST_Module *m) { AST_PredefinedType *pdt = 0; - pdt = + pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_long, create_scoped_name ("long") @@ -137,7 +137,7 @@ fe_populate_global_scope (AST_Module *m) ); m->fe_add_predefined_type (pdt); - pdt = + pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_short, create_scoped_name ("short") @@ -151,7 +151,7 @@ fe_populate_global_scope (AST_Module *m) ); m->fe_add_predefined_type (pdt); - pdt = + pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_float, create_scoped_name ("float") @@ -172,7 +172,7 @@ fe_populate_global_scope (AST_Module *m) ); m->fe_add_predefined_type (pdt); - pdt = + pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_char, create_scoped_name ("char") @@ -186,14 +186,14 @@ fe_populate_global_scope (AST_Module *m) ); m->fe_add_predefined_type (pdt); - pdt = + pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_octet, create_scoped_name ("octet") ); m->fe_add_predefined_type (pdt); - pdt = + pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_any, create_scoped_name ("any") @@ -207,14 +207,14 @@ fe_populate_global_scope (AST_Module *m) ); m->fe_add_predefined_type (pdt); - pdt = + pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_void, create_scoped_name ("void") ); m->fe_add_predefined_type (pdt); - pdt = + pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_pseudo, create_scoped_name("Object") @@ -223,175 +223,175 @@ fe_populate_global_scope (AST_Module *m) // Add these to make all keywords protected even in different spellings - pdt = + pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_pseudo, create_scoped_name ("attribute") ); m->fe_add_predefined_type (pdt); - pdt = + pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_pseudo, create_scoped_name ("case") ); m->fe_add_predefined_type (pdt); - pdt = + pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_pseudo, create_scoped_name ("const") ); m->fe_add_predefined_type (pdt); - pdt = + pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_pseudo, create_scoped_name ("context") ); m->fe_add_predefined_type (pdt); - pdt = + pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_pseudo, create_scoped_name ("default") ); m->fe_add_predefined_type (pdt); - pdt = + pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_pseudo, create_scoped_name ("enum") ); m->fe_add_predefined_type (pdt); - pdt = + pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_pseudo, create_scoped_name ("exception") ); m->fe_add_predefined_type (pdt); - pdt = + pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_pseudo, create_scoped_name ("in") ); m->fe_add_predefined_type (pdt); - pdt = + pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_pseudo, create_scoped_name ("out") ); m->fe_add_predefined_type (pdt); - pdt = + pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_pseudo, create_scoped_name ("inout") ); m->fe_add_predefined_type (pdt); - pdt = + pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_pseudo, create_scoped_name ("interface") ); m->fe_add_predefined_type (pdt); - pdt = + pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_pseudo, create_scoped_name ("module") ); m->fe_add_predefined_type (pdt); - pdt = + pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_pseudo, create_scoped_name ("oneway") ); m->fe_add_predefined_type (pdt); - pdt = + pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_pseudo, create_scoped_name ("raises") ); m->fe_add_predefined_type (pdt); - pdt = + pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_pseudo, create_scoped_name ("readonly") ); m->fe_add_predefined_type (pdt); - pdt = + pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_pseudo, create_scoped_name ("sequence") ); m->fe_add_predefined_type (pdt); - pdt = + pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_pseudo, create_scoped_name ("string") ); m->fe_add_predefined_type (pdt); - pdt = + pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_pseudo, create_scoped_name ("wstring") ); m->fe_add_predefined_type (pdt); - pdt = + pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_pseudo, create_scoped_name ("struct") ); m->fe_add_predefined_type (pdt); - pdt = + pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_pseudo, create_scoped_name ("switch") ); m->fe_add_predefined_type (pdt); - pdt = + pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_pseudo, create_scoped_name ("typedef") ); m->fe_add_predefined_type (pdt); - pdt = + pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_pseudo, create_scoped_name ("union") ); m->fe_add_predefined_type (pdt); - pdt = + pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_pseudo, create_scoped_name ("unsigned") ); m->fe_add_predefined_type (pdt); - pdt = + pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_pseudo, create_scoped_name ("TRUE") ); m->fe_add_predefined_type (pdt); - pdt = + pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_pseudo, create_scoped_name ("FALSE") @@ -401,49 +401,49 @@ fe_populate_global_scope (AST_Module *m) # ifdef IDL_HAS_VALUETYPE if (idl_global->obv_support ()) { - pdt = + pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_pseudo, create_scoped_name ("abstract") ); m->fe_add_predefined_type (pdt); - pdt = + pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_pseudo, create_scoped_name ("custom") ); m->fe_add_predefined_type (pdt); - pdt = + pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_pseudo, create_scoped_name ("private") ); m->fe_add_predefined_type (pdt); - pdt = + pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_pseudo, create_scoped_name ("public") ); m->fe_add_predefined_type (pdt); - pdt = + pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_pseudo, create_scoped_name ("supports") ); m->fe_add_predefined_type (pdt); - pdt = + pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_pseudo, create_scoped_name ("truncatable") ); m->fe_add_predefined_type (pdt); - pdt = + pdt = idl_global->gen ()->create_predefined_type ( AST_PredefinedType::PT_pseudo, create_scoped_name ("valuetype") @@ -519,7 +519,7 @@ fe_populate_idl_keywords (void) for (u_long i = 0; i < length; ++i) { - ext_id.set (keywords[i], + ext_id.set (keywords[i], 0); (void) map.bind (ext_id, int_id); @@ -532,7 +532,7 @@ FE_init_stage1 (void) { idl_global->set_scopes (new UTL_ScopeStack ()); - if (idl_global->scopes () == NULL) + if (idl_global->scopes () == NULL) { ACE_ERROR (( LM_ERROR, @@ -550,7 +550,7 @@ FE_init_stage2 (void) AST_Root *r; // Check that the BE init created a generator object - if (idl_global->gen () == 0) + if (idl_global->gen () == 0) { ACE_ERROR (( LM_ERROR, @@ -564,7 +564,7 @@ FE_init_stage2 (void) r = idl_global->gen ()->create_root (create_scoped_name ("")); idl_global->set_root (r); - if (r == 0) + if (r == 0) { ACE_ERROR (( LM_ERROR, diff --git a/TAO/TAO_IDL/fe/fe_interface_header.cpp b/TAO/TAO_IDL/fe/fe_interface_header.cpp index f2d64feafb6..ed7bad1b846 100644 --- a/TAO/TAO_IDL/fe/fe_interface_header.cpp +++ b/TAO/TAO_IDL/fe/fe_interface_header.cpp @@ -435,7 +435,7 @@ idl_bool FE_InterfaceHeader::check_further (AST_Interface *i) { if (i != 0 - && !i->is_valuetype () + && !i->is_valuetype () && (this->is_local () || !i->is_local ())) { return 1; @@ -487,9 +487,9 @@ FE_InterfaceHeader::n_inherits_flat (void) FE_Local_InterfaceHeader::FE_Local_InterfaceHeader (UTL_ScopedName *n, UTL_NameList *nl, UTL_NameList *supports) - : FE_InterfaceHeader (n, - nl, - supports, + : FE_InterfaceHeader (n, + nl, + supports, 0) { compile_inheritance (nl, @@ -506,9 +506,9 @@ FE_Abstract_InterfaceHeader::FE_Abstract_InterfaceHeader (UTL_ScopedName *n, UTL_NameList *nl, UTL_NameList *supports) - : FE_InterfaceHeader (n, - nl, - supports, + : FE_InterfaceHeader (n, + nl, + supports, 0) { compile_inheritance (nl, @@ -528,8 +528,8 @@ FE_Abstract_InterfaceHeader::is_abstract (void) FE_obv_header::FE_obv_header (UTL_ScopedName *n, UTL_NameList *nl, UTL_NameList *supports) - : FE_InterfaceHeader (n, - nl, + : FE_InterfaceHeader (n, + nl, supports, 0), truncatable_ (0), @@ -562,7 +562,7 @@ idl_bool FE_obv_header::check_further (AST_Interface *i) { if (i != 0 - && i->is_valuetype () + && i->is_valuetype () && i->is_abstract_valuetype ()) { return 1; diff --git a/TAO/TAO_IDL/fe/fe_private.cpp b/TAO/TAO_IDL/fe/fe_private.cpp index bec725f9a20..fa1bd77277a 100644 --- a/TAO/TAO_IDL/fe/fe_private.cpp +++ b/TAO/TAO_IDL/fe/fe_private.cpp @@ -53,8 +53,8 @@ Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR Sun, Sun Microsystems and the Sun logo are trademarks or registered trademarks of Sun Microsystems, Inc. -SunSoft, Inc. -2550 Garcia Avenue +SunSoft, Inc. +2550 Garcia Avenue Mountain View, California 94043 NOTE: diff --git a/TAO/TAO_IDL/fe/lex.yy.cpp b/TAO/TAO_IDL/fe/lex.yy.cpp index 88238e38d54..b5a42cffb2c 100644 --- a/TAO/TAO_IDL/fe/lex.yy.cpp +++ b/TAO/TAO_IDL/fe/lex.yy.cpp @@ -2533,7 +2533,7 @@ idl_parse_line_and_file (char *buf) idl_global->set_in_main_file (in_main_file); // If it's an import file store the stripped name for the BE to use - if (!(idl_global->in_main_file ()) && idl_global->import ()) + if (!(idl_global->in_main_file ()) && idl_global->import ()) { ACE_NEW (nm, UTL_String (stripped_name (fname))); @@ -2570,18 +2570,18 @@ idl_store_pragma (char *buf) while (*sp != '\n') { *tp = *sp; - ++tp; + ++tp; ++sp; } } - if (ACE_OS::strstr (buf + 8, "import") != 0) + if (ACE_OS::strstr (buf + 8, "import") != 0) { idl_global->set_import (I_TRUE); return; } - if (ACE_OS::strstr (buf + 8, "include") != 0) + if (ACE_OS::strstr (buf + 8, "include") != 0) { idl_global->set_import (I_FALSE); return; @@ -2652,7 +2652,7 @@ idl_store_pragma (char *buf) d->version (ACE::strnew (number)); } - else if (ACE_OS::strncmp (buf + 8, "ident", 5) == 0) + else if (ACE_OS::strncmp (buf + 8, "ident", 5) == 0) { idl_global->ident_string (buf + 8); } diff --git a/TAO/TAO_IDL/fe/y.tab.cpp b/TAO/TAO_IDL/fe/y.tab.cpp index b4f8cfca595..d50d3883f05 100644 --- a/TAO/TAO_IDL/fe/y.tab.cpp +++ b/TAO/TAO_IDL/fe/y.tab.cpp @@ -1279,7 +1279,7 @@ tao_yyinrecovery: if (5 < tao_yydebug) printf("tao_yydebug: state %d, error recovery discards token %d (%s)\n", tao_yystate, tao_yychar, tao_yys); - else + else TAO_YYDEBUG_DISCARD_TOKEN(tao_yystate, tao_yychar, tao_yys, tao_yyssp-tao_yyss); } #endif @@ -2000,71 +2000,71 @@ case 110: break; case 114: { - tao_yyval.exval = idl_global->gen ()->create_expr (AST_Expression::EC_or, - tao_yyvsp[-2].exval, + tao_yyval.exval = idl_global->gen ()->create_expr (AST_Expression::EC_or, + tao_yyvsp[-2].exval, tao_yyvsp[0].exval); } break; case 116: { - tao_yyval.exval = idl_global->gen ()->create_expr (AST_Expression::EC_xor, - tao_yyvsp[-2].exval, + tao_yyval.exval = idl_global->gen ()->create_expr (AST_Expression::EC_xor, + tao_yyvsp[-2].exval, tao_yyvsp[0].exval); } break; case 118: { - tao_yyval.exval = idl_global->gen ()->create_expr (AST_Expression::EC_and, - tao_yyvsp[-2].exval, + tao_yyval.exval = idl_global->gen ()->create_expr (AST_Expression::EC_and, + tao_yyvsp[-2].exval, tao_yyvsp[0].exval); } break; case 120: { - tao_yyval.exval = idl_global->gen ()->create_expr (AST_Expression::EC_left, - tao_yyvsp[-2].exval, + tao_yyval.exval = idl_global->gen ()->create_expr (AST_Expression::EC_left, + tao_yyvsp[-2].exval, tao_yyvsp[0].exval); } break; case 121: { - tao_yyval.exval = idl_global->gen ()->create_expr (AST_Expression::EC_right, - tao_yyvsp[-2].exval, + tao_yyval.exval = idl_global->gen ()->create_expr (AST_Expression::EC_right, + tao_yyvsp[-2].exval, tao_yyvsp[0].exval); } break; case 123: { - tao_yyval.exval = idl_global->gen ()->create_expr (AST_Expression::EC_add, - tao_yyvsp[-2].exval, + tao_yyval.exval = idl_global->gen ()->create_expr (AST_Expression::EC_add, + tao_yyvsp[-2].exval, tao_yyvsp[0].exval); } break; case 124: { - tao_yyval.exval = idl_global->gen ()->create_expr (AST_Expression::EC_minus, - tao_yyvsp[-2].exval, + tao_yyval.exval = idl_global->gen ()->create_expr (AST_Expression::EC_minus, + tao_yyvsp[-2].exval, tao_yyvsp[0].exval); } break; case 126: { - tao_yyval.exval = idl_global->gen ()->create_expr (AST_Expression::EC_mul, - tao_yyvsp[-2].exval, + tao_yyval.exval = idl_global->gen ()->create_expr (AST_Expression::EC_mul, + tao_yyvsp[-2].exval, tao_yyvsp[0].exval); } break; case 127: { - tao_yyval.exval = idl_global->gen ()->create_expr (AST_Expression::EC_div, - tao_yyvsp[-2].exval, + tao_yyval.exval = idl_global->gen ()->create_expr (AST_Expression::EC_div, + tao_yyvsp[-2].exval, tao_yyvsp[0].exval); } break; case 128: { - tao_yyval.exval = idl_global->gen ()->create_expr (AST_Expression::EC_mod, - tao_yyvsp[-2].exval, + tao_yyval.exval = idl_global->gen ()->create_expr (AST_Expression::EC_mod, + tao_yyvsp[-2].exval, tao_yyvsp[0].exval); } break; @@ -2103,9 +2103,9 @@ case 133: /* * If the scoped name is an IDL constant, it may be used in an - * array dim, a string bound, or a sequence bound. If so, it + * array dim, a string bound, or a sequence bound. If so, it * must be unsigned and > 0. We assign the constant's value - * and type to the expression created here so we can check + * and type to the expression created here so we can check * them later. */ if (d != 0 && d->node_type () == AST_Decl::NT_const) @@ -2228,8 +2228,8 @@ case 145: if (good_expression) { - tao_yyval.exval = - idl_global->gen()->create_expr (tao_yyvsp[0].exval, + tao_yyval.exval = + idl_global->gen()->create_expr (tao_yyvsp[0].exval, AST_Expression::EV_ulong); } else @@ -2300,7 +2300,7 @@ case 153: AST_Type * tp = d->compose (tao_yyvsp[-2].dcval); if (tp == 0) continue; - t = idl_global->gen ()->create_typedef (tp, + t = idl_global->gen ()->create_typedef (tp, d->name (), s->is_local (), s->is_abstract ()); @@ -2389,7 +2389,7 @@ case 182: break; case 183: { - tao_yyval.deval = new FE_Declarator (new UTL_ScopedName (tao_yyvsp[0].dcval->local_name (), + tao_yyval.deval = new FE_Declarator (new UTL_ScopedName (tao_yyvsp[0].dcval->local_name (), 0), FE_Declarator::FD_complex, tao_yyvsp[0].dcval); @@ -2554,7 +2554,7 @@ case 213: * Check for illegal recursive use of type */ if (tao_yyvsp[-4].dcval != 0 && AST_illegal_recursive_type (tao_yyvsp[-4].dcval)) - idl_global->err ()->error1 (UTL_Error::EIDL_RECURSIVE_TYPE, + idl_global->err ()->error1 (UTL_Error::EIDL_RECURSIVE_TYPE, tao_yyvsp[-4].dcval); /* * Create a node representing a struct or exception member @@ -2570,8 +2570,8 @@ case 213: if (tp == 0) continue; /* $0 denotes Visibility, must be on yacc reduction stack */ - f = idl_global->gen ()->create_field (tp, - d->name (), + f = idl_global->gen ()->create_field (tp, + d->name (), tao_yyvsp[-5].vival); (void) s->fe_add_field (f); } @@ -2682,7 +2682,7 @@ case 226: idl_global->err ()->error0 (UTL_Error::EIDL_DISC_TYPE); } - tao_yyval.dcval = + tao_yyval.dcval = idl_global->scopes ()->bottom ()->lookup_primitive_type ( tao_yyvsp[0].etval ); @@ -2971,7 +2971,7 @@ case 258: if (s != 0 && s->scope_node_type () == AST_Decl::NT_enum) { c = AST_Enum::narrow_from_scope (s); if (c != 0) - e = idl_global->gen ()->create_enum_val (c->next_enum_val (), + e = idl_global->gen ()->create_enum_val (c->next_enum_val (), n); (void) s->fe_add_enum_val (e); } @@ -3197,11 +3197,11 @@ case 277: * Create a node representing an array */ if (tao_yyvsp[0].elval != 0) { - tao_yyval.dcval = idl_global->gen ()->create_array (new UTL_ScopedName (tao_yyvsp[-2].idval, + tao_yyval.dcval = idl_global->gen ()->create_array (new UTL_ScopedName (tao_yyvsp[-2].idval, 0), - tao_yyvsp[0].elval->length (), - tao_yyvsp[0].elval, - 0, + tao_yyvsp[0].elval->length (), + tao_yyvsp[0].elval, + 0, 0); } } @@ -3468,7 +3468,7 @@ case 305: ACE_TEXT ("factory construct.\n"), idl_global->filename ()->get_string (), idl_global->lineno ())); - } + } UTL_ScopedName *n = new UTL_ScopedName (new Identifier (tao_yyvsp[0].strval), 0); @@ -3545,14 +3545,14 @@ case 317: * Create a node representing an argument to an operation * Add it to the enclosing scope (the operation scope) */ - if (tao_yyvsp[-2].dcval != 0 && tao_yyvsp[0].deval != 0 && s != 0) + if (tao_yyvsp[-2].dcval != 0 && tao_yyvsp[0].deval != 0 && s != 0) { AST_Type *tp = tao_yyvsp[0].deval->compose (tao_yyvsp[-2].dcval); - if (tp != 0) + if (tp != 0) { a = idl_global->gen ()->create_argument ( - AST_Argument::dir_IN, - tp, + AST_Argument::dir_IN, + tp, (UTL_IdList *) tao_yyvsp[0].deval->name ()->copy () ); @@ -3622,8 +3622,8 @@ case 328: else { a = idl_global->gen ()->create_argument ( - tao_yyvsp[-4].dival, - tp, + tao_yyvsp[-4].dival, + tp, (UTL_IdList *) tao_yyvsp[0].deval->name ()->copy () ); (void) s->fe_add_argument (a); diff --git a/TAO/TAO_IDL/include/ast_argument.h b/TAO/TAO_IDL/include/ast_argument.h index 6671736d03e..24ba8da31eb 100644 --- a/TAO/TAO_IDL/include/ast_argument.h +++ b/TAO/TAO_IDL/include/ast_argument.h @@ -91,8 +91,8 @@ public: // Constructor(s). AST_Argument (void); - AST_Argument (Direction direction, - AST_Type *ft, + AST_Argument (Direction direction, + AST_Type *ft, UTL_ScopedName *n); // Destructor. diff --git a/TAO/TAO_IDL/include/ast_concrete_type.h b/TAO/TAO_IDL/include/ast_concrete_type.h index d431ffb3701..68838a4a636 100644 --- a/TAO/TAO_IDL/include/ast_concrete_type.h +++ b/TAO/TAO_IDL/include/ast_concrete_type.h @@ -78,7 +78,7 @@ public: // Constructor(s). AST_ConcreteType (void); - AST_ConcreteType (AST_Decl::NodeType nt, + AST_ConcreteType (AST_Decl::NodeType nt, UTL_ScopedName *n); // Destructor. diff --git a/TAO/TAO_IDL/include/ast_constant.h b/TAO/TAO_IDL/include/ast_constant.h index c64f45b21c4..61807f7cb6f 100644 --- a/TAO/TAO_IDL/include/ast_constant.h +++ b/TAO/TAO_IDL/include/ast_constant.h @@ -87,7 +87,7 @@ public: AST_Constant (AST_Expression::ExprType et, AST_Decl::NodeType nt, - AST_Expression *ev, + AST_Expression *ev, UTL_ScopedName *n); AST_Constant (AST_Expression::ExprType et, diff --git a/TAO/TAO_IDL/include/ast_decl.h b/TAO/TAO_IDL/include/ast_decl.h index 0de498285f0..6ce991ce0ac 100644 --- a/TAO/TAO_IDL/include/ast_decl.h +++ b/TAO/TAO_IDL/include/ast_decl.h @@ -153,7 +153,7 @@ public: // Constructor(s). AST_Decl (void); - AST_Decl (NodeType type, + AST_Decl (NodeType type, UTL_ScopedName *n, idl_bool anonymous = I_FALSE); diff --git a/TAO/TAO_IDL/include/ast_enum_val.h b/TAO/TAO_IDL/include/ast_enum_val.h index 3ce7175ee2d..121c0600619 100644 --- a/TAO/TAO_IDL/include/ast_enum_val.h +++ b/TAO/TAO_IDL/include/ast_enum_val.h @@ -79,7 +79,7 @@ public: // Constructor(s). AST_EnumVal (void); - AST_EnumVal (unsigned long v, + AST_EnumVal (unsigned long v, UTL_ScopedName *n); // Destructor. diff --git a/TAO/TAO_IDL/include/ast_factory.h b/TAO/TAO_IDL/include/ast_factory.h index 6b624ee48b8..8d2becad7df 100644 --- a/TAO/TAO_IDL/include/ast_factory.h +++ b/TAO/TAO_IDL/include/ast_factory.h @@ -76,7 +76,7 @@ trademarks or registered trademarks of Sun Microsystems, Inc. #include "utl_scope.h" #include "utl_scoped_name.h" -class TAO_IDL_FE_Export AST_Factory : public virtual AST_Decl, +class TAO_IDL_FE_Export AST_Factory : public virtual AST_Decl, public virtual UTL_Scope { public: @@ -117,7 +117,7 @@ public: private: // Data. - + int argument_count_; // Number of arguments. diff --git a/TAO/TAO_IDL/include/ast_field.h b/TAO/TAO_IDL/include/ast_field.h index 9f618224d86..6c9beb7ac42 100644 --- a/TAO/TAO_IDL/include/ast_field.h +++ b/TAO/TAO_IDL/include/ast_field.h @@ -97,12 +97,12 @@ public: AST_Field (void); AST_Field (AST_Type *field_type, - UTL_ScopedName *n, + UTL_ScopedName *n, Visibility vis = vis_NA); AST_Field (AST_Decl::NodeType nt, AST_Type *field_type, - UTL_ScopedName *n, + UTL_ScopedName *n, Visibility vis = vis_NA); virtual ~AST_Field (void); diff --git a/TAO/TAO_IDL/include/ast_generator.h b/TAO/TAO_IDL/include/ast_generator.h index 957a55c1e65..c58cc827bdd 100644 --- a/TAO/TAO_IDL/include/ast_generator.h +++ b/TAO/TAO_IDL/include/ast_generator.h @@ -135,7 +135,7 @@ public: // union. virtual AST_Field *create_field (AST_Type *ft, UTL_ScopedName *n, - AST_Field::Visibility vis = + AST_Field::Visibility vis = AST_Field::vis_NA); // Create a node representing an argument to an operation. diff --git a/TAO/TAO_IDL/include/ast_predefined_type.h b/TAO/TAO_IDL/include/ast_predefined_type.h index e4ae7d28dec..912f0240ac9 100644 --- a/TAO/TAO_IDL/include/ast_predefined_type.h +++ b/TAO/TAO_IDL/include/ast_predefined_type.h @@ -101,7 +101,7 @@ public: // Constructor(s). AST_PredefinedType (void); - AST_PredefinedType (PredefinedType t, + AST_PredefinedType (PredefinedType t, UTL_ScopedName *n); virtual ~AST_PredefinedType (void); diff --git a/TAO/TAO_IDL/include/ast_visitor.h b/TAO/TAO_IDL/include/ast_visitor.h index 34632a4da60..64d24d9582b 100644 --- a/TAO/TAO_IDL/include/ast_visitor.h +++ b/TAO/TAO_IDL/include/ast_visitor.h @@ -63,7 +63,7 @@ class TAO_IDL_FE_Export ast_visitor // // = DESCRIPTION // To implement BE processing we use the "Visitor Pattern", this - // is the abstract "Visitor". This class is the abstract base class + // is the abstract "Visitor". This class is the abstract base class // for visitors that traverse the AST_<node> classes. Other abstract // classes for C++ code generation, Java code generation, or IfR // administration, for example, can be derived from this class and diff --git a/TAO/TAO_IDL/include/drv_private.h b/TAO/TAO_IDL/include/drv_private.h index c8921b2e219..ab89a4e7862 100644 --- a/TAO/TAO_IDL/include/drv_private.h +++ b/TAO/TAO_IDL/include/drv_private.h @@ -75,10 +75,10 @@ trademarks or registered trademarks of Sun Microsystems, Inc. // The ACE_Process_Options default size of 1024 is sometimes not enough. const unsigned long TAO_IDL_COMMAND_LINE_BUFFER_SIZE = 4 * 1024; -extern const char *DRV_files[]; +extern const char *DRV_files[]; // All files to be processed -extern long DRV_nfiles; +extern long DRV_nfiles; // How many are there? extern long DRV_file_index; diff --git a/TAO/TAO_IDL/include/fe_declarator.h b/TAO/TAO_IDL/include/fe_declarator.h index 1c183bc21cf..55e4db68caf 100644 --- a/TAO/TAO_IDL/include/fe_declarator.h +++ b/TAO/TAO_IDL/include/fe_declarator.h @@ -71,7 +71,7 @@ class FE_Declarator { public: // Enum to denote types of declarators. - enum DeclaratorType + enum DeclaratorType { FD_simple, // Simple declarator FD_complex // Complex declarator (complex_part field used) @@ -80,8 +80,8 @@ public: // Operations. // Constructor and destructor. - FE_Declarator (UTL_ScopedName *n, - DeclaratorType dt, + FE_Declarator (UTL_ScopedName *n, + DeclaratorType dt, AST_Decl *cp); virtual ~FE_Declarator (void) {} diff --git a/TAO/TAO_IDL/include/fe_extern.h b/TAO/TAO_IDL/include/fe_extern.h index 49ed04056e1..b8627e3609c 100644 --- a/TAO/TAO_IDL/include/fe_extern.h +++ b/TAO/TAO_IDL/include/fe_extern.h @@ -87,20 +87,20 @@ trademarks or registered trademarks of Sun Microsystems, Inc. // which is then used in the second stage to create the global scope // and to populate it with nodes for the predefined types -TAO_IDL_FE_Export void +TAO_IDL_FE_Export void FE_init_stage1 (void); // Initialize stage 1 -TAO_IDL_FE_Export void +TAO_IDL_FE_Export void FE_init_stage2 (void); // Initialize stage 2 // Interface to Yacc parser class File; -TAO_IDL_FE_Export int +TAO_IDL_FE_Export int FE_yyparse (void); // Invode yyparse -TAO_IDL_FE_Export void +TAO_IDL_FE_Export void FE_set_yyin (File *); // Set yyin // Interface to constructors for objects need by the driver diff --git a/TAO/TAO_IDL/include/global_extern.h b/TAO/TAO_IDL/include/global_extern.h index 2e5b3e6e0fa..b00c7405497 100644 --- a/TAO/TAO_IDL/include/global_extern.h +++ b/TAO/TAO_IDL/include/global_extern.h @@ -69,7 +69,7 @@ trademarks or registered trademarks of Sun Microsystems, Inc. // global_extern.hh - Global data for the IDL compiler -extern TAO_IDL_FE_Export IDL_GlobalData *idl_global; +extern TAO_IDL_FE_Export IDL_GlobalData *idl_global; // Contains all "global" data // Global functions for the IDL compiler diff --git a/TAO/TAO_IDL/include/idl_global.h b/TAO/TAO_IDL/include/idl_global.h index 56317a5bddd..090da2d7866 100644 --- a/TAO/TAO_IDL/include/idl_global.h +++ b/TAO/TAO_IDL/include/idl_global.h @@ -369,7 +369,7 @@ public: ACE_Unbounded_Stack<char *> & pragma_prefixes (void); // Accessor for the pragma prefix container. - + UTL_ScopedName *string_to_scoped_name (char *s); // Parses a string with double colons. diff --git a/TAO/TAO_IDL/include/utl_decllist.h b/TAO/TAO_IDL/include/utl_decllist.h index b7e804cb281..0eb903ce37e 100644 --- a/TAO/TAO_IDL/include/utl_decllist.h +++ b/TAO/TAO_IDL/include/utl_decllist.h @@ -100,7 +100,7 @@ private: }; // Active iterator fooor UTL_DeclList -class TAO_IDL_FE_Export UTL_DecllistActiveIterator +class TAO_IDL_FE_Export UTL_DecllistActiveIterator : public UTL_ListActiveIterator { public: diff --git a/TAO/TAO_IDL/include/utl_err.h b/TAO/TAO_IDL/include/utl_err.h index 88eb7fe798e..17fccba5d85 100644 --- a/TAO/TAO_IDL/include/utl_err.h +++ b/TAO/TAO_IDL/include/utl_err.h @@ -129,41 +129,41 @@ public: // Report errors with varying numbers of arguments void error0 (ErrorCode e); - void error1 (ErrorCode e, + void error1 (ErrorCode e, AST_Decl *t); - void error2 (ErrorCode e, - AST_Decl *t1, + void error2 (ErrorCode e, + AST_Decl *t1, AST_Decl *t2); - void error3 (ErrorCode e, - AST_Decl *t1, - AST_Decl *t2, + void error3 (ErrorCode e, + AST_Decl *t1, + AST_Decl *t2, AST_Decl *t3); // Report warnings with varying numbers of arguments void warning0 (ErrorCode e); - void warning1 (ErrorCode e, + void warning1 (ErrorCode e, AST_Decl *t); - void warning2 (ErrorCode e, - AST_Decl *t1, + void warning2 (ErrorCode e, + AST_Decl *t1, AST_Decl *t2); - void warning3 (ErrorCode e, - AST_Decl *t1, - AST_Decl *t2, + void warning3 (ErrorCode e, + AST_Decl *t1, + AST_Decl *t2, AST_Decl *t3); // Report a syntax error in IDL input void syntax_error(IDL_GlobalData::ParseState ps); // Report clash of declared and referenced indentifiers - void redef_error (char *n, + void redef_error (char *n, char *t); // Report a name being used with different spellings - void name_case_error (char *n, + void name_case_error (char *n, char *t); // Same as above, but doesn't increment the error count. - void name_case_warning (char *n, + void name_case_warning (char *n, char *t); // Differs from spelling of IDL keyword only by case. @@ -173,7 +173,7 @@ public: void idl_keyword_warning (char *n); // Report an unsuccesful coercion attempt - void coercion_error (AST_Expression *v, + void coercion_error (AST_Expression *v, AST_Expression::ExprType t); // Report a failed name lookup attempt. @@ -191,11 +191,11 @@ public: // Report an attempt to use a forward declared interface which // hasn't been defined yet in an inheritance spec - void inheritance_fwd_error (UTL_ScopedName *n, + void inheritance_fwd_error (UTL_ScopedName *n, AST_Interface *f); // Report an attempt to inherit from something other than an interface - void inheritance_error (UTL_ScopedName *n, + void inheritance_error (UTL_ScopedName *n, AST_Decl *d); void abstract_inheritance_error (UTL_ScopedName *n); @@ -206,42 +206,42 @@ public: // Report a situation where a constant was expected but we got // something else instead. This most likely is a case where a union // label did not evaluate to a constant - void constant_expected (UTL_ScopedName *n, + void constant_expected (UTL_ScopedName *n, AST_Decl *d); // Report a situation where an enumerator was expected but we got // something else instead. This occurs when a union with an enum // discriminator is being parsed and one of the branch labels is // not an enumerator in that enum - void enum_val_expected (AST_Union *t, + void enum_val_expected (AST_Union *t, AST_UnionLabel *l); // Report a failed enumerator lookup in an enum - void enum_val_lookup_failure (AST_Union *t, - AST_Enum *e, + void enum_val_lookup_failure (AST_Union *t, + AST_Enum *e, UTL_ScopedName *n); // Report an ambiguous name definition - void ambiguous (UTL_Scope *s, - AST_Decl *l, + void ambiguous (UTL_Scope *s, + AST_Decl *l, AST_Decl *d); // Report a forward declared interface which was never defined void fwd_decl_not_defined (AST_Interface *d); // Report attempt to lookup in forward declared interface - void fwd_decl_lookup (AST_Interface *d, + void fwd_decl_lookup (AST_Interface *d, UTL_ScopedName *n); // Report a redefinition in scope - void redefinition_in_scope (AST_Decl *t, + void redefinition_in_scope (AST_Decl *t, AST_Decl *s); // Report not a type error void not_a_type (AST_Decl *d); // Report back-end error - void back_end (long lineno, + void back_end (long lineno, UTL_String *s); }; diff --git a/TAO/TAO_IDL/include/utl_exceptlist.h b/TAO/TAO_IDL/include/utl_exceptlist.h index f1e3f64905f..3d411e2a6a4 100644 --- a/TAO/TAO_IDL/include/utl_exceptlist.h +++ b/TAO/TAO_IDL/include/utl_exceptlist.h @@ -100,7 +100,7 @@ private: }; // Active iterator for UTL_ExceptList -class TAO_IDL_FE_Export UTL_ExceptlistActiveIterator +class TAO_IDL_FE_Export UTL_ExceptlistActiveIterator : public UTL_ListActiveIterator { public: diff --git a/TAO/TAO_IDL/narrow/narrow.cpp b/TAO/TAO_IDL/narrow/narrow.cpp index 7e075887881..2a0e7c7ca49 100644 --- a/TAO/TAO_IDL/narrow/narrow.cpp +++ b/TAO/TAO_IDL/narrow/narrow.cpp @@ -79,7 +79,7 @@ ScopeAsDecl (UTL_Scope *s) { if (s == 0) return 0; - switch (s->scope_node_type ()) + switch (s->scope_node_type ()) { case AST_Decl::NT_module: return AST_Module::narrow_from_scope (s); @@ -112,7 +112,7 @@ DeclAsScope (AST_Decl *d) { if (d == 0) return 0; - switch (d->node_type ()) + switch (d->node_type ()) { case AST_Decl::NT_interface_fwd: /* diff --git a/TAO/TAO_IDL/tao_idl.cpp b/TAO/TAO_IDL/tao_idl.cpp index 9368e44e742..c83c18c6380 100644 --- a/TAO/TAO_IDL/tao_idl.cpp +++ b/TAO/TAO_IDL/tao_idl.cpp @@ -123,12 +123,12 @@ DRV_fork (void) DRV_file_index < DRV_nfiles; ++DRV_file_index) { - ACE_Process_Options options (1, + ACE_Process_Options options (1, TAO_IDL_COMMAND_LINE_BUFFER_SIZE); options.creation_flags (ACE_Process_Options::NO_EXEC); - options.command_line ("%s %s %s", - idl_global->prog_name (), - idl_global->idl_flags (), + options.command_line ("%s %s %s", + idl_global->prog_name (), + idl_global->idl_flags (), DRV_files[DRV_file_index]); ACE_Process manager; pid_t child_pid = manager.spawn (options); @@ -247,8 +247,8 @@ DRV_drive (const char *s) ACE_TEXT (": found"), idl_global->err_count (), ACE_TEXT ("error"), - ACE_TEXT ((idl_global->err_count () > 1 - ? ACE_TEXT ("s") + ACE_TEXT ((idl_global->err_count () > 1 + ? ACE_TEXT ("s") : ACE_TEXT (""))))); // Call BE_abort to allow a BE to clean up after itself. diff --git a/TAO/TAO_IDL/util/utl_global.cpp b/TAO/TAO_IDL/util/utl_global.cpp index 6b5454e08cb..06174ab9e6b 100644 --- a/TAO/TAO_IDL/util/utl_global.cpp +++ b/TAO/TAO_IDL/util/utl_global.cpp @@ -157,7 +157,7 @@ IDL_GlobalData::IDL_GlobalData (void) } IDL_GlobalData::~IDL_GlobalData (void) -{ +{ } // Get or set scopes stack @@ -867,7 +867,7 @@ IDL_GlobalData::destroy (void) void IDL_GlobalData::append_idl_flag (const char *s) { - idl_flags_ += " " + ACE_CString (s); + idl_flags_ += " " + ACE_CString (s); } const char * diff --git a/TAO/TAO_IDL/util/utl_list.cpp b/TAO/TAO_IDL/util/utl_list.cpp index 2c0f63e0de2..a1c98460ee8 100644 --- a/TAO/TAO_IDL/util/utl_list.cpp +++ b/TAO/TAO_IDL/util/utl_list.cpp @@ -53,8 +53,8 @@ Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR Sun, Sun Microsystems and the Sun logo are trademarks or registered trademarks of Sun Microsystems, Inc. -SunSoft, Inc. -2550 Garcia Avenue +SunSoft, Inc. +2550 Garcia Avenue Mountain View, California 94043 NOTE: @@ -81,7 +81,7 @@ ACE_RCSID(util, utl_list, "$Id$") // Constructor UTL_List::UTL_List (UTL_List *c) - : pd_cdr_data (c) + : pd_cdr_data (c) { } diff --git a/TAO/TAO_IDL/util/utl_scope.cpp b/TAO/TAO_IDL/util/utl_scope.cpp index 6b744a94a63..44fb0c5eed8 100644 --- a/TAO/TAO_IDL/util/utl_scope.cpp +++ b/TAO/TAO_IDL/util/utl_scope.cpp @@ -688,7 +688,7 @@ AST_Factory * UTL_Scope::add_factory (AST_Factory *f) { //We don't invite any new types so there is nothing actually to add - if (f == 0) + if (f == 0) { return 0; } @@ -1685,7 +1685,7 @@ UTL_Scope::add_to_scope (AST_Decl *e, // The name of any scope except the unnamed scope formed by an operation // may not be redefined immediately within (and the root scope has no name). // As well as OBV factory construct. - if (nt != AST_Decl::NT_root + if (nt != AST_Decl::NT_root && nt != AST_Decl::NT_op && nt != AST_Decl::NT_factory) { diff --git a/TAO/TAO_IDL/util/utl_stack.cpp b/TAO/TAO_IDL/util/utl_stack.cpp index e96b087c469..29f6dc49b26 100644 --- a/TAO/TAO_IDL/util/utl_stack.cpp +++ b/TAO/TAO_IDL/util/utl_stack.cpp @@ -53,8 +53,8 @@ Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR Sun, Sun Microsystems and the Sun logo are trademarks or registered trademarks of Sun Microsystems, Inc. -SunSoft, Inc. -2550 Garcia Avenue +SunSoft, Inc. +2550 Garcia Avenue Mountain View, California 94043 NOTE: @@ -113,7 +113,7 @@ UTL_ScopeStack::push (UTL_Scope *el) long i; // Make sure there's space for one more - if (this->pd_stack_data_nalloced == this->pd_stack_top) + if (this->pd_stack_data_nalloced == this->pd_stack_top) { ostack_data_nalloced = this->pd_stack_data_nalloced; this->pd_stack_data_nalloced += INCREMENT; diff --git a/TAO/TAO_IDL/util/utl_tmpl/utl_decllist.cpp b/TAO/TAO_IDL/util/utl_tmpl/utl_decllist.cpp index 8d15d072d72..33aeef85a89 100644 --- a/TAO/TAO_IDL/util/utl_tmpl/utl_decllist.cpp +++ b/TAO/TAO_IDL/util/utl_tmpl/utl_decllist.cpp @@ -42,8 +42,8 @@ *INDIRECT AND CONSEQUENTIAL DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE *POSSIBILITY OF SUCH DAMAGES. * - *SunSoft, Inc. - *2550 Garcia Avenue + *SunSoft, Inc. + *2550 Garcia Avenue *Mountain View, California 94043 * * diff --git a/TAO/TAO_IDL/util/utl_tmpl/utl_exceptlist.cpp b/TAO/TAO_IDL/util/utl_tmpl/utl_exceptlist.cpp index f9752591fae..357e9fccc0d 100644 --- a/TAO/TAO_IDL/util/utl_tmpl/utl_exceptlist.cpp +++ b/TAO/TAO_IDL/util/utl_tmpl/utl_exceptlist.cpp @@ -42,8 +42,8 @@ *INDIRECT AND CONSEQUENTIAL DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE *POSSIBILITY OF SUCH DAMAGES. * - *SunSoft, Inc. - *2550 Garcia Avenue + *SunSoft, Inc. + *2550 Garcia Avenue *Mountain View, California 94043 * * diff --git a/TAO/TAO_IDL/util/utl_tmpl/utl_exprlist.cpp b/TAO/TAO_IDL/util/utl_tmpl/utl_exprlist.cpp index 5fb0bfc514c..d09348c5e65 100644 --- a/TAO/TAO_IDL/util/utl_tmpl/utl_exprlist.cpp +++ b/TAO/TAO_IDL/util/utl_tmpl/utl_exprlist.cpp @@ -42,8 +42,8 @@ *INDIRECT AND CONSEQUENTIAL DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE *POSSIBILITY OF SUCH DAMAGES. * - *SunSoft, Inc. - *2550 Garcia Avenue + *SunSoft, Inc. + *2550 Garcia Avenue *Mountain View, California 94043 * * diff --git a/TAO/TAO_IDL/util/utl_tmpl/utl_labellist.cpp b/TAO/TAO_IDL/util/utl_tmpl/utl_labellist.cpp index 9b71db9b83d..eca1dbbe23a 100644 --- a/TAO/TAO_IDL/util/utl_tmpl/utl_labellist.cpp +++ b/TAO/TAO_IDL/util/utl_tmpl/utl_labellist.cpp @@ -42,8 +42,8 @@ *INDIRECT AND CONSEQUENTIAL DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE *POSSIBILITY OF SUCH DAMAGES. * - *SunSoft, Inc. - *2550 Garcia Avenue + *SunSoft, Inc. + *2550 Garcia Avenue *Mountain View, California 94043 * * diff --git a/TAO/TAO_IDL/util/utl_tmpl/utl_list.cpp b/TAO/TAO_IDL/util/utl_tmpl/utl_list.cpp index 997b1301d41..4bdee8e19cb 100644 --- a/TAO/TAO_IDL/util/utl_tmpl/utl_list.cpp +++ b/TAO/TAO_IDL/util/utl_tmpl/utl_list.cpp @@ -42,8 +42,8 @@ *INDIRECT AND CONSEQUENTIAL DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE *POSSIBILITY OF SUCH DAMAGES. * - *SunSoft, Inc. - *2550 Garcia Avenue + *SunSoft, Inc. + *2550 Garcia Avenue *Mountain View, California 94043 * * @@ -69,7 +69,7 @@ ACE_RCSID(utl_tmpl, utl_list, "$Id$") template<class L, class T> UTL_List<L, T>::UTL_List(T *c, L *l) : pd_car_data(c), - pd_cdr_data(l) + pd_cdr_data(l) { } diff --git a/TAO/TAO_IDL/util/utl_tmpl/utl_namelist.cpp b/TAO/TAO_IDL/util/utl_tmpl/utl_namelist.cpp index f181d60648a..b520137cb73 100644 --- a/TAO/TAO_IDL/util/utl_tmpl/utl_namelist.cpp +++ b/TAO/TAO_IDL/util/utl_tmpl/utl_namelist.cpp @@ -42,8 +42,8 @@ *INDIRECT AND CONSEQUENTIAL DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE *POSSIBILITY OF SUCH DAMAGES. * - *SunSoft, Inc. - *2550 Garcia Avenue + *SunSoft, Inc. + *2550 Garcia Avenue *Mountain View, California 94043 * * |