Skip to content

Commit

Permalink
libdeng2|Observers: Added macro for notifying a public audience
Browse files Browse the repository at this point in the history
Assumes that the DENG2_PIMPL() macro is being used.
  • Loading branch information
skyjake committed Feb 21, 2013
1 parent 7b333e1 commit 2e19178
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions doomsday/libdeng2/include/de/data/observers.h
Expand Up @@ -99,6 +99,16 @@
#define DENG2_FOR_AUDIENCE(Name, Var) \
DENG2_FOR_EACH_OBSERVER(Name##Audience, Var, audienceFor##Name)

/**
* Macro for looping through the public audience members from inside a private
* implementation.
*
* @param Name Name of the audience.
* @param Var Variable used in the loop.
*/
#define DENG2_FOR_PUBLIC_AUDIENCE(Name, Var) \
DENG2_FOR_EACH_OBSERVER(Name##Audience, Var, self.audienceFor##Name)

namespace de
{
/**
Expand Down

0 comments on commit 2e19178

Please sign in to comment.