From: suresh <su...@em...> - 2002-11-22 21:50:29
|
Hi, My name is Suresh. I am new to OpenC++ group. I am working on a project which basically does the source code translation. I am facing few problems. These problems are:- 1. When I am trying to load the metaclass for c functions. It is giving warning that: 'Mop is not able to load the "CFunctionClass" '. CFunctionClass is a metaclass which I defined for translation of C functions. Here is the code //In my main metaclass inside Initialize(), I have setMetaclassForFunctions("CFunctionClass"); //and in CFunctionClass.mc, I have overloaded a class member function TranslateFunctionCall(...) { .. .. } The idea is I want to change the function call in main() method and this function is not part of any class which have metaclass declaration. This function is like C library function defined by some other vendor. 2. I have several classes. I am using the same metaclass for all classes' code translation. The problem is I need to see how many objects of a class (say classA) are instantiated in the whole application. I.e. there may be a class classB where the object of classA is instantiated. I want to know all such objects and put the MACRO definition for them in the class header file. 3. As I have one metaclass, I want to statically overload this metaclass so that I don't need to insert the metaclass declaration before every class definition. I tried using "ChangeDefaultMetaClass("mainMetaClass)" by calling it from the Initialize() method and using -S option at the time of compilation but this is not working. %occ -S mainMetaClass.mc this command is giving me problems at the time of linking. If anybody know about any of the problem. Plzz email me. Thanks in advance - Suresh Lalwani. |