<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to PartCollaboratorSyntax</title><link>https://sourceforge.net/p/wallaroolib/wiki/PartCollaboratorSyntax/</link><description>Recent changes to PartCollaboratorSyntax</description><atom:link href="https://sourceforge.net/p/wallaroolib/wiki/PartCollaboratorSyntax/feed" rel="self"/><language>en</language><lastBuildDate>Wed, 01 Apr 2015 14:57:30 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/wallaroolib/wiki/PartCollaboratorSyntax/feed" rel="self" type="application/rss+xml"/><item><title>PartCollaboratorSyntax modified by Anonymous</title><link>https://sourceforge.net/p/wallaroolib/wiki/PartCollaboratorSyntax/</link><description>&lt;div class="markdown_content"&gt;&lt;h1 id="new-syntax"&gt;New Syntax&lt;/h1&gt;
&lt;p&gt;Since version 0.7, wallaroo changed its syntax. &lt;/p&gt;
&lt;p&gt;The two classes &lt;code&gt;Device&lt;/code&gt; and &lt;code&gt;Plug&lt;/code&gt; have been renamed &lt;code&gt;Part&lt;/code&gt; and &lt;code&gt;Collaborator&lt;/code&gt;, respectively. &lt;/p&gt;
&lt;p&gt;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. &lt;/p&gt;
&lt;p&gt;Why we changed the syntax? &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;the metaphor &lt;code&gt;Device&lt;/code&gt; and &lt;code&gt;Plug&lt;/code&gt; was considered odd by someone &lt;/li&gt;
&lt;li&gt;&lt;code&gt;Part&lt;/code&gt; is the best fit for a thing contained in a &lt;code&gt;Catalog&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Collaborator&lt;/code&gt; is the historical word for dependencies &lt;/li&gt;
&lt;li&gt;the new syntax is more understandable &lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id="how-to-change-your-code"&gt;How to change your code&lt;/h1&gt;
&lt;p&gt;You must change your files according to the following rules: &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;replace all the occurrences of &lt;code&gt;Device&lt;/code&gt; with &lt;code&gt;Part&lt;/code&gt; in the source code &lt;/li&gt;
&lt;li&gt;replace all the occurrences of &lt;code&gt;Plug&lt;/code&gt; with &lt;code&gt;Collaborator&lt;/code&gt; in the source code &lt;/li&gt;
&lt;li&gt;replace the tag &lt;code&gt;devices&lt;/code&gt; with &lt;code&gt;parts&lt;/code&gt; in the XML configuration files &lt;/li&gt;
&lt;li&gt;replace the tag &lt;code&gt;device&lt;/code&gt; with &lt;code&gt;part&lt;/code&gt; in the XML configuration files &lt;/li&gt;
&lt;li&gt;replace the tag &lt;code&gt;plug&lt;/code&gt; with &lt;code&gt;collaborator&lt;/code&gt; in the XML configuration files &lt;/li&gt;
&lt;li&gt;replace the key &lt;code&gt;devices&lt;/code&gt; with &lt;code&gt;parts&lt;/code&gt; in the JSON configuration files &lt;/li&gt;
&lt;li&gt;replace the key &lt;code&gt;plug&lt;/code&gt; with &lt;code&gt;collaborator&lt;/code&gt; in the JSON configuration files &lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="examples"&gt;Examples&lt;/h2&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="c1"&gt;// old code&lt;/span&gt;
&lt;span class="c1"&gt;// class Triangle : public wallaroo::Device&lt;/span&gt;

&lt;span class="c1"&gt;// new code&lt;/span&gt;
&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="n"&gt;Triangle&lt;/span&gt; &lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="n"&gt;public&lt;/span&gt; &lt;span class="n"&gt;wallaroo&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Part&lt;/span&gt;

&lt;span class="c1"&gt;// old code&lt;/span&gt;
&lt;span class="c1"&gt;// Plug&amp;lt; int &amp;gt; x;&lt;/span&gt;

&lt;span class="c1"&gt;// new code&lt;/span&gt;
&lt;span class="n"&gt;Collaborator&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="k"&gt;int&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;h2 id="how-to-verify-your-code"&gt;How to verify your code&lt;/h2&gt;
&lt;p&gt;Wallaroo v. 0.7 accepts also the old syntax, by default. However, if you define the symbol &lt;code&gt;WALLAROO_REMOVE_DEPRECATED&lt;/code&gt; 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. &lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Wed, 01 Apr 2015 14:57:30 -0000</pubDate><guid>https://sourceforge.netfa6636efc9da83828e12934fa511506d0406fdbf</guid></item></channel></rss>