Wrapture at a glance

Wrapture allows C libraries to be wrapped in C++ for an object-oriented look and feel. To get a feel for how different things can be done, check out the examples:

  • Basic Usage Just the essentials!
  • Constants Defining constants within a class.
  • Enumerations Create enumeration classes from C-style enumerations, or entirely new ones based on arbitrary values.
  • Exceptions Define error conditions and the exceptions that should be thrown when they are encountered.
  • Inheritance Have generated classes inherit from other generated classes or other existing ones.
  • Nested Structs Specific examples of hierarchical structures and their corresponding generated classes.
  • Overloaded Structs Have a single struct correlate to multiple classes, depending on custom conditions.
  • Struct Wrapper Have a wrapping class automatically generated for a struct based on its members.
  • Templates Define reusable specifications that can make large wrapping projects much faster and more maintainable.

If you really want to get into the weeds, you can check out the current RDoc documentation for all of the details.

The Future

While the current state of Wrapture is admittedly simple, the future direction is much more ambitious. The ultimate goal is to use the same specifications to generate APIs for a variety of languages, and even to allow operation between languages with C being used transparently behind the scenes to translate. Check out the project roadmap to see what the next steps are.