![]() |
Telelogic Rhapsody (steve huntington) | ![]() |
Topic Title: Customizing the Framework Topic Summary: Created On: 5-May-2008 21:53 Status: Read Only |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
Extract from framework.pdf
The Rhapsody framework was designed so it could be easily customized by creating classes that inherit from the framework classes. You could do this within Rhapsody by creating a class that inherits from an external class that represents the framework. For example, to modify the active thread that Rhapsody uses, create a class in the model called OMThread and set its CG::Class::UseAsExternal property to Checked. You could then create a new class in the model, MyThread, that defines the OMThread class as a superclass. By modifying MyThread, you can modify the framework virtual operations or add more attributes to the framework classes. When I try that the code does not compile. Compiling Extend/MyThread.cpp In file included from Extend/MyThread.cpp:11: ./Extend/MyThread.h:21:29: Extend/OMThread.h: No such file or directory In file included from Extend/MyThread.cpp:11: ./Extend/MyThread.h:38: error: invalid use of undefined type `struct OMThread' C:/Temp/Share/LangCpp/oxf/oxf.h:39: error: forward declaration of `struct OMThread' make: *** [Extend/MyThread.o] Error 1 Anything more I need to do ? Daniel Desrosiers. |
|
![]() |
|
![]() |
|
Hi Daniel,
It works fine with my setup! ![]() Try setting the CG::Class::FileName property for the external class to the path for the framework class, ex. C:\Rhapsody\Share\LangCpp\oxf\OmThread. (A path relative to subclass output dir can also be used!) This should not only make you able to compile your code, but also make it possible to right-click and chose Edit Code. I have not yet figured out how to make the "Implement Base Classes..." menu item work, but it would be nice if it did... Regards ------------------------- Jesper Gissel Johnson Controls Denmark, Marine Controls Edited: 8-May-2008 at 12:25 by Jesper Gissel |
|
![]() |
|
![]() |
|
I have just found out, that its ok to use the $OMROOT macro in the path, so setting it to $OMROOT\LangCpp\oxf\OmThread is the way to do it.
------------------------- Jesper Gissel Johnson Controls Denmark, Marine Controls |
|
![]() |
|
![]() |
|
Hi Jesper,
I tried and I'm still having issues with the extending of the class. I have raised a support call with Telelogic. Thanks for your help. Dan. |
|
![]() |
Telelogic Rhapsody
» Rhapsody Category » Rhapsody
»
Customizing the Framework
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.