[asterisk-dev] Reverse Inheritance

Vadim Lebedev vadim at mbdsys.com
Mon Nov 10 19:47:33 CST 2008


Hello,

I understand the forward inheritance - a var defined for a channel  
will be inherited by  a child channel(s)
so reverse inheritance would be a var defined in the channel will be  
inherited by a parent channel(s)  right?

What will happend if tow sibling channels define the same +var?

Actually what could be a usage for reverse inheritance?

Thanks
Vadim



Le 11 nov. 08 à 01:11, Tilghman Lesher a écrit :

> During a review of one of the bugs on the bugtracker (13140), I  
> found that
> somebody had implemented what is essentially a reverse-inheritance  
> on a
> variable.  What occurs to me is that if one person wants it, perhaps  
> it would
> be wise to implement it in a general way, so that others may also  
> benefit from
> that behavior.
>
> This brings up two questions in my mind.  First, what are the  
> safeguards that
> we must abide by to ensure that nothing unsafe happens?  For one  
> thing, I
> think it would be sensible to ensure that variables can only be set,  
> not
> overwritten with this method.  Can anybody think of other possible  
> problems
> with implementing reverse inheritance?
>
> Second, how should variables be denoted?  I have discussed this with  
> Jared
> Smith, and we both agreed that using '+' in place of '_', where '_'  
> means
> forward inheritance and '+' means reverse inheritance would be  
> appropriate.
> Doubling either symbol would denote infinite inheritance in that  
> particular
> direction.  Is there any further discussion of this use, or is the  
> usage
> of '+' an acceptable symbol?
>
> -- 
> Tilghman
>
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-dev
>




More information about the asterisk-dev mailing list