
===========
pure-stllib
===========

.. default-domain:: pure

Version 0.1, |today|

| Peter Summerland <p.summerland@gmail.com>

pure-stllib is an "umbrella" package that contains a pair of Pure addons,
pure-stlvec and pure-stlmap. These addons provide `Pure`_ interfaces to a
selection of containers provided by the `C++ Standard Library`_, specialized
to hold pointers to arbitrary Pure expressions. pure-stlvec is a Pure
interface to C++'s vector and the STL algorithms that act on them. pure-stlmap
is an interface to six (of the eight) of C++'s associative containers: map,
set, multimap, multiset, unordered_map and unordered_set.

.. _Pure: http://pure-lang.googlecode.com

.. _C++ Standard Library: http://en.cppreference.com/w/cpp

.. only:: html

   .. contents:: :local:


Copying
=======

| Copyright (c) 2011-2012 by Peter Summerland <p.summerland@gmail.com>.

All rights reserved. 

pure-stllib is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. 

pure-stllib is distributed under a BSD-style license, see the COPYING file
for details.

Installation
============

pure-stllib-0.1 requires at least Pure 0.50. The latest version of
Pure is available at http://code.google.com/p/pure-lang/downloads/list.

The latest version of the source code for pure-stllib can be downloaded from
http://pure-lang.googlecode.com/files/pure-stllib-0.1.tar.gz.
 
To install pure-stllib (on Linux), extract the source code (e.g., tar -xzf
pure-stllib-0.1.tar.gz), cd to the pure-stllib-0.1 directory, and
run ``make``. After this you can (and should) also run ``make check`` to run a
few unit tests to make sure that pure-stlvec and pure-stlmap work properly on
your system. If ``make check`` works, run ``sudo make install`` to install
pure-stlvec and pure-stlmap. Run ``sudo make uninstall`` to remove them.

``make`` tries to guess your Pure installation directory and platform-specific
setup. If it gets this wrong, you can set some variables manually. In
particular, ``make install prefix=/usr`` sets the installation prefix. Please
see the Makefile for details.

Usage
=====

The functions provided by pure-stlvec and pure-stlmap are made available by
importing one or more modules.

pure-stlvec provides two basic modules:

  :mod:`stlvec` - support for stlvecs (wrappers around C++ vectors)

  :mod:`stlvec::algorithms` - STL algorithms specialized to act on stlvecs

pure-stlmap provides three modules :

  :mod:`stlmap` - support for stlmap and stlset (wrappers around C++ map and set)

  :mod:`stlmmap` - support for stlmmap and stlmset (wrappers around C++ mulitmap and multiset)

  :mod:`stlhmap` - support for stlhmap and stlhset (wrappers around C++ unordered_map and unordered_set) 

The functions that act on containers provided by the stlmap, stlmmap, stlhmap
and stlvec modules are summarized in a rudimentary cheatsheet,
pure-stllib-cheatsheet.pdf, which can be found in the pure-stllib/doc
directory.

Documentation
=============

Please see the documentation for :doc:`pure-stlvec` and :doc:`pure-stlmap`.

Changes
=======

Version 0.1 - Bundle pure-stlvec-0.3 and pure-stlmap-0.1.




