From: Adam T. <ate...@gm...> - 2013-02-09 07:33:21
|
Hi all, I've been thinking about how to make cclib a bit more friendly towards non-Python developers/users. Specifically, those that wish to incorporate cclib into their existing C/C++/Obj-C codebases, but don't want to deal with getting into too much of the mess that is the Python C-API or have the overhead of Boost (which is C++) or others. I propose creating a handful of C functions that handle most of the nitty-gritty of this. For instance, I envision a simple #include "cclib.h" with functions like getParserModule() and ccopen(), to return the cclib.parser module and a logfileparser object. I've already begun the implementation of these functions. There may still need to be some calls to the Python C-API, but this bridge should be as simple as possible. Seem reasonable? Or have a better suggestion? Also, related to this is a minor required change to the progress part of logfileparser API. Since I want this to be rooted in C, it should not be dependent on classes. So instead of passing a progress object to the initializer, a callback function should be passed. I've already made these changes (uncommitted to SVN though) and updated the TextProgress and Qt4Progress classes by passing their update functions to the logfileparser. Cheers, Adam |