Jump to content

TypeCode copy: Difference between revisions

From EDM2
Created page with "This function creates a new copy of a given TypeCode. TypeCode tc; Environment *env; TypeCode rc; rc = TypeCode_copy(tc, env); ==Parameters== ;tc..."
 
Ak120 (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
This function creates a new copy of a given TypeCode.  
This function creates a new copy of a given TypeCode.
 
  TypeCode        tc;
  TypeCode        tc;
  Environment    *env;
  Environment    *env;
  TypeCode        rc;  
  TypeCode        rc;
   
   
  rc = TypeCode_copy(tc, env);
  rc = TypeCode_copy(tc, env);


==Parameters==
==Parameters==
;tc (TypeCode)  
;tc (TypeCode):The TypeCode to be copied.
: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.
 
;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==
==Returns==
;rc (TypeCode)  
;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.
: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==
==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).  
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.  
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.  
This function is a SOM-unique extension to the CORBA standard.


==Related Information==
==Related Information==
*TypeCodeNew  
*TypeCodeNew
*TypeCode_alignment  
*TypeCode_alignment
*TypeCode_equal  
*TypeCode_equal
*TypeCode_kind  
*TypeCode_kind
*TypeCode_param_count  
*TypeCode_param_count
*TypeCode_parameter  
*TypeCode_parameter
*TypeCode_size  
*TypeCode_size
*TypeCode_free  
*TypeCode_free
*TypeCode_print  
*TypeCode_print
*TypeCode_setAlignment  
*TypeCode_setAlignment
 


[[Category:SOM IRF]]
[[Category:SOM IRF]]

Latest revision as of 02:29, 8 November 2021

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