Mombu the Programming Forum sponsored links

Go Back   Mombu the Programming Forum > Programming > How to emulate Agents in C++
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 22nd April 02:55
llothar
External User
 
Posts: 1
Default How to emulate Agents in C++



I like the way you can add extra arguments to agent calls.
And i miss it when i use C++.

Is there anyway to emulate this eiffel features with C++ templates ?
  Reply With Quote


  sponsored links


2 22nd April 02:55
philippe ribet
External User
 
Posts: 1
Default How to emulate Agents in C++



I can bet you can't!

I don't know C++ myself enough, but Qt implemented Signal/Slots using an
additional pre-processor. Agents allow you to build the same mechanism ;-)

--
Philippe Ribet

The README file said
"Requires Windows 95, NT 4.0, or better."
So... I installed it on Linux!
  Reply With Quote
3 22nd April 02:56
colin paul adams
External User
 
Posts: 1
Default How to emulate Agents in C++


Philippe> I can bet you can't!

You lose your bet.
You can use function objects.
Philippe> I don't know C++ myself enough, but Qt implemented
Philippe> Signal/Slots using an additional pre-processor. Agents
Philippe> allow you to build the same mechanism ;-)

And gtk-mm did it without a pre-processor.
--
Colin Paul Adams
Preston Lancashire
  Reply With Quote
4 1st May 12:39
andreas leitner
External User
 
Posts: 1
Default How to emulate Agents in C++


I have used the Boost Functor class and I think that's what you mean here
(at least in general). C++ Templates are AFAIR Turing complete, so you can
do a lot with them, but usually things end up being very very complicated
to use - especially if you make a small mistake and have to cope with page
long error messages that talk only about the templated classes, not where
you used them wrong.

Anyhow, till now I didn't see a mechanism that would allow curying
(which was the original question, and which is supported by agents).
Can you give me any pointers?


best regards,
Andreas
  Reply With Quote
5 1st May 12:39
colin paul adams
External User
 
Posts: 1
Default How to emulate Agents in C++


Andreas> Anyhow, till now I didn't see a mechanism that would
Andreas> allow curying (which was the original question, and which
Andreas> is supported by agents). Can you give me any pointers?


No I can't. I missed that bit. I apologise to Phillipe - he wins his bet.
--
Colin Paul Adams
Preston Lancashire
  Reply With Quote
Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666