Boost logo

Boost Users :

Subject: Re: [Boost-users] Auto dispatch metaprogramming tricks
From: John Dlugosz (JDlugosz_at_[hidden])
Date: 2010-05-24 12:26:34


> It's building this set that's the problem, not checking if an item is
> in
> it. I need a list of all messages IDs (UINTs) that have a
> message<BLAH>
> specialisation.

Why? I mean, what is the difference between pro-actively declaring all the allowed forms and recognizing an allowed for if/when it is presented?

The trouble with "functional programming" is that you can't update a value. At run-time, you can imagine a constructor adds the instance to a linked list of all live instances. Compile-time MPL cannot do something similar: add itself to a list when a class is created. There is no changeable list, in principle.

Perhaps you could have a script that greps for derived classes (some special marker you include to make it easy to notice) and generate another include file from that.

> Yes, this is how my handlers work (except the on() method is not itself
> a
> template - does that affect it?).

I don't know enough about it to answer.

> How do you match the incoming message ID to the pods?

[not Boost related]
A declared range that each "commission" might be interested in, and a return value from the "minister" that the message just presented will _never_ be handled (so don't bother asking again).

> ...
> I'm afraid I don't understand this bit. What do you mean by specially
> declared functions?

Some details at <http://www.dlugosz.com/Repertoire/refman/Tomahawk/message_parliament_guide.htm>.

For example, process_MouseMove takes parameters that are specific to WM_MOUSEMOVE, not generic msg or lParam values. It has a different signature than, say, process_Size (which handles WM_SIZE messages).

>
> Thanks.
> Alex






TradeStation Group, Inc. is a publicly-traded holding company (NASDAQ GS: TRAD) of three operating subsidiaries, TradeStation Securities, Inc. (Member NYSE, FINRA, SIPC and NFA), TradeStation Technologies, Inc., a trading software and subscription company, and TradeStation Europe Limited, a United Kingdom, FSA-authorized introducing brokerage firm. None of these companies provides trading or investment advice, recommendations or endorsements of any kind. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.


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