KnowledgeInterfaces Interface 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 AppendElement and RemoveElement are used by Knowledgeware to add KBware features
to the root (example : user parameters or relations).
the VistChildren is 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 VisitChildren 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
AppendElement(CATBaseUnknown_var&)
- Appends user parameters and relations to the current object.
- o
GetFactory()
- This method has to return the associated container of the publisher : in different contexts, the system needs a container when using a CATIParmPublisher.
- o
RemoveElement(CATBaseUnknown_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 AllowUserAppend( | ) |
-
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 AppendElement
public virtual AppendElement( | const | iKBwareObject) |
-
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. The object implementing CATIParmPublisher and the object to append must be in the same container.
This will be enforced in the future to allow only authorized data model.
o GetFactory
public virtual GetFactory( | ) |
-
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.
- Returns:
- the container
o RemoveElement
public virtual RemoveElement( | const | iKBwareObject) |
-
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 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 (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.
- Parameters:
-
- iVisitor
- visitor to call during the visit
- recur
- 1 is the visit is recursive, 0 instead
This object is included in the file: CATIParmPublisher.h
If needed, your Imakefile.mk should include the module: KnowledgeItf
Copyright © 1999-2015, Dassault Systèmes. All rights reserved.