"""
Auto-generated Python stub file from _dict.py
Module: _dict
"""


import t, c
import memhub
import string
import json
from stdint import *

VARIANT_NONE:   t.CDefine = 0   # 无类型/空值
VARIANT_INT:    t.CDefine = 1   # int (i64)
VARIANT_FLOAT:  t.CDefine = 2   # float (f32)
VARIANT_DOUBLE: t.CDefine = 3   # double (f64)
VARIANT_STR:    t.CDefine = 4   # str (i8*)
VARIANT_DICT:   t.CDefine = 5   # dict*
VARIANT_LIST:   t.CDefine = 6   # list*
VARIANT_BOOL:   t.CDefine = 7   # bool (i1/i32)
VARIANT_PTR:    t.CDefine = 8   # 自定义指针类型
_VARIANT_SIZE: t.CDefine = 16

class dict:
    __keys__: t.CPtr
    __values__: t.CPtr
    __count__: t.CSizeT = 0
    __capacity__: t.CSizeT = 8
    __mbuddy__: memhub.MemBuddy | t.CPtr
    __iter_index__: t.CSizeT = 0
    def __new__(self: dict, mb: memhub.MemBuddy | t.CPtr) -> t.CPtr: pass
    def __init__(self: dict, mb: memhub.MemBuddy | t.CPtr) -> t.CInt: pass
    def __len__(self: dict) -> t.CSizeT: pass
    def _find(self: dict, key: str) -> t.CSizeT: pass
    def __getitem__(self: dict, key: str) -> t.CPtr: pass
    def __setitem__(self: dict, key: str, val: t.CNeedPtr) -> t.CInt: pass
    def _set_variant_raw(self: dict, key: str, vtype: t.CInt, ptr: t.CPtr) -> t.CInt: pass
    def set_int(self: dict, key: str, val: int) -> t.CInt: pass
    def set_str(self: dict, key: str, val: str) -> t.CInt: pass
    def set_float(self: dict, key: str, val: float) -> t.CInt: pass
    def set_double(self: dict, key: str, val: t.CDouble) -> t.CInt: pass
    def set_dict(self: dict, key: str, val: dict | t.CPtr) -> t.CInt: pass
    def set_list(self: dict, key: str, val: t.CPtr) -> t.CInt: pass
    def set_bool(self: dict, key: str, val: t.CInt) -> t.CInt: pass
    def get_vtype(self: dict, key: str) -> t.CInt: pass
    def get(self: dict, key: str, default: t.CPtr) -> t.CPtr: pass
    def contains(self: dict, key: str) -> t.CInt: pass
    def __iter__(self: dict) -> dict | t.CPtr: pass
    def __next__(self: dict) -> str: pass
    def to_json(self: dict, pool: memhub.MemManager | t.CPtr) -> json.JsonValue | t.CPtr: pass
    def from_json(self: dict, pool: memhub.MemManager | t.CPtr, root: json.JsonValue | t.CPtr) -> t.CInt: pass
    def dumps(self: dict, pool: memhub.MemManager | t.CPtr) -> str: pass
    def loads(self: dict, pool: memhub.MemManager | t.CPtr, json_str: str) -> t.CInt: pass