KnowledgeInterfaces CATParmPublisherAdapter

Usage: you can derive this class.


public class CATParmPublisherAdapter

CAA Adapter to CATIParmPublisher Interface.
Role: This class should be derived to implement features extension to CATIParmPublisher.
CATIParmPublisher is the interface used by Knowledgeware to have access to all the parameters
and relations of a feature.
It is also used on some objects to add user parameters and relations to features
The intent of this adapter is not to provide a default implementation: in fact the default implementation is usually to do nothing.
We provide an adapter to enable the introduction of new methods in the future on the CATIParmPublisher interface without breaking the buildtime of our CAA customers.

See also:


Constructor and Destructor Index


o CATParmPublisherAdapter()
Constructs the extension.
o ~CATParmPublisherAdapter()
Deletes the extension.

Method Index


o AddComponent(CATICkeObject_var&)
Appends components under the object.
o AllowAppend()
Indicates if this object allow the use of AddComponent (and RemoveComponent) method.
o AllowUserAppend()
Indicates if this publisher allows the use of Append (and RemoveChild) method.
o AppendElement(CATBaseUnknown_var&)
Appends a user parameter or a relation to this feature.
o GetFactory()
This method has to return the associated container of the publisher.
o RemoveComponent(CATICkeObject_var&)
Removes components under the object.
o RemoveElement(CATBaseUnknown_var&)
Removes a user parameter or a relation from this feature.
o RetrieveDirectChildren(CATClassId,CATLISTV(CATBaseUnknown_var)&)
Retrieves the list of components from the outside.
o VisitChildren(CATIVisitor*,int)
This method is another one to browse publishers hierarchy (recursively or not).
o VisitComponents(CATIVisitor*,int)
This method is another one to browse publishers hierarchy (recursively or not).

Constructor and Destructor


o CATParmPublisherAdapter
public CATParmPublisherAdapter()
Constructs the extension.
o ~CATParmPublisherAdapter
public virtual ~CATParmPublisherAdapter()
Deletes the extension.

Methods


o AddComponent
public virtual AddComponent( const iKBwareObject)
Appends components under the object.
Parameters:
iKBwareObject
object to be appended Default implementation returns E_FAIL.
Returns:
E_FAIL if your object does not accept this kind of object.
o AllowAppend
public virtual AllowAppend()
Indicates if this object allow the use of AddComponent (and RemoveComponent) method. It is mostly used to prevent those operations if the object implementing the interface isn't able to manage it. Default implementation is FALSE.
Returns:
Legal values: TRUE Add and Remove of objects are authorized FALSE Add and Remove of objects are not authorized.
o AllowUserAppend
public virtual AllowUserAppend()
Indicates if this publisher allows the use of Append (and RemoveChild) method.
It is mostly used to prevent those operations if the object implementing the interface isn't able to manage it. Default implementation is FALSE.
Returns:
Legal values: TRUE Append and Remove of objects are authorized FALSE Append and Remove of objects are not authorized.
o AppendElement
public virtual AppendElement( const iFeatureToAppend)
Appends a user parameter or a relation to this feature. You must implement this method if you have answered TRUE to the AllowUserAppend method. The SpecObject passed as argument must have been created in the container returned by the Container method. Default implementation does nothing.
Parameters:
iFeatureToAppend
relation or parameter to append
o GetFactory
public virtual GetFactory()
This method has to return the associated container of the publisher. It is used to create the user parameters when AllowUserAppend returns True. In this case, you should implement this method. Default implementation returns NULL.
Returns:
The container
o RemoveComponent
public virtual RemoveComponent( const iKBwareObject)
Removes components under the object.
Parameters:
iKBwareObject
knowledgeware object to be removed. Default implementation returns E_FAIL.
Returns:
E_FAIL if the remove operation has failed.
o RemoveElement
public virtual RemoveElement( const iFeatureToRemove)
Removes a user parameter or a relation from this feature. Default implementation does nothing.
You must implement this method if you have answered TRUE to the AllowUserAppend method.
Parameters:
iFeatureToRemove
relation or parameter to remove
o RetrieveDirectChildren
public virtual RetrieveDirectChildren( iIntfName,
iListToFill)
Retrieves the list of components from the outside.
Parameters:
iIntfName
name of the interface asked.
iListToFill
list filled with the components
Returns:
classic HRESULT Default implementation returns E_FAIL.
o VisitChildren
public virtual VisitChildren( iVisitor,
const recur= 0)
This method is another one to browse publishers hierarchy (recursively or not). The choice of good instances is delegated to the given visitor (it can put good instances in a list, or keep only one, depending on the goal of the "visit").
The default implementation does nothing.
To implement this method, you must scan your local parameters, scan your components and ask the Visit on them. If the recur=1, you must call VisitChildren recursively on your components.
Remember that if the method Visit doesn't succeed, it means that the visit can end.
Parameters:
iVisitor
object to call during the visit
recur
1 if we want the visit to be recursive, 0 instead
o VisitComponents
public virtual VisitComponents( iVisitor,
const recur= 0)
This method is another one to browse publishers hierarchy (recursively or not). The choice of good instances is delegated to the given visitor (it can put good instances in a list, or keep only one, depending on the goal of the "visit").
The default implementation does nothing.
To implement this method, you must scan your components and ask the Visit on them. If the recur=1, you must call VisitChildren recursively on your components.
Remember that if the method Visit doesn't succeed, it means that the visit can end.
Default implementation calls the VisitChildren method.
Parameters:
iVisitor
object to call during the visit
recur
1 if we want the visit to be recursive, 0 instead
Returns:
classic HRESULT

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

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