Re: [pygccxml-development] How to get the class_t from a typedef_t
Brought to you by:
mbaas,
roman_yakovenko
From: Roman Y. <rom...@gm...> - 2008-01-13 19:05:28
|
On Jan 13, 2008 6:53 PM, Gustavo Carneiro <gjc...@gm...> wrote: > I am trying to parse C++ code like: > > template<typename R, > typename T1 = empty, typename T2 = empty, > typename T3 = empty, typename T4 = empty, > typename T5 = empty, typename T6 = empty> > class Callback ...; > > later: > > template<typename T1 = empty, typename T2 = empty, > typename T3 = empty, typename T4 = empty> > class CallbackTraceSource : public CallbackTraceSourceBase { > public: > > typedef Callback<void,TraceContext const &,T1,T2,T3,T4> CallbackType; > > ... > }; > > I am trying to navigate from the CallbackTraceSource class, but no matter > what I do I cannot make pygccxml give me the class_t corresponding to the > typedef_t named 'CallbackType'. I can only get a declarated_t or > class_declaration_t, but I cannot find any way to get the corresponding > class_t. What am I missing? Template instantiation. If you can modify the source code than use 'sizeof' operator: > typedef Callback<void,TraceContext const &,T1,T2,T3,T4> CallbackType; private: enum{ CallbackTypeSize = sizeof( CallbackType ) }; HTH -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ |