PrevUpHomeNext

Using Boost.Mixin

Platforms
Dependencies
Getting the library
Building the library
Using the library
Contacts

The library has been (and continues to be) developed and tested with Boost 1.51, 1.53, and 1.54 and 32 and 64 bit builds with the compilers:

  • On Windows: Visual C++ 9 (2008), Visual C++ 11 (2012), mingw-gcc 4.6.2
  • On Linux: gcc 4.6.3, gcc 4.7, clang 3.0
  • On OSX and iOS: clang 3.0 (XCode 4.2)
  • On Android: arm-gcc 4.6.1

Other C++03 compliant compilers will most likely also work

The library has some dependencies on a few Boost libraries. The following libraries must be available in order to compile and link programs that use Boost.Mixin:

  • Boost.Pointer Container
  • Boost.Preprocessor
  • Boost.Foreach
  • BOOST_ASSERT from Boost utility libraries
  • Boost.Exception if you choose to have exceptions enabled
  • Boost.Type Traits

For non-C++11 builds the following libraries must be also available:

  • Boost.Unordered – used internally

Boost.Mixin is not an official part of the Boost libraries collection. Until it is, you can get the library from its official repository at GitHub.

You can build it with its Jamfile and Boost.Build.

Also in the official Git repository at GitHub, you can find project files for Visual Studio 2012 and 2008 for Windows, QMAKE and Code::Blocks for Linux or Unix, and an Xcode project for OSX.

Again in the repository there is also a CMakeLists.txt file for CMake.

If you want something else, all you need to do is compile and link all the .cpp files from the src directory.

Here is a list of the configuration options from config.hpp. You need to rebiuld the library if you change any of those.

  • BOOST_MIXIN_USE_TYPEID - determines the way by which the mixin class names are obtained by the library. The default value is nonzero which makes use of C++'s Runtime type information (RTTI): typeid and type_info. If you set it to zero, then, in order for your code to compile, every mixin type will need to have a public static method – static const char* boost_mixin_name() – which returns a unique string for a class.
  • BOOST_MIXIN_USING_CXX11 - when set to 0 doesn't make use of any C++11 features and also doesn't define the C++11 specific functionalities - object move constructors and message rvalue arguments.
  • BOOST_MIXIN_MAX_MIXINS - determines the maximum number of mixins that can be registered in an application.
  • BOOST_MIXIN_MAX_MESSAGES - determines the maximum number of messages that can be registered in an application.

To use the library in your programs, you only need to include its main header: boost/mixin.hpp.

No special initialization or deinitialization code is needed.

For questions and comments you can contact the developers publicly at the Boost developers' mailing list. or personally on email: b.stanimirov at the domain abv.bg.


PrevUpHomeNext