summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-01-23 16:57:11 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-01-23 16:57:11 +0000
commite60626246d7a2eeadc4e5924cfeea6b26ce3ab5e (patch)
tree91307a30575776040b19529993b444a636d681ca
parentf7de17707b1e9dd80daf98eeccd7bb38d3051e76 (diff)
downloadATCD-e60626246d7a2eeadc4e5924cfeea6b26ce3ab5e.tar.gz
ChangeLogTag:Fri Jan 23 10:55:40 1998 Carlos O'Ryan <coryan@cs.wustl.edu>
-rw-r--r--TAO/ChangeLog-98c11
-rw-r--r--TAO/TAO_IDL/be/be_interface.cpp20
-rw-r--r--TAO/TAO_IDL/be/be_state_argument.cpp70
-rw-r--r--TAO/tao/objtable.cpp6
4 files changed, 74 insertions, 33 deletions
diff --git a/TAO/ChangeLog-98c b/TAO/ChangeLog-98c
index 7189afac9ae..9b515499772 100644
--- a/TAO/ChangeLog-98c
+++ b/TAO/ChangeLog-98c
@@ -1,3 +1,14 @@
+Fri Jan 23 10:55:40 1998 Carlos O'Ryan <coryan@cs.wustl.edu>
+
+ * tao/objtable.cpp:
+ Linear object tables were not using the initial size to
+ pre-allocate a buffer.
+
+ * TAO_IDL/be/be_interface.cpp:
+ * TAO_IDL/be/be_state_argument.cpp:
+ Fixed the mapping for native as OUT or INOUT parameters, also
+ fixed the name for the _dispatch() method.
+
Fri Jan 23 01:12:28 1998 Irfan Pyarali <irfan@cs.wustl.edu>
* tao/poaS.cpp: Added ACE_NESTED_CLASS macro to constructors.
diff --git a/TAO/TAO_IDL/be/be_interface.cpp b/TAO/TAO_IDL/be/be_interface.cpp
index e15bfbdd79a..6423086ad49 100644
--- a/TAO/TAO_IDL/be/be_interface.cpp
+++ b/TAO/TAO_IDL/be/be_interface.cpp
@@ -357,6 +357,12 @@ be_interface::gen_client_header (void)
*ch << "static " << this->local_name () << "_ptr _bind (const char *host, "
<< "CORBA::UShort port, const char *key, CORBA::Environment &env);\n\n";
+ // the _is_a method
+ ch->indent ();
+ *ch << "virtual CORBA::Boolean _is_a (const CORBA::Char *type_id, "
+ << "CORBA::Environment &env);\n" << be_nl
+ << "// = user methods\n";
+
// generate code for the interface definition by traversing thru the
// elements of its scope. We depend on the front-end to have made sure
// that only legal syntactic elements appear in our scope.
@@ -367,16 +373,10 @@ be_interface::gen_client_header (void)
return -1;
}
- // the _is_a method
- ch->indent ();
- *ch << "virtual CORBA::Boolean _is_a (const CORBA::Char *type_id, "
- << "CORBA::Environment &env);\n";
-
// generate the "protected" constructor so that users cannot instantiate
// us
- ch->decr_indent ();
- *ch << "protected:\n";
- ch->incr_indent ();
+ *ch << be_uidt_nl
+ << "protected:" << be_idt_nl
*ch << this->local_name () << " (" << be_idt << be_idt_nl
<< "STUB_Object *objref = 0," << be_nl
<< "TAO_ServantBase *servant = 0," << be_nl
@@ -757,7 +757,7 @@ int be_interface::gen_server_header (void)
// add the dispatch method
sh->indent ();
- *sh << "virtual void dispatch (CORBA::ServerRequest &req, " <<
+ *sh << "virtual void _dispatch (CORBA::ServerRequest &req, " <<
"void *context, CORBA::Environment &env);\n\n";
// Print out the _this() method.
@@ -918,7 +918,7 @@ int be_interface::gen_server_skeletons (void)
// now the dispatch method
ss->indent ();
*ss << "void " << this->full_skel_name () <<
- "::dispatch (CORBA::ServerRequest &req, " <<
+ "::_dispatch (CORBA::ServerRequest &req, " <<
"void *context, CORBA::Environment &env)" << nl;
*ss << "{\n";
ss->incr_indent ();
diff --git a/TAO/TAO_IDL/be/be_state_argument.cpp b/TAO/TAO_IDL/be/be_state_argument.cpp
index efefcc61f4c..e890aecb5e6 100644
--- a/TAO/TAO_IDL/be/be_state_argument.cpp
+++ b/TAO/TAO_IDL/be/be_state_argument.cpp
@@ -2232,26 +2232,56 @@ be_state_argument::gen_code (be_type *bt, be_decl *d, be_type *type)
} // end switch direction
break;
case AST_Decl::NT_native:
- {
- switch (cg->state ())
- {
- case TAO_CodeGen::TAO_ARGUMENT_CH:
- // to keep the MSVC++ compiler happy
- *os << bt->nested_type_name (bif) << " " << arg->local_name () <<
- ", ";
- break;
- case TAO_CodeGen::TAO_ARGUMENT_CS:
- case TAO_CodeGen::TAO_ARGUMENT_SH:
- *os << bt->name () << " " << arg->local_name () << ", ";
- break;
- case TAO_CodeGen::TAO_ARGUMENT_UPCALL_SS:
- case TAO_CodeGen::TAO_ARGUMENT_DOCALL_CS:
- *os << "env.exception (new CORBA::MARSHAL " <<
- "(CORBA::COMPLETED_NO));" << nl;
- break;
- default:
- break;
- }
+ {
+ switch (arg->direction ())
+ {
+ case AST_Argument::dir_IN:
+ {
+ switch (cg->state ())
+ {
+ case TAO_CodeGen::TAO_ARGUMENT_CH:
+ // to keep the MSVC++ compiler happy
+ *os << bt->nested_type_name (bif) << " "
+ << arg->local_name () << ", ";
+ break;
+ case TAO_CodeGen::TAO_ARGUMENT_CS:
+ case TAO_CodeGen::TAO_ARGUMENT_SH:
+ *os << bt->name () << " " << arg->local_name () << ", ";
+ break;
+ case TAO_CodeGen::TAO_ARGUMENT_UPCALL_SS:
+ case TAO_CodeGen::TAO_ARGUMENT_DOCALL_CS:
+ *os << "env.exception (new CORBA::MARSHAL " <<
+ "(CORBA::COMPLETED_NO));" << nl;
+ break;
+ default:
+ break;
+ }
+ case AST_Argument::dir_INOUT:
+ case AST_Argument::dir_OUT:
+ {
+ switch (cg->state ())
+ {
+ case TAO_CodeGen::TAO_ARGUMENT_CH:
+ // to keep the MSVC++ compiler happy
+ *os << bt->nested_type_name (bif) << " &"
+ << arg->local_name () << ", ";
+ break;
+ case TAO_CodeGen::TAO_ARGUMENT_CS:
+ case TAO_CodeGen::TAO_ARGUMENT_SH:
+ *os << bt->name () << " &"
+ << arg->local_name () << ", ";
+ break;
+ case TAO_CodeGen::TAO_ARGUMENT_UPCALL_SS:
+ case TAO_CodeGen::TAO_ARGUMENT_DOCALL_CS:
+ *os << "env.exception (new CORBA::MARSHAL " <<
+ "(CORBA::COMPLETED_NO));" << nl;
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ }
}
break;
case AST_Decl::NT_except: // type is an exception
diff --git a/TAO/tao/objtable.cpp b/TAO/tao/objtable.cpp
index aa691796d1e..eb67f8c8001 100644
--- a/TAO/tao/objtable.cpp
+++ b/TAO/tao/objtable.cpp
@@ -386,11 +386,11 @@ TAO_Array_ObjTable_Iterator::done (const TAO_Object_Table_Iterator_Impl *end) co
TAO_Linear_ObjTable::
-TAO_Linear_ObjTable (CORBA::ULong /*size*/)
+TAO_Linear_ObjTable (CORBA::ULong size)
: next_ (0),
- tablesize_ (0),
- table_ (0)
+ tablesize_ (size)
{
+ ACE_NEW (table_, TAO_Object_Table_Entry[this->tablesize_]);
}
TAO_Linear_ObjTable::~TAO_Linear_ObjTable (void)