1ExtUtils::Typemaps::STLU:s:eSrtrCionngt(r3i)buted Perl DEoxctuUmteinltsa:t:iToynpemaps::STL::String(3)
2
3
4
6 ExtUtils::Typemaps::STL::String - A set of typemaps for STL
7 std::strings
8
10 use ExtUtils::Typemaps::STL::String;
11 # First, read my own type maps:
12 my $private_map = ExtUtils::Typemaps->new(file => 'my.map');
13
14 # Then, get the object map set and merge it into my maps
15 $private_map->merge(typemap => ExtUtils::Typemaps::STL::String->new);
16
17 # Now, write the combined map to an output file
18 $private_map->write(file => 'typemap');
19
21 "ExtUtils::Typemaps::STL::String" is an "ExtUtils::Typemaps" subclass
22 that provides a set of mappings for C++ STL strings. These are:
23
24 TYPEMAP
25 std::string T_STD_STRING
26 std::string* T_STD_STRING_PTR
27
28 INPUT
29 T_STD_STRING
30 $var = std::string( SvPV_nolen( $arg ), SvCUR( $arg ) );
31
32 T_STD_STRING_PTR
33 $var = new std::string( SvPV_nolen( $arg ), SvCUR( $arg ) );
34
35 OUTPUT
36 T_STD_STRING
37 $arg = newSVpvn( $var.c_str(), $var.length() );
38
39 T_STD_STRING_PTR
40 $arg = newSVpvn( $var->c_str(), $var->length() );
41
43 These are the overridden methods:
44
45 new
46 Creates a new "ExtUtils::Typemaps::STL::String" object. It acts as any
47 other "ExtUtils::Typemaps" object, except that it has the string type
48 maps initialized.
49
51 ExtUtils::Typemaps, ExtUtils::Typemaps::Default,
52 ExtUtils::Typemaps::ObjectMap
53
55 Steffen Mueller <smueller@cpan.org>
56
58 Copyright 2010, 2011, 2012, 2013 by Steffen Mueller
59
60 This program is free software; you can redistribute it and/or modify it
61 under the same terms as Perl itself.
62
63
64
65perl v5.32.1 2021-01-27ExtUtils::Typemaps::STL::String(3)