Groonga 3.0.9 Source Code Document
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Macros | Enumerations | Functions
output.c File Reference
#include "groonga_in.h"
#include <string.h>
#include "str.h"
#include "db.h"
#include "util.h"
#include "output.h"
Include dependency graph for output.c:

Go to the source code of this file.

Macros

#define LEVELS   (&ctx->impl->levels)
#define DEPTH   (GRN_BULK_VSIZE(LEVELS)>>2)
#define CURR_LEVEL   (DEPTH ? (GRN_UINT32_VALUE_AT(LEVELS, (DEPTH - 1))) : 0)
#define INCR_DEPTH(i)   GRN_UINT32_PUT(ctx, LEVELS, i)
#define DECR_DEPTH   (DEPTH ? grn_bulk_truncate(ctx, LEVELS, GRN_BULK_VSIZE(LEVELS) - sizeof(uint32_t)) : 0)
#define INCR_LENGTH   (DEPTH ? (GRN_UINT32_VALUE_AT(LEVELS, (DEPTH - 1)) += 2) : 0)
#define EQUAL_NAME_P(_name)
#define DEFAULT_LIMIT   10
#define JSON_CALLBACK_PARAM   "callback"

Enumerations

enum  xml_status { XML_START, XML_START_ELEMENT, XML_END_ELEMENT, XML_TEXT }
enum  xml_place { XML_PLACE_NONE, XML_PLACE_COLUMN, XML_PLACE_HIT }

Functions

void grn_output_array_open (grn_ctx *ctx, grn_obj *outbuf, grn_content_type output_type, const char *name, int nelements)
void grn_output_array_close (grn_ctx *ctx, grn_obj *outbuf, grn_content_type output_type)
void grn_output_map_open (grn_ctx *ctx, grn_obj *outbuf, grn_content_type output_type, const char *name, int nelements)
void grn_output_map_close (grn_ctx *ctx, grn_obj *outbuf, grn_content_type output_type)
void grn_output_int32 (grn_ctx *ctx, grn_obj *outbuf, grn_content_type output_type, int value)
void grn_output_int64 (grn_ctx *ctx, grn_obj *outbuf, grn_content_type output_type, int64_t value)
void grn_output_uint64 (grn_ctx *ctx, grn_obj *outbuf, grn_content_type output_type, int64_t value)
void grn_output_float (grn_ctx *ctx, grn_obj *outbuf, grn_content_type output_type, double value)
void grn_output_str (grn_ctx *ctx, grn_obj *outbuf, grn_content_type output_type, const char *value, size_t value_len)
void grn_output_cstr (grn_ctx *ctx, grn_obj *outbuf, grn_content_type output_type, const char *value)
void grn_output_bool (grn_ctx *ctx, grn_obj *outbuf, grn_content_type output_type, grn_bool value)
void grn_output_time (grn_ctx *ctx, grn_obj *outbuf, grn_content_type output_type, int64_t value)
void grn_output_geo_point (grn_ctx *ctx, grn_obj *outbuf, grn_content_type output_type, grn_geo_point *value)
void grn_output_obj (grn_ctx *ctx, grn_obj *outbuf, grn_content_type output_type, grn_obj *obj, grn_obj_format *format)
void grn_output_envelope (grn_ctx *ctx, grn_rc rc, grn_obj *head, grn_obj *body, grn_obj *foot, const char *file, int line)

Macro Definition Documentation

#define CURR_LEVEL   (DEPTH ? (GRN_UINT32_VALUE_AT(LEVELS, (DEPTH - 1))) : 0)

Definition at line 30 of file output.c.

#define DECR_DEPTH   (DEPTH ? grn_bulk_truncate(ctx, LEVELS, GRN_BULK_VSIZE(LEVELS) - sizeof(uint32_t)) : 0)

Definition at line 32 of file output.c.

#define DEFAULT_LIMIT   10
#define DEPTH   (GRN_BULK_VSIZE(LEVELS)>>2)

Definition at line 29 of file output.c.

#define EQUAL_NAME_P (   _name)
Value:
(GRN_TEXT_LEN(&name) == strlen(_name) && \
!memcmp(GRN_TEXT_VALUE(&name), _name, strlen(_name)))
#define INCR_DEPTH (   i)    GRN_UINT32_PUT(ctx, LEVELS, i)

Definition at line 31 of file output.c.

#define INCR_LENGTH   (DEPTH ? (GRN_UINT32_VALUE_AT(LEVELS, (DEPTH - 1)) += 2) : 0)

Definition at line 33 of file output.c.

#define JSON_CALLBACK_PARAM   "callback"

Definition at line 1576 of file output.c.

#define LEVELS   (&ctx->impl->levels)

Definition at line 28 of file output.c.

Enumeration Type Documentation

enum xml_place
Enumerator:
XML_PLACE_NONE 
XML_PLACE_COLUMN 
XML_PLACE_HIT 

Definition at line 1323 of file output.c.

enum xml_status
Enumerator:
XML_START 
XML_START_ELEMENT 
XML_END_ELEMENT 
XML_TEXT 

Definition at line 1316 of file output.c.

Function Documentation

void grn_output_array_close ( grn_ctx ctx,
grn_obj outbuf,
grn_content_type  output_type 
)

Definition at line 100 of file output.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void grn_output_array_open ( grn_ctx ctx,
grn_obj outbuf,
grn_content_type  output_type,
const char *  name,
int  nelements 
)

Definition at line 65 of file output.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void grn_output_bool ( grn_ctx ctx,
grn_obj outbuf,
grn_content_type  output_type,
grn_bool  value 
)

Definition at line 343 of file output.c.

Here is the caller graph for this function:

void grn_output_cstr ( grn_ctx ctx,
grn_obj outbuf,
grn_content_type  output_type,
const char *  value 
)

Definition at line 336 of file output.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void grn_output_envelope ( grn_ctx ctx,
grn_rc  rc,
grn_obj head,
grn_obj body,
grn_obj foot,
const char *  file,
int  line 
)

Definition at line 1579 of file output.c.

Here is the call graph for this function:

void grn_output_float ( grn_ctx ctx,
grn_obj outbuf,
grn_content_type  output_type,
double  value 
)

Definition at line 280 of file output.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void grn_output_geo_point ( grn_ctx ctx,
grn_obj outbuf,
grn_content_type  output_type,
grn_geo_point value 
)

Definition at line 438 of file output.c.

Here is the call graph for this function:

void grn_output_int32 ( grn_ctx ctx,
grn_obj outbuf,
grn_content_type  output_type,
int  value 
)

Definition at line 199 of file output.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void grn_output_int64 ( grn_ctx ctx,
grn_obj outbuf,
grn_content_type  output_type,
int64_t  value 
)

Definition at line 226 of file output.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void grn_output_map_close ( grn_ctx ctx,
grn_obj outbuf,
grn_content_type  output_type 
)

Definition at line 167 of file output.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void grn_output_map_open ( grn_ctx ctx,
grn_obj outbuf,
grn_content_type  output_type,
const char *  name,
int  nelements 
)

Definition at line 132 of file output.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void grn_output_obj ( grn_ctx ctx,
grn_obj outbuf,
grn_content_type  output_type,
grn_obj obj,
grn_obj_format format 
)

Definition at line 1286 of file output.c.

Here is the caller graph for this function:

void grn_output_str ( grn_ctx ctx,
grn_obj outbuf,
grn_content_type  output_type,
const char *  value,
size_t  value_len 
)

Definition at line 307 of file output.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void grn_output_time ( grn_ctx ctx,
grn_obj outbuf,
grn_content_type  output_type,
int64_t  value 
)

Definition at line 409 of file output.c.

Here is the call graph for this function:

void grn_output_uint64 ( grn_ctx ctx,
grn_obj outbuf,
grn_content_type  output_type,
int64_t  value 
)

Definition at line 253 of file output.c.

Here is the call graph for this function: