PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

PocketHAL and UML

Hi all!
Just want to say this is a really nice piece of software, specially for its object-oriented design.
I was wondering if UML diagrams are available: i would love to study and learn from them!
Anyway, thank you Kzinti for such a great example of coding!
Sorry, no. I absolutely hate UML.
Kzinti wrote:Sorry, no. I absolutely hate UML.


..too bad ;)
Anyway, i've a simple question: PocketHAL currently run on many devices and in the future it may supports more.
For my explanations, i assume you declared interfaces "against" platform-dependent code and then implemented them with platform-specific code, abstracting in such a way you are able to add whatever device you want.
I'm supposing this because this would be my object-oriented approach, but you may have considered #ifdef'ing typedef definitions, anyway, how did you get rid of the virtual functions overhead caused by the function lookup, in these portable devices? I managed to do some simple tests (inline code, loop unrolling) on Symbian devices, and i come up with an nGage and a 6600 suffering from this, but i haven't tried with PocketPCs yet.

In the case of an abstract base class, don't you think it's resolving a link-time problem with a run-time solution?
Does this question sound so stupid??
There is no such thing as a stupid question. I didn't answer before now because I haven't seen your message until now.

PocketHAL uses the same header files for all platforms. But the code itself can be widely different depending on the device.

Altough I have never considered virtual functions in its interface, I doubt they would be a significant bottleneck. In fact, lot of virtuals are being used internally to implement different drivers (GDI, GAPI, video chip specific code, etc).
Kzinti wrote:There is no such thing as a stupid question. I didn't answer before now because I haven't seen your message until now.


It was only some sort of provocation for other people to join the discussion ;)
Anyway, hereyou was thinking about a stripped-down version of PocketHAL, is this still available?!
The stripped version of PocketHAL isn't available and probably never will be.
Thank you and good luck with it man!