observers with dll
| Mon, 2007-11-12 13:02 | |
|
im coding a bluetooth engine to use as a dll along with a GUI frontend to call it. I saw the point-to-multipoint example and decided to follow it's method. But while using i found it used the observer pattern and needed to pass the AppUi as an arguement in the engine class. i mean is that allowed. my dll shouldn't be calling any gui side code. is there anything i can do? |
|






Forum posts: 683
Declare an interface class (M class in Symbian) with pure virtual methods. Let the AppUi inherit this class and implement the pure virtuals. Let the engine have a pointer to this M class and save it. Then the engine code calls the interface methods as appropriate. Now the engine is not directly tied to any UI side code.
Forum posts: 17
thnx i'll try that.