⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mcowrap.h

📁 PB 熟悉的哥们希望大家可以互相学习一下
💻 H
📖 第 1 页 / 共 3 页
字号:
            uint2 n_class_codes; /**< class_codes start from 1. n_class_codes == last_classcode */
            uint2 n_list_indexes; /**< information only */
            uint2 n_autoid_indexes; /**< information only */
            uint2 n_history_indexes; /**< information only */
            uint2 max_numof_indexes_per_obj; /**< for rollback segment estimation */
            uint2 n_structs; /**< length of v_all_struct */
            uint4 num_oid_estimation;
            uint4 num_HA_estimation; /**< 0 if not HA mode */
            uint2 n_desc_indexes; /**< numbered starting from 0 */
            uint2 n_desc_events;

            uint2 exact_OID_sizeof;
            uint2 layout_OID_size;

            mco_dict_class_info_t* v_class_info;
            mco_dict_index_t* v_desc_indexes; /**< index descriptors */
            mco_dict_event_t* v_desc_events;
            mco_dict_struct_t* v_all_struct;

        } mco_dictionary_t, *mco_dict_h;


        #ifdef MCO_NO_FORWARDS

            typedef void* mco_objhandle_h;

        #else 

            struct mco_objhandle_t_;
            typedef struct mco_objhandle_t_* mco_objhandle_h;

        #endif 



        typedef struct mco_external_field_t_
        {
            uint1 field_type; /**< MCO_DB_FLDTYPE_E */
            uint2 bit_len; /* field's len in bits, used with patricia index on scalar datatypes */
            uint2 bit_shift; /* field's shift in bits, used with patricia index on scalar and bool datatypes */

            union
            {
                uint1 u1;
                uint2 u2;
                uint4 u4;
                int1 i1;
                int2 i2;
                int4 i4;
                uint2 ptr_size;

                #ifdef MCO_TARGET_FLOAT_SUPPORTED
                    float flt;
                #endif 

                #ifdef MCO_TARGET_DOUBLE_SUPPORTED
                    double dbl;
                #endif 
                int8 i8;
                uint8 u8;
                char none[8];

            } v;
            const char* ptr;
        }
        mco_external_field_t, *mco_external_field_h;


        /** external key for search, used as mco_abstractkey_external_h */
        typedef mco_external_field_t* mco_external_key_h;

        typedef struct mco_pattern_policy_t_
        {
            char ignore_other_fields;
            char any_char;
            char one_char;
            nchar_t any_nchar;
            nchar_t one_nchar;
            #ifdef MCO_CFG_WCHAR_SUPPORT 
                wchar_t any_wchar;
                wchar_t one_wchar;
            #endif 

        } mco_pattern_policy_t;


        MCO_RET mco_w_new_obj_noid(mco_trans_h t, uint4 init_size, uint2 class_code, mco_objhandle_h hret);
        MCO_RET mco_w_new_obj_noid_ev(mco_trans_h t, uint4 init_size, uint2 class_code, mco_objhandle_h hret, uint2
                                      ev_id);
        MCO_RET mco_w_new_obj_oid(mco_trans_h t, uint4 init_size, uint2 class_code, const void* oid, uint2 oid_sizeof,
                                  mco_objhandle_h ret);
        MCO_RET mco_w_new_obj_oid_ev(mco_trans_h t, uint4 init_size, uint2 class_code, const void* oid, uint2
                                     oid_sizeof, mco_objhandle_h ret, uint2 ev_id);
        MCO_RET mco_w_obj_delete_all(mco_trans_h t, uint2 class_code);
        MCO_RET mco_w_obj_delete_all_ev(mco_trans_h t, uint2 class_code, uint2 ev_id);
        MCO_RET mco_w_obj_delete(mco_objhandle_h obj);
        MCO_RET mco_w_obj_delete_ev(mco_objhandle_h obj, uint2 ev_id);
        MCO_RET mco_w_obj_checkpoint(mco_objhandle_h obj);
        MCO_RET mco_w_oid_get(mco_objhandle_h obj, void* oid, uint2 oid_sizeof);
        MCO_RET mco_w_find_byoid(mco_trans_h t, const void* oid, mco_objhandle_h hret, uint2 class_code); /**<
                                 class_code ignored if 0 */
        MCO_RET mco_w_obj_del_byoid(mco_trans_h t, const void* oid);
        MCO_RET mco_w_classcode_byoid(mco_trans_h t, const void* oid, uint2* ret);

        MCO_RET mco_w_cursor_get_index(mco_cursor_h c, uint2* index);
        MCO_RET mco_w_cursor_locate(mco_trans_h t, uint2 index_code, mco_objhandle_h obj, mco_cursor_h c);
        MCO_RET mco_w_cursor_compare(mco_trans_h t, mco_cursor_h c, mco_external_key_h ek, int* result);
        MCO_RET mco_patricia_next_match(mco_trans_h t, mco_cursor_h c, mco_external_key_h ek);

        MCO_RET mco_w_hash_find_scalar(mco_trans_h t, uint2 index_code, mco_external_key_h ek, mco_objhandle_h ret);
        MCO_RET mco_w_hash_find_vect(mco_trans_h t, uint2 index_code, mco_external_key_h ek, mco_objhandle_h ret,
                                     uint2* element_index);

        MCO_RET mco_w_tree_find_scalar(mco_trans_h t, uint2 index_code, mco_external_key_h ek, mco_objhandle_h ret);
        MCO_RET mco_w_tree_find_vect(mco_trans_h t, uint2 index_code, mco_external_key_h ek, mco_objhandle_h ret,
                                     uint2* element_index);

        MCO_RET mco_w_obj_from_cursor(mco_trans_h t, mco_cursor_h c, uint2 class_code, mco_objhandle_h obj);
        MCO_RET mco_w_list_cursor(mco_trans_h t, uint2 class_code, mco_cursor_h c);
        MCO_RET mco_w_index_cursor(mco_trans_h t, uint2 index_code, mco_cursor_h c);

        MCO_RET mco_w_version_next(mco_objhandle_h h, mco_objhandle_h res, uint2 index_code);
        MCO_RET mco_w_version_prev(mco_objhandle_h h, mco_objhandle_h res, uint2 index_code);

        MCO_RET mco_w_vector_size_get2(mco_objhandle_h obj, mco_obj_offset fld_u_offset, mco_obj_offset fld_c_offset,
                                       uint2* result);

        MCO_RET mco_w_v_struct_size_put2(mco_objhandle_h obj, mco_obj_offset fld_u_offset, mco_obj_offset fld_c_offset,
                                         uint2 length, int2 indexaware);
        MCO_RET mco_w_v_struct_e_erase2(mco_objhandle_h obj, mco_obj_offset fld_u_offset, mco_obj_offset fld_c_offset,
                                        uint2 index, int2 indexaware);
        MCO_RET mco_w_v_struct_e_put2(mco_objhandle_h obj, mco_obj_offset fld_u_offset, mco_obj_offset fld_c_offset,
                                      mco_objhandle_h ret, uint2 index, uint2 s_u_sz, uint2 s_c_sz, uint2 u_align,
                                      uint2 c_align, int2 indexaware);
        MCO_RET mco_w_v_struct_e_get2(mco_objhandle_h obj, mco_obj_offset fld_u_offset, mco_obj_offset fld_c_offset,
                                      mco_objhandle_h ret, uint2 index);

        MCO_RET mco_w_v_chars_size_put2(mco_objhandle_h obj, mco_obj_offset fld_u_offset, mco_obj_offset fld_c_offset,
                                        uint2 length, uint2 elsize, int2 indexaware);
        MCO_RET mco_w_v_chars_e_get2(mco_objhandle_h obj, mco_obj_offset fld_u_offset, mco_obj_offset fld_c_offset,
                                     uint2 index, uint2 el_size, char* dest, uint2 destsz);
        MCO_RET mco_w_v_chars_e_put2(mco_objhandle_h obj, mco_obj_offset fld_u_offset, mco_obj_offset fld_c_offset,
                                     uint2 index, uint2 el_size, const char* src, uint2 srcsz, int2 indexaware);

        MCO_RET mco_w_v_simple_size_put2(mco_objhandle_h obj, mco_obj_offset fld_u_offset, mco_obj_offset fld_c_offset,
                                         uint2 length, uint2 elsize, int2 indexaware);
        MCO_RET mco_w_v_simple_e_get2(mco_objhandle_h obj, mco_obj_offset fld_u_offset, mco_obj_offset fld_c_offset,
                                      uint2 index, uint2 elsize, void* dest);
        MCO_RET mco_w_v_simple_e_getrange2(mco_objhandle_h obj, mco_obj_offset fld_u_offset, mco_obj_offset
                                           fld_c_offset, uint2 startindex, uint2 elsize, uint2 numof_els, void* dest,
                                           short is_enum);
        MCO_RET mco_w_v_simple_e_put2(mco_objhandle_h obj, mco_obj_offset fld_u_offset, mco_obj_offset fld_c_offset,
                                      uint2 index, uint2 elsize, int2 indexaware, const void* from);
        MCO_RET mco_w_v_simple_e_putrange2(mco_objhandle_h obj, mco_obj_offset fld_u_offset, mco_obj_offset
                                           fld_c_offset, uint2 startindex, uint2 elsize, uint2 numof_els, int2
                                           indexaware, const void* pfrom, short is_enum);

        MCO_RET mco_w_v_bit_size_put2(mco_objhandle_h obj, mco_obj_offset fld_u_offset, mco_obj_offset fld_c_offset,
                                      uint2 length);
        MCO_RET mco_w_v_bit_e_get2(mco_objhandle_h obj, mco_obj_offset fld_u_offset, mco_obj_offset fld_c_offset, uint2
                                   index, void* dest);
        MCO_RET mco_w_v_bit_e_getrange2(mco_objhandle_h obj, mco_obj_offset fld_u_offset, mco_obj_offset fld_c_offset,
                                        uint2 startindex, uint2 numof_els, void* dest);
        MCO_RET mco_w_v_bit_e_put2(mco_objhandle_h obj, mco_obj_offset fld_u_offset, mco_obj_offset fld_c_offset, uint2
                                   index, int2 indexaware, const void* from);
        MCO_RET mco_w_v_bit_e_putrange2(mco_objhandle_h obj, mco_obj_offset fld_u_offset, mco_obj_offset fld_c_offset,
                                        uint2 startindex, uint2 numof_els, int2 indexaware, const void* pfrom);

        MCO_RET mco_w_v_string_size_put2(mco_objhandle_h obj, mco_obj_offset fld_u_offset, mco_obj_offset fld_c_offset,
                                         uint2 length, int2 indexaware);
        MCO_RET mco_w_v_string_e_get_len2(mco_objhandle_h obj, mco_obj_offset fld_u_offset, mco_obj_offset fld_c_offset,
                                          uint2 index, uint2* retlen);
        MCO_RET mco_w_v_string_e_get2(mco_objhandle_h obj, mco_obj_offset fld_u_offset, mco_obj_offset fld_c_offset,
                                      uint2 index, char* dest, uint2 destsz, uint2* retlen);
        MCO_RET mco_w_v_string_e_put2(mco_objhandle_h obj, mco_obj_offset fld_u_offset, mco_obj_offset fld_c_offset,
                                      uint2 index, const char* src, uint2 srcsz, int2 indexaware);

        MCO_RET mco_w_v_nchars_size_put2(mco_objhandle_h obj, mco_obj_offset fld_u_offset, mco_obj_offset fld_c_offset,
                                         uint2 length, uint2 elsize, int2 indexaware);
        MCO_RET mco_w_v_nchars_e_get2(mco_objhandle_h obj, mco_obj_offset fld_u_offset, mco_obj_offset fld_c_offset,
                                      uint2 index, uint2 el_size, nchar_t* dest, uint2 destsz);
        MCO_RET mco_w_v_nchars_e_put2(mco_objhandle_h obj, mco_obj_offset fld_u_offset, mco_obj_offset fld_c_offset,
                                      uint2 index, uint2 el_size, const nchar_t* src, uint2 srcsz, int2 indexaware);

        MCO_RET mco_w_v_nstring_size_put2(mco_objhandle_h obj, mco_obj_offset fld_u_offset, mco_obj_offset fld_c_offset,
                                          uint2 length, int2 indexaware);
        MCO_RET mco_w_v_nstring_e_get_len2(mco_objhandle_h obj, mco_obj_offset fld_u_offset, mco_obj_offset
                                           fld_c_offset, uint2 index, uint2* retlen);
        MCO_RET mco_w_v_nstring_e_get2(mco_objhandle_h obj, mco_obj_offset fld_u_offset, mco_obj_offset fld_c_offset,
                                       uint2 index, nchar_t* dest, uint2 destsz, uint2* retlen);
        MCO_RET mco_w_v_nstring_e_put2(mco_objhandle_h obj, mco_obj_offset fld_u_offset, mco_obj_offset fld_c_offset,
                                       uint2 index, const nchar_t* src, uint2 srcsz, int2 indexaware);

        #ifdef MCO_CFG_WCHAR_SUPPORT
            MCO_RET mco_w_v_wchars_size_put2(mco_objhandle_h obj, mco_obj_offset fld_u_offset, mco_obj_offset
                                             fld_c_offset, uint2 length, uint2 elsize, int2 indexaware);
            MCO_RET mco_w_v_wchars_e_get2(mco_objhandle_h obj, mco_obj_offset fld_u_offset, mco_obj_offset fld_c_offset,
                                          uint2 index, uint2 el_size, wchar_t* dest, uint2 destsz);
            MCO_RET mco_w_v_wchars_e_put2(mco_objhandle_h obj, mco_obj_offset fld_u_offset, mco_obj_offset fld_c_offset,
                                          uint2 index, uint2 el_size, const wchar_t* src, uint2 srcsz, int2 indexaware);

            MCO_RET mco_w_v_wstring_size_put2(mco_objhandle_h obj, mco_obj_offset fld_u_offset, mco_obj_offset
                                              fld_c_offset, uint2 length, int2 indexaware);
            MCO_RET mco_w_v_wstring_e_get_len2(mco_objhandle_h obj, mco_obj_offset fld_u_offset, mco_obj_offset
                                               fld_c_offset, uint2 index, uint2* retlen);
            MCO_RET mco_w_v_wstring_e_get2(mco_objhandle_h obj, mco_obj_offset fld_u_offset, mco_obj_offset
                                           fld_c_offset, uint2 index, wchar_t* dest, uint2 destsz, uint2* retlen);
            MCO_RET mco_w_v_wstring_e_put2(mco_objhandle_h obj, mco_obj_offset fld_u_offset, mco_obj_offset
                                           fld_c_offset, uint2 index, const wchar_t* src, uint2 srcsz, int2 indexaware);
        #endif 

        MCO_RET mco_w_va_struct_e_put2(mco_objhandle_h obj, mco_obj_offset fld_u_offset, mco_obj_offset fld_c_offset,
                                       mco_objhandle_h ret, uint2 index, uint2 s_u_aligned_sz, uint2 s_c_aligned_sz,
                                       int2 indexaware, uint2 len);
        MCO_RET mco_w_va_struct_e_get2(mco_objhandle_h obj, mco_obj_offset fld_u_offset, mco_obj_offset fld_c_offset,
                                       mco_objhandle_h ret, uint2 index, uint2 s_u_aligned_sz, uint2 s_c_aligned_sz,
                                       uint2 len);

        MCO_RET mco_w_va_chars_e_get2(mco_objhandle_h obj, mco_obj_offset fld_u_offset, mco_obj_offset fld_c_offset,
                                      uint2 index, uint2 el_size, char* dest, uint2 destsz, uint2 len);
        MCO_RET mco_w_va_chars_e_put2(mco_objhandle_h obj, mco_obj_offset fld_u_offset, mco_obj_offset fld_c_offset,
                                      uint2 index, uint2 el_size, const char* src, uint2 srcsz, int2 indexaware, uint2
                                      len);

        MCO_RET mco_w_va_nchars_e_get2(mco_objhandle_h obj, mco_obj_offset fld_u_offset, mco_obj_offset fld_c_offset,
                                       uint2 index, uint2 el_size, nchar_t* dest, uint2 destsz, uint2 len);
        MCO_RET mco_w_va_nchars_e_put2(mco_objhandle_h obj, mco_obj_offset fld_u_offset, mco_obj_offset fld_c_offset,
                                       uint2 index, uint2 el_size, const nchar_t* src, uint2 srcsz, int2 indexaware,
                                       uint2 len);

        #ifdef MCO_CFG_WCHAR_SUPPORT
            MCO_RET mco_w_va_wchars_e_get2(mco_objhandle_h obj, mco_obj_offset fld_u_offset, mco_obj_offset
                                           fld_c_offset, uint2 index, uint2 el_size, wchar_t* dest, uint2 destsz, uint2
                                           len);
            MCO_RET mco_w_va_wchars_e_put2(mco_objhandle_h obj, mco_obj_offset fld_u_offset, mco_obj_offset
                                           fld_c_offset, uint2 index, uint2 el_size, const wchar_t* src, uint2 srcsz,
                                           int2 indexaware, uint2 len);
        #endif 

        MCO_RET mco_w_va_simple_e_get2(mco_objhandle_h obj, mco_obj_offset fld_u_offset, mco_obj_offset fld_c_offset,
                                       uint2 index, uint2 elsize, void* dest, uint2 len);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -