AfrFoundation CATExtIWorkbenchTransition

Usage: you can derive this class.


public class CATExtIWorkbenchTransition

Adapter for the CATIWorkbenchTransition interface.
Role : To implement the interface, for each workshop, you should create a class as a data extension of a late type made of the workshop identifier suffixed by _trans, such as MyWorkshop_trans for the MyWorkshop'workshop. This class derives from this adapter and is used when the user chooses a new workbench to manage the transition between the current workbench and the new one. However the aim of this class is only to activate the right workshop if needed. Then the activation of the requested workbench is done automatically. In general, activating workshop consists in creating a document linked to this workshop.


Constructor and Destructor Index


o CATExtIWorkbenchTransition()
Constructs the class.
o ~CATExtIWorkbenchTransition()

Method Index


o DoTransition(CATString&,CATString&,CATString&,CATString&)
Handles or not the transition.

Data Member Index


o _newDoc
Document's name to open.

Constructor and Destructor


o CATExtIWorkbenchTransition
public CATExtIWorkbenchTransition()
Constructs the class.
o ~CATExtIWorkbenchTransition
public ~CATExtIWorkbenchTransition()

Methods


o DoTransition
public virtual DoTransition( const iFromWorkshop,
const iFromWorkbench,
const iToWorkshop,
const iToWorkbench)
Handles or not the transition.
Role: This default implementation creates a document of the type if:
This implementation should be sufficient if the document associated to the extended workshop is :
On the opposite, if the document associated to the extended workshop is embedded or linked, you may need to override the DoTransition method, knowing that CATIA calls the workshop involved in the transition on their DoTransition method in the following order: the active workshop and next the selected workshop.
For Example: if the document linked to the extended workshop is the current document (ex: Part) and the user selects a workshop ( or a workbench belonging to a workshop) linked to an embedding document ( ex: Product), DoTransition will have to UIActivate the embedding document ( ex Product). Otherwise, if the DoTransition method of the active workshop (ex Part) doesn't handle the transition, the DoTransition method of the selected workshop ( ex Product) is called and creates a new product document instead of activating the existing one.
Parameters:
iFromWorkshop
The active workshop
iFromWorkbench
The active workbench
iToWorkshop
The selected workshop, or the workshop to which the selected workbench belongs.
iToWorkbench
The selected workbench
Returns:
1 if handled, 0 otherwise

Data Members


o _newDoc
  protected CATString _newDoc
Document's name to open.
Role: This variable is initialized in the constructor and used in the method.

This object is included in the file: CATExtIWorkbenchTransition.h
If needed, your Imakefile.mk should include the module: CATAfrFoundation

Copyright © 1999-2015, Dassault Systèmes. All rights reserved.