Content here is by:
Michael Still
mikal@stillhq.com

All my Open Source projects
Online CVS server
Extracted view of CVS
Home
Site map
July 2008
Sun Mon Tue Wed Thu Fri Sat
   
   

ImageMagick book
MythTV book





I am the author of a C library called Panda. It has about 100 exported functions, and I had a need to produce a C++ wrapper for the library... I didn't really want to manually maintain a C++ version of the headers, so I wrote objectify, which is a simple perl script which will do it for me.

An example:
The first step is to make sure that objectify knows which methods and classes to export. You do this by defining two empty macros:
#define SUPPRESS(x)
#define INTERNAL
SUPPRESS means that the class x wont be exported, whilst INTERNAL stops the specific method listed from being exported. For example:
SUPPRESS(panda_object)

INTERNAL  void panda_dbopen (panda_pdf *);
INTERNAL  void panda_dbclose (panda_pdf *);
INTERNAL  void panda_dbwrite (panda_pdf *, char *, char *);
INTERNAL  char *panda_dbread (panda_pdf *, char *);
Objectify will then go through the header, and use the pointers which are passed around to determine what is a class and what isn't... stdout will be the header, stderr is a log of what objectify did...


The latest code for Objectify can be found in my online CVS server here.


Tue, 10 Jun 2003



Objectify 0.3

posted at: 00:00 | path: /objectify | permanent link to this entry
There are no comments on this post which have survived moderation. 49 posts have been culled and 287 blocked. Be the first to make a non-spam comment here, please!


Thu, 29 Aug 2002



Objectify 0.2

posted at: 00:00 | path: /objectify | permanent link to this entry
There are no comments on this post which have survived moderation. 35 posts have been culled and 73 blocked. Be the first to make a non-spam comment here, please!


Sun, 18 Aug 2002



Objectify 0.1

posted at: 00:00 | path: /objectify | permanent link to this entry
There are no comments on this post which have survived moderation. 48 posts have been culled and 90 blocked. Be the first to make a non-spam comment here, please!