Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add VoidEvent #72

Merged
merged 3 commits into from
Jan 23, 2013
Merged

add VoidEvent #72

merged 3 commits into from
Jan 23, 2013

Conversation

arturoc
Copy link
Contributor

@arturoc arturoc commented Jan 22, 2013

This adds a type of event which can be notified and notifies a listener method without arguments.

It's actually the same patch in this ticket:

http://sourceforge.net/p/poco/patches/110/

An example of how it would be used:

class Notifier{
public:
    Poco::BasicEvent event;
        void someMethod(){
        event.notify();
    }
}

class Listener{
public:
    Notifier notifier;
        void setup(){
        notifier.event += Poco::delegate(this,&Listener::listenerMethod);
    }
    void listenerMethod(){
        // do something
    }
}

@aleks-f
Copy link
Member

aleks-f commented Jan 23, 2013

Skimming over it, it looks good. Would you mind adding a test case before I merge it? Thanks.

@arturoc
Copy link
Contributor Author

arturoc commented Jan 23, 2013

i've added the tests in the classes that test the other kind of events, let me know if that's ok.

the other commit has the Priority version of the void event and all the needed classes, before there was only FIFO and Basic

aleks-f added a commit that referenced this pull request Jan 23, 2013
@aleks-f aleks-f merged commit f5c091f into pocoproject:develop Jan 23, 2013
@arturoc arturoc deleted the feature-voidevent branch January 24, 2013 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants