Defines an object that may be cloned and compared against other objects.
Namespace: CommonInterfaces
Delphi
|
type
ICloneable = interface
['{2D42CCDB-D296-11D3-B9BB-00C04F8EDA5F}']
end;
|
|
Name
|
Description
|
|
Tag
|
The tag property is intended for the interface user to assign whatever value they like to the tag. The tag should be cloned and assigned. A common use for the tag would be to assign the object that the object represents so that the object is available later.
The Tag property calls the GetTag and SetTag methods.
|
Top
|
|
Name
|
Description
|
|
Assign(IInterface)
|
Overloaded. Attempts to copy the fields or data from AValue into the underlying object. If the AValue parameter is not of an interface type that is understood by the object, it should raise an exception.
|
|
Assign(TPersistent)
|
Overloaded. Attempts to copy the fields or data from source object into the underlying object.
|
|
AssignTo(TPersistent)
|
Attempts to copy the fields or data from the underlying object into the Destination object.
|
|
Clone
|
The Clone method is intended to return a copy of the interface object. It is up to the interface implementer whether the clone is a shallow or deep copy. Please refer to the other interface documentation. A common implementation of this method creates the underlying object and then calls the Assign method.
Note that this method returns an IInterface and may need to be cast in order to assign it to another variable of a descendant interface type.
|
|
Equals(IInterface)
|
This method is intended to compare two interface objects and return whether they are equal. The comparison can be shallow (compare pointers) or deep (compare data) depending on the implementor. Please refer to the documentation of the objects for more information.
|
|
GetTag
|
This method is called by the CommonInterfaces.ICloneable.Tag property. It should return the same value that the tag property is set to using the SetTag method.
|
|
get_Tag
|
This method is called by the CommonInterfaces.ICloneable.Tag property. It should return the same value that the tag property is set to using the SetTag method.
Note
|
Required by VCL.Net
|
|
|
SetTag(TRSTag)
|
This method is intended to store an arbitrary integer value. It is called by the Tag property. GetTag method should return the same value later.
|
|
set_Tag(TRSTag)
|
This method is intended to store an arbitrary integer value. It is called by the Tag property. GetTag method should return the same value later.
Note
|
Required by VCL.Net
|
|
Top
|