<< Fare clic per visualizzazione il sommario >> Percorso: Il linguaggio OEL > Funzioni > CopyReference |
Copies the prorperties Name, Type and Url of the source reference in the corresponding properties of the destination reference. It takes in input the destination IReference and the initial IReference and returns the destination IReference as modified:
•fromReference Url is assigned to toReference Url;
•if fromReference and toReference are ITypedReference, then Type of fromReference is assigned to Type of toReference;
•if fromReference and toReference are INamedReference, then Name of fromReference is assigned to Name of toReference;
According to our class hierarchy, INamedReference extends ITypedReference which in turn extends IReference; IReference has only one property that is Url; ITypedReference has the Type and Url properties; INamedReference has the Name, Type, and Url properties. With this feature it will be possible to assign an extended reference to the Name, Type and Url properties of a reference and vice versa.
Function
CopyReference(IReference toReference, IReference fromReference)
Input parameters
Name |
Description |
Type |
Optional |
toReference |
The destination reference |
IReference |
|
fromReference |
The source reference |
IReference |
|
Return Value
Value |
IReference |