Open CASCADE Technology 7.8.0
Public Member Functions | Protected Member Functions
Transfer_Binder Class Referenceabstract

A Binder is an auxiliary object to Map the Result of the Transfer of a given Object : it records the Result of the Unitary Transfer (Resulting Object), status of progress and error (if any) of the Process. More...

#include <Transfer_Binder.hxx>

Inheritance diagram for Transfer_Binder:
Inheritance graph
[legend]

Public Member Functions

void Merge (const Handle< Transfer_Binder > &other)
 Merges basic data (Check, ExecStatus) from another Binder but keeps its result. Used when a binder is replaced by another one, this allows to keep messages.
 
virtual Standard_Boolean IsMultiple () const
 Returns True if a Binder has several results, either by itself or because it has next results Can be defined by sub-classes.
 
virtual Handle< Standard_TypeResultType () const =0
 Returns the Type which characterizes the Result (if known)
 
virtual Standard_CString ResultTypeName () const =0
 Returns the Name of the Type which characterizes the Result Can be returned even if ResultType itself is unknown.
 
void AddResult (const Handle< Transfer_Binder > &next)
 Adds a next result (at the end of the list) Remark : this information is not processed by Merge.
 
Handle< Transfer_BinderNextResult () const
 Returns the next result, Null if none.
 
Standard_Boolean HasResult () const
 Returns True if a Result is available (StatusResult = Defined) A Unique Result will be gotten by Result (which must be defined in each sub-class according to result type) For a Multiple Result, see class MultipleBinder For other case, specific access has to be forecast.
 
void SetAlreadyUsed ()
 Declares that result is now used by another one, it means that it cannot be modified (by Rebind)
 
Transfer_StatusResult Status () const
 Returns status, which can be Initial (not yet done), Made (a result is recorded, not yet shared), Used (it is shared and cannot be modified)
 
Transfer_StatusExec StatusExec () const
 Returns execution status.
 
void SetStatusExec (const Transfer_StatusExec stat)
 Modifies execution status; called by TransferProcess only (for StatusError, rather use SetError, below)
 
void AddFail (const Standard_CString mess, const Standard_CString orig="")
 Used to declare an individual transfer as being erroneous (Status is set to Void, StatusExec is set to Error, <errmess> is added to Check's list of Fails) It is possible to record several messages of error.
 
void AddWarning (const Standard_CString mess, const Standard_CString orig="")
 Used to attach a Warning Message to an individual Transfer It has no effect on the Status.
 
const Handle< Interface_CheckCheck () const
 Returns Check which stores Fail messages Note that no Entity is associated in this Check.
 
Handle< Interface_CheckCCheck ()
 Returns Check which stores Fail messages, in order to modify it (adding messages, or replacing it)
 
 ~Transfer_Binder ()
 Destructor.
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor.
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing.
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter.
 
virtual ~Standard_Transient ()
 Destructor must be virtual.
 
virtual const opencascade::handle< Standard_Type > & DynamicType () const
 Returns a type descriptor about this object.
 
Standard_Boolean IsInstance (const opencascade::handle< Standard_Type > &theType) const
 Returns a true value if this is an instance of Type.
 
Standard_Boolean IsInstance (const Standard_CString theTypeName) const
 Returns a true value if this is an instance of TypeName.
 
Standard_Boolean IsKind (const opencascade::handle< Standard_Type > &theType) const
 Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism.
 
Standard_Boolean IsKind (const Standard_CString theTypeName) const
 Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism.
 
Standard_TransientThis () const
 Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero.
 
Standard_Integer GetRefCount () const noexcept
 Get the reference counter of this object.
 
void IncrementRefCounter () noexcept
 Increments the reference counter of this object.
 
Standard_Integer DecrementRefCounter () noexcept
 Decrements the reference counter of this object; returns the decremented value.
 
virtual void Delete () const
 Memory deallocator for transient classes.
 

Protected Member Functions

 Transfer_Binder ()
 Sets fields at initial values.
 
void SetResultPresent ()
 Used to declare that a result is recorded for an individual transfer (works by setting StatusResult to Defined)
 

Additional Inherited Members

- Public Types inherited from Standard_Transient
typedef void base_type
 Returns a type descriptor about this object.
 
- Static Public Member Functions inherited from Standard_Transient
static constexpr const charget_type_name ()
 Returns a type descriptor about this object.
 
static const opencascade::handle< Standard_Type > & get_type_descriptor ()
 Returns type descriptor of Standard_Transient class.
 

Detailed Description

A Binder is an auxiliary object to Map the Result of the Transfer of a given Object : it records the Result of the Unitary Transfer (Resulting Object), status of progress and error (if any) of the Process.

The class Binder itself makes no definition for the Result : it is defined by sub-classes : it can be either Simple (and has to be typed : see generic class SimpleBinder) or Multiple (see class MultipleBinder).

In principle, for a Transfer in progress, Result cannot be accessed : this would cause an exception raising. This is controlled by the value if StatusResult : if it is "Used", the Result cannot be changed. This status is normally controlled by TransferProcess but can be directly (see method SetAlreadyUsed)

Checks can be completed by a record of cases, as string which can be used as codes, but not to be printed

In addition to the Result, a Binder can bring a list of Attributes, which are additional data, each of them has a name

Constructor & Destructor Documentation

◆ ~Transfer_Binder()

Transfer_Binder::~Transfer_Binder ( )

Destructor.

◆ Transfer_Binder()

Transfer_Binder::Transfer_Binder ( )
protected

Sets fields at initial values.

Member Function Documentation

◆ AddFail()

void Transfer_Binder::AddFail ( const Standard_CString  mess,
const Standard_CString  orig = "" 
)

Used to declare an individual transfer as being erroneous (Status is set to Void, StatusExec is set to Error, <errmess> is added to Check's list of Fails) It is possible to record several messages of error.

It has same effect for TransferProcess as raising an exception during the operation of Transfer, except the Transfer tries to continue (as if ErrorHandle had been set)

◆ AddResult()

void Transfer_Binder::AddResult ( const Handle< Transfer_Binder > &  next)

Adds a next result (at the end of the list) Remark : this information is not processed by Merge.

◆ AddWarning()

void Transfer_Binder::AddWarning ( const Standard_CString  mess,
const Standard_CString  orig = "" 
)

Used to attach a Warning Message to an individual Transfer It has no effect on the Status.

◆ CCheck()

Handle< Interface_Check > Transfer_Binder::CCheck ( )

Returns Check which stores Fail messages, in order to modify it (adding messages, or replacing it)

◆ Check()

const Handle< Interface_Check > Transfer_Binder::Check ( ) const

Returns Check which stores Fail messages Note that no Entity is associated in this Check.

◆ HasResult()

Standard_Boolean Transfer_Binder::HasResult ( ) const

Returns True if a Result is available (StatusResult = Defined) A Unique Result will be gotten by Result (which must be defined in each sub-class according to result type) For a Multiple Result, see class MultipleBinder For other case, specific access has to be forecast.

◆ IsMultiple()

virtual Standard_Boolean Transfer_Binder::IsMultiple ( ) const
virtual

Returns True if a Binder has several results, either by itself or because it has next results Can be defined by sub-classes.

Reimplemented in Transfer_MultipleBinder, Transfer_TransientListBinder, and TransferBRep_ShapeListBinder.

◆ Merge()

void Transfer_Binder::Merge ( const Handle< Transfer_Binder > &  other)

Merges basic data (Check, ExecStatus) from another Binder but keeps its result. Used when a binder is replaced by another one, this allows to keep messages.

◆ NextResult()

Handle< Transfer_Binder > Transfer_Binder::NextResult ( ) const

Returns the next result, Null if none.

◆ ResultType()

virtual Handle< Standard_Type > Transfer_Binder::ResultType ( ) const
pure virtual

◆ ResultTypeName()

virtual Standard_CString Transfer_Binder::ResultTypeName ( ) const
pure virtual

Returns the Name of the Type which characterizes the Result Can be returned even if ResultType itself is unknown.

Implemented in Transfer_MultipleBinder, Transfer_SimpleBinderOfTransient, Transfer_TransientListBinder, Transfer_VoidBinder, TransferBRep_BinderOfShape, and TransferBRep_ShapeListBinder.

◆ SetAlreadyUsed()

void Transfer_Binder::SetAlreadyUsed ( )

Declares that result is now used by another one, it means that it cannot be modified (by Rebind)

◆ SetResultPresent()

void Transfer_Binder::SetResultPresent ( )
protected

Used to declare that a result is recorded for an individual transfer (works by setting StatusResult to Defined)

This Method is to be called once a Result is really recorded (see sub-classes of Binder, especially SimpleBinder) : it is senseless if called isolately

◆ SetStatusExec()

void Transfer_Binder::SetStatusExec ( const Transfer_StatusExec  stat)

Modifies execution status; called by TransferProcess only (for StatusError, rather use SetError, below)

◆ Status()

Transfer_StatusResult Transfer_Binder::Status ( ) const

Returns status, which can be Initial (not yet done), Made (a result is recorded, not yet shared), Used (it is shared and cannot be modified)

◆ StatusExec()

Transfer_StatusExec Transfer_Binder::StatusExec ( ) const

Returns execution status.


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