All Frameworks Class Hierarchy This Framework Previous Next Indexes
System Interface CATIVBExtension
System.IUnknown
|
+---System.IDispatch
|
+---System.CATBaseUnknown
|
+---CATIVBExtension
Usage: you can freely reimplement this interface.
interface CATIVBExtension
Interface to implement in order to extend the V5 Automation object model using the CATIABase::GetItem mechanism.
The CATIABase.GetItem mechanism offers a generic way to extend the V5 Automation object model with custom Automation interfaces. It is the
preferred way to achieve such extensions.
Script developers use the GetItem mechanism in the following
manner:
' VBA sample
Dim X As MyAutomationInterface
' Retrieve the extension object associated to Y under the key "MyCATIVBExtensionImpl"
Set X = Y.GetItem("MyCATIVBExtensionImpl")
-
Y is any script object which derives from
CATIABase or
CATIACollection. Such objects can be either native V5 Automation objects such as Viewer or Part or custom objects.
-
MyCATIVBExtensionImpl is the name of a V5 implementation object which implements
CATIVBExtension. MyCATIVBExtensionImpl is responsible for instantiating the Automation extension object which will ultimately be returned by
CATIABase.GetItem method. Note that the MyCATIVBExtensionImpl object itself is instantiated using
the
CATICreateInstance mechanism, so it must also implement the
CATICreateInstance interface in a code extension.
-
X is the Automation extension object, of type MyAutomationInterface. It
is associated to the Y object and is the result of invoking the
CATIABase.GetItem on Y with the MyCATIVBExtensionImpl key.
Please note that the
CATIABase.GetItem mechanism is implemented by the
CATBaseObject class (the
CATIABase interface adaptor) or
CATBaseCollection class (the
CATIACollection interface adaptor), so make sure your Y class derives from either of these adaptors.
For implementations which override the
CATIABase.GetItem method, the overriding implementation must make sure to first invoke the implementation of
its superclass. If the implementation of the superclass fails to retrieve
the proper Automation extension, then the overriding implementation can use its own
algorithm to retrieve it.
Method Index
- o
GetObjects(CATBaseUnknown*,CATBaseDispatch*&)
- Returns the extension object associated
to the iGetItemTarget Automation object.
Methods
o GetObjects
-
Returns the extension object associated
to the iGetItemTarget Automation object.
- Parameters:
-
- iGetItemTarget
- The Automation object on which GetItem is invoked.
- oGetItemResult
- The Automation extension object returned by GetItem.
- Returns:
- S_OK if the object is extension object is successfully instantiated,
E_FAIL otherwise
This object is included in the file: CATIVBExtension.h
If needed, your Imakefile.mk should include the module: JS0GROUP