com.esri.arcgis.system
Interface IObjectCopy

All Superinterfaces:
Serializable
All Known Implementing Classes:
ObjectCopy

public interface IObjectCopy
extends Serializable

Provides access to members to copy objects by value. The object must support IPersistStream to be copied.

Description

Provides a mechanism to duplicate an object using an objects persistence mechanism (IPersistStream). The objects state is written to a temporary stream and then "rehydrated" from that stream into a new instance of the object. This process is also known as a deep clone as an object will also duplicate all sub objects that it contains. Even if the object supports IClone, you may still want to use ObjectCopy since it does a full copy or 'deep clone' of the object.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.


Method Summary
 Object copy(Object pInObject)
          Obtains a new object which is a copy of the input object.
 void overwrite(Object pInObject, Object[] pOverwriteObject)
          Overwrites the object with the contents of input object.
 

Method Detail

copy

Object copy(Object pInObject)
            throws IOException,
                   AutomationException
Obtains a new object which is a copy of the input object.

Description

Used to copy an object by value. The object must support IPersistStream. Even if the object supports IClone you may still want to use Copy as it does a full copy or 'deep clone' of the object.

Remarks

Copy may fail if there is insufficient memory.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
pInObject - A reference to another Object (IUnknown) (in)
Returns:
A reference to another Object (IUnknown)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

overwrite

void overwrite(Object pInObject,
               Object[] pOverwriteObject)
               throws IOException,
                      AutomationException
Overwrites the object with the contents of input object.

Description

Used to overwrite an existing object with the contents of another object. The objects must be the same type of object and support IPersistStream.

Remarks

Overwrite may fail if there is insufficient memory.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
pInObject - A reference to another Object (IUnknown) (in)
pOverwriteObject - A reference to another Object (IUnknown) (in/out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.