[Clam-devel] Error Handling with Types

Pau Arumí parumi at iua.upf.edu
Thu May 22 03:38:06 PDT 2008


On dc, 2008-05-21 at 12:19 -0300, Francisco Tufró wrote:
> Great, is done.

Excellent! commit 11394.

> A question:
> what about the callback interface for cascading events?
> should we add that feature now or later??

Later (=when some MIDI use case asks for it).
The same for "Publishers" (publishers are proxy entities that publishes
ports/controls to the processing composite interface.

> Well, what's next?

1. Make the IsConnected and IsConnectedTo interface to the base class
2. Integrate with Processing base class and make it usable from the
Network interface (and thus from NetworkEditor)

For 2, consider if it is worth "merge" the Typed*Control base class with
the current control base class. Or otherwise, keep them separated. 
It would be useful to start with a list of implications on both
decisions.

Pau




> Francisco
> 
> On Wed, May 21, 2008 at 5:19 AM, Pau Arumí <parumi at iua.upf.edu> wrote:
>         On dt, 2008-05-20 at 20:02 -0300, Francisco Tufró wrote:
>         > Hi, i have almost finished the Link test.
>         > I have this question:
>         > How do i (or what do i do to) handle errors with these
>         functions, in
>         > the first what should i do? make the function bool and
>         return true if
>         > it was connected?? or throw something with a special error
>         class that
>         > i ignore?
>         
>         
>         Let's take the restrictive and easier path: just assert in the
>         error
>         case. Like we do in Ports. I say it's easier because we avoid
>         dealing
>         with exception handling.
>         OutPort.hxx line 175
>         
>         And (doxygen) document this behavior, and explaining that
>         before calling
>         Link the user must check the likability with IsLinkable
>         
>         See ports unit tests for an example of how to test that an
>         assert is
>         triggered.
>         
>         Pau
>         
>         
>         
>         >
>         >        void BaseTypedOutControl::Link(BaseTypedInControl&
>         in)
>         >        {
>         >                if(IsLinkable(in)){
>         >                        DoTypedLink(in);
>         >                }
>         >                /* Throw error with else! ? */
>         >        }
>         >
>         > and:
>         >
>         >     template<class TypedControlData>
>         >     void
>         >
>         TypedOutControl<TypedControlData>::DoTypedLink(BaseTypedInControl& in)
>         >     {
>         >         AddLink(dynamic_cast< ProperTypedInControl& >(in));
>         >     }
>         >
>         > by the way i send the patch so you have the full code.
>         > bye!
>         > Francisco
>         >
>         
>         > _______________________________________________
>         > Clam-devel mailing list
>         > Clam-devel at llistes.projectes.lafarga.org
>         >
>         https://llistes.projectes.lafarga.org/cgi-bin/mailman/listinfo/clam-devel
>         
>         
>         _______________________________________________
>         Clam-devel mailing list
>         Clam-devel at llistes.projectes.lafarga.org
>         https://llistes.projectes.lafarga.org/cgi-bin/mailman/listinfo/clam-devel
> 
> _______________________________________________
> Clam-devel mailing list
> Clam-devel at llistes.projectes.lafarga.org
> https://llistes.projectes.lafarga.org/cgi-bin/mailman/listinfo/clam-devel





More information about the clam-devel mailing list