All Projects β†’ iboB β†’ Dynamix

iboB / Dynamix

Licence: other
πŸ₯ A new take on polymorphism in C++

Programming Languages

cpp
1120 projects
cpp11
221 projects

Projects that are alternatives of or similar to Dynamix

Python And Oop
Object-Oriented Programming concepts in Python
Stars: ✭ 123 (-75.6%)
Mutual labels:  polymorphism, oop
Libmodule
C simple and elegant implementation of an actor library
Stars: ✭ 118 (-76.59%)
Mutual labels:  library, oop
Battleship
An Object-Oriented VBA experiment
Stars: ✭ 66 (-86.9%)
Mutual labels:  oop, polymorphism
Unifiedtransform
A school management Software
Stars: ✭ 2,248 (+346.03%)
Mutual labels:  library, oop
You Don T Know Oop
Π—Π½Π°Π΅Ρ‚Π΅ Π»ΠΈ Π²Ρ‹ ΠΎΠΎΠΏ?
Stars: ✭ 170 (-66.27%)
Mutual labels:  polymorphism, oop
Java-Programs
Java Practiced Problems including concepts of OOPS, Interface, String , Collection.
Stars: ✭ 51 (-89.88%)
Mutual labels:  oop, polymorphism
OOP-In-CPlusPlus
An Awesome Repository On Object Oriented Programming In C++ Language. Ideal For Computer Science Undergraduates, This Repository Holds All The Resources Created And Used By Me - Code & Theory For One To Master Object Oriented Programming. Filled With Theory Slides, Number Of Programs, Concept-Clearing Projects And Beautifully Explained, Well Doc…
Stars: ✭ 27 (-94.64%)
Mutual labels:  oop, polymorphism
Almin
Client-side DDD/CQRS for JavaScript.
Stars: ✭ 477 (-5.36%)
Mutual labels:  library
Popview Android
Pop animation with circular dust effect for any view updation
Stars: ✭ 487 (-3.37%)
Mutual labels:  library
Csshake
CSS classes to move your DOM!
Stars: ✭ 4,531 (+799.01%)
Mutual labels:  mixins
Introduction
An Android library to show an intro to your users.
Stars: ✭ 471 (-6.55%)
Mutual labels:  library
Dnsjava
The offical home of dnsjava - an implementation of the DNS protocol in Java.
Stars: ✭ 475 (-5.75%)
Mutual labels:  library
Fasy
FP iterators that are both eager and asynchronous
Stars: ✭ 488 (-3.17%)
Mutual labels:  library
Competitiveprogramming
A collection of algorithms, data structures and other useful information for competitive programming.
Stars: ✭ 475 (-5.75%)
Mutual labels:  library
Garland View
≑ GarlandView seamlessly transitions between multiple lists of content. Swift UI library made by @Ramotion
Stars: ✭ 496 (-1.59%)
Mutual labels:  library
Bunny
BunnyJS - Lightweight native (vanilla) JavaScript (JS) and ECMAScript 6 (ES6) browser library, package of small stand-alone components without dependencies: FormData, upload, image preview, HTML5 validation, Autocomplete, Dropdown, Calendar, Datepicker, Ajax, Datatable, Pagination, URL, Template engine, Element positioning, smooth scrolling, routing, inversion of control and more. Simple syntax and architecture. Next generation jQuery and front-end framework. Documentation and examples available.
Stars: ✭ 473 (-6.15%)
Mutual labels:  library
Instapy Cli
✨ Python library and CLI to upload photo and video on Instagram. W/o a phone!
Stars: ✭ 498 (-1.19%)
Mutual labels:  library
Ical4j
A Java library for parsing and building iCalendar data models
Stars: ✭ 493 (-2.18%)
Mutual labels:  library
React Tutorial
A walkthrough of basic React concepts.
Stars: ✭ 482 (-4.37%)
Mutual labels:  library
Variant
C++17 `std::variant` for C++11/14/17
Stars: ✭ 484 (-3.97%)
Mutual labels:  polymorphism

DynaMix

Language Standard License Gitter

Build and Test

DynaMix (Dynamic Mixins) is a new take on polymorphism. It lets the user compose and modify polymorphic objects at run time in C++.

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

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

  • Games (especially role-playing ones or strategies)
  • CAD systems
  • Enterprise systems
  • UI libraries

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

    // composition
    dynamix::mutate(obj)
        .add<flying_creature>();

    // object can now respond to fly()

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

    // mutation
    dynamix::mutate(obj)
        .remove<ally>()
        .add<enemy>();

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

Here are some of the key features of the library:

  • Compose objects from mixins at run time
  • Physically separate interface and implementation
  • Fast polymorphic calls – comparable to std::function
  • No external dependencies other than the standard library
  • Non-intrusive – mixins don't need to have a common parent or any special code inside
  • Mutate "live" objects by changing their composition at run time
  • Have multicast messages, which are handled by many mixins within an object
  • Possibility to have custom allocators to finely tune the memory and aim for cache-locality for critical parts of the code
  • Ability to have dynamic libraries that can enrich or modify objects, without modifying, or even rebuilding, the executable.
  • Thread safe message calls – as thread safe as the underlying methods.

You can also check out the talk about DynaMix from C++ Russia 2018 or the article about it in ACCU's Overload Journal from April, 2018.

C++ Russia video on YouTube

Created with DynaMix

The following projects are known to use DynaMix as a key piece of their software architecture:

There are two more known mobile games in development which use it. They will be added to this list upon release.

Documentation

The full documentation is available at the GitHub page of the library

Tutorials

Several small fully working annotated tutorial programs are provided with the library:

  • Basic – a program which illustrates the basic usage of DynaMix. It's a tutorial on creating mixins and messages, and creating and modifying (or mutating) objects.
  • Messages – a tutorial which takes a deeper look at creating and calling the various types of messages.
    • Message bids – a tutorial which takes a deeper look at calling and overriding messages.
  • Mutation – a tutorial about the various ways by which objects can be created and mutated.
    • Mutation rules – a deeper look at the library's capabilities for automatic object mutation.
  • Combinators – a tutorial about handling the return type of multicast messages.
  • Allocators – a tutorial about using the library's mixin allocators.
  • Serialization – a tutorial which looks at the possibilities available for serializing objects.

Building

There is an accompanying CMakeLists.txt file in the repo. Use CMake to generate project or make files for your desired platform and compiler.

Contributing

Contributions in the form of issues and pull requests are welcome.

License

This software is distributed under the MIT Software License.

See accompanying file LICENSE or copy here.

Copyright Β© 2013-2021 Borislav Stanimirov, Zahary Karadjov

Logo

The DynaMix logo is licensed under a Creative Commons Attribution 4.0 International License. Copyright Β© 2018 area55git

License: CC BY 4.0.

Boost.Mixin

DynaMix was initially developed as Boost.Mixin but is now a separate library, that doesn't depend on the Boost libraries Collection.

DynaMix, unlike Boost.Mixin, has no C++98 support. It's C++11 only.

DynaMix is distributed under the MIT license, whereas Boost.Mixin is distributed under the Boost Software License.

Footer

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].