The NamedValue structure is defined in C as:
typedef unsigned long Flags; struct NamedValue { Identifier name; // argument name any argument; // argument long len; // length/count of arg value Flags arg_modes; // argument mode flags };
where: name is an Identifier string as defined in the CORBA specification, and argument is an any structure with the following declaration:
struct any { TypeCode _type; void* _value; };
_type is a TypeCode, which has an opaque representation with operations defined on it to allow access to its constituent parts. Essentially the Typecode is composed of a field specifying the CORBA type represented and possibly additional fields needed to fully describe the type. See Chapter 7 of this manual for a complete explanation of TypeCodes.
_value is a pointer to the value of the any structure. Important: The contents of "_value" should always be a pointer to the value, regardless of whether the value is a primitive, a structure, or is itself a pointer (as in the case of object references, strings and arrays). For object references, strings and arrays, _value should contain pointer to the pointer that references the value. For example:
string testString; any testAny; testAny._value = &testString;
len is the number of bytes that the argument value occupies. The following table gives the length of data values for the C language bindings. The value of len must be consistent with the TypeCode.
Data type Length short sizeof(short) unsigned short sizeof(unsigned short) long sizeof(long) unsigned long sizeof(unsigned long) float sizeof(float) double sizeof(double) char sizeof(char) boolean sizeof(boolean) octet sizeof(octet) string strlen(string) - does not include '\0' byte enum E{} sizeof(unsigned long) union U sizeof(U) struct S{} sizeof(S) Object 1 array N of type T1 Length(T1)*N sequence V of type T2 Length(T2)*V - V is the actual # of elements
The arg_modes field is a bitmask (unsigned long) and may contain the following flag values:
ARG_IN the associated value is an input-only argument ARG_OUT the associated value is an output-only argument ARG_INOUT the associated argument is an in/out argument
These flag values identify the parameter passing mode for the arguments. Additional flag values have specific meanings for Request and NVList methods and are listed with their associated methods.