Open CASCADE Technology  7.3.0
Public Member Functions
Transfer_TransferDispatch Class Reference

A TransferDispatch is aimed to dispatch Entities between two Interface Models, by default by copying them, as CopyTool, but with more capabilities of adapting : Copy is redefined to firstly pass the hand to a TransferProcess. If this gives no result, standard Copy is called. More...

#include <Transfer_TransferDispatch.hxx>

Inheritance diagram for Transfer_TransferDispatch:
Inheritance graph
[legend]

Public Member Functions

 Transfer_TransferDispatch (const Handle< Interface_InterfaceModel > &amodel, const Interface_GeneralLib &lib)
 Creates a TransferDispatch from a Model. Works with a General Service Library, given as an Argument A TransferDispatch is created as a CopyTool in which the Control is set to TransientProcess. More...
 
 Transfer_TransferDispatch (const Handle< Interface_InterfaceModel > &amodel, const Handle< Interface_Protocol > &protocol)
 Same as above, but Library is defined through a Protocol. More...
 
 Transfer_TransferDispatch (const Handle< Interface_InterfaceModel > &amodel)
 Same as above, but works with the Active Protocol. More...
 
Handle< Transfer_TransientProcessTransientProcess () const
 Returns the content of Control Object, as a TransientProcess. More...
 
virtual Standard_Boolean Copy (const Handle< Standard_Transient > &entfrom, Handle< Standard_Transient > &entto, const Standard_Boolean mapped, const Standard_Boolean errstat) override
 Copies an Entity by calling the method Transferring from the TransferProcess. If this called produces a Null Binder, then the standard, inherited Copy is called. More...
 
- Public Member Functions inherited from Interface_CopyTool
 Interface_CopyTool (const Handle< Interface_InterfaceModel > &amodel, const Interface_GeneralLib &lib)
 Creates a CopyTool adapted to work from a Model. Works with a General Service Library, given as an argument. More...
 
 Interface_CopyTool (const Handle< Interface_InterfaceModel > &amodel, const Handle< Interface_Protocol > &protocol)
 Same as above, but Library is defined through a Protocol. More...
 
 Interface_CopyTool (const Handle< Interface_InterfaceModel > &amodel)
 Same as above, but works with the Active Protocol. More...
 
Handle< Interface_InterfaceModelModel () const
 Returns the Model on which the CopyTool works. More...
 
void SetControl (const Handle< Interface_CopyControl > &othermap)
 Changes the Map of Result for another one. This allows to work with a more sophisticated Mapping Control than the Standard one which is CopyMap (e.g. TransferProcess from Transfer) More...
 
Handle< Interface_CopyControlControl () const
 Returns the object used for Control. More...
 
virtual void Clear ()
 Clears Transfer List. Gets Ready to begin another Transfer. More...
 
Handle< Standard_TransientTransferred (const Handle< Standard_Transient > &ent)
 Transfers one Entity, if not yet bound to a result Remark : For an Entity which is reported in the Starting Model, the ReportEntity will also be copied with its Content if it has one (at least ShallowCopy; Complete Copy if the Protocol recognizes the Content : see method Copy) More...
 
void Bind (const Handle< Standard_Transient > &ent, const Handle< Standard_Transient > &res)
 Defines a Result for the Transfer of a Starting object. Used by method Transferred (which performs a normal Copy), but can also be called to enforce a result : in the latter case, the enforced result must be compatible with the other Transfers which are performed. More...
 
Standard_Boolean Search (const Handle< Standard_Transient > &ent, Handle< Standard_Transient > &res) const
 Search for the result of a Starting Object (i.e. an Entity) Returns True if a Result is Bound (and fills "result") Returns False if no result is Bound. More...
 
void ClearLastFlags ()
 Clears LastFlags only. This allows to know what Entities are copied after its call (see method LastCopiedAfter). It can be used when copies are done by increments, which must be distinghished. ClearLastFlags is also called by Clear. More...
 
Standard_Integer LastCopiedAfter (const Standard_Integer numfrom, Handle< Standard_Transient > &ent, Handle< Standard_Transient > &res) const
 Returns an copied Entity and its Result which were operated after last call to ClearLastFlags. It returns the first "Last Copied Entity" which Number follows <numfrom>, Zero if none. It is used in a loop as follow : Integer num = 0; while ( (num = CopyTool.LastCopiedAfter(num,ent,res)) ) { .. Process Starting <ent> and its Result <res> }. More...
 
void TransferEntity (const Handle< Standard_Transient > &ent)
 Transfers one Entity and records result into the Transfer List Calls method Transferred. More...
 
void RenewImpliedRefs ()
 Renews the Implied References. These References do not involve Copying of referenced Entities. For such a Reference, if the Entity which defines it AND the referenced Entity are both copied, then this Reference is renewed. Else it is deleted in the copied Entities. Remark : this concerns only some specific references, such as "back pointers". More...
 
void FillModel (const Handle< Interface_InterfaceModel > &bmodel)
 Fills a Model with the result of the transfer (TransferList) Commands copy of Header too, and calls RenewImpliedRefs. More...
 
Interface_EntityIterator CompleteResult (const Standard_Boolean withreports=Standard_False) const
 Returns the complete list of copied Entities If <withreports> is given True, the entities which were reported in the Starting Model are replaced in the list by the copied ReportEntities. More...
 
Interface_EntityIterator RootResult (const Standard_Boolean withreports=Standard_False) const
 Returns the list of Root copied Entities (those which were asked for copy by the user of CopyTool, not by copying another Entity) More...
 
virtual ~Interface_CopyTool ()
 

Additional Inherited Members

- Protected Member Functions inherited from Interface_CopyTool
virtual Standard_Boolean NewVoid (const Handle< Standard_Transient > &entfrom, Handle< Standard_Transient > &entto)
 Creates a new void instance (just created) of the same class as <entfrom>. Uses the general service GeneralModule:NewVoid Returns True if OK (Recognize has succeeded), False else (in such a case, the standard method ShallowCopy is called to produce <ento> from <entfrom> : hence it is not void) More...
 
- Protected Attributes inherited from Interface_CopyTool
Interface_GeneralLib thelib
 

Detailed Description

A TransferDispatch is aimed to dispatch Entities between two Interface Models, by default by copying them, as CopyTool, but with more capabilities of adapting : Copy is redefined to firstly pass the hand to a TransferProcess. If this gives no result, standard Copy is called.

This allow, for instance, to modify the copied Entity (such as changing a Name for a VDA Entity), or to do a deeper work (such as Substituting a kind of Entity to another one).

For these reasons, TransferDispatch is basically a CopyTool, but uses a more sophiscated control, which is TransferProcess, and its method Copy is redefined

Constructor & Destructor Documentation

◆ Transfer_TransferDispatch() [1/3]

Transfer_TransferDispatch::Transfer_TransferDispatch ( const Handle< Interface_InterfaceModel > &  amodel,
const Interface_GeneralLib lib 
)

Creates a TransferDispatch from a Model. Works with a General Service Library, given as an Argument A TransferDispatch is created as a CopyTool in which the Control is set to TransientProcess.

◆ Transfer_TransferDispatch() [2/3]

Transfer_TransferDispatch::Transfer_TransferDispatch ( const Handle< Interface_InterfaceModel > &  amodel,
const Handle< Interface_Protocol > &  protocol 
)

Same as above, but Library is defined through a Protocol.

◆ Transfer_TransferDispatch() [3/3]

Transfer_TransferDispatch::Transfer_TransferDispatch ( const Handle< Interface_InterfaceModel > &  amodel)

Same as above, but works with the Active Protocol.

Member Function Documentation

◆ Copy()

virtual Standard_Boolean Transfer_TransferDispatch::Copy ( const Handle< Standard_Transient > &  entfrom,
Handle< Standard_Transient > &  entto,
const Standard_Boolean  mapped,
const Standard_Boolean  errstat 
)
overridevirtual

Copies an Entity by calling the method Transferring from the TransferProcess. If this called produces a Null Binder, then the standard, inherited Copy is called.

Reimplemented from Interface_CopyTool.

◆ TransientProcess()

Handle< Transfer_TransientProcess > Transfer_TransferDispatch::TransientProcess ( ) const

Returns the content of Control Object, as a TransientProcess.


The documentation for this class was generated from the following file: