Re: [Evolution-hackers] [Camel] How can I get a reference to the store class from another class?



On Tue, 2005-09-13 at 22:15 +0800, Not Zed wrote:
> > > Something like:
> > > 
> > >    CAMEL_SERVICE_CLASS(parent_class)->connect(service, ex);
> > > 
> > > from within the transport connect() method?
> > > 
> > yup. you could do it. Should be no problem. Guess its a clean way to do
> > it.
> 
> Partha, what are you saying here?
> 
> parent_class.connect() will only call the super-class method.
> 
> Transport doesn't derive from Store, they both derive from Service.
> 
> So if you want to share the connect() implementation from both classes,
> then it must be implemented in a sharable manner, and not separately.

OK.

> Hence my original comment about merging the Transport and Store objects.
> Infact ideally they would probably both be optional interfaces on a
> Service rather than separate classes.

That surely sounds like a better design. Hindsight is always 20/20 I
guess...

> FWIW, I hope to be writing a decent amount of Camel documentation in the
> coming weeks; a lot of it needs much more documentation beyond the
> comments in the code, and many of the implementations to use as examples
> aren't very clean.

I am *really* looking forward to that. You are very welcome to send me
early drafts if you want some feedback.

Thanks,
  jules





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]