From 72692a5d340d8296eba2e03925c17649e9e19882 Mon Sep 17 00:00:00 2001 From: parsons Date: Wed, 19 Mar 2003 15:43:21 +0000 Subject: ChangeLogTag: Wed Mar 19 09:38:00 2003 Jeff Parsons --- TAO/ChangeLog | 19 + TAO/TAO_IDL/be/be_interface.cpp | 642 ++------------------- TAO/TAO_IDL/be/be_type.cpp | 35 +- .../be/be_visitor_component/component_ch.cpp | 62 +- .../be/be_visitor_component/component_cs.cpp | 4 +- TAO/TAO_IDL/be/be_visitor_interface/amh_ch.cpp | 47 +- .../be/be_visitor_interface/interface_ch.cpp | 64 +- .../be/be_visitor_interface/interface_cs.cpp | 4 +- .../be_visitor_interface_fwd/interface_fwd_ch.cpp | 50 +- TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp | 157 ++++- TAO/TAO_IDL/be/be_visitor_sequence/sequence_ci.cpp | 34 +- TAO/TAO_IDL/be/be_visitor_sequence/sequence_cs.cpp | 4 +- TAO/TAO_IDL/be_include/be_interface.h | 36 +- TAO/TAO_IDL/be_include/be_type.h | 23 - 14 files changed, 270 insertions(+), 911 deletions(-) diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 5047eeba47c..a65d0c66497 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,22 @@ +Wed Mar 19 09:38:00 2003 Jeff Parsons + + * TAO_IDL/be/be_interface.cpp: + * TAO_IDL/be/be_type.cpp: + * TAO_IDL/be/be_visitor_component/component_ch.cpp: + * TAO_IDL/be/be_visitor_component/component_cs.cpp: + * TAO_IDL/be/be_visitor_interface/amh_ch.cpp: + * TAO_IDL/be/be_visitor_interface/interface_ch.cpp: + * TAO_IDL/be/be_visitor_interface/interface_cs.cpp: + * TAO_IDL/be/be_visitor_interface_fwd/interface_fwd_ch.cpp: + * TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp: + * TAO_IDL/be/be_visitor_sequence/sequence_ci.cpp: + * TAO_IDL/be/be_visitor_sequence/sequence_cs.cpp: + * TAO_IDL/be_include/be_interface.h: + * TAO_IDL/be_include/be_type.h: + + Changes to code generation for sequences, _var and _out classes. + This is just a start, lots more to come. + Tue Mar 18 21:42:03 2003 Jeff Parsons * tao/DomainC.cpp: diff --git a/TAO/TAO_IDL/be/be_interface.cpp b/TAO/TAO_IDL/be/be_interface.cpp index 5fa13c7536f..d5499765b9f 100644 --- a/TAO/TAO_IDL/be/be_interface.cpp +++ b/TAO/TAO_IDL/be/be_interface.cpp @@ -45,7 +45,9 @@ be_interface::be_interface (void) : skel_count_ (0), in_mult_inheritance_ (-1), original_interface_ (0), - has_mixed_parentage_ (-1) + has_mixed_parentage_ (-1), + var_out_seq_decls_gen_ (0), + var_out_seq_defns_gen_ (0) { ACE_NEW (this->strategy_, be_interface_default_strategy (this)); @@ -74,7 +76,9 @@ be_interface::be_interface (UTL_ScopedName *n, skel_count_ (0), in_mult_inheritance_ (-1), original_interface_ (0), - has_mixed_parentage_ (-1) + has_mixed_parentage_ (-1), + var_out_seq_decls_gen_ (0), + var_out_seq_defns_gen_ (0) { ACE_NEW (this->strategy_, be_interface_default_strategy (this)); @@ -532,593 +536,45 @@ be_interface::gen_stub_ctor (TAO_OutStream *os) } } -// Generate the var definition. If is not 0, generate -// the var defn for that name. Otherwise, do it for the interface you -// are visiting (this). -int -be_interface::gen_var_defn (char *interface_name) +// Generate the forward declarations and static methods used by the +// interface _var and _out template classes, as well as by the +// template sequence classes for object references. +void +be_interface:: gen_var_out_seq_decls (void) { - char namebuf [NAMEBUFSIZE]; // names - - // Decide which name to use. - if (interface_name == 0) - { - interface_name = (char *) this->local_name (); - } - - // Buffer with name of the var class. - ACE_OS::memset (namebuf, - '\0', - NAMEBUFSIZE); + TAO_OutStream *os = tao_cg->client_header (); - ACE_OS::sprintf (namebuf, - "%s_var", - interface_name); - - TAO_OutStream *ch = tao_cg->client_header (); - - // Generate the var definition (always in the client header). - // Depending upon the data type, there are some differences which we account - // for over here. - - *ch << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl + *os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl << "// " << __FILE__ << ":" << __LINE__ << be_nl << be_nl; - // Note the private inheritance from TAO_Base_var to emphasize that - // a given _var does not satisfy the IS-A relationship. _var - // classes are merely IMPLEMENTED-IN-TERMS-OF TAO_Base_var. This - // also invalidates assignments like: - // Foo_var v; - // TAO_Base_var * t = &v; - *ch << "class " << be_global->stub_export_macro () - << " " << namebuf - << " : private TAO_Base_var" << be_nl; - *ch << "{" << be_nl; - *ch << "public:" << be_idt_nl; - - // Default constructor. - *ch << namebuf << " (void); // default constructor" << be_nl; - *ch << namebuf << " (" << interface_name - << "_ptr p)" - << " : ptr_ (p) {} " << be_nl; - - // Copy constructor. - *ch << namebuf << " (const " << namebuf - << " &); // copy constructor" << be_nl; - - // Destructor. - *ch << "~" << namebuf - << " (void); // destructor" << be_nl; - *ch << be_nl; - - // Assignment operator from a pointer. - *ch << namebuf << " &operator= (" << interface_name - << "_ptr);" << be_nl; - - // Assignment from _var. - *ch << namebuf << " &operator= (const " << namebuf - << " &);" << be_nl; - - // Arrow operator - *ch << interface_name << "_ptr operator-> (void) const;" << be_nl; - *ch << be_nl; - - // Other extra types (cast operators, [] operator, and others). - *ch << "operator const " << interface_name - << "_ptr &() const;" << be_nl; - *ch << "operator " << interface_name - << "_ptr &();" << be_nl; - - *ch << "// in, inout, out, _retn " << be_nl; - // The return types of in, out, inout, and _retn are based on the parameter - // passing rules and the base type. - *ch << interface_name << "_ptr in (void) const;" << be_nl; - *ch << interface_name << "_ptr &inout (void);" << be_nl; - *ch << interface_name << "_ptr &out (void);" << be_nl; - *ch << interface_name << "_ptr _retn (void);" << be_nl; - - // Generate an additional member function that returns the - // underlying pointer. - *ch << interface_name << "_ptr ptr (void) const;" << be_nl << be_nl; - - // Hooks for non-defined forward declared interfaces. - *ch << "// Hooks used by template sequence and object manager classes" - << be_nl - << "// for non-defined forward declared interfaces." << be_nl - << "static " << interface_name - << "_ptr tao_duplicate (" - << interface_name << "_ptr);" << be_nl - << "static void tao_release (" << interface_name - << "_ptr);" << be_nl - << "static " << interface_name - << "_ptr tao_nil (void);" << be_nl - << "static " << interface_name - << "_ptr tao_narrow (" << be_idt << be_idt_nl; - - if (this->is_abstract ()) - { - *ch << "CORBA::AbstractBase *" << be_nl; - } - else if (this->node_type () == AST_Decl::NT_component) - { - *ch << "Components::CCMObject *" << be_nl; - } - else - { - *ch << "CORBA::Object *" << be_nl; - } - - *ch << "ACE_ENV_ARG_DECL" << be_uidt_nl - << ");" << be_uidt_nl; - - if (this->is_abstract ()) - { - *ch << "static CORBA::AbstractBase *"; - } - else if (this->node_type () == AST_Decl::NT_component) - { - *ch << "Components::CCMObject *"; - } - else - { - *ch << "static CORBA::Object *"; - } - - *ch << " tao_upcast (void *);" << be_uidt_nl << be_nl; - - // Private. - *ch << "private:" << be_idt_nl; - *ch << interface_name << "_ptr ptr_;" << be_nl; - *ch << "// Unimplemented - prevents widening assignment." << be_nl; - *ch << interface_name << "_var (const TAO_Base_var & rhs);" << be_nl; - *ch << interface_name << "_var & operator= (const TAO_Base_var & rhs);" - << be_uidt_nl; - - *ch << "};"; + const char *lname = this->local_name (); - return 0; -} - -// Implementation of the _var class. All of these get generated in the -// inline file. -// If the argument is 0, then use the name in , otherwise use -// the name given. Just making the class more useful. -int -be_interface::gen_var_impl (char *interface_local_name, - char *interface_full_name) -{ - char fname [NAMEBUFSIZE]; // to hold the full and - char lname [NAMEBUFSIZE]; // local _var names - - // Decide on the names to use. - // Even if one argument is 0, there is no point using the - // arguments. Let us then use the name in this node. - if (interface_local_name == 0 || interface_full_name == 0) - { - interface_local_name = (char *) this->local_name (); - interface_full_name = (char *) this->full_name (); - } - - ACE_OS::memset (fname, - '\0', - NAMEBUFSIZE); - - ACE_OS::sprintf (fname, - "%s_var", - interface_full_name); - - ACE_OS::memset (lname, - '\0', - NAMEBUFSIZE); - - ACE_OS::sprintf (lname, - "%s_var", - interface_local_name); - - TAO_OutStream *cs = tao_cg->client_stubs (); - - *cs << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; - // Generate the var implementation in the inline file - // Depending upon the data type, there are some differences which we - // account for over here. - - *cs << be_nl << be_nl - << "// *************************************************************" - << be_nl - << "// " << fname << be_nl - << "// *************************************************************" - << be_nl << be_nl; - - // Default constructor. - *cs << fname << "::" << lname - << " (void)" << be_idt_nl; - *cs << ": ptr_ (" << interface_local_name - << "::_nil ())" << be_uidt_nl; - *cs << "{}" << be_nl << be_nl; - - // The additional ptr () member function. This member function must be - // defined before the remaining member functions including the copy - // constructor because this inline function is used elsewhere. Hence to make - // inlining of this function possible, we must define it before its use. - *cs << "::" << interface_full_name - << "_ptr" << be_nl; - *cs << fname << "::ptr (void) const" << be_nl; - *cs << "{" << be_idt_nl; - *cs << "return this->ptr_;" << be_uidt_nl; - *cs << "}" << be_nl << be_nl; - - // Copy constructor. - *cs << fname << "::" << lname - << " (const ::" << interface_full_name - << "_var &p)" << be_nl; - *cs << " : TAO_Base_var ()," << be_nl; - *cs << " ptr_ (" << interface_local_name - << "::_duplicate (p.ptr ()))" << be_nl; - *cs << "{}" << be_nl << be_nl; - - // Destructor. - *cs << fname << "::~" << lname - << " (void)" << be_nl; - *cs << "{" << be_idt_nl; - *cs << "CORBA::release (this->ptr_);" << be_uidt_nl; - *cs << "}" << be_nl << be_nl; - - // Assignment operator. - *cs << fname << " &" << be_nl; - *cs << fname << "::operator= (" << interface_local_name - << "_ptr p)" << be_nl; - *cs << "{" << be_idt_nl; - *cs << "CORBA::release (this->ptr_);" << be_nl; - *cs << "this->ptr_ = p;" << be_nl; - *cs << "return *this;" << be_uidt_nl; - *cs << "}" << be_nl << be_nl; - - // Assignment operator from _var. - *cs << fname << " &" << be_nl; - *cs << fname << "::operator= (const " - << "::" << interface_full_name - << "_var &p)" << be_nl; - *cs << "{" << be_idt_nl; - *cs << "if (this != &p)" << be_nl; - *cs << "{" << be_idt_nl; - *cs << "CORBA::release (this->ptr_);" << be_nl; - *cs << "this->ptr_ = ::" << interface_full_name - << "::_duplicate (p.ptr ());" << be_uidt_nl; - *cs << "}" << be_nl; - *cs << "return *this;" << be_uidt_nl; - *cs << "}" << be_nl << be_nl; - - // Other extra methods - cast operator (). - *cs << fname << "::operator const ::" << interface_full_name - << "_ptr &() const // cast" << be_nl; - *cs << "{" << be_idt_nl; - *cs << "return this->ptr_;" << be_uidt_nl; - *cs << "}" << be_nl << be_nl; - - *cs << fname << "::operator ::" << interface_full_name - << "_ptr &() // cast " << be_nl; - *cs << "{" << be_idt_nl; - *cs << "return this->ptr_;" << be_uidt_nl; - *cs << "}" << be_nl << be_nl; - - // operator-> - *cs << "::" << interface_full_name - << "_ptr" << be_nl; - *cs << fname << "::operator-> (void) const" << be_nl; - *cs << "{" << be_idt_nl; - *cs << "return this->ptr_;" << be_uidt_nl; - *cs << "}" << be_nl << be_nl; - - // in, inout, out, and _retn - *cs << "::" << interface_full_name - << "_ptr" << be_nl; - *cs << fname << "::in (void) const" << be_nl; - *cs << "{" << be_idt_nl; - *cs << "return this->ptr_;" << be_uidt_nl; - *cs << "}" << be_nl << be_nl; - - *cs << "::" << interface_full_name - << "_ptr &" << be_nl; - *cs << fname << "::inout (void)" << be_nl; - *cs << "{" << be_idt_nl; - *cs << "return this->ptr_;" << be_uidt_nl; - *cs << "}" << be_nl << be_nl; - - *cs << "::" << interface_full_name - << "_ptr &" << be_nl; - *cs << fname << "::out (void)" << be_nl; - *cs << "{" << be_idt_nl; - *cs << "CORBA::release (this->ptr_);" << be_nl; - *cs << "this->ptr_ = ::" << interface_full_name - << "::_nil ();" << be_nl; - *cs << "return this->ptr_;" << be_uidt_nl; - *cs << "}" << be_nl << be_nl; - - *cs << "::" << interface_full_name - << "_ptr" << be_nl; - *cs << fname << "::_retn (void)" << be_nl; - *cs << "{" << be_idt_nl; - *cs << "// yield ownership of managed obj reference" << be_nl; - *cs << "::" << interface_full_name - << "_ptr val = this->ptr_;" << be_nl; - *cs << "this->ptr_ = ::" << interface_full_name - << "::_nil ();" << be_nl; - *cs << "return val;" << be_uidt_nl; - *cs << "}" << be_nl << be_nl; - - // Hooks for the flat name global functions used by references to - // non-defined interfaces. - *cs << "::" << interface_full_name - << "_ptr" << be_nl - << fname << "::tao_duplicate (" - << interface_local_name << "_ptr p)" << be_nl - << "{" << be_idt_nl - << "return ::" << interface_full_name - << "::_duplicate (p);" - << be_uidt_nl - << "}" << be_nl << be_nl; - - *cs << "void" << be_nl - << fname << "::tao_release (" << interface_local_name - << "_ptr p)" << be_nl - << "{" << be_idt_nl - << "CORBA::release (p);" << be_uidt_nl - << "}" << be_nl << be_nl; - - *cs << "::" << interface_full_name << "_ptr" << be_nl - << fname << "::tao_nil (void)" << be_nl - << "{" << be_idt_nl - << "return ::" << interface_full_name - << "::_nil ();" << be_uidt_nl - << "}" << be_nl << be_nl; - - *cs << "::" << interface_full_name << "_ptr" << be_nl - << fname << "::tao_narrow (" << be_idt << be_idt_nl; - - if (this->is_abstract ()) - { - *cs << "CORBA::AbstractBase *p" << be_nl; - } - else if (this->node_type () == AST_Decl::NT_component) - { - *cs << "Components::CCMObject *p" << be_nl; - } - else - { - *cs << "CORBA::Object *p" << be_nl; - } + *os << "class " << lname << ";" << be_nl + << "typedef " << lname << " *" << lname << "_ptr;" << be_nl + << "struct tao_" << lname << "_life;" << be_nl + << "typedef TAO_Objref_Var_T<" << lname << ", tao_" + << lname << "_life>" << lname << "_var;" << be_nl + << "typedef TAO_Objref_Out_T<" << lname << ", tao_" + << lname << "_life>" << lname << "_out;"; - *cs << "ACE_ENV_ARG_DECL" << be_uidt_nl - << ")" << be_uidt_nl + *os << be_nl << be_nl + << "struct tao_" << lname << "_life" << be_nl << "{" << be_idt_nl - << "return ::" << interface_full_name - << "::_narrow (p ACE_ENV_ARG_PARAMETER);" - << be_uidt_nl - << "}" << be_nl << be_nl; - - if (this->is_abstract ()) - { - *cs << "CORBA::AbstractBase *" << be_nl; - } - else if (this->node_type () == AST_Decl::NT_component) - { - *cs << "Components::CCMObject *" << be_nl; - } - else - { - *cs << "CORBA::Object *" << be_nl; - } - - *cs << fname << "::tao_upcast (void *src)" << be_nl + << "static " << lname << "_ptr tao_duplicate (" + << lname << "_ptr);" << be_nl + << "static void tao_release (" << lname << "_ptr);" << be_nl + << "static " << lname << "_ptr tao_nil (void);" << be_uidt_nl + << "};"; + + *os << be_nl << be_nl + << "struct tao_" << lname << "_cast" << be_nl << "{" << be_idt_nl - << interface_local_name << " **tmp =" << be_idt_nl - << "ACE_static_cast (" << interface_local_name - << " **, src);" - << be_uidt_nl - << "return *tmp;" << be_uidt_nl - << "}"; - - return 0; -} - -// Generate the out definition. If is not 0, generate -// the out defn for that name. Otherwise, do it for the interface you -// are visiting (this). -int -be_interface::gen_out_defn (char *interface_name) -{ - char namebuf [NAMEBUFSIZE]; // to hold the _out name - - // Decide which name to use. - if (interface_name == 0) - interface_name = (char *) this->local_name (); - - // Create the buffer with the name of the out class. - ACE_OS::memset (namebuf, '\0', NAMEBUFSIZE); - ACE_OS::sprintf (namebuf, - "%s_out", - interface_name); - - TAO_OutStream *ch = tao_cg->client_header (); - - *ch << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__ << be_nl << be_nl; - - // Generate the out definition (always in the client header) - *ch << "class " << be_global->stub_export_macro () - << " " << namebuf << be_nl; - *ch << "{" << be_nl; - *ch << "public:" << be_idt_nl; - - // No default constructor. - - // Constructor from a pointer. - *ch << namebuf << " (" << interface_name - << "_ptr &);" << be_nl; - - // Constructor from a _var &. - *ch << namebuf << " (" << interface_name - << "_var &);" << be_nl; - - // Constructor from a _out &. - *ch << namebuf << " (const " << namebuf - << " &);" << be_nl; - - // Assignment operator from a _out & - *ch << namebuf << " &operator= (const " << namebuf - << " &);" << be_nl; - - // Assignment operator from a pointer &, cast operator, ptr fn, operator - // -> and any other extra operators. - // Only interface allows assignment from var &. - *ch << namebuf << " &operator= (const " << interface_name - << "_var &);" << be_nl; - *ch << namebuf << " &operator= (" << interface_name - << "_ptr);" << be_nl; - - // Cast. - *ch << "operator " << interface_name - << "_ptr &();" << be_nl; - - // ptr fn - *ch << interface_name << "_ptr &ptr (void);" << be_nl; - - // operator -> - *ch << interface_name << "_ptr operator-> (void);" << be_uidt_nl << be_nl; - - *ch << "private:" << be_idt_nl; - *ch << interface_name << "_ptr &ptr_;" << be_uidt_nl; - - *ch << "};"; - - return 0; -} - - -// Generate the out class definition. If is not 0, -// generate the out defn for that name. Otherwise, do it for the -// interface you are visiting (this). -int -be_interface::gen_out_impl (char *interface_local_name, - char *interface_full_name) -{ - char fname [NAMEBUFSIZE]; // to hold the full and - char lname [NAMEBUFSIZE]; // local _out names - - // Even if one argument is 0, there is no point using the - // arguments. Let us then use the name in this node. - if (interface_local_name == 0 || interface_full_name == 0) - { - interface_local_name = (char *) local_name (); - interface_full_name = (char *) this->full_name (); - } - - ACE_OS::memset (fname, '\0', NAMEBUFSIZE); - ACE_OS::sprintf (fname, "%s_out", interface_full_name); - - ACE_OS::memset (lname, '\0', NAMEBUFSIZE); - ACE_OS::sprintf (lname, "%s_out", interface_local_name); - - TAO_OutStream *cs = tao_cg->client_stubs (); - - // Generate the var implementation in the inline file - // Depending upon the data type, there are some differences which we account - // for over here. - - *cs << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; - - *cs << be_nl << be_nl - << "// *************************************************************" - << be_nl - << "// " << fname << be_nl - << "// *************************************************************"; - - // Constructor from a _ptr. - *cs << be_nl << be_nl - << fname << "::" << lname - << " (" << interface_local_name - << "_ptr &p)" << be_nl; - *cs << " : ptr_ (p)" << be_nl; - *cs << "{" << be_idt_nl; - *cs << "this->ptr_ = ::" << interface_full_name - << "::_nil ();" << be_uidt_nl; - *cs << "}" << be_nl << be_nl; - - // Constructor from _var &. - *cs << fname << "::" << lname - << " (" << interface_local_name - << "_var &p)" << be_nl; - *cs << " : ptr_ (p.out ())" << be_nl; - *cs << "{" << be_idt_nl; - *cs << "CORBA::release (this->ptr_);" << be_nl; - *cs << "this->ptr_ = ::" << interface_full_name - << "::_nil ();" << be_uidt_nl; - *cs << "}" << be_nl << be_nl; - - // Copy constructor. - *cs << fname << "::" << lname - << " (const ::" << interface_full_name - << "_out &p)" << be_nl; - *cs << " : ptr_ (ACE_const_cast (" << interface_local_name - << "_out &, p).ptr_)" << be_nl; - *cs << "{}" << be_nl << be_nl; - - // Assignment operator from _out &. - *cs << "::" << fname - << " &" << be_nl; - *cs << fname << "::operator= (const ::" << interface_full_name - << "_out &p)" << be_nl; - *cs << "{" << be_idt_nl; - *cs << "this->ptr_ = ACE_const_cast (" << interface_local_name - << "_out&, p).ptr_;" << be_nl; - *cs << "return *this;" << be_uidt_nl; - *cs << "}" << be_nl << be_nl; - - // Assignment operator from _var. - *cs << fname << " &" << be_nl; - *cs << fname << "::operator= (const ::" << interface_full_name - << "_var &p)" << be_nl; - *cs << "{" << be_idt_nl; - *cs << "this->ptr_ = ::" << interface_full_name - << "::_duplicate (p.ptr ());" << be_nl; - *cs << "return *this;" << be_uidt_nl; - *cs << "}" << be_nl << be_nl; - - // Assignment operator from _ptr. - *cs << fname << " &" << be_nl; - *cs << fname << "::operator= (" << interface_local_name - << "_ptr p)" << be_nl; - *cs << "{" << be_idt_nl; - *cs << "this->ptr_ = p;" << be_nl; - *cs << "return *this;" << be_uidt_nl; - *cs << "}" << be_nl << be_nl; - - // Other extra methods - cast operator (). - *cs << fname << "::operator ::" << interface_full_name - << "_ptr &() // cast" << be_nl; - *cs << "{" << be_idt_nl; - *cs << "return this->ptr_;" << be_uidt_nl; - *cs << "}" << be_nl << be_nl; - - // ptr function. - *cs << "::" << interface_full_name - << "_ptr &" << be_nl; - *cs << fname << "::ptr (void)" << be_nl; - *cs << "{" << be_idt_nl; - *cs << "return this->ptr_;" << be_uidt_nl; - *cs << "}" << be_nl << be_nl; - - // operator-> - *cs << "::" << interface_full_name - << "_ptr" << be_nl; - *cs << fname << "::operator-> (void)" << be_nl; - *cs << "{" << be_idt_nl; - *cs << "return this->ptr_;" << be_uidt_nl; - *cs << "}"; - - return 0; + << "static " << lname << "_ptr tao_narrow (" << be_idt << be_idt_nl + << "CORBA::Object_ptr" << be_nl + << "ACE_ENV_ARG_DECL" << be_uidt_nl + << ");" << be_uidt_nl + << "static CORBA::Object_ptr tao_upcast (void *);" << be_uidt_nl + << "};"; } // **************************************************************** @@ -2529,6 +1985,30 @@ be_interface::has_mixed_parentage (void) return this->has_mixed_parentage_; } +int +be_interface::var_out_seq_decls_gen (void) const +{ + return this->var_out_seq_decls_gen_; +} + +void +be_interface::var_out_seq_decls_gen (int val) +{ + this->var_out_seq_decls_gen_ = val; +} + +int +be_interface::var_out_seq_defns_gen (void) const +{ + return this->var_out_seq_defns_gen_; +} + +void +be_interface::var_out_seq_defns_gen (int val) +{ + this->var_out_seq_defns_gen_ = val; +} + const char * be_interface::base_proxy_impl_name (void) { diff --git a/TAO/TAO_IDL/be/be_type.cpp b/TAO/TAO_IDL/be/be_type.cpp index e6726ad85c3..398ba7a1ecb 100644 --- a/TAO/TAO_IDL/be/be_type.cpp +++ b/TAO/TAO_IDL/be/be_type.cpp @@ -23,6 +23,7 @@ #include "be_scope.h" #include "be_visitor.h" #include "be_codegen.h" +#include "be_helper.h" #include "utl_identifier.h" #include "idl_defines.h" @@ -180,40 +181,6 @@ be_type::nested_sp_type_name (be_decl *use_scope, prefix); } -// ***************************** -// CODE GENERATION -// ***************************** - -// Generate the _var definition for ourself. -int -be_type::gen_var_defn (char *) -{ - return 0; -} - -// Implementation of the _var class. All of these get generated -// in the inline file -int -be_type::gen_var_impl (char *, - char *) -{ - return 0; -} - -// Generate the _out definition. -int -be_type::gen_out_defn (char *) -{ - return 0; -} - -int -be_type::gen_out_impl (char *, - char *) -{ - return 0; -} - AST_Decl::NodeType be_type::base_node_type (void) const { diff --git a/TAO/TAO_IDL/be/be_visitor_component/component_ch.cpp b/TAO/TAO_IDL/be/be_visitor_component/component_ch.cpp index 43506413a5d..00e54c68f37 100644 --- a/TAO/TAO_IDL/be/be_visitor_component/component_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_component/component_ch.cpp @@ -43,67 +43,13 @@ be_visitor_component_ch::visit_component (be_component *node) return 0; } - TAO_OutStream *os = this->ctx_->stream (); - - // == STEP 1: generate the class name and class names we inherit == - - *os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; - - // Generate the ifdefined macro for the _ptr type. - os->gen_ifdef_macro (node->flat_name (), - "_ptr"); - - // The following two are required to be under the ifdef macro to avoid - // multiple declarations. - - // Forward declaration. - *os << be_nl << be_nl << "class " << node->local_name () << ";"; - // Generate the _ptr declaration. - *os << be_nl << "typedef " << node->local_name () << " *" - << node->local_name () << "_ptr;"; - - os->gen_endif (); - - // Generate the ifdefined macro for the var type. - os->gen_ifdef_macro (node->flat_name (), "_var"); - - // Generate the _var declaration. - if (node->gen_var_defn () == -1) - { - ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_visitor_interface_ch::" - "visit_interface - " - "codegen for _var failed\n"), - -1); - } - - os->gen_endif (); - - // Generate the ifdef macro for the _out class. - os->gen_ifdef_macro (node->flat_name (), - "_out"); - - // Generate the _out declaration. - if (node->gen_out_defn () == -1) + if (node->var_out_seq_decls_gen () == 0) { - ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_visitor_interface_ch::" - "visit_interface - " - "codegen for _out failed\n"), - -1); + node->gen_var_out_seq_decls (); + node->var_out_seq_decls_gen (1); } - // Generate the endif macro. - os->gen_endif (); - - // The above code could have been executed by the forward declaration - // as long as it wasn't imported. The code below can only be - // executed by an interface definition, also non-imported. - if (node->imported ()) - { - return 0; - } + TAO_OutStream *os = this->ctx_->stream (); *os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl << "// " << __FILE__ << ":" << __LINE__; diff --git a/TAO/TAO_IDL/be/be_visitor_component/component_cs.cpp b/TAO/TAO_IDL/be/be_visitor_component/component_cs.cpp index 7c8d52c4a9f..5cf30d20a68 100644 --- a/TAO/TAO_IDL/be/be_visitor_component/component_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_component/component_cs.cpp @@ -118,7 +118,7 @@ be_visitor_component_cs::visit_component (be_component *node) << " **, src);" << be_uidt_nl << "return *tmp;" << be_uidt_nl << "}" << be_nl << be_nl; - +/* // Generate the _var class. if (node->gen_var_impl () == -1) { @@ -138,7 +138,7 @@ be_visitor_component_cs::visit_component (be_component *node) "codegen for _out failed\n"), -1); } - +*/ be_visitor_context ctx (*this->ctx_); // Interceptor classes. The interceptors helper classes must be diff --git a/TAO/TAO_IDL/be/be_visitor_interface/amh_ch.cpp b/TAO/TAO_IDL/be/be_visitor_interface/amh_ch.cpp index 574cee004b2..a51bed9a6a0 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/amh_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/amh_ch.cpp @@ -29,53 +29,20 @@ be_visitor_amh_interface_ch::~be_visitor_amh_interface_ch (void) int be_visitor_amh_interface_ch::visit_interface (be_interface *node) { - TAO_OutStream *os = this->ctx_->stream (); - // If not already generated and not imported. - if (!node->cli_hdr_gen () && !node->imported ()) + if (node->cli_hdr_gen () || node->imported ()) { - // == STEP 1: generate the class name and class names we inherit == - - // Generate the ifdefined macro for the _ptr type. - os->gen_ifdef_macro (node->flat_name (), - "_ptr"); - - // The following two are required to be under the ifdef macro to avoid - // multiple declarations. - - // Forward declaration. - *os << "class " << node->local_name () << ";" << be_nl; - // Generate the _ptr declaration. - *os << "typedef " << node->local_name () << " *" - << node->local_name () << "_ptr;" << be_nl; - - os->gen_endif (); - - // Generate the ifdefined macro for the var type. - os->gen_ifdef_macro (node->flat_name (), "_var"); - - // Generate the _var declaration. - if (node->gen_var_defn () == -1) - { - ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_visitor_interface_ch::" - "visit_interface - " - "codegen for _var failed\n"), - -1); - } - - os->gen_endif (); - + return 0; } - // The above code could have been executed by the forward declaration - // as long as it wasn't imported. The code below can only be - // executed by an interface definition, also non-imported. - if (node->imported ()) + if (node->var_out_seq_decls_gen () == 0) { - return 0; + node->gen_var_out_seq_decls (); + node->var_out_seq_decls_gen (1); } + TAO_OutStream *os = this->ctx_->stream (); + // Now the interface definition itself. os->gen_ifdef_macro (node->flat_name ()); diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp index e7efafda2f3..550c5466e96 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_ch.cpp @@ -43,68 +43,14 @@ be_visitor_interface_ch::visit_interface (be_interface *node) return 0; } - TAO_OutStream *os = this->ctx_->stream (); - long i; - - // == STEP 1: generate the class name and class names we inherit == - - *os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; - - // Generate the ifdefined macro for the _ptr type. - os->gen_ifdef_macro (node->flat_name (), - "_ptr"); - - // The following two are required to be under the ifdef macro to avoid - // multiple declarations. - - // Forward declaration. - *os << be_nl << be_nl << "class " << node->local_name () << ";"; - // Generate the _ptr declaration. - *os << be_nl << "typedef " << node->local_name () << " *" - << node->local_name () << "_ptr;"; - - os->gen_endif (); - - // Generate the ifdefined macro for the var type. - os->gen_ifdef_macro (node->flat_name (), "_var"); - - // Generate the _var declaration. - if (node->gen_var_defn () == -1) - { - ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_visitor_interface_ch::" - "visit_interface - " - "codegen for _var failed\n"), - -1); - } - - os->gen_endif (); - - // Generate the ifdef macro for the _out class. - os->gen_ifdef_macro (node->flat_name (), - "_out"); - - // Generate the _out declaration. - if (node->gen_out_defn () == -1) + if (node->var_out_seq_decls_gen () == 0) { - ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_visitor_interface_ch::" - "visit_interface - " - "codegen for _out failed\n"), - -1); + node->gen_var_out_seq_decls (); + node->var_out_seq_decls_gen (1); } - // Generate the endif macro. - os->gen_endif (); - - // The above code could have been executed by the forward declaration - // as long as it wasn't imported. The code below can only be - // executed by an interface definition, also non-imported. - if (node->imported ()) - { - return 0; - } + TAO_OutStream *os = this->ctx_->stream (); + long i; *os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl << "// " << __FILE__ << ":" << __LINE__; diff --git a/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp b/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp index f1111577b77..dc24958e287 100644 --- a/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_interface/interface_cs.cpp @@ -163,7 +163,7 @@ be_visitor_interface_cs::visit_interface (be_interface *node) << "{" << be_idt_nl << "return p->marshal (strm);" << be_uidt_nl << "}"; - +/* // Generate the _var class. if (node->gen_var_impl () == -1) { @@ -183,7 +183,7 @@ be_visitor_interface_cs::visit_interface (be_interface *node) "codegen for _out failed\n"), -1); } - +*/ be_visitor_context ctx = (*this->ctx_); // Interceptor classes. The interceptors helper classes must be 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 dba8cd37da6..878a05e9549 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 @@ -47,24 +47,6 @@ be_visitor_interface_fwd_ch::visit_interface_fwd (be_interface_fwd *node) return 0; } - TAO_OutStream *os = this->ctx_->stream (); - - *os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl - << "// " << __FILE__ << ":" << __LINE__; - - // All we do in this is generate a forward declaration of the class. - *os << be_nl << be_nl << "class " << node->local_name () << ";"; - - // Generate the ifdefined macro for the _ptr type. - os->gen_ifdef_macro (node->flat_name (), "_ptr"); - - // Generate the _ptr typedef. - *os << be_nl << be_nl - << "typedef " << node->local_name () << " *" << node->local_name () - << "_ptr;"; - - os->gen_endif (); - AST_Interface *fd = node->full_definition (); be_interface *bfd = be_interface::narrow_from_decl (fd); @@ -74,38 +56,12 @@ be_visitor_interface_fwd_ch::visit_interface_fwd (be_interface_fwd *node) be_global->non_defined_interfaces.enqueue_tail (node); } - // Enclose under an ifdef macro. - os->gen_ifdef_macro (node->flat_name (), "_var"); - - // Generate the _var declaration. - if (bfd->gen_var_defn () == -1) + if (bfd->var_out_seq_decls_gen () == 0) { - ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_visitor_interface_fwd_ch::" - "visit_interface_fwd - " - "codegen for _var failed\n"), - -1); + bfd->gen_var_out_seq_decls (); + bfd->var_out_seq_decls_gen (1); } - // Generate an endif. - os->gen_endif (); - - // Enclose under an ifdef macro. - os->gen_ifdef_macro (node->flat_name (), "_out"); - - // generate the _out declaration - ORBOS/97-05-15 pg 16-20 spec - if (bfd->gen_out_defn () == -1) - { - ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_visitor_interface_fwd_ch::" - "visit_interface_fwd - " - "codegen for _out failed\n"), - -1); - } - - // Generate the endif macro. - os->gen_endif (); - node->cli_hdr_gen (I_TRUE); return 0; } 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 5f0d748aa38..1b595622305 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ch.cpp @@ -241,7 +241,7 @@ be_visitor_sequence_ch::instantiate_sequence (be_sequence *node) case be_sequence::MNG_ABSTRACT: if (node->unbounded ()) { - this->gen_unbounded_obj_sequence (node); +// this->gen_unbounded_obj_sequence (node); } else { @@ -314,9 +314,6 @@ be_visitor_sequence_ch::instantiate_sequence (be_sequence *node) int be_visitor_sequence_ch::visit_sequence (be_sequence *node) { - be_type *bt = 0; - TAO_OutStream *os = this->ctx_->stream (); - if (node->defined_in () == 0) { // The node is a nested sequence, and has had no scope defined. @@ -337,7 +334,7 @@ int be_visitor_sequence_ch::visit_sequence (be_sequence *node) { return 0; } - +/* // Instantiation. if (this->instantiate_sequence (node) == -1) @@ -353,6 +350,9 @@ int be_visitor_sequence_ch::visit_sequence (be_sequence *node) // Generate the ifdefined macro for the sequence type. os->gen_ifdef_macro (node->flat_name ()); +*/ + be_type *bt = 0; + TAO_OutStream *os = this->ctx_->stream (); // Retrieve the base type since we may need to do some code // generation for the base type. @@ -367,9 +367,149 @@ int be_visitor_sequence_ch::visit_sequence (be_sequence *node) -1); } + AST_Decl *parent = ScopeAsDecl (bt->defined_in ()); + *os << be_nl << be_nl << "// TAO_IDL - Generated from" << be_nl << "// " << __FILE__ << ":" << __LINE__ << be_nl << be_nl; + // Generate the appropriate sequence type. + switch (node->managed_type ()) + { + case be_sequence::MNG_OBJREF: + if (node->unbounded ()) + { + *os << "typedef" << be_idt_nl + << "TAO_Unbounded_Object_Sequence<" << be_idt << be_idt_nl + << bt->name () << "," << be_nl + << bt->name () << "_var," << be_nl; + + if (parent != 0) + { + *os << parent->name () << "::"; + } + + *os << "tao_" << bt->local_name () << "_life," << be_nl; + + if (parent != 0) + { + *os << parent->name () << "::"; + } + + *os << "tao_" << bt->local_name () << "_cast" << be_uidt_nl + << "> " << node->local_name () << ";" << be_uidt << be_uidt; + } + else + { + } + + // Generate the _var and _out types only if we are not anonymous. + if (this->ctx_->tdef () != 0) + { + *os << be_nl << be_nl + << "typedef" << be_idt_nl + << "TAO_VarSeq_Var_T<" << be_idt << be_idt_nl + << node->local_name () << "," << be_nl + << "TAO_Object_Manager<" << be_idt << be_idt_nl + << bt->name () << "," << be_nl + << bt->name () << "_var," << be_nl; + + if (parent != 0) + { + *os << parent->name () << "::"; + } + + *os << "tao_" << bt->local_name () << "_life" << be_uidt_nl + << ">" << be_uidt << be_uidt_nl + << "> " << node->local_name () << "_var;" << be_uidt << be_uidt; + + *os << be_nl << be_nl + << "typedef" << be_idt_nl + << "TAO_Seq_Out_T<" << be_idt << be_idt_nl + << node->local_name () << "," << be_nl + << node->local_name () << "_var," << be_nl + << "TAO_Object_Manager<" << be_idt << be_idt_nl + << bt->name () << "," << be_nl + << bt->name () << "_var," << be_nl; + + if (parent != 0) + { + *os << parent->name () << "::"; + } + + *os << "tao_" << bt->local_name () << "_life" << be_uidt_nl + << ">" << be_uidt << be_uidt_nl + << "> " << node->local_name () << "_out;" << be_uidt << be_uidt; + } + + break; + case be_sequence::MNG_ABSTRACT: + if (node->unbounded ()) + { + } + else + { + } + + break; + case be_sequence::MNG_PSEUDO: + if (node->unbounded ()) + { + } + else + { + } + + break; + case be_sequence::MNG_VALUE: + if (node->unbounded ()) + { + } + else + { + } + + break; + case be_sequence::MNG_STRING: + if (node->unbounded ()) + { + } + else + { + } + + break; + case be_sequence::MNG_WSTRING: + if (node->unbounded ()) + { + } + else + { + } + + break; + default: // Not a managed type. + if (bt->base_node_type () == AST_Decl::NT_array) + { + if (node->unbounded ()) + { + } + else + { + } + } + else + { + if (node->unbounded ()) + { + } + else + { + } + } + + break; + } +/* *os << "class " << node->local_name () << ";" << be_nl; // No _var class for anonymous sequences. @@ -485,9 +625,9 @@ int be_visitor_sequence_ch::visit_sequence (be_sequence *node) << ")" << be_uidt_nl << " : " << node->instance_name () << " (length, mb) {}" << "\n" - << "#endif /* TAO_NO_COPY_OCTET_SEQUENCE == 1 */"; + << "#endif /* TAO_NO_COPY_OCTET_SEQUENCE == 1 *//*"; } - +/* *os << be_uidt_nl << "};"; os->gen_endif (); // Endif macro. @@ -524,9 +664,8 @@ int be_visitor_sequence_ch::visit_sequence (be_sequence *node) os->gen_endif (); } - +*/ node->cli_hdr_gen (1); - return 0; } 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 364b32a5105..4bdcdccca3b 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ci.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_ci.cpp @@ -47,7 +47,7 @@ be_visitor_sequence_ci::visit_sequence (be_sequence *node) } // Instantiation. - +/* if (this->instantiate_sequence (node) == -1) { ACE_ERROR_RETURN ((LM_ERROR, @@ -56,40 +56,10 @@ be_visitor_sequence_ci::visit_sequence (be_sequence *node) "codegen. for the primitive type sequence\n"), -1); } - +*/ // End of instantiation. - // No _var or _out class for an anonymous (non-typedef'd) sequence. - if (this->ctx_->tdef () != 0) - { - // Generate the ifdefined macro for the sequence type. - os->gen_ifdef_macro (node->flat_name ()); - - // All we do is generate the _var and _out implementations. - if (this->gen_var_impl (node) == -1) - { - ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_visitor_sequence_ci::" - "visit_sequence - " - "codegen for _var failed\n"), - -1); - } - - if (this->gen_out_impl (node) == -1) - { - ACE_ERROR_RETURN ((LM_ERROR, - "(%N:%l) be_visitor_sequence_ci::" - "visit_sequence - " - "codegen for _out failed\n"), - -1); - } - - // Generate the endif macro for the sequence type. - os->gen_endif (); - } - node->cli_inline_gen (1); - return 0; } diff --git a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_cs.cpp b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_cs.cpp index becf4b1ca0a..f329f68bc90 100644 --- a/TAO/TAO_IDL/be/be_visitor_sequence/sequence_cs.cpp +++ b/TAO/TAO_IDL/be/be_visitor_sequence/sequence_cs.cpp @@ -218,7 +218,7 @@ int be_visitor_sequence_cs::visit_sequence (be_sequence *node) { return 0; } - +/* if (this->instantiate_sequence (node) == -1) { ACE_ERROR_RETURN ((LM_ERROR, @@ -370,8 +370,8 @@ int be_visitor_sequence_cs::visit_sequence (be_sequence *node) } os->gen_endif (); +*/ node->cli_stub_gen (1); - return 0; } diff --git a/TAO/TAO_IDL/be_include/be_interface.h b/TAO/TAO_IDL/be_include/be_interface.h index cb988f8aab8..8e664a5f650 100644 --- a/TAO/TAO_IDL/be_include/be_interface.h +++ b/TAO/TAO_IDL/be_include/be_interface.h @@ -177,28 +177,10 @@ public: // Generated the global hooks used for non-defined forward // declared interfaces, and the contructor from stub object. - virtual int gen_var_defn (char *interface_name = 0); - // Generate the var definition. If is not 0, generate - // the var defn for that name. Otherwise, do it for the interface you - // are visiting (this). - - virtual int gen_var_impl (char *interface_local_name = 0, - char *interface_full_name = 0); - // Generate the implementation for the _var class. - // If any one of the argument is 0, then use the name in , - // otherwise use the name given. Just making the class more useful. - - virtual int gen_out_defn (char *interface_name = 0); - // Generate the out class definition. If is not 0, - // generate the out defn for that name. Otherwise, do it for the - // interface you are visiting (this). - - virtual int gen_out_impl (char *interface_local_name = 0, - char *interface_full_name = 0); - // Generate the out class implementation. - // If any one of the argument is 0, then use the name giin this - // node, else use the arguments. - // + void gen_var_out_seq_decls (void); + // Generate the declarations used by the template _var, _out + // classes for interfaces, and by sequence template classes. + // Each interface (to fix names "T") also defines two help classes, // the "collocated" class inherits from T, but delegates on the // skeleton for T (usually POA_T or POA_ModuleName::T), in other @@ -349,6 +331,12 @@ public: int has_mixed_parentage (void); // Do we have both abstract and concrete parents? + int var_out_seq_decls_gen (void) const; + void var_out_seq_decls_gen (int val); + int var_out_seq_defns_gen (void) const; + void var_out_seq_defns_gen (int val); + // Accessors for the members. + private: void gen_gperf_input_header (TAO_OutStream *ss); // Output the header (type declaration and %%) to the gperf's input @@ -401,6 +389,10 @@ private: int has_mixed_parentage_; // Do we have both abstract and concrete parents? + + int var_out_seq_decls_gen_; + int var_out_seq_defns_gen_; + // Have these been done already? }; /** diff --git a/TAO/TAO_IDL/be_include/be_type.h b/TAO/TAO_IDL/be_include/be_type.h index 760f53b9d0e..0411fe14731 100644 --- a/TAO/TAO_IDL/be_include/be_type.h +++ b/TAO/TAO_IDL/be_include/be_type.h @@ -41,29 +41,6 @@ public: virtual ~be_type (void); // Destructor. - virtual int gen_var_defn (char *interface_local_name = 0); - // Generate the _var class definition. - // generate the var definition. If is not 0, generate - // the var defn for that name. Otherwise, do it for the interface you - // are visiting (this). - - virtual int gen_var_impl (char *interface_local_name = 0, - char *interface_full_name = 0); - // Generate the implementation for the _var class. - // If any one of the argument is 0, then use the name in , - // otherwise use the name given. Just making the class more useful. - - virtual int gen_out_defn (char *interface_name = 0); - // Generate the out class definition. If is not 0, - // generate the out defn for that name. Otherwise, do it for the - // interface you are visiting (this). - - virtual int gen_out_impl (char *interface_local_name = 0, - char *interface_full_name = 0); - // Generate the out class implementation. - // If any one of the argument is 0, then use the name giin this - // node, else use the arguments. - UTL_ScopedName *tc_name (void); // Return the typecode name. When both, the prefix and the suffix // are non null, it computes and returns a tc name. Else, it also -- cgit v1.2.1