KnowledgeInterfaces Interface CATIDelegateInstanciation

Usage: you can reimplement this interface by deriving the supplied CATDelegateInstanciationAdapter adapter class.


interface CATIDelegateInstanciation

CATIDelegateInstanciation allows several types to use the same instanciation function.

The CATIType created by CATITypeDictionary can specify the name of a class which implements CATIDelegateInstanciation.
The purpose of the implementation is to create objects from their type. The implementation must also implement CATICreateInstance.
This instantiation method will be called from the Knowledge language with the function "new".

BOA information: this interface CAN be implemented using the BOA (Basic Object Adapter). To know more about the BOA, refer to the CAA Encyclopedia home page. Click Middleware at the bottom left, then click the Object Modeler tab page. Several articles deal with the BOA.

See also:
, , ,


Method Index


o InstanciateObject(CATICkeObject_var&,CATUnicodeString&,CATUnicodeString&,CATICkeObject_var&,CATInstanciationContext*)
Creates an instance oInstanciated, of type iTypeName, in owner iOwner, and named iName.
o SuppressObject(CATICkeObject_var&,CATIType_var&,CATCkeEvalContext*)
SuppressObject (removes an object or suppresses an extension).
o ValidateModel(CATICkeObject_var&,CATUnicodeString&)
Validation of the object created after its modification in the PLM New.

Methods


o InstanciateObject
public virtual InstanciateObject( const iOwner,
const iName,
const iTypeName,
oInstanciated,
const iContext)
Creates an instance oInstanciated, of type iTypeName, in owner iOwner, and named iName.
This method must be implemented by the application.
Parameters:
iOwner
the object that will aggregate the object to create
iName
the name of the object to create
iTypeName
the name of the type of the object to create
oInstanciated
the object created
iContext
the context of instanciation
Returns:
classic HRESULT
o SuppressObject
public virtual SuppressObject( const iObject,
const iType,
const iContext)
SuppressObject (removes an object or suppresses an extension).
It is not mandatory to implement this method.
Parameters:
iObject
Object to suppress or on which we want to suppress the extension.
iType
Type of the extension to suppress
iContext
the context of removal
Returns:
  1. E_INVALIDARG if iObject NULL or not recognized bu the factory.
  2. S_OK if the suppression of the object succeeded
  3. E_ACCESSDENIED if iObject cannot be suppressed.
o ValidateModel
public virtual ValidateModel( const iObject,
oErrorMessage)
Validation of the object created after its modification in the PLM New.
It is not mandatory to implement this method.
Parameters:
iObject
Object to validate
oErrorMessage
Error message
Returns:
  1. E_INVALIDARG if iObject NULL or not recognized bu the factory.
  2. S_OK if the validation of the object is OK
  3. S_FALSE if the validation of the object is KO (an error message is filled)

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

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