Great, is done.<br>A question:<br>what about the callback interface for cascading events?<br>should we add that feature now or later??<br>Well, what's next?<br>Francisco<br><br>On Wed, May 21, 2008 at 5:19 AM, Pau Arumí <<a href="mailto:parumi@iua.upf.edu">parumi@iua.upf.edu</a>> wrote:<br>
<div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">On dt, 2008-05-20 at 20:02 -0300, Francisco Tufró wrote:<br>

> Hi, i have almost finished the Link test.<br>
> I have this question:<br>
> How do i (or what do i do to) handle errors with these functions, in<br>
> the first what should i do? make the function bool and return true if<br>
> it was connected?? or throw something with a special error class that<br>
> i ignore?<br>
<br>
</div>Let's take the restrictive and easier path: just assert in the error<br>
case. Like we do in Ports. I say it's easier because we avoid dealing<br>
with exception handling.<br>
OutPort.hxx line 175<br>
</blockquote><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
And (doxygen) document this behavior, and explaining that before calling<br>
Link the user must check the likability with IsLinkable<br>
<br>
See ports unit tests for an example of how to test that an assert is<br>
triggered.<br>
</blockquote><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Pau<br>
<div class="Ih2E3d"><br>
<br>
<br>
><br>
>        void BaseTypedOutControl::Link(BaseTypedInControl& in)<br>
>        {<br>
>                if(IsLinkable(in)){<br>
>                        DoTypedLink(in);<br>
>                }<br>
>                /* Throw error with else! ? */<br>
>        }<br>
><br>
> and:<br>
><br>
>     template<class TypedControlData><br>
>     void<br>
> TypedOutControl<TypedControlData>::DoTypedLink(BaseTypedInControl& in)<br>
>     {<br>
>         AddLink(dynamic_cast< ProperTypedInControl& >(in));<br>
>     }<br>
><br>
> by the way i send the patch so you have the full code.<br>
> bye!<br>
> Francisco<br>
><br>
</div>> _______________________________________________<br>
> Clam-devel mailing list<br>
> <a href="mailto:Clam-devel@llistes.projectes.lafarga.org">Clam-devel@llistes.projectes.lafarga.org</a><br>
> <a href="https://llistes.projectes.lafarga.org/cgi-bin/mailman/listinfo/clam-devel" target="_blank">https://llistes.projectes.lafarga.org/cgi-bin/mailman/listinfo/clam-devel</a><br>
<br>
<br>
_______________________________________________<br>
Clam-devel mailing list<br>
<a href="mailto:Clam-devel@llistes.projectes.lafarga.org">Clam-devel@llistes.projectes.lafarga.org</a><br>
<a href="https://llistes.projectes.lafarga.org/cgi-bin/mailman/listinfo/clam-devel" target="_blank">https://llistes.projectes.lafarga.org/cgi-bin/mailman/listinfo/clam-devel</a><br>
</blockquote></div><br>