  | | | Multiple Output Ports in CPP | Multiple Output Ports in CPP 2005-04-04 - By Aloys Baillet
Back Indeed, switch cannot work with custom classes... sorry for the misleading info! You will have to do some if /else ...
On Apr 4, 2005 5:58 PM, Martin Matzeder <puppet_martin@(protected)> wrote: > > Thank You, > > but I get this error at compilation time: > > > f:\!Coding\first_operator\weightmap_only\weightmap_only\weightmap_only.cpp(98 ): > error C2450: switch expression of type 'XSI::CString' is illegal > > Martin > > Aloys Baillet wrote: > > > Hi Martin, > > > > Here is the name you are looking for... > > > > CStatus ClmCacheMapOp::Update > > ( > > UpdateContext& ctx, > > OutputPort& Out > > ) > > { > > CStatus hr = CStatus::OK ; > > CString outName( Out.GetName() ); > > switch (outName) > > your code! > > } > > > > > > > > On Apr 4, 2005 4:46 PM, *Martin Matzeder* > > <puppet_martin@(protected) > > <mailto:puppet_martin@(protected)>> wrote: > > > > Hi, > > > > I'm translating a operator from jsript to cpp. Right now I face the > > problem to feed multiple output connections. In jscript I used the > > switch/case statement to get the correct output. but I have no > > clue what > > to test in cpp, cause i can see no "name" in the outputport. In > > scripted > > operators the update routine is called for each output port, and I > > guess > > this is the same for a compiled operator. > > What is the correct way to achieve this in cpp. > > > > Martin > > --- > > Unsubscribe? Mail Majordomo@(protected) > > <mailto:Majordomo@(protected)> with the following text in body: > > unsubscribe xsi > > > > > > > > > > -- > > Aloys Baillet - TD / R&D @ La Maison - www.alamaison.fr<http://www .alamaison.fr> > > <http://www.alamaison.fr> > > --- > Unsubscribe? Mail Majordomo@(protected) with the following text in body: > unsubscribe xsi >
-- Aloys Baillet - TD / R&D @ La Maison - www.alamaison.fr<http://www.alamaison.fr>
Indeed, switch cannot work with custom classes... sorry for the misleading info !<br> You will have to do some if /else ...<br><br><div><span class="gmail_quote">On Apr 4, 2005 5:58 PM, <b class="gmail_sendername">Martin Matzeder</b> <<a href="mailto:puppet_martin@(protected)">puppet_martin@(protected) </a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Thank You,<br><br>but I get this error at compilation time:<br><br>f:\!Coding\first _operator\weightmap_only\weightmap_only\weightmap_only.cpp(98):<br>error C2450: switch expression of type 'XSI::CString' is illegal<br><br>Martin<br><br>Aloys Baillet wrote:<br><br>> Hi Martin,<br>><br>> Here is the name you are looking for...<br>><br>> CStatus ClmCacheMapOp::Update<br>> (<br>> UpdateContext& ctx,<br>> OutputPort& Out<br>> )<br>> {<br>> CStatus hr = CStatus::OK ;<br>> CString outName( Out.GetName() ); <br>> switch (outName)<br>> your code!<br>> } <br>><br>><br>><br>> On Apr 4, 2005 4:46 PM, *Martin Matzeder*<br> > <<a href="mailto:puppet_martin@(protected)">puppet_martin @(protected)</a><br>> <mailto:<a href="mailto:puppet_martin @(protected)">puppet_martin@(protected)</a>>> wrote:<br>> <br>> Hi,<br>><br>> I'm translating a operator from jsript to cpp. Right now I face the<br>> problem to feed multiple output connections. In jscript I used the<br>> switch/case statement to get the correct output. but I have no<br>> clue what<br>> to test in cpp, cause i can see no "name" in the outputport. In<br>> scripted<br>> operators the update routine is called for each output port, and I <br>> guess<br>> this is the same for a compiled operator.<br>> What is the correct way to achieve this in cpp.<br>><br>> Martin<br>> ---<br>> Unsubscribe? Mail <a href="mailto:Majordomo@(protected)">Majordomo@(protected) .COM</a><br>> <mailto:<a href="mailto:Majordomo @(protected)">Majordomo@(protected)</a>> with the following text in body: <br>> unsubscribe xsi<br>><br>><br>><br>> <br>> --<br>> Aloys Baillet - TD / R&D @ La Maison - <a href="http:/ /www.alamaison.fr">www.alamaison.fr</a><br>> <<a href="http://www .alamaison.fr">http://www.alamaison.fr</a>><br><br>---<br>Unsubscribe? Mail <a href="mailto:Majordomo@(protected)">Majordomo@(protected)</a> with the following text in body:<br>unsubscribe xsi<br></blockquote></div><br><br><br>-- <br>Aloys Baillet - TD / R&D @ La Maison - <a href="http://www.alamaison.fr ">www.alamaison.fr</a><br>
|
|
 |