<!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/html; charset=utf-8" /> <title>8.14.1. grn_ctx — groonga v3.0.5ドキュメント</title> <link rel="stylesheet" href="../../_static/groonga.css" type="text/css" /> <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../../', VERSION: '3.0.5', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true }; </script> <script type="text/javascript" src="../../_static/jquery.js"></script> <script type="text/javascript" src="../../_static/underscore.js"></script> <script type="text/javascript" src="../../_static/doctools.js"></script> <script type="text/javascript" src="../../_static/translations.js"></script> <link rel="shortcut icon" href="../../_static/favicon.ico"/> <link rel="top" title="groonga v3.0.5ドキュメント" href="../../index.html" /> <link rel="up" title="8.14. API" href="../api.html" /> <link rel="next" title="8.14.2. grn_expr" href="grn_expr.html" /> <link rel="prev" title="8.14. API" href="../api.html" /> </head> <body> <div class="header"> <h1 class="title"> <a id="top-link" href="../../index.html"> <span class="project">groonga</span> <span class="separator">-</span> <span class="description">オープンソースのカラムストア機能付き全文検索エンジン</span> </a> </h1> <div class="other-language-links"> <ul> <li><a href="../../../../en/html/reference/api/grn_ctx.html"><img src="../../_static/us.png" alt="English">English page</a></li> </ul> </div> </div> <div class="related"> <h3>ナビゲーション</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../../genindex.html" title="総合索引" accesskey="I">索引</a></li> <li class="right" > <a href="grn_expr.html" title="8.14.2. grn_expr" accesskey="N">次へ</a> |</li> <li class="right" > <a href="../api.html" title="8.14. API" accesskey="P">前へ</a> |</li> <li><a href="../../index.html">groonga v3.0.5ドキュメント</a> »</li> <li><a href="../../reference.html" >8. リファレンスマニュアル</a> »</li> <li><a href="../api.html" accesskey="U">8.14. API</a> »</li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body"> <div class="section" id="grn-ctx"> <h1>8.14.1. <tt class="docutils literal"><span class="pre">grn_ctx</span></tt><a class="headerlink" href="#grn-ctx" title="このヘッドラインへのパーマリンク">¶</a></h1> <div class="section" id="summary"> <h2>8.14.1.1. 概要<a class="headerlink" href="#summary" title="このヘッドラインへのパーマリンク">¶</a></h2> <p><a class="reference internal" href="#grn_ctx" title="grn_ctx"><tt class="xref c c-type docutils literal"><span class="pre">grn_ctx</span></tt></a> は最も重要なオブジェクトです。<a class="reference internal" href="#grn_ctx" title="grn_ctx"><tt class="xref c c-type docutils literal"><span class="pre">grn_ctx</span></tt></a> はその時点の情報を保持します:</p> <ul class="simple"> <li><p class="first">最後に発生したエラー。</p> </li> <li><p class="first">その時点のエンコーディング。</p> </li> <li><p class="first">デフォルトの閾値。(例: <a class="reference internal" href="../commands/select.html#match-escalation-threshold"><em>match_escalation_threshold</em></a>)</p> </li> <li><p class="first">デフォルトのコマンドバージョン。( <tt class="xref doc docutils literal"><span class="pre">/reference/commands/command_version</span></tt> )を参照のこと。</p> </li> </ul> <p><a class="reference internal" href="#grn_ctx" title="grn_ctx"><tt class="xref c c-type docutils literal"><span class="pre">grn_ctx</span></tt></a> は基盤となる機能を提供します:</p> <ul class="simple"> <li><p class="first">メモリ管理機能</p> </li> <li><p class="first">ロギング機能</p> </li> </ul> <p>ほとんどのAPIは <a class="reference internal" href="#grn_ctx" title="grn_ctx"><tt class="xref c c-type docutils literal"><span class="pre">grn_ctx</span></tt></a> を最初の引数にとります。</p> <p>同じ <a class="reference internal" href="#grn_ctx" title="grn_ctx"><tt class="xref c c-type docutils literal"><span class="pre">grn_ctx</span></tt></a> を二つ以上のスレッドからは扱えません。<a class="reference internal" href="#grn_ctx" title="grn_ctx"><tt class="xref c c-type docutils literal"><span class="pre">grn_ctx</span></tt></a> はスレッドごとに作成する必要があります。一つのスレッドでは <a class="reference internal" href="#grn_ctx" title="grn_ctx"><tt class="xref c c-type docutils literal"><span class="pre">grn_ctx</span></tt></a> を二つ以上扱えますが、通常はその必要はありません。</p> </div> <div class="section" id="example"> <h2>8.14.1.2. 実行例:<a class="headerlink" href="#example" title="このヘッドラインへのパーマリンク">¶</a></h2> <p>TODO...</p> </div> <div class="section" id="reference"> <h2>8.14.1.3. リファレンス<a class="headerlink" href="#reference" title="このヘッドラインへのパーマリンク">¶</a></h2> <dl class="type"> <dt id="grn_ctx"> <tt class="descname">grn_ctx</tt><a class="headerlink" href="#grn_ctx" title="この定義へのパーマリンク">¶</a></dt> <dd><p>TODO...</p> </dd></dl> <dl class="function"> <dt id="grn_ctx_init"> grn_rc <tt class="descname">grn_ctx_init</tt><big>(</big><a class="reference internal" href="#grn_ctx" title="grn_ctx">grn_ctx</a><em> *ctx</em>, int<em> flags</em><big>)</big><a class="headerlink" href="#grn_ctx_init" title="この定義へのパーマリンク">¶</a></dt> <dd><p>ctxを初期化します。</p> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> <tr class="field-odd field"><th class="field-name">パラメタ:</th><td class="field-body"><ul class="first simple"> <li><strong>ctx</strong> -- 初期化するctx構造体へのポインタを指定します。</li> <li><strong>flags</strong> -- 初期化する <tt class="docutils literal"><span class="pre">ctx</span></tt> のオプションを指定します。</li> </ul> </td> </tr> <tr class="field-even field"><th class="field-name">戻り値:</th><td class="field-body"><p class="first last">成功時は <tt class="docutils literal"><span class="pre">GRN_SUCCESS</span></tt> 、エラー時は <tt class="docutils literal"><span class="pre">GRN_SUCCESS</span></tt> 以外。</p> </td> </tr> </tbody> </table> </dd></dl> </div> </div> </div> </div> </div> <div class="sphinxsidebar"> <div class="sphinxsidebarwrapper"> <h3><a href="../../index.html">目次</a></h3> <ul> <li><a class="reference internal" href="#">8.14.1. <tt class="docutils literal"><span class="pre">grn_ctx</span></tt></a><ul> <li><a class="reference internal" href="#summary">8.14.1.1. 概要</a></li> <li><a class="reference internal" href="#example">8.14.1.2. 実行例:</a></li> <li><a class="reference internal" href="#reference">8.14.1.3. リファレンス</a></li> </ul> </li> </ul> <h4>前のトピックへ</h4> <p class="topless"><a href="../api.html" title="前の章へ">8.14. API</a></p> <h4>次のトピックへ</h4> <p class="topless"><a href="grn_expr.html" title="次の章へ">8.14.2. grn_expr</a></p> <h3>このページ</h3> <ul class="this-page-menu"> <li><a href="../../_sources/reference/api/grn_ctx.txt" rel="nofollow">ソースコードを表示</a></li> </ul> <div id="searchbox" style="display: none"> <h3>クイック検索</h3> <form class="search" action="../../search.html" method="get"> <input type="text" name="q" /> <input type="submit" value="検索" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> <p class="searchtip" style="font-size: 90%"> モジュール、クラス、または関数名を入力してください </p> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> </div> <div class="clearer"></div> </div> <div class="related"> <h3>ナビゲーション</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../../genindex.html" title="総合索引" >索引</a></li> <li class="right" > <a href="grn_expr.html" title="8.14.2. grn_expr" >次へ</a> |</li> <li class="right" > <a href="../api.html" title="8.14. API" >前へ</a> |</li> <li><a href="../../index.html">groonga v3.0.5ドキュメント</a> »</li> <li><a href="../../reference.html" >8. リファレンスマニュアル</a> »</li> <li><a href="../api.html" >8.14. API</a> »</li> </ul> </div> <div class="footer"> © Copyright 2009-2013, Brazil, Inc. </div> </body> </html>