PropertyHandle :: CopyData - Copy data from an instance area
The function copies the data from the instance area passed into the selected instance of the property handle.
In some cases the function does not copy data to newly created instances, i.e. when calling the function immediately after creating a new instance, resetting the instance is recommended before copying data.
target_ph.Add(key_value);
target_ph.Reset();
target_ph.CopyData(*source_ph,REPL_direct);
Implementation overview
- Copy attributes from the instance passed
PropertyHandle :: CopyData ( instance, switchopt=NO, opt_sensi=NO ) - Copy instance data from source instance
PropertyHandle :: CopyData ( source_handle, replopt=REPL_none, sensi_opt=YES )
Implementation details
-
Copy attributes from the instance passed
logical PropertyHandle  :: CopyData ( ::Instance instance, logical switchopt=NO, logical opt_sensi=NO )
The structure of the instance area must correspond to the structure of the property handle.
Passing switchopt YES will store the instance immediately.
- instance
- Instance area
Instances do have the type of the referenced property handle (collection type). The instance contains a pointer to a properly structured instance area.
You can use the !-operator or the GetData() function to check whether the instance refers to data or not.
- switchopt
- Unselected option
The option forces the function to deselect the selected instance in the property handle after terminating the function.
Default: NO
- opt_sensi
- Consider key attributes, only
When the option is NO, all attributes are considered. In case of 1 (YES), only key component attributes are considered. In case of 2, only attributes that are not key components are considered.
Default: NO
to list
- instance
- Instance area
-
Copy instance data from source instance
logical PropertyHandle  :: CopyData ( PropertyHandle &source_handle, PIREPL replopt=REPL_none, logical sensi_opt=YES )
The implementation copies the data from the source instance into the target instance. All direct properties (attributes and base structures except key component attributes) are copied by name. References and relationships are copied, when not yet existing or when replace options REPL_local (for references) or REPL_all (for references and relationships) has been defined.
The target instance will not be initialized, i.e. fields not existing in the source instance are not changed.
- source_handle
- Source property handle
The source property handle must be opened and an instance must be selected in the handle.
- replopt
- Replace option
Replace options can be passed in order to control the behavior of copy functions.
Default: REPL_none
- sensi_opt
- - internal feature (not documented)
Default: YES
to list
- source_handle
- Source property handle