logo

Wallaroo

C++ Dependency Injection

New Syntax

Since version 0.7, wallaroo changed its syntax.

The two classes Device and Plug have been renamed Part and Collaborator, respectively.

Release 0.7 is backward compatible with the old (deprecated) syntax, but you're encouraged to move to the new one, because in the next releases the old syntax will be removed.

Why we changed the syntax?

How to change your code

You must change your files according to the following rules:

Examples

// old code
// class Triangle : public wallaroo::Device

// new code
class Triangle : public wallaroo::Part
// old code
// Plug< int > x;

// new code
Collaborator< int > x;

How to verify your code

Wallaroo v. 0.7 accepts also the old syntax, by default. However, if you define the symbol WALLAROO_REMOVE_DEPRECATED when compiling, you will disable the old syntax support. In this way, you can check if your code is fully compatible with the new syntax and ready to move to the next (future) release, in which by default the old syntax will not be supported.