Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

extutils::xspp::node::function(3pm) [debian man page]

ExtUtils::XSpp::Node::Function(3pm)			User Contributed Perl Documentation		       ExtUtils::XSpp::Node::Function(3pm)

NAME
ExtUtils::XSpp::Node::Function - Node representing a function DESCRIPTION
An ExtUtils::XSpp::Node subclass representing a single function declaration such as int foo(); More importantly, ExtUtils::XSpp::Node::Method inherits from this class, so all in here equally applies to method nodes. METHODS
new Creates a new "ExtUtils::XSpp::Node::Function". Named parameters: "cpp_name" indicating the C++ name of the function, "perl_name" indicating the Perl name of the function (defaults to the same as "cpp_name"), "arguments" can be a reference to an array of "ExtUtils::XSpp::Node::Argument" objects and finally "ret_type" indicates the (C++) return type of the function. Additionally, there are several optional decorators for a function declaration (see ExtUtils::XSpp for a list). These can be passed to the constructor as "code", "cleanup", "postcall", and "catch". "catch" is special in that it must be a reference to an array of class names. resolve_typemaps Fetches the ExtUtils::XSpp::Typemap object for the return type and the arguments from the typemap registry and stores a reference to those objects. resolve_exceptions Fetches the ExtUtils::XSpp::Exception object for the %catch directives associated with this function. add_exception_handlers Adds a list of exception names to the list of exception handlers. This is mainly called by a class' "add_methods" method. If the function is hard-wired to have no exception handlers, any extra handlers from the class are ignored. print_declaration Returns a string with a C++ method declaration for the node. perl_function_name Returns the name of the Perl function to generate. is_method Returns whether the object at hand is a method. Hard-wired to be false for "ExtUtils::XSpp::Node::Function" object, but overridden in the ExtUtils::XSpp::Node::Method sub-class. has_argument_with_length Returns true if the function has any argument that uses the XS length feature. ACCESSORS
cpp_name Returns the C++ name of the function. perl_name Returns the Perl name of the function (defaults to same as C++). set_perl_name Sets the Perl name of the function. arguments Returns the internal array reference of ExtUtils::XSpp::Node::Argument objects that represent the function arguments. ret_type Returns the C++ return type. code Returns the %code decorator if any. set_code Sets the implementation for the method call (equivalent to using %code); takes the code as an array reference containing the lines. cleanup Returns the %cleanup decorator if any. postcall Returns the %postcall decorator if any. catch Returns the set of exception types that were associated with the function via %catch. (array reference) set_static Sets the "static"-ness attribute of the function. Can be either undef (i.e. not static), "package_static", or "class_static". package_static Returns whether the function is package static. A package static function can be invoked as: My::Package::Function( ... ); class_static Returns whether the function is class static. A class static function can be invoked as: My::Package->Function( ... ); perl v5.14.2 2011-12-20 ExtUtils::XSpp::Node::Function(3pm)

Check Out this Related Man Page

ExtUtils::Typemaps::OutputMap(3)			User Contributed Perl Documentation			  ExtUtils::Typemaps::OutputMap(3)

NAME
ExtUtils::Typemaps::OutputMap - Entry in the OUTPUT section of a typemap SYNOPSIS
use ExtUtils::Typemaps; ... my $output = $typemap->get_output_map('T_NV'); my $code = $output->code(); $output->code("..."); DESCRIPTION
Refer to ExtUtils::Typemaps for details. METHODS
new Requires "xstype" and "code" parameters. code Returns or sets the OUTPUT mapping code for this entry. xstype Returns the name of the XS type of the OUTPUT map. cleaned_code Returns a cleaned-up copy of the code to which certain transformations have been applied to make it more ANSI compliant. targetable This is an obscure optimization that used to live in "ExtUtils::ParseXS" directly. In a nutshell, this will check whether the output code involves calling "set_iv", "set_uv", "set_nv", "set_pv" or "set_pvn" to set the special $arg placeholder to a new value AT THE END OF THE OUTPUT CODE. If that is the case, the code is eligible for using the "TARG"-related macros to optimize this. Thus the name of the method: "targetable". If the optimization can not be applied, this returns undef. If it can be applied, this method returns a hash reference containing the following information: type: Any of the characters i, u, n, p with_size: Bool indicating whether this is the sv_setpvn variant what: The code that actually evaluates to the output scalar what_size: If "with_size", this has the string length (as code, not constant) SEE ALSO
ExtUtils::Typemaps AUTHOR
Steffen Mueller "<smueller@cpan.org"> COPYRIGHT &; LICENSE Copyright 2009, 2010, 2011, 2012 Steffen Mueller This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.16.3 2012-11-19 ExtUtils::Typemaps::OutputMap(3)
Man Page