pygccxml.parser.patcher module

class casting_operator_patcher_t

Bases: object

class default_argument_patcher_t(enums, cxx_std)

Bases: object

fix_calldef_decls(decls, enums, cxx_std)

some times gccxml report typedefs defined in no namespace it happens for example in next situation template< typename X> void ddd(){ typedef typename X::Y YY;} if I will fail on this bug next time, the right way to fix it may be different

update_unnamed_class(decls)

Adds name to class_t declarations.

If CastXML is being used, the type definitions with an unnamed class/struct are split across two nodes in the XML tree. For example,

typedef struct {} cls;

produces

<Struct id=”_7” name=”” context=”_1” …/> <Typedef id=”_8” name=”cls” type=”_7” context=”_1” …/>

For each typedef, we look at which class it refers to, and update the name accordingly. This helps the matcher classes finding these declarations. This was the behaviour with gccxml too, so this is important for backward compatibility.

If the castxml epic version 1 is used, there is even an elaborated type declaration between the typedef and the struct/class, that also needs to be taken care of.

Parameters:decls (list[declaration_t]) – a list of declarations to be patched.
Returns:None