C/C++ on Linux/Unix

Moderators: Lundin
Number of threads: 336
Number of posts: 663

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
PiCom - MS Com for Linux/Unix Posted by martynb on 21 Jan 2013 at 11:56 AM
Hi all,

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) Platform Independant 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).

Enjoy,

Martyn
Thread Tree
martynb PiCom - MS Com for Linux/Unix on 21 Jan 2013 at 11:56 AM



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.