LoadSystemMethodInfo (XmlDoc subroutine): Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
Line 1: Line 1:
{{Template:XmlDoc:LoadSystemMethodInfo subtitle}}
{{Template:XmlDoc:LoadSystemMethodInfo subtitle}}
<var>LoadSystemMethodInfo</var> loads an <var>XmlDoc</var> with information about methods in classes selected by a "pattern" argument.  This method is primarily intended for User Language products delivered
<var>LoadSystemMethodInfo</var> loads an <var>XmlDoc</var> with information about methods in classes selected by a "pattern" argument.  This method is primarily intended for <var class="product">User Language</var> products delivered
by Sirius Software, and the schema of the document may change from release to release.
by Sirius Software, and the schema of the document may change from release to release.


Line 10: Line 10:
<td>An expression that points to the <var>XmlDoc</var> to contain the selected method information.</td></tr>
<td>An expression that points to the <var>XmlDoc</var> to contain the selected method information.</td></tr>
<tr><th>pattern</th>
<tr><th>pattern</th>
<td>A string whose case is ignored and which can have any of the following forms:
<td>A string whose case is ignored and that can have any of the following forms:
<table class="syntaxNested">
<table class="syntaxNested">
<tr><th>methodPattern</th>
<tr><th>methodPattern</th>
<td>This selects, from any system class, all methods which match the specified pattern.</td></tr>
<td>This selects, from any system class, all methods that match the specified pattern.</td></tr>
<tr><th>classPattern':'methodPattern</th>
<tr><th>classPattern':'methodPattern</th>
<td>This selects, from any system class matching ''classPattern'', all methods which match ''methodPattern''. </td></tr>
<td>This selects, from any system class matching ''classPattern'', all methods that match ''methodPattern''. </td></tr>
<tr><th>'<var>System</var>:'classPattern':'methodPattern</th>
<tr><th>'<var>System</var>:'classPattern':'methodPattern</th>
<td>This is the same as ''classPattern':'methodPattern''. </td></tr>
<td>This is the same as ''classPattern':'methodPattern''. </td></tr>
</table></td></tr>
</table></td></tr>
<tr><th><var>ShowBase</var></th>
<tr><th><var>ShowBase</var></th>
<td>A <var>[[Enumerations#Using_Boolean_enumerations|Boolean]]</var> enumeration that specifies how to handle base and extentions classes:
<td>A <var>[[Enumerations#Using_Boolean_enumerations|Boolean]]</var> enumeration that specifies how to handle base and extension classes:
<ul><li>If <var>False</var>, the default, then base classes are omitted from the output <var>XmlDoc</var>, and the methods in extension classes include methods from their base classes.<li>If <var>True</var>, then base classes (which match the selection pattern) are included in the output <var>XmlDoc</var>, and the members of base classes are not included in extension classes.</ul>This [[Notation conventions for methods#Named parameters|name required]] argument is new in version 7.9 of the <var class="product">Sirius Mods</var>.</td></tr>
<ul><li>If <var>False</var>, the default, then base classes are omitted from the output <var>XmlDoc</var>, and the methods in extension classes include methods from their base classes.<li>If <var>True</var>, then base classes (which match the selection pattern) are included in the output <var>XmlDoc</var>, and the members of base classes are not included in extension classes.</ul>This [[Notation conventions for methods#Named parameters|name required]] argument is new in version 7.9 of the <var class="product">Sirius Mods</var>.</td></tr>
</table>
</table>
Line 26: Line 26:
==Usage notes==
==Usage notes==
<ul>
<ul>
<li>The "New" method will only be displayed if either is true:
<li>The <var>New</var> method will only be displayed if either is true:
<ul>
<ul>
<li>The ''methodPattern'' is the string <code>New</code>.
<li>The ''methodPattern'' is the string <code>New</code>.
<li>The New method has any arguments.
<li>The <var>New</var> method has any arguments.
</ul>
</ul>
<li><var>LoadSystemMethodInfo</var> will not display classes in the module LOCAL, if they are selected by a pattern (that is, ''pattern'' contains a wildcard character), or if there is no ''classPattern'' component.
<li><var>LoadSystemMethodInfo</var> will not display classes in the module LOCAL, if they are selected by a pattern (that is, ''pattern'' contains a wildcard character), or if there is no ''classPattern'' component.
Line 35: Line 35:


==Examples==
==Examples==
The following request displays the class data for the AddAttribute method:
The following request displays the class data for the <var>[[AddAttribute (XmlNode function)|AddAttribute]]</var> method:
<p class="code">begin
<p class="code">begin
   %d is object xmlDoc
   %d is object xmlDoc

Revision as of 16:04, 1 June 2011

Load info about system methods into this XmlDoc (XmlDoc class)

LoadSystemMethodInfo loads an XmlDoc with information about methods in classes selected by a "pattern" argument. This method is primarily intended for User Language products delivered by Sirius Software, and the schema of the document may change from release to release.

Syntax

doc:LoadSystemMethodInfo( pattern, [ShowBase= boolean])

Syntax terms

doc An expression that points to the XmlDoc to contain the selected method information.
pattern A string whose case is ignored and that can have any of the following forms:
methodPattern This selects, from any system class, all methods that match the specified pattern.
classPattern':'methodPattern This selects, from any system class matching classPattern, all methods that match methodPattern.
'System:'classPattern':'methodPattern This is the same as classPattern':'methodPattern.
ShowBase A Boolean enumeration that specifies how to handle base and extension classes:
  • If False, the default, then base classes are omitted from the output XmlDoc, and the methods in extension classes include methods from their base classes.
  • If True, then base classes (which match the selection pattern) are included in the output XmlDoc, and the members of base classes are not included in extension classes.
This name required argument is new in version 7.9 of the Sirius Mods.

Usage notes

  • The New method will only be displayed if either is true:
    • The methodPattern is the string New.
    • The New method has any arguments.
  • LoadSystemMethodInfo will not display classes in the module LOCAL, if they are selected by a pattern (that is, pattern contains a wildcard character), or if there is no classPattern component.

Examples

The following request displays the class data for the AddAttribute method:

begin %d is object xmlDoc %d = new %d:loadSystemMethodInfo('AddAttribute') %d:print end

The example result follows:

<classes selection="AddAttribute"> <class name="XMLNODE" system="yes" new="no" discard="no"> <methods module="JSOPF" offset="00000CBC"> <method name="ADDATTRIBUTE" type="function" callable="yes"> <result> <type name="Object" class="XMLNODE"/> </result> <arg> <type name="Longstring"/> </arg> <arg> <type name="Longstring"/> </arg> <arg optional="yes"> <type name="Longstring"/> </arg> </method> </methods> </class> </classes>

See also