wiki:LibrariesUnderConstruction

Version 150 (modified by viboes, 11 years ago) ( diff )

Added Generic & TypeErasure

  1. Libraries Under Construction
    1. Boost.AllocPlus
    2. Boost.Asio.eos_portable_archive
    3. Boost.Async
    4. Boost.Atomic
    5. Boost.AutoFunction
    6. Boost.Bitfield
    7. Boost.BloomFilters
    8. Boost.Channel
    9. Boost.CLI
    10. Boost.Cloneable
    11. Boost.ClonePtr
    12. Boost.Contract
    13. Boost.Construe
    14. Boost.ConstantTimeSize
    15. Boost.Convert
    16. Boost.CounterTree
    17. Boost.Coroutines
    18. Boost.Creasing
    19. Boost.Crypto
    20. Boost.Dataflow
    21. Boost.Egg
    22. Boost.Endian
    23. Boost.Euclid
    24. Boost.Extension
    25. Boost.Explore
    26. Boost.Generic
    27. Boost.Fsm
    28. Boost.Hash
    29. Boost.Identification
    30. Boost.Integer.Endian.Ext
    31. Boost.Interfaces
    32. Boost.InterThreads
    33. Boost.Introspection
    34. Boost.Introspection2
    35. Boost.Lexer
    36. Boost.LUID
    37. Boost.MapReduce
    38. Boost.Mirror
    39. Boost.Monotonic
    40. Boost.MPL.Ext
    41. Boost.MSF
    42. Boost.Numeric.Odeint
    43. Boost.NumericBindings
    44. Boost.Overload
    45. Boost.Persistent
    46. Boost.Plot
    47. Boost.Process
    48. Boost.Reflection
    49. Boost.RendezVous
    50. Boost.RPC
    51. Boost.RDB
    52. Boost.RTL
    53. Boost.Singleton
    54. Boost.SmartPtr.UniquePtr
    55. Boost.SafeInt
    56. StableVector
    57. Boost.STM
    58. Boost.Sync
    59. Boost.Synchro
    60. Boost.Task
    61. Boost.TimerQueue
    62. Boost.ThreaderJoiner
    63. Boost.Tokenmap
    64. Boost.Tree
    65. Boost.TypeErasure
    66. Boost.Unicode
    67. Boost.Unicode2
    68. Boost.XInt
    69. Boost.XML
  2. Other Open Source libraries
    1. ASL
    2. async
    3. coco
    4. Poet
    5. TBB
    6. tscb
  3. Libraries Wish list
    1. Accumulators.Ext
    2. Association
    3. Cloner
    4. CallStack
    5. ConstraintsProgramming
    6. Databases
    7. Enums
    8. EnumSet
    9. EnumArray
    10. Frames
    11. ObjectRole
    12. Quartets
    13. SpreadSheet
  4. Abandoned
    1. Boost.ConceptTraits
  5. Libraries Listed by Category
    1. Algorithms
    2. Broken compiler workarounds
    3. Concurrent Programming
    4. Containers
    5. Correctness And Testing
    6. Data Communications
    7. Data Structures
    8. Database
    9. Debug
    10. Distribution
    11. Function Objects And Higher-order Programming
    12. Generic Programming
    13. Graphical User Interface
    14. Idioms
    15. Image Processing
    16. Input/Output
    17. Inter-language support
    18. Iterators
    19. Language Features Emulation
    20. Math And Numerics
    21. Memory
    22. Parsing
    23. Patterns
    24. Portability
    25. Preprocessor Metaprogramming
    26. Programming Interfaces
    27. Reflective Programming
    28. String And Text Processing
    29. System
    30. Template Metaprogramming
    31. Test
    32. Utilities
    33. XML
    34. Miscellaneous

WARNING: The contents of this page could be incomplete and outdated. Please help us to improve this page by modifying it directly or posting on the Boost mailing lists boost-AT-lists.boost.org or boost-users-AT-lists.boost.org with the prefix `[LibrariesUnderConstruction].

See Boost Releases documentation for the list of libraries Boost by release. See Boost Review Schedule for Boost ongoing details.

Most of the ongoing libraries are stored on the SVN Sandbox, the Boost Vault or on specific sites.


Libraries Under Construction

This page is an index page for libraries under construction.


Boost.AllocPlus


Boost.Asio.eos_portable_archive


Boost.Async

  • Author(s): Vicente J. Botet Escribá
  • Version: 0.2
  • State: Quite Stable
  • Last upload: 2009 May 24
  • Links: Boost Vault Boost Sandbox Documentation
  • Categories: Concurrent Programming Containers
  • Description: Asynchronous Executors (AE) and Asynchronous Completion Tokens (ACT) in a generic way (or at least this was my intention). The library can be considered as a front-end for several Asynchronous Execution models making it possible to share common algorithms and making easier to switch from an Asynchronous Executors to another.

Next follows the motivation for the library and how the library can manage with this concepts.

In N1833 - Preliminary Threading Library Proposal for TR2 Kevlin Henney introduce the concept of threader and a function thread that evaluate a function asynchronously and returns a joiner handle. In N2185 - Proposed Text for Parallel Task Execution Peter Dimov introduce a fork function able to evaluate a function asynchronously and returns a future handle. In N2276 - Thread Pools and Futures Anthony William introduce launch_in_thread and launch_in_pool function templates which evaluate a function asynchronously either in a specific thread or a thread pool and returns a unique_future handle. In Boost.ThreadPool Oliver Kowalke propose a complete implementation of a thread pool with a submit function which evaluate a function asynchronously and returns a task handle.

Behind all these proposal there is a concept of asynchronous executor, fork-launch-like function and the asynchronous completion token handle.

Name executor fork-like ACT
Boost.Thread ?? thread constructor thread
Boost.ThreadPool tp::pool submit tp::task
N2276 thread launch_in_thread unique_future<T>
N2276 thread_pool launch_in_pool unique_future<T>
N2185 ?? fork future<T>
N1833 threader thread joiner<T>

The asynchronous completion token models can follows two interfaces, the thread interface and the unique_future interface. Some asynchronous completion token handles allows to recover the result of the evaluation of the function (futures), other allows to manage the underlying thread of execution (thread) and some both (joiner and tp::task).

It seems natural to make a generic fork function that will evaluate a function asynchronously with respect to the calling thread and returns an ACT handle. The following meta-function associated an ACT handle to a asynchronous executor.

template <typename AE, typename T>
struct asynchronous_completion_token {
    typedef typename AE::template handle<T>::type type;
};    

The result of forking a nullary function by an asynchronous executor is given by the following meta-function:

namespace result_of { 
    template <typename AE,typename F>
    struct fork {
        typedef typename asynchronous_completion_token<AE, typename result_of<F()>::type>::type type;
    };   
}

The default implementation of fork delegates on fork asynchronous executor function.

template< typename AE, typename F > 
result_of::fork<AE, F>::type fork( AE& ae, F fn ) {
    return ae.fork(fn);
}

Forking n-ary functions relies on the nullary version and bind.

template< typename AE, typename F, typename A1, ..., typename An > 
asynchronous_completion_token<AE, typename result_of<F(A1,..., An)>::type >::type 
fork( AE& ae, F fn, A1 a1, ..., An an ) {
    return ae.fork( bind( fn, a1, ..., an ) );
}

Boost.Async is a C++ library to allow the calling of functions and functors in an asynchronous manner, thereby making it easier to improve the level of concurrency and parallelism in your applications. It provides:

  • An asynchronous execution framework working with AsynchronousExecutor and AsynchronousCompletionToken. It includes some generic functions and several AsynchronousExecutor and AsynchronousCompletionToken:
    • fork and fork_all to execute asynchronously functions
    • fork_after: request an AsynchronousExecutor to execute a function asynchronously once each one of AsynchronousCompletionToken in the dependency tuple parameter are ready. It is similar to the async_with_dependencies proposed Peter Dimov.
    • generic get, join, ... free functions to synchroyze on an AsynchronousCompletionToken
    • generic get_all, join_all, ... free functions to synchroyze on multiple AsynchronousCompletionToken
    • generic wait_for_all, wait_for_any to execute asynchronously functions and wait for the completion of all or any of them.
  • Some AsynchronousExecutor and AsynchronousCompletionToken models
    • inmediate executors: executes synchronously a function on the current thread. Often used for test purposes
    • basic_threader: can be seen as a thread factory executing asynchronously a function on the returned thread.
    • launchers: Lanchers can be seen as a future factory executing asynchronously a function on a hidden thread.
    • threader/joiner: A Threader runs a unary function in its own thread. A Threader can be seen as a Joiner factory executing asynchronously a function on a thread encapsulated on the returned Joiner. The joiner is used to synchronize with and pick up the result from a function or to manage the encapsulated thread.
    • tp::pool and tp::task customization as an AsynchronousExecutor and an AsynchronousCompletionToken respectively. tp::pool can be seen as a tp::task factory executing asynchronously a function on a pool of threads.
    • a generic asynchronous_executor_decorator which allows to decorate the function to be evaluated asynchronously.

Boost.Atomic

  • Author(s): Helge Bahmann
  • Version:
  • State: On going
  • Last upload: 2009 November 29
  • Links: Web page
  • Categories: Concurrent Programming
  • Description: Implementing C++0x atomics for boost

The purpose of this library is to provide an implementation of atomic operations for boost, based on the interface specified by the C++0x draft standard. It aims to make transitioning to std::atomic easy, as well as providing a means to make code using this C++0x feature compilable on older systems.


Boost.AutoFunction

  • Author(s): Matt Calabrese
  • Version: 0.0.0
  • State: On going
  • Last upload: 2010 October 10
  • Links: Boost Sandbox Documentation
  • Categories: Utilities Generic Programming
  • Description: Boost.Auto_Function is a library focused on making it simple for programmers to express functions and function declarations that have an automatically deduced return type and to provide a way to place arbitrary compile-time requirements on a function's signature.

Boost.Bitfield

  • Author(s): Emile Cormier, Vicente J. Botet Escribá
  • Version: 0.2
  • State: Ready
  • Inclusion date: 2009 May 4
  • Last upload: 2009 October 15
  • Depends on: Endian
  • Links: Boost VaultBoost SandboxDocumentation
  • Categories: Endian Portability, Integers
  • Description:Portable bitfields traits
    • a generic bitfield traits class providing generic getter and setter methods.
    • a BOOST_BITFIELD_DCL macro making easier the definition of the bitfield traits and the bitfield getter and setter functions.
    struct X {
        typedef boost::ubig_32 storage_type;
        storage_type d0;
        typedef unsigned int value_type;
        BOOST_BITFIELD_DCL(storage_type, d0, unsigned int, d00, 0, 10);
        BOOST_BITFIELD_DCL(storage_type, d0, unsigned int, d01, 11, 31);
    };

Boost.BloomFilters

  • Author(s): Dean Michael Berris
  • Version: 0.1
  • State: On going
  • Last upload: 2009 June 08
  • Links: Boost Sandbox
  • Categories: Containers
  • Description:Bloo Filters

A Bloom Filter is a space efficient data-structure that allows you to represent set membership that allows for false positives (elements may have been marked as included in a set when they really aren't part of the set) but not false negatives (when an element has not been included/added in the set, the bloom filter wouldn't show that they are part of the set). These have been used in proxy caches to signify whether they already have a cached copy of a URI. File systems also use these to see whether a part of a file (or a page) has already been accessed before (to limit the frequency of fetching pages that have been fetched before on a DFS for instance).

A more in-depth explanation of bloom filters can be found here: http://en.wikipedia.org/wiki/Bloom_filter


Boost.Channel

  • Author(s): Yigong Liu
  • Version: 0.4
  • State: Stable
  • Last upload:Jul 15, 2008
  • Links: Web Site Boost Vault
  • Categories: Distribution
  • Description: Channel is a C++ framework for distributed message passing and event dispatching, configurable with its components (msg ids,routing algorithms...) as template parameters. As a namespace shared by peer threads, channel supports scope control and filtering.


Boost.CLI


Boost.Cloneable

  • Author(s): Christian Schladetsch
  • Version: 0.1
  • State:
  • Last upload: 2009 July 08
  • Links: Boost Sandbox
  • Categories: Containers Data Structures Utilities
  • Description: The Boost.Cloneable library provides a means for creating, duplicating, and querying instances of object types that are specified in class hierarchies, and a set of containers for those objects.

Cloneable objects can create clones of derived types from base types, can do so given any STL-compliant allocator, and supports multiple clone type targets.

The user of the library is able to override the default cloning process, and may supply custom allocators. Cloneable types can derive from other cloneable types, in which case the user can specify which subobject type to duplicate or create when making a new clone or new object from an existing instance.

You can use Boost.Cloneable with existing, external types without modification to those types by using the supplied adaptor mechanism. Boost.Cloneable also supports types that are not default-constructable.

There is a fundamental requirement that a common base class type is shared for each type in a given class hierarchy. The user can supply their own base classes, or sensible defaults are generated.

Key features of the library:

  • Can make any class-type Cloneable with or without modification to its definition
  • Optional user-supplied base classes
  • Base types can be queried for the interfaces they support
  • Clones can be created from base types
  • Supports multiple inheritance, cloning of sub-objects
  • Supports types with no default constructors
  • Customisation of the cloning process
  • Support for custom allocators
  • A set of heterogenous containers with emplace semantics for object insertion


Boost.ClonePtr

  • Author(s): Rafal Moniuszko
  • Version:
  • State:
  • Last upload: 2010 May 25
  • Links: Download
  • Categories: Data Structures Utilities
  • Description: We can think about clone_ptr in two different ways:
    • as auto_ptr with different copy semantics (this is exactly what clone_ptr is)
    • as one-element ptr_container

clone_ptr frees programmer from managing pointer the same way ptr_container for container of pointers does.


Boost.Contract

Contract Programming is also known as Design by Contract(TM) and it was first introduced by the Eiffel programming language. All Contract Programming features of the Eiffel programming language are supported by this library, among others:

  • Optional compilation and checking of invariants, preconditions, and postconditions.
  • Customizable actions on contract failure (terminate by default but it can throw, exit, etc).
  • Subcontracting for derived classes (with support for pure virtual functions and multiple inheritance).
  • Access to "old" variable values (before body execution) and return value "result" in postconditions.
  • Support block invariants and loop variants.

In brief, Contract Programming allows to specify invariants, preconditions, and postconditions that are automatically checked when functions are called at run-time. These conditions are used to assert the function specifications within the source code itself allowing to find bugs more quickly during testing and improving software quality.


Boost.Construe

  • Author(s): Jeroen Habraken
  • Version: 0.2
  • State: On going
  • Last upload: 2010 October 07
  • Links: Repository
  • Categories: Utilities
  • Description: Builds upon boost.spirit to create a cast-like operator aiming to

provide an alternative to lexical_cast providing greater speed and flexibility.


Boost.ConstantTimeSize

  • Author(s): Vicente J. Botet Escribá
  • Version: 0.1
  • State: Stable
  • Last upload:2008 Oct 14
  • Links: Boost Vault Boost Sandbox
  • Categories: Containers
  • Description: Boost.ConstantTimeSize defines a wrapper to the STL container list giving the user the choice for the complexity of the size function: linear time, constant time or quasi-constant.

In future versions the library could include a similar wrapper to slist.


Boost.Convert

  • Author(s): Vladimir Batov
  • Version: 0.36
  • State: Ready
  • Last upload: 2009, Mars 02
  • Inclusion date: ???
  • Depends on:
  • Fulfill review criteria checked by : ??? At:
    • Missing criteria
      • C1
  • Pre-reviewed by : ??? people
  • Review Manager: Edward Diener
  • Expected review date: April 23, 2011 - May 2, 2011-
  • Links: Boost Vault
  • Categories: String And Text Processing
  • Description: Extensible framework for a uniform approach to type-to-type conversions in general. It builds on the lexical_cast past experience, offers the already familiar conversion functionality and more:
  • simple and better/safe conversion-failure check;
  • throwing and non throwing conversion-failure behavior;
  • support for the default value to be returned when conversion fails;
  • formatting support based on the standard I/O Streams and the standard (or user-defined) manipulators (like std::hex, std::scientific, etc.);
  • locale support;
  • support for boost::range-compliant char and wchar_t-based string containers (std::string, std::wstring, char const*, wchar_t const*, char array[], std::vector<char>, etc.);
  • no DefaultConstructibility requirement for the Target type;
  • room to grow.

Boost.CounterTree

  • Author(s): Francisco José Tapia
  • Version:
  • State:
  • Last upload:2010 September 27
  • Links: Boost Vault
  • Categories: Containers
  • Description: Binary trees with access by position like the vectors

Boost.Coroutines

  • Author(s): Giovanni P. Deretta
  • Version:
  • State:
  • Last upload:2009 December 01
  • Links: Boost Sandbox Boost VaultDownload Stack corruption bug patch
  • Categories: Concurrent Programming
  • Description: The Boost.Coroutine library contains a family of class templates that wrap function objects in coroutines. Coroutines are a generalization of subroutines that can return and be reentered more than once without causing the destruction of automatic objects.

Coroutines are useful whenever it is necessary to keep state across a function call, a job usually reserved to stateful function objects.


Boost.Creasing

  • Author(s): Grant Erickson
  • Version:
  • State:
  • Last upload:
  • Inclusion date: ???
  • Depends on:
  • Fulfill review criteria checked by : ??? At:
    • Missing criteria
      • C1
  • Pre-reviewed by : ??? people
  • Review Manager: Needed
  • Expected review date: ???
  • Links: Boost Vault
  • Categories: Algorithms
  • Description:

Boost.Crypto

  • Author(s): Kasra
  • Version:
  • State: (This is not even at beta stage targeted for suggestions and etc ONLY)
  • Last upload:2009 Jan 20
  • Links: Boost Vault
  • Categories: DataCommunication
  • Description: A library which provides larger number of secure and cryptographic services to the system.

Boost.Dataflow

  • Author(s): Stjepan Rajko
  • State: Rewriting ongoing
  • Version:
  • Last upload:
  • Links: Documentation Boost Sandbox
  • Categories: DataCommunication
  • Description: Dataflow is a generic library for dataflow programming. Dataflow programs can typically be expressed as a graph in which vertices represent components that process data, and edges represent the flow of data between the components. As such, dataflow programs can be easily reconfigured by changing the components and/or the connections.

Boost.Egg

  • Author(s): Shunsuke Sogame
  • State:
  • Version: 0.91.0
  • Last upload: 30 Mars 2008
  • Links: Documentation SVN repository Boost Vault
  • Categories: Function Objects And Higher-order Programming
  • Description: Egg is a header-only library for building Polymorphic Function Object which can be used with Boost.Lambda. Such a function object is called a Major Function Object. Egg mainly provides three components:
    • Function Builders which build Little Functions into Major Function Objects.
    • Function Adaptors which take Polymorphic Function Objects then return adapted ones.
    • Function Objects which are ports of famous function templates.

Boost.Endian

  • Author(s): Tomas Puverle
  • Version:
  • State: On going
  • Last upload:2010 May 26
  • Links: Download
  • Categories: Portability
  • Description: The highlights of the library are the following:
    • Very simple interface: swap<machine_to_little/big>(), swap_in_place<machine_to_little/big>()
    • Support for built-in and user-defined data types and ranges thereof. E.g. you can swap ranges of structs containing/deriving from other structs
    • endian::iterator, which will iterate across a range swapping values as necessary. It works with any swappable type.

Boost.Euclid

  • Author(s): Andreas Harnack
  • Version: 0.0.3
  • State:
  • Last upload:2008 Nov 26
  • Links: Boost Vault
  • Categories: Math And Numerics
  • Description: Euclidean vector class templates providing Orientational analysis on geometrical dimensions.

Boost.Extension

  • Author(s): Jeremy Pack
  • Version:
  • State:
  • Last upload:2008 Nov 26
  • Links: Blog Download Headers Boost Sandbox Libs Boost Sandbox
  • Categories: Reflective Programming
  • Description: The Boost.Extension library has been developed to ease the development of plugins and similar extensions to software using shared libraries. Classes, functions and data can be made available from shared libraries and loaded by the application.

Boost.Explore

  • Author(s): Jeff Garland, Jared McIntyre
  • Version:
  • State:
  • Last upload:2008 Mars 22
  • Links: Boost Sandbox
  • Categories: Containers Input/Output
  • Description: Boost.Explore is a library that provides for the output of data from containers or ranges.

Boost.Generic


Boost.Fsm

  • Author(s): Andrey Semashev
  • State:
  • Version:
  • Last upload:
  • Links: Boost Vault
  • Categories: Data Structures
  • Description:The Boost.FSM library is an implementation of FSM (stands for Finite State Machine) programming concept.

There are many cases when a developer would like to distinguish behavior of a given object depending on some conditions or its internal state. For example, while developing software to control an charging turnstile a programmer would like to separate states in which the turnstile may persist: an idle state, when the device awaits for another passenger that would like to pass; a processing state, when the passenger have come and put his ticket into the device; and the passing state, when the turnstile lets the passenger pass through. In fact, each state describes a different reaction of the machine at the same events. That's why a passenger may only pass after paying for ticket. Obviously, the turnstile have to be able to change its internal state in order to function properly, this is called state switching or transitions between states (or just transitions for short). This implementation is aimed to ease the creation of such state machines in C++. It supports constructing passive automatons (which means that every action the machine performs is a response to some external event) with finite number of states and finite number of transitions (that is why they are called finite state machines). The main goals of the library are:

  • Simplicity. It should be very simple to create state machines using this library.
  • Performance. The state machine infrastructure should not be very time and memory-consuming in order to be applicable in more use cases.
  • Extensibility. A developer may want to add more states to the existing state machine, for example, the maintenance state for the turnstile mentioned above, and this addition should be relatively safe since it shouldn't interfere with the existing states. The developer should also be able to specify additional transitions and events for the machine with minimum modifications to the existing code.

Boost.Hash


Boost.Identification

  • Author(s): Joel Falcou
  • Version: v0.3
  • State:
  • Last upload: 2009 26 June
  • Links: Boost Vault
  • Categories: Utilities
  • Description: Run-time display of type description as a human-readable string

Boost.Integer.Endian.Ext

  • Author(s): Vicente J. Botet Escribá, Beman Dawes
  • Version: 0.1.0
  • State: Stable
  • Last upload:2010 June 20
  • Links: Boost Sandbox Documentation
  • Categories: Portability
  • Description: This is an extension of the Beman's Boost.Integer.Endian able to work with endian aware types, used to convert between types with different endian or even to carry on with arithmetic operations, adding support ofr aligned endian unaware types.Boost.Integer.Endian.Ext provides:
    • Endian packs
      • Big endian | little endian | native endian byte ordering.
      • Signed | unsigned
      • Unaligned | aligned
      • 1-8 byte (unaligned) | 2, 4, 8 byte (aligned)
      • Choice of integer value type
    • Endian integers with the whole set of arithmetics operators.
    • Operators <= and => for unformatted binary (as opposed to formatted character) stream insertion and extraction of built-in, std::string types and of endian types.
    • Views of aligned endian unaware integer types as endian packs or endian integers so we can make endian conversion.
    • Generic in place conversion between different endian formats.
      • Very simple interface: convert_to/from<endiannes domain>(),
      • Support for built-in and user-defined data types view as fusion sequences.

Boost.Interfaces

  • Author(s): Jonathan Turkanis
  • Version:
  • State:
  • Last upload: 2004
  • Links: Boost Sandbox
  • Categories: Patterns
  • Description: Boost.Interfaces provides a macro-based Interface Definition Language (IDL) which can be used to define C++ class types called interfaces. An interface is a lightweight value type associated with a set of named function signatures. An interface instance can be bound at runtime to any object which implements the interface, i.e., to any object of a type with accessible non-static member functions having the same name and signature as the set of functions associated with the interface. The functions of the bound object can then be invoked through the interface instance using the “dot” operator. Binding is completely non-intrusive: the object's type need not declare any virtual functions or derive from any particular base class.

Boost.InterThreads

  • Author(s): Vicente J. Botet Escribá
  • Version: 0.1.3
  • State: Not ready. Needs to cleanup
  • Last upload: 2009 April 02
  • Links: Boost Vault Boost Sandbox Documentation
  • Categories: Concurrent Programming
  • Description: Boost.InterThreads extends Boost.Threads adding some features:
    • thread decorator: thread_decorator allows to define setup/cleanup functions which will be called only once by thread: setup before the thread function and cleanup at thread exit.
    • thread_decorator can now decorate a nullary function in addition to a callable function
    • thread specific shared pointer: this is an extension of the thread_specific_ptr providing access to this thread specific context from other threads. As it is shared the stored pointer is a shared_ptr instead of a raw one.
    • thread keep alive mechanism: this mechanism allows to detect threads that do not prove that they are alive by calling to the keep_alive_point regularly. When a thread is declared dead a user provided function is called, which by default will abort the program.
    • thread tuple: defines a thread group where the number of threads is know statically and the threads are created at construction time.
    • set_once: a synchronizer that allows to set a variable only once, notifying to the variable value to whatever is waiting for that.
    • thread_tuple_once: an extension of the boost::thread_tuple which allows to join the thread finishing the first, using for that the set_once synchronizer.
    • thread_group_once: an extension of the boost::thread_group which allows to join the thread finishing the first, using for that the set_once synchronizer.

thread_decorator and thread_specific_shared_ptr are based on the original implementation of threadalert written by Roland Schwarz.


Boost.Introspection

  • Author(s): Joel Falcou
  • Version:
  • State:
  • Last upload: 2008 October 10
  • Links: Boost Vault
  • Categories: Reflective Programming
  • Description: Class-level introspection traits class prototype

Boost.Introspection2

  • Author(s): Jean-Louis Leroy
  • Version:
  • State:
  • Last upload: 2008 November 04
  • Links: Boost Sandbox
  • Categories: Reflective Programming
  • Description: Class-level introspection traits class prototype

Boost.Lexer

  • Author(s): Ben Hanson
  • Version: v0.2
  • State: Not ready. Seems Lexer is been rewritten.
  • Last upload: 2009 November 24
  • Inclusion date: ???
  • Depends on:
  • Fulfill review criteria checked by : ??? At:
    • Missing criteria
      • C1
  • Pre-reviewed by : ??? people
  • Review Manager: Eric Niebler
  • Expected review date: ???
  • Links: Boost Vault
  • Categories: String And Text Processing
  • Description: A programmable lexical analyser generator inspired by 'flex'. Like flex, it is programmed by the use of regular expressions and outputs a state machine as a number of DFAs utilising equivalence classes for compression.

Boost.LUID

  • Author(s): Vicente J. Botet Escribá
  • Version: 0.0.0
  • State: Prototype
  • Last upload: 2009 Fev 16
  • Categories: Data Structures
  • Links: Boost Sandbox Documentation
  • Description: Boost.LUID simplifies the generation of locally unique identifiers in a wide context.

Locally Unique Identifier or LUID is a special type of identifier used in software applications in order to provide a reference number which is unique in a given context (hence, "Locally" in opposition to "Globally" or "Universally"). Each generated LUID is guaranteed to be unique in its context.

LUID could have many applications. Some examples follow: creating unique identifiers in a database tables, network messages may be identified with a LUID to ensure that this messages are associated to a given session, transactions may be identified by LUIDs.

Note. Please let me know other applications of luids you can have.

  • Reduced identifier size

An attractive feature of LUIDs when compared to alternatives is the minimal size used by this identifiers, that depends on the number of instances a given context can have (usually 4 bytes). This allows to use them in protocols fixing the size of the references exchanged to less that 16 bytes(as it is the case of UUID and GUID). Usually LUIDs are represented by unsigned integers and have an upper bound value.

  • Usable as random access index in constant time

Another aspect, and not less interesting is that the access to the information they identify can be done in constant time.

  • Recovering unused identifiers

A first implementation could consists in a monotonic counter.

The drawback of having a small size is that the number of unique identifier is more limited. This limit will finish by been reached if the application runs a long time. To palliate to this, we need a mechanism to recover the unused identifiers once the identified information is removed. Depending on the application the recovered identifiers should be discarded, reused immediately or frozen during a given duration or a number of times.

Usually they are reused in a first reusable first reused order (fifo), but depending on the implementation this could not be always the more efficient policy. So the user can either constraint this fifo order or let undefined this aspect.

  • Managing the lack of identifiers

In any case we need to manage with the overflow case, i.e. when there are no more free identifiers. The user could prefer an exception, return an invalid value, use errno, or call to a user defined function which could try to recover from this situation, by re dimensioning the upper bound for example.

  • Ensuring coherency on reusable identifiers

All this seams to work up to the user do not release the same identifiers twice. As this is an expensive aspect, but usually the applications has its own way to do it. If this is not the case the application could ask to the luid generator to ensure that.

  • Synchronization on multi threaded or multi process applications

The generation of new LUIDs and the recovering of unused LUIDs must be synchronized. So LUID are better adapted to systems where these operations are done in a reduced scope. Depending on this scope: single thread, multi-threaded process or a node,i.e. multiple process, the synchronization mechanisms vary. In a single thread scope no synchronization is needed. Synchronization on a multi-threaded process can be ensured using a thread mutex.

In addition the synchronization can be ensured internally by the generator, or externally by the user, i.e. the user has already a synchronization mechanism.

LUIDs are not adapted to distributed system (multiple nodes generating and recovering luids) because it needs a coordination between the different nodes which will take too much time. UUIDs and GUIDs are more adapted to this situation. Anyway if the size constraint can not be avoided, one of the nodes could play the master role and the others behaves as slaves. Master and slaves need to work together. This library do not pretend to take in account this use case but, could be the base of such approach.

  • Persistency

Another aspect is the lifetime of the information to be identified by the luids. It can be the lifetime of the process, the host machine lifetime or persists to a shut down of the host machine using the file-system.

  • Optimization

The last aspect will be the optimization. Different application have different needs, some have space constraints, and mot of the others have speed constraints.


Boost.MapReduce


Boost.Mirror

  • Author(s): Matus Chochlik
  • Version: 0.4.9
  • Last upload: August 30, 2010
  • Links: Boost Vault Boost Sandbox C++0x version online docs for the C++0x version
  • Categories: Reflective Programming
  • Description: The aim of the Mirror library is to provide useful meta-data at both compile-time and run-time about common C++ constructs like namespaces, types (and as an important special case typedef-ined types), classes and their base classes and member attributes, instances, etc. and to provide uniform and generic interfaces for their introspection.

Boost.Monotonic


Boost.MPL.Ext


Boost.MSF

  • Author(s): Marco Costalba
  • Version: 1.2.2
  • State:
  • Last upload: 2008, Juin 07
  • Links: Boost Vault
  • Categories: Function Objects And Higher-order Programming
  • Description: The Boost.multi_signature_function library is an extension of Boost.Function that allows to define a boost::function on more then one signature. The Boost.Function library contains a family of class templates that are function object wrappers. Please refer to Boost.Function documentation for reference.

The Boost.multi_signature_function library could be used as a building block in more complex components. In the example directory are presented a dynamic dispatcher and an object factory.


Boost.Numeric.Odeint

  • Author(s): Karsten Ahnert, Mario Mulansky
  • Version:
  • State: Under development but usable
  • Last upload: 2010, April 27
  • Links: [http://svn.boost.org/svn/boost/sandbox/odeint/ Boost Sandbox] Documentation
  • Categories: Math And Numerics
  • Description: Odeint is a library for solving ordinary differential equations. It provides explicit methods like Euler, various Runge-Kutta solvers, as well as adaptive step-size integration and the Burlisch-Stoer algorithm. Furthermore, solvers for Hamiltonian systems are implemented. Further development will go in the direction of

implicit solvers, stiff problems and CUDA support.


Boost.NumericBindings

For the data container part, it supports both compile-time statically sized and run-time dynamically sized vectors, matrices, through a traits system. Currently it includes traits for C-arrays, for standard vectors, for uBLAS' containers, Eigen containers, TNT, Boost.Array, to name a few. It offers compile-time inspection, iterators, and views on all mentioned containers.

For the algorithm part, it provides a C++ interface to algorithms offered by BLAS, LAPACK, and more. This covers algorithms from most vendor-provided math libraries, such as the reference BLAS, ATLAS, Intel's MKL, AMD's CML, NVidia's CUDA, etc..


Boost.Overload


Boost.Persistent

  • Author(s): Stefan Strasser
  • Version:
  • State:
  • Last upload: 2010 January 03
  • Links: Documentation
  • Categories: Persistency Containers
  • Description: Boost.Persistent introduces the concept of a persistent object. Persistent objects can be accessed through locators, which are similar to pointers, but can refer to objects that are stored on disk. The user only expresses the intention of accessing a persistent object but lets the library decide when and how to perform disk I/O.

The persistent state of the application can be updated in small increments, instead of serializing the whole application state at one point. Those updates are conducted as atomic operations by the library, that are presented to the user either as savepoints or as transactions. The library maintains a consistent application state and recovers it from application and system failures.

Finally, a persistent object can be accessed from multiple transactions in different threads concurrently and independent from each other, making manual synchronization obsolete.


Boost.Plot

  • Author(s): Jacob Voytko & Paul A. Bristow
  • Version: v0
  • State: Under development, especially documentation, but usable.
  • Last upload: Jan 2009
  • Links: Boost Plot
  • Categories: Image Processing
  • Description: Provides a way of plotting simple 1 and 2D graphs in Scalable Vector Graphic (svg) format directly from C++ code. The graphs are high quality when displayed on a wide variety of display sizes, from mobile phone to big screen, or when printed, but the graph files are tiny and fast enough to be done in near real-time. Fine control of appearance is provided in C++ (but with defaults and optional scaling of axes) so graphs can be produced in a very few lines of code. Current documentation is a mess but Very much improved documentation is nearly complete using Doxygen: meanwhile there are lots of examples.

Boost.Process

  • Author(s): Boris Schaeling, Ilya Sokolov, Felipe Tanus, Julio M. Merino Vidal
  • Version: v0.4
  • State: On going
  • Last upload: October 08, 2010
  • Review Manager: Marshall Clow
  • Expected review date: February 7. 2011 - February 16, 2011
  • Links: Boost Sandbox Download Documentation
  • Categories: System
  • Description: Boost.Process is a library to manage system processes. It can be used to:
  • create child processes
  • run shell commands
  • setup environment variables for child processes
  • setup standard streams for child processes (and other streams on POSIX platforms)
  • communicate with child processes through standard streams (synchronously or asynchronously)
  • wait for processes to exit (synchronously or asynchronously)
  • terminate processes

Boost.Reflection

  • Author(s): Jeremy Pack
  • Version:
  • State:
  • Last upload:2008 Aug 08
  • Links: Blog Download Boost Sandbox Headers Boost Sandbox
  • Categories: Reflective Programming
  • Description: The goal of this library is to provide runtime reflection for C++ classes, and to allow the same across shared library boundaries. It is an offshoot of the Extension library, which provides dynamic class loading across shared libraries.

Boost.Reflection does not provide automatic reflection of classes. Instead, the class data must be manually reflected. This does offer some benefits however:

  • This can result in better performance, since only the necessary functions are reflected.
  • Arbitrary classes can be reflected without modification.
  • It is possible to make a reflected interface that is quite different from the original interface.

Boost.RendezVous

  • Author(s): Vicente J. Botet Escribá
  • Version: 0.3.2
  • State: Quite Stable
  • Last upload: 2009 May 11
  • Links: Boost Vault Boost Sandbox
  • Categories: Concurrent Programming
  • Description: Concurrent components may interact in different ways: they may access the same objects by, for example, executing functions of these objects; or they may communicate directly by executing functions of each other. These library will provide the so-called rendezvous mechanism for handling direct communication between active objects.

Boost.RPC

  • Author(s): Stjepan Rajko
  • Version:
  • State:
  • Last upload: 2007
  • Links: Boost Sandbox
  • Categories: Distribued Programming
  • Description: This is a prototype framework for a remote procedure call implementation using Boost libraries,

specifically Boost.Asio for network communication, Boost.Serialization for marshaling, and futures for handling of returned values.

The framework supplies both server-side and client side components that allow remote procudure calls to be made, and parameters/results to be marshaled between the client and the server. A remote procedure call is executed as follows:

# on the client, the function id and the arguments are serialized and sent over the network # the server receives the serialized call, unserializes the id and arguments and executes the call # if applicable, the results of the call are serialized and sent back over the network to the client


Boost.RDB

  • Author(s): Jean-Louis Leroy
  • Version:
  • State:
  • Last upload: 2009 November 25
  • Links: Boost Vault
  • Categories: Database
  • Description: C++ is a statically typed language. sql is also a statically typed language. It looks like they should play ball together.

So how comes that most C++/sql bindings make it possible to write and compile code that contains not-so-subtle errors ? They could be caught at compile time since all the necessary information is there.

Well this is just what this library does.

Boost.RDB provides bindings to various relational database systems. It supports creating and executing SQL statements and retrieving the results by means of C++ objects. Most of the time the resulting syntax is very close to plain SQL. Moreover, Boost.RDB is a good citizen of the type-rich C++ world: all constructs are statically checked, which eliminates the risks of type errors. If your RDB code compiles, then it generates correct SQL. Since everything happens at compile-time, the library delivers performance that is close to hand-written code.

What it's not

Boost.RDB does /not/ hide the database behind an abstraction layer. On the contrary, it ambitions to make the pecularities of each system readily accessible. However, SQL is standardized, and while it's true that few vendors - if any - comply to the standard in every small detail, most of the SQL code uses constructs that are portable between vendors.

Boost.RDB neither attempts to add extra functionality on top of the database (like object-relational mapping). These tasks belong to higher-level libraries, possibly built on top of Boost.RDB.


Boost.RTL

  • Author(s): Arkadiy Vertleyb, Dmitriy Arapov
  • Version:
  • State:
  • Last upload: 2006 December 06
  • Links: Boost Sandbox
  • Categories: Database
  • Description: RTL is an attempt to create a facility that would be free from the above drawbacks, and make relational tables and relational operations convenient to use from a C++ program.

Boost.Singleton

  • Author(s):
  • Version:
  • State:
  • Last upload:
  • Links: [ Boost Sandbox]
  • Categories: Patterns
  • Description:

Boost.SmartPtr.UniquePtr

  • Author(s): Howard Hinnant <hinnant@…>
  • Version:
  • State:
  • Last upload: 2009 Jan 3
  • Links: Documentation & Download
  • Categories: Generic Programming
  • Description: unique_ptr is a class template smart pointer currently in the C++0X CD1 draft. It is intended to be a safer and more flexible replacement for auto_ptr. It represents sole (unique) ownership of a resource such as memory (like auto_ptr).

The actual C++0X unique_ptr makes use of a new C++ language feature called rvalue reference which is similar to our current reference (&), but spelled &&. This emulation is intended to capture most of the behavior of the C++0X unique_ptr but work with C++03 compilers. Furthermore this emulation makes use of boost library facilities and has been placed in the boost namespace. Though at the time of this writing, this library is not part of the official boost library release.


Boost.SafeInt

  • Author(s): Ziv Levi and Omer Katz
  • Version: v0.0
  • State: Draft
  • Last upload: 2009 June 20
  • Links: Boost Vault
  • Categories: Math And Numerics
  • Description: Safe integer types

StableVector

  • Author(s): Joaquín M López Muñoz
  • Version:
  • State: Draft
  • Last upload:
  • Links: Stable Vectors
  • Categories: Containers
  • Description: a container mimicking the interface of std::vector except that it provides iterator and reference stability at the expense of losing memory contiguity.

Boost.STM

  • Author(s): Justin E. Gottchlich , Vicente J. Botet Escribá
  • Version: 0.1
  • State: work on going
  • Last upload: 2009 Sep 19
  • Links: Web Site Downloads Boost Sandbox Documentation
  • Categories: Concurrent Programming
  • Description: Transactional memory (TM) is a new parallel programming mechanism that reduces the complexity of parallel programming. TM reduces parallel programming complexity by abstracting away the necessary synchronization mechanisms from the parallel code, allowing the programmer to write parallel applications without worry of deadlocks, livelocks or race conditions.

Transactional memory is an active research interest for many academic and industry institutions with many open questions about its behavior.

TBoost.STM is a C++ lock-based software transactional memory (STM) library. Our approach to STM is to use only native language semantics while implementing the least intrusive, most type-safe object oriented solution possible.

TBoost.STM provides:

  • Optimistic concurrency
  • ACI transactions

o Atomic: all operations execute or none do o Consistent: only legal memory states o Isolated: other txes cannot see until committed

  • Language-like atomic transaction macro blocks
  • Closed, flattened composable transactions
  • Direct and deferred updating run-time policies
  • Validation and invalidation conflict detection policies
  • Lock-aware transactions
  • Programmable contention management, enabling programmers to specify forward progress mechanisms
  • Isolated and irrevocable transactions for transactions that must commit (i.e., I/O transactions)

Boost.Sync

The goal of Boost.Sync is to remove the syntactic differences between the synchronization mechanisms of the Boost.Thread and Boost::Interprocess libraries and be a holder of common mechanism and algorithms working on the common concepts.

The differences I have identified up to now are:

  • The scoped locks can be initialized with static const variables in order to overload the constructor for lock adoption, lock deferral or try to lock. Even if the name of these variables is almost the same, these variables live in different namespace. It would be nice if both libraries use the same type and the same variables.
  • The shared mutex provide similar service with different names. In addition each implementation provide some functions that are not provided by the other.
  • The scoped locks live in a different namespace and some have different names with the same semantic. IMO these should be shared.
  • The exception thrown lives in a different name space and different names with equivalent semantics If we follow the C++0x standard the exception to throw should be system_error. Both libraries could adapt his hierarchy to Boost.System. The drawback is that users of Boost.Thread and Boost.Interprocess will need to link with Boost.System which is not a header only library.
  • The move semantics (&&) of Boost.Thread should be adapted to the forthcoming Boost.Move library as soon as integrated on the release branch. Boost.Interprocess uses already a detail implementation equivalent to the provided by Boost.Move, so the change will be simpler.
  • Adapt both libraries interface to use Boost.Chrono, which is yet a non header only library, once it is accepted.

Of course, this needs some adaptation of the Thread and Interprocess libraries.

Boost.Sync will contain

  • lockable concepts and locks concepts.
  • lockables traits,
  • null_mutex and null_condition classes,
  • Add some common locks as
    • strict_lock, nested_strict_lock,
    • reverse_lock, nested_reverse_lock,
  • A polymorphic lockable hierarchy.

Boost.Synchro

  • Author(s): Vicente J. Botet Escribá
  • Version: 0.3.2
  • State: work on going
  • Last upload: 2009 May 11
  • Links: Boost Vault Boost Sandbox Documentation
  • Categories: Concurrent Programming
  • Description:
    • A uniform usage of Boost.Thread and Boost.Interprocess synchronization mechanisms based on lockables(mutexes) concepts and locker(guards) concepts.
      • lockables traits and lock generators,
      • generic free functions on lockables as: lock, try_lock, ...
      • locker adapters of the Boost.Thread and Boost.Interprocess lockers models,
      • complete them with the corresponding models for single-threaded programs: null_mutex and null_condition classes,
      • locking families,
      • semaphore and binary_semaphore,
      • condition_lockable lock which put together a lock and its associated conditions.
    • A coherent way exception based timed lock approach for functions and constructors,
    • A rich palette of lockers as
      • strict_locker, nested_strict_locker,
      • condition_locker,
      • reverse_locker, nested_reverse_locker,
      • locking_ptr, on_dereference_locking_ptr,
      • externally_locked,
    • array_unique_locker on multiple lockables.
    • Generic free functions on multiple lockables lock, try_lock, lock_until, lock_for, try_lock_until, try_lock_for, unlock * lock adapters of the Boost.Thread and Boost.Interprocess lockable models,
      • lock_until, lock_for, try_lock_until, try_lock_for
    • A polymorphic lockable hierarchy.
    • High-level abstractions for handling more complicated synchronization problems, including

o monitor for guaranteeing exclusive access to an object.

  • Language-like Synchronized Block Macros

Boost.Task

  • Author(s): Oliver Kowalke
  • Version: 0.2.1
  • State: Quite Stable
  • Last upload: 2009 June 25
  • Inclusion date: ???
  • Depends on: Boost.Fiber, Boost.TaskLet, Boost.Atomic
  • Fulfill review criteria checked by : ??? At:
    • Missing criteria
      • C1
  • Pre-reviewed by : ??? people
  • Review Manager: Vicente Botet
  • Expected review date: ???
  • Links: Boost Vault Boost Sandbox GitHub Sandbox
  • Categories: Concurrent Programming
  • Description: execute tasks in threadpool, in new thread or as sub-task and let the result be transfered via a future. support task interruption, work-stealing and fork/join semantics

Boost.TimerQueue

  • Author(s): John Q. Smith
  • Version: 0.1
  • State: On going
  • Last upload: 2009 June 03
  • Links: Boost Vault
  • Categories: Concurrent Programming
  • Description: Timer Queue is a library that allows you to specify some arbitrary future time at which to be handed back a value that you supply at timer creation.

Boost.ThreaderJoiner


Boost.Tokenmap

Unlike typical dictionary-like containers such as std::map or boost_unordered, tokenmap generates the keys for stored values. The keys are random in appearance yet have the property of allowing the container to perform very efficient look-ups -- in the order of indexing within a C-array.

tokenmaps have the following properties:

  • No two tokens map to the same value; in essence, tokenmap is a perfect hash container.
  • The returned tokens are stable (a token will always map to a corresponding value regardless of how the tokenmap was modified since the token was generated).
  • Lookups are very efficient compared to std::map find. For example, when looking up a value in a 1,000,000-elements container, tokenamp outperforms std::map by about 30 times.


Boost.Tree


Boost.TypeErasure

  • Author(s): Steven Watanabe
  • Version:
  • State:
  • Last upload:2011 Mai 22
  • Links: Boost Vault
  • Categories: Generic Programming
  • Description: C++ provides runtime polymorphism through virtual functions. They are a very useful feature, but they do have some limitations.
  • They are intrusive. In generic programming, we can design an interface which allows third-party types to be adapted to it.
  • They require dynamic memory management. Of course, most of the problems can be avoided by using an appropriate smart pointer type. Even so, it still acts like a pointer rather than a value.
  • Virtual functions' ability to apply multiple independent concepts to a single object is limited.

The Boost.TypeErasure library solves these problems allowing us to mirror static generic programming at runtime.


Boost.Unicode

  • Author(s): Graham Barnett & Rogier van Dalen
  • Version:
  • State:
  • Last upload: February 12, 2009
  • Links: Boost Vault
  • Categories: String And Text Processing
  • Description: The Boost Unicode library aims to bring Unicode to C++ without requiring intricate knowledge of the Unicode standard, while allowing Unicode experts to do advanced things.

Boost.Unicode2

  • Author(s): Mathias Gaunard
  • Version: 0.1
  • State:
  • Last upload: August 27, 2009
  • Links: Boost Vault
  • Categories: String And Text Processing
  • Description: This library aims at providing the foundation tools to accurately represent and deal with natural text in C++ in a portable and robust manner, so as to allow internationalized applications, by implementing parts of the Unicode Standard.

This library is environment-independent and deliberately chooses not to relate to the standard C++ locale facilities as well as the standard string facilities, judged ill-suited to Unicode.

The current version is locale-agnostic, but a subsystem for tailored locale behaviour may be added in the future.


Boost.XInt

  • Author(s): Chad Nelson
  • Version: 0.6
  • State:
  • Last upload: 2010, Jun 19
  • Review Manager: Vladimir Prus
  • Expected review date: March 2, 2011 - March 12, 2011
  • Links: Boost Sandbox Boost Documentation
  • Categories: Math And Numerics
  • Description: It's a C++ library that lets your program handle much, much larger integer numbers than the built-in int, long, or even long long types, and handle them using the same syntax that C and C++ use for the built-in integer types.

The maximum size of the integer is limited only by the memory available to store it. In practice that's millions of hexadecimal digits, so it's effectively infinite.


Boost.XML


Other Open Source libraries

This page contains other libraries that work well with Boost.


ASL

  • Author(s): Sean Parent and Mat Marcus - Adobe
  • Version: 1.0.39
  • State: Released
  • Last upload: November 6, 2008
  • Links: Home page
  • Description: Adobe Source Libraries (ASL) provides peer-reviewed and portable C++ source libraries. The libraries are intended to be widely useful, leveraging and extending both the C++ Standard Library and the Boost Libraries.

async

  • Author(s): Edd Dawson
  • Version: 0.2.3
  • State:
  • Last upload: 15 January 2008
  • Links: Web Site Download
  • Categories: Concurrent Programming
  • Description: async is a C++ library to allow the calling of functions and functors in an asynchronous manner, thereby making it easier to improve the level of concurrency and parallelism in your applications.

coco

  • Author(s): Edd Dawson
  • Version: 0.2.0
  • State:
  • Last upload: 23 Feb 2008
  • Links: Web Site Download
  • Categories: Concurrent Programming
  • Description: coco is a library that implements the Boost.Thread interface but is written in terms of the operating system’s native cooperative threading mechanism, whether that be Fibers on Windows, or the <ucontext.h> functions on POSIX machines.

This means that multi-threaded programs written using Boost.Thread can now be run in a single thread. This is useful for debugging and testing purposes, where it is necessary to look at algorithmic correctness in isolation from correctness of synchronisation.


Poet

  • Author(s): Frank Mori Hess
  • Version:
  • State:
  • Last upload: June 25, 2008
  • Links: Home Page
  • Categories: Concurrent Programming
  • Description: libpoet is a C++ parallel programing library. It provides support for easily creating active objects, creating monitor objects, and automatically validating mutex locking order.

Active objects provide concurrency and thread-safety, since each active object executes in its own thread. Futures are employed to communicate with active objects in a thread-safe manner. To learn more about the active object concept, see the paper "Active Object, An Object Behavioral Pattern for Concurrent Programming." by R. Greg Lavender and Douglas C. Schmidt. Some of the more important active object classes in libpoet are poet::active_function, poet::future, and poet::scheduler.

Monitor objects provide thread-safety via automatically locked access to an object. See the paper "Monitor Object, An Object Behavioral Pattern for Concurrent Programming" by Douglas C. Schmidt for more information about monitor objects. The poet::monitor_ptr, poet::monitor, and poet::monitor_base classes in libpoet provide support for monitor objects.

Finally, the poet::acyclic_mutex class provides a wrapper for mutex classes which adds automatic validation of a program's mutex locking order. Following a consistent locking order ensures your program will not deadlock due to problems such as "deadly embrace" or the "dining philosophers" problem.


TBB

  • Author(s): Intel
  • Version: 2.1
  • State: stable release
  • Last upload: June 7, 2008
  • Links: Home page
  • Categories: Concurrent Programming
  • Description: Intel® Threading Building Blocks (TBB) offers a rich and complete approach to expressing parallelism in a C++ program. It is a library that helps you take advantage of multi-core processor performance without having to be a threading expert. Threading Building Blocks is not just a threads-replacement library. It represents a higher-level, task-based parallelism that abstracts platform details and threading mechanism for performance and scalability and performance.

tscb

This library provides classes for notifications via callbacks in multi-threaded programs. In particular, it provides the following services:

  • Signals and slots: signal_proxy provides an interface through which interested receivers can connect/disconnect callback functions at runtime. signal provides an implementation of this interface and provides senders a mechanism to notify interested receivers, passing specified arguments to each callback function.
  • I/O readiness: ioready_service provides an interface through which interested receivers can register/deregister for notification on I/O readiness events (i.e. file descriptor ready for reading/writing; cf. poll/select). ioready_dispatcher provides an implementation of this interface that allows waiting (with timeout) for and fetching the required information from the operating system and notifying registered receivers.
  • Timers: timer_service provides an interface through which interested receivers can register/deregister for notification at specific points in time. timer-queue_dispatcher provides an implementation of this interface, keeping track of all pending timers, deadline when next timer is due, and "premature interruption" if the deadline must be invalidated (e.g. due to a newly-added timer).
  • Compound event dispatching (or "reactor-style" operation): posix_reactor_service combines the ioready_service, timer_service and workqueue_service interfaces. posix_reactor provides an implementation of this interface and performs all required operations of delivering all requested notifications.

The implementations in this library provide strong thread-safety guarantees, are reentrant, deadlock-free and provide strong consistency guarantees. See section Concurrency and reentrancy below for an exact definition of the guarantees.


Libraries Wish list

This page contains libraries that people have requested of Boost (mostly on the developer's mailing list). If you're looking for a project, this is a good place to start.


Accumulators.Ext

  • Suggested by: Vicente J. Botet Escribá
  • Categories: Math And Numerics
  • Description: Adding sliding, dependable and cyclic accumulators to Boost.Accumulators.

The accumulator library allows to determine dependency between accumulator, but not between accumulator_sets. I would like to define an accumulator_set c so when we cumulate in two others c1 and c2 accumulator_set we cumulate also in c, some thing like:

typedef dependable_accumulator_set <double, ...> dependable_acc_type;

dependable_acc_type c1, c2;
dependable_acc_type c=c1+c2

dependable_acc_type c3;

c+=c3;

c1(1);
c2(1);
c3(2);
assert(count(c)==3);
assert(sum(c)==4);

How dependable_accumulator_set can be defined? Here follows the interfaces of such a class and the pseudo code, I've named the class dependable_accumulator_set, sorry but I have not found a shorter and better name (may be observed/listened?)

template <typename T, typename F, typename W>
class dependable_accumulator_set : public acumulator_set<T,F,W>
{
public:
    dependable_accumulator_set();
    void add_dependent(dependable_acumulator_set&);
    void remove_dependent(dependable_acumulator_set&);

    template<typename A1>
    void operator ()(A1 const &a1) {
        for (acc in dependents) {
            acc(a1);
        }
        this->accumulator_set_type::operator()(a1);
    }
    dependable_accumulator_set<T,F,W>& operator+=(dependable_accumulator_set<T,F,W>);
    dependable_accumulator_set<T,F,W>& operator-=(dependable_accumulator_set<T,F,W>);
};

template <typename T, typename F, typename W>
dependable_accumulator_set<T,F,W> 
operator+()(dependable_accumulator_set<T,F,W>,dependable_accumulator_set<T,F,W>);

Another variant could be also to have a temporary accumulator that cyclically push its current value on another accumulator.

It will also interesting to have a dependable and cyclic accumulator set. It would be great to integrate these features on a unique class (accumulator_set?) in a clean way.

template <typename T, typename F, typename W, 
          typename DependablePolicy, 
          typename CyclicPolicy>
class accumulator_set;

Association

  • Suggested by: Vicente J. Botet Escribá
  • Categories:Data Structures
  • Description: Intrusive bidirectional associations.

Cloner

  • Suggested by: Vicente J. Botet Escribá
  • Categories: Data Structures
  • Description: Clone framework

CallStack

  • Suggested by: Paulius Maruška
  • Categories: Debug
  • Description: Provide one api, which would work on all platforms, to get the callstack info.

ConstraintsProgramming

  • Suggested by: Vicente J. Botet Escribá
  • Categories: []
  • Description: Constraints programming is a programming paradigm where relations between variables are stated in the form of constraints. Constraints differ from the common primitives of imperative programming languages in that they do not specify a step or sequence of steps to execute, but rather the properties of a solution to be found. This makes Constraint Programming a form of declarative programming.

typedef bounded<int, closed<1>, closed<2> > domain;
problem_solver<domain, domain> p;
p.add_constraint(_1 + _2 == 3);
for {problem::iterator it = p.solutions(); it != p.end(); ++it) {
    domain a, b;
    tie(a,b) = *it;
    std::cout << "[" << a << ", " << b << "]" << std::endl;
}

Databases

  • Suggested by: elfring
  • Categories: Database
  • Description: a library for database interaction.

Enums

  • Suggested by: Vicente J. Botet Escribá
  • Categories: Data Structures
  • Description: Enums traits.

EnumSet

  • Suggested by: Vicente J. Botet Escribá
  • Categories: Containers
  • Description: STL Set interface for enums.

EnumArray

  • Suggested by: Vicente J. Botet Escribá
  • Categories: Containers
  • Description: Array indexed by Enums.

Frames

  • Suggested by: Vicente J. Botet Escribá
  • Categories: Input/Output
  • Description: Library based on an extension of the Archive concept making it bidirectional.

From wikipedia "A frame is a data packet of fixed or variable length which has been encoded by a data link layer communications protocol for digital transmission over a node-to-node link. Each frame consists of a header frame synchronization and perhaps bit synchronization, payload (useful information, or a packet at higher protocol layer) and trailer. Examples are Ethernet frames and Point-to-point protocol (PPP) frames."

The Boost.serialization saving archive concept allows to save serializable data at the end of the archive, and the loading archive concept allows to read serializable data from the beginning of the archive. The saving frame concept will allows to save serializable data either at the end or the begin of the frame, and the loading frame concept allows to read serializable data from the beginning or the end of the archive. I'm not sure which syntax will be the more appropriated. The serialization library use the <<, >>, and & operators that are associative from left to right. We need the equivalent operators from right to left. <<=, >>=, and &= seams to be the more natural candidates but I don't know if it is correct in C++ to define this operators with this prototype

template <typename T> frame& operator<<=(const T&, frame&);
template <typename T> frame& operator>>=(const T&, frame&);
template <typename T> frame& operator&=(const T&, frame&);
h1 >>= h2 >>= sf << t2 << t1

is equivalent to

(h1 >>= (h2 >>= ((sf << t2) << t1)))

and should be equivalent to

sa & h1 & h2 & t2 & t1

if sf and sa were empty.

The main difference is that we can do it hierarchically. The top layer will create a frame, and serialize its own information elements.

frame sf;
h_n >>= sf  << p_n << t_n;

Then this top layer will use a primitive of the lower level having as parameter the frame as payload.

primitive_n-1(sf);

A primitive at the k level will add its own header and trailer information element to the payload of the upper level

void primitive_k(frame& sf) {
    // ...
    h_k >>= sf  << t_k;
    // ...
    another_primitive_k_1(sf);
    // ...
}

So the frame allows to serialize top-down. To get the same result with the archive concept the serialization must be done bottom-up, needing to chain each one of the information element in a list and only when we have all off them we can start the serialization. I think that the frame approach should be more efficient because it avoid to store in dynamic memory the information elements to be serialized, instead they are serialized directly.

Loading a frame works as loading an archive, except that we can load also at the end of the frame. This avoids to load the complete archive to load the trailer of the lower levels.

lf >>= h_1;
// ...
t_1 << lf;

In addition, it would be great to have saving/loading frames (I'm not sure but I think that an archive can not be saving and loading at the same time). The same frame can be used as loading, analyzing only some lower levels, and as saving in order to construct other lower levels. This will be very useful for gateways and routers.

| L4 |<------------------------------>| L4 |
| L3 |    |     ADAPTATION     |      | L3 |
| L2 |<-->| L2 |          | X2 | <--> | X2 |
| L1 |<-->| L1 |          | X1 | <--> | X1 |

It would be great also that the same data that can be serialized on archives, could be serializable on a frame using the same save function. But this works only when we save at the end of the frame. Let me see this using a little example: Class C has 3 information elements to serialize (a, b and c). So the save functions could be something like

template <typename ARCHIVE>
void C::save(ARCHIVE& sa) {
    sa & a & b & c;
}

This save function works well from left to right, but can not be used when saving at the beginning of a frame, because the expected result when saving at the beginning is

a b c sa

but the result will be

c b a sa

So unfortunately we need a different save function

template <typename FRAME>
void C::save(FRAME& sa, begin_tag&) {
    a >>=  b >>= c >>= sa;
    // a >>=  (b >>= (c >>= sa));
}

ObjectRole

  • Suggested by: Vicente J. Botet Escribá
  • Categories: Containers Data Structures
  • Description: Change the behaviour of an object depending on the roles it plays.

Quartets

  • Suggested by: Vicente J. Botet Escribá
  • Categories: Containers Data Structures
  • Description: Quartet are half an octet, i.e. 4 bits taking values from 0..15, and usually represented by chars '0'-'9' 'A'-'F'. There are some container specializations as std::string, std::vector and boost::array that could be of interest to some applications. They are also used when a decimal number is encoded using the BCD format (binary coded decimal) or to encode telephone numbers.

SpreadSheet

  • Suggested by: Vicente J. Botet Escribá
  • Categories: []
  • Description: Allows to manage with the underlying concepts of a Spreadsheet but without displaying them.

Defines cells that can be organized in a classical grid consisting of rows and columns, or any other structure as for example a tree. Each cell could contains alphanumeric text or numeric values but can also contain any other value. A spreadsheet cell may alternatively contain a formula that defines how the contents of that cell is to be calculated from the contents of any other cell (or combination of cells) each time any cell is updated.

It seems natural to use Boost.Proto to define the DSL for the cell formulas.

cell<int> c1, c2, c3;
c1 = 1;
c2 = 2;
c3 = c1 + c2;
std::cout<< c1.get() << ", " << c2.get() << ", " << c3.get() << std::endl;
sheet sh(2,3);
sheet::cell<int> c01(sh,0,1), c02(sh,0,2), c03(sh,0,3);
c01 = 1;
c02 = 2;
c03 = rel_cell(c03,0,1)+rel_cell(c03,0,2);
std::cout<< c01.get() << ", " << c02.get() << ", " << c03.get() << std::endl;
c11 = 5;
c12 = 8;
c13 = c03.copy(); 
std::cout<< c11 << ", " << c12 << ", " << c13 << std::endl;

Abandoned


Boost.ConceptTraits

Last Download

  • Description:Overload on Concepts of template parameter types, using enable_if and some class traits.

Libraries Listed by Category

See Boost library documentation by Category for a list of the already approved Boost libraries by category.


Algorithms


Broken compiler workarounds


Concurrent Programming


Containers


Correctness And Testing


Data Communications


Data Structures


Database


Debug


Distribution


Function Objects And Higher-order Programming


Generic Programming


Graphical User Interface


Idioms


Image Processing


Input/Output


Inter-language support


Iterators


Language Features Emulation


Math And Numerics


Memory


Parsing


Patterns



Portability


Preprocessor Metaprogramming


Programming Interfaces


Reflective Programming


String And Text Processing


System


Template Metaprogramming


Test


Utilities


XML


Miscellaneous

Note: See TracWiki for help on using the wiki.