Added: lucy/site/trunk/content/docs/0.5.0/c/Lucy/Search/Searcher.mdtext URL: http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/0.5.0/c/Lucy/Search/Searcher.mdtext?rev=1762636&view=auto ============================================================================== --- lucy/site/trunk/content/docs/0.5.0/c/Lucy/Search/Searcher.mdtext (added) +++ lucy/site/trunk/content/docs/0.5.0/c/Lucy/Search/Searcher.mdtext Wed Sep 28 12:06:24 2016 @@ -0,0 +1,176 @@ +Title: Lucy::Search::Searcher â C API Documentation + +<div class="c-api"> +<h2>Lucy::Search::Searcher</h2> +<table> +<tr> +<td class="label">parcel</td> +<td><a href="../../lucy.html">Lucy</a></td> +</tr> +<tr> +<td class="label">class variable</td> +<td><code><span class="prefix">LUCY_</span>SEARCHER</code></td> +</tr> +<tr> +<td class="label">struct symbol</td> +<td><code><span class="prefix">lucy_</span>Searcher</code></td> +</tr> +<tr> +<td class="label">class nickname</td> +<td><code><span class="prefix">lucy_</span>Searcher</code></td> +</tr> +<tr> +<td class="label">header file</td> +<td><code>Lucy/Search/Searcher.h</code></td> +</tr> +</table> +<h3>Name</h3> +<p>Lucy::Search::Searcher â Base class for searching collections of documents.</p> +<h3>Description</h3> +<p>Abstract base class for objects which search. Core subclasses include +<a href="../../Lucy/Search/IndexSearcher.html">IndexSearcher</a> and +<a href="../../Lucy/Search/PolySearcher.html">PolySearcher</a>.</p> +<h3>Functions</h3> +<dl> +<dt id="func_init">init</dt> +<dd> +<pre><code><span class="prefix">lucy_</span>Searcher* +<span class="prefix">lucy_</span><strong>Searcher_init</strong>( + <span class="prefix">lucy_</span>Searcher *<strong>self</strong>, + <span class="prefix">lucy_</span><a href="../../Lucy/Plan/Schema.html">Schema</a> *<strong>schema</strong> +); +</code></pre> +<p>Abstract initializer.</p> +<dl> +<dt>schema</dt> +<dd><p>A Schema.</p> +</dd> +</dl> +</dd> +</dl> +<h3>Methods</h3> +<dl> +<dt id="func_Doc_Max">Doc_Max <span class="comment">(abstract)</span></dt> +<dd> +<pre><code>int32_t +<span class="prefix">lucy_</span><strong>Searcher_Doc_Max</strong>( + <span class="prefix">lucy_</span>Searcher *<strong>self</strong> +); +</code></pre> +<p>Return the maximum number of docs in the collection represented by the +Searcher, which is also the highest possible internal doc id. +Documents which have been marked as deleted but not yet purged are +included in this count.</p> +</dd> +<dt id="func_Doc_Freq">Doc_Freq <span class="comment">(abstract)</span></dt> +<dd> +<pre><code>uint32_t +<span class="prefix">lucy_</span><strong>Searcher_Doc_Freq</strong>( + <span class="prefix">lucy_</span>Searcher *<strong>self</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a> *<strong>field</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a> *<strong>term</strong> +); +</code></pre> +<p>Return the number of documents which contain the term in the given +field.</p> +<dl> +<dt>field</dt> +<dd><p>Field name.</p> +</dd> +<dt>term</dt> +<dd><p>The term to look up.</p> +</dd> +</dl> +</dd> +<dt id="func_Glean_Query">Glean_Query</dt> +<dd> +<pre><code><span class="prefix">lucy_</span><a href="../../Lucy/Search/Query.html">Query</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>Searcher_Glean_Query</strong>( + <span class="prefix">lucy_</span>Searcher *<strong>self</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a> *<strong>query</strong> +); +</code></pre> +<p>If the supplied object is a Query, return it; if itâs a query string, +create a QueryParser and parse it to produce a query against all +indexed fields.</p> +</dd> +<dt id="func_Hits">Hits</dt> +<dd> +<pre><code><span class="prefix">lucy_</span><a href="../../Lucy/Search/Hits.html">Hits</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>Searcher_Hits</strong>( + <span class="prefix">lucy_</span>Searcher *<strong>self</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a> *<strong>query</strong>, + uint32_t <strong>offset</strong>, + uint32_t <strong>num_wanted</strong>, + <span class="prefix">lucy_</span><a href="../../Lucy/Search/SortSpec.html">SortSpec</a> *<strong>sort_spec</strong> +); +</code></pre> +<p>Return a Hits object containing the top results.</p> +<dl> +<dt>query</dt> +<dd><p>Either a Query object or a query string.</p> +</dd> +<dt>offset</dt> +<dd><p>The number of most-relevant hits to discard, typically +used when âpagingâ through hits N at a time. Setting +<code>offset</code> to 20 and <code>num_wanted</code> to 10 retrieves +hits 21-30, assuming that 30 hits can be found.</p> +</dd> +<dt>num_wanted</dt> +<dd><p>The number of hits you would like to see after +<code>offset</code> is taken into account.</p> +</dd> +<dt>sort_spec</dt> +<dd><p>A <a href="../../Lucy/Search/SortSpec.html">SortSpec</a>, which will affect +how results are ranked and returned.</p> +</dd> +</dl> +</dd> +<dt id="func_Collect">Collect <span class="comment">(abstract)</span></dt> +<dd> +<pre><code>void +<span class="prefix">lucy_</span><strong>Searcher_Collect</strong>( + <span class="prefix">lucy_</span>Searcher *<strong>self</strong>, + <span class="prefix">lucy_</span><a href="../../Lucy/Search/Query.html">Query</a> *<strong>query</strong>, + <span class="prefix">lucy_</span><a href="../../Lucy/Search/Collector.html">Collector</a> *<strong>collector</strong> +); +</code></pre> +<p>Iterate over hits, feeding them into a +<a href="../../Lucy/Search/Collector.html">Collector</a>.</p> +<dl> +<dt>query</dt> +<dd><p>A Query.</p> +</dd> +<dt>collector</dt> +<dd><p>A Collector.</p> +</dd> +</dl> +</dd> +<dt id="func_Fetch_Doc">Fetch_Doc <span class="comment">(abstract)</span></dt> +<dd> +<pre><code><span class="prefix">lucy_</span><a href="../../Lucy/Document/HitDoc.html">HitDoc</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>Searcher_Fetch_Doc</strong>( + <span class="prefix">lucy_</span>Searcher *<strong>self</strong>, + int32_t <strong>doc_id</strong> +); +</code></pre> +<p>Retrieve a document. Throws an error if the doc id is out of range.</p> +<dl> +<dt>doc_id</dt> +<dd><p>A document id.</p> +</dd> +</dl> +</dd> +<dt id="func_Get_Schema">Get_Schema</dt> +<dd> +<pre><code><span class="prefix">lucy_</span><a href="../../Lucy/Plan/Schema.html">Schema</a>* +<span class="prefix">lucy_</span><strong>Searcher_Get_Schema</strong>( + <span class="prefix">lucy_</span>Searcher *<strong>self</strong> +); +</code></pre> +<p>Accessor for the objectâs <code>schema</code> member.</p> +</dd> +</dl> +<h3>Inheritance</h3> +<p>Lucy::Search::Searcher is a <a href="../../Clownfish/Obj.html">Clownfish::Obj</a>.</p> +</div>
Added: lucy/site/trunk/content/docs/0.5.0/c/Lucy/Search/SortRule.mdtext URL: http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/0.5.0/c/Lucy/Search/SortRule.mdtext?rev=1762636&view=auto ============================================================================== --- lucy/site/trunk/content/docs/0.5.0/c/Lucy/Search/SortRule.mdtext (added) +++ lucy/site/trunk/content/docs/0.5.0/c/Lucy/Search/SortRule.mdtext Wed Sep 28 12:06:24 2016 @@ -0,0 +1,105 @@ +Title: Lucy::Search::SortRule â C API Documentation + +<div class="c-api"> +<h2>Lucy::Search::SortRule</h2> +<table> +<tr> +<td class="label">parcel</td> +<td><a href="../../lucy.html">Lucy</a></td> +</tr> +<tr> +<td class="label">class variable</td> +<td><code><span class="prefix">LUCY_</span>SORTRULE</code></td> +</tr> +<tr> +<td class="label">struct symbol</td> +<td><code><span class="prefix">lucy_</span>SortRule</code></td> +</tr> +<tr> +<td class="label">class nickname</td> +<td><code><span class="prefix">lucy_</span>SortRule</code></td> +</tr> +<tr> +<td class="label">header file</td> +<td><code>Lucy/Search/SortRule.h</code></td> +</tr> +</table> +<h3>Name</h3> +<p>Lucy::Search::SortRule â Element of a SortSpec.</p> +<h3>Description</h3> +<p>SortRules are the building blocks used to assemble +<a href="../../Lucy/Search/SortSpec.html">SortSpecs</a>; each SortRule defines a single +level of sorting. For example, sorting first by âcategoryâ then by score +requires a SortSpec with two SortRule elements.</p> +<h3>Functions</h3> +<dl> +<dt id="func_new">new</dt> +<dd> +<pre><code><span class="prefix">lucy_</span>SortRule* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>SortRule_new</strong>( + int32_t <strong>type</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a> *<strong>field</strong>, + bool <strong>reverse</strong> +); +</code></pre> +<p>Create a new SortRule.</p> +<dl> +<dt>type</dt> +<dd><p>Indicate whether to sort by score, field, etc. (The +default is to sort by a field.)</p> +</dd> +<dt>field</dt> +<dd><p>The name of a <code>sortable</code> field.</p> +</dd> +<dt>reverse</dt> +<dd><p>If true, reverse the order of the sort for this rule.</p> +</dd> +</dl> +</dd> +<dt id="func_init">init</dt> +<dd> +<pre><code><span class="prefix">lucy_</span>SortRule* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>SortRule_init</strong>( + <span class="prefix">lucy_</span>SortRule *<strong>self</strong>, + int32_t <strong>type</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a> *<strong>field</strong>, + bool <strong>reverse</strong> +); +</code></pre> +<p>Initialize a SortRule. See <a href="../../Lucy/Search/SortRule.html#func_new">new()</a> for a description of the +parameters.</p> +</dd> +</dl> +<h3>Methods</h3> +<dl> +<dt id="func_Get_Field">Get_Field</dt> +<dd> +<pre><code><span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a>* +<span class="prefix">lucy_</span><strong>SortRule_Get_Field</strong>( + <span class="prefix">lucy_</span>SortRule *<strong>self</strong> +); +</code></pre> +<p>Accessor for âfieldâ member.</p> +</dd> +<dt id="func_Get_Type">Get_Type</dt> +<dd> +<pre><code>int32_t +<span class="prefix">lucy_</span><strong>SortRule_Get_Type</strong>( + <span class="prefix">lucy_</span>SortRule *<strong>self</strong> +); +</code></pre> +<p>Accessor for âtypeâ member.</p> +</dd> +<dt id="func_Get_Reverse">Get_Reverse</dt> +<dd> +<pre><code>bool +<span class="prefix">lucy_</span><strong>SortRule_Get_Reverse</strong>( + <span class="prefix">lucy_</span>SortRule *<strong>self</strong> +); +</code></pre> +<p>Accessor for âreverseâ member.</p> +</dd> +</dl> +<h3>Inheritance</h3> +<p>Lucy::Search::SortRule is a <a href="../../Clownfish/Obj.html">Clownfish::Obj</a>.</p> +</div> Added: lucy/site/trunk/content/docs/0.5.0/c/Lucy/Search/SortSpec.mdtext URL: http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/0.5.0/c/Lucy/Search/SortSpec.mdtext?rev=1762636&view=auto ============================================================================== --- lucy/site/trunk/content/docs/0.5.0/c/Lucy/Search/SortSpec.mdtext (added) +++ lucy/site/trunk/content/docs/0.5.0/c/Lucy/Search/SortSpec.mdtext Wed Sep 28 12:06:24 2016 @@ -0,0 +1,70 @@ +Title: Lucy::Search::SortSpec â C API Documentation + +<div class="c-api"> +<h2>Lucy::Search::SortSpec</h2> +<table> +<tr> +<td class="label">parcel</td> +<td><a href="../../lucy.html">Lucy</a></td> +</tr> +<tr> +<td class="label">class variable</td> +<td><code><span class="prefix">LUCY_</span>SORTSPEC</code></td> +</tr> +<tr> +<td class="label">struct symbol</td> +<td><code><span class="prefix">lucy_</span>SortSpec</code></td> +</tr> +<tr> +<td class="label">class nickname</td> +<td><code><span class="prefix">lucy_</span>SortSpec</code></td> +</tr> +<tr> +<td class="label">header file</td> +<td><code>Lucy/Search/SortSpec.h</code></td> +</tr> +</table> +<h3>Name</h3> +<p>Lucy::Search::SortSpec â Specify a custom sort order for search results.</p> +<h3>Description</h3> +<p>By default, searches return results in order of relevance; SortSpec allows +you to indicate an alternate order via an array of +<a href="../../Lucy/Search/SortRule.html">SortRules</a>.</p> +<p>Fields you wish to sort against must be <code>sortable</code>.</p> +<p>For a stable sort (important when paging through results), add a +sort-by-doc rule as the last SortRule.</p> +<h3>Functions</h3> +<dl> +<dt id="func_new">new</dt> +<dd> +<pre><code><span class="prefix">lucy_</span>SortSpec* +<span class="prefix">lucy_</span><strong>SortSpec_new</strong>( + <span class="prefix">cfish_</span><a href="../../Clownfish/Vector.html">Vector</a> *<strong>rules</strong> +); +</code></pre> +<p>Create a new SortSpec.</p> +<dl> +<dt>rules</dt> +<dd><p>An array of SortRules.</p> +</dd> +</dl> +</dd> +<dt id="func_init">init</dt> +<dd> +<pre><code><span class="prefix">lucy_</span>SortSpec* +<span class="prefix">lucy_</span><strong>SortSpec_init</strong>( + <span class="prefix">lucy_</span>SortSpec *<strong>self</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Vector.html">Vector</a> *<strong>rules</strong> +); +</code></pre> +<p>Initialize a SortSpec.</p> +<dl> +<dt>rules</dt> +<dd><p>An array of SortRules.</p> +</dd> +</dl> +</dd> +</dl> +<h3>Inheritance</h3> +<p>Lucy::Search::SortSpec is a <a href="../../Clownfish/Obj.html">Clownfish::Obj</a>.</p> +</div> Added: lucy/site/trunk/content/docs/0.5.0/c/Lucy/Search/Span.mdtext URL: http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/0.5.0/c/Lucy/Search/Span.mdtext?rev=1762636&view=auto ============================================================================== --- lucy/site/trunk/content/docs/0.5.0/c/Lucy/Search/Span.mdtext (added) +++ lucy/site/trunk/content/docs/0.5.0/c/Lucy/Search/Span.mdtext Wed Sep 28 12:06:24 2016 @@ -0,0 +1,171 @@ +Title: Lucy::Search::Span â C API Documentation + +<div class="c-api"> +<h2>Lucy::Search::Span</h2> +<table> +<tr> +<td class="label">parcel</td> +<td><a href="../../lucy.html">Lucy</a></td> +</tr> +<tr> +<td class="label">class variable</td> +<td><code><span class="prefix">LUCY_</span>SPAN</code></td> +</tr> +<tr> +<td class="label">struct symbol</td> +<td><code><span class="prefix">lucy_</span>Span</code></td> +</tr> +<tr> +<td class="label">class nickname</td> +<td><code><span class="prefix">lucy_</span>Span</code></td> +</tr> +<tr> +<td class="label">header file</td> +<td><code>Lucy/Search/Span.h</code></td> +</tr> +</table> +<h3>Name</h3> +<p>Lucy::Search::Span â An offset, a length, and a weight.</p> +<h3>Description</h3> +<p>Span objects store information about a span across an array of⦠+something. The unit is context-dependent.</p> +<p>Text is one possibility, in which case offset and length might be measured +in Unicode code points. However, the Span could also refer to a span +within an array of tokens, for example â in which case the start and +offset might be measured in token positions.</p> +<h3>Functions</h3> +<dl> +<dt id="func_new">new</dt> +<dd> +<pre><code><span class="prefix">lucy_</span>Span* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>Span_new</strong>( + int32_t <strong>offset</strong>, + int32_t <strong>length</strong>, + float <strong>weight</strong> +); +</code></pre> +<p>Create a new Span.</p> +<dl> +<dt>offset</dt> +<dd><p>Integer offset, unit is context-dependent.</p> +</dd> +<dt>length</dt> +<dd><p>Integer length, unit is context-dependent.</p> +</dd> +<dt>weight</dt> +<dd><p>A floating point weight.</p> +</dd> +</dl> +</dd> +<dt id="func_init">init</dt> +<dd> +<pre><code><span class="prefix">lucy_</span>Span* +<span class="prefix">lucy_</span><strong>Span_init</strong>( + <span class="prefix">lucy_</span>Span *<strong>self</strong>, + int32_t <strong>offset</strong>, + int32_t <strong>length</strong>, + float <strong>weight</strong> +); +</code></pre> +<p>Initialize a Span. See <a href="../../Lucy/Search/Span.html#func_new">new()</a> for a description of the +parameters.</p> +</dd> +</dl> +<h3>Methods</h3> +<dl> +<dt id="func_Get_Offset">Get_Offset</dt> +<dd> +<pre><code>int32_t +<span class="prefix">lucy_</span><strong>Span_Get_Offset</strong>( + <span class="prefix">lucy_</span>Span *<strong>self</strong> +); +</code></pre> +<p>Accessor for <code>offset</code> attribute.</p> +</dd> +<dt id="func_Set_Offset">Set_Offset</dt> +<dd> +<pre><code>void +<span class="prefix">lucy_</span><strong>Span_Set_Offset</strong>( + <span class="prefix">lucy_</span>Span *<strong>self</strong>, + int32_t <strong>offset</strong> +); +</code></pre> +<p>Setter for <code>offset</code> attribute.</p> +</dd> +<dt id="func_Get_Length">Get_Length</dt> +<dd> +<pre><code>int32_t +<span class="prefix">lucy_</span><strong>Span_Get_Length</strong>( + <span class="prefix">lucy_</span>Span *<strong>self</strong> +); +</code></pre> +<p>Accessor for <code>length</code> attribute.</p> +</dd> +<dt id="func_Set_Length">Set_Length</dt> +<dd> +<pre><code>void +<span class="prefix">lucy_</span><strong>Span_Set_Length</strong>( + <span class="prefix">lucy_</span>Span *<strong>self</strong>, + int32_t <strong>length</strong> +); +</code></pre> +<p>Setter for <code>length</code> attribute.</p> +</dd> +<dt id="func_Get_Weight">Get_Weight</dt> +<dd> +<pre><code>float +<span class="prefix">lucy_</span><strong>Span_Get_Weight</strong>( + <span class="prefix">lucy_</span>Span *<strong>self</strong> +); +</code></pre> +<p>Accessor for <code>weight</code> attribute.</p> +</dd> +<dt id="func_Set_Weight">Set_Weight</dt> +<dd> +<pre><code>void +<span class="prefix">lucy_</span><strong>Span_Set_Weight</strong>( + <span class="prefix">lucy_</span>Span *<strong>self</strong>, + float <strong>weight</strong> +); +</code></pre> +<p>Setter for <code>weight</code> attribute.</p> +</dd> +<dt id="func_Equals">Equals</dt> +<dd> +<pre><code>bool +<span class="prefix">lucy_</span><strong>Span_Equals</strong>( + <span class="prefix">lucy_</span>Span *<strong>self</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a> *<strong>other</strong> +); +</code></pre> +<p>Indicate whether two objects are the same. By default, compares the +memory address.</p> +<dl> +<dt>other</dt> +<dd><p>Another Obj.</p> +</dd> +</dl> +</dd> +<dt id="func_Compare_To">Compare_To</dt> +<dd> +<pre><code>int32_t +<span class="prefix">lucy_</span><strong>Span_Compare_To</strong>( + <span class="prefix">lucy_</span>Span *<strong>self</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a> *<strong>other</strong> +); +</code></pre> +<p>Indicate whether one object is less than, equal to, or greater than +another.</p> +<dl> +<dt>other</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> +</dl> +<h3>Inheritance</h3> +<p>Lucy::Search::Span is a <a href="../../Clownfish/Obj.html">Clownfish::Obj</a>.</p> +</div> Added: lucy/site/trunk/content/docs/0.5.0/c/Lucy/Search/TermQuery.mdtext URL: http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/0.5.0/c/Lucy/Search/TermQuery.mdtext?rev=1762636&view=auto ============================================================================== --- lucy/site/trunk/content/docs/0.5.0/c/Lucy/Search/TermQuery.mdtext (added) +++ lucy/site/trunk/content/docs/0.5.0/c/Lucy/Search/TermQuery.mdtext Wed Sep 28 12:06:24 2016 @@ -0,0 +1,185 @@ +Title: Lucy::Search::TermQuery â C API Documentation + +<div class="c-api"> +<h2>Lucy::Search::TermQuery</h2> +<table> +<tr> +<td class="label">parcel</td> +<td><a href="../../lucy.html">Lucy</a></td> +</tr> +<tr> +<td class="label">class variable</td> +<td><code><span class="prefix">LUCY_</span>TERMQUERY</code></td> +</tr> +<tr> +<td class="label">struct symbol</td> +<td><code><span class="prefix">lucy_</span>TermQuery</code></td> +</tr> +<tr> +<td class="label">class nickname</td> +<td><code><span class="prefix">lucy_</span>TermQuery</code></td> +</tr> +<tr> +<td class="label">header file</td> +<td><code>Lucy/Search/TermQuery.h</code></td> +</tr> +</table> +<h3>Name</h3> +<p>Lucy::Search::TermQuery â Query which matches individual terms.</p> +<h3>Description</h3> +<p>TermQuery is a subclass of <a href="../../Lucy/Search/Query.html">Query</a> for matching +individual terms in a specific field.</p> +<h3>Functions</h3> +<dl> +<dt id="func_new">new</dt> +<dd> +<pre><code><span class="prefix">lucy_</span>TermQuery* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>TermQuery_new</strong>( + <span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a> *<strong>field</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a> *<strong>term</strong> +); +</code></pre> +<p>Create a new TermQuery.</p> +<dl> +<dt>field</dt> +<dd><p>Field name.</p> +</dd> +<dt>term</dt> +<dd><p>Term text.</p> +</dd> +</dl> +</dd> +<dt id="func_init">init</dt> +<dd> +<pre><code><span class="prefix">lucy_</span>TermQuery* +<span class="prefix">lucy_</span><strong>TermQuery_init</strong>( + <span class="prefix">lucy_</span>TermQuery *<strong>self</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a> *<strong>field</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a> *<strong>term</strong> +); +</code></pre> +<p>Initialize a TermQuery.</p> +<dl> +<dt>field</dt> +<dd><p>Field name.</p> +</dd> +<dt>term</dt> +<dd><p>Term text.</p> +</dd> +</dl> +</dd> +</dl> +<h3>Methods</h3> +<dl> +<dt id="func_Get_Field">Get_Field</dt> +<dd> +<pre><code><span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a>* +<span class="prefix">lucy_</span><strong>TermQuery_Get_Field</strong>( + <span class="prefix">lucy_</span>TermQuery *<strong>self</strong> +); +</code></pre> +<p>Accessor for objectâs <code>field</code> member.</p> +</dd> +<dt id="func_Get_Term">Get_Term</dt> +<dd> +<pre><code><span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a>* +<span class="prefix">lucy_</span><strong>TermQuery_Get_Term</strong>( + <span class="prefix">lucy_</span>TermQuery *<strong>self</strong> +); +</code></pre> +<p>Accessor for objectâs <code>term</code> member.</p> +</dd> +<dt id="func_Make_Compiler">Make_Compiler</dt> +<dd> +<pre><code><span class="prefix">lucy_</span><a href="../../Lucy/Search/Compiler.html">Compiler</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>TermQuery_Make_Compiler</strong>( + <span class="prefix">lucy_</span>TermQuery *<strong>self</strong>, + <span class="prefix">lucy_</span><a href="../../Lucy/Search/Searcher.html">Searcher</a> *<strong>searcher</strong>, + float <strong>boost</strong>, + bool <strong>subordinate</strong> +); +</code></pre> +<p>Abstract factory method returning a Compiler derived from this Query.</p> +<dl> +<dt>searcher</dt> +<dd><p>A Searcher.</p> +</dd> +<dt>boost</dt> +<dd><p>A scoring multiplier.</p> +</dd> +<dt>subordinate</dt> +<dd><p>Indicates whether the Query is a subquery (as +opposed to a top-level query). If false, the implementation must +invoke <a href="../../Lucy/Search/Compiler.html#func_Normalize">Normalize()</a> on the newly minted Compiler object before returning +it.</p> +</dd> +</dl> +</dd> +<dt id="func_To_String">To_String</dt> +<dd> +<pre><code><span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>TermQuery_To_String</strong>( + <span class="prefix">lucy_</span>TermQuery *<strong>self</strong> +); +</code></pre> +<p>Generic stringification: âClassName@hex_mem_addressâ.</p> +</dd> +<dt id="func_Dump">Dump</dt> +<dd> +<pre><code><span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>TermQuery_Dump</strong>( + <span class="prefix">lucy_</span>TermQuery *<strong>self</strong> +); +</code></pre> +</dd> +<dt id="func_Load">Load</dt> +<dd> +<pre><code><span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>TermQuery_Load</strong>( + <span class="prefix">lucy_</span>TermQuery *<strong>self</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a> *<strong>dump</strong> +); +</code></pre> +</dd> +<dt id="func_Equals">Equals</dt> +<dd> +<pre><code>bool +<span class="prefix">lucy_</span><strong>TermQuery_Equals</strong>( + <span class="prefix">lucy_</span>TermQuery *<strong>self</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a> *<strong>other</strong> +); +</code></pre> +<p>Indicate whether two objects are the same. By default, compares the +memory address.</p> +<dl> +<dt>other</dt> +<dd><p>Another Obj.</p> +</dd> +</dl> +</dd> +</dl> +<h4>Methods inherited from Lucy::Search::Query</h4> +<dl> +<dt id="func_Set_Boost">Set_Boost</dt> +<dd> +<pre><code>void +<span class="prefix">lucy_</span><strong>TermQuery_Set_Boost</strong>( + <span class="prefix">lucy_</span>TermQuery *<strong>self</strong>, + float <strong>boost</strong> +); +</code></pre> +<p>Set the Queryâs boost.</p> +</dd> +<dt id="func_Get_Boost">Get_Boost</dt> +<dd> +<pre><code>float +<span class="prefix">lucy_</span><strong>TermQuery_Get_Boost</strong>( + <span class="prefix">lucy_</span>TermQuery *<strong>self</strong> +); +</code></pre> +<p>Get the Queryâs boost.</p> +</dd> +</dl> +<h3>Inheritance</h3> +<p>Lucy::Search::TermQuery is a <a href="../../Lucy/Search/Query.html">Lucy::Search::Query</a> is a <a href="../../Clownfish/Obj.html">Clownfish::Obj</a>.</p> +</div> Copied: lucy/site/trunk/content/docs/0.5.0/c/Lucy/Simple.mdtext (from r1762634, lucy/site/trunk/content/docs/c/Lucy/Simple.mdtext) URL: http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/0.5.0/c/Lucy/Simple.mdtext?p2=lucy/site/trunk/content/docs/0.5.0/c/Lucy/Simple.mdtext&p1=lucy/site/trunk/content/docs/c/Lucy/Simple.mdtext&r1=1762634&r2=1762636&rev=1762636&view=diff ============================================================================== (empty) Added: lucy/site/trunk/content/docs/0.5.0/c/Lucy/Store/FSFolder.mdtext URL: http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/0.5.0/c/Lucy/Store/FSFolder.mdtext?rev=1762636&view=auto ============================================================================== --- lucy/site/trunk/content/docs/0.5.0/c/Lucy/Store/FSFolder.mdtext (added) +++ lucy/site/trunk/content/docs/0.5.0/c/Lucy/Store/FSFolder.mdtext Wed Sep 28 12:06:24 2016 @@ -0,0 +1,65 @@ +Title: Lucy::Store::FSFolder â C API Documentation + +<div class="c-api"> +<h2>Lucy::Store::FSFolder</h2> +<table> +<tr> +<td class="label">parcel</td> +<td><a href="../../lucy.html">Lucy</a></td> +</tr> +<tr> +<td class="label">class variable</td> +<td><code><span class="prefix">LUCY_</span>FSFOLDER</code></td> +</tr> +<tr> +<td class="label">struct symbol</td> +<td><code><span class="prefix">lucy_</span>FSFolder</code></td> +</tr> +<tr> +<td class="label">class nickname</td> +<td><code><span class="prefix">lucy_</span>FSFolder</code></td> +</tr> +<tr> +<td class="label">header file</td> +<td><code>Lucy/Store/FSFolder.h</code></td> +</tr> +</table> +<h3>Name</h3> +<p>Lucy::Store::FSFolder â File System implementation of Folder.</p> +<h3>Description</h3> +<p>Implementation of <a href="../../Lucy/Store/Folder.html">Folder</a> using a single file system +directory and multiple files.</p> +<h3>Functions</h3> +<dl> +<dt id="func_new">new</dt> +<dd> +<pre><code><span class="prefix">lucy_</span>FSFolder* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>FSFolder_new</strong>( + <span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a> *<strong>path</strong> +); +</code></pre> +<p>Create a new Folder.</p> +<dl> +<dt>path</dt> +<dd><p>Location of the index. If the specified directory does +not exist already, it will NOT be created, in order to prevent +misconfigured read applications from spawning bogus files â so it may +be necessary to create the directory yourself.</p> +</dd> +</dl> +</dd> +<dt id="func_init">init</dt> +<dd> +<pre><code><span class="prefix">lucy_</span>FSFolder* +<span class="prefix">lucy_</span><strong>FSFolder_init</strong>( + <span class="prefix">lucy_</span>FSFolder *<strong>self</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a> *<strong>path</strong> +); +</code></pre> +<p>Initialize a Folder. See <a href="../../Lucy/Store/FSFolder.html#func_new">new()</a> for a description of the +parameters.</p> +</dd> +</dl> +<h3>Inheritance</h3> +<p>Lucy::Store::FSFolder is a <a href="../../Lucy/Store/Folder.html">Lucy::Store::Folder</a> is a <a href="../../Clownfish/Obj.html">Clownfish::Obj</a>.</p> +</div> Added: lucy/site/trunk/content/docs/0.5.0/c/Lucy/Store/Folder.mdtext URL: http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/0.5.0/c/Lucy/Store/Folder.mdtext?rev=1762636&view=auto ============================================================================== --- lucy/site/trunk/content/docs/0.5.0/c/Lucy/Store/Folder.mdtext (added) +++ lucy/site/trunk/content/docs/0.5.0/c/Lucy/Store/Folder.mdtext Wed Sep 28 12:06:24 2016 @@ -0,0 +1,38 @@ +Title: Lucy::Store::Folder â C API Documentation + +<div class="c-api"> +<h2>Lucy::Store::Folder</h2> +<table> +<tr> +<td class="label">parcel</td> +<td><a href="../../lucy.html">Lucy</a></td> +</tr> +<tr> +<td class="label">class variable</td> +<td><code><span class="prefix">LUCY_</span>FOLDER</code></td> +</tr> +<tr> +<td class="label">struct symbol</td> +<td><code><span class="prefix">lucy_</span>Folder</code></td> +</tr> +<tr> +<td class="label">class nickname</td> +<td><code><span class="prefix">lucy_</span>Folder</code></td> +</tr> +<tr> +<td class="label">header file</td> +<td><code>Lucy/Store/Folder.h</code></td> +</tr> +</table> +<h3>Name</h3> +<p>Lucy::Store::Folder â Abstract class representing a directory.</p> +<h3>Description</h3> +<p>A âfileâ within a Folder might be a real file on disk â or it might be a +RAM buffer. Similarly, Delete() might delete a file from the file system, or +a key-value pair from a hash, or something else.</p> +<p>The archetypal implementation of Folder, +<a href="../../Lucy/Store/FSFolder.html">FSFolder</a>, represents a directory on +the file system holding a collection of files.</p> +<h3>Inheritance</h3> +<p>Lucy::Store::Folder is a <a href="../../Clownfish/Obj.html">Clownfish::Obj</a>.</p> +</div> Added: lucy/site/trunk/content/docs/0.5.0/c/Lucy/Store/Lock.mdtext URL: http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/0.5.0/c/Lucy/Store/Lock.mdtext?rev=1762636&view=auto ============================================================================== --- lucy/site/trunk/content/docs/0.5.0/c/Lucy/Store/Lock.mdtext (added) +++ lucy/site/trunk/content/docs/0.5.0/c/Lucy/Store/Lock.mdtext Wed Sep 28 12:06:24 2016 @@ -0,0 +1,145 @@ +Title: Lucy::Store::Lock â C API Documentation + +<div class="c-api"> +<h2>Lucy::Store::Lock</h2> +<table> +<tr> +<td class="label">parcel</td> +<td><a href="../../lucy.html">Lucy</a></td> +</tr> +<tr> +<td class="label">class variable</td> +<td><code><span class="prefix">LUCY_</span>LOCK</code></td> +</tr> +<tr> +<td class="label">struct symbol</td> +<td><code><span class="prefix">lucy_</span>Lock</code></td> +</tr> +<tr> +<td class="label">class nickname</td> +<td><code><span class="prefix">lucy_</span>Lock</code></td> +</tr> +<tr> +<td class="label">header file</td> +<td><code>Lucy/Store/Lock.h</code></td> +</tr> +</table> +<h3>Name</h3> +<p>Lucy::Store::Lock â Abstract class representing an interprocess mutex lock.</p> +<h3>Description</h3> +<p>The Lock class produces an interprocess mutex lock. The default subclass +uses dot-lock files, but alternative implementations are possible.</p> +<p>Each lock must have a name which is unique per resource to be locked. Each +lock also has a âhostâ id which should be unique per machine; it is used to +help clear away stale locks.</p> +<h3>Functions</h3> +<dl> +<dt id="func_init">init</dt> +<dd> +<pre><code><span class="prefix">lucy_</span>Lock* +<span class="prefix">lucy_</span><strong>Lock_init</strong>( + <span class="prefix">lucy_</span>Lock *<strong>self</strong>, + <span class="prefix">lucy_</span><a href="../../Lucy/Store/Folder.html">Folder</a> *<strong>folder</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a> *<strong>name</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a> *<strong>host</strong>, + int32_t <strong>timeout</strong>, + int32_t <strong>interval</strong> +); +</code></pre> +<p>Abstract initializer.</p> +<dl> +<dt>folder</dt> +<dd><p>A Folder.</p> +</dd> +<dt>name</dt> +<dd><p>String identifying the resource to be locked, which must +consist solely of characters matching [-_.A-Za-z0-9].</p> +</dd> +<dt>host</dt> +<dd><p>A unique per-machine identifier.</p> +</dd> +<dt>timeout</dt> +<dd><p>Time in milliseconds to keep retrying before abandoning +the attempt to <a href="../../Lucy/Store/Lock.html#func_Obtain">Obtain()</a> a lock.</p> +</dd> +<dt>interval</dt> +<dd><p>Time in milliseconds between retries.</p> +</dd> +</dl> +</dd> +</dl> +<h3>Methods</h3> +<dl> +<dt id="func_Shared">Shared <span class="comment">(abstract)</span></dt> +<dd> +<pre><code>bool +<span class="prefix">lucy_</span><strong>Lock_Shared</strong>( + <span class="prefix">lucy_</span>Lock *<strong>self</strong> +); +</code></pre> +<p>Returns true if the Lock is shared, false if the Lock is exclusive.</p> +</dd> +<dt id="func_Obtain">Obtain</dt> +<dd> +<pre><code>bool +<span class="prefix">lucy_</span><strong>Lock_Obtain</strong>( + <span class="prefix">lucy_</span>Lock *<strong>self</strong> +); +</code></pre> +<p>Call <a href="../../Lucy/Store/Lock.html#func_Request">Request()</a> once per <code>interval</code> until <a href="../../Lucy/Store/Lock.html#func_Request">Request()</a> returns +success or the <code>timeout</code> has been reached.</p> +<p><strong>Returns:</strong> true on success, false on failure (sets the global error object +returned by <a href="../../Clownfish/Err.html#func_get_error">get_error()</a>).</p> +</dd> +<dt id="func_Request">Request <span class="comment">(abstract)</span></dt> +<dd> +<pre><code>bool +<span class="prefix">lucy_</span><strong>Lock_Request</strong>( + <span class="prefix">lucy_</span>Lock *<strong>self</strong> +); +</code></pre> +<p>Make one attempt to acquire the lock.</p> +<p>The semantics of <a href="../../Lucy/Store/Lock.html#func_Request">Request()</a> differ depending on whether <a href="../../Lucy/Store/Lock.html#func_Shared">Shared()</a> returns +true. If the Lock is <a href="../../Lucy/Store/Lock.html#func_Shared">Shared()</a>, then <a href="../../Lucy/Store/Lock.html#func_Request">Request()</a> should not fail if +another lock is held against the resource identified by +<code>name</code> (though it might fail for other reasons). If it is +not <a href="../../Lucy/Store/Lock.html#func_Shared">Shared()</a> â i.e. itâs an exclusive (write) lock â then other locks +should cause <a href="../../Lucy/Store/Lock.html#func_Request">Request()</a> to fail.</p> +<p><strong>Returns:</strong> true on success, false on failure (sets the global error object +returned by <a href="../../Clownfish/Err.html#func_get_error">get_error()</a>).</p> +</dd> +<dt id="func_Release">Release <span class="comment">(abstract)</span></dt> +<dd> +<pre><code>void +<span class="prefix">lucy_</span><strong>Lock_Release</strong>( + <span class="prefix">lucy_</span>Lock *<strong>self</strong> +); +</code></pre> +<p>Release the lock.</p> +</dd> +<dt id="func_Is_Locked">Is_Locked <span class="comment">(abstract)</span></dt> +<dd> +<pre><code>bool +<span class="prefix">lucy_</span><strong>Lock_Is_Locked</strong>( + <span class="prefix">lucy_</span>Lock *<strong>self</strong> +); +</code></pre> +<p>Indicate whether the resource identified by this lockâs name is +currently locked.</p> +<p><strong>Returns:</strong> true if the resource is locked, false otherwise.</p> +</dd> +<dt id="func_Clear_Stale">Clear_Stale <span class="comment">(abstract)</span></dt> +<dd> +<pre><code>void +<span class="prefix">lucy_</span><strong>Lock_Clear_Stale</strong>( + <span class="prefix">lucy_</span>Lock *<strong>self</strong> +); +</code></pre> +<p>Release all locks that meet the following three conditions: the lock +name matches, the host id matches, and the process id that the lock +was created under no longer identifies an active process.</p> +</dd> +</dl> +<h3>Inheritance</h3> +<p>Lucy::Store::Lock is a <a href="../../Clownfish/Obj.html">Clownfish::Obj</a>.</p> +</div> Added: lucy/site/trunk/content/docs/0.5.0/c/Lucy/Store/LockErr.mdtext URL: http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/0.5.0/c/Lucy/Store/LockErr.mdtext?rev=1762636&view=auto ============================================================================== --- lucy/site/trunk/content/docs/0.5.0/c/Lucy/Store/LockErr.mdtext (added) +++ lucy/site/trunk/content/docs/0.5.0/c/Lucy/Store/LockErr.mdtext Wed Sep 28 12:06:24 2016 @@ -0,0 +1,66 @@ +Title: Lucy::Store::LockErr â C API Documentation + +<div class="c-api"> +<h2>Lucy::Store::LockErr</h2> +<table> +<tr> +<td class="label">parcel</td> +<td><a href="../../lucy.html">Lucy</a></td> +</tr> +<tr> +<td class="label">class variable</td> +<td><code><span class="prefix">LUCY_</span>LOCKERR</code></td> +</tr> +<tr> +<td class="label">struct symbol</td> +<td><code><span class="prefix">lucy_</span>LockErr</code></td> +</tr> +<tr> +<td class="label">class nickname</td> +<td><code><span class="prefix">lucy_</span>LockErr</code></td> +</tr> +<tr> +<td class="label">header file</td> +<td><code>Lucy/Store/Lock.h</code></td> +</tr> +</table> +<h3>Name</h3> +<p>Lucy::Store::LockErr â Lock exception.</p> +<h3>Description</h3> +<p>LockErr is a subclass of <a href="../../Clownfish/Err.html">Err</a> which indicates +that a file locking problem occurred.</p> +<h3>Methods</h3> +<h4>Methods inherited from Clownfish::Err</h4> +<dl> +<dt id="func_To_String">To_String</dt> +<dd> +<pre><code><span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>LockErr_To_String</strong>( + <span class="prefix">lucy_</span>LockErr *<strong>self</strong> +); +</code></pre> +<p>Return a copy of the error message.</p> +</dd> +<dt id="func_Cat_Mess">Cat_Mess</dt> +<dd> +<pre><code>void +<span class="prefix">lucy_</span><strong>LockErr_Cat_Mess</strong>( + <span class="prefix">lucy_</span>LockErr *<strong>self</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a> *<strong>mess</strong> +); +</code></pre> +<p>Concatenate the supplied argument onto the error message.</p> +</dd> +<dt id="func_Get_Mess">Get_Mess</dt> +<dd> +<pre><code><span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a>* +<span class="prefix">lucy_</span><strong>LockErr_Get_Mess</strong>( + <span class="prefix">lucy_</span>LockErr *<strong>self</strong> +); +</code></pre> +<p>Return the error message.</p> +</dd> +</dl> +<h3>Inheritance</h3> +<p>Lucy::Store::LockErr is a <a href="../../Clownfish/Err.html">Clownfish::Err</a> is a <a href="../../Clownfish/Obj.html">Clownfish::Obj</a>.</p> +</div> Added: lucy/site/trunk/content/docs/0.5.0/c/Lucy/Store/LockFactory.mdtext URL: http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/0.5.0/c/Lucy/Store/LockFactory.mdtext?rev=1762636&view=auto ============================================================================== --- lucy/site/trunk/content/docs/0.5.0/c/Lucy/Store/LockFactory.mdtext (added) +++ lucy/site/trunk/content/docs/0.5.0/c/Lucy/Store/LockFactory.mdtext Wed Sep 28 12:06:24 2016 @@ -0,0 +1,132 @@ +Title: Lucy::Store::LockFactory â C API Documentation + +<div class="c-api"> +<h2>Lucy::Store::LockFactory</h2> +<table> +<tr> +<td class="label">parcel</td> +<td><a href="../../lucy.html">Lucy</a></td> +</tr> +<tr> +<td class="label">class variable</td> +<td><code><span class="prefix">LUCY_</span>LOCKFACTORY</code></td> +</tr> +<tr> +<td class="label">struct symbol</td> +<td><code><span class="prefix">lucy_</span>LockFactory</code></td> +</tr> +<tr> +<td class="label">class nickname</td> +<td><code><span class="prefix">lucy_</span>LockFact</code></td> +</tr> +<tr> +<td class="label">header file</td> +<td><code>Lucy/Store/LockFactory.h</code></td> +</tr> +</table> +<h3>Name</h3> +<p>Lucy::Store::LockFactory â Create Locks.</p> +<h3>Description</h3> +<p>LockFactory is used to spin off interprocess mutex locks used by various +index reading and writing components. The default implementation uses +lockfiles, but LockFactory subclasses which are implemented using +alternatives such as flock() are possible.</p> +<h3>Functions</h3> +<dl> +<dt id="func_new">new</dt> +<dd> +<pre><code><span class="prefix">lucy_</span>LockFactory* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>LockFact_new</strong>( + <span class="prefix">lucy_</span><a href="../../Lucy/Store/Folder.html">Folder</a> *<strong>folder</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a> *<strong>host</strong> +); +</code></pre> +<p>Create a new LockFactory.</p> +<dl> +<dt>folder</dt> +<dd><p>A <a href="../../Lucy/Store/Folder.html">Folder</a>.</p> +</dd> +<dt>host</dt> +<dd><p>An identifier which should be unique per-machine.</p> +</dd> +</dl> +</dd> +<dt id="func_init">init</dt> +<dd> +<pre><code><span class="prefix">lucy_</span>LockFactory* +<span class="prefix">lucy_</span><strong>LockFact_init</strong>( + <span class="prefix">lucy_</span>LockFactory *<strong>self</strong>, + <span class="prefix">lucy_</span><a href="../../Lucy/Store/Folder.html">Folder</a> *<strong>folder</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a> *<strong>host</strong> +); +</code></pre> +<p>Initialize a LockFactory.</p> +<dl> +<dt>folder</dt> +<dd><p>A <a href="../../Lucy/Store/Folder.html">Folder</a>.</p> +</dd> +<dt>host</dt> +<dd><p>An identifier which should be unique per-machine.</p> +</dd> +</dl> +</dd> +</dl> +<h3>Methods</h3> +<dl> +<dt id="func_Make_Lock">Make_Lock</dt> +<dd> +<pre><code><span class="prefix">lucy_</span><a href="../../Lucy/Store/Lock.html">Lock</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>LockFact_Make_Lock</strong>( + <span class="prefix">lucy_</span>LockFactory *<strong>self</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a> *<strong>name</strong>, + int32_t <strong>timeout</strong>, + int32_t <strong>interval</strong> +); +</code></pre> +<p>Return a Lock object, which, once <a href="../../Lucy/Store/Lock.html#func_Obtain">Obtain()</a> returns successfully, +maintains an exclusive lock on a resource.</p> +<dl> +<dt>name</dt> +<dd><p>A file-system-friendly id which identifies the +resource to be locked.</p> +</dd> +<dt>timeout</dt> +<dd><p>Time in milliseconds to keep retrying before abandoning +the attempt to <a href="../../Lucy/Store/Lock.html#func_Obtain">Obtain()</a> a lock.</p> +</dd> +<dt>interval</dt> +<dd><p>Time in milliseconds between retries.</p> +</dd> +</dl> +</dd> +<dt id="func_Make_Shared_Lock">Make_Shared_Lock</dt> +<dd> +<pre><code><span class="prefix">lucy_</span><a href="../../Lucy/Store/Lock.html">Lock</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>LockFact_Make_Shared_Lock</strong>( + <span class="prefix">lucy_</span>LockFactory *<strong>self</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a> *<strong>name</strong>, + int32_t <strong>timeout</strong>, + int32_t <strong>interval</strong> +); +</code></pre> +<p>Return a Lock object for which <a href="../../Lucy/Store/Lock.html#func_Shared">Shared()</a> returns true, and which +maintains a non-exclusive lock on a resource once <a href="../../Lucy/Store/Lock.html#func_Obtain">Obtain()</a> returns +success.</p> +<dl> +<dt>name</dt> +<dd><p>A file-system-friendly id which identifies the +resource to be locked.</p> +</dd> +<dt>timeout</dt> +<dd><p>Time in milliseconds to keep retrying before abandoning +the attempt to <a href="../../Lucy/Store/Lock.html#func_Obtain">Obtain()</a> a lock.</p> +</dd> +<dt>interval</dt> +<dd><p>Time in milliseconds between retries.</p> +</dd> +</dl> +</dd> +</dl> +<h3>Inheritance</h3> +<p>Lucy::Store::LockFactory is a <a href="../../Clownfish/Obj.html">Clownfish::Obj</a>.</p> +</div> Added: lucy/site/trunk/content/docs/0.5.0/c/Lucy/Store/RAMFolder.mdtext URL: http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/0.5.0/c/Lucy/Store/RAMFolder.mdtext?rev=1762636&view=auto ============================================================================== --- lucy/site/trunk/content/docs/0.5.0/c/Lucy/Store/RAMFolder.mdtext (added) +++ lucy/site/trunk/content/docs/0.5.0/c/Lucy/Store/RAMFolder.mdtext Wed Sep 28 12:06:24 2016 @@ -0,0 +1,66 @@ +Title: Lucy::Store::RAMFolder â C API Documentation + +<div class="c-api"> +<h2>Lucy::Store::RAMFolder</h2> +<table> +<tr> +<td class="label">parcel</td> +<td><a href="../../lucy.html">Lucy</a></td> +</tr> +<tr> +<td class="label">class variable</td> +<td><code><span class="prefix">LUCY_</span>RAMFOLDER</code></td> +</tr> +<tr> +<td class="label">struct symbol</td> +<td><code><span class="prefix">lucy_</span>RAMFolder</code></td> +</tr> +<tr> +<td class="label">class nickname</td> +<td><code><span class="prefix">lucy_</span>RAMFolder</code></td> +</tr> +<tr> +<td class="label">header file</td> +<td><code>Lucy/Store/RAMFolder.h</code></td> +</tr> +</table> +<h3>Name</h3> +<p>Lucy::Store::RAMFolder â In-memory Folder implementation.</p> +<h3>Description</h3> +<p>RAMFolder is an entirely in-memory implementation of +<a href="../../Lucy/Store/Folder.html">Folder</a>, primarily used for testing and development.</p> +<h3>Functions</h3> +<dl> +<dt id="func_new">new</dt> +<dd> +<pre><code><span class="prefix">lucy_</span>RAMFolder* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>RAMFolder_new</strong>( + <span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a> *<strong>path</strong> +); +</code></pre> +<p>Create a new RAMFolder.</p> +<dl> +<dt>path</dt> +<dd><p>Relative path, used for subfolders.</p> +</dd> +</dl> +</dd> +<dt id="func_init">init</dt> +<dd> +<pre><code><span class="prefix">lucy_</span>RAMFolder* +<span class="prefix">lucy_</span><strong>RAMFolder_init</strong>( + <span class="prefix">lucy_</span>RAMFolder *<strong>self</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a> *<strong>path</strong> +); +</code></pre> +<p>Initialize a RAMFolder.</p> +<dl> +<dt>path</dt> +<dd><p>Relative path, used for subfolders.</p> +</dd> +</dl> +</dd> +</dl> +<h3>Inheritance</h3> +<p>Lucy::Store::RAMFolder is a <a href="../../Lucy/Store/Folder.html">Lucy::Store::Folder</a> is a <a href="../../Clownfish/Obj.html">Clownfish::Obj</a>.</p> +</div> Added: lucy/site/trunk/content/docs/0.5.0/c/LucyX/Search/ProximityQuery.mdtext URL: http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/0.5.0/c/LucyX/Search/ProximityQuery.mdtext?rev=1762636&view=auto ============================================================================== --- lucy/site/trunk/content/docs/0.5.0/c/LucyX/Search/ProximityQuery.mdtext (added) +++ lucy/site/trunk/content/docs/0.5.0/c/LucyX/Search/ProximityQuery.mdtext Wed Sep 28 12:06:24 2016 @@ -0,0 +1,196 @@ +Title: LucyX::Search::ProximityQuery â C API Documentation + +<div class="c-api"> +<h2>LucyX::Search::ProximityQuery</h2> +<table> +<tr> +<td class="label">parcel</td> +<td><a href="../../lucy.html">Lucy</a></td> +</tr> +<tr> +<td class="label">class variable</td> +<td><code><span class="prefix">LUCY_</span>PROXIMITYQUERY</code></td> +</tr> +<tr> +<td class="label">struct symbol</td> +<td><code><span class="prefix">lucy_</span>ProximityQuery</code></td> +</tr> +<tr> +<td class="label">class nickname</td> +<td><code><span class="prefix">lucy_</span>ProximityQuery</code></td> +</tr> +<tr> +<td class="label">header file</td> +<td><code>LucyX/Search/ProximityQuery.h</code></td> +</tr> +</table> +<h3>Name</h3> +<p>LucyX::Search::ProximityQuery â Query matching an ordered list of terms.</p> +<h3>Description</h3> +<p>ProximityQuery is a subclass of <a href="../../Lucy/Search/Query.html">Query</a> for matching +against an ordered sequence of terms.</p> +<h3>Functions</h3> +<dl> +<dt id="func_new">new</dt> +<dd> +<pre><code><span class="prefix">lucy_</span>ProximityQuery* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>ProximityQuery_new</strong>( + <span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a> *<strong>field</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Vector.html">Vector</a> *<strong>terms</strong>, + uint32_t <strong>within</strong> +); +</code></pre> +<p>Create a new ProximityQuery.</p> +<dl> +<dt>field</dt> +<dd><p>The field that the phrase must occur in.</p> +</dd> +<dt>terms</dt> +<dd><p>The ordered array of terms that must match.</p> +</dd> +</dl> +</dd> +<dt id="func_init">init</dt> +<dd> +<pre><code><span class="prefix">lucy_</span>ProximityQuery* +<span class="prefix">lucy_</span><strong>ProximityQuery_init</strong>( + <span class="prefix">lucy_</span>ProximityQuery *<strong>self</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a> *<strong>field</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Vector.html">Vector</a> *<strong>terms</strong>, + uint32_t <strong>within</strong> +); +</code></pre> +<p>Initialize a ProximityQuery.</p> +<dl> +<dt>field</dt> +<dd><p>The field that the phrase must occur in.</p> +</dd> +<dt>terms</dt> +<dd><p>The ordered array of terms that must match.</p> +</dd> +</dl> +</dd> +</dl> +<h3>Methods</h3> +<dl> +<dt id="func_Get_Field">Get_Field</dt> +<dd> +<pre><code><span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a>* +<span class="prefix">lucy_</span><strong>ProximityQuery_Get_Field</strong>( + <span class="prefix">lucy_</span>ProximityQuery *<strong>self</strong> +); +</code></pre> +<p>Accessor for objectâs field attribute.</p> +</dd> +<dt id="func_Get_Terms">Get_Terms</dt> +<dd> +<pre><code><span class="prefix">cfish_</span><a href="../../Clownfish/Vector.html">Vector</a>* +<span class="prefix">lucy_</span><strong>ProximityQuery_Get_Terms</strong>( + <span class="prefix">lucy_</span>ProximityQuery *<strong>self</strong> +); +</code></pre> +<p>Accessor for objectâs array of terms.</p> +</dd> +<dt id="func_Get_Within">Get_Within</dt> +<dd> +<pre><code>uint32_t +<span class="prefix">lucy_</span><strong>ProximityQuery_Get_Within</strong>( + <span class="prefix">lucy_</span>ProximityQuery *<strong>self</strong> +); +</code></pre> +<p>Accessor for objectâs within attribute.</p> +</dd> +<dt id="func_Make_Compiler">Make_Compiler</dt> +<dd> +<pre><code><span class="prefix">lucy_</span><a href="../../Lucy/Search/Compiler.html">Compiler</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>ProximityQuery_Make_Compiler</strong>( + <span class="prefix">lucy_</span>ProximityQuery *<strong>self</strong>, + <span class="prefix">lucy_</span><a href="../../Lucy/Search/Searcher.html">Searcher</a> *<strong>searcher</strong>, + float <strong>boost</strong>, + bool <strong>subordinate</strong> +); +</code></pre> +<p>Abstract factory method returning a Compiler derived from this Query.</p> +<dl> +<dt>searcher</dt> +<dd><p>A Searcher.</p> +</dd> +<dt>boost</dt> +<dd><p>A scoring multiplier.</p> +</dd> +<dt>subordinate</dt> +<dd><p>Indicates whether the Query is a subquery (as +opposed to a top-level query). If false, the implementation must +invoke <a href="../../Lucy/Search/Compiler.html#func_Normalize">Normalize()</a> on the newly minted Compiler object before returning +it.</p> +</dd> +</dl> +</dd> +<dt id="func_Equals">Equals</dt> +<dd> +<pre><code>bool +<span class="prefix">lucy_</span><strong>ProximityQuery_Equals</strong>( + <span class="prefix">lucy_</span>ProximityQuery *<strong>self</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a> *<strong>other</strong> +); +</code></pre> +<p>Indicate whether two objects are the same. By default, compares the +memory address.</p> +<dl> +<dt>other</dt> +<dd><p>Another Obj.</p> +</dd> +</dl> +</dd> +<dt id="func_To_String">To_String</dt> +<dd> +<pre><code><span class="prefix">cfish_</span><a href="../../Clownfish/String.html">String</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>ProximityQuery_To_String</strong>( + <span class="prefix">lucy_</span>ProximityQuery *<strong>self</strong> +); +</code></pre> +<p>Generic stringification: âClassName@hex_mem_addressâ.</p> +</dd> +<dt id="func_Dump">Dump</dt> +<dd> +<pre><code><span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>ProximityQuery_Dump</strong>( + <span class="prefix">lucy_</span>ProximityQuery *<strong>self</strong> +); +</code></pre> +</dd> +<dt id="func_Load">Load</dt> +<dd> +<pre><code><span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a>* <span class="comment">// incremented</span> +<span class="prefix">lucy_</span><strong>ProximityQuery_Load</strong>( + <span class="prefix">lucy_</span>ProximityQuery *<strong>self</strong>, + <span class="prefix">cfish_</span><a href="../../Clownfish/Obj.html">Obj</a> *<strong>dump</strong> +); +</code></pre> +</dd> +</dl> +<h4>Methods inherited from Lucy::Search::Query</h4> +<dl> +<dt id="func_Set_Boost">Set_Boost</dt> +<dd> +<pre><code>void +<span class="prefix">lucy_</span><strong>ProximityQuery_Set_Boost</strong>( + <span class="prefix">lucy_</span>ProximityQuery *<strong>self</strong>, + float <strong>boost</strong> +); +</code></pre> +<p>Set the Queryâs boost.</p> +</dd> +<dt id="func_Get_Boost">Get_Boost</dt> +<dd> +<pre><code>float +<span class="prefix">lucy_</span><strong>ProximityQuery_Get_Boost</strong>( + <span class="prefix">lucy_</span>ProximityQuery *<strong>self</strong> +); +</code></pre> +<p>Get the Queryâs boost.</p> +</dd> +</dl> +<h3>Inheritance</h3> +<p>LucyX::Search::ProximityQuery is a <a href="../../Lucy/Search/Query.html">Lucy::Search::Query</a> is a <a href="../../Clownfish/Obj.html">Clownfish::Obj</a>.</p> +</div> Added: lucy/site/trunk/content/docs/0.5.0/c/cfish.mdtext URL: http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/0.5.0/c/cfish.mdtext?rev=1762636&view=auto ============================================================================== --- lucy/site/trunk/content/docs/0.5.0/c/cfish.mdtext (added) +++ lucy/site/trunk/content/docs/0.5.0/c/cfish.mdtext Wed Sep 28 12:06:24 2016 @@ -0,0 +1,29 @@ +Title: Clownfish â C API Index + +<div class="c-api"> +<h2>Clownfish â C API Index</h2> +<h3>Documentation</h3> +<ul> +<li><a href="Clownfish.html">Clownfish</a></li> +<li><a href="Clownfish/Docs/BuildingProjects.html">Clownfish::Docs::BuildingProjects</a></li> +<li><a href="Clownfish/Docs/ClassIntro.html">Clownfish::Docs::ClassIntro</a></li> +<li><a href="Clownfish/Docs/WritingClasses.html">Clownfish::Docs::WritingClasses</a></li> +</ul> +<h3>Classes in parcel Clownfish</h3> +<ul> +<li><a href="Clownfish/Blob.html">Clownfish::Blob</a></li> +<li><a href="Clownfish/Boolean.html">Clownfish::Boolean</a></li> +<li><a href="Clownfish/ByteBuf.html">Clownfish::ByteBuf</a></li> +<li><a href="Clownfish/CharBuf.html">Clownfish::CharBuf</a></li> +<li><a href="Clownfish/Class.html">Clownfish::Class</a></li> +<li><a href="Clownfish/Err.html">Clownfish::Err</a></li> +<li><a href="Clownfish/Float.html">Clownfish::Float</a></li> +<li><a href="Clownfish/Hash.html">Clownfish::Hash</a></li> +<li><a href="Clownfish/HashIterator.html">Clownfish::HashIterator</a></li> +<li><a href="Clownfish/Integer.html">Clownfish::Integer</a></li> +<li><a href="Clownfish/Obj.html">Clownfish::Obj</a></li> +<li><a href="Clownfish/String.html">Clownfish::String</a></li> +<li><a href="Clownfish/StringIterator.html">Clownfish::StringIterator</a></li> +<li><a href="Clownfish/Vector.html">Clownfish::Vector</a></li> +</ul> +</div> Added: lucy/site/trunk/content/docs/0.5.0/c/lucy.mdtext URL: http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/0.5.0/c/lucy.mdtext?rev=1762636&view=auto ============================================================================== --- lucy/site/trunk/content/docs/0.5.0/c/lucy.mdtext (added) +++ lucy/site/trunk/content/docs/0.5.0/c/lucy.mdtext Wed Sep 28 12:06:24 2016 @@ -0,0 +1,99 @@ +Title: Lucy â C API Index + +<div class="c-api"> +<h2>Lucy â C API Index</h2> +<h3>Documentation</h3> +<ul> +<li><a href="Lucy/Docs/Cookbook.html">Lucy::Docs::Cookbook</a></li> +<li><a href="Lucy/Docs/Cookbook/CustomQuery.html">Lucy::Docs::Cookbook::CustomQuery</a></li> +<li><a href="Lucy/Docs/Cookbook/CustomQueryParser.html">Lucy::Docs::Cookbook::CustomQueryParser</a></li> +<li><a href="Lucy/Docs/Cookbook/FastUpdates.html">Lucy::Docs::Cookbook::FastUpdates</a></li> +<li><a href="Lucy/Docs/DevGuide.html">Lucy::Docs::DevGuide</a></li> +<li><a href="Lucy/Docs/DocIDs.html">Lucy::Docs::DocIDs</a></li> +<li><a href="Lucy/Docs/FileFormat.html">Lucy::Docs::FileFormat</a></li> +<li><a href="Lucy/Docs/FileLocking.html">Lucy::Docs::FileLocking</a></li> +<li><a href="Lucy/Docs/IRTheory.html">Lucy::Docs::IRTheory</a></li> +<li><a href="Lucy/Docs/Tutorial.html">Lucy::Docs::Tutorial</a></li> +<li><a href="Lucy/Docs/Tutorial/AnalysisTutorial.html">Lucy::Docs::Tutorial::AnalysisTutorial</a></li> +<li><a href="Lucy/Docs/Tutorial/BeyondSimpleTutorial.html">Lucy::Docs::Tutorial::BeyondSimpleTutorial</a></li> +<li><a href="Lucy/Docs/Tutorial/FieldTypeTutorial.html">Lucy::Docs::Tutorial::FieldTypeTutorial</a></li> +<li><a href="Lucy/Docs/Tutorial/HighlighterTutorial.html">Lucy::Docs::Tutorial::HighlighterTutorial</a></li> +<li><a href="Lucy/Docs/Tutorial/QueryObjectsTutorial.html">Lucy::Docs::Tutorial::QueryObjectsTutorial</a></li> +<li><a href="Lucy/Docs/Tutorial/SimpleTutorial.html">Lucy::Docs::Tutorial::SimpleTutorial</a></li> +</ul> +<h3>Classes in parcel Lucy</h3> +<ul> +<li><a href="Lucy/Analysis/Analyzer.html">Lucy::Analysis::Analyzer</a></li> +<li><a href="Lucy/Analysis/CaseFolder.html">Lucy::Analysis::CaseFolder</a></li> +<li><a href="Lucy/Analysis/EasyAnalyzer.html">Lucy::Analysis::EasyAnalyzer</a></li> +<li><a href="Lucy/Analysis/Inversion.html">Lucy::Analysis::Inversion</a></li> +<li><a href="Lucy/Analysis/Normalizer.html">Lucy::Analysis::Normalizer</a></li> +<li><a href="Lucy/Analysis/PolyAnalyzer.html">Lucy::Analysis::PolyAnalyzer</a></li> +<li><a href="Lucy/Analysis/RegexTokenizer.html">Lucy::Analysis::RegexTokenizer</a></li> +<li><a href="Lucy/Analysis/SnowballStemmer.html">Lucy::Analysis::SnowballStemmer</a></li> +<li><a href="Lucy/Analysis/SnowballStopFilter.html">Lucy::Analysis::SnowballStopFilter</a></li> +<li><a href="Lucy/Analysis/StandardTokenizer.html">Lucy::Analysis::StandardTokenizer</a></li> +<li><a href="Lucy/Analysis/Token.html">Lucy::Analysis::Token</a></li> +<li><a href="Lucy/Document/Doc.html">Lucy::Document::Doc</a></li> +<li><a href="Lucy/Document/HitDoc.html">Lucy::Document::HitDoc</a></li> +<li><a href="Lucy/Highlight/Highlighter.html">Lucy::Highlight::Highlighter</a></li> +<li><a href="Lucy/Index/BackgroundMerger.html">Lucy::Index::BackgroundMerger</a></li> +<li><a href="Lucy/Index/DataReader.html">Lucy::Index::DataReader</a></li> +<li><a href="Lucy/Index/DataWriter.html">Lucy::Index::DataWriter</a></li> +<li><a href="Lucy/Index/DeletionsWriter.html">Lucy::Index::DeletionsWriter</a></li> +<li><a href="Lucy/Index/DocReader.html">Lucy::Index::DocReader</a></li> +<li><a href="Lucy/Index/IndexManager.html">Lucy::Index::IndexManager</a></li> +<li><a href="Lucy/Index/IndexReader.html">Lucy::Index::IndexReader</a></li> +<li><a href="Lucy/Index/Indexer.html">Lucy::Index::Indexer</a></li> +<li><a href="Lucy/Index/Lexicon.html">Lucy::Index::Lexicon</a></li> +<li><a href="Lucy/Index/LexiconReader.html">Lucy::Index::LexiconReader</a></li> +<li><a href="Lucy/Index/PolyReader.html">Lucy::Index::PolyReader</a></li> +<li><a href="Lucy/Index/PostingList.html">Lucy::Index::PostingList</a></li> +<li><a href="Lucy/Index/PostingListReader.html">Lucy::Index::PostingListReader</a></li> +<li><a href="Lucy/Index/SegReader.html">Lucy::Index::SegReader</a></li> +<li><a href="Lucy/Index/SegWriter.html">Lucy::Index::SegWriter</a></li> +<li><a href="Lucy/Index/Segment.html">Lucy::Index::Segment</a></li> +<li><a href="Lucy/Index/Similarity.html">Lucy::Index::Similarity</a></li> +<li><a href="Lucy/Index/Snapshot.html">Lucy::Index::Snapshot</a></li> +<li><a href="Lucy/Object/BitVector.html">Lucy::Object::BitVector</a></li> +<li><a href="Lucy/Object/I32Array.html">Lucy::Object::I32Array</a></li> +<li><a href="Lucy/Plan/Architecture.html">Lucy::Plan::Architecture</a></li> +<li><a href="Lucy/Plan/BlobType.html">Lucy::Plan::BlobType</a></li> +<li><a href="Lucy/Plan/FieldType.html">Lucy::Plan::FieldType</a></li> +<li><a href="Lucy/Plan/FullTextType.html">Lucy::Plan::FullTextType</a></li> +<li><a href="Lucy/Plan/Schema.html">Lucy::Plan::Schema</a></li> +<li><a href="Lucy/Plan/StringType.html">Lucy::Plan::StringType</a></li> +<li><a href="Lucy/Search/ANDQuery.html">Lucy::Search::ANDQuery</a></li> +<li><a href="Lucy/Search/Collector.html">Lucy::Search::Collector</a></li> +<li><a href="Lucy/Search/Collector/BitCollector.html">Lucy::Search::Collector::BitCollector</a></li> +<li><a href="Lucy/Search/Compiler.html">Lucy::Search::Compiler</a></li> +<li><a href="Lucy/Search/Hits.html">Lucy::Search::Hits</a></li> +<li><a href="Lucy/Search/IndexSearcher.html">Lucy::Search::IndexSearcher</a></li> +<li><a href="Lucy/Search/LeafQuery.html">Lucy::Search::LeafQuery</a></li> +<li><a href="Lucy/Search/MatchAllQuery.html">Lucy::Search::MatchAllQuery</a></li> +<li><a href="Lucy/Search/Matcher.html">Lucy::Search::Matcher</a></li> +<li><a href="Lucy/Search/NOTQuery.html">Lucy::Search::NOTQuery</a></li> +<li><a href="Lucy/Search/NoMatchQuery.html">Lucy::Search::NoMatchQuery</a></li> +<li><a href="Lucy/Search/ORQuery.html">Lucy::Search::ORQuery</a></li> +<li><a href="Lucy/Search/PhraseQuery.html">Lucy::Search::PhraseQuery</a></li> +<li><a href="Lucy/Search/PolyQuery.html">Lucy::Search::PolyQuery</a></li> +<li><a href="Lucy/Search/PolySearcher.html">Lucy::Search::PolySearcher</a></li> +<li><a href="Lucy/Search/Query.html">Lucy::Search::Query</a></li> +<li><a href="Lucy/Search/QueryParser.html">Lucy::Search::QueryParser</a></li> +<li><a href="Lucy/Search/RangeQuery.html">Lucy::Search::RangeQuery</a></li> +<li><a href="Lucy/Search/RequiredOptionalQuery.html">Lucy::Search::RequiredOptionalQuery</a></li> +<li><a href="Lucy/Search/Searcher.html">Lucy::Search::Searcher</a></li> +<li><a href="Lucy/Search/SortRule.html">Lucy::Search::SortRule</a></li> +<li><a href="Lucy/Search/SortSpec.html">Lucy::Search::SortSpec</a></li> +<li><a href="Lucy/Search/Span.html">Lucy::Search::Span</a></li> +<li><a href="Lucy/Search/TermQuery.html">Lucy::Search::TermQuery</a></li> +<li><a href="Lucy/Simple.html">Lucy::Simple</a></li> +<li><a href="Lucy/Store/FSFolder.html">Lucy::Store::FSFolder</a></li> +<li><a href="Lucy/Store/Folder.html">Lucy::Store::Folder</a></li> +<li><a href="Lucy/Store/Lock.html">Lucy::Store::Lock</a></li> +<li><a href="Lucy/Store/LockErr.html">Lucy::Store::LockErr</a></li> +<li><a href="Lucy/Store/LockFactory.html">Lucy::Store::LockFactory</a></li> +<li><a href="Lucy/Store/RAMFolder.html">Lucy::Store::RAMFolder</a></li> +<li><a href="LucyX/Search/ProximityQuery.html">LucyX::Search::ProximityQuery</a></li> +</ul> +</div> Added: lucy/site/trunk/content/docs/0.5.0/perl/Clownfish.mdtext URL: http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/0.5.0/perl/Clownfish.mdtext?rev=1762636&view=auto ============================================================================== --- lucy/site/trunk/content/docs/0.5.0/perl/Clownfish.mdtext (added) +++ lucy/site/trunk/content/docs/0.5.0/perl/Clownfish.mdtext Wed Sep 28 12:06:24 2016 @@ -0,0 +1,137 @@ +Title: Clownfish â Apache Clownfish Documentation + +<div> +<a name='___top' class='dummyTopAnchor' ></a> + +<h2><a class='u' +name="NAME" +>NAME</a></h2> + +<p>Clownfish - Apache Clownfish symbiotic object system</p> + +<h2><a class='u' +name="DESCRIPTION" +>DESCRIPTION</a></h2> + +<p>The Apache Clownfish “symbiotic” object system pairs with “host” programming language environments and facilitates the development of high performance language extensions.</p> + +<h3><a class='u' +name="Features" +>Features</a></h3> + +<ul> +<li>Support for multiple host languages.</li> + +<li>Support for stand-alone C libraries and executables.</li> + +<li>Subclassing and method overriding from the host language.</li> + +<li>Support for host language idioms like named parameters or default argument values.</li> + +<li>Highly performant object system with lazy creation of host language objects.</li> + +<li>Runtime with classes for commonly used data structures like strings, +dynamic arrays and hash tables.</li> + +<li>Guaranteed ABI stability when adding or reordering methods or instance variables.</li> + +<li>Modularity.</li> + +<li>Introspection.</li> + +<li>Documentation generator.</li> +</ul> + +<h3><a class='u' +name="Planned_features" +>Planned features</a></h3> + +<ul> +<li>Support for more host languages.</li> + +<li>Support for interfaces.</li> +</ul> + +<h3><a class='u' +name="Overview" +>Overview</a></h3> + +<p>Clownfish consists of two parts, +the Clownfish compiler “CFC” and the Clownfish runtime. +CFC is a code generator that creates C header files, +host language bindings, +initialization code and documentation from a set of Clownfish header files. +The generated code is compiled with other project code and linked with the Clownfish runtime.</p> + +<p>Clownfish header files have a <code>.cfh</code> extension and define classes used within the Clownfish object system. +The object system is implemented in C and supports single inheritance and virtual method dispatch. +CFC creates a C header file from each Clownfish header containing the C interface to Clownfish objects. +Functions and methods of objects are implemented in normal C source files. +Beyond the C level, +CFC can generate host language bindings to make Clownfish objects accessible from other programming languages. +The compiler also creates class documentation in various formats from comments contained in Clownfish header files and standalone Markdown files.</p> + +<p>The Clownfish runtime provides:</p> + +<ul> +<li>The <a href="./Clownfish/Obj.html" class="podlinkpod" +>Obj</a> class which is the root of the class hierarchy.</li> + +<li>Core data types like <a href="./Clownfish/String.html" class="podlinkpod" +>strings</a>, +<a href="./Clownfish/Vector.html" class="podlinkpod" +>dynamic arrays</a>, +and <a href="./Clownfish/Hash.html" class="podlinkpod" +>hashes</a>.</li> + +<li>The <a href="./Clownfish/Class.html" class="podlinkpod" +>Class</a> metaclass.</li> + +<li>Some helper classes.</li> +</ul> + +<h3><a class='u' +name="Host_language_support" +>Host language support</a></h3> + +<p>Bindings for the following hosts are under development:</p> + +<ul> +<li>C (feature-complete)</li> + +<li>Go (experimental)</li> + +<li>Perl 5 (feature-complete)</li> + +<li>Python 3 / CPython (nascent)</li> + +<li>Ruby / MRI (nascent)</li> +</ul> + +<h3><a class='u' +name="Help_wanted" +>Help wanted</a></h3> + +<p>The target audience for the current release of Clownfish is developers. +Clownfish is developed by the Apache Lucy community, +where it is used to provide host language bindings for the Lucy search engine library; we expect that as Clownfish matures it will eventually spin off as an independent project. +If you would like to contribute to Clownfish, +please join the <a href="http://lucy.apache.org/mailing_lists" class="podlinkurl" +>Lucy developers mailing list</a>.</p> + +<h3><a class='u' +name="Documentation" +>Documentation</a></h3> + +<ul> +<li><a href="./Clownfish/Docs/ClassIntro.html" class="podlinkpod" +>Working with Clownfish classes</a></li> + +<li><a href="./Clownfish/Docs/BuildingProjects.html" class="podlinkpod" +>Building Clownfish projects in C environments</a></li> + +<li><a href="./Clownfish/Docs/WritingClasses.html" class="podlinkpod" +>Writing Clownfish classes</a></li> +</ul> + +</div> Added: lucy/site/trunk/content/docs/0.5.0/perl/Clownfish/Blob.mdtext URL: http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/0.5.0/perl/Clownfish/Blob.mdtext?rev=1762636&view=auto ============================================================================== --- lucy/site/trunk/content/docs/0.5.0/perl/Clownfish/Blob.mdtext (added) +++ lucy/site/trunk/content/docs/0.5.0/perl/Clownfish/Blob.mdtext Wed Sep 28 12:06:24 2016 @@ -0,0 +1,78 @@ +Title: Clownfish::Blob â Apache Clownfish Documentation + +<div> +<a name='___top' class='dummyTopAnchor' ></a> + +<h2><a class='u' +name="NAME" +>NAME</a></h2> + +<p>Clownfish::Blob - Immutable buffer holding arbitrary bytes.</p> + +<h2><a class='u' +name="SYNOPSIS" +>SYNOPSIS</a></h2> + +<pre>my $blob = Clownfish::Blob->new($byte_string); +my $byte_string = $blob->to_perl;</pre> + +<h2><a class='u' +name="DESCRIPTION" +>DESCRIPTION</a></h2> + +<h2><a class='u' +name="CONSTRUCTORS" +>CONSTRUCTORS</a></h2> + +<h3><a class='u' +name="new" +>new</a></h3> + +<pre>my $blob = Clownfish::Blob->new($byte_string);</pre> + +<p>Create a Blob containing the passed-in bytes.</p> + +<h2><a class='u' +name="METHODS" +>METHODS</a></h2> + +<h3><a class='u' +name="get_size" +>get_size</a></h3> + +<pre>my $int = $blob->get_size();</pre> + +<p>Return the number of bytes held by the Blob.</p> + +<h3><a class='u' +name="compare_to" +>compare_to</a></h3> + +<pre>my $int = $blob->compare_to($other);</pre> + +<p>Indicate whether one Blob is less than, +equal to, +or greater than another. +The byte contents of the Blobs are compared lexicographically. +Throws an exception if <code>other</code> is not a Blob.</p> + +<p>Returns: 0 if the Blobs 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> + +<h3><a class='u' +name="clone" +>clone</a></h3> + +<pre>my $result = $blob->clone();</pre> + +<p>Return a clone of the object.</p> + +<h2><a class='u' +name="INHERITANCE" +>INHERITANCE</a></h2> + +<p>Clownfish::Blob isa <a href="../Clownfish/Obj.html" class="podlinkpod" +>Clownfish::Obj</a>.</p> + +</div> Added: lucy/site/trunk/content/docs/0.5.0/perl/Clownfish/Boolean.mdtext URL: http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/0.5.0/perl/Clownfish/Boolean.mdtext?rev=1762636&view=auto ============================================================================== --- lucy/site/trunk/content/docs/0.5.0/perl/Clownfish/Boolean.mdtext (added) +++ lucy/site/trunk/content/docs/0.5.0/perl/Clownfish/Boolean.mdtext Wed Sep 28 12:06:24 2016 @@ -0,0 +1,70 @@ +Title: Clownfish::Boolean â Apache Clownfish Documentation + +<div> +<a name='___top' class='dummyTopAnchor' ></a> + +<h2><a class='u' +name="NAME" +>NAME</a></h2> + +<p>Clownfish::Boolean - Boolean type.</p> + +<h2><a class='u' +name="SYNOPSIS" +>SYNOPSIS</a></h2> + +<pre>use Clownfish::Boolean qw( $true_singleton $false_singleton ); + +my $bool = Clownfish::Boolean->singleton($truth_value); +my $truth_value = $bool->get_value; + +if ($bool->equals($true_singleton)) { + print "true\n"; +}</pre> + +<h2><a class='u' +name="DESCRIPTION" +>DESCRIPTION</a></h2> + +<p>There are only two singleton instances of this class: <code>$true_singleton</code> and <code>$false_singleton</code> which are exported on demand.</p> + +<h2><a class='u' +name="CONSTRUCTORS" +>CONSTRUCTORS</a></h2> + +<h3><a class='u' +name="singleton" +>singleton</a></h3> + +<pre>my $bool = Clownfish::Boolean->singleton($truth_value);</pre> + +<p>Return either <code>$true_singleton</code> or <code>$false_singleton</code> depending on the supplied value.</p> + +<h2><a class='u' +name="METHODS" +>METHODS</a></h2> + +<h3><a class='u' +name="get_value" +>get_value</a></h3> + +<pre>my $bool = $boolean->get_value();</pre> + +<p>Return the value of the Boolean.</p> + +<h3><a class='u' +name="clone" +>clone</a></h3> + +<pre>my $result = $boolean->clone();</pre> + +<p>Return a clone of the object.</p> + +<h2><a class='u' +name="INHERITANCE" +>INHERITANCE</a></h2> + +<p>Clownfish::Boolean isa <a href="../Clownfish/Obj.html" class="podlinkpod" +>Clownfish::Obj</a>.</p> + +</div> Added: lucy/site/trunk/content/docs/0.5.0/perl/Clownfish/ByteBuf.mdtext URL: http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/0.5.0/perl/Clownfish/ByteBuf.mdtext?rev=1762636&view=auto ============================================================================== --- lucy/site/trunk/content/docs/0.5.0/perl/Clownfish/ByteBuf.mdtext (added) +++ lucy/site/trunk/content/docs/0.5.0/perl/Clownfish/ByteBuf.mdtext Wed Sep 28 12:06:24 2016 @@ -0,0 +1,132 @@ +Title: Clownfish::ByteBuf â Apache Clownfish Documentation + +<div> +<a name='___top' class='dummyTopAnchor' ></a> + +<h2><a class='u' +name="NAME" +>NAME</a></h2> + +<p>Clownfish::ByteBuf - Growable buffer holding arbitrary bytes.</p> + +<h2><a class='u' +name="SYNOPSIS" +>SYNOPSIS</a></h2> + +<pre>my $buf = Clownfish::ByteBuf->new($byte_string); +my $byte_string = $buf->to_perl;</pre> + +<h2><a class='u' +name="DESCRIPTION" +>DESCRIPTION</a></h2> + +<h2><a class='u' +name="CONSTRUCTORS" +>CONSTRUCTORS</a></h2> + +<h3><a class='u' +name="new" +>new</a></h3> + +<pre>my $buf = Clownfish::ByteBuf->new($byte_string);</pre> + +<p>Create a ByteBuf containing the passed-in bytes.</p> + +<h2><a class='u' +name="METHODS" +>METHODS</a></h2> + +<h3><a class='u' +name="set_size" +>set_size</a></h3> + +<pre>$byte_buf->set_size($size);</pre> + +<p>Resize the ByteBuf to <code>size</code>. +If greater than the object’s capacity, +throws an error.</p> + +<h3><a class='u' +name="get_size" +>get_size</a></h3> + +<pre>my $int = $byte_buf->get_size();</pre> + +<p>Return the size of the ByteBuf in bytes.</p> + +<h3><a class='u' +name="get_capacity" +>get_capacity</a></h3> + +<pre>my $int = $byte_buf->get_capacity();</pre> + +<p>Return the number of bytes in the ByteBuf’s allocation.</p> + +<h3><a class='u' +name="cat" +>cat</a></h3> + +<pre>$byte_buf->cat($blob);</pre> + +<p>Concatenate the contents of <a href="../Clownfish/Blob.html" class="podlinkpod" +>Blob</a> <code>blob</code> onto the end of the original ByteBuf. +Allocate more memory as needed.</p> + +<h3><a class='u' +name="yield_blob" +>yield_blob</a></h3> + +<pre>my $blob = $byte_buf->yield_blob();</pre> + +<p>Return the content of the ByteBuf as <a href="../Clownfish/Blob.html" class="podlinkpod" +>Blob</a> and clear the ByteBuf.</p> + +<h3><a class='u' +name="utf8_to_string" +>utf8_to_string</a></h3> + +<pre>my $string = $byte_buf->utf8_to_string();</pre> + +<p>Return a String which holds a copy of the UTF-8 character data in the ByteBuf after checking for validity.</p> + +<h3><a class='u' +name="trusted_utf8_to_string" +>trusted_utf8_to_string</a></h3> + +<pre>my $string = $byte_buf->trusted_utf8_to_string();</pre> + +<p>Return a String which holds a copy of the UTF-8 character data in the ByteBuf, +skipping validity checks.</p> + +<h3><a class='u' +name="compare_to" +>compare_to</a></h3> + +<pre>my $int = $byte_buf->compare_to($other);</pre> + +<p>Indicate whether one ByteBuf is less than, +equal to, +or greater than another. +The byte contents of the ByteBufs are compared lexicographically. +Throws an exception if <code>other</code> is not a ByteBuf.</p> + +<p>Returns: 0 if the ByteBufs 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> + +<h3><a class='u' +name="clone" +>clone</a></h3> + +<pre>my $result = $byte_buf->clone();</pre> + +<p>Return a clone of the object.</p> + +<h2><a class='u' +name="INHERITANCE" +>INHERITANCE</a></h2> + +<p>Clownfish::ByteBuf isa <a href="../Clownfish/Obj.html" class="podlinkpod" +>Clownfish::Obj</a>.</p> + +</div> Added: lucy/site/trunk/content/docs/0.5.0/perl/Clownfish/CharBuf.mdtext URL: http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/0.5.0/perl/Clownfish/CharBuf.mdtext?rev=1762636&view=auto ============================================================================== --- lucy/site/trunk/content/docs/0.5.0/perl/Clownfish/CharBuf.mdtext (added) +++ lucy/site/trunk/content/docs/0.5.0/perl/Clownfish/CharBuf.mdtext Wed Sep 28 12:06:24 2016 @@ -0,0 +1,129 @@ +Title: Clownfish::CharBuf â Apache Clownfish Documentation + +<div> +<a name='___top' class='dummyTopAnchor' ></a> + +<h2><a class='u' +name="NAME" +>NAME</a></h2> + +<p>Clownfish::CharBuf - Growable buffer holding Unicode characters.</p> + +<h2><a class='u' +name="SYNOPSIS" +>SYNOPSIS</a></h2> + +<pre>my $buf = Clownfish::CharBuf->new; +$buf->cat('abc'); +$buf->cat_char(ord("\n")); +print $buf->to_string;</pre> + +<h2><a class='u' +name="DESCRIPTION" +>DESCRIPTION</a></h2> + +<h2><a class='u' +name="CONSTRUCTORS" +>CONSTRUCTORS</a></h2> + +<h3><a class='u' +name="new" +>new</a></h3> + +<pre>my $char_buf = Clownfish::CharBuf->new( + capacity => $capacity # default: 0 +);</pre> + +<p>Return a new CharBuf.</p> + +<ul> +<li><b>capacity</b> - Initial minimum capacity of the CharBuf, +in bytes.</li> +</ul> + +<h2><a class='u' +name="METHODS" +>METHODS</a></h2> + +<h3><a class='u' +name="cat" +>cat</a></h3> + +<pre>$char_buf->cat($string);</pre> + +<p>Concatenate the contents of <a href="../Clownfish/String.html" class="podlinkpod" +>String</a> <code>string</code> onto the end of the caller.</p> + +<ul> +<li><b>string</b> - The String to concatenate.</li> +</ul> + +<h3><a class='u' +name="cat_char" +>cat_char</a></h3> + +<pre>$char_buf->cat_char($code_point);</pre> + +<p>Concatenate one Unicode character onto the end of the CharBuf.</p> + +<ul> +<li><b>code_point</b> - The code point of the Unicode character.</li> +</ul> + +<h3><a class='u' +name="grow" +>grow</a></h3> + +<pre>$char_buf->grow($capacity);</pre> + +<p>Assign more memory to the CharBuf, +if it doesn’t already have enough room to hold a string of <code>size</code> bytes. +Cannot shrink the allocation.</p> + +<ul> +<li><b>capacity</b> - The new minimum capacity of the ByteBuf.</li> +</ul> + +<h3><a class='u' +name="clear" +>clear</a></h3> + +<pre>$char_buf->clear();</pre> + +<p>Clear the CharBuf.</p> + +<h3><a class='u' +name="get_size" +>get_size</a></h3> + +<pre>my $int = $char_buf->get_size();</pre> + +<p>Return the size of the CharBuf’s content in bytes.</p> + +<h3><a class='u' +name="clone" +>clone</a></h3> + +<pre>my $result = $char_buf->clone();</pre> + +<p>Return a clone of the object.</p> + +<h3><a class='u' +name="yield_string" +>yield_string</a></h3> + +<pre>my $string = $char_buf->yield_string();</pre> + +<p>Return the content of the CharBuf as <a href="../Clownfish/String.html" class="podlinkpod" +>String</a> and clear the CharBuf. +This is more efficient than <a href="../Clownfish/Obj.html#to_string" class="podlinkpod" +>to_string()</a>.</p> + +<h2><a class='u' +name="INHERITANCE" +>INHERITANCE</a></h2> + +<p>Clownfish::CharBuf isa <a href="../Clownfish/Obj.html" class="podlinkpod" +>Clownfish::Obj</a>.</p> + +</div> Added: lucy/site/trunk/content/docs/0.5.0/perl/Clownfish/Class.mdtext URL: http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/0.5.0/perl/Clownfish/Class.mdtext?rev=1762636&view=auto ============================================================================== --- lucy/site/trunk/content/docs/0.5.0/perl/Clownfish/Class.mdtext (added) +++ lucy/site/trunk/content/docs/0.5.0/perl/Clownfish/Class.mdtext Wed Sep 28 12:06:24 2016 @@ -0,0 +1,105 @@ +Title: Clownfish::Class â Apache Clownfish Documentation + +<div> +<a name='___top' class='dummyTopAnchor' ></a> + +<h2><a class='u' +name="NAME" +>NAME</a></h2> + +<p>Clownfish::Class - Class.</p> + +<h2><a class='u' +name="SYNOPSIS" +>SYNOPSIS</a></h2> + +<pre>my $class = Clownfish::Class->fetch_class('Foo::Bar'); +my $subclass = Clownfish::Class->singleton('Foo::Bar::Jr', $class);</pre> + +<h2><a class='u' +name="DESCRIPTION" +>DESCRIPTION</a></h2> + +<p>Classes are first-class objects in Clownfish. +Class objects are instances of Clownfish::Class.</p> + +<h2><a class='u' +name="CONSTRUCTORS" +>CONSTRUCTORS</a></h2> + +<h3><a class='u' +name="fetch_class" +>fetch_class</a></h3> + +<pre>my $class = Clownfish::Class->fetch_class($class_name);</pre> + +<p>Find a registered class. +May return undef if the class is not registered.</p> + +<h3><a class='u' +name="singleton" +>singleton</a></h3> + +<pre>my $class = Clownfish::Class->singleton( + class_name => $class_name # required + parent => $parent # required +);</pre> + +<p>Return a singleton. +If a Class can be found in the registry based on the supplied class name, +it will be returned. +Otherwise, +a new Class will be created using <code>parent</code> as a base.</p> + +<p>If <code>parent</code> is undef, +an attempt will be made to find it. +If the attempt fails, +an error will result.</p> + +<h2><a class='u' +name="METHODS" +>METHODS</a></h2> + +<h3><a class='u' +name="make_obj" +>make_obj</a></h3> + +<pre>my $obj = $class->make_obj();</pre> + +<p>Create an empty object of the type defined by the Class: allocate, +assign its class and give it an initial refcount of 1. +The caller is responsible for initialization.</p> + +<h3><a class='u' +name="get_name" +>get_name</a></h3> + +<pre>my $string = $class->get_name();</pre> + +<p>Return the name of the class.</p> + +<h3><a class='u' +name="get_parent" +>get_parent</a></h3> + +<pre>my $result = $class->get_parent();</pre> + +<p>Return the parent class, +or undef for a root of the class hierarchy.</p> + +<h3><a class='u' +name="get_obj_alloc_size" +>get_obj_alloc_size</a></h3> + +<pre>my $int = $class->get_obj_alloc_size();</pre> + +<p>Return the number of bytes needed to hold an instance of the class.</p> + +<h2><a class='u' +name="INHERITANCE" +>INHERITANCE</a></h2> + +<p>Clownfish::Class isa <a href="../Clownfish/Obj.html" class="podlinkpod" +>Clownfish::Obj</a>.</p> + +</div> Copied: lucy/site/trunk/content/docs/0.5.0/perl/Clownfish/Docs/BuildingProjects.mdtext (from r1762634, lucy/site/trunk/content/docs/perl/Clownfish/Docs/BuildingProjects.mdtext) URL: http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/0.5.0/perl/Clownfish/Docs/BuildingProjects.mdtext?p2=lucy/site/trunk/content/docs/0.5.0/perl/Clownfish/Docs/BuildingProjects.mdtext&p1=lucy/site/trunk/content/docs/perl/Clownfish/Docs/BuildingProjects.mdtext&r1=1762634&r2=1762636&rev=1762636&view=diff ============================================================================== (empty) Added: lucy/site/trunk/content/docs/0.5.0/perl/Clownfish/Docs/ClassIntro.mdtext URL: http://svn.apache.org/viewvc/lucy/site/trunk/content/docs/0.5.0/perl/Clownfish/Docs/ClassIntro.mdtext?rev=1762636&view=auto ============================================================================== --- lucy/site/trunk/content/docs/0.5.0/perl/Clownfish/Docs/ClassIntro.mdtext (added) +++ lucy/site/trunk/content/docs/0.5.0/perl/Clownfish/Docs/ClassIntro.mdtext Wed Sep 28 12:06:24 2016 @@ -0,0 +1,132 @@ +Title: Clownfish::Docs::ClassIntro â Apache Clownfish Documentation + +<div> +<a name='___top' class='dummyTopAnchor' ></a> + +<h2><a class='u' +name="NAME" +>NAME</a></h2> + +<p>Clownfish::Docs::ClassIntro - Working with Apache Clownfish classes in C</p> + +<h2><a class='u' +name="DESCRIPTION" +>DESCRIPTION</a></h2> + +<h3><a class='u' +name="Inititalizing_Clownfish_parcels" +>Inititalizing Clownfish parcels</a></h3> + +<p>Every Clownfish parcel must be initialized before it is used. +The initialization function is named <code>{parcel_nick}_bootstrap_parcel</code> and takes no arguments.</p> + +<p>Example:</p> + +<pre>cfish_bootstrap_parcel();</pre> + +<h3><a class='u' +name="Including_the_generated_header_file" +>Including the generated header file</a></h3> + +<p>To use Clownfish classes from C code, +the header file generated by the Clownfish compiler must be included. +The name of the C header is derived from the name of the Clownfish <code>.cfh</code> header. +It can also be found in the class documentation.</p> + +<p>Typically, +the “short name macro” should be defined before including a Clownfish header. +Its name is derived from the parcel nickname and has the form <code>{PARCEL_NICK}_USE_SHORT_NAMES</code>. +If the short name macro is in effect, +you don’t have to worry about parcel prefixes.</p> + +<p>Example:</p> + +<pre>#define CFISH_USE_SHORT_NAMES + +#include <Clownfish/String.h> +#include <Clownfish/Vector.h></pre> + +<h3><a class='u' +name="Function_and_method_prefixes" +>Function and method prefixes</a></h3> + +<p>Clownfish classes can have a “nickname” – a shorter version of the class name that is used for function and method prefixes. +The nickname can be found in the class documentation.</p> + +<p>For example the String class has the nickname <code>Str</code>.</p> + +<h3><a class='u' +name="Creating_objects" +>Creating objects</a></h3> + +<p>A Clownfish object is an opaque struct referenced by pointer.</p> + +<p>Most classes come with one or more constructors. +On the C level, +a constructor is simply an “inert” function of a class that returns a new object. +In Clownfish parlance, +an inert function is any function in a class that isn’t a method, +similar to static methods in Java or static member functions in C++.</p> + +<p>Example:</p> + +<pre>// Notice the use of nickname "Str" in the constructor prefix. +String *name = Str_newf("%s %s", first, last);</pre> + +<h3><a class='u' +name="Calling_methods" +>Calling methods</a></h3> + +<p>Calling methods is straightforward. +The invocant is always passed as first argument.</p> + +<pre>// Notice the use of nickname "Str" in the method prefix. +size_t len = Str_Length(name);</pre> + +<p>Method names always start with an uppercase letter.</p> + +<h3><a class='u' +name="Memory_management" +>Memory management</a></h3> + +<p>Clownfish uses reference counting to manage memory. +Constructors, +but also some methods, +return an “incremented” object. +If you’re done with an incremented object, +you must decrease its reference count to avoid leaking memory. +Use the <code>DECREF</code> macro to release an object:</p> + +<pre>DECREF(name);</pre> + +<p>Some other methods return non-incremented objects. +If you want to retain a reference to such an object, +you must increase its reference count using the <code>INCREF</code> macro to make sure it won’t be destroyed too early:</p> + +<pre>obj = INCREF(obj);</pre> + +<p>This invocation of INCREF must be matched by a DECREF when you’re done with the object.</p> + +<p>Some methods, +for example in container classes, +take “decremented” objects as arguments. +From the caller’s perspective, +passing a decremented argument is equivalent to passing a non-decremented argument and calling DECREF afterwards. +Typically, +this avoids a call to DECREF in the calling code. +But sometimes, +it must be compensated with an INCREF.</p> + +<h3><a class='u' +name="Further_reading" +>Further reading</a></h3> + +<ul> +<li><a href="../../Clownfish/Docs/BuildingProjects.html" class="podlinkpod" +>Building Clownfish projects in C environments</a></li> + +<li><a href="../../Clownfish/Docs/WritingClasses.html" class="podlinkpod" +>Writing Clownfish classes</a></li> +</ul> + +</div>
