-
Key: CPP13-16
-
Legacy Issue Number: 2614
-
Status: open
-
Source: Anonymous
-
Summary:
Summary: Consider the following IDL:
----------------------------------------------------------------------
// IDL
typedef long MyArray[1000000];interface I
{ void set_array(in MyArray array); }
;
----------------------------------------------------------------------Now let"s assume that I want to implement this using the DSI:
----------------------------------------------------------------------
// C++
void
I_impl::invoke(ServerRequest_ptr request) throw()
{
String_var name = request -> op_name();if(strcmp(name, "set_array") == 0)
{ NVList_ptr list; orb -> create_list(0, list); Any* any = list -> add(ARG_IN) -> value(); XXX request -> params(list); MyArray_forany arg; *any >>= arg; ... // Do something with arg; return; }else
{ NVList_ptr list; orb -> create_list(0, list); request -> params(list); Any* any = new Any; *any <<= new BAD_OPERATION(); request -> exception(any); }}
----------------------------------------------------------------------At the line I marked with XXX, I have to set the TypeCode of the
Any. -
Reported: CPP 1.0 — Tue, 20 Apr 1999 04:00 GMT
-
Updated: Fri, 6 Mar 2015 20:57 GMT
CPP13 — Setting the TypeCode of an Any without setting a value
- Key: CPP13-16
- OMG Task Force: C++ June 2011 RTF