![]() |
Telelogic Rhapsody (steve huntington) | ![]() |
Topic Title: How to override 'OMThread::execute()' Topic Summary: Created On: 20-Sep-2007 13:29 Status: Read Only |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
We are overriding '[COLOR=Navy]OMThread::execute()[/COLOR]' in our project, but without much guidance. I found none in the Rhapsody documentation, and saw only [URL=http://modelingcommunity.telel...p?postid=6511#post6511]one thread related to it[/URL] in these forums.
Please let me know if there is a better way than the following: (1) Copy the original implementation from "$OMRoot/LangCpp/oxf/omthread.cpp". Are any other sample implementations available? (2) To simplify things, delete all the animation-related code. Would this break the animation feature for our project? (3) Insert our code anywhere in the implementation. Are there any parts where we should not insert custom code? (4) Since the starting point is Rhapsody's original implementation, check and update the overridden version every time Rhapsody is upgraded. How can we try to be forward-compatible instead? The project is under Rhapsody in C++ v7.1.1. Thanks a lot. |
|
![]() |
|
![]() |
|
Hi Arto
I've never had to do this myself, but your question reminded me of something I'd spotted in the Properties reference months ago... You can write your own "ArtoThread" ![]() [CODE]CPP_CG::Framework::ActiveBase = "ArtoThread" CPP_CG::Framework::ActiveIncludeFiles = "<oxf/arto/ArtoThread.h>"[/CODE]You'll also (obviously) need to link your code in. For simplicity of use, consider building your code into a separate library then updating your [FONT=Courier New]CPP_CG::<env>::MakeFileContent[/FONT] property to add your library to the build. (You might wish to set these properties in your [FONT=Courier New]sitec++.prp[/FONT] file to apply to all projects, or in a profile if you wish them to apply to certain projects only.) I hope that's helpful. As I said, I've not actually done this myself, but I'd be really interested in whether this works or how you eventually get it working! best regards, Simon ------------------------- Simon Morrish simon.morrish@eu.panasonic.com http://panasonic.co.uk Panasonic ideas for life |
|
![]() |
|
![]() |
|
Hi, Simon.
Thanks for the information about those properties ('ActiveBase' and 'ActiveIncludeFiles'). I didn't know that Rhapsody provided such a mechanism for specializing OMThread across projects. In our case, the class derived from OMThread lives in just one package of a project, so the site file and the OXF libraries remain unchanged. For the override of 'execute()', we copied and modified the Rhapsody implementation (item 1 from the original post in this thread). However, we are making such modifications without the benefit of guidance. :confused: Even in the best case, upgrading to newer versions of Rhapsody might break our implementation. |
|
![]() |
|
![]() |
|
Hi Arto
Yes, there isn't much guidance available, is there? ![]() One source of information, which I'll assume from your post you haven't already seen, is the OXF model. You can find it under $OMRoot\LangCpp\oxf\model. The implementation of OMThread is in Design:: oxf::Core::CoreImplementation, and there are some Use Cases and Sequence diagrams under Analysis::ThreadsManagement. I got very excited when I first heard about this model, but if you feel the same rush of enthusiasm, restrain yourself! ![]() The specific stated aim of the model is to allow end-users to understand and customise the framework. So if you don't get what you need, I'd recommend pressuring the Modelling Unit guys to add more description to it! Let me know if you get anywhere! best regards, Simon ------------------------- Simon Morrish simon.morrish@eu.panasonic.com http://panasonic.co.uk Panasonic ideas for life |
|
![]() |
Telelogic Rhapsody
» Rhapsody Category » Rhapsody
»
How to override 'OMThread::execute()'
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.