logo

Wallaroo

C++ Dependency Injection

Introduction

In the directory samples of the source tree you can find some sample program using wallaroo features.

Samples content

In the following table you can find the samples using a specific feature.

Feature Sample
Constraints check all
All container types Minimal
Loading from xml Mineplant, Shapes
Loading from multiple configuration files Shapes
Loading from code Roulette
Constructor parameters all
Multiple catalogs Roulette
Explicit use of boost Boost_only
Explicit use of c++11 Cpp0x_only
Portable use Minimal, Mineplant, Shapes, Roulette
Optional collaborator Mineplant, Minimal
Mandatory collaborator Mineplant (explicit), all (implicit)
Collection collaborator Mineplant, Roulette, Shapes
Bounded collection collaborator Minimal
Shared libraries Roulette
Attributes Shapes

In the following table you can find which features use each sample.

Sample Feature
Minimal All container types
Optional collaborator
Bounded collection collaborator
Boost_only Explicit use of boost
Cpp0x_only Explicit use of c++11
Mineplant XmlConfiguration
Shapes JsonConfiguration
XmlConfiguration
Loading from multiple configuration files
Attributes
Roulette Loading from code
Multiple catalogs
Shared libraries

Samples Description

Minimal, Boost_only & Cpp0x_only

These samples are similar and show the basic features of wallaroo. The only difference among them is the explicit use of C++11 in Cpp0x_only, boost in Boost_only and a portable way in Minimal.

The static structure is shown in the following class diagram:

Mineplant

This sample is a simple process control software. See this blog for the problem description and a deep analisys of the solution.

Shapes

This sample load from a file a list of shapes (trangles, rectangles, circles), align them and draw the resulting figure on the screen or on a CSV file.

Roulette

This is a simulation of a roulette game. You can place your bet, a wheel is spun and then you get the result table. This sample shows how to define your classes in shared libraries (DLL or SO).