pygccxml.declarations.cpptypes module¶
defines classes, that describe C++ types
- FUNDAMENTAL_TYPES = {'__int128_t': <pygccxml.declarations.cpptypes.int128_t object>, '__java_boolean': <pygccxml.declarations.cpptypes.jboolean_t object>, '__java_byte': <pygccxml.declarations.cpptypes.jbyte_t object>, '__java_char': <pygccxml.declarations.cpptypes.jchar_t object>, '__java_double': <pygccxml.declarations.cpptypes.jdouble_t object>, '__java_float': <pygccxml.declarations.cpptypes.jfloat_t object>, '__java_int': <pygccxml.declarations.cpptypes.jint_t object>, '__java_long': <pygccxml.declarations.cpptypes.jlong_t object>, '__java_short': <pygccxml.declarations.cpptypes.jshort_t object>, '__uint128_t': <pygccxml.declarations.cpptypes.uint128_t object>, 'bool': <pygccxml.declarations.cpptypes.bool_t object>, 'char': <pygccxml.declarations.cpptypes.char_t object>, 'complex double': <pygccxml.declarations.cpptypes.complex_double_t object>, 'complex float': <pygccxml.declarations.cpptypes.complex_float_t object>, 'complex long double': <pygccxml.declarations.cpptypes.complex_long_double_t object>, 'double': <pygccxml.declarations.cpptypes.double_t object>, 'float': <pygccxml.declarations.cpptypes.float_t object>, 'int': <pygccxml.declarations.cpptypes.int_t object>, 'jboolean': <pygccxml.declarations.cpptypes.jboolean_t object>, 'jbyte': <pygccxml.declarations.cpptypes.jbyte_t object>, 'jchar': <pygccxml.declarations.cpptypes.jchar_t object>, 'jdouble': <pygccxml.declarations.cpptypes.jdouble_t object>, 'jfloat': <pygccxml.declarations.cpptypes.jfloat_t object>, 'jint': <pygccxml.declarations.cpptypes.jint_t object>, 'jlong': <pygccxml.declarations.cpptypes.jlong_t object>, 'jshort': <pygccxml.declarations.cpptypes.jshort_t object>, 'long double': <pygccxml.declarations.cpptypes.long_double_t object>, 'long int': <pygccxml.declarations.cpptypes.long_int_t object>, 'long long int': <pygccxml.declarations.cpptypes.long_long_int_t object>, 'long long unsigned int': <pygccxml.declarations.cpptypes.long_long_unsigned_int_t object>, 'long unsigned int': <pygccxml.declarations.cpptypes.long_unsigned_int_t object>, 'short int': <pygccxml.declarations.cpptypes.short_int_t object>, 'short unsigned int': <pygccxml.declarations.cpptypes.short_unsigned_int_t object>, 'signed char': <pygccxml.declarations.cpptypes.signed_char_t object>, 'signed int': <pygccxml.declarations.cpptypes.int_t object>, 'signed short int': <pygccxml.declarations.cpptypes.short_int_t object>, 'unsigned char': <pygccxml.declarations.cpptypes.unsigned_char_t object>, 'unsigned int': <pygccxml.declarations.cpptypes.unsigned_int_t object>, 'void': <pygccxml.declarations.cpptypes.void_t object>, 'wchar_t': <pygccxml.declarations.cpptypes.wchar_t object>}¶
defines a mapping between fundamental type name and its synonym to the instance of class that describes the type
- class array_t(base, size)¶
Bases:
pygccxml.declarations.cpptypes.compound_trepresents C++ array type
- SIZE_UNKNOWN = -1¶
- build_decl_string(with_defaults=True)¶
- property size¶
returns array size
- class bool_t¶
Bases:
pygccxml.declarations.cpptypes.fundamental_trepresents bool type
- CPPNAME = 'bool'¶
- class calldef_type_t(return_type=None, arguments_types=None)¶
Bases:
objectbase class for all types that describes “callable” declaration
- property has_ellipsis¶
- property return_type¶
reference to
return type
- class char_t¶
Bases:
pygccxml.declarations.cpptypes.fundamental_trepresents char type
- CPPNAME = 'char'¶
- class complex_double_t¶
Bases:
pygccxml.declarations.cpptypes.fundamental_trepresents complex double type
- CPPNAME = 'complex double'¶
- class complex_float_t¶
Bases:
pygccxml.declarations.cpptypes.fundamental_trepresents complex float type
- CPPNAME = 'complex float'¶
- class complex_long_double_t¶
Bases:
pygccxml.declarations.cpptypes.fundamental_trepresents complex long double type
- CPPNAME = 'complex long double'¶
- class compound_t(base)¶
Bases:
pygccxml.declarations.cpptypes.type_tclass that allows to represent compound types like const int*
- property base¶
reference to internal/base class
- build_decl_string(with_defaults=True)¶
- class const_t(base)¶
Bases:
pygccxml.declarations.cpptypes.compound_trepresents whatever const type
- build_decl_string(with_defaults=True)¶
- class declarated_t(declaration)¶
Bases:
pygccxml.declarations.cpptypes.type_t,pygccxml.declarations.byte_info.byte_infoclass that binds between to hierarchies:
type_tanddeclaration_t- build_decl_string(with_defaults=True)¶
- property declaration¶
reference to
declaration_t
- class double_t¶
Bases:
pygccxml.declarations.cpptypes.fundamental_trepresents double type
- CPPNAME = 'double'¶
- class dummy_type_t(decl_string)¶
Bases:
pygccxml.declarations.cpptypes.type_tprovides
type_tinterface for a string, that defines C++ type.This class could be very useful in the code generator.
- build_decl_string(with_defaults=True)¶
- class elaborated_t(base)¶
Bases:
pygccxml.declarations.cpptypes.compound_trepresents elaborated type
- build_decl_string(with_defaults=True)¶
- class ellipsis_t¶
Bases:
pygccxml.declarations.cpptypes.type_ttype, that represents “…” in function definition
- build_decl_string(with_defaults=True)¶
- class float_t¶
Bases:
pygccxml.declarations.cpptypes.fundamental_trepresents float type
- CPPNAME = 'float'¶
- class free_function_type_t(return_type=None, arguments_types=None)¶
Bases:
pygccxml.declarations.cpptypes.type_t,pygccxml.declarations.cpptypes.calldef_type_tdescribes free function type
- NAME_TEMPLATE = '%(return_type)s (*)( %(arguments)s )'¶
- TYPEDEF_NAME_TEMPLATE = '%(return_type)s ( *%(typedef_name)s )( %(arguments)s )'¶
- build_decl_string(with_defaults=True)¶
- static create_decl_string(return_type, arguments_types, with_defaults=True)¶
Returns free function type
- Parameters
- Return type
- create_typedef(typedef_name, unused=None, with_defaults=True)¶
returns string, that contains valid C++ code, that defines typedef to function type
- Parameters
name – the desired name of typedef
- class fundamental_t(name)¶
Bases:
pygccxml.declarations.cpptypes.type_tbase class for all fundamental, build-in types
- build_decl_string(with_defaults=True)¶
- class int128_t¶
Bases:
pygccxml.declarations.cpptypes.fundamental_trepresents __int128_t type
- CPPNAME = '__int128_t'¶
- class int_t¶
Bases:
pygccxml.declarations.cpptypes.fundamental_trepresents int type
- CPPNAME = 'int'¶
- class java_fundamental_t(name)¶
Bases:
pygccxml.declarations.cpptypes.fundamental_tbase class for all JNI defined fundamental types
- class jboolean_t¶
Bases:
pygccxml.declarations.cpptypes.java_fundamental_trepresents jboolean type
- JNAME = 'jboolean'¶
- class jbyte_t¶
Bases:
pygccxml.declarations.cpptypes.java_fundamental_trepresents jbyte type
- JNAME = 'jbyte'¶
- class jchar_t¶
Bases:
pygccxml.declarations.cpptypes.java_fundamental_trepresents jchar type
- JNAME = 'jchar'¶
- class jdouble_t¶
Bases:
pygccxml.declarations.cpptypes.java_fundamental_trepresents jdouble type
- JNAME = 'jdouble'¶
- class jfloat_t¶
Bases:
pygccxml.declarations.cpptypes.java_fundamental_trepresents jfloat type
- JNAME = 'jfloat'¶
- class jint_t¶
Bases:
pygccxml.declarations.cpptypes.java_fundamental_trepresents jint type
- JNAME = 'jint'¶
- class jlong_t¶
Bases:
pygccxml.declarations.cpptypes.java_fundamental_trepresents jlong type
- JNAME = 'jlong'¶
- class jshort_t¶
Bases:
pygccxml.declarations.cpptypes.java_fundamental_trepresents jshort type
- JNAME = 'jshort'¶
- class long_double_t¶
Bases:
pygccxml.declarations.cpptypes.fundamental_trepresents long double type
- CPPNAME = 'long double'¶
- class long_int_t¶
Bases:
pygccxml.declarations.cpptypes.fundamental_trepresents long int type
- CPPNAME = 'long int'¶
- class long_long_int_t¶
Bases:
pygccxml.declarations.cpptypes.fundamental_trepresents long long int type
- CPPNAME = 'long long int'¶
- class long_long_unsigned_int_t¶
Bases:
pygccxml.declarations.cpptypes.fundamental_trepresents long long unsigned int type
- CPPNAME = 'long long unsigned int'¶
- class long_unsigned_int_t¶
Bases:
pygccxml.declarations.cpptypes.fundamental_trepresents long unsigned int type
- CPPNAME = 'long unsigned int'¶
- class member_function_type_t(class_inst=None, return_type=None, arguments_types=None, has_const=False)¶
Bases:
pygccxml.declarations.cpptypes.type_t,pygccxml.declarations.cpptypes.calldef_type_tdescribes member function type
- NAME_TEMPLATE = '%(return_type)s ( %(class)s::* )( %(arguments)s )%(has_const)s'¶
- TYPEDEF_NAME_TEMPLATE = '%(return_type)s ( %(class)s::*%(typedef_name)s)( %(arguments)s ) %(has_const)s'¶
- build_decl_string(with_defaults=True)¶
- property class_inst¶
reference to parent
class
- static create_decl_string(return_type, class_decl_string, arguments_types, has_const, with_defaults=True)¶
- create_typedef(typedef_name, class_alias=None, with_defaults=True)¶
creates typedef to the function type
- Parameters
typedef_name – desired type name
- Return type
string
- property has_const¶
describes, whether function has const modifier
- class member_variable_type_t(class_inst=None, variable_type=None)¶
Bases:
pygccxml.declarations.cpptypes.compound_tdescribes member variable type
- NAME_TEMPLATE = '%(type)s ( %(class)s::* )'¶
- build_decl_string(with_defaults=True)¶
- class pointer_t(base)¶
Bases:
pygccxml.declarations.cpptypes.compound_trepresents whatever* type
- build_decl_string(with_defaults=True)¶
- class reference_t(base)¶
Bases:
pygccxml.declarations.cpptypes.compound_trepresents whatever& type
- build_decl_string(with_defaults=True)¶
- class restrict_t(base)¶
Bases:
pygccxml.declarations.cpptypes.compound_trepresents restrict whatever type
- build_decl_string(with_defaults=True)¶
- class short_int_t¶
Bases:
pygccxml.declarations.cpptypes.fundamental_trepresents short int type
- CPPNAME = 'short int'¶
- class short_unsigned_int_t¶
Bases:
pygccxml.declarations.cpptypes.fundamental_trepresents short unsigned int type
- CPPNAME = 'short unsigned int'¶
- class signed_char_t¶
Bases:
pygccxml.declarations.cpptypes.fundamental_trepresents signed char type
- CPPNAME = 'signed char'¶
- class type_qualifiers_t(has_static=False, has_mutable=False, has_extern=False)¶
Bases:
objectcontains additional information about type: mutable, static, extern
- property has_extern¶
- property has_mutable¶
- property has_static¶
- class type_t¶
Bases:
pygccxml.declarations.byte_info.byte_infobase class for all types
- build_decl_string(with_defaults=True)¶
- clone()¶
returns new instance of the type
- property decl_string¶
- property partial_decl_string¶
- class uint128_t¶
Bases:
pygccxml.declarations.cpptypes.fundamental_trepresents __uint128_t type
- CPPNAME = '__uint128_t'¶
- class unknown_t¶
Bases:
pygccxml.declarations.cpptypes.type_ttype, that represents all C++ types, that could not be parsed by GCC-XML
- build_decl_string(with_defaults=True)¶
- class unsigned_char_t¶
Bases:
pygccxml.declarations.cpptypes.fundamental_trepresents unsigned char type
- CPPNAME = 'unsigned char'¶
- class unsigned_int_t¶
Bases:
pygccxml.declarations.cpptypes.fundamental_trepresents unsigned int type
- CPPNAME = 'unsigned int'¶
- class void_t¶
Bases:
pygccxml.declarations.cpptypes.fundamental_trepresents void type
- CPPNAME = 'void'¶
- class volatile_t(base)¶
Bases:
pygccxml.declarations.cpptypes.compound_trepresents volatile whatever type
- build_decl_string(with_defaults=True)¶
- class wchar_t¶
Bases:
pygccxml.declarations.cpptypes.fundamental_trepresents wchar_t type
- CPPNAME = 'wchar_t'¶