[C++-sig] Py++ - one header file including all project header files

Roman Yakovenko roman.yakovenko at gmail.com
Sat Mar 20 19:17:05 CET 2010


On Fri, Mar 19, 2010 at 1:27 AM, Maciej Sitarz <macieksitarz at wp.pl> wrote:
> On 17.03.2010 08:52, Roman Yakovenko wrote:
>>
>> Nothing, really.
>>
>> Please take a look on the following document:
>>
>> http://language-binding.net/pyplusplus/documentation/tutorials/module_builder/module_builder.html#declarations-customization
>> and let me know whether is makes sense to you.
>>
>> If not come back and we will resolve the issue
>
> Thanks, I added this two loops for ex/including some classes and now it
> works as it should.
>
> # Include Cream CE classes
> for class_name in environment.include_classes:
>        print "Including class '%s'" % class_name
>        mb.class_( name=class_name ).include()
>
> # Exclude Cream CE classes
> for class_name in environment.exclude_classes:
>        print "Excluding class '%s'" % class_name
>        mb.class_( name=class_name ).exclude()


You can write it shorter:

mb._classes( lambda cls: cls.name in environment.exclude_classes ).exclude()

:-)

-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/


More information about the Cplusplus-sig mailing list