| 1 | /* -*- c-basic-offset: 2 -*- */cxx . . $ `<file>/storage/mroonga/vendor/groonga/lib/grn_ctx_impl.h`/ |
| 2 | /* |
| 3 | Copyright(C) 2009-2016 Brazil |
| 4 | |
| 5 | This library is free software; you can redistribute it and/or |
| 6 | modify it under the terms of the GNU Lesser General Public |
| 7 | License version 2.1 as published by the Free Software Foundation. |
| 8 | |
| 9 | This library is distributed in the hope that it will be useful, |
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 | Lesser General Public License for more details. |
| 13 | |
| 14 | You should have received a copy of the GNU Lesser General Public |
| 15 | License along with this library; if not, write to the Free Software |
| 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA |
| 17 | */ |
| 18 | |
| 19 | #pragma once |
| 20 | |
| 21 | #ifndef GRN_CTX_H |
| 22 | # include "grn_ctx.h"cxx . . $ `<file>/storage/mroonga/vendor/groonga/lib/grn_ctx.h`/ |
| 23 | #endif /* GRN_CTX_H */ |
| 24 | |
| 25 | #ifndef GRN_COM_H |
| 26 | # include "grn_com.h"cxx . . $ `<file>/storage/mroonga/vendor/groonga/lib/grn_com.h`/ |
| 27 | #endif /* GRN_COM_H */ |
| 28 | |
| 29 | #include "grn_msgpack.h"cxx . . $ `<file>/storage/mroonga/vendor/groonga/lib/grn_msgpack.h`/ |
| 30 | |
| 31 | #ifdef GRN_WITH_MRUBY |
| 32 | # include <mruby.h> |
| 33 | #endif |
| 34 | |
| 35 | #ifdef __cplusplus |
| 36 | extern "C" { |
| 37 | #endif |
| 38 | |
| 39 | /**** grn_expr ****/ |
| 40 | |
| 41 | #define GRN_EXPR_MISSING_NAMEcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_ctx_impl.h:41:9`! "expr_missing" |
| 42 | |
| 43 | /**** grn_ctx_impl ****/ |
| 44 | |
| 45 | #define GRN_CTX_INITEDcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_ctx_impl.h:45:9`! 0x00 |
| 46 | #define GRN_CTX_QUITTINGcxx . . $ `storage/mroonga/vendor/groonga/lib/grn_ctx_impl.h:46:9`! 0x0f |
| 47 | |
| 48 | typedef enumcxx . . $ $anonymous_type_5741f6ac5d1b09ba_0# { |
| 49 | GRN_LOADER_BEGINcxx . . $ GRN_LOADER_BEGIN. = 0, |
| 50 | GRN_LOADER_TOKENcxx . . $ GRN_LOADER_TOKEN., |
| 51 | GRN_LOADER_STRINGcxx . . $ GRN_LOADER_STRING., |
| 52 | GRN_LOADER_SYMBOLcxx . . $ GRN_LOADER_SYMBOL., |
| 53 | GRN_LOADER_NUMBERcxx . . $ GRN_LOADER_NUMBER., |
| 54 | GRN_LOADER_STRING_ESCcxx . . $ GRN_LOADER_STRING_ESC., |
| 55 | GRN_LOADER_UNICODE0cxx . . $ GRN_LOADER_UNICODE0., |
| 56 | GRN_LOADER_UNICODE1cxx . . $ GRN_LOADER_UNICODE1., |
| 57 | GRN_LOADER_UNICODE2cxx . . $ GRN_LOADER_UNICODE2., |
| 58 | GRN_LOADER_UNICODE3cxx . . $ GRN_LOADER_UNICODE3., |
| 59 | GRN_LOADER_ENDcxx . . $ GRN_LOADER_END. |
| 60 | } grn_loader_statcxx . . $ grn_loader_stat#; |
| 61 | |
| 62 | /* |
| 63 | * Status of target columns used in Format 1. |
| 64 | * Target columns are specified via --columns or the first array in a Format 1 |
| 65 | * JSON object. |
| 66 | */ |
| 67 | typedef enumcxx . . $ $anonymous_type_5741f6ac5d1b09ba_1# { |
| 68 | GRN_LOADER_COLUMNS_UNSETcxx . . $ GRN_LOADER_COLUMNS_UNSET. = 0, /* Columns are not available. */ |
| 69 | GRN_LOADER_COLUMNS_SETcxx . . $ GRN_LOADER_COLUMNS_SET., /* Columns are available. */ |
| 70 | GRN_LOADER_COLUMNS_BROKENcxx . . $ GRN_LOADER_COLUMNS_BROKEN. /* Columns are specified but broken. */ |
| 71 | } grn_loader_columns_statuscxx . . $ grn_loader_columns_status#; |
| 72 | |
| 73 | typedef structcxx . . $ $anonymous_type_5741f6ac5d1b09ba_2# { |
| 74 | grn_objcxx . . $ grn_obj# valuescxx . . $ $anonymous_type_5741f6ac5d1b09ba_2#values.; |
| 75 | grn_objcxx . . $ grn_obj# levelcxx . . $ $anonymous_type_5741f6ac5d1b09ba_2#level.; |
| 76 | grn_objcxx . . $ grn_obj# columnscxx . . $ $anonymous_type_5741f6ac5d1b09ba_2#columns.; |
| 77 | grn_objcxx . . $ grn_obj# idscxx . . $ $anonymous_type_5741f6ac5d1b09ba_2#ids.; |
| 78 | grn_objcxx . . $ grn_obj# return_codescxx . . $ $anonymous_type_5741f6ac5d1b09ba_2#return_codes.; |
| 79 | grn_objcxx . . $ grn_obj# error_messagescxx . . $ $anonymous_type_5741f6ac5d1b09ba_2#error_messages.; |
| 80 | uint32_tcxx . . $ uint32_t# emit_levelcxx . . $ $anonymous_type_5741f6ac5d1b09ba_2#emit_level.; |
| 81 | int32_tcxx . . $ int32_t# id_offsetcxx . . $ $anonymous_type_5741f6ac5d1b09ba_2#id_offset.; /* Position of _id in values or -1 if _id is N/A. */ |
| 82 | int32_tcxx . . $ int32_t# key_offsetcxx . . $ $anonymous_type_5741f6ac5d1b09ba_2#key_offset.; /* Position of _key in values or -1 if _key is N/A. */ |
| 83 | grn_objcxx . . $ grn_obj# *tablecxx . . $ $anonymous_type_5741f6ac5d1b09ba_2#table.; |
| 84 | grn_objcxx . . $ grn_obj# *lastcxx . . $ $anonymous_type_5741f6ac5d1b09ba_2#last.; |
| 85 | grn_objcxx . . $ grn_obj# *ifexistscxx . . $ $anonymous_type_5741f6ac5d1b09ba_2#ifexists.; |
| 86 | grn_objcxx . . $ grn_obj# *eachcxx . . $ $anonymous_type_5741f6ac5d1b09ba_2#each.; |
| 87 | uint32_tcxx . . $ uint32_t# unicharcxx . . $ $anonymous_type_5741f6ac5d1b09ba_2#unichar.; |
| 88 | uint32_tcxx . . $ uint32_t# values_sizecxx . . $ $anonymous_type_5741f6ac5d1b09ba_2#values_size.; |
| 89 | uint32_tcxx . . $ uint32_t# nrecordscxx . . $ $anonymous_type_5741f6ac5d1b09ba_2#nrecords.; |
| 90 | grn_loader_statcxx . . $ grn_loader_stat# statcxx . . $ $anonymous_type_5741f6ac5d1b09ba_2#stat.; |
| 91 | grn_content_typecxx . . $ grn_content_type# input_typecxx . . $ $anonymous_type_5741f6ac5d1b09ba_2#input_type.; |
| 92 | grn_loader_columns_statuscxx . . $ grn_loader_columns_status# columns_statuscxx . . $ $anonymous_type_5741f6ac5d1b09ba_2#columns_status.; |
| 93 | grn_rccxx . . $ grn_rc# rccxx . . $ $anonymous_type_5741f6ac5d1b09ba_2#rc.; |
| 94 | char errbufcxx . . $ $anonymous_type_5741f6ac5d1b09ba_2#errbuf.[GRN_CTX_MSGSIZEcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:204:9`!]; |
| 95 | grn_boolcxx . . $ grn_bool# output_idscxx . . $ $anonymous_type_5741f6ac5d1b09ba_2#output_ids.; |
| 96 | grn_boolcxx . . $ grn_bool# output_errorscxx . . $ $anonymous_type_5741f6ac5d1b09ba_2#output_errors.; |
| 97 | } grn_loadercxx . . $ grn_loader#; |
| 98 | |
| 99 | #define GRN_CTX_N_SEGMENTScxx . . $ `storage/mroonga/vendor/groonga/lib/grn_ctx_impl.h:99:9`! 512 |
| 100 | |
| 101 | #ifdef USE_MEMORY_DEBUG |
| 102 | typedef struct _grn_alloc_info grn_alloc_info; |
| 103 | struct _grn_alloc_info |
| 104 | { |
| 105 | void *address; |
| 106 | int freed; |
| 107 | size_t size; |
| 108 | char alloc_backtrace[4096]; |
| 109 | char free_backtrace[4096]; |
| 110 | char *file; |
| 111 | int line; |
| 112 | char *func; |
| 113 | grn_alloc_info *next; |
| 114 | }; |
| 115 | #endif |
| 116 | |
| 117 | typedef struct _grn_mrb_datacxx . . $ _grn_mrb_data# grn_mrb_datacxx . . $ grn_mrb_data#; |
| 118 | struct _grn_mrb_datacxx . . $ _grn_mrb_data# { |
| 119 | grn_boolcxx . . $ grn_bool# initializedcxx . . $ _grn_mrb_data#initialized.; |
| 120 | #ifdef GRN_WITH_MRUBY |
| 121 | mrb_state *state; |
| 122 | char base_directory[PATH_MAX]; |
| 123 | struct RClass *module; |
| 124 | struct RClass *object_class; |
| 125 | grn_hash *checked_procs; |
| 126 | grn_hash *registered_plugins; |
| 127 | struct { |
| 128 | grn_obj from; |
| 129 | grn_obj to; |
| 130 | } buffer; |
| 131 | struct { |
| 132 | struct RClass *time_class; |
| 133 | } builtin; |
| 134 | struct { |
| 135 | struct RClass *operator_class; |
| 136 | } groonga; |
| 137 | #endif |
| 138 | }; |
| 139 | |
| 140 | struct _grn_ctx_implcxx . . $ _grn_ctx_impl# { |
| 141 | grn_encodingcxx . . $ grn_encoding# encodingcxx . . $ _grn_ctx_impl#encoding.; |
| 142 | |
| 143 | /* memory pool portion */ |
| 144 | int32_tcxx . . $ int32_t# lifosegcxx . . $ _grn_ctx_impl#lifoseg.; |
| 145 | int32_tcxx . . $ int32_t# currsegcxx . . $ _grn_ctx_impl#currseg.; |
| 146 | grn_critical_sectioncxx . . $ grn_critical_section# lockcxx . . $ _grn_ctx_impl#lock.; |
| 147 | grn_io_mapinfocxx . . $ grn_io_mapinfo# segscxx . . $ _grn_ctx_impl#segs.[GRN_CTX_N_SEGMENTScxx . . $ `storage/mroonga/vendor/groonga/lib/grn_ctx_impl.h:99:9`!]; |
| 148 | |
| 149 | #ifdef USE_DYNAMIC_MALLOC_CHANGE |
| 150 | /* memory allocation portion */ |
| 151 | grn_malloc_func malloc_func; |
| 152 | grn_calloc_func calloc_func; |
| 153 | grn_realloc_func realloc_func; |
| 154 | grn_strdup_func strdup_func; |
| 155 | grn_free_func free_func; |
| 156 | #endif |
| 157 | |
| 158 | #ifdef USE_MEMORY_DEBUG |
| 159 | /* memory debug portion */ |
| 160 | grn_alloc_info *alloc_info; |
| 161 | #endif |
| 162 | |
| 163 | /* expression portion */ |
| 164 | grn_objcxx . . $ grn_obj# *stackcxx . . $ _grn_ctx_impl#stack.[GRN_STACK_SIZEcxx . . $ `build/storage/mroonga/vendor/groonga/config.h:32:9`!]; |
| 165 | uint32_tcxx . . $ uint32_t# stack_currcxx . . $ _grn_ctx_impl#stack_curr.; |
| 166 | grn_hashcxx . . $ grn_hash# *expr_varscxx . . $ _grn_ctx_impl#expr_vars.; |
| 167 | grn_objcxx . . $ grn_obj# *curr_exprcxx . . $ _grn_ctx_impl#curr_expr.; |
| 168 | grn_objcxx . . $ grn_obj# current_request_idcxx . . $ _grn_ctx_impl#current_request_id.; |
| 169 | void *current_request_timer_idcxx . . $ _grn_ctx_impl#current_request_timer_id.; |
| 170 | void *parsercxx . . $ _grn_ctx_impl#parser.; |
| 171 | grn_timevalcxx . . $ grn_timeval# tvcxx . . $ _grn_ctx_impl#tv.; |
| 172 | |
| 173 | /* loader portion */ |
| 174 | grn_edgecxx . . $ grn_edge# *edgecxx . . $ _grn_ctx_impl#edge.; |
| 175 | grn_loadercxx . . $ grn_loader# loadercxx . . $ _grn_ctx_impl#loader.; |
| 176 | |
| 177 | /* plugin portion */ |
| 178 | const char *plugin_pathcxx . . $ _grn_ctx_impl#plugin_path.; |
| 179 | |
| 180 | /* output portion */ |
| 181 | structcxx . . $ _grn_ctx_impl#$anonymous_type_3# { |
| 182 | grn_objcxx . . $ grn_obj# *bufcxx . . $ _grn_ctx_impl#$anonymous_type_3#buf.; |
| 183 | void (*funccxx . . $ _grn_ctx_impl#$anonymous_type_3#func.)(grn_ctxcxx . . $ grn_ctx# *, int, void *); |
| 184 | unioncxx . . $ _grn_ctx_impl#$anonymous_type_3#$anonymous_type_4# { |
| 185 | void *ptrcxx . . $ _grn_ctx_impl#$anonymous_type_3#$anonymous_type_4#ptr.; |
| 186 | int fdcxx . . $ _grn_ctx_impl#$anonymous_type_3#$anonymous_type_4#fd.; |
| 187 | uint32_tcxx . . $ uint32_t# u32cxx . . $ _grn_ctx_impl#$anonymous_type_3#$anonymous_type_4#u32.; |
| 188 | uint64_tcxx . . $ uint64_t# u64cxx . . $ _grn_ctx_impl#$anonymous_type_3#$anonymous_type_4#u64.; |
| 189 | } datacxx . . $ _grn_ctx_impl#$anonymous_type_3#data.; |
| 190 | grn_content_typecxx . . $ grn_content_type# typecxx . . $ _grn_ctx_impl#$anonymous_type_3#type.; |
| 191 | const char *mime_typecxx . . $ _grn_ctx_impl#$anonymous_type_3#mime_type.; |
| 192 | grn_boolcxx . . $ grn_bool# is_prettycxx . . $ _grn_ctx_impl#$anonymous_type_3#is_pretty.; |
| 193 | grn_objcxx . . $ grn_obj# namescxx . . $ _grn_ctx_impl#$anonymous_type_3#names.; |
| 194 | grn_objcxx . . $ grn_obj# levelscxx . . $ _grn_ctx_impl#$anonymous_type_3#levels.; |
| 195 | #ifdef GRN_WITH_MESSAGE_PACK |
| 196 | msgpack_packer msgpacker; |
| 197 | #endif |
| 198 | } outputcxx . . $ _grn_ctx_impl#output.; |
| 199 | |
| 200 | structcxx . . $ _grn_ctx_impl#$anonymous_type_5# { |
| 201 | int flagscxx . . $ _grn_ctx_impl#$anonymous_type_5#flags.; |
| 202 | grn_command_versioncxx . . $ grn_command_version# versioncxx . . $ _grn_ctx_impl#$anonymous_type_5#version.; |
| 203 | structcxx . . $ _grn_ctx_impl#$anonymous_type_5#$anonymous_type_6# { |
| 204 | grn_objcxx . . $ grn_obj# *commandcxx . . $ _grn_ctx_impl#$anonymous_type_5#$anonymous_type_6#command.; |
| 205 | grn_command_versioncxx . . $ grn_command_version# versioncxx . . $ _grn_ctx_impl#$anonymous_type_5#$anonymous_type_6#version.; |
| 206 | } keepcxx . . $ _grn_ctx_impl#$anonymous_type_5#keep.; |
| 207 | } commandcxx . . $ _grn_ctx_impl#command.; |
| 208 | |
| 209 | /* match escalation portion */ |
| 210 | int64_tcxx . . $ int64_t# match_escalation_thresholdcxx . . $ _grn_ctx_impl#match_escalation_threshold.; |
| 211 | |
| 212 | /* lifetime portion */ |
| 213 | grn_proc_funccxx . . $ grn_proc_func# *finalizercxx . . $ _grn_ctx_impl#finalizer.; |
| 214 | |
| 215 | grn_objcxx . . $ grn_obj# *dbcxx . . $ _grn_ctx_impl#db.; |
| 216 | grn_arraycxx . . $ grn_array# *valuescxx . . $ _grn_ctx_impl#values.; /* temporary objects */ |
| 217 | grn_patcxx . . $ grn_pat# *temporary_columnscxx . . $ _grn_ctx_impl#temporary_columns.; |
| 218 | grn_hashcxx . . $ grn_hash# *ioscxx . . $ _grn_ctx_impl#ios.; /* IOs */ |
| 219 | grn_comcxx . . $ grn_com# *comcxx . . $ _grn_ctx_impl#com.; |
| 220 | unsigned int com_statuscxx . . $ _grn_ctx_impl#com_status.; |
| 221 | |
| 222 | grn_objcxx . . $ grn_obj# query_log_bufcxx . . $ _grn_ctx_impl#query_log_buf.; |
| 223 | |
| 224 | char previous_errbufcxx . . $ _grn_ctx_impl#previous_errbuf.[GRN_CTX_MSGSIZEcxx . . $ `storage/mroonga/vendor/groonga/include/groonga/groonga.h:204:9`!]; |
| 225 | unsigned int n_same_error_messagescxx . . $ _grn_ctx_impl#n_same_error_messages.; |
| 226 | |
| 227 | grn_mrb_datacxx . . $ grn_mrb_data# mrbcxx . . $ _grn_ctx_impl#mrb.; |
| 228 | |
| 229 | structcxx . . $ _grn_ctx_impl#$anonymous_type_7# { |
| 230 | grn_objcxx . . $ grn_obj# stackcxx . . $ _grn_ctx_impl#$anonymous_type_7#stack.; |
| 231 | grn_objcxx . . $ grn_obj# *currentcxx . . $ _grn_ctx_impl#$anonymous_type_7#current.; |
| 232 | } temporary_open_spacescxx . . $ _grn_ctx_impl#temporary_open_spaces.; |
| 233 | }; |
| 234 | |
| 235 | #ifdef __cplusplus |
| 236 | } |
| 237 | #endif |