Re: [pygccxml-development] Finalizing a class?
Brought to you by:
mbaas,
roman_yakovenko
|
From: Allen B. <al...@vr...> - 2006-05-17 15:35:31
|
This seems like something that should be made easier for the user.
Perhaps something like:
my_ns.class_("ClassA").finalize()
class_a.member_function("my_method").finalize()
Is there any reason pyplusplus can't provide a more simple interface
like this for the user?
-Allen
Roman Yakovenko wrote:
> On 5/17/06, Allen Bierbaum <al...@vr...> wrote:
>
>> Is it possible to finalize a wrapped class? In the library I am
>> wrapping there are a number of classes that I know I do not want to
>> allow the users to extend. Thus I would like to not expose protected
>> method or provide a wrapper to allow overriding virtuals.
>>
>> Is it possible to do this with pyplusplus?
>
>
> The short answer - may be yes.
>
> mb = module_builder_t( ... )
> non_public = ~declarations.access_type_matcher_t( 'public' )
> mb.calldefs( query ).exclude()
>
> mb.member_functions().virtuality =
> declarations.VIRTUALITY_TYPES.NOT_VIRTUAL
>
> This is a hack, but it should work.
>
> The long answer is here:
> http://sourceforge.net/mailarchive/forum.php?forum_id=47898&max_rows=25&style=flat&viewmonth=200603&viewday=20
>
>
>> -Allen
>
>
|