Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic Rhapsody (steve huntington)
Decrease font size
Increase font size
Topic Title: Customizing the Framework
Topic Summary:
Created On: 5-May-2008 21:53
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 5-May-2008 21:53
User is offline View Users Profile Print this message


Daniel Desrosiers

Posts: 2
Joined: 30-Aug-2006

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.
Report this to a Moderator Report this to a Moderator
 8-May-2008 12:22
User is offline View Users Profile Print this message


Jesper Gissel

Posts: 88
Joined: 20-Jul-2005

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
Report this to a Moderator Report this to a Moderator
 15-May-2008 09:14
User is offline View Users Profile Print this message


Jesper Gissel

Posts: 88
Joined: 20-Jul-2005

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
Report this to a Moderator Report this to a Moderator
 15-May-2008 13:17
User is offline View Users Profile Print this message


Daniel Desrosiers

Posts: 2
Joined: 30-Aug-2006

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.
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic Rhapsody forum.
There are currently 1 users logged in.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.