http://git-wip-us.apache.org/repos/asf/mesos-site/blob/66e8b923/content/api/latest/c++/3rdparty_2libprocess_2include_2process_2protobuf_8hpp_source.html ---------------------------------------------------------------------- diff --git a/content/api/latest/c++/3rdparty_2libprocess_2include_2process_2protobuf_8hpp_source.html b/content/api/latest/c++/3rdparty_2libprocess_2include_2process_2protobuf_8hpp_source.html index 8e38724..944939f 100644 --- a/content/api/latest/c++/3rdparty_2libprocess_2include_2process_2protobuf_8hpp_source.html +++ b/content/api/latest/c++/3rdparty_2libprocess_2include_2process_2protobuf_8hpp_source.html @@ -182,1027 +182,323 @@ <div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  <a class="code" href="classProtobufProcess.html#a6c404fdc490a7199a0d2ad881d588e5c">send</a>(from, message);</div> <div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  }</div> <div class="line"><a name="l00130"></a><span class="lineno"> 130</span> </div> -<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  <span class="comment">// TODO(vinod): Use ENUM_PARAMS for the overloads.</span></div> -<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  <span class="comment">// Installs that take the sender as the first argument.</span></div> -<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> M></div> -<div class="line"><a name="l00134"></a><span class="lineno"><a class="line" href="classProtobufProcess.html#a9e844001b1b4af4b57923a719f1e128a"> 134</a></span>  <span class="keywordtype">void</span> <a class="code" href="classProtobufProcess.html#a9e844001b1b4af4b57923a719f1e128a">install</a>(<span class="keywordtype">void</span> (T::*method)(<span class="keyword">const</span> <a class="code" href="structprocess_1_1UPID.html">process::UPID</a>&, <span class="keyword">const</span> M&))</div> -<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  {</div> -<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  google::protobuf::Message* m = <span class="keyword">new</span> M();</div> -<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  T* t = <span class="keyword">static_cast<</span>T*<span class="keyword">></span>(<span class="keyword">this</span>);</div> -<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  protobufHandlers[m->GetTypeName()] =</div> -<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  <a class="code" href="namespaceprocess_1_1network.html#ad067110a4b38cc83785a43f49bf6c8e2">lambda::bind</a>(&handlerM<M>,</div> -<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  t, method,</div> -<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  lambda::_1, lambda::_2);</div> -<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  <span class="keyword">delete</span> m;</div> -<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  }</div> -<div class="line"><a name="l00144"></a><span class="lineno"> 144</span> </div> -<div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> M></div> -<div class="line"><a name="l00146"></a><span class="lineno"><a class="line" href="classProtobufProcess.html#a1e6490de580b7d7ac897c24d81554536"> 146</a></span>  <span class="keywordtype">void</span> <a class="code" href="classProtobufProcess.html#a1e6490de580b7d7ac897c24d81554536">install</a>(<span class="keywordtype">void</span> (T::*method)(<span class="keyword">const</span> <a class="code" href="structprocess_1_1UPID.html">process::UPID</a>&))</div> -<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  {</div> -<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  google::protobuf::Message* m = <span class="keyword">new</span> M();</div> -<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  T* t = <span class="keyword">static_cast<</span>T*<span class="keyword">></span>(<span class="keyword">this</span>);</div> -<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  protobufHandlers[m->GetTypeName()] =</div> -<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  <a class="code" href="namespaceprocess_1_1network.html#ad067110a4b38cc83785a43f49bf6c8e2">lambda::bind</a>(&handler0,</div> -<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  t, method,</div> -<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  lambda::_1, lambda::_2);</div> -<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  <span class="keyword">delete</span> m;</div> -<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  }</div> -<div class="line"><a name="l00156"></a><span class="lineno"> 156</span> </div> -<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> M,</div> -<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  <span class="keyword">typename</span> P1, <span class="keyword">typename</span> P1C></div> -<div class="line"><a name="l00159"></a><span class="lineno"><a class="line" href="classProtobufProcess.html#a6a5df2d86d34de83a2a2dc7e2782f077"> 159</a></span>  <span class="keywordtype">void</span> <a class="code" href="classProtobufProcess.html#a6a5df2d86d34de83a2a2dc7e2782f077">install</a>(</div> -<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  <span class="keywordtype">void</span> (T::*method)(<span class="keyword">const</span> <a class="code" href="structprocess_1_1UPID.html">process::UPID</a>&, P1C),</div> -<div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  P1 (M::*param1)() <span class="keyword">const</span>)</div> -<div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  {</div> -<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  google::protobuf::Message* m = <span class="keyword">new</span> M();</div> -<div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  T* t = <span class="keyword">static_cast<</span>T*<span class="keyword">></span>(<span class="keyword">this</span>);</div> -<div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  protobufHandlers[m->GetTypeName()] =</div> -<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  <a class="code" href="namespaceprocess_1_1network.html#ad067110a4b38cc83785a43f49bf6c8e2">lambda::bind</a>(&handler1<M, P1, P1C>,</div> -<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  t, method, param1,</div> -<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  lambda::_1, lambda::_2);</div> -<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  <span class="keyword">delete</span> m;</div> -<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  }</div> -<div class="line"><a name="l00171"></a><span class="lineno"> 171</span> </div> -<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> M,</div> -<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  <span class="keyword">typename</span> P1, <span class="keyword">typename</span> P1C,</div> -<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  <span class="keyword">typename</span> P2, <span class="keyword">typename</span> P2C></div> -<div class="line"><a name="l00175"></a><span class="lineno"><a class="line" href="classProtobufProcess.html#af69c30988ef38572df3048985232ca2a"> 175</a></span>  <span class="keywordtype">void</span> <a class="code" href="classProtobufProcess.html#af69c30988ef38572df3048985232ca2a">install</a>(</div> -<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  <span class="keywordtype">void</span> (T::*method)(<span class="keyword">const</span> <a class="code" href="structprocess_1_1UPID.html">process::UPID</a>&, P1C, P2C),</div> -<div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  P1 (M::*p1)() <span class="keyword">const</span>,</div> -<div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  P2 (M::*p2)() <span class="keyword">const</span>)</div> -<div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  {</div> -<div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  google::protobuf::Message* m = <span class="keyword">new</span> M();</div> -<div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  T* t = <span class="keyword">static_cast<</span>T*<span class="keyword">></span>(<span class="keyword">this</span>);</div> -<div class="line"><a name="l00182"></a><span class="lineno"> 182</span>  protobufHandlers[m->GetTypeName()] =</div> -<div class="line"><a name="l00183"></a><span class="lineno"> 183</span>  <a class="code" href="namespaceprocess_1_1network.html#ad067110a4b38cc83785a43f49bf6c8e2">lambda::bind</a>(&handler2<M, P1, P1C, P2, P2C>,</div> -<div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  t, method, p1, p2,</div> -<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  lambda::_1, lambda::_2);</div> -<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  <span class="keyword">delete</span> m;</div> -<div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  }</div> -<div class="line"><a name="l00188"></a><span class="lineno"> 188</span> </div> -<div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> M,</div> -<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  <span class="keyword">typename</span> P1, <span class="keyword">typename</span> P1C,</div> -<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  <span class="keyword">typename</span> P2, <span class="keyword">typename</span> P2C,</div> -<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  <span class="keyword">typename</span> P3, <span class="keyword">typename</span> P3C></div> -<div class="line"><a name="l00193"></a><span class="lineno"><a class="line" href="classProtobufProcess.html#a4ed1676548817c51eb785b153f247cb1"> 193</a></span>  <span class="keywordtype">void</span> <a class="code" href="classProtobufProcess.html#a4ed1676548817c51eb785b153f247cb1">install</a>(</div> -<div class="line"><a name="l00194"></a><span class="lineno"> 194</span>  <span class="keywordtype">void</span> (T::*method)(<span class="keyword">const</span> <a class="code" href="structprocess_1_1UPID.html">process::UPID</a>&, P1C, P2C, P3C),</div> -<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  P1 (M::*p1)() <span class="keyword">const</span>,</div> -<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  P2 (M::*p2)() <span class="keyword">const</span>,</div> -<div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  P3 (M::*p3)() <span class="keyword">const</span>)</div> -<div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  {</div> -<div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  google::protobuf::Message* m = <span class="keyword">new</span> M();</div> -<div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  T* t = <span class="keyword">static_cast<</span>T*<span class="keyword">></span>(<span class="keyword">this</span>);</div> -<div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  protobufHandlers[m->GetTypeName()] =</div> -<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  <a class="code" href="namespaceprocess_1_1network.html#ad067110a4b38cc83785a43f49bf6c8e2">lambda::bind</a>(&handler3<M, P1, P1C, P2, P2C, P3, P3C>,</div> -<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  t, method, p1, p2, p3,</div> -<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  lambda::_1, lambda::_2);</div> -<div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  <span class="keyword">delete</span> m;</div> -<div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  }</div> -<div class="line"><a name="l00207"></a><span class="lineno"> 207</span> </div> -<div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> M,</div> -<div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  <span class="keyword">typename</span> P1, <span class="keyword">typename</span> P1C,</div> -<div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  <span class="keyword">typename</span> P2, <span class="keyword">typename</span> P2C,</div> -<div class="line"><a name="l00211"></a><span class="lineno"> 211</span>  <span class="keyword">typename</span> P3, <span class="keyword">typename</span> P3C,</div> -<div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  <span class="keyword">typename</span> P4, <span class="keyword">typename</span> P4C></div> -<div class="line"><a name="l00213"></a><span class="lineno"><a class="line" href="classProtobufProcess.html#a5471b4a0c75ddeefe84e78abb3fbc8d6"> 213</a></span>  <span class="keywordtype">void</span> <a class="code" href="classProtobufProcess.html#a5471b4a0c75ddeefe84e78abb3fbc8d6">install</a>(</div> -<div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  <span class="keywordtype">void</span> (T::*method)(<span class="keyword">const</span> <a class="code" href="structprocess_1_1UPID.html">process::UPID</a>&, P1C, P2C, P3C, P4C),</div> -<div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  P1 (M::*p1)() <span class="keyword">const</span>,</div> -<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  P2 (M::*p2)() <span class="keyword">const</span>,</div> -<div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  P3 (M::*p3)() <span class="keyword">const</span>,</div> -<div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  P4 (M::*p4)() <span class="keyword">const</span>)</div> -<div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  {</div> -<div class="line"><a name="l00220"></a><span class="lineno"> 220</span>  google::protobuf::Message* m = <span class="keyword">new</span> M();</div> -<div class="line"><a name="l00221"></a><span class="lineno"> 221</span>  T* t = <span class="keyword">static_cast<</span>T*<span class="keyword">></span>(<span class="keyword">this</span>);</div> -<div class="line"><a name="l00222"></a><span class="lineno"> 222</span>  protobufHandlers[m->GetTypeName()] =</div> -<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>  <a class="code" href="namespaceprocess_1_1network.html#ad067110a4b38cc83785a43f49bf6c8e2">lambda::bind</a>(&handler4<M, P1, P1C, P2, P2C, P3, P3C, P4, P4C>,</div> -<div class="line"><a name="l00224"></a><span class="lineno"> 224</span>  t, method, p1, p2, p3, p4,</div> -<div class="line"><a name="l00225"></a><span class="lineno"> 225</span>  lambda::_1, lambda::_2);</div> -<div class="line"><a name="l00226"></a><span class="lineno"> 226</span>  <span class="keyword">delete</span> m;</div> -<div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  }</div> -<div class="line"><a name="l00228"></a><span class="lineno"> 228</span> </div> -<div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> M,</div> -<div class="line"><a name="l00230"></a><span class="lineno"> 230</span>  <span class="keyword">typename</span> P1, <span class="keyword">typename</span> P1C,</div> -<div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  <span class="keyword">typename</span> P2, <span class="keyword">typename</span> P2C,</div> -<div class="line"><a name="l00232"></a><span class="lineno"> 232</span>  <span class="keyword">typename</span> P3, <span class="keyword">typename</span> P3C,</div> -<div class="line"><a name="l00233"></a><span class="lineno"> 233</span>  <span class="keyword">typename</span> P4, <span class="keyword">typename</span> P4C,</div> -<div class="line"><a name="l00234"></a><span class="lineno"> 234</span>  <span class="keyword">typename</span> P5, <span class="keyword">typename</span> P5C></div> -<div class="line"><a name="l00235"></a><span class="lineno"><a class="line" href="classProtobufProcess.html#acffd11f29e04a14e888157e8d5efa944"> 235</a></span>  <span class="keywordtype">void</span> <a class="code" href="classProtobufProcess.html#acffd11f29e04a14e888157e8d5efa944">install</a>(</div> -<div class="line"><a name="l00236"></a><span class="lineno"> 236</span>  <span class="keywordtype">void</span> (T::*method)(<span class="keyword">const</span> <a class="code" href="structprocess_1_1UPID.html">process::UPID</a>&, P1C, P2C, P3C, P4C, P5C),</div> -<div class="line"><a name="l00237"></a><span class="lineno"> 237</span>  P1 (M::*p1)() <span class="keyword">const</span>,</div> -<div class="line"><a name="l00238"></a><span class="lineno"> 238</span>  P2 (M::*p2)() <span class="keyword">const</span>,</div> -<div class="line"><a name="l00239"></a><span class="lineno"> 239</span>  P3 (M::*p3)() <span class="keyword">const</span>,</div> -<div class="line"><a name="l00240"></a><span class="lineno"> 240</span>  P4 (M::*p4)() <span class="keyword">const</span>,</div> -<div class="line"><a name="l00241"></a><span class="lineno"> 241</span>  P5 (M::*p5)() <span class="keyword">const</span>)</div> -<div class="line"><a name="l00242"></a><span class="lineno"> 242</span>  {</div> -<div class="line"><a name="l00243"></a><span class="lineno"> 243</span>  google::protobuf::Message* m = <span class="keyword">new</span> M();</div> -<div class="line"><a name="l00244"></a><span class="lineno"> 244</span>  T* t = <span class="keyword">static_cast<</span>T*<span class="keyword">></span>(<span class="keyword">this</span>);</div> -<div class="line"><a name="l00245"></a><span class="lineno"> 245</span>  protobufHandlers[m->GetTypeName()] =</div> -<div class="line"><a name="l00246"></a><span class="lineno"> 246</span>  <a class="code" href="namespaceprocess_1_1network.html#ad067110a4b38cc83785a43f49bf6c8e2">lambda::bind</a>(&handler5<M, P1, P1C, P2, P2C, P3, P3C, P4, P4C, P5, P5C>,</div> -<div class="line"><a name="l00247"></a><span class="lineno"> 247</span>  t, method, p1, p2, p3, p4, p5,</div> -<div class="line"><a name="l00248"></a><span class="lineno"> 248</span>  lambda::_1, lambda::_2);</div> -<div class="line"><a name="l00249"></a><span class="lineno"> 249</span>  <span class="keyword">delete</span> m;</div> -<div class="line"><a name="l00250"></a><span class="lineno"> 250</span>  }</div> -<div class="line"><a name="l00251"></a><span class="lineno"> 251</span> </div> -<div class="line"><a name="l00252"></a><span class="lineno"> 252</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> M,</div> -<div class="line"><a name="l00253"></a><span class="lineno"> 253</span>  <span class="keyword">typename</span> P1, <span class="keyword">typename</span> P1C,</div> -<div class="line"><a name="l00254"></a><span class="lineno"> 254</span>  <span class="keyword">typename</span> P2, <span class="keyword">typename</span> P2C,</div> -<div class="line"><a name="l00255"></a><span class="lineno"> 255</span>  <span class="keyword">typename</span> P3, <span class="keyword">typename</span> P3C,</div> -<div class="line"><a name="l00256"></a><span class="lineno"> 256</span>  <span class="keyword">typename</span> P4, <span class="keyword">typename</span> P4C,</div> -<div class="line"><a name="l00257"></a><span class="lineno"> 257</span>  <span class="keyword">typename</span> P5, <span class="keyword">typename</span> P5C,</div> -<div class="line"><a name="l00258"></a><span class="lineno"> 258</span>  <span class="keyword">typename</span> P6, <span class="keyword">typename</span> P6C></div> -<div class="line"><a name="l00259"></a><span class="lineno"><a class="line" href="classProtobufProcess.html#a124b2a08771883f00d73b96e109f362b"> 259</a></span>  <span class="keywordtype">void</span> <a class="code" href="classProtobufProcess.html#a124b2a08771883f00d73b96e109f362b">install</a>(</div> -<div class="line"><a name="l00260"></a><span class="lineno"> 260</span>  <span class="keywordtype">void</span> (T::*method)(<span class="keyword">const</span> <a class="code" href="structprocess_1_1UPID.html">process::UPID</a>&, P1C, P2C, P3C, P4C, P5C, P6C),</div> -<div class="line"><a name="l00261"></a><span class="lineno"> 261</span>  P1 (M::*p1)() <span class="keyword">const</span>,</div> -<div class="line"><a name="l00262"></a><span class="lineno"> 262</span>  P2 (M::*p2)() <span class="keyword">const</span>,</div> -<div class="line"><a name="l00263"></a><span class="lineno"> 263</span>  P3 (M::*p3)() <span class="keyword">const</span>,</div> -<div class="line"><a name="l00264"></a><span class="lineno"> 264</span>  P4 (M::*p4)() <span class="keyword">const</span>,</div> -<div class="line"><a name="l00265"></a><span class="lineno"> 265</span>  P5 (M::*p5)() <span class="keyword">const</span>,</div> -<div class="line"><a name="l00266"></a><span class="lineno"> 266</span>  P6 (M::*p6)() <span class="keyword">const</span>)</div> -<div class="line"><a name="l00267"></a><span class="lineno"> 267</span>  {</div> -<div class="line"><a name="l00268"></a><span class="lineno"> 268</span>  google::protobuf::Message* m = <span class="keyword">new</span> M();</div> -<div class="line"><a name="l00269"></a><span class="lineno"> 269</span>  T* t = <span class="keyword">static_cast<</span>T*<span class="keyword">></span>(<span class="keyword">this</span>);</div> -<div class="line"><a name="l00270"></a><span class="lineno"> 270</span>  protobufHandlers[m->GetTypeName()] =</div> -<div class="line"><a name="l00271"></a><span class="lineno"> 271</span>  <a class="code" href="namespaceprocess_1_1network.html#ad067110a4b38cc83785a43f49bf6c8e2">lambda::bind</a>(&handler6<M, P1, P1C, P2, P2C, P3, P3C,</div> -<div class="line"><a name="l00272"></a><span class="lineno"> 272</span>  P4, P4C, P5, P5C, P6, P6C>,</div> -<div class="line"><a name="l00273"></a><span class="lineno"> 273</span>  t, method, p1, p2, p3, p4, p5, p6,</div> -<div class="line"><a name="l00274"></a><span class="lineno"> 274</span>  lambda::_1, lambda::_2);</div> -<div class="line"><a name="l00275"></a><span class="lineno"> 275</span>  <span class="keyword">delete</span> m;</div> -<div class="line"><a name="l00276"></a><span class="lineno"> 276</span>  }</div> -<div class="line"><a name="l00277"></a><span class="lineno"> 277</span> </div> -<div class="line"><a name="l00278"></a><span class="lineno"> 278</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> M,</div> -<div class="line"><a name="l00279"></a><span class="lineno"> 279</span>  <span class="keyword">typename</span> P1, <span class="keyword">typename</span> P1C,</div> -<div class="line"><a name="l00280"></a><span class="lineno"> 280</span>  <span class="keyword">typename</span> P2, <span class="keyword">typename</span> P2C,</div> -<div class="line"><a name="l00281"></a><span class="lineno"> 281</span>  <span class="keyword">typename</span> P3, <span class="keyword">typename</span> P3C,</div> -<div class="line"><a name="l00282"></a><span class="lineno"> 282</span>  <span class="keyword">typename</span> P4, <span class="keyword">typename</span> P4C,</div> -<div class="line"><a name="l00283"></a><span class="lineno"> 283</span>  <span class="keyword">typename</span> P5, <span class="keyword">typename</span> P5C,</div> -<div class="line"><a name="l00284"></a><span class="lineno"> 284</span>  <span class="keyword">typename</span> P6, <span class="keyword">typename</span> P6C,</div> -<div class="line"><a name="l00285"></a><span class="lineno"> 285</span>  <span class="keyword">typename</span> P7, <span class="keyword">typename</span> P7C></div> -<div class="line"><a name="l00286"></a><span class="lineno"><a class="line" href="classProtobufProcess.html#a2a2acb37de2d4c95cab315f13a3e6592"> 286</a></span>  <span class="keywordtype">void</span> <a class="code" href="classProtobufProcess.html#a2a2acb37de2d4c95cab315f13a3e6592">install</a>(</div> -<div class="line"><a name="l00287"></a><span class="lineno"> 287</span>  <span class="keywordtype">void</span> (T::*method)(<span class="keyword">const</span> <a class="code" href="structprocess_1_1UPID.html">process::UPID</a>&, P1C, P2C, P3C,</div> -<div class="line"><a name="l00288"></a><span class="lineno"> 288</span>  P4C, P5C, P6C, P7C),</div> -<div class="line"><a name="l00289"></a><span class="lineno"> 289</span>  P1 (M::*p1)() <span class="keyword">const</span>,</div> -<div class="line"><a name="l00290"></a><span class="lineno"> 290</span>  P2 (M::*p2)() <span class="keyword">const</span>,</div> -<div class="line"><a name="l00291"></a><span class="lineno"> 291</span>  P3 (M::*p3)() <span class="keyword">const</span>,</div> -<div class="line"><a name="l00292"></a><span class="lineno"> 292</span>  P4 (M::*p4)() <span class="keyword">const</span>,</div> -<div class="line"><a name="l00293"></a><span class="lineno"> 293</span>  P5 (M::*p5)() <span class="keyword">const</span>,</div> -<div class="line"><a name="l00294"></a><span class="lineno"> 294</span>  P6 (M::*p6)() <span class="keyword">const</span>,</div> -<div class="line"><a name="l00295"></a><span class="lineno"> 295</span>  P7 (M::*p7)() <span class="keyword">const</span>)</div> +<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  <span class="comment">// Installs that take the sender as the first argument.</span></div> +<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> M></div> +<div class="line"><a name="l00133"></a><span class="lineno"><a class="line" href="classProtobufProcess.html#a9e844001b1b4af4b57923a719f1e128a"> 133</a></span>  <span class="keywordtype">void</span> <a class="code" href="classProtobufProcess.html#a9e844001b1b4af4b57923a719f1e128a">install</a>(<span class="keywordtype">void</span> (T::*method)(<span class="keyword">const</span> <a class="code" href="structprocess_1_1UPID.html">process::UPID</a>&, <span class="keyword">const</span> M&))</div> +<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  {</div> +<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  google::protobuf::Message* m = <span class="keyword">new</span> M();</div> +<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  T* t = <span class="keyword">static_cast<</span>T*<span class="keyword">></span>(<span class="keyword">this</span>);</div> +<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  protobufHandlers[m->GetTypeName()] =</div> +<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  <a class="code" href="namespaceprocess_1_1network.html#ad067110a4b38cc83785a43f49bf6c8e2">lambda::bind</a>(&handlerM<M>,</div> +<div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  t, method,</div> +<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  lambda::_1, lambda::_2);</div> +<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  <span class="keyword">delete</span> m;</div> +<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  }</div> +<div class="line"><a name="l00143"></a><span class="lineno"> 143</span> </div> +<div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> M, <span class="keyword">typename</span> P></div> +<div class="line"><a name="l00145"></a><span class="lineno"><a class="line" href="classProtobufProcess.html#a0657fb99bfae4fb1d83cb9fd13f8935a"> 145</a></span>  <span class="keyword">using</span> <a class="code" href="classProtobufProcess.html#a0657fb99bfae4fb1d83cb9fd13f8935a">MessageProperty</a> = P(M::*)() <span class="keyword">const</span>;</div> +<div class="line"><a name="l00146"></a><span class="lineno"> 146</span> </div> +<div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> M></div> +<div class="line"><a name="l00148"></a><span class="lineno"><a class="line" href="classProtobufProcess.html#a1e6490de580b7d7ac897c24d81554536"> 148</a></span>  <span class="keywordtype">void</span> <a class="code" href="classProtobufProcess.html#a1e6490de580b7d7ac897c24d81554536">install</a>(<span class="keywordtype">void</span> (T::*method)(<span class="keyword">const</span> <a class="code" href="structprocess_1_1UPID.html">process::UPID</a>&))</div> +<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  {</div> +<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  google::protobuf::Message* m = <span class="keyword">new</span> M();</div> +<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  T* t = <span class="keyword">static_cast<</span>T*<span class="keyword">></span>(<span class="keyword">this</span>);</div> +<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  protobufHandlers[m->GetTypeName()] =</div> +<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  <a class="code" href="namespaceprocess_1_1network.html#ad067110a4b38cc83785a43f49bf6c8e2">lambda::bind</a>(&handler0,</div> +<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  t, method,</div> +<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  lambda::_1, lambda::_2);</div> +<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  <span class="keyword">delete</span> m;</div> +<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  }</div> +<div class="line"><a name="l00158"></a><span class="lineno"> 158</span> </div> +<div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> M,</div> +<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  <span class="keyword">typename</span> ...P, <span class="keyword">typename</span> ...PC></div> +<div class="line"><a name="l00161"></a><span class="lineno"><a class="line" href="classProtobufProcess.html#a26c145390616b42ec6b6e913adb60449"> 161</a></span>  <span class="keywordtype">void</span> <a class="code" href="classProtobufProcess.html#a26c145390616b42ec6b6e913adb60449">install</a>(</div> +<div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  <span class="keywordtype">void</span> (T::*method)(<span class="keyword">const</span> <a class="code" href="structprocess_1_1UPID.html">process::UPID</a>&, PC...),</div> +<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  <a class="code" href="classProtobufProcess.html#a0657fb99bfae4fb1d83cb9fd13f8935a">MessageProperty<M, P></a>... param)</div> +<div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  {</div> +<div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  google::protobuf::Message* m = <span class="keyword">new</span> M();</div> +<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  T* t = <span class="keyword">static_cast<</span>T*<span class="keyword">></span>(<span class="keyword">this</span>);</div> +<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  protobufHandlers[m->GetTypeName()] =</div> +<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  <a class="code" href="namespaceprocess_1_1network.html#ad067110a4b38cc83785a43f49bf6c8e2">lambda::bind</a>(<span class="keyword">static_cast<</span><span class="keywordtype">void</span>(&)(</div> +<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  T*,</div> +<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  <span class="keywordtype">void</span> (T::*)(<span class="keyword">const </span><a class="code" href="structprocess_1_1UPID.html">process::UPID</a>&, PC...),</div> +<div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  <span class="keyword">const </span><a class="code" href="structprocess_1_1UPID.html">process::UPID</a>&,</div> +<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  <span class="keyword">const </span>std::string&,</div> +<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  <a class="code" href="classProtobufProcess.html#a0657fb99bfae4fb1d83cb9fd13f8935a">MessageProperty<M, P></a>...)<span class="keyword">></span>(handlerN),</div> +<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  t, method,</div> +<div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  lambda::_1, lambda::_2, param...);</div> +<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  <span class="keyword">delete</span> m;</div> +<div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  }</div> +<div class="line"><a name="l00178"></a><span class="lineno"> 178</span> </div> +<div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  <span class="comment">// Installs that do not take the sender.</span></div> +<div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> M></div> +<div class="line"><a name="l00181"></a><span class="lineno"><a class="line" href="classProtobufProcess.html#ab3b1e7dbf45da39a0292fb8f0852e4a5"> 181</a></span>  <span class="keywordtype">void</span> <a class="code" href="classProtobufProcess.html#ab3b1e7dbf45da39a0292fb8f0852e4a5">install</a>(<span class="keywordtype">void</span> (T::*method)(<span class="keyword">const</span> M&))</div> +<div class="line"><a name="l00182"></a><span class="lineno"> 182</span>  {</div> +<div class="line"><a name="l00183"></a><span class="lineno"> 183</span>  google::protobuf::Message* m = <span class="keyword">new</span> M();</div> +<div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  T* t = <span class="keyword">static_cast<</span>T*<span class="keyword">></span>(<span class="keyword">this</span>);</div> +<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  protobufHandlers[m->GetTypeName()] =</div> +<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  <a class="code" href="namespaceprocess_1_1network.html#ad067110a4b38cc83785a43f49bf6c8e2">lambda::bind</a>(&_handlerM<M>,</div> +<div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  t, method,</div> +<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  lambda::_1, lambda::_2);</div> +<div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  <span class="keyword">delete</span> m;</div> +<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  }</div> +<div class="line"><a name="l00191"></a><span class="lineno"> 191</span> </div> +<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> M></div> +<div class="line"><a name="l00193"></a><span class="lineno"><a class="line" href="classProtobufProcess.html#a78e5925cac3e2cfed66f5a1d0c1aee3e"> 193</a></span>  <span class="keywordtype">void</span> <a class="code" href="classProtobufProcess.html#a78e5925cac3e2cfed66f5a1d0c1aee3e">install</a>(<span class="keywordtype">void</span> (T::*method)())</div> +<div class="line"><a name="l00194"></a><span class="lineno"> 194</span>  {</div> +<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  google::protobuf::Message* m = <span class="keyword">new</span> M();</div> +<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  T* t = <span class="keyword">static_cast<</span>T*<span class="keyword">></span>(<span class="keyword">this</span>);</div> +<div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  protobufHandlers[m->GetTypeName()] =</div> +<div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  <a class="code" href="namespaceprocess_1_1network.html#ad067110a4b38cc83785a43f49bf6c8e2">lambda::bind</a>(&_handler0,</div> +<div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  t, method,</div> +<div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  lambda::_1, lambda::_2);</div> +<div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  <span class="keyword">delete</span> m;</div> +<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  }</div> +<div class="line"><a name="l00203"></a><span class="lineno"> 203</span> </div> +<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> M,</div> +<div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  <span class="keyword">typename</span> ...P, <span class="keyword">typename</span> ...PC></div> +<div class="line"><a name="l00206"></a><span class="lineno"><a class="line" href="classProtobufProcess.html#a2a43dbf78901ee50fb93fa330f9632d7"> 206</a></span>  <span class="keywordtype">void</span> <a class="code" href="classProtobufProcess.html#a2a43dbf78901ee50fb93fa330f9632d7">install</a>(</div> +<div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  <span class="keywordtype">void</span> (T::*method)(PC...),</div> +<div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  <a class="code" href="classProtobufProcess.html#a0657fb99bfae4fb1d83cb9fd13f8935a">MessageProperty<M, P></a>... param)</div> +<div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  {</div> +<div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  google::protobuf::Message* m = <span class="keyword">new</span> M();</div> +<div class="line"><a name="l00211"></a><span class="lineno"> 211</span>  T* t = <span class="keyword">static_cast<</span>T*<span class="keyword">></span>(<span class="keyword">this</span>);</div> +<div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  protobufHandlers[m->GetTypeName()] =</div> +<div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  <a class="code" href="namespaceprocess_1_1network.html#ad067110a4b38cc83785a43f49bf6c8e2">lambda::bind</a>(<span class="keyword">static_cast<</span><span class="keywordtype">void</span>(&)(</div> +<div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  T*,</div> +<div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  <span class="keywordtype">void</span> (T::*)(PC...),</div> +<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  <span class="keyword">const </span><a class="code" href="structprocess_1_1UPID.html">process::UPID</a>&,</div> +<div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  <span class="keyword">const </span>std::string&,</div> +<div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  <a class="code" href="classProtobufProcess.html#a0657fb99bfae4fb1d83cb9fd13f8935a">MessageProperty<M, P></a>...)<span class="keyword">></span>(_handlerN),</div> +<div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  t, method,</div> +<div class="line"><a name="l00220"></a><span class="lineno"> 220</span>  lambda::_1, lambda::_2, param...);</div> +<div class="line"><a name="l00221"></a><span class="lineno"> 221</span>  <span class="keyword">delete</span> m;</div> +<div class="line"><a name="l00222"></a><span class="lineno"> 222</span>  }</div> +<div class="line"><a name="l00223"></a><span class="lineno"> 223</span> </div> +<div class="line"><a name="l00224"></a><span class="lineno"> 224</span>  <span class="keyword">using</span> <a class="code" href="classprocess_1_1Process.html">process::Process<T>::install</a>;</div> +<div class="line"><a name="l00225"></a><span class="lineno"> 225</span> </div> +<div class="line"><a name="l00226"></a><span class="lineno"> 226</span> <span class="keyword">private</span>:</div> +<div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  <span class="comment">// Handlers that take the sender as the first argument.</span></div> +<div class="line"><a name="l00228"></a><span class="lineno"> 228</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> M></div> +<div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  <span class="keyword">static</span> <span class="keywordtype">void</span> handlerM(</div> +<div class="line"><a name="l00230"></a><span class="lineno"> 230</span>  T* t,</div> +<div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  <span class="keywordtype">void</span> (T::*method)(<span class="keyword">const</span> <a class="code" href="structprocess_1_1UPID.html">process::UPID</a>&, <span class="keyword">const</span> M&),</div> +<div class="line"><a name="l00232"></a><span class="lineno"> 232</span>  <span class="keyword">const</span> <a class="code" href="structprocess_1_1UPID.html">process::UPID</a>& sender,</div> +<div class="line"><a name="l00233"></a><span class="lineno"> 233</span>  <span class="keyword">const</span> std::string& data)</div> +<div class="line"><a name="l00234"></a><span class="lineno"> 234</span>  {</div> +<div class="line"><a name="l00235"></a><span class="lineno"> 235</span>  M m;</div> +<div class="line"><a name="l00236"></a><span class="lineno"> 236</span>  m.ParseFromString(data);</div> +<div class="line"><a name="l00237"></a><span class="lineno"> 237</span>  <span class="keywordflow">if</span> (m.IsInitialized()) {</div> +<div class="line"><a name="l00238"></a><span class="lineno"> 238</span>  (t->*method)(sender, m);</div> +<div class="line"><a name="l00239"></a><span class="lineno"> 239</span>  } <span class="keywordflow">else</span> {</div> +<div class="line"><a name="l00240"></a><span class="lineno"> 240</span>  LOG(WARNING) << <span class="stringliteral">"Initialization errors: "</span></div> +<div class="line"><a name="l00241"></a><span class="lineno"> 241</span>  << m.InitializationErrorString();</div> +<div class="line"><a name="l00242"></a><span class="lineno"> 242</span>  }</div> +<div class="line"><a name="l00243"></a><span class="lineno"> 243</span>  }</div> +<div class="line"><a name="l00244"></a><span class="lineno"> 244</span> </div> +<div class="line"><a name="l00245"></a><span class="lineno"> 245</span>  <span class="keyword">static</span> <span class="keywordtype">void</span> handler0(</div> +<div class="line"><a name="l00246"></a><span class="lineno"> 246</span>  T* t,</div> +<div class="line"><a name="l00247"></a><span class="lineno"> 247</span>  <span class="keywordtype">void</span> (T::*method)(<span class="keyword">const</span> <a class="code" href="structprocess_1_1UPID.html">process::UPID</a>&),</div> +<div class="line"><a name="l00248"></a><span class="lineno"> 248</span>  <span class="keyword">const</span> <a class="code" href="structprocess_1_1UPID.html">process::UPID</a>& sender,</div> +<div class="line"><a name="l00249"></a><span class="lineno"> 249</span>  <span class="keyword">const</span> std::string& data)</div> +<div class="line"><a name="l00250"></a><span class="lineno"> 250</span>  {</div> +<div class="line"><a name="l00251"></a><span class="lineno"> 251</span>  (t->*method)(sender);</div> +<div class="line"><a name="l00252"></a><span class="lineno"> 252</span>  }</div> +<div class="line"><a name="l00253"></a><span class="lineno"> 253</span> </div> +<div class="line"><a name="l00254"></a><span class="lineno"> 254</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> M,</div> +<div class="line"><a name="l00255"></a><span class="lineno"> 255</span>  <span class="keyword">typename</span> ...P, <span class="keyword">typename</span> ...PC></div> +<div class="line"><a name="l00256"></a><span class="lineno"> 256</span>  <span class="keyword">static</span> <span class="keywordtype">void</span> handlerN(</div> +<div class="line"><a name="l00257"></a><span class="lineno"> 257</span>  T* t,</div> +<div class="line"><a name="l00258"></a><span class="lineno"> 258</span>  <span class="keywordtype">void</span> (T::*method)(<span class="keyword">const</span> <a class="code" href="structprocess_1_1UPID.html">process::UPID</a>&, PC...),</div> +<div class="line"><a name="l00259"></a><span class="lineno"> 259</span>  <span class="keyword">const</span> <a class="code" href="structprocess_1_1UPID.html">process::UPID</a>& sender,</div> +<div class="line"><a name="l00260"></a><span class="lineno"> 260</span>  <span class="keyword">const</span> std::string& data,</div> +<div class="line"><a name="l00261"></a><span class="lineno"> 261</span>  MessageProperty<M, P>... p)</div> +<div class="line"><a name="l00262"></a><span class="lineno"> 262</span>  {</div> +<div class="line"><a name="l00263"></a><span class="lineno"> 263</span>  M m;</div> +<div class="line"><a name="l00264"></a><span class="lineno"> 264</span>  m.ParseFromString(data);</div> +<div class="line"><a name="l00265"></a><span class="lineno"> 265</span>  <span class="keywordflow">if</span> (m.IsInitialized()) {</div> +<div class="line"><a name="l00266"></a><span class="lineno"> 266</span>  (t->*method)(sender, <a class="code" href="namespacegoogle_1_1protobuf.html#aee8eca8614f1e8ce851c94890b57482b">google::protobuf::convert</a>((m.*p)())...);</div> +<div class="line"><a name="l00267"></a><span class="lineno"> 267</span>  } <span class="keywordflow">else</span> {</div> +<div class="line"><a name="l00268"></a><span class="lineno"> 268</span>  LOG(WARNING) << <span class="stringliteral">"Initialization errors: "</span></div> +<div class="line"><a name="l00269"></a><span class="lineno"> 269</span>  << m.InitializationErrorString();</div> +<div class="line"><a name="l00270"></a><span class="lineno"> 270</span>  }</div> +<div class="line"><a name="l00271"></a><span class="lineno"> 271</span>  }</div> +<div class="line"><a name="l00272"></a><span class="lineno"> 272</span> </div> +<div class="line"><a name="l00273"></a><span class="lineno"> 273</span>  <span class="comment">// Handlers that ignore the sender.</span></div> +<div class="line"><a name="l00274"></a><span class="lineno"> 274</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> M></div> +<div class="line"><a name="l00275"></a><span class="lineno"> 275</span>  <span class="keyword">static</span> <span class="keywordtype">void</span> _handlerM(</div> +<div class="line"><a name="l00276"></a><span class="lineno"> 276</span>  T* t,</div> +<div class="line"><a name="l00277"></a><span class="lineno"> 277</span>  <span class="keywordtype">void</span> (T::*method)(<span class="keyword">const</span> M&),</div> +<div class="line"><a name="l00278"></a><span class="lineno"> 278</span>  <span class="keyword">const</span> <a class="code" href="structprocess_1_1UPID.html">process::UPID</a>&,</div> +<div class="line"><a name="l00279"></a><span class="lineno"> 279</span>  <span class="keyword">const</span> std::string& data)</div> +<div class="line"><a name="l00280"></a><span class="lineno"> 280</span>  {</div> +<div class="line"><a name="l00281"></a><span class="lineno"> 281</span>  M m;</div> +<div class="line"><a name="l00282"></a><span class="lineno"> 282</span>  m.ParseFromString(data);</div> +<div class="line"><a name="l00283"></a><span class="lineno"> 283</span>  <span class="keywordflow">if</span> (m.IsInitialized()) {</div> +<div class="line"><a name="l00284"></a><span class="lineno"> 284</span>  (t->*method)(m);</div> +<div class="line"><a name="l00285"></a><span class="lineno"> 285</span>  } <span class="keywordflow">else</span> {</div> +<div class="line"><a name="l00286"></a><span class="lineno"> 286</span>  LOG(WARNING) << <span class="stringliteral">"Initialization errors: "</span></div> +<div class="line"><a name="l00287"></a><span class="lineno"> 287</span>  << m.InitializationErrorString();</div> +<div class="line"><a name="l00288"></a><span class="lineno"> 288</span>  }</div> +<div class="line"><a name="l00289"></a><span class="lineno"> 289</span>  }</div> +<div class="line"><a name="l00290"></a><span class="lineno"> 290</span> </div> +<div class="line"><a name="l00291"></a><span class="lineno"> 291</span>  <span class="keyword">static</span> <span class="keywordtype">void</span> _handler0(</div> +<div class="line"><a name="l00292"></a><span class="lineno"> 292</span>  T* t,</div> +<div class="line"><a name="l00293"></a><span class="lineno"> 293</span>  <span class="keywordtype">void</span> (T::*method)(),</div> +<div class="line"><a name="l00294"></a><span class="lineno"> 294</span>  <span class="keyword">const</span> <a class="code" href="structprocess_1_1UPID.html">process::UPID</a>&,</div> +<div class="line"><a name="l00295"></a><span class="lineno"> 295</span>  <span class="keyword">const</span> std::string& data)</div> <div class="line"><a name="l00296"></a><span class="lineno"> 296</span>  {</div> -<div class="line"><a name="l00297"></a><span class="lineno"> 297</span>  google::protobuf::Message* m = <span class="keyword">new</span> M();</div> -<div class="line"><a name="l00298"></a><span class="lineno"> 298</span>  T* t = <span class="keyword">static_cast<</span>T*<span class="keyword">></span>(<span class="keyword">this</span>);</div> -<div class="line"><a name="l00299"></a><span class="lineno"> 299</span>  protobufHandlers[m->GetTypeName()] =</div> -<div class="line"><a name="l00300"></a><span class="lineno"> 300</span>  <a class="code" href="namespaceprocess_1_1network.html#ad067110a4b38cc83785a43f49bf6c8e2">lambda::bind</a>(&handler7<M, P1, P1C, P2, P2C, P3, P3C,</div> -<div class="line"><a name="l00301"></a><span class="lineno"> 301</span>  P4, P4C, P5, P5C, P6, P6C, P7, P7C>,</div> -<div class="line"><a name="l00302"></a><span class="lineno"> 302</span>  t, method, p1, p2, p3, p4, p5, p6, p7,</div> -<div class="line"><a name="l00303"></a><span class="lineno"> 303</span>  lambda::_1, lambda::_2);</div> -<div class="line"><a name="l00304"></a><span class="lineno"> 304</span>  <span class="keyword">delete</span> m;</div> -<div class="line"><a name="l00305"></a><span class="lineno"> 305</span>  }</div> -<div class="line"><a name="l00306"></a><span class="lineno"> 306</span> </div> -<div class="line"><a name="l00307"></a><span class="lineno"> 307</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> M,</div> -<div class="line"><a name="l00308"></a><span class="lineno"> 308</span>  <span class="keyword">typename</span> P1, <span class="keyword">typename</span> P1C,</div> -<div class="line"><a name="l00309"></a><span class="lineno"> 309</span>  <span class="keyword">typename</span> P2, <span class="keyword">typename</span> P2C,</div> -<div class="line"><a name="l00310"></a><span class="lineno"> 310</span>  <span class="keyword">typename</span> P3, <span class="keyword">typename</span> P3C,</div> -<div class="line"><a name="l00311"></a><span class="lineno"> 311</span>  <span class="keyword">typename</span> P4, <span class="keyword">typename</span> P4C,</div> -<div class="line"><a name="l00312"></a><span class="lineno"> 312</span>  <span class="keyword">typename</span> P5, <span class="keyword">typename</span> P5C,</div> -<div class="line"><a name="l00313"></a><span class="lineno"> 313</span>  <span class="keyword">typename</span> P6, <span class="keyword">typename</span> P6C,</div> -<div class="line"><a name="l00314"></a><span class="lineno"> 314</span>  <span class="keyword">typename</span> P7, <span class="keyword">typename</span> P7C,</div> -<div class="line"><a name="l00315"></a><span class="lineno"> 315</span>  <span class="keyword">typename</span> P8, <span class="keyword">typename</span> P8C></div> -<div class="line"><a name="l00316"></a><span class="lineno"><a class="line" href="classProtobufProcess.html#a97b9a38a0c5f8b25774fe2190b95b4db"> 316</a></span>  <span class="keywordtype">void</span> <a class="code" href="classProtobufProcess.html#a97b9a38a0c5f8b25774fe2190b95b4db">install</a>(</div> -<div class="line"><a name="l00317"></a><span class="lineno"> 317</span>  <span class="keywordtype">void</span> (T::*method)(<span class="keyword">const</span> <a class="code" href="structprocess_1_1UPID.html">process::UPID</a>&, P1C, P2C, P3C,</div> -<div class="line"><a name="l00318"></a><span class="lineno"> 318</span>  P4C, P5C, P6C, P7C, P8C),</div> -<div class="line"><a name="l00319"></a><span class="lineno"> 319</span>  P1 (M::*p1)() <span class="keyword">const</span>,</div> -<div class="line"><a name="l00320"></a><span class="lineno"> 320</span>  P2 (M::*p2)() <span class="keyword">const</span>,</div> -<div class="line"><a name="l00321"></a><span class="lineno"> 321</span>  P3 (M::*p3)() <span class="keyword">const</span>,</div> -<div class="line"><a name="l00322"></a><span class="lineno"> 322</span>  P4 (M::*p4)() <span class="keyword">const</span>,</div> -<div class="line"><a name="l00323"></a><span class="lineno"> 323</span>  P5 (M::*p5)() <span class="keyword">const</span>,</div> -<div class="line"><a name="l00324"></a><span class="lineno"> 324</span>  P6 (M::*p6)() <span class="keyword">const</span>,</div> -<div class="line"><a name="l00325"></a><span class="lineno"> 325</span>  P7 (M::*p7)() <span class="keyword">const</span>,</div> -<div class="line"><a name="l00326"></a><span class="lineno"> 326</span>  P8 (M::*p8)() <span class="keyword">const</span>)</div> -<div class="line"><a name="l00327"></a><span class="lineno"> 327</span>  {</div> -<div class="line"><a name="l00328"></a><span class="lineno"> 328</span>  google::protobuf::Message* m = <span class="keyword">new</span> M();</div> -<div class="line"><a name="l00329"></a><span class="lineno"> 329</span>  T* t = <span class="keyword">static_cast<</span>T*<span class="keyword">></span>(<span class="keyword">this</span>);</div> -<div class="line"><a name="l00330"></a><span class="lineno"> 330</span>  protobufHandlers[m->GetTypeName()] =</div> -<div class="line"><a name="l00331"></a><span class="lineno"> 331</span>  <a class="code" href="namespaceprocess_1_1network.html#ad067110a4b38cc83785a43f49bf6c8e2">lambda::bind</a>(&handler8<M, P1, P1C, P2, P2C, P3, P3C,</div> -<div class="line"><a name="l00332"></a><span class="lineno"> 332</span>  P4, P4C, P5, P5C, P6, P6C,</div> -<div class="line"><a name="l00333"></a><span class="lineno"> 333</span>  P7, P7C, P8, P8C>,</div> -<div class="line"><a name="l00334"></a><span class="lineno"> 334</span>  t, method, p1, p2, p3, p4, p5, p6, p7, p8,</div> -<div class="line"><a name="l00335"></a><span class="lineno"> 335</span>  lambda::_1, lambda::_2);</div> -<div class="line"><a name="l00336"></a><span class="lineno"> 336</span>  <span class="keyword">delete</span> m;</div> -<div class="line"><a name="l00337"></a><span class="lineno"> 337</span>  }</div> -<div class="line"><a name="l00338"></a><span class="lineno"> 338</span> </div> -<div class="line"><a name="l00339"></a><span class="lineno"> 339</span>  <span class="comment">// Installs that do not take the sender.</span></div> -<div class="line"><a name="l00340"></a><span class="lineno"> 340</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> M></div> -<div class="line"><a name="l00341"></a><span class="lineno"><a class="line" href="classProtobufProcess.html#ab3b1e7dbf45da39a0292fb8f0852e4a5"> 341</a></span>  <span class="keywordtype">void</span> <a class="code" href="classProtobufProcess.html#ab3b1e7dbf45da39a0292fb8f0852e4a5">install</a>(<span class="keywordtype">void</span> (T::*method)(<span class="keyword">const</span> M&))</div> -<div class="line"><a name="l00342"></a><span class="lineno"> 342</span>  {</div> -<div class="line"><a name="l00343"></a><span class="lineno"> 343</span>  google::protobuf::Message* m = <span class="keyword">new</span> M();</div> -<div class="line"><a name="l00344"></a><span class="lineno"> 344</span>  T* t = <span class="keyword">static_cast<</span>T*<span class="keyword">></span>(<span class="keyword">this</span>);</div> -<div class="line"><a name="l00345"></a><span class="lineno"> 345</span>  protobufHandlers[m->GetTypeName()] =</div> -<div class="line"><a name="l00346"></a><span class="lineno"> 346</span>  <a class="code" href="namespaceprocess_1_1network.html#ad067110a4b38cc83785a43f49bf6c8e2">lambda::bind</a>(&_handlerM<M>,</div> -<div class="line"><a name="l00347"></a><span class="lineno"> 347</span>  t, method,</div> -<div class="line"><a name="l00348"></a><span class="lineno"> 348</span>  lambda::_1, lambda::_2);</div> -<div class="line"><a name="l00349"></a><span class="lineno"> 349</span>  <span class="keyword">delete</span> m;</div> -<div class="line"><a name="l00350"></a><span class="lineno"> 350</span>  }</div> -<div class="line"><a name="l00351"></a><span class="lineno"> 351</span> </div> -<div class="line"><a name="l00352"></a><span class="lineno"> 352</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> M></div> -<div class="line"><a name="l00353"></a><span class="lineno"><a class="line" href="classProtobufProcess.html#a78e5925cac3e2cfed66f5a1d0c1aee3e"> 353</a></span>  <span class="keywordtype">void</span> <a class="code" href="classProtobufProcess.html#a78e5925cac3e2cfed66f5a1d0c1aee3e">install</a>(<span class="keywordtype">void</span> (T::*method)())</div> -<div class="line"><a name="l00354"></a><span class="lineno"> 354</span>  {</div> -<div class="line"><a name="l00355"></a><span class="lineno"> 355</span>  google::protobuf::Message* m = <span class="keyword">new</span> M();</div> -<div class="line"><a name="l00356"></a><span class="lineno"> 356</span>  T* t = <span class="keyword">static_cast<</span>T*<span class="keyword">></span>(<span class="keyword">this</span>);</div> -<div class="line"><a name="l00357"></a><span class="lineno"> 357</span>  protobufHandlers[m->GetTypeName()] =</div> -<div class="line"><a name="l00358"></a><span class="lineno"> 358</span>  <a class="code" href="namespaceprocess_1_1network.html#ad067110a4b38cc83785a43f49bf6c8e2">lambda::bind</a>(&_handler0,</div> -<div class="line"><a name="l00359"></a><span class="lineno"> 359</span>  t, method,</div> -<div class="line"><a name="l00360"></a><span class="lineno"> 360</span>  lambda::_1, lambda::_2);</div> -<div class="line"><a name="l00361"></a><span class="lineno"> 361</span>  <span class="keyword">delete</span> m;</div> -<div class="line"><a name="l00362"></a><span class="lineno"> 362</span>  }</div> -<div class="line"><a name="l00363"></a><span class="lineno"> 363</span> </div> -<div class="line"><a name="l00364"></a><span class="lineno"> 364</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> M,</div> -<div class="line"><a name="l00365"></a><span class="lineno"> 365</span>  <span class="keyword">typename</span> P1, <span class="keyword">typename</span> P1C></div> -<div class="line"><a name="l00366"></a><span class="lineno"><a class="line" href="classProtobufProcess.html#abe8eaaa84e331be77dca1e5e1694148a"> 366</a></span>  <span class="keywordtype">void</span> <a class="code" href="classProtobufProcess.html#abe8eaaa84e331be77dca1e5e1694148a">install</a>(</div> -<div class="line"><a name="l00367"></a><span class="lineno"> 367</span>  <span class="keywordtype">void</span> (T::*method)(P1C),</div> -<div class="line"><a name="l00368"></a><span class="lineno"> 368</span>  P1 (M::*param1)() <span class="keyword">const</span>)</div> -<div class="line"><a name="l00369"></a><span class="lineno"> 369</span>  {</div> -<div class="line"><a name="l00370"></a><span class="lineno"> 370</span>  google::protobuf::Message* m = <span class="keyword">new</span> M();</div> -<div class="line"><a name="l00371"></a><span class="lineno"> 371</span>  T* t = <span class="keyword">static_cast<</span>T*<span class="keyword">></span>(<span class="keyword">this</span>);</div> -<div class="line"><a name="l00372"></a><span class="lineno"> 372</span>  protobufHandlers[m->GetTypeName()] =</div> -<div class="line"><a name="l00373"></a><span class="lineno"> 373</span>  <a class="code" href="namespaceprocess_1_1network.html#ad067110a4b38cc83785a43f49bf6c8e2">lambda::bind</a>(&_handler1<M, P1, P1C>,</div> -<div class="line"><a name="l00374"></a><span class="lineno"> 374</span>  t, method, param1,</div> -<div class="line"><a name="l00375"></a><span class="lineno"> 375</span>  lambda::_1, lambda::_2);</div> -<div class="line"><a name="l00376"></a><span class="lineno"> 376</span>  <span class="keyword">delete</span> m;</div> -<div class="line"><a name="l00377"></a><span class="lineno"> 377</span>  }</div> +<div class="line"><a name="l00297"></a><span class="lineno"> 297</span>  (t->*method)();</div> +<div class="line"><a name="l00298"></a><span class="lineno"> 298</span>  }</div> +<div class="line"><a name="l00299"></a><span class="lineno"> 299</span> </div> +<div class="line"><a name="l00300"></a><span class="lineno"> 300</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> M,</div> +<div class="line"><a name="l00301"></a><span class="lineno"> 301</span>  <span class="keyword">typename</span> ...P, <span class="keyword">typename</span> ...PC></div> +<div class="line"><a name="l00302"></a><span class="lineno"> 302</span>  <span class="keyword">static</span> <span class="keywordtype">void</span> _handlerN(</div> +<div class="line"><a name="l00303"></a><span class="lineno"> 303</span>  T* t,</div> +<div class="line"><a name="l00304"></a><span class="lineno"> 304</span>  <span class="keywordtype">void</span> (T::*method)(PC...),</div> +<div class="line"><a name="l00305"></a><span class="lineno"> 305</span>  <span class="keyword">const</span> <a class="code" href="structprocess_1_1UPID.html">process::UPID</a>&,</div> +<div class="line"><a name="l00306"></a><span class="lineno"> 306</span>  <span class="keyword">const</span> std::string& data,</div> +<div class="line"><a name="l00307"></a><span class="lineno"> 307</span>  MessageProperty<M, P>... p)</div> +<div class="line"><a name="l00308"></a><span class="lineno"> 308</span>  {</div> +<div class="line"><a name="l00309"></a><span class="lineno"> 309</span>  M m;</div> +<div class="line"><a name="l00310"></a><span class="lineno"> 310</span>  m.ParseFromString(data);</div> +<div class="line"><a name="l00311"></a><span class="lineno"> 311</span>  <span class="keywordflow">if</span> (m.IsInitialized()) {</div> +<div class="line"><a name="l00312"></a><span class="lineno"> 312</span>  (t->*method)(<a class="code" href="namespacegoogle_1_1protobuf.html#aee8eca8614f1e8ce851c94890b57482b">google::protobuf::convert</a>((m.*p)())...);</div> +<div class="line"><a name="l00313"></a><span class="lineno"> 313</span>  } <span class="keywordflow">else</span> {</div> +<div class="line"><a name="l00314"></a><span class="lineno"> 314</span>  LOG(WARNING) << <span class="stringliteral">"Initialization errors: "</span></div> +<div class="line"><a name="l00315"></a><span class="lineno"> 315</span>  << m.InitializationErrorString();</div> +<div class="line"><a name="l00316"></a><span class="lineno"> 316</span>  }</div> +<div class="line"><a name="l00317"></a><span class="lineno"> 317</span>  }</div> +<div class="line"><a name="l00318"></a><span class="lineno"> 318</span> </div> +<div class="line"><a name="l00319"></a><span class="lineno"> 319</span>  <span class="keyword">typedef</span> lambda::function<</div> +<div class="line"><a name="l00320"></a><span class="lineno"> 320</span>  void(<span class="keyword">const</span> <a class="code" href="structprocess_1_1UPID.html">process::UPID</a>&, <span class="keyword">const</span> std::string&)> handler;</div> +<div class="line"><a name="l00321"></a><span class="lineno"> 321</span>  <a class="code" href="classhashmap.html">hashmap<std::string, handler></a> protobufHandlers;</div> +<div class="line"><a name="l00322"></a><span class="lineno"> 322</span> </div> +<div class="line"><a name="l00323"></a><span class="lineno"> 323</span>  <span class="comment">// Sender of "current" message, inaccessible by subclasses.</span></div> +<div class="line"><a name="l00324"></a><span class="lineno"> 324</span>  <span class="comment">// This is only used for reply().</span></div> +<div class="line"><a name="l00325"></a><span class="lineno"> 325</span>  <a class="code" href="structprocess_1_1UPID.html">process::UPID</a> from;</div> +<div class="line"><a name="l00326"></a><span class="lineno"> 326</span> };</div> +<div class="line"><a name="l00327"></a><span class="lineno"> 327</span> </div> +<div class="line"><a name="l00328"></a><span class="lineno"> 328</span> </div> +<div class="line"><a name="l00329"></a><span class="lineno"> 329</span> <span class="comment">// Implements a process for sending protobuf "requests" to a process</span></div> +<div class="line"><a name="l00330"></a><span class="lineno"> 330</span> <span class="comment">// and waiting for a protobuf "response", but uses futures so that</span></div> +<div class="line"><a name="l00331"></a><span class="lineno"> 331</span> <span class="comment">// this can be done without needing to implement a process.</span></div> +<div class="line"><a name="l00332"></a><span class="lineno"> 332</span> <span class="keyword">template</span> <<span class="keyword">typename</span> Req, <span class="keyword">typename</span> Res></div> +<div class="line"><a name="l00333"></a><span class="lineno"><a class="line" href="classReqResProcess.html"> 333</a></span> <span class="keyword">class </span><a class="code" href="classReqResProcess.html">ReqResProcess</a> : <span class="keyword">public</span> <a class="code" href="classProtobufProcess.html">ProtobufProcess</a><ReqResProcess<Req, Res>></div> +<div class="line"><a name="l00334"></a><span class="lineno"> 334</span> {</div> +<div class="line"><a name="l00335"></a><span class="lineno"> 335</span> <span class="keyword">public</span>:</div> +<div class="line"><a name="l00336"></a><span class="lineno"><a class="line" href="classReqResProcess.html#a47e2ce59480781d2fa17021dd4044148"> 336</a></span>  <a class="code" href="classReqResProcess.html#a47e2ce59480781d2fa17021dd4044148">ReqResProcess</a>(<span class="keyword">const</span> <a class="code" href="structprocess_1_1UPID.html">process::UPID</a>& _pid, <span class="keyword">const</span> Req& _req)</div> +<div class="line"><a name="l00337"></a><span class="lineno"> 337</span>  : <a class="code" href="namespaceos.html#ae19e4161a51b86a1f330f3bf1dc75389">process</a>::<a class="code" href="classprocess_1_1ProcessBase.html#a318038bacd95e4260864533f7cfe12fd">ProcessBase</a>(<a class="code" href="namespaceos.html#ae19e4161a51b86a1f330f3bf1dc75389">process</a>::ID::<a class="code" href="namespaceprocess_1_1ID.html#aeb11a48c9def1da169d8455a30d0ee39">generate</a>(<span class="stringliteral">"__req_res__"</span>)),</div> +<div class="line"><a name="l00338"></a><span class="lineno"> 338</span>  pid(_pid),</div> +<div class="line"><a name="l00339"></a><span class="lineno"> 339</span>  req(_req)</div> +<div class="line"><a name="l00340"></a><span class="lineno"> 340</span>  {</div> +<div class="line"><a name="l00341"></a><span class="lineno"> 341</span>  <a class="code" href="classProtobufProcess.html">ProtobufProcess<ReqResProcess<Req, Res></a>>::template</div> +<div class="line"><a name="l00342"></a><span class="lineno"> 342</span>  install<Res>(&<a class="code" href="classReqResProcess.html">ReqResProcess<Req, Res>::response</a>);</div> +<div class="line"><a name="l00343"></a><span class="lineno"> 343</span>  }</div> +<div class="line"><a name="l00344"></a><span class="lineno"> 344</span> </div> +<div class="line"><a name="l00345"></a><span class="lineno"><a class="line" href="classReqResProcess.html#a169374a0aedeade8a80229cb2b32ad5f"> 345</a></span>  <span class="keyword">virtual</span> <a class="code" href="classReqResProcess.html#a169374a0aedeade8a80229cb2b32ad5f">~ReqResProcess</a>()</div> +<div class="line"><a name="l00346"></a><span class="lineno"> 346</span>  {</div> +<div class="line"><a name="l00347"></a><span class="lineno"> 347</span>  <span class="comment">// Discard the promise.</span></div> +<div class="line"><a name="l00348"></a><span class="lineno"> 348</span>  promise.<a class="code" href="classprocess_1_1Promise.html#a8f50fcfd7ddb6dd39ec2cd468377cd5d">discard</a>();</div> +<div class="line"><a name="l00349"></a><span class="lineno"> 349</span>  }</div> +<div class="line"><a name="l00350"></a><span class="lineno"> 350</span> </div> +<div class="line"><a name="l00351"></a><span class="lineno"><a class="line" href="classReqResProcess.html#aa88a64351fac32c4d142a4119b8fe45e"> 351</a></span>  <a class="code" href="classprocess_1_1Future.html">process::Future<Res></a> <a class="code" href="classReqResProcess.html#aa88a64351fac32c4d142a4119b8fe45e">run</a>()</div> +<div class="line"><a name="l00352"></a><span class="lineno"> 352</span>  {</div> +<div class="line"><a name="l00353"></a><span class="lineno"> 353</span>  promise.<a class="code" href="classprocess_1_1Promise.html#a8aef752d6c90cb11e58e3166b7592ef1">future</a>().<a class="code" href="classprocess_1_1Future.html#a1b80bf321358be44880d9c6bae5d9a2d">onDiscard</a>(<a class="code" href="namespaceprocess.html#a8b27a2ef76eb133bf0ce7a5eea4fb77c">defer</a>(<span class="keyword">this</span>, &ReqResProcess::discarded));</div> +<div class="line"><a name="l00354"></a><span class="lineno"> 354</span> </div> +<div class="line"><a name="l00355"></a><span class="lineno"> 355</span>  <a class="code" href="classProtobufProcess.html">ProtobufProcess<ReqResProcess<Req, Res></a>><a class="code" href="classProtobufProcess.html#a6c404fdc490a7199a0d2ad881d588e5c">::send</a>(pid, req);</div> +<div class="line"><a name="l00356"></a><span class="lineno"> 356</span> </div> +<div class="line"><a name="l00357"></a><span class="lineno"> 357</span>  <span class="keywordflow">return</span> promise.<a class="code" href="classprocess_1_1Promise.html#a8aef752d6c90cb11e58e3166b7592ef1">future</a>();</div> +<div class="line"><a name="l00358"></a><span class="lineno"> 358</span>  }</div> +<div class="line"><a name="l00359"></a><span class="lineno"> 359</span> </div> +<div class="line"><a name="l00360"></a><span class="lineno"> 360</span> <span class="keyword">private</span>:</div> +<div class="line"><a name="l00361"></a><span class="lineno"> 361</span>  <span class="keywordtype">void</span> discarded()</div> +<div class="line"><a name="l00362"></a><span class="lineno"> 362</span>  {</div> +<div class="line"><a name="l00363"></a><span class="lineno"> 363</span>  promise.<a class="code" href="classprocess_1_1Promise.html#a8f50fcfd7ddb6dd39ec2cd468377cd5d">discard</a>();</div> +<div class="line"><a name="l00364"></a><span class="lineno"> 364</span>  <a class="code" href="namespaceprocess.html#a20443908afa3212215166e26065349e5">process::terminate</a>(<span class="keyword">this</span>);</div> +<div class="line"><a name="l00365"></a><span class="lineno"> 365</span>  }</div> +<div class="line"><a name="l00366"></a><span class="lineno"> 366</span> </div> +<div class="line"><a name="l00367"></a><span class="lineno"> 367</span>  <span class="keywordtype">void</span> response(<span class="keyword">const</span> Res& res)</div> +<div class="line"><a name="l00368"></a><span class="lineno"> 368</span>  {</div> +<div class="line"><a name="l00369"></a><span class="lineno"> 369</span>  promise.<a class="code" href="classprocess_1_1Promise.html#a989b8dfa7eb2633de3f0f25ac2b87943">set</a>(res);</div> +<div class="line"><a name="l00370"></a><span class="lineno"> 370</span>  <a class="code" href="namespaceprocess.html#a20443908afa3212215166e26065349e5">process::terminate</a>(<span class="keyword">this</span>);</div> +<div class="line"><a name="l00371"></a><span class="lineno"> 371</span>  }</div> +<div class="line"><a name="l00372"></a><span class="lineno"> 372</span> </div> +<div class="line"><a name="l00373"></a><span class="lineno"> 373</span>  <span class="keyword">const</span> <a class="code" href="structprocess_1_1UPID.html">process::UPID</a> pid;</div> +<div class="line"><a name="l00374"></a><span class="lineno"> 374</span>  <span class="keyword">const</span> Req req;</div> +<div class="line"><a name="l00375"></a><span class="lineno"> 375</span>  <a class="code" href="classprocess_1_1Promise.html">process::Promise<Res></a> promise;</div> +<div class="line"><a name="l00376"></a><span class="lineno"> 376</span> };</div> +<div class="line"><a name="l00377"></a><span class="lineno"> 377</span> </div> <div class="line"><a name="l00378"></a><span class="lineno"> 378</span> </div> -<div class="line"><a name="l00379"></a><span class="lineno"> 379</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> M,</div> -<div class="line"><a name="l00380"></a><span class="lineno"> 380</span>  <span class="keyword">typename</span> P1, <span class="keyword">typename</span> P1C,</div> -<div class="line"><a name="l00381"></a><span class="lineno"> 381</span>  <span class="keyword">typename</span> P2, <span class="keyword">typename</span> P2C></div> -<div class="line"><a name="l00382"></a><span class="lineno"><a class="line" href="classProtobufProcess.html#a7a489ee1d8964c32525c4c34523bff5d"> 382</a></span>  <span class="keywordtype">void</span> <a class="code" href="classProtobufProcess.html#a7a489ee1d8964c32525c4c34523bff5d">install</a>(</div> -<div class="line"><a name="l00383"></a><span class="lineno"> 383</span>  <span class="keywordtype">void</span> (T::*method)(P1C, P2C),</div> -<div class="line"><a name="l00384"></a><span class="lineno"> 384</span>  P1 (M::*p1)() <span class="keyword">const</span>,</div> -<div class="line"><a name="l00385"></a><span class="lineno"> 385</span>  P2 (M::*p2)() <span class="keyword">const</span>)</div> -<div class="line"><a name="l00386"></a><span class="lineno"> 386</span>  {</div> -<div class="line"><a name="l00387"></a><span class="lineno"> 387</span>  google::protobuf::Message* m = <span class="keyword">new</span> M();</div> -<div class="line"><a name="l00388"></a><span class="lineno"> 388</span>  T* t = <span class="keyword">static_cast<</span>T*<span class="keyword">></span>(<span class="keyword">this</span>);</div> -<div class="line"><a name="l00389"></a><span class="lineno"> 389</span>  protobufHandlers[m->GetTypeName()] =</div> -<div class="line"><a name="l00390"></a><span class="lineno"> 390</span>  <a class="code" href="namespaceprocess_1_1network.html#ad067110a4b38cc83785a43f49bf6c8e2">lambda::bind</a>(&_handler2<M, P1, P1C, P2, P2C>,</div> -<div class="line"><a name="l00391"></a><span class="lineno"> 391</span>  t, method, p1, p2,</div> -<div class="line"><a name="l00392"></a><span class="lineno"> 392</span>  lambda::_1, lambda::_2);</div> -<div class="line"><a name="l00393"></a><span class="lineno"> 393</span>  <span class="keyword">delete</span> m;</div> -<div class="line"><a name="l00394"></a><span class="lineno"> 394</span>  }</div> -<div class="line"><a name="l00395"></a><span class="lineno"> 395</span> </div> -<div class="line"><a name="l00396"></a><span class="lineno"> 396</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> M,</div> -<div class="line"><a name="l00397"></a><span class="lineno"> 397</span>  <span class="keyword">typename</span> P1, <span class="keyword">typename</span> P1C,</div> -<div class="line"><a name="l00398"></a><span class="lineno"> 398</span>  <span class="keyword">typename</span> P2, <span class="keyword">typename</span> P2C,</div> -<div class="line"><a name="l00399"></a><span class="lineno"> 399</span>  <span class="keyword">typename</span> P3, <span class="keyword">typename</span> P3C></div> -<div class="line"><a name="l00400"></a><span class="lineno"><a class="line" href="classProtobufProcess.html#aa83e9af0a1ff4b4c63d01ddfeaa60495"> 400</a></span>  <span class="keywordtype">void</span> <a class="code" href="classProtobufProcess.html#aa83e9af0a1ff4b4c63d01ddfeaa60495">install</a>(</div> -<div class="line"><a name="l00401"></a><span class="lineno"> 401</span>  <span class="keywordtype">void</span> (T::*method)(P1C, P2C, P3C),</div> -<div class="line"><a name="l00402"></a><span class="lineno"> 402</span>  P1 (M::*p1)() <span class="keyword">const</span>,</div> -<div class="line"><a name="l00403"></a><span class="lineno"> 403</span>  P2 (M::*p2)() <span class="keyword">const</span>,</div> -<div class="line"><a name="l00404"></a><span class="lineno"> 404</span>  P3 (M::*p3)() <span class="keyword">const</span>)</div> -<div class="line"><a name="l00405"></a><span class="lineno"> 405</span>  {</div> -<div class="line"><a name="l00406"></a><span class="lineno"> 406</span>  google::protobuf::Message* m = <span class="keyword">new</span> M();</div> -<div class="line"><a name="l00407"></a><span class="lineno"> 407</span>  T* t = <span class="keyword">static_cast<</span>T*<span class="keyword">></span>(<span class="keyword">this</span>);</div> -<div class="line"><a name="l00408"></a><span class="lineno"> 408</span>  protobufHandlers[m->GetTypeName()] =</div> -<div class="line"><a name="l00409"></a><span class="lineno"> 409</span>  <a class="code" href="namespaceprocess_1_1network.html#ad067110a4b38cc83785a43f49bf6c8e2">lambda::bind</a>(&_handler3<M, P1, P1C, P2, P2C, P3, P3C>,</div> -<div class="line"><a name="l00410"></a><span class="lineno"> 410</span>  t, method, p1, p2, p3,</div> -<div class="line"><a name="l00411"></a><span class="lineno"> 411</span>  lambda::_1, lambda::_2);</div> -<div class="line"><a name="l00412"></a><span class="lineno"> 412</span>  <span class="keyword">delete</span> m;</div> -<div class="line"><a name="l00413"></a><span class="lineno"> 413</span>  }</div> -<div class="line"><a name="l00414"></a><span class="lineno"> 414</span> </div> -<div class="line"><a name="l00415"></a><span class="lineno"> 415</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> M,</div> -<div class="line"><a name="l00416"></a><span class="lineno"> 416</span>  <span class="keyword">typename</span> P1, <span class="keyword">typename</span> P1C,</div> -<div class="line"><a name="l00417"></a><span class="lineno"> 417</span>  <span class="keyword">typename</span> P2, <span class="keyword">typename</span> P2C,</div> -<div class="line"><a name="l00418"></a><span class="lineno"> 418</span>  <span class="keyword">typename</span> P3, <span class="keyword">typename</span> P3C,</div> -<div class="line"><a name="l00419"></a><span class="lineno"> 419</span>  <span class="keyword">typename</span> P4, <span class="keyword">typename</span> P4C></div> -<div class="line"><a name="l00420"></a><span class="lineno"><a class="line" href="classProtobufProcess.html#a65ce7ab124d43af223b61b4fa184c955"> 420</a></span>  <span class="keywordtype">void</span> <a class="code" href="classProtobufProcess.html#a65ce7ab124d43af223b61b4fa184c955">install</a>(</div> -<div class="line"><a name="l00421"></a><span class="lineno"> 421</span>  <span class="keywordtype">void</span> (T::*method)(P1C, P2C, P3C, P4C),</div> -<div class="line"><a name="l00422"></a><span class="lineno"> 422</span>  P1 (M::*p1)() <span class="keyword">const</span>,</div> -<div class="line"><a name="l00423"></a><span class="lineno"> 423</span>  P2 (M::*p2)() <span class="keyword">const</span>,</div> -<div class="line"><a name="l00424"></a><span class="lineno"> 424</span>  P3 (M::*p3)() <span class="keyword">const</span>,</div> -<div class="line"><a name="l00425"></a><span class="lineno"> 425</span>  P4 (M::*p4)() <span class="keyword">const</span>)</div> -<div class="line"><a name="l00426"></a><span class="lineno"> 426</span>  {</div> -<div class="line"><a name="l00427"></a><span class="lineno"> 427</span>  google::protobuf::Message* m = <span class="keyword">new</span> M();</div> -<div class="line"><a name="l00428"></a><span class="lineno"> 428</span>  T* t = <span class="keyword">static_cast<</span>T*<span class="keyword">></span>(<span class="keyword">this</span>);</div> -<div class="line"><a name="l00429"></a><span class="lineno"> 429</span>  protobufHandlers[m->GetTypeName()] =</div> -<div class="line"><a name="l00430"></a><span class="lineno"> 430</span>  <a class="code" href="namespaceprocess_1_1network.html#ad067110a4b38cc83785a43f49bf6c8e2">lambda::bind</a>(&_handler4<M, P1, P1C, P2, P2C, P3, P3C, P4, P4C>,</div> -<div class="line"><a name="l00431"></a><span class="lineno"> 431</span>  t, method, p1, p2, p3, p4,</div> -<div class="line"><a name="l00432"></a><span class="lineno"> 432</span>  lambda::_1, lambda::_2);</div> -<div class="line"><a name="l00433"></a><span class="lineno"> 433</span>  <span class="keyword">delete</span> m;</div> -<div class="line"><a name="l00434"></a><span class="lineno"> 434</span>  }</div> -<div class="line"><a name="l00435"></a><span class="lineno"> 435</span> </div> -<div class="line"><a name="l00436"></a><span class="lineno"> 436</span>  <span class="keyword">template</span> <<span class="keyword">typename</span> M,</div> -<div class="line"><a name="l00437"></a><span class="line
<TRUNCATED>