Dear OpenC++ users:
Last week I posted an enquiry about transforming c functions using OpenC++.
Grzegorz Jakacki kindly pointed out that there is a member function for this:
Class::SetMetaclassForFunctions(char *name)
However, I cannot find any further reference for using this functions.
The reference
manual ( http://opencxx.sourceforge.net/opencxx/html/index.html <-- is this URL
right?) does not contain about the above function. I searched the
source code for
it to find the following definition:
void Class::SetMetaclassForFunctions(char* name)
{
metaclass_for_c_functions = name;
}
Let me set my object more concrete. If I have the following C source:
#include <stdio.h>
int f() { 1; return 1; }
int g() { 2; return 2; }
int main() { f(); g(); return 0; }
I want to convert it as the following:
#include <stdio.h>
int f() { puts("1st stmt"); 1; puts("2nd stmt"); return 1; }
int g() { puts("1st stmt"); 2; puts("2nd stmt"); return 2; }
int main() { puts("calling f()"); f(); puts("calling g()"); g();
puts("3rd stmt"); return 0; }
It seems possible using OpenC++. How can I do it. Just a brief sketch is enough.
Thanks in advance!
--
wo...@pu...
+82-51-510-3518
Pusan National University
|