Menu

PartCollaboratorSyntax

Anonymous

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?

  • the metaphor Device and Plug was considered odd by someone
  • Part is the best fit for a thing contained in a Catalog
  • Collaborator is the historical word for dependencies
  • the new syntax is more understandable

How to change your code

You must change your files according to the following rules:

  • replace all the occurrences of Device with Part in the source code
  • replace all the occurrences of Plug with Collaborator in the source code
  • replace the tag devices with parts in the XML configuration files
  • replace the tag device with part in the XML configuration files
  • replace the tag plug with collaborator in the XML configuration files
  • replace the key devices with parts in the JSON configuration files
  • replace the key plug with collaborator in the JSON configuration files

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.


Related

Wiki: TableOfContents

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.