Trumphurst Ltd.

Submit a comment to an "Available C++ Libraries FAQ" entry

CategoryLibraries available to download (D-L)

DynaMix - A New Take on Polymorphism in C++

DynaMix [ˈdainəˌmiks] (Dynamic Mixins) is a library that allows composition and modification of polymorphic types at run time.

The library is a means to create a project's architecture rather than achieve its purpose. It focuses on maximum performance and minimal memory overhead.

DynaMix is great for the software architecture of systems with very complex objects including, but not limited to:

The library uses the type dynamix::object as a placeholder, whose instances can be extended with existing classes (mixins), thus providing a particular instance with the functionality of all those types. Accessing the newly formed type's interface is made through messages – stand-alone functions generated by the library, which can be thought of as methods.

Here is a small example of what your code may look like if you use the library:

    // assuming my_objects.get_ally(0); is a way to get an ally to the
    // main character in a game

    dynamix::object& obj = my_objects.get_ally(0);

    // now let's make the object think some positive thoughts about the
    // main character

    think(obj); // C++ doesn't allow us to have obj.think()
                // DynaMix's messages are standalone functions

    // type composition
    dynamix::mutate(obj)
        .add();

    // object can now respond to fly()

    fly(obj); // ...instead of obj.fly()

    // type mutation
    dynamix::mutate(obj)
        .remove()
        .add();

    think(obj); // the same object now thinks negative thoughts about the main
                // character, since it's no longer an ally, but an enemy

Key features of the library:

Licensing : MIT


Do not expect an immediate response - the contents of this form will be added to a queue, which I process manually about once a week. If you don't fill in your email address correctly, you will not (obviously) get any reply at all. Other invalid information may result in a mailed request for clarification.

Enter your comment in the areas provided below. Be sure to include your name and email address.

Please don't bother trying to post spam or links to dodgy web sites - everything you post here is reviewed by a human being before being released for public viewing.


Your Name
Your Email Address
Comment:

Click to submit your comment.
Up to the FAQ title page

For more information on any of Trumphurst's products and services, please


This page, and all contents, are Copyright © 1997-2017 by
Trumphurst Ltd.
The Willows
Canalside
St. Martins Moor
Oswestry
Shropshire
SY10 7BH
England.
Contact us
www.trumphurst.com is hosted by JumboCruiser.