TypeCode copy
This function creates a new copy of a given TypeCode.
TypeCode tc; Environment *env; TypeCode rc; rc = TypeCode_copy(tc, env);
Parameters
- tc (TypeCode)
- The TypeCode to be copied.
- env (Environment *)
- A pointer to an Environment structure. The CORBA standard mandates the use of this structure as a standard way to return exception information when an error condition is detected.
Returns
- rc (TypeCode)
- A new TypeCode with no internal references to any previously existing TypeCodes or strings. If a copy cannot be created successfully, the value NULL is returned. No exceptions are raised by this function.
Remarks
The TypeCode_copy function creates a new copy of a given TypeCode. TypeCodes are complex data structures whose actual representation is hidden and may contain internal references to strings and other TypeCodes. The copy created by this function is guaranteed not to refer to any previously existing TypeCodes or strings, and hence can be used long after the original TypeCode is freed or released (TypeCodes are typically contained in Interface Repository objects whose memory resources are released by the _somFree method).
All of the memory used to construct the TypeCode copy is allocated dynamically and should be subsequently freed only by using the TypeCode_free function.
This function is a SOM-unique extension to the CORBA standard.
Related Information
- TypeCodeNew
- TypeCode_alignment
- TypeCode_equal
- TypeCode_kind
- TypeCode_param_count
- TypeCode_parameter
- TypeCode_size
- TypeCode_free
- TypeCode_print
- TypeCode_setAlignment