Hubert Figuiere: porting to C++

Hubert Figuiere

In my attempts to fight my own boredom, as an unemployed hacker[1], I took on myself to do something: porting Tomboy to C++. It is actually not that hard, just a lot of work to do manually because there is over a dozen of thousands of lines of code. This show me that the door is open to reimplementing Gtk# software (or parts) in C++ with not too many problems, making it easy to have them available for C applications.

Nonetheless there are still some challenges:

  1. Garbage collection: I replaced this with a combination of Gtkmm memory management, std::tr1::shared_ptr<> and stack allocated object. Seems to be working so far. I could also be using a garbage collector, but it seems to be unecessary.
  2. String and file path utilities: Boost has string algorithms and Boost.Filesystem
  3. XML: while XML parsing is not a big issue with the various libraries available, APIs have enough difference to make it non-trivial. I also had to write a convenient wrapper of xmlTextWriter to make my life easier.
  4. Add-ins: I don't have the support for generic addins as found in Mono. No big deal, I implemented a factory in a few lines with a couple of macros. Some core features are actually implemented as add-ins, so I had to do it. Dynamic loading shouldn't be too hard.
  5. regex: some of these core feature use regulars expression. Not a big deal if it wasn't for apparently different syntax.

To help all of this, I have implemented a small library (in the same tree) called "sharp" aimed at helping port from Gtk#. In addition to boost, I also make an extensive use of Gtkmm and libxml++.

Of course the code is available. I have set up a repository on gitorious. There is not tarball yet as I still need to iron a few major bugs. On over 13KLOC of code, there are to be some :-)

Notes

[1] emphasis mine


Hi,
I personally like your post; you have shared good information.

Dissertation Writer

Hi,
This is inspiring; I am very pleased by this post. Nice info at this post thanks!!! I really like it

Assignment Help

You made some good points there. I did a search on the topic and found most people will agree with your blog. Thanks

Essay paper

Hi,
Really nice post! Thanks for sharing such an informative article. Keep up the good work.

Coursework help

Hi,
Great information! Indeed very useful for me, Thanks for sharing.

Re

We would confirm that you make very great facts about this post. You have to complete the thesis sentences for thesis service or just ground your custom dissertation services and some humen would buy a thesis in that location.

Re

Web is stuffed with custom thesis or thesis pdf connecting with this topic but to receive really good accomplished dissertation writing service, students could use some hints.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <code>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.