KIDS  ver-0.0.1
KIDS : Kernel Integrated Dynamics Simulator
Loading...
Searching...
No Matches
generate_pybind11 Namespace Reference

Functions

 parse_decro_type_flag (line)
 
 remove_comment (txt)
 
 safe_split_comma (line_in)
 
 unique_type (typi)
 
 parse_type_and_name (term)
 
 parse_type_and_name_multiple (term)
 
 dict_append (d, keys, c)
 
 sweep_scope (lines, istart)
 
 parse_argument (content)
 
 parse_scope (info, kstring, lines, init_attr)
 
 file_parse (fn)
 
 get_fathers (dd, child)
 
 creat_trampoline_fun (ns, ns0, dd, coll)
 
 creat_trampoline (ns, dd)
 
 creat_class_init (ns, dd)
 
 creat_class_var (ns, dd)
 
 creat_class_bind (ns, dd)
 
 creat_class_fun (ns, ns0, dd)
 
 creat_class_ (ns, dd, field)
 
 try_creat_class (ns)
 

Variables

 root = sys.argv[1]
 
 config_file = sys.argv[2]
 
 encoding
 
 data = json.load(load_f)
 
list decro_list = ['const', 'static', 'inline', 'virtual', 'constexpr']
 
list type_list
 
list objs = []
 
 list1 = glob.glob(os.path.abspath(root+'/'+i))
 
bool complete = False
 
dict infos = {'incl': [], 'deps':[], '': {}}
 
dict infos1 = {'incl': [], 'deps':[], '': {}}
 
 info = file_parse(i)
 
 s1 = set(infos['deps'])
 
 s2 = set(infos['incl'])
 
 s3 = set()
 
dict dd = infos['']
 
list created_class = []
 

Function Documentation

◆ creat_class_()

generate_pybind11.creat_class_ ( ns,
dd,
field )

Definition at line 560 of file generate_pybind11.py.

References creat_class_bind(), creat_class_fun(), creat_class_init(), and creat_class_var().

Referenced by try_creat_class().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ creat_class_bind()

generate_pybind11.creat_class_bind ( ns,
dd )

Definition at line 516 of file generate_pybind11.py.

Referenced by creat_class_().

Here is the caller graph for this function:

◆ creat_class_fun()

generate_pybind11.creat_class_fun ( ns,
ns0,
dd )

Definition at line 523 of file generate_pybind11.py.

References parse_argument().

Referenced by creat_class_().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ creat_class_init()

generate_pybind11.creat_class_init ( ns,
dd )

Definition at line 501 of file generate_pybind11.py.

Referenced by creat_class_().

Here is the caller graph for this function:

◆ creat_class_var()

generate_pybind11.creat_class_var ( ns,
dd )

Definition at line 506 of file generate_pybind11.py.

Referenced by creat_class_().

Here is the caller graph for this function:

◆ creat_trampoline()

generate_pybind11.creat_trampoline ( ns,
dd )

Definition at line 464 of file generate_pybind11.py.

References creat_trampoline_fun().

Referenced by try_creat_class().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ creat_trampoline_fun()

generate_pybind11.creat_trampoline_fun ( ns,
ns0,
dd,
coll )

Definition at line 430 of file generate_pybind11.py.

Referenced by creat_trampoline().

Here is the caller graph for this function:

◆ dict_append()

generate_pybind11.dict_append ( d,
keys,
c )

Definition at line 180 of file generate_pybind11.py.

Referenced by file_parse(), and parse_scope().

Here is the caller graph for this function:

◆ file_parse()

generate_pybind11.file_parse ( fn)

Definition at line 291 of file generate_pybind11.py.

References dict_append(), parse_decro_type_flag(), parse_scope(), remove_comment(), and sweep_scope().

Here is the call graph for this function:

◆ get_fathers()

generate_pybind11.get_fathers ( dd,
child )

Definition at line 425 of file generate_pybind11.py.

References get_fathers().

Referenced by get_fathers().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parse_argument()

generate_pybind11.parse_argument ( content)

Definition at line 220 of file generate_pybind11.py.

References parse_type_and_name(), and safe_split_comma().

Referenced by creat_class_fun(), and parse_scope().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parse_decro_type_flag()

generate_pybind11.parse_decro_type_flag ( line)

Definition at line 24 of file generate_pybind11.py.

Referenced by file_parse(), and parse_scope().

Here is the caller graph for this function:

◆ parse_scope()

generate_pybind11.parse_scope ( info,
kstring,
lines,
init_attr )

Definition at line 230 of file generate_pybind11.py.

References dict_append(), parse_argument(), parse_decro_type_flag(), and sweep_scope().

Referenced by file_parse().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parse_type_and_name()

generate_pybind11.parse_type_and_name ( term)
    this function split (unique) typeinfo & variable name.
    passed for:
    double* abc=0;
    double* abc_d;
    double* abc_d[];
    double* abc_d[2];
    double*&abc_d[];
    const std::sting &abc_d[];

Definition at line 113 of file generate_pybind11.py.

References unique_type().

Referenced by parse_argument(), and parse_type_and_name_multiple().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parse_type_and_name_multiple()

generate_pybind11.parse_type_and_name_multiple ( term)
    this function split multiple typeinfo & variable name.
    passed for:
    "const int *a, b, **c;"

Definition at line 145 of file generate_pybind11.py.

References parse_type_and_name(), safe_split_comma(), and unique_type().

Here is the call graph for this function:

◆ remove_comment()

generate_pybind11.remove_comment ( txt)
    this function remove c-style comment of in the text

Definition at line 73 of file generate_pybind11.py.

Referenced by file_parse().

Here is the caller graph for this function:

◆ safe_split_comma()

generate_pybind11.safe_split_comma ( line_in)
    this function split comma, such as
    <double, std::string>, <std::map<int, double>>, <<int>, 2>

Definition at line 83 of file generate_pybind11.py.

Referenced by parse_argument(), and parse_type_and_name_multiple().

Here is the caller graph for this function:

◆ sweep_scope()

generate_pybind11.sweep_scope ( lines,
istart )

Definition at line 204 of file generate_pybind11.py.

Referenced by file_parse(), and parse_scope().

Here is the caller graph for this function:

◆ try_creat_class()

generate_pybind11.try_creat_class ( ns)

Definition at line 612 of file generate_pybind11.py.

References creat_class_(), creat_trampoline(), and try_creat_class().

Referenced by try_creat_class().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ unique_type()

generate_pybind11.unique_type ( typi)

Definition at line 106 of file generate_pybind11.py.

Referenced by parse_type_and_name(), and parse_type_and_name_multiple().

Here is the caller graph for this function:

Variable Documentation

◆ complete

bool generate_pybind11.complete = False

Definition at line 387 of file generate_pybind11.py.

◆ config_file

str generate_pybind11.config_file = sys.argv[2]

Definition at line 10 of file generate_pybind11.py.

◆ created_class

list generate_pybind11.created_class = []

Definition at line 610 of file generate_pybind11.py.

◆ data

generate_pybind11.data = json.load(load_f)

Definition at line 18 of file generate_pybind11.py.

◆ dd

dict generate_pybind11.dd = infos['']

Definition at line 609 of file generate_pybind11.py.

◆ decro_list

list generate_pybind11.decro_list = ['const', 'static', 'inline', 'virtual', 'constexpr']

Definition at line 20 of file generate_pybind11.py.

◆ encoding

generate_pybind11.encoding

Definition at line 16 of file generate_pybind11.py.

◆ info

generate_pybind11.info = file_parse(i)

Definition at line 392 of file generate_pybind11.py.

◆ infos

dict generate_pybind11.infos = {'incl': [], 'deps':[], '': {}}

Definition at line 388 of file generate_pybind11.py.

◆ infos1

dict generate_pybind11.infos1 = {'incl': [], 'deps':[], '': {}}

Definition at line 390 of file generate_pybind11.py.

◆ list1

generate_pybind11.list1 = glob.glob(os.path.abspath(root+'/'+i))

Definition at line 369 of file generate_pybind11.py.

◆ objs

generate_pybind11.objs = []

Definition at line 367 of file generate_pybind11.py.

◆ root

generate_pybind11.root = sys.argv[1]

Definition at line 9 of file generate_pybind11.py.

◆ s1

generate_pybind11.s1 = set(infos['deps'])

Definition at line 404 of file generate_pybind11.py.

◆ s2

generate_pybind11.s2 = set(infos['incl'])

Definition at line 405 of file generate_pybind11.py.

◆ s3

generate_pybind11.s3 = set()

Definition at line 406 of file generate_pybind11.py.

◆ type_list

list generate_pybind11.type_list
Initial value:
1= ['void', 'bool', 'int', 'double', 'kids_real', 'kids_complex',
2 'std::string', 'std::map', 'enum', 'class', 'namespace']

Definition at line 21 of file generate_pybind11.py.