All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

VPMInterfaces Interface ENOVIObjectInfo

System.IUnknown
  |
  +---System.IDispatch
    |
    +---System.CATBaseUnknown
      |
      +---ENOVIObjectInfo
 

Usage: an implementation of this interface is supplied and you must use it as is. You should not reimplement it.


interface ENOVIObjectInfo

Interface to manage Object Info.


Method Index


o IsAKindOf(CATUnicodeString&)

Methods


o IsAKindOf
public virtual HRESULT IsAKindOf( const CATUnicodeString& iType)= 0
Deprecated:
V5R14 This method allows you to test the inheritance of an object type against the 'iType' input parameter. For instance if you call 'object_info->IsAKindOf("ENOVIA_VPMItemInstance")' and 'object_info' is an ENOVIObjectInfo for a customized ItemInstance type, it will return true. Note that using this method is deprecated, as it masks the method CATBaseUnknown::IsAKindOf(const char*) (because of C++ names visibility, the compiler always chooses ENOVIObjectInfo::IsAKindOf(const CATUnicodeString&) over CATBaseUnknown::IsAKindOf(const char*) ), and those 2 methods are very different behaviour: - CATBaseUnknown::IsAKindOf(const char*) tests the type of the ObjectInfo object itself (i.e. it will return false when called with the "ENOVIA_VPMItemInstance" string in the example above, but it will return true for "INFO_ENOVIA_ItemInstance" ), - ENOVIObjectInfo::IsAKindOf(const CATUnicodeString&) tests the type of the class of objects represented by the ObjectInfo (thus returning true for "ENOVIA_ItemInstance" and false for "INFO_ENOVIA_ItemInstance" in the previous example). Because those 2 methods have very different behaviour (and given that migrating to using exclusively CATBaseUnknown::IsAKindOf is easy), this method will be suppressed in a future release: you are advised to invoke CATBaseUnknown::IsAKindOf explicitly (it is not possible to rely on the compiler for this since C++ explicitly precludes it in this case!) as in the following code snippet: ENOVIObjectInfo *object_info = ... HRESULT rc = object_info->GetImpl()->CATBaseUnknown::IsAKindOf("INFO_ENOVIA_VPMItemInstance"); which should replace code like: object_info->IsAKindOf("ENOVIA_VPMItemInstance"); A side benefit will be that a CATUnicodeString will not be implicitly constructed anymore when calling IsAKindOf with a literal C string. Also note that another difference between CATBaseUnknown::IsAKindOf and ENOVIObjectInfo::IsAKindOf is the possible return values: - CATBaseUnknown::IsAKindOf return S_OK or S_FALSE (works like a boolean value). - while ENOVIObjectInfo::IsAKindOf returns a failure (works like an ordinary HRESULT) to mean 'false'.

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

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