KnowledgeInterfaces CATKweObjectAdapter

Usage: you can derive this class.


public class CATKweObjectAdapter

Class to be used as an adapter for objects that want to implement CATICkeFeature or CATICkeObject (or both).

In addition to extension, you must create one of the TIE object with - TIEchain_CATICkeFeature - TIEchain_CATICkeObject


Constructor and Destructor Index


o CATKweObjectAdapter()
Constructor.
o ~CATKweObjectAdapter()
Destructor.

Method Index


o GetLogicalName(CATUnicodeString&)
Returns the Logical name of the object.
o GetType()
Returns the type of the object.
o IsPublic()
Indicates if this object provides access to its simple attributes through generic methods CATCkeObjectAttrReadServices and CATCkeObjectAttrWriteServices.
o SetLogicalName(CATUnicodeString&)
Sets the Logical name of the object.

Constructor and Destructor


o CATKweObjectAdapter
public CATKweObjectAdapter()
Constructor.
o ~CATKweObjectAdapter
public virtual ~CATKweObjectAdapter()
Destructor.

Methods


o GetLogicalName
public virtual GetLogicalName( oLogicalName)
Returns the Logical name of the object. The logical name is a name that the end-user can give (modify) and that has no constraint of unicity.
Default implementation relies on CATIAlias::GetAlias method.
For objects in representation, it is usually sufficient. For PLM objects CATIAlias has been used to provide a computed name. That's why it cannot be used for logical name implementation.
As a consequence, for PLM objects, this method MUST BE overriden.
Parameters:
oLogicalName
Logical name in output
Returns:
  1. E_ACCESSDENIED if the logical name cannot be read.
  2. E_FAIL if the logical name cannot be read.
  3. S_OK if the logical name has been read successfully.
o GetType
public virtual GetType()
Returns the type of the object. This type is used to check that the formula (rule or check) syntax is correct. If your object implements CATIInstance, the classical implementation returns the CATIInstance::Type method. If not, usually the implementation consists in calling CATGlobalFunctions::GetTypeDictionary()->FindTypeSafe("TypeName","PackageName",oType) Default implementation returns the Feature type.
Returns:
the main type of the object. It is also a CATIType.
o IsPublic
public virtual IsPublic()
Indicates if this object provides access to its simple attributes through generic methods CATCkeObjectAttrReadServices and CATCkeObjectAttrWriteServices.
Default implementation returns FALSE. Can be overriden.
Returns:
indicates if this object provides access to its simple attributes through generic methods.
o SetLogicalName
public virtual SetLogicalName( const iLogicalName)
Sets the Logical name of the object. The logical name is a name that the end-user can give (modify) and that has no constraint of unicity.
Default implementation relies on CATIAlias::SetAlias method.
For objects in representation, it is usually sufficient. For PLM objects CATIAlias has been used to provide a computed name. That's why it cannot be used for logical name implementation.
As a consequence, for PLM objects, this method MUST BE overriden.
Parameters:
iLogicalName
Logical name in input
Returns:
HRESULT
  1. E_ACCESSDENIED if the valuation has failed (read only attribute, object not editable).
  2. E_FAIL if the logical name cannot be set.
  3. S_OK if the logical name has been set successfully.

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

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