perl-Stlgen-0.012-alt4.1.i586.rpm


Advertisement

Description

perl-Stlgen - Create "Standard Template Library" (STL) C++ type containers but generate code in other languages

Property Value
Distribution ALT Linux Sisyphus
Repository Autoimports i586
Package filename perl-Stlgen-0.012-alt4.1.i586.rpm
Package name perl-Stlgen
Package version 0.012
Package release alt4.1
Package architecture i586
Package type rpm
Category Development/Perl
Homepage -
License -
Maintainer -
Download size 76.49 KB
Installed size 76.49 KB
Stlgen is based off the Standard Template Library (STL) for C++ here:
_http://www.cplusplus.com/reference/stl/
The difference is that Stlgen will generate instances of STL templates
in a different language. The default language is c.
This example below uses Stlgen to generate list_uint.(c/h) files which will implement
a linked list container coded in the c language.
_#!/usr/bin/perl -w
_use Stlgen;
_my $inst = Stlgen->New(
__Template=>'list',
__Instancename => 'uint',
__payload => [
___{name=>'uint',   type=>'unsigned int', dumper=>'printf("\t\tuint = %u\n", currelement->uint);'},
__],
_);
_$inst->Instantiate();
You could use these files in a main.c program like this:
_#include <stdio.h>
_#include "list_uint.h"
_int main (void) {
__struct list_uint_list *mylist;
__mylist = list_uint_constructor();
_
__list_uint_push_back(mylist, 21);
__list_uint_push_back(mylist, 99);
__list_uint_push_back(mylist, 33);
__list_uint_push_back(mylist, 34);
__list_uint_push_back(mylist, 67);
__list_uint_push_back(mylist, 12);
__list_uint_push_back(mylist, 28);
__list_uint_push_back(mylist, 55);
__list_uint_push_back(mylist, 76);
__list_uint_sort(mylist);
__printf("\n\n\nThis is the sorted list\n");
__list_uint_list_dumper(mylist);
__return 0;
_}
The above c program currently works and produces the following output
when you compile and execute it:
_This is the sorted list
_// list at address 140644360{
_'beforefirst' marker:
__// element at address 8621018
___prev = 0
___next = 8621088
___uint = 0
_user elements:
__// element at address 8621088
___prev = 8621018
___next = 8621038
___uint = 12
__// element at address 8621038
___prev = 8621088
___next = 8621098
___uint = 21
__// element at address 8621098
___prev = 8621038
___next = 8621058
___uint = 28
__// element at address 8621058
___prev = 8621098
___next = 8621068
___uint = 33
__// element at address 8621068
___prev = 8621058
___next = 86210a8
___uint = 34
__// element at address 86210a8
___prev = 8621068
___next = 8621078
___uint = 55
__// element at address 8621078
___prev = 86210a8
___next = 86210b8
___uint = 67
__// element at address 86210b8
___prev = 8621078
___next = 8621048
___uint = 76
__// element at address 8621048
___prev = 86210b8
___next = 8621028
___uint = 99
_'afterlast' marker:
__// element at address 8621028
___prev = 8621048
___next = 0
___uint = 0
Note: this is a pre-alpha version. Currently the only STL container
implemented is the linked list. And that hasn't been tested very well yet.
The "push", "pop", "size", "sort", and "dumper" functions are known to work.

Alternatives

Package Version Architecture Repository
perl-Stlgen-0.012-alt4.1.x86_64.rpm 0.012 x86_64 Autoimports
perl-Stlgen - - -

Requires

Name Value
/usr/share/perl5 -
perl(Data/Dumper.pm) -
perl(Template.pm) -
rpmlib(PayloadIsLzma) -

Provides

Name Value
perl(Stlgen.pm) = 0.012
perl-Stlgen = 0.012-alt4.1

Download

Type URL
Mirror ftp.altlinux.org
Binary Package perl-Stlgen-0.012-alt4.1.i586.rpm
Source Package perl-Stlgen-0.012-alt4.1.src.rpm

Install Howto

  1. Add the following line to /etc/apt/sources.list:
    
    rpm [Sisyphus] http://ftp.altlinux.org/pub/distributions/ALTLinux/autoimports/Sisyphus i586 autoimports
    rpm [Sisyphus] http://ftp.altlinux.org/pub/distributions/ALTLinux/autoimports/Sisyphus noarch autoimports
    
  2. Update the package index:
    # sudo apt-get update
  3. Install perl-Stlgen rpm package:
    # sudo apt-get install perl-Stlgen

Files

Path
/usr/share/doc/perl-Stlgen-0.012/Changes
/usr/share/doc/perl-Stlgen-0.012/README
/usr/share/perl5/Stlgen.pm
/usr/share/perl5/Stlgen/
/usr/share/perl5/Stlgen/templates/
/usr/share/perl5/Stlgen/templates/c/
/usr/share/perl5/Stlgen/templates/c/list/list_NAME.c
/usr/share/perl5/Stlgen/templates/c/list/list_NAME.h

See Also

Package Description
perl-Storable-AMF-1.23-alt3.1.i586.rpm serializing/deserializing AMF0/AMF3 data
perl-Store-Opaque-0.03-alt4.1.i586.rpm Opaque objects to prevent accidental Dumping or appearance in stack traces
perl-String-Base-0.003-alt4_7.i586.rpm String index offsetting
perl-String-CP1251-0.01-alt4.1.i586.rpm Perl extension for processing CP1251-encoded string
perl-String-Comments-Extract-0.023-alt4.1.i586.rpm Extract comments from C/C++/JavaScript/Java source
perl-String-DiffLine-0.03-alt3.1.i586.rpm find the character, line, and line position of the first difference in two strings
perl-String-Ediff-0.09-alt4.1.i586.rpm perl module String-Ediff
perl-String-Index-0.02-alt4.1.i586.rpm perl module String-Index
perl-String-KeyboardDistanceXS-0.02-alt4.1.i586.rpm perl module String-KeyboardDistanceXS
perl-String-LCSS_XS-1.2-alt4.1.i586.rpm Find The Longest Common Substring of Two Strings
perl-String-LRC-1.01-alt4.1.i586.rpm perl module String-LRC
perl-String-MMM-0.0.3-alt4.1.i586.rpm Perl XS for comparing (matching) strings MasterMind style
perl-String-Numeric-XS-0.9-alt4.1.i586.rpm XS implementation of String::Numeric
perl-String-Slice-0.08-alt3.1.i586.rpm Shared Memory Slices of Bigger Strings
perl-String-Strip-1.02-alt4.1.i586.rpm perl module String-Strip
Advertisement
Advertisement