Sophie

Sophie

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

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 Object - Class Object</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 Object</h1>

<p class="faldoc_brief">Object (class instance) type basic object model metaclass. </p>
<p class="faldoc_funcdecl">
<b>class</b> Object \
      <b>from</b> <a href="./class_BOM.html">BOM</a>
</p>


   
   <h2 class="faldoc_title">Summary</h2>
   <table class="faldoc_list">
   
      
         <tr><td><a href="#apply">apply()</a></td><td>Applies the values in a dictionary to the corresponding properties. </td></tr>
      
         <tr><td><a href="#attributes">attributes()</a></td><td>Returns a dictionary containing annotation attributes of the given object. </td></tr>
      
         <tr><td><a href="#comp">comp()</a></td><td>Appends elements to this object through a filter. </td></tr>
      
         <tr><td><a href="#getProperty">getProperty()</a></td><td>Returns the value of a property in an object. </td></tr>
      
         <tr><td><a href="#getState">getState()</a></td><td>Return the current state of an object. </td></tr>
      
         <tr><td><a href="#mcomp">mcomp()</a></td><td>Appends elements to this object through a filter. </td></tr>
      
         <tr><td><a href="#mfcomp">mfcomp()</a></td><td>Appends elements to this object through a filter. </td></tr>
      
         <tr><td><a href="#properties">properties()</a></td><td>Returns all the properties in the object. </td></tr>
      
         <tr><td><a href="#retrieve">retrieve()</a></td><td>Gets the values stored in the properties of this object. </td></tr>
      
         <tr><td><a href="#setProperty">setProperty()</a></td><td>Sets the value of a proprety in this object </td></tr>
      
         <tr><td><a href="#setState">setState()</a></td><td>Change the current active state of an object. </td></tr>
      
   
   </table>





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





   <h2 class="faldoc_title">Methods</h2>
   
      <h3 class="faldoc_funcname"><a name="apply">apply()</a></h3>
      <p class="item_brief">Applies the values in a dictionary to the corresponding properties. </p>
      <p class="faldoc_funcdecl">Object.apply( dict )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">dict</td><td class="faldoc_paramdesc">A "stamp" dictionary. </td></tr>
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">This same object. </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_AccessError.html">AccessError</a></td><td class="faldoc_raisedesc">if some property listed in the dictionary is not defined. </td></tr>
            </table>
            </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">This method applies a "stamp" on this object. The idea is that of copying the contents of all the items in the dictionary into the properties of this object. Dictionaries are more flexible than objects, at times they are preferred for i.e. network operations and key/value databases. With this method, you can transfer data from a dictionary in an object with a single VM step, paying just the cost of the copy; in other words, sparing the VM operations needed for looping over the dictionary and searching dynamically the required properties. </p>
<p class="faldoc_note"><span class="faldoc_notetype">Note:</span>  Non-string keys in <b>dict</b> are simply skipped. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="attributes">attributes()</a></h3>
      <p class="item_brief">Returns a dictionary containing annotation attributes of the given object. </p>
      <p class="faldoc_funcdecl">Object.attributes( )</p>
      
         <table class="faldoc_function">
         
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">Nil if the object has no attributes, or a string-indexed dictionary. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">If the object is a class instance, this method will return the attributes of the generator class. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="comp">comp()</a></h3>
      <p class="item_brief">Appends elements to this object through a filter. </p>
      <p class="faldoc_funcdecl">Object.comp( source, [filter] )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">source</td><td class="faldoc_paramdesc">One sequence, range or callable generating items. </td></tr>
         <tr><td class="faldoc_optparam">filter</td><td class="faldoc_optparamdesc">A filtering function receiving one item at a time. </td></tr>
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">This object. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text"> This method extracts one item at a time from the source, and calls repeatedly the <b>append</b> method of this object. </p>
<p class="faldoc_text"> Please, see the description of <a href="./class_Sequence.html#comp">Sequence.comp</a>. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="getProperty">getProperty()</a></h3>
      <p class="item_brief">Returns the value of a property in an object. </p>
      <p class="faldoc_funcdecl">Object.getProperty( propName )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">propName</td><td class="faldoc_paramdesc">A string representing the name of a property or a method inside the object. </td></tr>
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">the property </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_AccessError.html">AccessError</a></td><td class="faldoc_raisedesc">if the property can't be found. </td></tr>
            </table>
            </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">An item representing the property is returned. The returned value is actually a copy of the property; assigning a new value to it won't have any effect on the original object. </p>
<p class="faldoc_text">If the property is a method, a callable method item is returned. If the property is not found, an error of class RangeError is raised. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="getState">getState()</a></h3>
      <p class="item_brief">Return the current state of an object. </p>
      <p class="faldoc_funcdecl">Object.getState( )</p>
      
         <table class="faldoc_function">
         
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">A string representing the current state of an object, or nil if the object is stateless. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">This function returns the current state in which an object is operating. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="mcomp">mcomp()</a></h3>
      <p class="item_brief">Appends elements to this object through a filter. </p>
      <p class="faldoc_funcdecl">Object.mcomp( ... )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">...</td><td class="faldoc_paramdesc">One or more sequences, ranges or callables generating items. </td></tr>
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">This object. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">This method sends the data generated from multiple comprehension, to the append method of this object. </p>
<p class="faldoc_text"> Please, see the description of <a href="./class_Sequence.html#comp">Sequence.comp</a>. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="mfcomp">mfcomp()</a></h3>
      <p class="item_brief">Appends elements to this object through a filter. </p>
      <p class="faldoc_funcdecl">Object.mfcomp( filter, ... )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">filter</td><td class="faldoc_paramdesc">A filter function receiving each element before its insertion, or nil. </td></tr><tr><td class="faldoc_param">...</td><td class="faldoc_paramdesc">One or more sequences, ranges or callables generating items. </td></tr>
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">This object. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text"> This method performs a filtered multiple comprehension and and calls repeatedly the <b>append</b> method of this object, passing the output of the filter function to it each time. If the filter function returns an oob(1), the step is skipped and the <b>append</b> method is not called. </p>
<p class="faldoc_text"> Please, see the description of <a href="./class_Sequence.html#comp">Sequence.comp</a>. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="properties">properties()</a></h3>
      <p class="item_brief">Returns all the properties in the object. </p>
      <p class="faldoc_funcdecl">Object.properties( )</p>
      
         <table class="faldoc_function">
         
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">An array of strings representing property names. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">This method returns all the properties in this object. </p>
<p class="faldoc_text">The property list includes properties that refer to any kind of data, including functions (that is, methods), but it doesn't include properties in the metaclass of this item (FBOM properties). </p>
<p class="faldoc_text">The returned list is ordered by UNICODE value of the property names. </p>
<p class="faldoc_note"><span class="faldoc_notetype">Note:</span> Subclasses are seen as properties, so they will returned in the list too. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="retrieve">retrieve()</a></h3>
      <p class="item_brief">Gets the values stored in the properties of this object. </p>
      <p class="faldoc_funcdecl">Object.retrieve( [dict] )</p>
      
         <table class="faldoc_function">
         
         <tr><td class="faldoc_optparam">dict</td><td class="faldoc_optparamdesc">A "stamp" dictionary. </td></tr>
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">A dictionary containing the contents of each property (stored as a key in the dictionary). </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_AccessError.html">AccessError</a></td><td class="faldoc_raisedesc">if some property listed in the dictionary is not defined. </td></tr>
            </table>
            </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">This method takes all the data values stored in the properties of this object (ignoring methods), and places them in a dictionary. Property names are used as keys under which to store flat copies of the property values. </p>
<p class="faldoc_text"> If a <b>dict</b> parameter is passed, this method will take only the properties stored as keys, and eventually raise an AccessError if some of them are not found. </p>
<p class="faldoc_text">Otherwise, a new dictionary will be filled with all the properties in this object. </p>
<p class="faldoc_note"><span class="faldoc_notetype">Note:</span> In case of repeated activity, the same dictionary can be used to fetch new values to spare memory and CPU. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="setProperty">setProperty()</a></h3>
      <p class="item_brief">Sets the value of a proprety in this object </p>
      <p class="faldoc_funcdecl">Object.setProperty( propName, value )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">propName</td><td class="faldoc_paramdesc">A string representing the name of a property or a method inside the object. </td></tr><tr><td class="faldoc_param">value</td><td class="faldoc_paramdesc">The property new value. </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_AccessError.html">AccessError</a></td><td class="faldoc_raisedesc">If the property can't be found. </td></tr>
            </table>
            </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">Alters the value of the property in the given object. If the required property is not present, an AccessError is raised. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="setState">setState()</a></h3>
      <p class="item_brief">Change the current active state of an object. </p>
      <p class="faldoc_funcdecl">Object.setState( nstate )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">nstate</td><td class="faldoc_paramdesc">The new state into which the object is moved. </td></tr>
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">Return value of the __leave -> __enter sequence, if any, or nil </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_CodeError.html">CodeError</a></td><td class="faldoc_raisedesc">if the state is not part of the object state. </td></tr>
            </table>
            </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">This method changes the state of the object, applying a new set of function described in the state section. </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>