Equipment & Systems

Arrangement

Querying Pathway, ItemReservation, Run Objects for Nomenclature modification

How to handle Pathway, ItemReservation, Runobjects when their Nomenclature is defined and / or modified.
Use Case

Abstract

This article discusses the CAAArrAppProduct use case.


What You Will Learn With This Use Case

This use case is intended to show you how to query Pathways, Item Reservations, Run and query them for information about 'Nomenclature'.

[Top]

The CAAArrAppProducts Use Case

CAAArrAppProducts is a use case of the CAAArrangementInterfaces.edu framework that illustrates a capability to have a user implementatoin automatically called when a Pathway, ItemReservation, Run is created or its type is changed using the CATIArrAppProduct interface from CATArrangementInterfaces framework.

[Top]

Step-by-Step

There are two logical steps in CAAArrAppProducts:

  1. Prolog
  2. Mechanism of Working

[Top]

Prolog

The user will have to provide Implementation for CATIArrAppProduct using adapter class CATEArrAppProductAdapter. The interface is called directly by the commands that create the Arrangement object.

[Top]

Mechanism of Working

Whenever a new object which adheres to CATIArrProduct (like Pathways, ItemReservation, Run)  is created, its 'Nomenclature' attribute is set by call to SetNomenclature(). From within this method, a call is made to CATIArrAppProduct->NomenclatureWasModified(OldType, NewType). Thus the user implementation will be called, each time a new object is created OR the Nomenclature value of an existing object is changed. It should be noted that the user never calls CATIArrAppProduct::NomenclatureWasModified. Depending upon the values of OldType (this value will be "" when the object is created for the first time) , and NewType (will always be the latest 'nomenclature type' the user allocates to the object interactively). 

Depending upon the OldType and NewType values, the user, for example, may want to add new attributes to the objects or remove existing attributes. The user can do this in the implementation of the method "NomenclatureWasModified".

Example of dictionary ( ***.dic)
ArrPathway  
CATIArrAppProduct   libXYZ ( where libXYZ is the library where the implementation resides )
ArrBox    
   CATIArrAppProduct   libXYZ ( where libXYZ is the library where the implementation resides )
ArrRun
       CATIArrAppProduct   libXYZ ( where libXYZ is the library where the implementation resides )

Sample code to be found in the implementation class (*.cpp)
CATBeginImplementClass( "implementation class name", DataExtension,
CATEArrAppProductAdapter, ArrPathway );
CATAddExtendedImplementation( ArrBox );
CATAddExtendedImplementation( ArrRun );
CATEndImplementClass( implementation class name );

Sample code to be found in the implementation class (*.h)
class ExportedBy(library which exports this class) className : public
CATEArrAppProductAdapter

[Top]


In Short

This use case has demonstrated how to use the Arrangement interface to query an 'Arr" object so as to determine whether its Nomenclature was modified. Depending the "Old" and "New" Nomenclatures on the object, the user can choose to add/remove new/existing attributes on the object.

[Top]


History

Version: 1 [Oct 2003] Document created
[Top]

Copyright © 2003, Dassault Systèmes. All rights reserved.