diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-01-26 22:14:36 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-01-26 22:14:36 +0000 |
commit | a956b75b3b217fbfb63f5b85c29af0473349be9f (patch) | |
tree | 78ccb0f867e713e482f071c8d10108fa583cbe3d | |
parent | 0e444c708e4a80cb93cfa57e9d6ed0b07ee1caab (diff) | |
download | ATCD-a956b75b3b217fbfb63f5b85c29af0473349be9f.tar.gz |
Try to get back earlier functionality.
5 files changed, 10 insertions, 101 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_interface/cdr_op_ch.cpp b/TAO/TAO_IDL/be/be_visitor_interface/cdr_op_ch.cpp index 302733b1d11..27bc2b50203 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/cdr_op_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/cdr_op_ch.cpp @@ -54,10 +54,10 @@ be_visitor_interface_cdr_op_ch::visit_interface (be_interface *node) // generate the CDR << and >> operator declarations os->indent (); - *os << idl_global->stub_export_macro () << " CORBA::Boolean" << be_nl + *os << idl_global->stub_export_macro () << " CORBA::Boolean " << "operator<< (TAO_OutputCDR &, const " << node->full_name () << "_ptr );" << be_nl; - *os << idl_global->stub_export_macro () << " CORBA::Boolean" << be_nl + *os << idl_global->stub_export_macro () << " CORBA::Boolean " << "operator>> (TAO_InputCDR &, " << node->full_name () << "_ptr &);\n"; 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 ffc729c87e9..339c49085b1 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 @@ -45,22 +45,11 @@ be_visitor_interface_fwd_cdr_op_ch::~be_visitor_interface_fwd_cdr_op_ch (void) int be_visitor_interface_fwd_cdr_op_ch::visit_interface_fwd (be_interface_fwd *node) { - // No CDR operations for locality constraint interfaces. - if (idl_global->gen_locality_constraint ()) - return 0; - if (node->cli_hdr_cdr_op_gen () || node->imported ()) - return 0; + AST_Interface *fd = node->full_definition (); - TAO_OutStream *os = this->ctx_->stream (); - - // generate the CDR << and >> operator declarations - os->indent (); - *os << idl_global->stub_export_macro () << " CORBA::Boolean" << be_nl - << "operator<< (TAO_OutputCDR &, const " << node->full_name () - << "_ptr );" << be_nl; - *os << idl_global->stub_export_macro () << " CORBA::Boolean" << be_nl - << "operator>> (TAO_InputCDR &, " - << node->full_name () << "_ptr &);\n"; + if (!fd->is_defined ()) + { + } node->cli_hdr_cdr_op_gen (1); 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 dc1fafebb31..a9b0bc4f2c4 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 @@ -90,51 +90,6 @@ be_visitor_interface_fwd_ch::visit_interface_fwd (be_interface_fwd *node) } // generate the endif macro os->gen_endif (); - - // now the interface definition itself - os->gen_ifdef_macro (node->flat_name ()); - - // now generate the class definition - *os << "// Declarations necessary for use of forward declared" << be_nl; - *os << "// interface as a member or parameter." << be_nl; - *os << "class " << idl_global->stub_export_macro () - << " " << node->local_name (); - - // We are here only if we are a forward declared interface that is - // not defined later in the same file. We do not need to worry here - // about what interface(s) we may actually inherit from, if any. - *os << " : public virtual ACE_CORBA_1 (Object)" << be_nl; - - // generate the body - - *os << "{" << be_nl - << "public:" << be_idt_nl - - // generate the static _duplicate, _narrow, and _nil operations - << "// the static operations" << be_nl - << "static " << node->local_name () << "_ptr " << "_duplicate (" - << node->local_name () << "_ptr obj);" << be_nl - << "static " << node->local_name () << "_ptr " - << "_narrow (" << be_idt << be_idt_nl - << "CORBA::Object_ptr obj," << be_nl - << "CORBA::Environment &env = " << be_idt_nl - << "TAO_default_environment ()" - << be_uidt << be_uidt_nl - << ");" << be_uidt_nl; - - // This method is defined in the header file to workaround old - // g++ problems - *os << "static " << node->local_name () << "_ptr _nil (void)" - << be_idt_nl << "{" << be_idt_nl - << "return (" << node->name () << "_ptr)0;" << be_uidt_nl - << "}" << be_uidt;// << "\n\n"; - - *os << be_uidt <<be_uidt_nl; - *os << "};\n\n"; - - os->gen_endif (); - node->cli_hdr_gen (I_TRUE); } - return 0; -} + return 0;} diff --git a/TAO/TAO_IDL/be/be_visitor_interface_fwd/interface_fwd_ci.cpp b/TAO/TAO_IDL/be/be_visitor_interface_fwd/interface_fwd_ci.cpp index 301ef9ce115..021fc332da2 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface_fwd/interface_fwd_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface_fwd/interface_fwd_ci.cpp @@ -45,6 +45,8 @@ be_visitor_interface_fwd_ci::~be_visitor_interface_fwd_ci (void) int be_visitor_interface_fwd_ci::visit_interface_fwd (be_interface_fwd *node) { + TAO_OutStream *os = this->ctx_->stream (); + if (!node->cli_inline_gen () && !node->imported ()) { #if 0 @@ -61,4 +63,4 @@ be_visitor_interface_fwd_ci::visit_interface_fwd (be_interface_fwd *node) node->cli_inline_gen (I_TRUE); } return 0; -} + } diff --git a/TAO/TAO_IDL/be/be_visitor_scope.cpp b/TAO/TAO_IDL/be/be_visitor_scope.cpp index d3104826ad9..e0b68c22751 100644 --- a/TAO/TAO_IDL/be/be_visitor_scope.cpp +++ b/TAO/TAO_IDL/be/be_visitor_scope.cpp @@ -71,43 +71,6 @@ be_visitor_scope::visit_scope (be_scope *node) } - // If this is a forward delcared interface that is later defined, - // we can skip this node altogether. - if (d->node_type () == AST_Decl::NT_interface_fwd) - { - AST_InterfaceFwd *ifd = AST_InterfaceFwd::narrow_from_decl (d); - AST_Interface *fd = ifd->full_definition (); - - if (fd->is_defined ()) - { - be_interface_fwd *node = be_interface_fwd::narrow_from_decl (ifd); - - if (!node->cli_hdr_gen () && !node->imported ()) - { - TAO_OutStream *os = this->ctx_->stream (); - - os->indent (); // start from the current - - // generate a forward declaration of the class - *os << "class " << node->local_name () << ";" << be_nl; - - // generate the ifdefined macro for the _ptr type - os->gen_ifdef_macro (node->flat_name (), "_ptr"); - - // generate the _ptr _var and _out declarations - *os << "typedef " << node->local_name () << " *" << node->local_name () - << "_ptr;" << be_nl; - *os << "class " << node->local_name () << "_var;" << be_nl; - *os << "class " << node->local_name () << "_out;" << be_nl; - - os->gen_endif (); - } - - si->next (); - continue; - } - } - be_decl *bd = be_decl::narrow_from_decl (d); // set the scope node as "node" in which the code is being |