All Frameworks Class Hierarchy This Framework Previous Next Indexes
CATInstantCollabDesignCAAItf Interface CATIColMergeable
System.IUnknown
|
+---System.IDispatch
|
+---System.CATBaseUnknown
|
+---CATIColMergeable
Usage: you can reimplement this interface by deriving the supplied CATColIMergeableAdapter adapter class.
interface CATIColMergeable
Interface to be implemented by the objects which are to be streamed/unstreamed by the collaborative engine
The merge step is composed by 2 steps :
Preprocess step : objects in the briefcase are compared with the destination model.
If the colaboration
id can be retreived, the associated feature will be replaced by the one inside the briefcase. If not,
the feature inside the briefcase will be instantiated.
Merge step : this step is composed by 3 steps which are done for all the feature (loop on all before merge
then loop on all merge then loop on all afterMerge)
BeforeMerge : this method is called before the unstream.
Merge : this method is called just after the unstream
AfterMerge : this method is called when all the features are unstreamed and merged
IMPORTANT : this interface MUST not be manipulated directly. A feature can be mergeable thanks to the adhesion of this
CAA interface OR the internal DS interface. Use the CATCollabWrapper methods instead
When do I implement this interface ?
1- I own a feature which inherits from a DS feature implementing itself the collaborative interfaces and I want
to add applicative rule during the merge step.
2- I have created a feature which does not inherit from a known collaborative feature and I have no access to the DS
internal interfaces. IMPORTANT : in that case I have to inherit my component from the provide adapter :
CATColIMergeableAdapter
Method Index
- o
AfterMerge(CATIColMergeContextTable*,CATIColMergeItem*)
- Method called just after the mergeOne may implement to post-process the merge :
- Replug some missing links or link which have been marked IGNORED during share step
- Post-process the feature to guarantee the applicative model integrity
- o
BeforeMerge(CATIColMergeContextTable*,CATIColMergeItem*,CATBaseUnknown*&,CATBoolean)
- Method called before the merge.
- o
ComputeMergeFlagFromContext(CATIColMergeItem*,CATIColMergeItem::MergeFlag,CATIColMergeItem::MergeFlag&)
- This method is the first called by the collaboration engine during the preprocess step
The feature can change its merge flag depending on the context.
- o
Merge(CATIColMergeContextTable*)
- Method called just after the unstream.
Methods
o AfterMerge
-
Method called just after the mergeOne may implement to post-process the merge :
- Replug some missing links or link which have been marked IGNORED during share step
- Post-process the feature to guarantee the applicative model integrity
- Parameters:
-
- iMergeContextTable
- feature's Context table created during the share step
- iMyMergeItem
- current merge item being processed
o BeforeMerge
-
Method called before the merge. One may implement this method for different reasons :
- Caching some information of the destination feature if it already exists
- Proposing a substitute feature for the merge.
Example
A must be merged on A'. But responsible of feature A decides that if A' exists, A' must be replaced by B
- Parameters:
-
- iMergeContextTable
- feature's Context table created during the share step
- iMyMergeItem
- current merge item being processed
- oSubstitute
- feature which will replace this during the merge
- HaveBeenCreated
- HaveBeenCreated=true : skeleton has been created so the feature has not been retrieved in the destination model
HaveBeenCreated=false : skeleton does not exist. Pointer "this" refers to the "real" feature which is going to be replaced.
o ComputeMergeFlagFromContext
public virtual HRESULT ComputeMergeFlagFromContext( | const CATIColMergeItem* | iMyMergeItem, |
| CATIColMergeItem::MergeFlag | iOldMergeFlag, |
| CATIColMergeItem::MergeFlag& | oNewMergeFlag) = 0 |
-
This method is the first called by the collaboration engine during the preprocess step
The feature can change its merge flag depending on the context.
Example
Feature must be always discarded if it already exists in the destination part, even it it has been
explicitely selected by a user or a batch.
==> Implement that method and set oNewMergeFlag=CATIColMergeItem::NO_MERGE
- Parameters:
-
- iMyMergeItem
- the input collaborative object which is currently pre-processed
- iOldMergeFlag
- the default flag computed by the collabration engine
- oNewMergeFlag
o Merge
-
Method called just after the unstream.
- Parameters:
-
- iMergeContextTable
- feature's Context table created during the share step
This object is included in the file: CATIColMergeable.h
If needed, your Imakefile.mk should include the module: CATInstantCollabDesignItf