Integrations (PTC products, 3rd party products and code) > Code integration (Ada, ARINC 653, C, C#, C++, IDL, Java, SQL and VB) > C++ code > Generating C++ code > Generating C++ code > Mapping Information > Mapping information for state diagrams > Event (in operation bodies) mapping for C++ (C++ code)
  
Event (in operation bodies) mapping for C++ (C++ code)
ACS generates code for Events that are added to generated Operation bodies as Model Object References.
How an Event in an Operation body is generated depends on whether the Event is a handled event or not, that is, whether the Event has a linked Operation.
For an event with linked operation
When an Event has a linked Operation and you drag that Event to an Operation body, ACS generates the Event name as the mangled name of the linked Operation.
For example, Event1 is linked to operation named Event1Handlder and Event2 is linked to an operation named Event2Handler, and these Events appear in an Operation body code as follows:
Class1::Event1();
rolename->Event2();
ACS generates the preceding body code as follows:
Class1::Event1Handler();
rolename->Event2Handler();
For an event without a linked operation
When an Event does not have a linked Operation and you drag that Event to an Operation body, ACS generates the Event as an animation notification call.
For example, Event3 does not have a linked Operation and appears in the Operation body code as follows:
Event3
ACS generates the preceding body code as follows:
*/
{
RtsNotify(EVENT, "03c9439d-ff87-47d3-ab9e-5e5bcfa83f83", 0, NULL) ;
}/*Event3