# Path: ctypeslib/codegen/typedesc.py
# class T(object):
# class Argument(T):
# class _HasArgs(T):
# class Alias(T):
# class Macro(T):
# class File(T):
# class Function(_HasArgs):
# class Ignored(_HasArgs):
# class OperatorFunction(_HasArgs):
# class FunctionType(_HasArgs):
# class Method(_HasArgs):
# class FundamentalType(T):
# class PointerType(T):
# class Typedef(T):
# class ArrayType(T):
# class StructureHead(T):
# class StructureBody(T):
# class _Struct_Union_Base(T):
# class Structure(_Struct_Union_Base):
# class Union(_Struct_Union_Base):
# class Field(T):
# class CvQualifiedType(T):
# class Enumeration(T):
# class EnumValue(T):
# class Variable(T):
# class UndefinedIdentifier(T):
#     def __repr__(self):
#     def __init__(self, name, _type):
#     def __init__(self):
#     def add_argument(self, arg):
#     def iterArgTypes(self):
#     def iterArgNames(self):
#     def fixup_argtypes(self, cb):
#     def __init__(self, name, alias, typ=None):
#     def __init__(self, name, args, body):
#     def __init__(self, name):
#     def __init__(self, name, returns, attributes, extern):
#     def __init__(self, name):
#     def __init__(self, name, returns):
#     def __init__(self, returns, attributes, name=''):
#     def __init__(self, name, returns):
#     def __init__(self, name, size, align):
#     def __init__(self, typ, size, align):
#     def __init__(self, name, typ):
#     def __init__(self, typ, size):
#     def __init__(self, struct):
#     def name(self):
#     def __init__(self, struct):
#     def name(self):
#     def get_body(self):
#     def get_head(self):
#     def __init__(self, name, align, members, bases, size, artificial=None,
#                  packed=False):
#     def __init__(self, name, align, members, bases, size, artificial=None,
#                  packed=False):
#     def __init__(self, name, typ, offset, bits, is_bitfield=False,
#                  is_anonymous=False, is_padding=False):
#     def __init__(self, typ, const, volatile):
#     def __init__(self, name, size, align):
#     def add_value(self, v):
#     def __init__(self, name, value, enumeration):
#     def __init__(self, name, typ, init=None, extern=False):
#     def __init__(self, name):
#     def __str__(self):
# def is_record(t):
# 
# Path: ctypeslib/codegen/util.py
# @decorator
# def log_entity(func):
#     def fn(*args, **kwargs):
#         name = args[0].get_unique_name(args[1])
#         if name == '':
#             parent = args[1].semantic_parent
#             if parent:
#                 name = 'child of %s' % parent.displayname
#         log.debug("%s: displayname:'%s'",func.__name__, name)
#         # print 'calling {}'.format(func.__name__)
#         return func(*args, **kwargs)
#     return fn


from clang.cindex import CursorKind, TypeKind
from ctypeslib.codegen import typedesc
from ctypeslib.codegen.util import log_entity
import logging
            return [TypeKind.USHORT, TypeKind.UINT, TypeKind.ULONG,
                    TypeKind.ULONGLONG, TypeKind.UINT128,
                    TypeKind.SHORT, TypeKind.INT, TypeKind.LONG,
                    TypeKind.LONGLONG, TypeKind.INT128, ]
        elif literal_kind == CursorKind.STRING_LITERAL:
            return [TypeKind.CHAR16, TypeKind.CHAR32, TypeKind.CHAR_S,
                    TypeKind.SCHAR, TypeKind.WCHAR]  # DEBUG
        elif literal_kind == CursorKind.CHARACTER_LITERAL:
            return [TypeKind.CHAR_U, TypeKind.UCHAR]
        elif literal_kind == CursorKind.FLOATING_LITERAL:
            return [TypeKind.FLOAT, TypeKind.DOUBLE, TypeKind.LONGDOUBLE]
        elif literal_kind == CursorKind.IMAGINARY_LITERAL:
            return []
        return []

    def get_ctypes_name(self, typekind):
        return self.parser.get_ctypes_name(typekind)

    def get_ctypes_size(self, typekind):
        return self.parser.get_ctypes_size(typekind)

    def parse_cursor(self, cursor):
        return self.parser.parse_cursor(cursor)

    def parse_cursor_type(self, _cursor_type):
        return self.parser.parse_cursor_type(_cursor_type)

    ################################
    # do-nothing element handlers


# Path: ctypeslib/codegen/typedesc.py
# class T(object):
# class Argument(T):
# class _HasArgs(T):
# class Alias(T):
# class Macro(T):
# class File(T):
# class Function(_HasArgs):
# class Ignored(_HasArgs):
# class OperatorFunction(_HasArgs):
# class FunctionType(_HasArgs):
# class Method(_HasArgs):
# class FundamentalType(T):
# class PointerType(T):
# class Typedef(T):
# class ArrayType(T):
# class StructureHead(T):
# class StructureBody(T):
# class _Struct_Union_Base(T):
# class Structure(_Struct_Union_Base):
# class Union(_Struct_Union_Base):
# class Field(T):
# class CvQualifiedType(T):
# class Enumeration(T):
# class EnumValue(T):
# class Variable(T):
# class UndefinedIdentifier(T):
#     def __repr__(self):
#     def __init__(self, name, _type):
#     def __init__(self):
#     def add_argument(self, arg):
#     def iterArgTypes(self):
#     def iterArgNames(self):
#     def fixup_argtypes(self, cb):
#     def __init__(self, name, alias, typ=None):
#     def __init__(self, name, args, body):
#     def __init__(self, name):
#     def __init__(self, name, returns, attributes, extern):
#     def __init__(self, name):
#     def __init__(self, name, returns):
#     def __init__(self, returns, attributes, name=''):
#     def __init__(self, name, returns):
#     def __init__(self, name, size, align):
#     def __init__(self, typ, size, align):
#     def __init__(self, name, typ):
#     def __init__(self, typ, size):
#     def __init__(self, struct):
#     def name(self):
#     def __init__(self, struct):
#     def name(self):
#     def get_body(self):
#     def get_head(self):
#     def __init__(self, name, align, members, bases, size, artificial=None,
#                  packed=False):
#     def __init__(self, name, align, members, bases, size, artificial=None,
#                  packed=False):
#     def __init__(self, name, typ, offset, bits, is_bitfield=False,
#                  is_anonymous=False, is_padding=False):
#     def __init__(self, typ, const, volatile):
#     def __init__(self, name, size, align):
#     def add_value(self, v):
#     def __init__(self, name, value, enumeration):
#     def __init__(self, name, typ, init=None, extern=False):
#     def __init__(self, name):
#     def __str__(self):
# def is_record(t):
# 
# Path: ctypeslib/codegen/util.py
# @decorator
# def log_entity(func):
#     def fn(*args, **kwargs):
#         name = args[0].get_unique_name(args[1])
#         if name == '':
#             parent = args[1].semantic_parent
#             if parent:
#                 name = 'child of %s' % parent.displayname
#         log.debug("%s: displayname:'%s'",func.__name__, name)
#         # print 'calling {}'.format(func.__name__)
#         return func(*args, **kwargs)
#     return fn


# Path: ctypeslib/codegen/handler.py
from clang.cindex import CursorKind, TypeKind
from ctypeslib.codegen import typedesc
from ctypeslib.codegen.util import log_entity
import logging

            return [TypeKind.USHORT, TypeKind.UINT, TypeKind.ULONG,
                    TypeKind.ULONGLONG, TypeKind.UINT128,
                    TypeKind.SHORT, TypeKind.INT, TypeKind.LONG,
                    TypeKind.LONGLONG, TypeKind.INT128, ]
        elif literal_kind == CursorKind.STRING_LITERAL:
            return [TypeKind.CHAR16, TypeKind.CHAR32, TypeKind.CHAR_S,
                    TypeKind.SCHAR, TypeKind.WCHAR]  # DEBUG
        elif literal_kind == CursorKind.CHARACTER_LITERAL:
            return [TypeKind.CHAR_U, TypeKind.UCHAR]
        elif literal_kind == CursorKind.FLOATING_LITERAL:
            return [TypeKind.FLOAT, TypeKind.DOUBLE, TypeKind.LONGDOUBLE]
        elif literal_kind == CursorKind.IMAGINARY_LITERAL:
            return []
        return []

    def get_ctypes_name(self, typekind):
        return self.parser.get_ctypes_name(typekind)

    def get_ctypes_size(self, typekind):
        return self.parser.get_ctypes_size(typekind)

    def parse_cursor(self, cursor):
        return self.parser.parse_cursor(cursor)

    def parse_cursor_type(self, _cursor_type):
        return self.parser.parse_cursor_type(_cursor_type)

    ################################
    # do-nothing element handlers


    @log_entity