Do you aware of boost::type_traits library? pygccxml has functionality
similar to it. Using functions defined in this module you can
Those functions are very valuable for code generation. Almost all
functions within this module works on type_t class hierarchy and\or class_t.
|
remove_alias(type_)
returns type without typedefs |
source code
|
|
|
create_cv_types(base)
implementation details |
source code
|
|
|
|
|
decompose_class(type)
implementation details |
source code
|
|
|
|
|
does_match_definition(given,
main,
secondary)
implementation details |
source code
|
|
|
is_bool(type_)
returns True, if type represents bool , False otherwise |
source code
|
|
|
is_void(type)
returns True, if type represents void , False otherwise |
source code
|
|
|
is_void_pointer(type)
returns True, if type represents void* , False otherwise |
source code
|
|
|
is_integral(type)
returns True, if type represents C++ integral type, False otherwise |
source code
|
|
|
is_floating_point(type)
returns True, if type represents C++ floating point type, False
otherwise |
source code
|
|
|
is_arithmetic(type)
returns True, if type represents C++ integral or floating point type,
False otherwise |
source code
|
|
|
is_pointer(type)
returns True, if type represents C++ pointer type, False otherwise |
source code
|
|
|
is_calldef_pointer(type)
returns True, if type represents pointer to free/member function,
False otherwise |
source code
|
|
|
|
|
is_reference(type)
returns True, if type represents C++ reference type, False otherwise |
source code
|
|
|
is_array(type)
returns True, if type represents C++ array type, False otherwise |
source code
|
|
|
|
|
array_item_type(type_)
returns array item type |
source code
|
|
|
|
|
is_const(type)
returns True, if type represents C++ const type, False otherwise |
source code
|
|
|
|
|
|
|
is_same(type1,
type2)
returns True, if type1 and type2 are same types |
source code
|
|
|
is_volatile(type)
returns True, if type represents C++ volatile type, False otherwise |
source code
|
|
|
|
|
remove_cv(type)
removes const and volatile from the type definition |
source code
|
|
|
is_fundamental(type)
returns True, if type represents C++ fundamental type |
source code
|
|
|
is_enum(type)
returns True, if type represents C++ enumeration declaration, False
otherwise |
source code
|
|
|
|
|
is_class(type)
returns True, if type represents C++ class definition, False
otherwise |
source code
|
|
|
is_class_declaration(type)
returns True, if type represents C++ class declaration, False
otherwise |
source code
|
|
|
find_trivial_constructor(type)
returns reference to trivial constructor or None |
source code
|
|
|
has_trivial_constructor(class_)
if class has public trivial constructor, this function will return
reference to it, None otherwise |
source code
|
|
|
has_copy_constructor(class_)
if class has public copy constructor, this function will return
reference to it, None otherwise |
source code
|
|
|
has_destructor(class_)
if class has destructor, this function will return reference to it,
None otherwise |
source code
|
|
|
has_public_constructor(class_)
if class has any public constructor, this function will return list
of them, otherwise None |
source code
|
|
|
has_public_assign(class_)
returns True, if class has public assign operator, False otherwise |
source code
|
|
|
has_public_destructor(type)
returns True, if class has public destructor, False otherwise |
source code
|
|
|
is_base_and_derived(based,
derived)
returns True, if there is "base and derived" relationship
between classes, False otherwise |
source code
|
|
|
has_any_non_copyconstructor(type)
if class has any public constructor, which is not copy constructor,
this function will return list of them, otherwise None |
source code
|
|
|
has_public_binary_operator(type,
operator_symbol)
returns True, if type has public binary operator, otherwise False |
source code
|
|
|
has_public_equal(type)
returns True, if class has public operator==, otherwise False |
source code
|
|
|
has_public_less(type)
returns True, if class has public operator<, otherwise False |
source code
|
|
|
is_unary_operator(oper)
returns True, if operator is unary operator, otherwise False |
source code
|
|
|
is_binary_operator(oper)
returns True, if operator is binary operator, otherwise False |
source code
|
|
|
is_convertible(source,
target)
returns True, if source could be converted to target, otherwise False |
source code
|
|
|
is_noncopyable(class_)
returns True, if class is noncopyable, False otherwise |
source code
|
|
|
is_defined_in_xxx(xxx,
cls)
small helper function, that checks whether class ( cls )
is defined under ::xxx namespace |
source code
|
|
|
is_std_string(type)
returns True, if type represents C++ std::string, False otherwise |
source code
|
|
|
is_std_wstring(type)
returns True, if type represents C++ std::wstring, False otherwise |
source code
|
|
|
is_std_ostream(type)
returns True, if type represents C++ std::string, False otherwise |
source code
|
|
|
is_std_wostream(type)
returns True, if type represents C++ std::string, False otherwise |
source code
|
|