Re: [pygccxml-development] xxx_traits? container_traits questions generically
Brought to you by:
mbaas,
roman_yakovenko
From: Roman Y. <rom...@gm...> - 2008-08-15 17:58:26
|
On Fri, Aug 15, 2008 at 12:41 AM, Gustavo Carneiro <gjc...@gm...> wrote: > I am trying to use container_traits.find_container_traits(): > > http://www.language-binding.net/pygccxml/apidocs/pygccxml.declarations.container_traits-module.html > > The return value of the function appears to be None or > pygccxml.declarations.container_traits.xxx_traits. What's the deal with > this undocumented xxx_traits object? Sorry, I don't understand the question? xxx_traits is documented in the source code. I think epydoc skipped it. > In a related question, what is the easiest way to distinguish between > sequence (list, vector, set, ...) and associative (*map*) types? And > finally, if I ever get a map_traits, documentation tells me of a > element_type attribute, but how do I get the key type (maps have keys and > values...). I didn't have a need for such functionality, so it is not implemented. The easiest way to add is to extend xxx_traits class and to add few functions: * "is_sequence" * key_type As always, if you can wait a little, I can add this functionality, if not patches are welcome. -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ |