Re: [pygccxml-development] How to get the class_t from a typedef_t
Brought to you by:
mbaas,
roman_yakovenko
From: Gustavo C. <gjc...@gm...> - 2008-01-13 21:44:52
|
On 13/01/2008, Roman Yakovenko <rom...@gm...> wrote: > > 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 ) }; Thanks, it really helped! Best regards, -- Gustavo J. A. M. Carneiro INESC Porto, Telecommunications and Multimedia Unit "The universe is always one step beyond logic." -- Frank Herbert |