Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
PiCom - MS Com for Linux/Unix
I've just got a Raspberry Pi. So far I'm very impressed with it and I've been dev'ing a project that maybe others maybe interested in?
The basis of my pet project was to create a platform independant, simple, registration free way of providing objects which can live in any shared object (or dll in the world I'm from :) and can be consumed by C++ code (or potentially anything than can understand vtables).
The intention to provide dynamic loading, typesafety, lifetime management analogous to MS COM.
I've just ported my windows implementation to Linux. The fact that it's (going to be) [b]P[/b]latform [b]I[/b]ndependant and in honour of the mighty Pi (which I used exclusively for the port), I've decided to call this PiCom :-)
I guess calling this COM is a massive overstatement; MS COM and runtime provide location transparency, type libraries, language neutrality, automatic marsharlling and a whole host of other goodies.
What PiCom does provide however is a very lightweight framework for providing custom interfaces from any inprocess object (shared object) for use by C++ clients. It provides minimal impact, dynamic loading (whereby new implementations can be hooked by config, without code change), lifetime management and (by the virtua of IUnknown) typesafe polymorphism.
A small shared object is used to hook loading of the objects (CoLoader) and, using the templates and macros I've developed (akin to ATL) it is trivial to provide new custom interfaces/components in shared objects.
Basically it's a framework for providing portably IUnknown derived interfaces from inproc com servers.
Please see that attachment for details. Basically you need to run make from the verysimple directory. That will create two simple providers, a consumer and the CoLoader. Sorry if the quality of the makefile is poor - I'm only just (re)learning this stuff (I've been developing mostly on Windoze for the last 10 years, a bit of Unix before then).
If anyone is interested in this maybe I'll knock up a wiki and a proper source repository. Next steps might be to make a local server version whereby it's easy to write exe com servers (or equivalent of).
0 · ·