mirror of https://github.com/ecmwf/eccodes.git
661 lines
34 KiB
HTML
661 lines
34 KiB
HTML
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||
|
<meta name="generator" content="Doxygen 1.8.5"/>
|
||
|
<title>eccodes: The indexing feature</title>
|
||
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||
|
<script type="text/javascript" src="jquery.js"></script>
|
||
|
<script type="text/javascript" src="dynsections.js"></script>
|
||
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||
|
<script type="text/javascript" src="search/search.js"></script>
|
||
|
<script type="text/javascript">
|
||
|
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
||
|
</script>
|
||
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||
|
</head>
|
||
|
<body>
|
||
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||
|
<div id="titlearea">
|
||
|
<table cellspacing="0" cellpadding="0">
|
||
|
<tbody>
|
||
|
<tr style="height: 56px;">
|
||
|
<td style="padding-left: 0.5em;">
|
||
|
<div id="projectname">eccodes
|
||
|
</div>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</div>
|
||
|
<!-- end header part -->
|
||
|
<!-- Generated by Doxygen 1.8.5 -->
|
||
|
<script type="text/javascript">
|
||
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||
|
</script>
|
||
|
<div id="navrow1" class="tabs">
|
||
|
<ul class="tablist">
|
||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||
|
<li><a href="modules.html"><span>C Interface</span></a></li>
|
||
|
<li><a href="classeccodes.html"><span>F90 Interface</span></a></li>
|
||
|
<li><a href="namespaces.html"><span>Python Interface</span></a></li>
|
||
|
<li>
|
||
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
||
|
<span class="left">
|
||
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||
|
alt=""/>
|
||
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
||
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||
|
</span><span class="right">
|
||
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||
|
</span>
|
||
|
</div>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
</div><!-- top -->
|
||
|
<!-- window showing the filter options -->
|
||
|
<div id="MSearchSelectWindow"
|
||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||
|
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Pages</a></div>
|
||
|
|
||
|
<!-- iframe showing the search results (closed by default) -->
|
||
|
<div id="MSearchResultsWindow">
|
||
|
<iframe src="javascript:void(0)" frameborder="0"
|
||
|
name="MSearchResults" id="MSearchResults">
|
||
|
</iframe>
|
||
|
</div>
|
||
|
|
||
|
<div class="header">
|
||
|
<div class="summary">
|
||
|
<a href="#nested-classes">Data Structures</a> |
|
||
|
<a href="#func-members">Functions</a> </div>
|
||
|
<div class="headertitle">
|
||
|
<div class="title">The indexing feature</div> </div>
|
||
|
</div><!--header-->
|
||
|
<div class="contents">
|
||
|
<table class="memberdecls">
|
||
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
|
||
|
Data Structures</h2></td></tr>
|
||
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structcodes__index.html">codes_index</a></td></tr>
|
||
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
</table><table class="memberdecls">
|
||
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
|
||
|
Functions</h2></td></tr>
|
||
|
<tr class="memitem:ga42b26aa62c53cef50f0bd9e75ed88281"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structcodes__index.html">codes_index</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__codes__index.html#ga42b26aa62c53cef50f0bd9e75ed88281">codes_index_new_from_file</a> (<a class="el" href="structcodes__context.html">codes_context</a> *c, char *filename, const char *keys, int *err)</td></tr>
|
||
|
<tr class="memdesc:ga42b26aa62c53cef50f0bd9e75ed88281"><td class="mdescLeft"> </td><td class="mdescRight">Create a new index form a file. <a href="#ga42b26aa62c53cef50f0bd9e75ed88281">More...</a><br/></td></tr>
|
||
|
<tr class="separator:ga42b26aa62c53cef50f0bd9e75ed88281"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:ga0d7015518d426c012ba6c2b848af96d9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structcodes__index.html">codes_index</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__codes__index.html#ga0d7015518d426c012ba6c2b848af96d9">codes_index_new</a> (<a class="el" href="structcodes__context.html">codes_context</a> *c, const char *keys, int *err)</td></tr>
|
||
|
<tr class="memdesc:ga0d7015518d426c012ba6c2b848af96d9"><td class="mdescLeft"> </td><td class="mdescRight">Create a new index based on a set of keys. <a href="#ga0d7015518d426c012ba6c2b848af96d9">More...</a><br/></td></tr>
|
||
|
<tr class="separator:ga0d7015518d426c012ba6c2b848af96d9"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:ga8fa6ca199182c48c0327e61ac98dfd00"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__codes__index.html#ga8fa6ca199182c48c0327e61ac98dfd00">codes_index_add_file</a> (grib_index *index, const char *filename)</td></tr>
|
||
|
<tr class="memdesc:ga8fa6ca199182c48c0327e61ac98dfd00"><td class="mdescLeft"> </td><td class="mdescRight">Indexes the file given in argument in the index given in argument. <a href="#ga8fa6ca199182c48c0327e61ac98dfd00">More...</a><br/></td></tr>
|
||
|
<tr class="separator:ga8fa6ca199182c48c0327e61ac98dfd00"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:gab1aa5fde30d26360349085efec936c6c"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__codes__index.html#gab1aa5fde30d26360349085efec936c6c">codes_index_get_size</a> (<a class="el" href="structcodes__index.html">codes_index</a> *index, const char *key, size_t *size)</td></tr>
|
||
|
<tr class="memdesc:gab1aa5fde30d26360349085efec936c6c"><td class="mdescLeft"> </td><td class="mdescRight">Get the number of distinct values of the key in argument contained in the index. <a href="#gab1aa5fde30d26360349085efec936c6c">More...</a><br/></td></tr>
|
||
|
<tr class="separator:gab1aa5fde30d26360349085efec936c6c"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:gafb483b993d462b2f0576af70c1aa4cc7"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__codes__index.html#gafb483b993d462b2f0576af70c1aa4cc7">codes_index_get_long</a> (<a class="el" href="structcodes__index.html">codes_index</a> *index, const char *key, long *values, size_t *size)</td></tr>
|
||
|
<tr class="memdesc:gafb483b993d462b2f0576af70c1aa4cc7"><td class="mdescLeft"> </td><td class="mdescRight">Get the distinct values of the key in argument contained in the index. <a href="#gafb483b993d462b2f0576af70c1aa4cc7">More...</a><br/></td></tr>
|
||
|
<tr class="separator:gafb483b993d462b2f0576af70c1aa4cc7"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:ga8a2fae0f5eeb8d708c1831bc1b9b9004"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__codes__index.html#ga8a2fae0f5eeb8d708c1831bc1b9b9004">codes_index_get_double</a> (<a class="el" href="structcodes__index.html">codes_index</a> *index, const char *key, double *values, size_t *size)</td></tr>
|
||
|
<tr class="memdesc:ga8a2fae0f5eeb8d708c1831bc1b9b9004"><td class="mdescLeft"> </td><td class="mdescRight">Get the distinct values of the key in argument contained in the index. <a href="#ga8a2fae0f5eeb8d708c1831bc1b9b9004">More...</a><br/></td></tr>
|
||
|
<tr class="separator:ga8a2fae0f5eeb8d708c1831bc1b9b9004"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:ga86ea092af6a89b0322b873147bba523d"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__codes__index.html#ga86ea092af6a89b0322b873147bba523d">codes_index_get_string</a> (<a class="el" href="structcodes__index.html">codes_index</a> *index, const char *key, char **values, size_t *size)</td></tr>
|
||
|
<tr class="memdesc:ga86ea092af6a89b0322b873147bba523d"><td class="mdescLeft"> </td><td class="mdescRight">Get the distinct values of the key in argument contained in the index. <a href="#ga86ea092af6a89b0322b873147bba523d">More...</a><br/></td></tr>
|
||
|
<tr class="separator:ga86ea092af6a89b0322b873147bba523d"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:gac0a14aca2fc5385684fdba1cb668959a"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__codes__index.html#gac0a14aca2fc5385684fdba1cb668959a">codes_index_select_long</a> (<a class="el" href="structcodes__index.html">codes_index</a> *index, const char *key, long value)</td></tr>
|
||
|
<tr class="memdesc:gac0a14aca2fc5385684fdba1cb668959a"><td class="mdescLeft"> </td><td class="mdescRight">Select the message subset with key==value. <a href="#gac0a14aca2fc5385684fdba1cb668959a">More...</a><br/></td></tr>
|
||
|
<tr class="separator:gac0a14aca2fc5385684fdba1cb668959a"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:ga3baa4a80cd517d55f088fee7f4630fff"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__codes__index.html#ga3baa4a80cd517d55f088fee7f4630fff">codes_index_select_double</a> (<a class="el" href="structcodes__index.html">codes_index</a> *index, const char *key, double value)</td></tr>
|
||
|
<tr class="memdesc:ga3baa4a80cd517d55f088fee7f4630fff"><td class="mdescLeft"> </td><td class="mdescRight">Select the message subset with key==value. <a href="#ga3baa4a80cd517d55f088fee7f4630fff">More...</a><br/></td></tr>
|
||
|
<tr class="separator:ga3baa4a80cd517d55f088fee7f4630fff"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:gafa8d7b29dfe42d805714db95b5ca044a"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__codes__index.html#gafa8d7b29dfe42d805714db95b5ca044a">codes_index_select_string</a> (<a class="el" href="structcodes__index.html">codes_index</a> *index, const char *key, char *value)</td></tr>
|
||
|
<tr class="memdesc:gafa8d7b29dfe42d805714db95b5ca044a"><td class="mdescLeft"> </td><td class="mdescRight">Select the message subset with key==value. <a href="#gafa8d7b29dfe42d805714db95b5ca044a">More...</a><br/></td></tr>
|
||
|
<tr class="separator:gafa8d7b29dfe42d805714db95b5ca044a"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:gae1947cf7225ca1809c5491aa671d6b91"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structcodes__handle.html">codes_handle</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__codes__index.html#gae1947cf7225ca1809c5491aa671d6b91">codes_handle_new_from_index</a> (<a class="el" href="structcodes__index.html">codes_index</a> *index, int *err)</td></tr>
|
||
|
<tr class="memdesc:gae1947cf7225ca1809c5491aa671d6b91"><td class="mdescLeft"> </td><td class="mdescRight">Create a new handle from an index after having selected the key values. <a href="#gae1947cf7225ca1809c5491aa671d6b91">More...</a><br/></td></tr>
|
||
|
<tr class="separator:gae1947cf7225ca1809c5491aa671d6b91"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
<tr class="memitem:ga03643d8adf2aa7836e1848b20843b31c"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__codes__index.html#ga03643d8adf2aa7836e1848b20843b31c">codes_index_delete</a> (<a class="el" href="structcodes__index.html">codes_index</a> *index)</td></tr>
|
||
|
<tr class="memdesc:ga03643d8adf2aa7836e1848b20843b31c"><td class="mdescLeft"> </td><td class="mdescRight">Delete the index. <a href="#ga03643d8adf2aa7836e1848b20843b31c">More...</a><br/></td></tr>
|
||
|
<tr class="separator:ga03643d8adf2aa7836e1848b20843b31c"><td class="memSeparator" colspan="2"> </td></tr>
|
||
|
</table>
|
||
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||
|
<p>The <a class="el" href="structcodes__index.html">codes_index</a> is the structure giving indexed access to messages in a file. </p>
|
||
|
<h2 class="groupheader">Function Documentation</h2>
|
||
|
<a class="anchor" id="gae1947cf7225ca1809c5491aa671d6b91"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname"><a class="el" href="structcodes__handle.html">codes_handle</a>* codes_handle_new_from_index </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype"><a class="el" href="structcodes__index.html">codes_index</a> * </td>
|
||
|
<td class="paramname"><em>index</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">int * </td>
|
||
|
<td class="paramname"><em>err</em> </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td>)</td>
|
||
|
<td></td><td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p>Create a new handle from an index after having selected the key values. </p>
|
||
|
<p>All the keys belonging to the index must be selected before calling this function. Successive calls to this function will return all the handles compatible with the constraints defined selecting the values of the index keys. When no more handles are available from the index a NULL pointer is returned and the err variable is set to CODES_END_OF_INDEX.</p>
|
||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||
|
<table class="params">
|
||
|
<tr><td class="paramname">index</td><td>: an index created from a file. </td></tr>
|
||
|
<tr><td class="paramname">err</td><td>: 0 if OK, integer value on error. CODES_END_OF_INDEX when no more handles are contained in the index. </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="section return"><dt>Returns</dt><dd>grib handle. </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="ga8fa6ca199182c48c0327e61ac98dfd00"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">int codes_index_add_file </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">grib_index * </td>
|
||
|
<td class="paramname"><em>index</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">const char * </td>
|
||
|
<td class="paramname"><em>filename</em> </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td>)</td>
|
||
|
<td></td><td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p>Indexes the file given in argument in the index given in argument. </p>
|
||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||
|
<table class="params">
|
||
|
<tr><td class="paramname">index</td><td>: index </td></tr>
|
||
|
<tr><td class="paramname">filename</td><td>: name of the file of messages to be indexed </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="section return"><dt>Returns</dt><dd>0 if OK, integer value on error </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="ga03643d8adf2aa7836e1848b20843b31c"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">void codes_index_delete </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype"><a class="el" href="structcodes__index.html">codes_index</a> * </td>
|
||
|
<td class="paramname"><em>index</em></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p>Delete the index. </p>
|
||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||
|
<table class="params">
|
||
|
<tr><td class="paramname">index</td><td>: index to be deleted. </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="ga8a2fae0f5eeb8d708c1831bc1b9b9004"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">int codes_index_get_double </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype"><a class="el" href="structcodes__index.html">codes_index</a> * </td>
|
||
|
<td class="paramname"><em>index</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">const char * </td>
|
||
|
<td class="paramname"><em>key</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">double * </td>
|
||
|
<td class="paramname"><em>values</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">size_t * </td>
|
||
|
<td class="paramname"><em>size</em> </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td>)</td>
|
||
|
<td></td><td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p>Get the distinct values of the key in argument contained in the index. </p>
|
||
|
<p>The key must belong to the index. This function is used when the type of the key was explicitly defined as double or when the native type of the key is double.</p>
|
||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||
|
<table class="params">
|
||
|
<tr><td class="paramname">index</td><td>: an index created from a file. The index must have been created with the key in argument. </td></tr>
|
||
|
<tr><td class="paramname">key</td><td>: key for which the values are returned </td></tr>
|
||
|
<tr><td class="paramname">values</td><td>: array of values. The array must be allocated before entering this function and its size must be enough to contain all the values. </td></tr>
|
||
|
<tr><td class="paramname">size</td><td>: size of the values array </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="section return"><dt>Returns</dt><dd>0 if OK, integer value on error </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="gafb483b993d462b2f0576af70c1aa4cc7"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">int codes_index_get_long </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype"><a class="el" href="structcodes__index.html">codes_index</a> * </td>
|
||
|
<td class="paramname"><em>index</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">const char * </td>
|
||
|
<td class="paramname"><em>key</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">long * </td>
|
||
|
<td class="paramname"><em>values</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">size_t * </td>
|
||
|
<td class="paramname"><em>size</em> </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td>)</td>
|
||
|
<td></td><td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p>Get the distinct values of the key in argument contained in the index. </p>
|
||
|
<p>The key must belong to the index. This function is used when the type of the key was explicitly defined as long or when the native type of the key is long.</p>
|
||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||
|
<table class="params">
|
||
|
<tr><td class="paramname">index</td><td>: an index created from a file. The index must have been created with the key in argument. </td></tr>
|
||
|
<tr><td class="paramname">key</td><td>: key for which the values are returned </td></tr>
|
||
|
<tr><td class="paramname">values</td><td>: array of values. The array must be allocated before entering this function and its size must be enough to contain all the values. </td></tr>
|
||
|
<tr><td class="paramname">size</td><td>: size of the values array </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="section return"><dt>Returns</dt><dd>0 if OK, integer value on error </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="gab1aa5fde30d26360349085efec936c6c"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">int codes_index_get_size </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype"><a class="el" href="structcodes__index.html">codes_index</a> * </td>
|
||
|
<td class="paramname"><em>index</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">const char * </td>
|
||
|
<td class="paramname"><em>key</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">size_t * </td>
|
||
|
<td class="paramname"><em>size</em> </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td>)</td>
|
||
|
<td></td><td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p>Get the number of distinct values of the key in argument contained in the index. </p>
|
||
|
<p>The key must belong to the index.</p>
|
||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||
|
<table class="params">
|
||
|
<tr><td class="paramname">index</td><td>: an index created from a file. The index must have been created with the key in argument. </td></tr>
|
||
|
<tr><td class="paramname">key</td><td>: key for which the number of values is computed </td></tr>
|
||
|
<tr><td class="paramname">size</td><td>: number of distinct values of the key in the index </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="section return"><dt>Returns</dt><dd>0 if OK, integer value on error </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="ga86ea092af6a89b0322b873147bba523d"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">int codes_index_get_string </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype"><a class="el" href="structcodes__index.html">codes_index</a> * </td>
|
||
|
<td class="paramname"><em>index</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">const char * </td>
|
||
|
<td class="paramname"><em>key</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">char ** </td>
|
||
|
<td class="paramname"><em>values</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">size_t * </td>
|
||
|
<td class="paramname"><em>size</em> </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td>)</td>
|
||
|
<td></td><td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p>Get the distinct values of the key in argument contained in the index. </p>
|
||
|
<p>The key must belong to the index. This function is used when the type of the key was explicitly defined as string or when the native type of the key is string.</p>
|
||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||
|
<table class="params">
|
||
|
<tr><td class="paramname">index</td><td>: an index created from a file. The index must have been created with the key in argument. </td></tr>
|
||
|
<tr><td class="paramname">key</td><td>: key for which the values are returned </td></tr>
|
||
|
<tr><td class="paramname">values</td><td>: array of values. The array must be allocated before entering this function and its size must be enough to contain all the values. </td></tr>
|
||
|
<tr><td class="paramname">size</td><td>: size of the values array </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="section return"><dt>Returns</dt><dd>0 if OK, integer value on error </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="ga0d7015518d426c012ba6c2b848af96d9"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname"><a class="el" href="structcodes__index.html">codes_index</a>* codes_index_new </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype"><a class="el" href="structcodes__context.html">codes_context</a> * </td>
|
||
|
<td class="paramname"><em>c</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">const char * </td>
|
||
|
<td class="paramname"><em>keys</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">int * </td>
|
||
|
<td class="paramname"><em>err</em> </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td>)</td>
|
||
|
<td></td><td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p>Create a new index based on a set of keys. </p>
|
||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||
|
<table class="params">
|
||
|
<tr><td class="paramname">c</td><td>: context (NULL for default context) </td></tr>
|
||
|
<tr><td class="paramname">keys</td><td>: comma separated list of keys for the index. The type of the key can be explicitly declared appending :l for long, (or alternatively :i) :d for double, :s for string to the key name. If the type is not declared explicitly, the native type is assumed. </td></tr>
|
||
|
<tr><td class="paramname">err</td><td>: 0 if OK, integer value on error </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="section return"><dt>Returns</dt><dd>the newly created index </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="ga42b26aa62c53cef50f0bd9e75ed88281"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname"><a class="el" href="structcodes__index.html">codes_index</a>* codes_index_new_from_file </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype"><a class="el" href="structcodes__context.html">codes_context</a> * </td>
|
||
|
<td class="paramname"><em>c</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">char * </td>
|
||
|
<td class="paramname"><em>filename</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">const char * </td>
|
||
|
<td class="paramname"><em>keys</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">int * </td>
|
||
|
<td class="paramname"><em>err</em> </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td>)</td>
|
||
|
<td></td><td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p>Create a new index form a file. </p>
|
||
|
<p>The file is indexed with the keys in argument.</p>
|
||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||
|
<table class="params">
|
||
|
<tr><td class="paramname">c</td><td>: context (NULL for default context) </td></tr>
|
||
|
<tr><td class="paramname">filename</td><td>: name of the file of messages to be indexed </td></tr>
|
||
|
<tr><td class="paramname">keys</td><td>: comma separated list of keys for the index. The type of the key can be explicitly declared appending :l for long, (or alternatively :i) :d for double, :s for string to the key name. If the type is not declared explicitly, the native type is assumed. </td></tr>
|
||
|
<tr><td class="paramname">err</td><td>: 0 if OK, integer value on error </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="section return"><dt>Returns</dt><dd>the newly created index </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="ga3baa4a80cd517d55f088fee7f4630fff"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">int codes_index_select_double </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype"><a class="el" href="structcodes__index.html">codes_index</a> * </td>
|
||
|
<td class="paramname"><em>index</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">const char * </td>
|
||
|
<td class="paramname"><em>key</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">double </td>
|
||
|
<td class="paramname"><em>value</em> </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td>)</td>
|
||
|
<td></td><td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p>Select the message subset with key==value. </p>
|
||
|
<p>The value is a double. The key must have been created with double type or have double as native type if the type was not explicitly defined in the index creation.</p>
|
||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||
|
<table class="params">
|
||
|
<tr><td class="paramname">index</td><td>: an index created from a file. The index must have been created with the key in argument. </td></tr>
|
||
|
<tr><td class="paramname">key</td><td>: key to be selected </td></tr>
|
||
|
<tr><td class="paramname">value</td><td>: value of the key to select </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="section return"><dt>Returns</dt><dd>0 if OK, integer value on error </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="gac0a14aca2fc5385684fdba1cb668959a"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">int codes_index_select_long </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype"><a class="el" href="structcodes__index.html">codes_index</a> * </td>
|
||
|
<td class="paramname"><em>index</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">const char * </td>
|
||
|
<td class="paramname"><em>key</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">long </td>
|
||
|
<td class="paramname"><em>value</em> </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td>)</td>
|
||
|
<td></td><td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p>Select the message subset with key==value. </p>
|
||
|
<p>The value is a long. The key must have been created with long type or have long as native type if the type was not explicitly defined in the index creation.</p>
|
||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||
|
<table class="params">
|
||
|
<tr><td class="paramname">index</td><td>: an index created from a file. The index must have been created with the key in argument. </td></tr>
|
||
|
<tr><td class="paramname">key</td><td>: key to be selected </td></tr>
|
||
|
<tr><td class="paramname">value</td><td>: value of the key to select </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="section return"><dt>Returns</dt><dd>0 if OK, integer value on error </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="gafa8d7b29dfe42d805714db95b5ca044a"></a>
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">int codes_index_select_string </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype"><a class="el" href="structcodes__index.html">codes_index</a> * </td>
|
||
|
<td class="paramname"><em>index</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">const char * </td>
|
||
|
<td class="paramname"><em>key</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">char * </td>
|
||
|
<td class="paramname"><em>value</em> </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td>)</td>
|
||
|
<td></td><td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div><div class="memdoc">
|
||
|
|
||
|
<p>Select the message subset with key==value. </p>
|
||
|
<p>The value is a string. The key must have been created with string type or have string as native type if the type was not explicitly defined in the index creation.</p>
|
||
|
<dl class="params"><dt>Parameters</dt><dd>
|
||
|
<table class="params">
|
||
|
<tr><td class="paramname">index</td><td>: an index created from a file. The index must have been created with the key in argument. </td></tr>
|
||
|
<tr><td class="paramname">key</td><td>: key to be selected </td></tr>
|
||
|
<tr><td class="paramname">value</td><td>: value of the key to select </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="section return"><dt>Returns</dt><dd>0 if OK, integer value on error </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
</div><!-- contents -->
|
||
|
<!-- start footer part -->
|
||
|
<hr class="footer"/><address class="footer"><small>
|
||
|
Generated by  <a href="http://www.doxygen.org/index.html">
|
||
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||
|
</a> 1.8.5
|
||
|
</small></address>
|
||
|
</body>
|
||
|
</html>
|