The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Clownfish::Binding::Core::Method - Generate core C code for a method.

DESCRIPTION

Clownfish::Method is an abstract specification; this class generates C code which implements the specification.

METHODS

method_def

    my $c_code = Clownfish::Binding::Core::Method->method_def(
        method => $method,
        $class => $class,
    );

Return C code for the static inline vtable method invocation function.

  • method - A Clownfish::Method.

  • class - The Clownfish::Class which will be invoking the method - LobsterClaw needs its own method invocation function even if the method was defined in Claw.

typedef_dec

    my $c_code = Clownfish::Binding::Core::Method->typedef_dec($method);

Return C code expressing a typedef declaration for the method.

callback_dec

    my $c_code = Clownfish::Binding::Core::Method->callback_dec($method);

Return C code declaring the Callback object for this method.

callback_obj_def

    my $c_code 
        = Clownfish::Binding::Core::Method->callback_obj_def($method);

Return C code defining the Callback object for this method, which stores introspection data and a pointer to the callback function.

callback_def

    my $c_code = Clownfish::Binding::Core::Method->callback_def($method);

Return C code implementing a callback to the Host for this method. This code is used when a Host method has overridden a method in a Clownfish class.

abstract_method_def

    my $c_code 
        = Clownfish::Binding::Core::Method->abstract_method_def($method);

Return C code implementing a version of the method which throws an "abstract method" error at runtime.

COPYRIGHT AND LICENSE

Copyright 2008-2011 Marvin Humphrey

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.