Copy and DeepCopy (Record functions): Difference between revisions
Jump to navigation
Jump to search
m (Created page with "{{Template:Recordset:DeepCopy subtitle}} <var>DeepCopy</var> is a function that returns an exact copy of the method <var>Recordset</var> object. It is identical to the <var>Reco...") |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{Template:Recordset:DeepCopy subtitle}} | {{Template:Recordset:DeepCopy subtitle}} | ||
<var>DeepCopy</var> is a function that returns an exact copy of the method <var> | <var>DeepCopy</var> is a function that returns an exact copy of the method <var>Record</var> object. It is identical to the <var>Record</var> <var>[[Copy (Record function)|Copy]]</var> method. <var>Record</var> objects are always copyable and "deep-copyable" (as these terms are described in [[Copying objects#The Object class copy methods|"The Object class copy methods"]]). | ||
==Syntax== | ==Syntax== | ||
{{Template: | {{Template:Record:DeepCopy syntax}} | ||
===Syntax terms=== | ===Syntax terms=== | ||
<table class="syntaxTable"> | <table class="syntaxTable"> | ||
<tr><th>% | <tr><th>%newRec</th> | ||
<td>A <var> | <td>A <var>Record</var> object created by this method that contains a copy of the method object. | ||
</td></tr> | </td></tr> | ||
<tr><th>% | <tr><th>%rec</th> | ||
<td>A <var> | <td>A <var>Record</var> object variable. The variable can be null, in which case the output object will also be null. | ||
</td></tr> | </td></tr> | ||
<tr><th>lockstrength</th> | <tr><th>lockstrength</th> | ||
<td>A value of the <var>LockStrength</var> enumeration that is the lock strength to give to the instantiated <var> | <td>A value of the <var>LockStrength</var> enumeration that is the lock strength to give to the instantiated <var>Record</var> object. Options are: <var>None</var>, <var>Share</var>, or <var>Exclusive</var>, as described in [[New (Recordset constructor)|"New (Recordset constructor)"]]. This is an optional parameter, and it defaults to the lock strength of the method object. This parameter is only available in <var class="product">Sirius Mods</var> 7.0 and later. | ||
</td></tr> | </td></tr> | ||
<tr><th><var>LoopLockStrength</var></th> | <tr><th><var>LoopLockStrength</var></th> | ||
<td>The lock strength to be used for loops on the copied <var> | <td>The lock strength to be used for loops on the copied <var>Record</var>. This is an optional, [[Notation conventions for methods#Named parameters|name required]], parameter, and it defaults to the <var>LoopLockStrength</var> of the method object <var>Record</var>. See [[Record class#LoopLockStrength for Records|"LoopLockStrength for Records"]]. This parameter is available in <var class="product">Sirius Mods</var> 7.0 and later. | ||
</td></tr></table> | </td></tr></table> | ||
==Usage Notes== | |||
==Usage | |||
<ul> | <ul> | ||
<li> | <li>The main value of <var>DeepCopy</var> | ||
of <var>Record</var> objects is to facilitate passing of these objects to and | |||
from [[Daemon class|daemons]]. | |||
<li>The following example illustrates the use of the <var>DeepCopy</var> function: | |||
<li> | <p class="code"> %firstRec is object record in file geeks | ||
object is | %currentRec is object record in file geeks | ||
... | |||
%currentRec = %firstRec:deepcopy | |||
</p> | |||
</ul> | </ul> | ||
==See also== | ==See also== | ||
{{Template: | {{Template:Record:DeepCopy footer}} |
Revision as of 21:03, 15 April 2011
Deep copy this Recordset object (Recordset class)
DeepCopy is a function that returns an exact copy of the method Record object. It is identical to the Record Copy method. Record objects are always copyable and "deep-copyable" (as these terms are described in "The Object class copy methods").
Syntax
%outRecord = record:DeepCopy[( [lockStrength], - [LoopLockStrength= lockStrength])]
Syntax terms
%newRec | A Record object created by this method that contains a copy of the method object. |
---|---|
%rec | A Record object variable. The variable can be null, in which case the output object will also be null. |
lockstrength | A value of the LockStrength enumeration that is the lock strength to give to the instantiated Record object. Options are: None, Share, or Exclusive, as described in "New (Recordset constructor)". This is an optional parameter, and it defaults to the lock strength of the method object. This parameter is only available in Sirius Mods 7.0 and later. |
LoopLockStrength | The lock strength to be used for loops on the copied Record. This is an optional, name required, parameter, and it defaults to the LoopLockStrength of the method object Record. See "LoopLockStrength for Records". This parameter is available in Sirius Mods 7.0 and later. |
Usage Notes
- The main value of DeepCopy of Record objects is to facilitate passing of these objects to and from daemons.
- The following example illustrates the use of the DeepCopy function:
%firstRec is object record in file geeks %currentRec is object record in file geeks ... %currentRec = %firstRec:deepcopy