You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by nw...@apache.org on 2014/11/23 18:51:52 UTC

svn commit: r1641232 - in /lucy/site/trunk/content/docs/c: cfish.html cfish_Err.html cfish_Obj.html

Author: nwellnhof
Date: Sun Nov 23 17:51:51 2014
New Revision: 1641232

URL: http://svn.apache.org/r1641232
Log:
Clownfish C API docs

Added:
    lucy/site/trunk/content/docs/c/cfish.html
    lucy/site/trunk/content/docs/c/cfish_Err.html
    lucy/site/trunk/content/docs/c/cfish_Obj.html

Added: lucy/site/trunk/content/docs/c/cfish.html
URL: http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/c/cfish.html?rev=1641232&view=auto
==============================================================================
--- lucy/site/trunk/content/docs/c/cfish.html (added)
+++ lucy/site/trunk/content/docs/c/cfish.html Sun Nov 23 17:51:51 2014
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta name="viewport" content="width=device-width" />
+<style type="text/css">
+body {
+    font-family: sans-serif;
+    font-size: 0.85em;
+    max-width: 640px;
+}
+dt {
+    font-weight: bold;
+}
+pre {
+    border: 1px solid #000;
+    padding: 0.2em 0.4em;
+    background: #f6f6f6;
+    font-size: 1.2em;
+}
+code {
+    font-family: "Consolas", "Menlo", monospace;
+}
+</style>
+</head>
+<body>
+<h1>C API documentation for Clownfish</h1>
+<ul>
+<li><a href="cfish_Err.html">Clownfish::Err</a></li>
+<li><a href="cfish_Obj.html">Clownfish::Obj</a></li>
+</ul>
+</body>
+</html>

Added: lucy/site/trunk/content/docs/c/cfish_Err.html
URL: http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/c/cfish_Err.html?rev=1641232&view=auto
==============================================================================
--- lucy/site/trunk/content/docs/c/cfish_Err.html (added)
+++ lucy/site/trunk/content/docs/c/cfish_Err.html Sun Nov 23 17:51:51 2014
@@ -0,0 +1,94 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta name="viewport" content="width=device-width" />
+<style type="text/css">
+body {
+    font-family: sans-serif;
+    font-size: 0.85em;
+    max-width: 640px;
+}
+dt {
+    font-weight: bold;
+}
+pre {
+    border: 1px solid #000;
+    padding: 0.2em 0.4em;
+    background: #f6f6f6;
+    font-size: 1.2em;
+}
+code {
+    font-family: "Consolas", "Menlo", monospace;
+}
+</style>
+</head>
+<body>
+<h1>Clownfish::Err</h1>
+<h2>Name</h2>
+<p>Clownfish::Err - Exception.</p>
+<h2>Description</h2>
+<p>Clownfish::Err is the base class for exceptions in the Clownfish object
+hierarchy.</p>
+<p>The Err module also provides access to a per-thread Err shared variable via
+set_error() and get_error().  It may be used to store an Err object
+temporarily, so that calling code may choose how to handle a particular
+error condition.</p>
+<h2>Functions</h2>
+<dl>
+<dt>set_error</dt>
+<dd>
+<pre><code>void
+<strong>cfish_Err_set_error</strong>(
+    cfish_Err* <strong>error</strong> // decremented
+);
+</code></pre>
+<p>Set the value of &quot;error&quot;, a per-thread Err shared variable.</p>
+</dd>
+<dt>get_error</dt>
+<dd>
+<pre><code>cfish_Err*
+<strong>cfish_Err_get_error</strong>(void);
+</code></pre>
+<p>Retrieve per-thread Err shared variable &quot;error&quot;.</p>
+</dd>
+<dt>trap</dt>
+<dd>
+<pre><code>cfish_Err* // incremented
+<strong>cfish_Err_trap</strong>(
+    CFISH_Err_Attempt_t <strong>routine</strong>,
+    void* <strong>context</strong>
+);
+</code></pre>
+<p>Run <code>routine</code> within the host's exception handling
+environment, catching and returning any errors that occur.</p>
+<p>If an unrecognized host exception is trapped, it will be wrapped in an
+Err so that it can be handled by Clownfish code.</p>
+<p><strong>Returns:</strong> an Err, or NULL if no exception occurs.</p>
+</dd>
+</dl>
+<h2>Methods</h2>
+<h3>Novel methods</h3>
+<dl>
+<dt>Cat_Mess</dt>
+<dd>
+<pre><code>void
+<strong>CFISH_Err_Cat_Mess</strong>(
+    cfish_Err* <strong>self</strong>,
+    <a href="cfish_String.html">cfish_String*</a> <strong>mess</strong>
+);
+</code></pre>
+<p>Concatenate the supplied argument onto the internal &quot;mess&quot;.</p>
+</dd>
+<dt>Get_Mess</dt>
+<dd>
+<pre><code><a href="cfish_String.html">cfish_String*</a>
+<strong>CFISH_Err_Get_Mess</strong>(
+    cfish_Err* <strong>self</strong>
+);
+</code></pre>
+</dd>
+</dl>
+<h2>Inheritance</h2>
+<p>Clownfish::Err is a <a href="cfish_Obj.html">Clownfish::Obj</a>.</p>
+</body>
+</html>

Added: lucy/site/trunk/content/docs/c/cfish_Obj.html
URL: http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/c/cfish_Obj.html?rev=1641232&view=auto
==============================================================================
--- lucy/site/trunk/content/docs/c/cfish_Obj.html (added)
+++ lucy/site/trunk/content/docs/c/cfish_Obj.html Sun Nov 23 17:51:51 2014
@@ -0,0 +1,188 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta name="viewport" content="width=device-width" />
+<style type="text/css">
+body {
+    font-family: sans-serif;
+    font-size: 0.85em;
+    max-width: 640px;
+}
+dt {
+    font-weight: bold;
+}
+pre {
+    border: 1px solid #000;
+    padding: 0.2em 0.4em;
+    background: #f6f6f6;
+    font-size: 1.2em;
+}
+code {
+    font-family: "Consolas", "Menlo", monospace;
+}
+</style>
+</head>
+<body>
+<h1>Clownfish::Obj</h1>
+<h2>Name</h2>
+<p>Clownfish::Obj - Base class for all objects.</p>
+<h2>Functions</h2>
+<dl>
+<dt>init</dt>
+<dd>
+<pre><code>cfish_Obj*
+<strong>cfish_Obj_init</strong>(
+    cfish_Obj* <strong>self</strong>
+);
+</code></pre>
+<p>Abstract initializer.</p>
+</dd>
+</dl>
+<h2>Methods</h2>
+<h3>Abstract methods</h3>
+<dl>
+<dt>Clone</dt>
+<dd>
+<pre><code>cfish_Obj* // incremented
+<strong>CFISH_Obj_Clone</strong>(
+    cfish_Obj* <strong>self</strong>
+);
+</code></pre>
+<p>Return a clone of the object.</p>
+</dd>
+<dt>Compare_To</dt>
+<dd>
+<pre><code>int32_t
+<strong>CFISH_Obj_Compare_To</strong>(
+    cfish_Obj* <strong>self</strong>,
+    cfish_Obj* <strong>other</strong>
+);
+</code></pre>
+<p>Indicate whether one object is less than, equal to, or greater than
+another.</p>
+<dl>
+<dt><emph>other</emph></dt>
+<dd><p>Another Obj.</p>
+</dd>
+</dl>
+<p><strong>Returns:</strong> 0 if the objects are equal, a negative number if
+<code>self</code> is less than <code>other</code>, and a positive
+number if <code>self</code> is greater than <code>other</code>.</p>
+</dd>
+<dt>To_I64</dt>
+<dd>
+<pre><code>int64_t
+<strong>CFISH_Obj_To_I64</strong>(
+    cfish_Obj* <strong>self</strong>
+);
+</code></pre>
+<p>Convert the object to a 64-bit integer.</p>
+</dd>
+<dt>To_F64</dt>
+<dd>
+<pre><code>double
+<strong>CFISH_Obj_To_F64</strong>(
+    cfish_Obj* <strong>self</strong>
+);
+</code></pre>
+<p>Convert the object to a double precision floating point number.</p>
+</dd>
+<dt>Mimic</dt>
+<dd>
+<pre><code>void
+<strong>CFISH_Obj_Mimic</strong>(
+    cfish_Obj* <strong>self</strong>,
+    cfish_Obj* <strong>other</strong>
+);
+</code></pre>
+<p>Update the internal state of the object to mimic that of
+<code>other</code>.</p>
+</dd>
+</dl>
+<h3>Novel methods</h3>
+<dl>
+<dt>Destroy</dt>
+<dd>
+<pre><code>void
+<strong>CFISH_Obj_Destroy</strong>(
+    cfish_Obj* <strong>self</strong>
+);
+</code></pre>
+<p>Generic destructor.  Frees the struct itself but not any complex
+member elements.</p>
+</dd>
+<dt>Equals</dt>
+<dd>
+<pre><code>bool
+<strong>CFISH_Obj_Equals</strong>(
+    cfish_Obj* <strong>self</strong>,
+    cfish_Obj* <strong>other</strong>
+);
+</code></pre>
+<p>Indicate whether two objects are the same.  By default, compares the
+memory address.</p>
+<dl>
+<dt><emph>other</emph></dt>
+<dd><p>Another Obj.</p>
+</dd>
+</dl>
+</dd>
+<dt>Hash_Sum</dt>
+<dd>
+<pre><code>int32_t
+<strong>CFISH_Obj_Hash_Sum</strong>(
+    cfish_Obj* <strong>self</strong>
+);
+</code></pre>
+<p>Return a hash code for the object -- by default, the memory address.</p>
+</dd>
+<dt>Get_Class</dt>
+<dd>
+<pre><code><a href="cfish_Class.html">cfish_Class*</a>
+<strong>CFISH_Obj_Get_Class</strong>(
+    cfish_Obj* <strong>self</strong>
+);
+</code></pre>
+<p>Return the object's Class.</p>
+</dd>
+<dt>Get_Class_Name</dt>
+<dd>
+<pre><code><a href="cfish_String.html">cfish_String*</a>
+<strong>CFISH_Obj_Get_Class_Name</strong>(
+    cfish_Obj* <strong>self</strong>
+);
+</code></pre>
+<p>Return the name of the class that the object belongs to.</p>
+</dd>
+<dt>Is_A</dt>
+<dd>
+<pre><code>bool
+<strong>CFISH_Obj_Is_A</strong>(
+    cfish_Obj* <strong>self</strong>,
+    <a href="cfish_Class.html">cfish_Class*</a> <strong>ancestor</strong>
+);
+</code></pre>
+<p>Indicate whether the object is a descendent of <code>ancestor</code>.</p>
+</dd>
+<dt>To_String</dt>
+<dd>
+<pre><code><a href="cfish_String.html">cfish_String*</a> // incremented
+<strong>CFISH_Obj_To_String</strong>(
+    cfish_Obj* <strong>self</strong>
+);
+</code></pre>
+<p>Generic stringification: &quot;ClassName@hex_mem_address&quot;.</p>
+</dd>
+<dt>To_Bool</dt>
+<dd>
+<pre><code>bool
+<strong>CFISH_Obj_To_Bool</strong>(
+    cfish_Obj* <strong>self</strong>
+);
+</code></pre>
+<p>Evaluate the object in a boolean context.  By default, invokes
+To_I64() and returns true if it is non-zero.</p>
+</dd>
+</dl>
+</body>
+</html>