All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

KnowledgeInterfaces Interface CATIParmPublisher

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

Usage: you can reimplement this interface by deriving the supplied CATParmPublisherAdapter adapter class.


interface CATIParmPublisher

Interface dedicated to parameters publishing.
Role: This interface is to be implemented by objects that want to publish
their own parameters to F(x) and KnowledgeAdvisor.
This interface has 2 goals:

  • the Append and RemoveChild are used by Knowledgeware to add KBware features to the root (example : user parameters or relations).
  • the GetDirectChildren and GetAllChildren are used to find from the root object, objects that are important for Knowledgeware such as parameters and relations.
  • This interface must at least be implemented by Root Features (ex: Part).
    Other applications features may implement this interface to answer more locally (and so to filter) to GetDirectChildren and GetAllChildren methods. It corresponds to the parameters that are known by this feature or that belong to this feature.

    BOA information: this interface CAN be implemented using the BOA (Basic Object Adapter). To know more about the BOA, refer to the CAA Encyclopedia home page. Click Middleware at the bottom left, then click the Object Modeler tab page. Several articles deal with the BOA.


    Method Index


    o AllowUserAppend()
    Indicates if this publisher allow the use of Append (and RemoveChild) method.
    o Append(CATISpecObject_var&)
    Appends user parameters and relations to the current object.
    o GetAllChildren(CATClassId,CATListValCATISpecObject_var&)
    Returns the objects implementing the given interface that are local to this feature or that belong to downstream features (recursive).
    o GetContainer()
    This method has to return the associated container of the publisher : in different contexts, the system needs a container when using a CATIParmPublisher.
    o GetDirectChildren(CATClassId,CATListValCATISpecObject_var&)
    Returns the objects implementing the given interface that are local to this feature.
    o RemoveChild(CATISpecObject_var&)
    Removes user parameters and relations from this object.
    o VisitChildren(CATIVisitor*,int)
    This method is another one to browse publishers hierarchy (recursively or not).

    Methods


    o AllowUserAppend
    public virtual boolean AllowUserAppend()const =0
    Indicates if this publisher allow 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.
    Returns:
    Legal values: TRUE Append and Remove of objects are authorized FALSE Append and Remove of objects are not authorized.
    o Append
    public virtual void Append( const CATISpecObject_var& iKBwareObject)= 0
    Appends user parameters and relations to the current object. The object is the Application Root Feature that implements the current interface
    Parameters:
    iKBwareObject
    knowledgeware object to append to the root object.
    o GetAllChildren
    public virtual void GetAllChildren(CATClassId iIntfName,
    CATListValCATISpecObject_var& ListFound) = 0
    Returns the objects implementing the given interface that are local to this feature or that belong to downstream features (recursive).
    Example of interfaces searched (CATICkeParm, CATICkeRelation, CATIDimCst)
    Parameters:
    iIntfName
    name of the interface searched
    iListFound
    objects found are added to the list
    o GetContainer
    public virtual CATIContainer_var GetContainer()= 0
    This method has to return the associated container of the publisher : in different contexts, the system needs a container when using a CATIParmPublisher. This interface can be implemented on different type of objects (specs, container, documents, and non persistent objects), so container retrieval can be different depending on this type. The default implementation on CATCkeInstanceAdapter asserts that the object implementing CATIParmPublisher also implements CATISpecObject. If it is not the case for your object, you must overload this method.
    o GetDirectChildren
    public virtual void GetDirectChildren(CATClassId iIntfName,
    CATListValCATISpecObject_var& iListFound) = 0
    Returns the objects implementing the given interface that are local to this feature.
    Example of interfaces searched (CATICkeParm, CATICkeRelation, CATIDimCst)
    Parameters:
    iIntfName
    name of the interface searched
    iListFound
    objects found are added to the list
    o RemoveChild
    public virtual void RemoveChild( const CATISpecObject_var& iKBwareObject)= 0
    Removes user parameters and relations from this object. The object is the Application Root Feature that implements the current interface
    Parameters:
    iKBwareObject
    knowledgeware object to remove from the root object.
    o VisitChildren
    public virtual void VisitChildren(CATIVisitor* iVisitor,
    const int recur= 0) = 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 (in CATCkeInstanceAdapter) doesn't handle new litterals (based on spec attributes). If you want your publisher to publish such litterals, you have to overload this method. The principle is to visit each published instance and if the visit is recursive, to call VisitChildren on each instance implementing CATIParmPublisher. Remember that if the method Visit doesn't succeed, it means that the visit can end.

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

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