[openmapi.org devel] Mapi API-Preprocessor

Johannes Roith johannes at jroith.de
Sun Jan 4 12:35:33 CET 2009


Hello, everyone!

I've just commited a small preprocessor for the mapi.xml file. It
transforms the identifiers defined in mapi.xml for a target language
(Java/C#/Python currently) and creates a new file for each one. So
instead of using mapi.xml in xslt transformations one would use
mapi.cs.generated.xml. We still need XSLT templates to actually
generate code, but the point here is that the resulting code will
respect the naming conventions of the target language better.

For example the GetLastError-call in IMapiProp would become:

C#: IMapiProp.GetLastError ();
Java: IMapiProp.getLastError ();
Python: imapi_prop.get_last_error ();
C++: IMAPIProp. GetLastError ();

Support for new languages can be added with very little code.

Johannes.


More information about the Devel mailing list