supernova: c++11 compile fix
[supercollider.git] / Help / ServerArchitecture / RootNode.html
blob8a76da137084c8ac60676db02148e70ffbcc5933
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <meta http-equiv="Content-Style-Type" content="text/css">
6 <title></title>
7 <meta name="Generator" content="Cocoa HTML Writer">
8 <meta name="CocoaVersion" content="824.42">
9 <style type="text/css">
10 p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Helvetica}
11 p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px}
12 p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
13 p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco}
14 p.p5 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; min-height: 12.0px}
15 p.p6 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #a71e12}
16 span.s1 {color: #0019b7}
17 span.s2 {color: #000000}
18 span.s3 {color: #606060}
19 </style>
20 </head>
21 <body>
22 <p class="p1"><b>RootNode</b></p>
23 <p class="p2"><br></p>
24 <p class="p3"><b>superclass: Group</b></p>
25 <p class="p2"><br></p>
26 <p class="p3">A RootNode is the Group with the <b>nodeID of 0</b> which is always present on each Server and represents the root of that server's node tree.</p>
27 <p class="p2"><br></p>
28 <p class="p3">It is always playing, and always running, cannot be freed, or moved anywhere.</p>
29 <p class="p2"><br></p>
30 <p class="p3">Cacheing is used so that there is always one RootNode per Server.</p>
31 <p class="p2"><br></p>
32 <p class="p4">s = <span class="s1">Server</span>.local;</p>
33 <p class="p5"><br></p>
34 <p class="p4">a = <span class="s1">RootNode</span>(s);</p>
35 <p class="p4">b = <span class="s1">RootNode</span>(s);</p>
36 <p class="p5"><br></p>
37 <p class="p6"><span class="s2">a === b; </span>// identical object</p>
38 <p class="p2"><br></p>
39 <p class="p3">sending "/s_new" messages to the server, the target 0 is what is represented by this object.</p>
40 <p class="p2"><br></p>
41 <p class="p6"><span class="s2">s.sendMsg(</span><span class="s3">"/s_new"</span><span class="s2">, </span><span class="s3">"default"</span><span class="s2">, -1, 0, 0);</span>//the last argument is the target id</p>
42 <p class="p2"><br></p>
43 <p class="p3"><b>IMPORTANT: </b>In general one should NOT add nodes to the RootNode unless one has a specific reason to do so. Instead one should add nodes to the <b>default_group</b>. This provides a known basic node order and protects functionality like Server.record, Server.scope, etc. The default group is the default target for all new nodes, so when using object style nodes will normally not be added to the RootNode unless that is explicitly specified. See <b>default_group</b> for more information.</p>
44 </body>
45 </html>