Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 4fccfe23f6486142b4197d1daac0cf21 > files > 5

Falcon-doc-0.9.6.6-2.fc15.noarch.rpm

<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   <title>Class BOM - Class BOM</title>
   <link href="faldoc.css" rel="stylesheet" type="text/css"/>
   <link href="tabs.css" rel="stylesheet" type="text/css"/>
</head>
<body class="faldoc_body">
<div class="navitop">
   <div class="tabs">
      <ul>
         <li><a href="./index.html"><span>Main</span></a></li>
         <li><a href="./pages.html"><span>Related pages</span></a></li>
         <li><a href="./groups.html"><span>Groups</span></a></li>
         <li><a href="./funset.html"><span>Function sets</span></a></li>
         <li><a href="./classes.html"><span>Classes</span></a></li>
         <li><a href="./objects.html"><span>Objects</span></a></li>
         <li><a href="./functions.html"><span>All functions</span></a></li>
         <li><a href="./globals.html"><span>Globals</span></a></li>
         
      </ul>
   </div>
</div>
<hr/>

<h1 class="faldoc_title">Class BOM</h1>

<p class="faldoc_brief">Basic Object Model metaclass </p>
<p class="faldoc_funcdecl">
<b>class</b> BOM
</p>


   <p class="faldoc_brief"><a href="#more">more...</a></p>
   <h2 class="faldoc_title">Summary</h2>
   <table class="faldoc_list">
   
      
         <tr><td><a href="#__add">__add()</a></td><td>Overrides binary addition operand. </td></tr>
      
         <tr><td><a href="#__call">__call()</a></td><td>Overrides call operator "self()". </td></tr>
      
         <tr><td><a href="#__dec">__dec()</a></td><td>Overrides decrement unary prefix operand. </td></tr>
      
         <tr><td><a href="#__decpost">__decpost()</a></td><td>Overrides decrement unary postfix operand. </td></tr>
      
         <tr><td><a href="#__div">__div()</a></td><td>Overrides binary division operand. </td></tr>
      
         <tr><td><a href="#__getIndex">__getIndex()</a></td><td>Overrides array access operator [] </td></tr>
      
         <tr><td><a href="#__inc">__inc()</a></td><td>Overrides increment unary prefix operand. </td></tr>
      
         <tr><td><a href="#__incpost">__incpost()</a></td><td>Overrides increment unary postifx operand. </td></tr>
      
         <tr><td><a href="#__mod">__mod()</a></td><td>Overrides modulo operand. </td></tr>
      
         <tr><td><a href="#__mul">__mul()</a></td><td>Overrides binary multiplication operand. </td></tr>
      
         <tr><td><a href="#__pow">__pow()</a></td><td>Overrides power operand. </td></tr>
      
         <tr><td><a href="#__setIndex">__setIndex()</a></td><td>Overrides array write operator [] </td></tr>
      
         <tr><td><a href="#__sub">__sub()</a></td><td>Overrides binary subtraction operand. </td></tr>
      
         <tr><td><a href="#baseClass">baseClass()</a></td><td>Returns the class item from which an object has been instantiated. </td></tr>
      
         <tr><td><a href="#bound">bound()</a></td><td>Determines if an item is bound or not. </td></tr>
      
         <tr><td><a href="#className">className()</a></td><td>Returns the name of the class an instance is instantiated from. </td></tr>
      
         <tr><td><a href="#clone">clone()</a></td><td>Performs a deep copy of the item. </td></tr>
      
         <tr><td><a href="#compare">compare()</a></td><td>Performs a lexicographical comparison. </td></tr>
      
         <tr><td><a href="#derivedFrom">derivedFrom()</a></td><td>Checks if this item has a given parent. </td></tr>
      
         <tr><td><a href="#describe">describe()</a></td><td>Returns the deep contents of an item on a string representation. </td></tr>
      
         <tr><td><a href="#isCallable">isCallable()</a></td><td>Determines if an item is callable. </td></tr>
      
         <tr><td><a href="#len">len()</a></td><td>Retrieves the length of a collection </td></tr>
      
         <tr><td><a href="#metaclass">metaclass()</a></td><td>Returns the metaclass associated with this item. </td></tr>
      
         <tr><td><a href="#ptr">ptr()</a></td><td>Returns a raw memory pointer out of this data (as an integer). </td></tr>
      
         <tr><td><a href="#serialize">serialize()</a></td><td>Serialize the item on a stream for persistent storage. </td></tr>
      
         <tr><td><a href="#toString">toString()</a></td><td>Coverts the object to string. </td></tr>
      
         <tr><td><a href="#typeId">typeId()</a></td><td>Returns an integer indicating the type of this item. </td></tr>
      
   
   </table>







<a name="more"><h2 class="faldoc_title">Detailed description</h2></a>

<p class="faldoc_funcdecl">
<b>class</b> BOM
</p>
<table class="faldoc_function">


</table>
<br/>
<p class="item_brief">Basic Object Model metaclass </p>
<p class="faldoc_text"> This class contains the methods that can be applied to every falcon item; the method themselves are not shown in the item list, and the <b>provides</b> keyword won't detectect their availability unless they have been explicitly re-declared (overloaded) by objects, instances, classes, array bindings or blessed dictionariees. </p>
<p class="faldoc_text"> Nevertheless, the method listed in the BOM metaclass can be applied to any item, while methods defined in specific item metaclasses derived from BOM, as i.e. the <a href="./class_Dictionary.html">Dictionary</a> metaclass, can be applied only to items of the reflected type. </p>
<p class="faldoc_note"><span class="faldoc_notetype">Note:</span>  The method <a href="./class_BOM.html#compare">BOM.compare</a> is meant to overload the behavior of generic VM comparisons, including relational operators (<, >, <=, >=, ==, !=) and generic ordering criterions, for example in <a href="./class_Dictionary.html">Dictionary</a> insertions and <a href="./functions.html#arraySort">arraySort</a>. </p>




   <h2 class="faldoc_title">Methods</h2>
   
      <h3 class="faldoc_funcname"><a name="__add">__add()</a></h3>
      <p class="item_brief">Overrides binary addition operand. </p>
      <p class="faldoc_funcdecl">BOM.__add( operand )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">operand</td><td class="faldoc_paramdesc">The second operand in the expression. </td></tr>
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc"> The value of <b>self</b>+ <b>operand</b>. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">If an object or instance re-defines this method, when a "+" operation is performed on this object, the method gets called. </p>
<p class="faldoc_text">This includes self-target operations as +=, -= and so on; in this latter case, the return value of the function will also be immediately assigned to this object. </p>
<p class="faldoc_note"><span class="faldoc_notetype">Note:</span>  There is no guarantee that the <b>operand</b> type is the same of this item. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="__call">__call()</a></h3>
      <p class="item_brief">Overrides call operator "self()". </p>
      <p class="faldoc_funcdecl">BOM.__call( ... )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">...</td><td class="faldoc_paramdesc">The parameters passed to the original call. </td></tr>
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc"> The value of <b>self</b>( ... ). </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">If an object or instance re-defines this method, when this object is accessed through the call operator, then this method is called instead. </p>
<p class="faldoc_text">This allows to create functors, as in the following example: </p>
<pre class="faldoc_code">
 object sum
   function __call( a, b )
     return a+b
   end
end

&gt; sum( 2, 2 )       // 4
</pre>
</p>
   
      <h3 class="faldoc_funcname"><a name="__dec">__dec()</a></h3>
      <p class="item_brief">Overrides decrement unary prefix operand. </p>
      <p class="faldoc_funcdecl">BOM.__dec( operand )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">operand</td><td class="faldoc_paramdesc">The second operand in the expression. </td></tr>
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc"> The value of -- <b>self</b>. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">If an object or instance re-defines this method, when a "--" prefix operation is performed on this object, the method gets called. </p>
<p class="faldoc_text">The implementation should modify the object, and return itself modified (or value representing this object after modification). </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="__decpost">__decpost()</a></h3>
      <p class="item_brief">Overrides decrement unary postfix operand. </p>
      <p class="faldoc_funcdecl">BOM.__decpost( operand )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">operand</td><td class="faldoc_paramdesc">The second operand in the expression. </td></tr>
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc"> The value of <b>self</b>--. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">If an object or instance re-defines this method, when a "--" postfix operation is performed on this object, the method gets called. </p>
<p class="faldoc_text">The implementation should keep an unmodified copy of this object, modify this instance and return the previous one, or a value representing the previous status of this object. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="__div">__div()</a></h3>
      <p class="item_brief">Overrides binary division operand. </p>
      <p class="faldoc_funcdecl">BOM.__div( operand )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">operand</td><td class="faldoc_paramdesc">The second operand in the expression. </td></tr>
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc"> The value of <b>self</b>/ <b>operand</b>. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">If an object or instance re-defines this method, when a "/" operation is performed on this object, the method gets called. </p>
<p class="faldoc_text">This includes self-target operations as +=, -= and so on; in this latter case, the return value of the function will also be immediately assigned to this object. </p>
<p class="faldoc_note"><span class="faldoc_notetype">Note:</span>  There is no guarantee that the <b>operand</b> type is the same of this item. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="__getIndex">__getIndex()</a></h3>
      <p class="item_brief">Overrides array access operator [] </p>
      <p class="faldoc_funcdecl">BOM.__getIndex( index )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">index</td><td class="faldoc_paramdesc">The index of the desired item. </td></tr>
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc"> The value of <b>self</b>[<b>index</b>]. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">If an object or instance re-defines this method, when a "[]" array access operator is called to read a value from a given index, this method gets called. </p>
<p class="faldoc_text"> The <b>index</b> value may be of any type. </p>
<p class="faldoc_text"> The function should return a value or throw an AccessError if the <b>index</b> is considered invalid. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="__inc">__inc()</a></h3>
      <p class="item_brief">Overrides increment unary prefix operand. </p>
      <p class="faldoc_funcdecl">BOM.__inc( operand )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">operand</td><td class="faldoc_paramdesc">The second operand in the expression. </td></tr>
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc"> The value of ++ <b>self</b>. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">If an object or instance re-defines this method, when a "++" prefix operation is performed on this object, the method gets called. </p>
<p class="faldoc_text">The implementation should modify the object, and return itself modified (or value representing this object after modification). </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="__incpost">__incpost()</a></h3>
      <p class="item_brief">Overrides increment unary postifx operand. </p>
      <p class="faldoc_funcdecl">BOM.__incpost( operand )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">operand</td><td class="faldoc_paramdesc">The second operand in the expression. </td></tr>
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc"> The value of <b>self</b>++. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">If an object or instance re-defines this method, when a "++" postfix operation is performed on this object, the method gets called. </p>
<p class="faldoc_text">The implementation should keep an unmodified copy of this object, modify this instance and return the previous one, or a value representing the previous status of this object. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="__mod">__mod()</a></h3>
      <p class="item_brief">Overrides modulo operand. </p>
      <p class="faldoc_funcdecl">BOM.__mod( operand )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">operand</td><td class="faldoc_paramdesc">The second operand in the expression. </td></tr>
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc"> The value of <b>self</b>% <b>operand</b>. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">If an object or instance re-defines this method, when a "%" operation is performed on this object, the method gets called. </p>
<p class="faldoc_text">This includes self-target operations as +=, -= and so on; in this latter case, the return value of the function will also be immediately assigned to this object. </p>
<p class="faldoc_note"><span class="faldoc_notetype">Note:</span>  There is no guarantee that the <b>operand</b> type is the same of this item. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="__mul">__mul()</a></h3>
      <p class="item_brief">Overrides binary multiplication operand. </p>
      <p class="faldoc_funcdecl">BOM.__mul( operand )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">operand</td><td class="faldoc_paramdesc">The second operand in the expression. </td></tr>
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc"> The value of <b>self</b>* <b>operand</b>. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">If an object or instance re-defines this method, when a "*" operation is performed on this object, the method gets called. </p>
<p class="faldoc_text">This includes self-target operations as +=, -= and so on; in this latter case, the return value of the function will also be immediately assigned to this object. </p>
<p class="faldoc_note"><span class="faldoc_notetype">Note:</span>  There is no guarantee that the <b>operand</b> type is the same of this item. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="__pow">__pow()</a></h3>
      <p class="item_brief">Overrides power operand. </p>
      <p class="faldoc_funcdecl">BOM.__pow( operand )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">operand</td><td class="faldoc_paramdesc">The second operand in the expression. </td></tr>
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc"> The value of <b>self</b>** <b>operand</b>. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">If an object or instance re-defines this method, when a "**" operation is performed on this object, the method gets called. </p>
<p class="faldoc_text">This includes self-target operations as +=, -= and so on; in this latter case, the return value of the function will also be immediately assigned to this object. </p>
<p class="faldoc_note"><span class="faldoc_notetype">Note:</span>  There is no guarantee that the <b>operand</b> type is the same of this item. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="__setIndex">__setIndex()</a></h3>
      <p class="item_brief">Overrides array write operator [] </p>
      <p class="faldoc_funcdecl">BOM.__setIndex( index, value )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">index</td><td class="faldoc_paramdesc">The index of the desired item. </td></tr><tr><td class="faldoc_param">value</td><td class="faldoc_paramdesc">The value that must be set. </td></tr>
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc"> The value of (<b>self</b>[<b>index</b>] = <b>value</b>). </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">If an object or instance re-defines this method, when a "[]" array access operator is called to write a value to a given index, this method gets called. </p>
<p class="faldoc_text"> The <b>index</b> value may be of any type. </p>
<p class="faldoc_text">The function should return the same value that is being assigned, but the return value can be freely changed. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="__sub">__sub()</a></h3>
      <p class="item_brief">Overrides binary subtraction operand. </p>
      <p class="faldoc_funcdecl">BOM.__sub( operand )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">operand</td><td class="faldoc_paramdesc">The second operand in the expression. </td></tr>
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc"> The value of <b>self</b>- <b>operand</b>. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">If an object or instance re-defines this method, when a "-" operation is performed on this object, the method gets called. </p>
<p class="faldoc_text">This includes self-target operations as +=, -= and so on; in this latter case, the return value of the function will also be immediately assigned to this object. </p>
<p class="faldoc_note"><span class="faldoc_notetype">Note:</span>  There is no guarantee that the <b>operand</b> type is the same of this item. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="baseClass">baseClass()</a></h3>
      <p class="item_brief">Returns the class item from which an object has been instantiated. </p>
      <p class="faldoc_funcdecl">BOM.baseClass( )</p>
      
         <table class="faldoc_function">
         
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">A class item or nil. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">If applied on objects, returns the class item that has been used to instantiate an object. Calling the returned item is equivalent to call the class that instantiated this object. </p>
<p class="faldoc_text"> The returned item can be used to create another instance of the same class, or for comparisons on <b>select</b> branches. </p>
<p class="faldoc_text">If the item on which this method is applied is not an object, it returns nil. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="bound">bound()</a></h3>
      <p class="item_brief">Determines if an item is bound or not. </p>
      <p class="faldoc_funcdecl">BOM.bound( )</p>
      
         <table class="faldoc_function">
         
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">True if the item is bound. </td></tr>
         
         </table>
      
      
   
      <h3 class="faldoc_funcname"><a name="className">className()</a></h3>
      <p class="item_brief">Returns the name of the class an instance is instantiated from. </p>
      <p class="faldoc_funcdecl">BOM.className( )</p>
      
         <table class="faldoc_function">
         
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">The class name of an object (a string) or nil. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">If applied to objects, returns the name of the class of which the object is an instance. When applied to classes, it return the class symbolic name. In all other cases, return nil. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="clone">clone()</a></h3>
      <p class="item_brief">Performs a deep copy of the item. </p>
      <p class="faldoc_funcdecl">BOM.clone( )</p>
      
         <table class="faldoc_function">
         
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">A copy of the item. </td></tr>
         
            <tr><td class="faldoc_raise">Raises:</td><td class="faldoc_raisedesc">
            <table class="faldoc_raise">
            <tr><td class="faldoc_raiseitem"><a href="./class_CloneError.html">CloneError</a></td><td class="faldoc_raisedesc">if the item is not cloneable. </td></tr>
            </table>
            </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">Returns an item equal to the current one, but phisically separated. If the item is a sequence, only the first level of the item gets actually cloned: vectors and dictionaries gets cloned, but the items they store are just copied. This means that the new copy of the collection itself may change, and the older version will stay untouched, but if a deep item in the collection (as an object) is changed, its change will be reflected also in the original collection. </p>
<p class="faldoc_text">Cloning objects causes each of their properties to be cloned. If they store an internal user data which is provided by extension modules or embedding applications, that data is cloned too. Behavior of user data is beyond the control of the script, and the data may actually be just referenced or it may also refuse to be cloned. In that case, this method will raise a CloneError, which indicates that a deep user data provided by an external module or application doesn't provide a cloning feature. </p>
<p class="faldoc_note"><span class="faldoc_notetype">Note:</span> Cloning objects that stores other objects referencing themselves in their properties may cause an endless loop in this version. To provide a safe duplicate of objects that may be organized in circular hierarcies, overload the clone method so that it creates a new instance of the item and just performs a flat copy of the properties. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="compare">compare()</a></h3>
      <p class="item_brief">Performs a lexicographical comparison. </p>
      <p class="faldoc_funcdecl">BOM.compare( item )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">item</td><td class="faldoc_paramdesc">The item to which this object must be compared. </td></tr>
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">-1, 0 or 1 depending on the comparation result. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">Performs a lexicographical comparison between the self item and the item passed as a parameter. If the item is found smaller than the parameter, it returns -1; if the item is greater than the parameter, it returns 1. If the two items are equal, it returns 0. </p>
<p class="faldoc_text">The compare method, if overloaded, is used by the Virtual Machine to perform tests on unknown types (i.e. objects), and to sort dictionary keys. </p>
<p class="faldoc_text"> Item different by type are ordered by their type ID, as indicated in the documentation of the <a href="./functions.html#typeOf">typeOf</a> core function. </p>
<p class="faldoc_text">By default, string comparison is performed in UNICODE character order, and objects, classes, vectors, and dictionaries are ordered by their internal pointer address. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="derivedFrom">derivedFrom()</a></h3>
      <p class="item_brief">Checks if this item has a given parent. </p>
      <p class="faldoc_funcdecl">BOM.derivedFrom( cls )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">cls</td><td class="faldoc_paramdesc">A symbolic class name or a class instance. </td></tr>
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">true if the given class is one of the ancestors of this item. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">If applied on objects, returns true if the given parameter is the name of the one of the classes that compose the class hierarchy of the object. </p>
<p class="faldoc_text">If applied on class instances, it returns true if the parameter is its name or the name of one of its ancestors. </p>
<p class="faldoc_text">In all the other cases, it return false. </p>
<p class="faldoc_text">It is also possible to use directly the class instance as a parameter, instead of a class name. In example: </p>
<pre class="faldoc_code">
 object MyError from Error
    //...
end

&gt; "Is MyError derived from 'Error' (by name)?: ", \
      MyError.derivedFrom( "Error" )

&gt; "Is MyError derived from 'Error' (by class)?: ", \
      MyError.derivedFrom( Error )
</pre>
</p>
   
      <h3 class="faldoc_funcname"><a name="describe">describe()</a></h3>
      <p class="item_brief">Returns the deep contents of an item on a string representation. </p>
      <p class="faldoc_funcdecl">BOM.describe( [depth], [maxLen] )</p>
      
         <table class="faldoc_function">
         
         <tr><td class="faldoc_optparam">depth</td><td class="faldoc_optparamdesc">Maximum inspect depth. </td></tr><tr><td class="faldoc_optparam">maxLen</td><td class="faldoc_optparamdesc">Limit the display size of possibly very long items as i.e. strings or membufs. </td></tr>
         
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">This method returns a string containing a representation of this item. If the item is deep (an array, an instance, a dictionary) the contents are also passed through this function. </p>
<p class="faldoc_text">This method traverses arrays and items deeply; there isn't any protection against circular references, which may cause endless loop. However, the default maximum depth is 3, which is a good depth for debugging (goes deep, but doesn't dig beyond average interesting points). Set to -1 to have infinite depth. </p>
<p class="faldoc_text"> By default, only the first 60 characters of strings and elements of membufs are displayed. You may change this default by providing a <b>maxLen</b> parameter. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="isCallable">isCallable()</a></h3>
      <p class="item_brief">Determines if an item is callable. </p>
      <p class="faldoc_funcdecl">BOM.isCallable( )</p>
      
         <table class="faldoc_function">
         
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">true if the item is callable, false otheriwse. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">If the function returns true, then the call operator can be applied. If it returns false, the item is not a callable one, and trying to call it would cause an error. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="len">len()</a></h3>
      <p class="item_brief">Retrieves the length of a collection </p>
      <p class="faldoc_funcdecl">BOM.len( )</p>
      
         <table class="faldoc_function">
         
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">the count of items in the sequence, or 0. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">The returned value represent the "size" of this item. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="metaclass">metaclass()</a></h3>
      <p class="item_brief">Returns the metaclass associated with this item. </p>
      <p class="faldoc_funcdecl">BOM.metaclass( )</p>
      
         <table class="faldoc_function">
         
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">The metaclass of this item. </td></tr>
         
         </table>
      
      
   
      <h3 class="faldoc_funcname"><a name="ptr">ptr()</a></h3>
      <p class="item_brief">Returns a raw memory pointer out of this data (as an integer). </p>
      <p class="faldoc_funcdecl">BOM.ptr( )</p>
      
         <table class="faldoc_function">
         
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">An integer containing a pointer to this data. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">The default behavior of this method is to return the value of the memory location where inner data is stored, if the data is deep, and 0 otherwise. The Integer metaclass overrides this method so that it returns a dereferenced pointer, that is, the pointer value at the location indicated by the integer value, and String items overload this so that a pointer to the raw character sequence is returned. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="serialize">serialize()</a></h3>
      <p class="item_brief">Serialize the item on a stream for persistent storage. </p>
      <p class="faldoc_funcdecl">BOM.serialize( stream )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">stream</td><td class="faldoc_paramdesc">The stream on which to perform serialization. </td></tr>
         
         
         
            <tr><td class="faldoc_raise">Raises:</td><td class="faldoc_raisedesc">
            <table class="faldoc_raise">
            <tr><td class="faldoc_raiseitem"><a href="./class_IoError.html">IoError</a></td><td class="faldoc_raisedesc">on stream errors. </td></tr>
            </table>
            </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">The item is stored on the stream so that a deserialize() call on the same position in the stream where serialization took place will create an exact copy of the serialized item. </p>
<p class="faldoc_text">The application must ensure that the item does not contains circular references, or the serialization will enter an endless loop. </p>
<p class="faldoc_text">In case the underlying stream write causes an i/o failure, an error is raised. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="toString">toString()</a></h3>
      <p class="item_brief">Coverts the object to string. </p>
      <p class="faldoc_funcdecl">BOM.toString( [format] )</p>
      
         <table class="faldoc_function">
         
         <tr><td class="faldoc_optparam">format</td><td class="faldoc_optparamdesc">Optional object-specific format string. </td></tr>
         
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">Calling this BOM method is equivalent to call toString() core function passing the item as the first parameter. </p>
<p class="faldoc_text">Returns a string representation of the given item. If applied on strings, it returns the string as is, while it converts numbers with default internal conversion. Ranges are represented as "[N:M:S]" where N and M are respectively lower and higher limits of the range, and S is the step. Nil values are represented as "Nil". </p>
<p class="faldoc_text">The format parameter is not a Falcon format specification, but a specific optional object-specific format that may be passed to objects willing to use them. In example, the TimeStamp class uses this parameter to format its string representation. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="typeId">typeId()</a></h3>
      <p class="item_brief">Returns an integer indicating the type of this item. </p>
      <p class="faldoc_funcdecl">BOM.typeId( )</p>
      
         <table class="faldoc_function">
         
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">A constant indicating the type of the item. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text"> See <a href="./functions.html#typeOf">typeOf</a>() function for details. </p>
</p>
   

<hr/>
<div class="navibottom">
   <center>
      <a href="./index.html">Main</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./pages.html">Related pages</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./groups.html">Groups</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./funset.html">Function sets</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./classes.html">Classes</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./objects.html">Objects</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./functions.html">All functions</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./globals.html">Globals</a>
   </center>
</div>
</div>
<div class="faldoc_signature">Made with <a href="http://www.falconpl.org">faldoc 2.2.0</div>
</body>
</html>