In c++ is there any Events/delegates/interfaces/notifications! anything?
- by Bach
Say i have these classes
ViewA and ViewB
In objective C using the delegate pattern I could do
@protocol ViewBDelegate{
- (void) doSomething();
}
then in ViewB interface:
id<ViewBDelegate> delegate;
then in ViewA implementation i set the delegate:
viewB.delegate = self;
and now I can call in doSomething from viewB onto any that unknown type delegate.
[delegate doSomething];
"C++ How to Program" has been the worse read an can't find simple examples that demonstrates basic design patterns.
What i'm looking for in C++ is:
events ActionScript and java
either delegates or notifications in Objective C
anything that allows class A, Class B and Class C to know that ClassX
didSomething()!!!
thanks