Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.343.559 Times

Class::STL::Containers for Linux 0.35

Company: Mario Gaffiero
Date Added: November 29, 2013  |  Visits: 559

Class::STL::Containers for Linux

Report Broken Link
Printer Friendly Version


Product Homepage
Download (37 downloads)



Class::STL::Containers is a Perl modulethat provides a framework for rapid Object Oriented Perl application development. It consists of a number of base classes that are similar to the C++/STL framework, plus a number of helper classes which provide the glue to transparently generate common functions, and will enable you to put your Perl application together very quickly.<br /><br />The STL functionality provided consists of containers, algorithms, utilities and iterators as follows:<br /><br />Containers<br /><br /> vector, list, deque, queue, priority_queue, stack, tree.<br /><br />Iterators<br /><br /> iterator, bidirectional_iterator, reverse_iterator, forward_iterator.<br /><br />Algorithms<br /><br /> find, find_if, for_each, transform, count, count_if, copy, copy_backward, remove, remove_if, remove_copy, remove_copy_if, replace, replace_if, replace_copy, replace_copy_if.<br /><br />Utilities<br /><br /> equal_to, not_equal_to, greater, greater_equal, less, less_equal, compare, bind1st, bind2nd, mem_fun, ptr_fun, ptr_fun_binary, matches, matches_ic, logical_and, logical_or, multiplies, divides, plus, minus, modulus.<br /><br />SYNOPSIS<br /><br /> use stl;<br /><br /> # Deque container...<br /> my $d = stl::deque(qw(first second third fourth));<br /> $d->push_back($d->factory('fifth'));<br /> $d->push_front($d->factory('seventh'));<br /> $d->pop_front(); # remove element at front.<br /> $d->pop_back(); # remove element at back.<br /> stl::for_each($d->begin(), $d->end(), ptr_fun('::myprint'));<br /> <br /> sub myprint { print "Data:", @_, "<br />"; }<br /><br /> # Copy constructor...<br /> my $d_copy = stl::deque($d);<br /><br /> # Algorithms -- find_if()<br /> print "Element 'second' was ",<br /> stl::find_if($d->begin(), $d->end(), stl::bind1st(stl::equal_to(), 'second'))<br /> ? 'found' : 'not found', "<br />";<br /><br /> # Algorithms -- count_if()<br /> print "Number of elements matching /o/ = ",<br /> stl::count_if($d->begin(), $d->end(), stl::bind2nd(stl::matches(), 'o')),<br /> "<br />"; # prints '2' -- matches 'second' and 'fourth'<br /><br /> # Algorithms -- transform()<br /> stl::transform($d->begin(), $d->end(), $d2->begin(), stl::ptr_fun('ucfirst'));<br /> stl::transform($d->begin(), $d->end(), $d2->begin(), $d3->begin(), stl::ptr_fun_binary('::mybfun'));<br /> sub mybfun { return $_[0] . '-' . $_[1]; }<br /><br /> # Function Adaptors -- bind1st<br /> stl::remove_if($v->begin(), $v->end(), stl::bind1st(stl::equal_to(), $v->back()));<br /> # remove element equal to back() -- ie remove last element.<br /> stl::remove_if($v->begin(), $v->end(), stl::bind2nd(stl::matches(), '^fi'));<br /> # remove all elements that match reg-ex '^fi'<br /><br /> # Sort list according to elements cmp() function<br /> $v->sort();<br /><br /> # Queue containers -- FIFO<br /> my $v = stl::queue(qw(first second third fourth fifth));<br /> print 'Back:', $v->back()->data(), "<br />" # Back:fifth<br /> print 'Front:', $v->front()->data(), "<br />" # Front:first<br /> $v->pop(); # pop element first in<br /> $v->push($v->factory('sixth')), "<br />"<br /> print 'Back:', $v->back()->data(), "<br />" # Back:sixth<br /> print 'Front:', $v->front()->data(), "<br />" # Front:second<br /><br /> # Iterators<br /> for (my $i = $v->begin(); !$i->at_end(); ++$i)<br /> {<br /> print "Data:", $i->p_element()->data();<br /> }<br /><br /> # Iterators -- reverse_iterator<br /> my $ri = stl::reverse_iterator($v->iter())->first();<br /> while (!$ri->at_end())<br /> {<br /> print "Data:", $ri->p_element()->data();<br /> ++$ri;<br /> }<br /><br /> # Inserters<br /> my $three2one = stl::list(qw(3 2 1));<br /> my $four2six = stl::list(qw(4 5 6));<br /> my $seven2nine = stl::list(qw(7 8 9));<br /> my $result = stl::list();<br /> stl::copy($three2one->begin(), $three2one->end(), stl::front_inserter($result));<br /> stl::copy($seven2nine->begin(), $seven2nine->end(), stl::back_inserter($result));<br /> my $iseven = stl::find($result->begin(), $result->end(), 7);<br /> stl::copy($four2six->begin(), $four2six->end(), stl::inserter($result, $iseven));<br /> # $result now contains (1, 2, 3, 4, 5, 6, 7, 8, 9);<br /><br /> # Vector container...<br /> my $v = stl::vector(qw(first second third fourth fifth));<br /> <br /> my $e = $v->at(0); # return pointer to first element.<br /> print 'Element-0:', $e->data(), "<br />"; # Element-0:first<br /> $e = $v->at($v->size()-1); # return pointer to last element.<br /> print 'Element-last:', $e->data(), "<br />"; # Element-last:fifth<br /> $e = $v->at(2); # return pointer to 3rd element (idx=2).<br /> print 'Element-2:', $e->data(), "<br />"; # Element-2:third<br /><br /> # Priority Queue<br /> my $p = stl::priority_queue();<br /> $p->push($p->factory(priority => 10, data => 'ten'));<br /> $p->push($p->factory(priority => 2, data => 'two'));<br /> $p->push($p->factory(priority => 12, data => 'twelve'));<br /> $p->push($p->factory(priority => 3, data => 'three'));<br /> $p->push($p->factory(priority => 11, data => 'eleven'));<br /> $p->push($p->factory(priority => 1, data => 'one'));<br /> $p->push($p->factory(priority => 1, data => 'one-2'));<br /> $p->push($p->factory(priority => 12, data => 'twelve-2'));<br /> $p->push($p->factory(priority => 20, data => 'twenty'), $p->factory(priority => 0, data => 'zero'));<br /> print "$p->size()=", $p->size(), "<br />";<br /> print "$p->top():", $p->top(), "<br />";<br /> $p->top()->priority(7); # change priority for top element.<br /> $p->refresh(); # refresh required after priority change.<br /> $p->pop(); # remove element with highest priority.<br /> print "$p->top():", $p->top(), "<br />";<br /><br /> # Clone $d container into $d1...<br /> my $d1 = $d->clone();<br /><br /> my $d2 = stl::deque(qw(sixth seventh eight));<br /><br /> # Append $d container to end of $d2 container...<br /> $d2 += $d;<br /><br /> # DataMembers -- Class builder helper...<br /> {<br /> package MyClass;<br /> use Class::STL::ClassMembers (<br /> qw(attrib1 attrib2), # data members<br /> Class::STL::ClassMembers::DataMember->new(<br /> name => 'attrib3', default => '100', validate => '^d+$'), # data member with attributes<br /> Class::STL::ClassMembers::DataMember->new(<br /> name => 'attrib4', default => 'med', validate => '^(high|med|low)$'),<br /> );<br /> use Class::STL::ClassMembers::Constructor; # produce class new() function<br /> }<br /> my $cl = MyClass->new(attrib1 => 'hello', attrib2 => 'world');<br /> print $cl->attrib1(), " ", $cl->attrib2(), "<br />"; # 'hello world'<br /> $cl->attrib1(ucfirst($cl->attrib1));<br /> $cl->attrib2(ucfirst($cl->attrib2));<br /> print $cl->attrib1(), " ", $cl->attrib2(), "<br />"; # 'Hello World'<br /> $cl->attrib4('avg'); # Causes progam to die with '** Function attrib2 value failed validation...'

Requirements: No special requirements
Platforms: *nix, Linux
Keyword: 09second09 Algorithms Attrib Class Class Stl Container Containers Dgtend Egtdata Element Elements Fourth Iseven Linux Pgtpushpgtfactorypriority Pointer Print Priority Quotdataquot Quotquot Remove Return Stl Stl Containers
Users rating: 0/10

License: Freeware Size: 61.44 KB
USER REVIEWS
More Reviews or Write Review


CLASS::STL::CONTAINERS FOR LINUX RELATED
Libraries  -  uSTL 1.0
uSTL is a partial implementation of the Standard Template Library which reduces code size by factoring memory management code into a non-template base class and deriving containers from it. Whats New in This Release: - This is the...
102.4 KB  
Utilities  -  DragonFly BSD 3.0.1
DragonFly belongs to the same class of operating systems as other BSD-derived systems and Linux. It is based on the same UNIX ideals and APIs and shares ancestor code with other BSD operating systems. DragonFly provides an opportunity for the BSD...
180.36 MB  
Libraries  -  Class::Declare 0.08
Class::Declare is a Perl module created to declare classes with public, private and protected attributes and methods. SYNOPSIS package My::Class; use strict; use warnings; use base qw( Class::Declare ); __PACKAGE__->declare( public =>...
76.8 KB  
Libraries  -  Class::Prototyped::Mixin 2.4
Class::Prototyped::Mixin Perl module contains Mixin Support for Class::Prototyped. SYNOPSIS Usage one: whip up a class and toss it in a scalar package HelloWorld; sub hello { my ($self, $age) = @_; return "Hello World! I am $age years...
11.26 KB  
Miscellaneous  -  ExceptionContainer 1.0
ExceptionContainer script is an Exception base-class that supports keyword arguments and printing.
 
Libraries  -  OpenOffice::OODoc::Text 2.032
OpenOffice::OODoc::Text is a Perl module for the text processing submodule of OpenOffice::OODoc. This manual chapter describes the text-oriented methods of OpenOffice::OODoc, implemented by the OpenOffice::OODoc::Text class, and inherited by the...
215.04 KB  
Network & Internet  -  django-immutablefield 0.1.1
django-immutablefield is inspired by a Google search that didn't turn up a reusable solution for making fields immutable inside of a Django model. Installing One of the following: Via the ole' standby:
10.24 KB  
Programming  -  FinvoiceLib 0.1.13
FinvoiceLib is a free and open source library built for reading Finvoice XML files. Finvoice is one of most commonly used XML dialects used for electronic invoicing in Finland.One of the major drawbacks of this format has been the lack...
61.44 KB  
Programming  -  HTML::Element::Replacer for Linux 0.06
blah blah Now let's say...
10.24 KB  
HTML Utilities  -  django-reporter 0.1
Django-reporter A Django application to create automated email reports in .csv format. It includes a management command that is intended to be invoked periocically from cron. Installation To install: pip...
10.24 KB  
NEW DOWNLOADS IN LINUX SOFTWARE, PROGRAMMING
Linux Software  -  EasyEDA PCB Designer for Linux 2.0.0
EasyEDA, a great web based EDA(Electronics Design Automation) tool, online PCB tool, online PCB software for electronics engineers, educators, students, makers and enthusiasts. Theres no need to install any software. Just open EasyEDA in any...
34.4 MB  
Linux Software  -  wpCache® WordPress HTTP Cache 1.9
wpCache® is a high-performance, distributed object, caching system application, generic in nature, but intended for use in speeding up dynamic web applications, by decreasing database load time. wpCache® decreases dramatically the page...
3.51 MB  
Linux Software  -  Polling Autodialer Software 3.4
ICTBroadcast Auto Dialer software has a survey campaign for telephone surveys and polls. This auto dialer software automatically dials a list of numbers and asks them a set of questions that they can respond to, by using their telephone keypad....
488 B  
Linux Software  -  Total Video Converter Mac Free 3.5.5
Total Video Converter Mac Free developed by EffectMatrix Ltd is the official legal version of Total Video Converter which was a globally recognized brand since 2006. Total Video Converter Mac Free is a free but powerful all-in-one video...
17.7 MB  
Linux Software  -  Skeith mod_log_sql Analyzer 2.10beta2
Skeith is a php based front end for analyzing logs for Apache using mod_log_sql.
47.5 KB  
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB