KnowledgeInterfaces CATDelegateInstanciationAdapter
Usage: you can derive this class.
public class CATDelegateInstanciationAdapter
CAA2 Adapter to CATIDelegateInstanciation Interface.
Role: This class must be derived to implement extension to CATIDelegateInstanciation.
CATIDelegateInstanciation is the interface used by Knowledgeware to instanciate objects.
- See also:
- , , , ,
Constructor and Destructor Index
- o
CATDelegateInstanciationAdapter()
- Constructs the extension.
- o
~CATDelegateInstanciationAdapter()
- Deletes the extension.
Method Index
- o
InstanciateObject(CATICkeObject_var&,CATUnicodeString&,CATUnicodeString&,CATICkeObject_var&,CATInstanciationContext*)
- Creates an instance oInstanciated, of type typeName in owner iOwner and named iName.
- o
RetrieveTypeToInstanciate(CATUnicodeString&,CATIType_var&)
- Retrieves the type to instanciate (by the name passed as third argument of instanciate Object
- o
SendError(CATUnicodeString&,CATKWEErrorSeverity::Severity)
- Description: Raises an error.
- o
SuppressObject(CATICkeObject_var&,CATIType_var&,CATCkeEvalContext*)
- SuppressObject (remove an object or suppress an extension).
- o
ValidateModel(CATICkeObject_var&,CATUnicodeString&)
- Validation of the object created after its modification in the PLM New.
Constructor and Destructor
o CATDelegateInstanciationAdapter
public CATDelegateInstanciationAdapter( | ) |
-
Constructs the extension.
o ~CATDelegateInstanciationAdapter
public virtual ~CATDelegateInstanciationAdapter( | ) |
-
Deletes the extension.
Methods
o InstanciateObject
public virtual InstanciateObject( | const | iOwner, |
| const | iName, |
| const | iTypeName, |
| | oInstanciated, |
| const | iContext) |
-
Creates an instance oInstanciated, of type typeName in owner iOwner and named iName.
Must be overriden by implementer.
- Parameters:
-
- iOwner
- The object that will aggregate the object to create
- iName
- The name of the object to create
- iTypeName
- Name of the type of the object to create
- oInstanciated
- object created in output
- iContext
- context of instantiation
- Returns:
-
- E_INVALIDARG if the instantiation has failed (bad arguments, bad father).
- E_ACCESSDENIED if the creation is impossible because the context is read only.
- S_OK if the object has been created successfully.
o RetrieveTypeToInstanciate
public RetrieveTypeToInstanciate( | const | typeName, |
| | oType) |
-
Retrieves the type to instanciate (by the name passed as third argument of instanciate Object
- Parameters:
-
- typeName
- Name of the type of the object to create
- oType
- The type retrieved
- Returns:
-
- S_FALSE if type not found
- S_OK if the type has been found
o SendError
public SendError( | const | iMessage, |
| const | iSeverity | = CATKWEErrorSeverity::Error) |
-
Description: Raises an error. Use this method inside the InstanciateObject method.
when you want to bring to the user more explanation about why the new operation has failed.
Note that you don't need to raise message (& use this method) in the standard error cases (bad arguments, bad father, owner read only, ...
Simply return the right HRESULT (E_INVALID_ARG, E_ACCESSDENIED) and a standard error message is raised (CreationInReadOnly, CreationFailed).
- Parameters:
-
- iMessage:
- the NLS message that will be brought to the end-user.
- iSeverity:
- severity of the error.
- Returns:
- classic HRESULT
o SuppressObject
public virtual SuppressObject( | const | iObject, |
| const | iType, |
| const | iContext) |
-
SuppressObject (remove an object or suppress an extension).
Can be implemented or not.
- 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:
-
- E_INVALIDARG if iObject NULL or not recognized bu the factory.
- S_OK if the suppression of the object succeeded
- 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.
Default implementation returns OK.
- Parameters:
-
- iObject
- Object to validate
- oErrorMessage
- Error message
- Returns:
-
- E_INVALIDARG if iObject NULL or not recognized bu the factory.
- S_OK if the validation of the object is OK
- S_FALSE if the validation of the object is KO (an error message is filled)
This object is included in the file: CATDelegateInstanciationAdapter.h
If needed, your Imakefile.mk should include the module: KnowledgeItf
Copyright © 1999-2015, Dassault Systèmes. All rights reserved.