Boost logo

Boost Users :

From: Richard Crossley (rdc_at_[hidden])
Date: 2003-07-18 06:20:47


Drinks coffee, re-reads docs, and problem solved.

ForEachCollectionInChannels(pAmp,bind(ForEachProperty,_1,protect(bind(&CalcP
ropCurValMaxWidth,_1,var(m_ChanCols)))));

Cheers,

Richard.

> -----Original Message-----
> From: Richard Crossley [mailto:rdc_at_[hidden]]
> Sent: 18 July 2003 11:26
> To: Boost-Users_at_[hidden]
> Subject: [Boost-Users] Bind To Lambda
>
>
> Hi,
>
> I'm trying merge some code some of which uses a mixture of BB
> and BLL to just use the BLL under VC7.1. Having changed some
> 200 expressions without incident if find I can't see the wood
> for the trees here.
>
> The existing code, working with BB, is;
>
> typedef boost::function<void(ICollection*)> FECCFunc;
> void ForEachCollectionInChannels(IAmplifier* pIAmp,FECCFunc
> const & fec);
>
> typedef boost::function<void(IProperty*)> FEPFunc;
> void ForEachProperty(ICollection* pCollection,FEPFunc const & fep);
>
> void CalcPropCurValMaxWidth(IProperty* pProp,CColumnMap& map);
>
> ...
>
> void Problem()
> {
> CColumnMap m_ChanCols;
> IAmplifier* pIAmp;
> ForEachCollectionInChannels(pAmp,bind(ForEachProperty,_1,cref(
> bind(&CalcProp
> CurValMaxWidth,_1,ref(m_ChanCols)))); //Here
> }
>
> What's the equivalent with using BLL?
>
>
> Thanks,
>
> Richard.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net