Skip to content

Commit

Permalink
Start moving documents in Japanese in .h to doc/source/
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed May 9, 2013
1 parent bded90a commit 369f407
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 9 deletions.
2 changes: 2 additions & 0 deletions doc/files.am
Expand Up @@ -336,6 +336,7 @@ absolute_source_files = \
$(top_srcdir)/doc/source/rdoc.py \
$(top_srcdir)/doc/source/reference.txt \
$(top_srcdir)/doc/source/reference/api.txt \
$(top_srcdir)/doc/source/reference/api/grn_ctx.txt \
$(top_srcdir)/doc/source/reference/api/grn_expr.txt \
$(top_srcdir)/doc/source/reference/cast.txt \
$(top_srcdir)/doc/source/reference/command.txt \
Expand Down Expand Up @@ -784,6 +785,7 @@ source_files_relative_from_doc_dir = \
source/rdoc.py \
source/reference.txt \
source/reference/api.txt \
source/reference/api/grn_ctx.txt \
source/reference/api/grn_expr.txt \
source/reference/cast.txt \
source/reference/command.txt \
Expand Down
9 changes: 8 additions & 1 deletion doc/source/reference/api.txt
Expand Up @@ -5,4 +5,11 @@
API
===

TODO...
Groonga can be used as a fulltext search library. This section
describes APIs that are provided by groonga.

.. toctree::
:maxdepth: 1
:glob:

api/*
49 changes: 49 additions & 0 deletions doc/source/reference/api/grn_ctx.txt
@@ -0,0 +1,49 @@
.. -*- rst -*-
.. highlightlang:: none

``grn_ctx``
===========

Summary
-------

:c:type:`grn_ctx` is the most important object. :c:type:`grn_ctx`
keeps the current infomation such as:

* The last occurred error.
* The current encoding.
* The default thresholds. (e.g. :ref:`match-escalation-threshold`)
* The default command version. (See :doc:`/reference/command/command_version`)

:c:type:`grn_ctx` provides platform features such as:

* Memory management.
* Logging.

Most APIs receive :c:type:`grn_ctx` as the first argument.

You can't use the same :c:type:`grn_ctx` from two or more threads. You
need to create a :c:type:`grn_ctx` for a thread. You can use two or
more :c:type:`grn_ctx` in a thread but it is not needed for usual
use-case.

Example
-------

TODO...

Reference
---------

.. c:type:: grn_ctx
TODO...

.. c:function:: grn_rc grn_ctx_init(grn_ctx *ctx, int flags)
ctxを初期化します。
:param ctx: 初期化するctx構造体へのポインタを指定します。
:param flags: 初期化する ``ctx`` のオプションを指定します。
:return: ``GRN_SUCCESS`` on success, not ``GRN_SUCCESS`` on error.
8 changes: 0 additions & 8 deletions include/groonga.h
Expand Up @@ -215,14 +215,6 @@ struct _grn_ctx {

#define GRN_CTX_USER_DATA(ctx) (&((ctx)->user_data))

/**
* grn_ctx_init:
* @ctx: 初期化するctx構造体へのポインタを指定します。
* @flags: 初期化するctxのオプションを指定します。
*
* ctxを初期化します。
**/

#define GRN_CTX_USE_QL (0x03)
#define GRN_CTX_BATCH_MODE (0x04)
#define GRN_CTX_PER_DB (0x08)
Expand Down

0 comments on commit 369f407

Please sign in to comment.