[Clam-devel] Error Handling with Types

Francisco Tufró nictuku at gmail.com
Fri May 23 08:52:15 PDT 2008


On Thu, May 22, 2008 at 7:38 AM, Pau Arumí <parumi at iua.upf.edu> wrote:

> 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

I've done this, but i'm not sure if i did what you wanted. Do you want me to
move mLinks from the template class to the base?, i've only added the
isconnected and isconnected to to the base classes. See the patch.



>
> 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.


I'll take a deeper look into the Processing and Network classes to answer
this.


>
> 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
>
>
> _______________________________________________
> Clam-devel mailing list
> Clam-devel at llistes.projectes.lafarga.org
> https://llistes.projectes.lafarga.org/cgi-bin/mailman/listinfo/clam-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.clam-project.org/pipermail/clam-devel-clam-project.org/attachments/20080523/bdcf0d76/attachment-0004.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: typed_controls_v8_AbstractClasses.patch
Type: application/octet-stream
Size: 3763 bytes
Desc: not available
URL: <http://lists.clam-project.org/pipermail/clam-devel-clam-project.org/attachments/20080523/bdcf0d76/attachment-0005.obj>


More information about the clam-devel mailing list