Bug 511847 - Add support for SUPER and CALLSUPER macros
Summary: Add support for SUPER and CALLSUPER macros
Status: NEW
Alias: None
Product: Papyrus-rt
Classification: Modeling
Component: codegen (show other bugs)
Version: 0.8.0   Edit
Hardware: PC Mac OS X
: P3 normal
Target Milestone: Future   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-07 10:36 EST by Charles Rivet CLA
Modified: 2017-02-09 14:48 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Charles Rivet CLA 2017-02-07 10:36:01 EST
Legacy tooling support three macros associated with capsule behaviour in the context of capsule redefinition:

SUPER: points to the parent capsule

SUPERMETHOD: points to the parent capsule's transition behaviour without parameters

CALLSUPPER: points to the parent capsule's transition behaviour, passing in rtddata and rtport as parameters.

Although these are potentially seldom used, they should still be provided as part of code generation.
Comment 1 Charles Rivet CLA 2017-02-07 10:37:57 EST
Note: these are only provided for redefined behaviour.
Comment 2 Peter Cigehn CLA 2017-02-07 10:43:46 EST
For completeness I guess the SUPERMETHOD macro should be supported as well (even though I think it was never documented).

Here is an example of how the code looks like that is produced by the legacy code generator:

define SUPERMETHOD Capsule1_Actor::transition2_t1
#define CALLSUPER Capsule1_Actor::transition2_t1( rtdata, rtport )
INLINE_METHODS void Capsule2_Actor::transition2_t1( const void * rtdata, P::Base * rtport )
{
//{{{USR platform:/resource/MultipleRedefineTest/MultipleRedefineTest.emx#_H2CBwu1KEeaIHN7A3CdPIA
// Redefined effect code first t1
//}}}USR
}
#undef SUPERMETHOD
#undef CALLSUPER

#define SUPERMETHOD Capsule1_Actor::transition3_t1
#define CALLSUPER Capsule1_Actor::transition3_t1( rtdata, rtport )
INLINE_METHODS void Capsule2_Actor::transition3_t1( const void * rtdata, P::Base * rtport )
{
//{{{USR platform:/resource/MultipleRedefineTest/MultipleRedefineTest.emx#_JCxhsu1KEeaIHN7A3CdPIA
// Redefined effect code second t1
//}}}USR
}
#undef SUPERMETHOD
#undef CALLSUPER