observers with dll

Login to reply to this topic.
Mon, 2007-11-12 13:02
Joined: 2007-11-12
Forum posts: 17

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?


Tue, 2007-11-13 13:41
Joined: 2003-12-05
Forum posts: 683
Re: observers with dll

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.

Thu, 2007-11-15 11:25
Joined: 2007-11-12
Forum posts: 17
Re: observers with dll

thnx i'll try that.

  • Login to reply to this topic.