mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-24 13:50:49 +03:00
0024002: Overall code and build procedure refactoring -- automatic
Automatic upgrade of OCCT code by command "occt_upgrade . -nocdl": - WOK-generated header files from inc and sources from drv are moved to src - CDL files removed - All packages are converted to nocdlpack
This commit is contained in:
@@ -1,4 +1,79 @@
|
||||
Transfer_SequenceOfFinder.hxx
|
||||
Transfer_HSequenceOfFinder.hxx
|
||||
Transfer_SequenceOfBinder.hxx
|
||||
Transfer_Actor.gxx
|
||||
Transfer_ActorDispatch.cxx
|
||||
Transfer_ActorDispatch.hxx
|
||||
Transfer_ActorOfFinderProcess.cxx
|
||||
Transfer_ActorOfFinderProcess.hxx
|
||||
Transfer_ActorOfProcessForFinder.hxx
|
||||
Transfer_ActorOfProcessForFinder_0.cxx
|
||||
Transfer_ActorOfProcessForTransient.hxx
|
||||
Transfer_ActorOfProcessForTransient_0.cxx
|
||||
Transfer_ActorOfTransientProcess.cxx
|
||||
Transfer_ActorOfTransientProcess.hxx
|
||||
Transfer_Binder.cxx
|
||||
Transfer_Binder.hxx
|
||||
Transfer_BinderOfTransientInteger.cxx
|
||||
Transfer_BinderOfTransientInteger.hxx
|
||||
Transfer_DataInfo.cxx
|
||||
Transfer_DataInfo.hxx
|
||||
Transfer_DispatchControl.cxx
|
||||
Transfer_DispatchControl.hxx
|
||||
Transfer_Finder.cxx
|
||||
Transfer_Finder.hxx
|
||||
Transfer_FinderProcess.cxx
|
||||
Transfer_FinderProcess.hxx
|
||||
Transfer_FindHasher.cxx
|
||||
Transfer_FindHasher.hxx
|
||||
Transfer_HSequenceOfBinder.hxx
|
||||
Transfer_HSequenceOfFinder.hxx
|
||||
Transfer_IndexedDataMapNodeOfTransferMapOfProcessForFinder.hxx
|
||||
Transfer_IndexedDataMapNodeOfTransferMapOfProcessForFinder_0.cxx
|
||||
Transfer_IndexedDataMapNodeOfTransferMapOfProcessForTransient.hxx
|
||||
Transfer_IndexedDataMapNodeOfTransferMapOfProcessForTransient_0.cxx
|
||||
Transfer_Iterator.gxx
|
||||
Transfer_IteratorOfProcessForFinder.hxx
|
||||
Transfer_IteratorOfProcessForFinder_0.cxx
|
||||
Transfer_IteratorOfProcessForTransient.hxx
|
||||
Transfer_IteratorOfProcessForTransient_0.cxx
|
||||
Transfer_MapContainer.cxx
|
||||
Transfer_MapContainer.hxx
|
||||
Transfer_Mapper.gxx
|
||||
Transfer_MultipleBinder.cxx
|
||||
Transfer_MultipleBinder.hxx
|
||||
Transfer_ProcessForFinder.hxx
|
||||
Transfer_ProcessForFinder_0.cxx
|
||||
Transfer_ProcessForTransient.hxx
|
||||
Transfer_ProcessForTransient_0.cxx
|
||||
Transfer_ResultFromModel.cxx
|
||||
Transfer_ResultFromModel.hxx
|
||||
Transfer_ResultFromTransient.cxx
|
||||
Transfer_ResultFromTransient.hxx
|
||||
Transfer_SequenceOfBinder.hxx
|
||||
Transfer_SequenceOfFinder.hxx
|
||||
Transfer_SimpleBinderOfTransient.cxx
|
||||
Transfer_SimpleBinderOfTransient.hxx
|
||||
Transfer_StatusExec.hxx
|
||||
Transfer_StatusResult.hxx
|
||||
Transfer_TransferDeadLoop.hxx
|
||||
Transfer_TransferDispatch.cxx
|
||||
Transfer_TransferDispatch.hxx
|
||||
Transfer_TransferFailure.hxx
|
||||
Transfer_TransferInput.cxx
|
||||
Transfer_TransferInput.hxx
|
||||
Transfer_TransferIterator.cxx
|
||||
Transfer_TransferIterator.hxx
|
||||
Transfer_TransferMapOfProcessForFinder.hxx
|
||||
Transfer_TransferMapOfProcessForFinder_0.cxx
|
||||
Transfer_TransferMapOfProcessForTransient.hxx
|
||||
Transfer_TransferMapOfProcessForTransient_0.cxx
|
||||
Transfer_TransferOutput.cxx
|
||||
Transfer_TransferOutput.hxx
|
||||
Transfer_TransferProcess.gxx
|
||||
Transfer_TransientListBinder.cxx
|
||||
Transfer_TransientListBinder.hxx
|
||||
Transfer_TransientMapper.hxx
|
||||
Transfer_TransientMapper_0.cxx
|
||||
Transfer_TransientProcess.cxx
|
||||
Transfer_TransientProcess.hxx
|
||||
Transfer_UndefMode.hxx
|
||||
Transfer_VoidBinder.cxx
|
||||
Transfer_VoidBinder.hxx
|
||||
|
@@ -1,101 +0,0 @@
|
||||
-- Created on: 1992-02-03
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1992-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
package Transfer
|
||||
|
||||
---Purpose : Defines general Transfer engine, which provides tools and
|
||||
-- workframe for all kinds of file (non-direct) Interfaces.
|
||||
-- Works on the basis of data provided by package Interface
|
||||
-- (especially InterfaceModel).
|
||||
|
||||
uses TCollection, TColStd, MMgt, Standard, Dico, MoniTool, Interface, Message
|
||||
|
||||
is
|
||||
|
||||
class DataInfo; -- used in Mapper
|
||||
|
||||
deferred class Finder;
|
||||
generic class Mapper;
|
||||
class TransientMapper instantiates Mapper
|
||||
(Transient, MapTransientHasher from TColStd, DataInfo);
|
||||
class FindHasher;
|
||||
|
||||
deferred class Binder;
|
||||
class VoidBinder;
|
||||
class SimpleBinderOfTransient;
|
||||
class BinderOfTransientInteger;
|
||||
class TransientListBinder;
|
||||
class MultipleBinder;
|
||||
|
||||
class ResultFromTransient;
|
||||
class ResultFromModel;
|
||||
|
||||
class TransferIterator;
|
||||
generic class TransferProcess;
|
||||
generic class TransferMap;
|
||||
generic class Iterator;
|
||||
generic class Actor;
|
||||
|
||||
class ProcessForTransient instantiates TransferProcess
|
||||
(Transient, MapTransientHasher from TColStd,
|
||||
HSequenceOfTransient from TColStd);
|
||||
---Purpose : Manages Transfer of Transient Objects. Produces also
|
||||
-- ActorOfTransientProcess (deferred class),
|
||||
-- IteratorOfTransientProcess (for Results),
|
||||
-- TransferMapOfTransientProcess (internally used)
|
||||
-- Normally uses as TransientProcess, which adds some specifics
|
||||
|
||||
class TransientProcess; -- inherits TransferForTransient
|
||||
class ActorOfTransientProcess;
|
||||
|
||||
imported SequenceOfFinder;
|
||||
imported transient class HSequenceOfFinder;
|
||||
|
||||
class ProcessForFinder instantiates TransferProcess
|
||||
(Finder, FindHasher, HSequenceOfFinder);
|
||||
|
||||
class FinderProcess;
|
||||
class ActorOfFinderProcess;
|
||||
|
||||
class TransferOutput;
|
||||
class TransferInput;
|
||||
|
||||
class DispatchControl;
|
||||
class TransferDispatch;
|
||||
class ActorDispatch;
|
||||
|
||||
class MapContainer;
|
||||
|
||||
imported SequenceOfBinder;
|
||||
imported transient class HSequenceOfBinder;
|
||||
|
||||
enumeration StatusResult is StatusVoid, StatusDefined, StatusUsed;
|
||||
---Purpose : result status of transferring an entity (see Transcriptor)
|
||||
|
||||
enumeration StatusExec is
|
||||
StatusInitial, StatusRun, StatusDone, StatusError,StatusLoop;
|
||||
---Purpose : execution status of an individual transfer (see Transcriptor)
|
||||
|
||||
enumeration UndefMode is
|
||||
UndefIgnore, UndefFailure, UndefContent, UndefUser;
|
||||
---Purpose : used on processing Undefined Entities (see TransferOutput)
|
||||
|
||||
-- -- Exceptions -- --
|
||||
|
||||
exception TransferFailure inherits InterfaceError from Interface;
|
||||
exception TransferDeadLoop inherits TransferFailure from Transfer;
|
||||
|
||||
end Transfer;
|
@@ -1,73 +0,0 @@
|
||||
-- Created on: 1994-05-24
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1994-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class ActorDispatch from Transfer inherits ActorOfTransientProcess
|
||||
|
||||
---Purpose : This class allows to work with a TransferDispatch, i.e. to
|
||||
-- transfer entities from a data set to another one defined by
|
||||
-- the same interface norm, with the following features :
|
||||
-- - ActorDispatch itself acts as a default actor, i.e. it copies
|
||||
-- entities with the general service Copy, as CopyTool does
|
||||
-- - it allows to add other actors for specific ways of transfer,
|
||||
-- which may include data modifications, conversions ...
|
||||
-- - and other features from TransferDispatch (such as mapping
|
||||
-- other than one-one)
|
||||
|
||||
uses Transient, InterfaceModel, GeneralLib, Protocol from Interface,
|
||||
TransferDispatch, TransientProcess, Binder
|
||||
|
||||
raises InterfaceError
|
||||
|
||||
is
|
||||
|
||||
Create (amodel : InterfaceModel; lib : GeneralLib)
|
||||
returns ActorDispatch;
|
||||
---Purpose : Creates an ActorDispatch from a Model. Works with a General
|
||||
-- Service Library, given as an Argument
|
||||
-- This causes TransferDispatch and its TransientProcess to be
|
||||
-- created, with default actor <me>
|
||||
|
||||
Create (amodel : InterfaceModel; protocol : Protocol from Interface)
|
||||
returns ActorDispatch;
|
||||
---Purpose : Same as above, but Library is defined through a Protocol
|
||||
|
||||
Create (amodel : InterfaceModel) returns ActorDispatch
|
||||
---Purpose : Same as above, but works with the Active Protocol
|
||||
raises InterfaceError;
|
||||
-- Error if no Active Protocol is defined
|
||||
|
||||
AddActor (me : mutable; actor : ActorOfTransientProcess from Transfer);
|
||||
---Purpose : Utility which adds an actor to the default <me> (it calls
|
||||
-- SetActor from the TransientProcess)
|
||||
|
||||
TransferDispatch (me : mutable) returns TransferDispatch;
|
||||
---Purpose : Returns the TransferDispatch, which does the work, records
|
||||
-- the intermediate data, etc...
|
||||
-- See TransferDispatch & CopyTool, to see the available methods
|
||||
---C++ : return &
|
||||
|
||||
|
||||
Transfer (me : mutable; start : Transient; TP : TransientProcess)
|
||||
returns Binder is redefined;
|
||||
---Purpose : Specific action : it calls the method Transfer from CopyTool
|
||||
-- i.e. the general service Copy, then returns the Binder
|
||||
-- produced by the TransientProcess
|
||||
|
||||
fields
|
||||
|
||||
thetool : TransferDispatch;
|
||||
|
||||
end ActorDispatch;
|
@@ -11,9 +11,18 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Transfer_ActorDispatch.ixx>
|
||||
#include <Transfer_TransientProcess.hxx>
|
||||
|
||||
#include <Interface_GeneralLib.hxx>
|
||||
#include <Interface_InterfaceError.hxx>
|
||||
#include <Interface_InterfaceModel.hxx>
|
||||
#include <Interface_Protocol.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <Transfer_ActorDispatch.hxx>
|
||||
#include <Transfer_ActorOfTransientProcess.hxx>
|
||||
#include <Transfer_Binder.hxx>
|
||||
#include <Transfer_TransferDispatch.hxx>
|
||||
#include <Transfer_TransientProcess.hxx>
|
||||
|
||||
Transfer_ActorDispatch::Transfer_ActorDispatch
|
||||
(const Handle(Interface_InterfaceModel)& amodel,
|
||||
|
104
src/Transfer/Transfer_ActorDispatch.hxx
Normal file
104
src/Transfer/Transfer_ActorDispatch.hxx
Normal file
@@ -0,0 +1,104 @@
|
||||
// Created on: 1994-05-24
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1994-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Transfer_ActorDispatch_HeaderFile
|
||||
#define _Transfer_ActorDispatch_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Transfer_TransferDispatch.hxx>
|
||||
#include <Transfer_ActorOfTransientProcess.hxx>
|
||||
class Interface_InterfaceError;
|
||||
class Interface_InterfaceModel;
|
||||
class Interface_GeneralLib;
|
||||
class Interface_Protocol;
|
||||
class Transfer_ActorOfTransientProcess;
|
||||
class Transfer_TransferDispatch;
|
||||
class Transfer_Binder;
|
||||
class Standard_Transient;
|
||||
class Transfer_TransientProcess;
|
||||
|
||||
|
||||
class Transfer_ActorDispatch;
|
||||
DEFINE_STANDARD_HANDLE(Transfer_ActorDispatch, Transfer_ActorOfTransientProcess)
|
||||
|
||||
//! This class allows to work with a TransferDispatch, i.e. to
|
||||
//! transfer entities from a data set to another one defined by
|
||||
//! the same interface norm, with the following features :
|
||||
//! - ActorDispatch itself acts as a default actor, i.e. it copies
|
||||
//! entities with the general service Copy, as CopyTool does
|
||||
//! - it allows to add other actors for specific ways of transfer,
|
||||
//! which may include data modifications, conversions ...
|
||||
//! - and other features from TransferDispatch (such as mapping
|
||||
//! other than one-one)
|
||||
class Transfer_ActorDispatch : public Transfer_ActorOfTransientProcess
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Creates an ActorDispatch from a Model. Works with a General
|
||||
//! Service Library, given as an Argument
|
||||
//! This causes TransferDispatch and its TransientProcess to be
|
||||
//! created, with default actor <me>
|
||||
Standard_EXPORT Transfer_ActorDispatch(const Handle(Interface_InterfaceModel)& amodel, const Interface_GeneralLib& lib);
|
||||
|
||||
//! Same as above, but Library is defined through a Protocol
|
||||
Standard_EXPORT Transfer_ActorDispatch(const Handle(Interface_InterfaceModel)& amodel, const Handle(Interface_Protocol)& protocol);
|
||||
|
||||
//! Same as above, but works with the Active Protocol
|
||||
Standard_EXPORT Transfer_ActorDispatch(const Handle(Interface_InterfaceModel)& amodel);
|
||||
|
||||
//! Utility which adds an actor to the default <me> (it calls
|
||||
//! SetActor from the TransientProcess)
|
||||
Standard_EXPORT void AddActor (const Handle(Transfer_ActorOfTransientProcess)& actor);
|
||||
|
||||
//! Returns the TransferDispatch, which does the work, records
|
||||
//! the intermediate data, etc...
|
||||
//! See TransferDispatch & CopyTool, to see the available methods
|
||||
Standard_EXPORT Transfer_TransferDispatch& TransferDispatch();
|
||||
|
||||
//! Specific action : it calls the method Transfer from CopyTool
|
||||
//! i.e. the general service Copy, then returns the Binder
|
||||
//! produced by the TransientProcess
|
||||
Standard_EXPORT virtual Handle(Transfer_Binder) Transfer (const Handle(Standard_Transient)& start, const Handle(Transfer_TransientProcess)& TP) Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(Transfer_ActorDispatch,Transfer_ActorOfTransientProcess)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Transfer_TransferDispatch thetool;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Transfer_ActorDispatch_HeaderFile
|
@@ -1,54 +0,0 @@
|
||||
-- Created on: 1996-09-04
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1996-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class ActorOfFinderProcess from Transfer inherits ActorOfProcessForFinder
|
||||
|
||||
---Purpose : The original class was renamed. Compatibility only
|
||||
--
|
||||
-- ModeTrans : a simple way of transmitting a transfer mode from
|
||||
-- a user. To be interpreted for each norm
|
||||
|
||||
uses Finder, FinderProcess, ProcessForFinder, Binder
|
||||
|
||||
is
|
||||
|
||||
Create returns ActorOfFinderProcess;
|
||||
|
||||
ModeTrans (me : mutable) returns Integer;
|
||||
---Purpose : Returns the Transfer Mode, modifiable
|
||||
---C++ : return &
|
||||
|
||||
Transferring (me : mutable; start : Finder; TP : ProcessForFinder)
|
||||
returns Binder is redefined;
|
||||
-- calls the one below
|
||||
|
||||
Transfer (me : mutable; start : Finder; TP : FinderProcess)
|
||||
returns Binder is virtual;
|
||||
-- default calls TransferTransient if <start> is a TransientMapper,
|
||||
-- i.e. does nothing, to be redefined
|
||||
|
||||
TransferTransient (me : mutable; start : Transient;
|
||||
TP : FinderProcess)
|
||||
returns Transient is virtual;
|
||||
-- default does nothing, can be redefined
|
||||
-- usefull when a result is Transient, simpler to define than Transfer with
|
||||
-- a Finder
|
||||
|
||||
fields
|
||||
|
||||
themodetrans : Integer is protected;
|
||||
|
||||
end ActorOfFinderProcess;
|
@@ -11,10 +11,16 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Transfer_ActorOfFinderProcess.ixx>
|
||||
#include <Transfer_TransientMapper.hxx>
|
||||
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <Transfer_ActorOfFinderProcess.hxx>
|
||||
#include <Transfer_Binder.hxx>
|
||||
#include <Transfer_Finder.hxx>
|
||||
#include <Transfer_FinderProcess.hxx>
|
||||
#include <Transfer_ProcessForFinder.hxx>
|
||||
#include <Transfer_SimpleBinderOfTransient.hxx>
|
||||
#include <Transfer_TransientMapper.hxx>
|
||||
|
||||
Transfer_ActorOfFinderProcess::Transfer_ActorOfFinderProcess () { themodetrans = 0; }
|
||||
|
||||
|
80
src/Transfer/Transfer_ActorOfFinderProcess.hxx
Normal file
80
src/Transfer/Transfer_ActorOfFinderProcess.hxx
Normal file
@@ -0,0 +1,80 @@
|
||||
// Created on: 1996-09-04
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1996-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Transfer_ActorOfFinderProcess_HeaderFile
|
||||
#define _Transfer_ActorOfFinderProcess_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Transfer_ActorOfProcessForFinder.hxx>
|
||||
class Transfer_Binder;
|
||||
class Transfer_Finder;
|
||||
class Transfer_ProcessForFinder;
|
||||
class Transfer_FinderProcess;
|
||||
class Standard_Transient;
|
||||
|
||||
|
||||
class Transfer_ActorOfFinderProcess;
|
||||
DEFINE_STANDARD_HANDLE(Transfer_ActorOfFinderProcess, Transfer_ActorOfProcessForFinder)
|
||||
|
||||
//! The original class was renamed. Compatibility only
|
||||
//!
|
||||
//! ModeTrans : a simple way of transmitting a transfer mode from
|
||||
//! a user. To be interpreted for each norm
|
||||
class Transfer_ActorOfFinderProcess : public Transfer_ActorOfProcessForFinder
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT Transfer_ActorOfFinderProcess();
|
||||
|
||||
//! Returns the Transfer Mode, modifiable
|
||||
Standard_EXPORT Standard_Integer& ModeTrans();
|
||||
|
||||
Standard_EXPORT virtual Handle(Transfer_Binder) Transferring (const Handle(Transfer_Finder)& start, const Handle(Transfer_ProcessForFinder)& TP) Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual Handle(Transfer_Binder) Transfer (const Handle(Transfer_Finder)& start, const Handle(Transfer_FinderProcess)& TP);
|
||||
|
||||
Standard_EXPORT virtual Handle(Standard_Transient) TransferTransient (const Handle(Standard_Transient)& start, const Handle(Transfer_FinderProcess)& TP);
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(Transfer_ActorOfFinderProcess,Transfer_ActorOfProcessForFinder)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
Standard_Integer themodetrans;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Transfer_ActorOfFinderProcess_HeaderFile
|
91
src/Transfer/Transfer_ActorOfProcessForFinder.hxx
Normal file
91
src/Transfer/Transfer_ActorOfProcessForFinder.hxx
Normal file
@@ -0,0 +1,91 @@
|
||||
// Created on: 1992-02-03
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1992-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Transfer_ActorOfProcessForFinder_HeaderFile
|
||||
#define _Transfer_ActorOfProcessForFinder_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <MMgt_TShared.hxx>
|
||||
#include <Transfer_HSequenceOfFinder.hxx>
|
||||
class Standard_DomainError;
|
||||
class Transfer_Finder;
|
||||
class Transfer_FindHasher;
|
||||
class Transfer_ProcessForFinder;
|
||||
class Transfer_TransferMapOfProcessForFinder;
|
||||
class Transfer_IndexedDataMapNodeOfTransferMapOfProcessForFinder;
|
||||
class Transfer_IteratorOfProcessForFinder;
|
||||
class Transfer_Binder;
|
||||
class Transfer_SimpleBinderOfTransient;
|
||||
class Standard_Transient;
|
||||
|
||||
|
||||
class Transfer_ActorOfProcessForFinder;
|
||||
DEFINE_STANDARD_HANDLE(Transfer_ActorOfProcessForFinder, MMgt_TShared)
|
||||
|
||||
|
||||
class Transfer_ActorOfProcessForFinder : public MMgt_TShared
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT Transfer_ActorOfProcessForFinder();
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean Recognize (const Handle(Transfer_Finder)& start);
|
||||
|
||||
Standard_EXPORT virtual Handle(Transfer_Binder) Transferring (const Handle(Transfer_Finder)& start, const Handle(Transfer_ProcessForFinder)& TP);
|
||||
|
||||
Standard_EXPORT Handle(Transfer_SimpleBinderOfTransient) TransientResult (const Handle(Standard_Transient)& res) const;
|
||||
|
||||
Standard_EXPORT Handle(Transfer_Binder) NullResult() const;
|
||||
|
||||
Standard_EXPORT void SetLast (const Standard_Boolean mode = Standard_True);
|
||||
|
||||
Standard_EXPORT Standard_Boolean IsLast() const;
|
||||
|
||||
Standard_EXPORT void SetNext (const Handle(Transfer_ActorOfProcessForFinder)& next);
|
||||
|
||||
Standard_EXPORT Handle(Transfer_ActorOfProcessForFinder) Next() const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(Transfer_ActorOfProcessForFinder,MMgt_TShared)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Handle(Transfer_ActorOfProcessForFinder) thenext;
|
||||
Standard_Boolean thelast;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Transfer_ActorOfProcessForFinder_HeaderFile
|
66
src/Transfer/Transfer_ActorOfProcessForFinder_0.cxx
Normal file
66
src/Transfer/Transfer_ActorOfProcessForFinder_0.cxx
Normal file
@@ -0,0 +1,66 @@
|
||||
// Created on: 1992-02-03
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1992-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Transfer_ActorOfProcessForFinder.hxx>
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Transfer_ActorOfProcessForFinder.hxx>
|
||||
#include <Standard_DomainError.hxx>
|
||||
#include <Transfer_Finder.hxx>
|
||||
#include <Transfer_FindHasher.hxx>
|
||||
#include <Transfer_ProcessForFinder.hxx>
|
||||
#include <Transfer_TransferMapOfProcessForFinder.hxx>
|
||||
#include <Transfer_IndexedDataMapNodeOfTransferMapOfProcessForFinder.hxx>
|
||||
#include <Transfer_IteratorOfProcessForFinder.hxx>
|
||||
#include <Transfer_Binder.hxx>
|
||||
#include <Transfer_SimpleBinderOfTransient.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define TheStart Handle(Transfer_Finder)
|
||||
#define TheStart_hxx <Transfer_Finder.hxx>
|
||||
#define TheMapHasher Transfer_FindHasher
|
||||
#define TheMapHasher_hxx <Transfer_FindHasher.hxx>
|
||||
#define Handle_TheList Handle(Transfer_HSequenceOfFinder)
|
||||
#define TheList Transfer_HSequenceOfFinder
|
||||
#define TheList_hxx <Transfer_HSequenceOfFinder.hxx>
|
||||
#define Transfer_TransferMap Transfer_TransferMapOfProcessForFinder
|
||||
#define Transfer_TransferMap_hxx <Transfer_TransferMapOfProcessForFinder.hxx>
|
||||
#define Transfer_IndexedDataMapNodeOfTransferMap Transfer_IndexedDataMapNodeOfTransferMapOfProcessForFinder
|
||||
#define Transfer_IndexedDataMapNodeOfTransferMap_hxx <Transfer_IndexedDataMapNodeOfTransferMapOfProcessForFinder.hxx>
|
||||
#define Transfer_IndexedDataMapNodeOfTransferMap Transfer_IndexedDataMapNodeOfTransferMapOfProcessForFinder
|
||||
#define Transfer_IndexedDataMapNodeOfTransferMap_hxx <Transfer_IndexedDataMapNodeOfTransferMapOfProcessForFinder.hxx>
|
||||
#define Transfer_Iterator Transfer_IteratorOfProcessForFinder
|
||||
#define Transfer_Iterator_hxx <Transfer_IteratorOfProcessForFinder.hxx>
|
||||
#define Transfer_Actor Transfer_ActorOfProcessForFinder
|
||||
#define Transfer_Actor_hxx <Transfer_ActorOfProcessForFinder.hxx>
|
||||
#define Handle_Transfer_IndexedDataMapNodeOfTransferMap Handle(Transfer_IndexedDataMapNodeOfTransferMapOfProcessForFinder)
|
||||
#define Handle_Transfer_IndexedDataMapNodeOfTransferMap Handle(Transfer_IndexedDataMapNodeOfTransferMapOfProcessForFinder)
|
||||
#define Handle_Transfer_Actor Handle(Transfer_ActorOfProcessForFinder)
|
||||
#define Transfer_TransferProcess Transfer_ProcessForFinder
|
||||
#define Transfer_TransferProcess_hxx <Transfer_ProcessForFinder.hxx>
|
||||
#define Handle_Transfer_TransferProcess Handle(Transfer_ProcessForFinder)
|
||||
#include <Transfer_Actor.gxx>
|
||||
|
90
src/Transfer/Transfer_ActorOfProcessForTransient.hxx
Normal file
90
src/Transfer/Transfer_ActorOfProcessForTransient.hxx
Normal file
@@ -0,0 +1,90 @@
|
||||
// Created on: 1992-02-03
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1992-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Transfer_ActorOfProcessForTransient_HeaderFile
|
||||
#define _Transfer_ActorOfProcessForTransient_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <MMgt_TShared.hxx>
|
||||
#include <TColStd_MapTransientHasher.hxx>
|
||||
#include <TColStd_HSequenceOfTransient.hxx>
|
||||
class Standard_DomainError;
|
||||
class Standard_Transient;
|
||||
class Transfer_ProcessForTransient;
|
||||
class Transfer_TransferMapOfProcessForTransient;
|
||||
class Transfer_IndexedDataMapNodeOfTransferMapOfProcessForTransient;
|
||||
class Transfer_IteratorOfProcessForTransient;
|
||||
class Transfer_Binder;
|
||||
class Transfer_SimpleBinderOfTransient;
|
||||
|
||||
|
||||
class Transfer_ActorOfProcessForTransient;
|
||||
DEFINE_STANDARD_HANDLE(Transfer_ActorOfProcessForTransient, MMgt_TShared)
|
||||
|
||||
|
||||
class Transfer_ActorOfProcessForTransient : public MMgt_TShared
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT Transfer_ActorOfProcessForTransient();
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean Recognize (const Handle(Standard_Transient)& start);
|
||||
|
||||
Standard_EXPORT virtual Handle(Transfer_Binder) Transferring (const Handle(Standard_Transient)& start, const Handle(Transfer_ProcessForTransient)& TP);
|
||||
|
||||
Standard_EXPORT Handle(Transfer_SimpleBinderOfTransient) TransientResult (const Handle(Standard_Transient)& res) const;
|
||||
|
||||
Standard_EXPORT Handle(Transfer_Binder) NullResult() const;
|
||||
|
||||
Standard_EXPORT void SetLast (const Standard_Boolean mode = Standard_True);
|
||||
|
||||
Standard_EXPORT Standard_Boolean IsLast() const;
|
||||
|
||||
Standard_EXPORT void SetNext (const Handle(Transfer_ActorOfProcessForTransient)& next);
|
||||
|
||||
Standard_EXPORT Handle(Transfer_ActorOfProcessForTransient) Next() const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(Transfer_ActorOfProcessForTransient,MMgt_TShared)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Handle(Transfer_ActorOfProcessForTransient) thenext;
|
||||
Standard_Boolean thelast;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Transfer_ActorOfProcessForTransient_HeaderFile
|
64
src/Transfer/Transfer_ActorOfProcessForTransient_0.cxx
Normal file
64
src/Transfer/Transfer_ActorOfProcessForTransient_0.cxx
Normal file
@@ -0,0 +1,64 @@
|
||||
// Created on: 1992-02-03
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1992-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Transfer_ActorOfProcessForTransient.hxx>
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Transfer_ActorOfProcessForTransient.hxx>
|
||||
#include <Standard_DomainError.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <Transfer_ProcessForTransient.hxx>
|
||||
#include <Transfer_TransferMapOfProcessForTransient.hxx>
|
||||
#include <Transfer_IndexedDataMapNodeOfTransferMapOfProcessForTransient.hxx>
|
||||
#include <Transfer_IteratorOfProcessForTransient.hxx>
|
||||
#include <Transfer_Binder.hxx>
|
||||
#include <Transfer_SimpleBinderOfTransient.hxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define TheStart Handle(Standard_Transient)
|
||||
#define TheStart_hxx <Standard_Transient.hxx>
|
||||
#define TheMapHasher TColStd_MapTransientHasher
|
||||
#define TheMapHasher_hxx <TColStd_MapTransientHasher.hxx>
|
||||
#define Handle_TheList Handle(TColStd_HSequenceOfTransient)
|
||||
#define TheList TColStd_HSequenceOfTransient
|
||||
#define TheList_hxx <TColStd_HSequenceOfTransient.hxx>
|
||||
#define Transfer_TransferMap Transfer_TransferMapOfProcessForTransient
|
||||
#define Transfer_TransferMap_hxx <Transfer_TransferMapOfProcessForTransient.hxx>
|
||||
#define Transfer_IndexedDataMapNodeOfTransferMap Transfer_IndexedDataMapNodeOfTransferMapOfProcessForTransient
|
||||
#define Transfer_IndexedDataMapNodeOfTransferMap_hxx <Transfer_IndexedDataMapNodeOfTransferMapOfProcessForTransient.hxx>
|
||||
#define Transfer_IndexedDataMapNodeOfTransferMap Transfer_IndexedDataMapNodeOfTransferMapOfProcessForTransient
|
||||
#define Transfer_IndexedDataMapNodeOfTransferMap_hxx <Transfer_IndexedDataMapNodeOfTransferMapOfProcessForTransient.hxx>
|
||||
#define Transfer_Iterator Transfer_IteratorOfProcessForTransient
|
||||
#define Transfer_Iterator_hxx <Transfer_IteratorOfProcessForTransient.hxx>
|
||||
#define Transfer_Actor Transfer_ActorOfProcessForTransient
|
||||
#define Transfer_Actor_hxx <Transfer_ActorOfProcessForTransient.hxx>
|
||||
#define Handle_Transfer_IndexedDataMapNodeOfTransferMap Handle(Transfer_IndexedDataMapNodeOfTransferMapOfProcessForTransient)
|
||||
#define Handle_Transfer_IndexedDataMapNodeOfTransferMap Handle(Transfer_IndexedDataMapNodeOfTransferMapOfProcessForTransient)
|
||||
#define Handle_Transfer_Actor Handle(Transfer_ActorOfProcessForTransient)
|
||||
#define Transfer_TransferProcess Transfer_ProcessForTransient
|
||||
#define Transfer_TransferProcess_hxx <Transfer_ProcessForTransient.hxx>
|
||||
#define Handle_Transfer_TransferProcess Handle(Transfer_ProcessForTransient)
|
||||
#include <Transfer_Actor.gxx>
|
||||
|
@@ -1,42 +0,0 @@
|
||||
-- Created on: 1996-09-04
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1996-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class ActorOfTransientProcess from Transfer inherits ActorOfProcessForTransient from Transfer
|
||||
|
||||
---Purpose : The original class was renamed. Compatibility only
|
||||
|
||||
uses Transient, TransientProcess, ProcessForTransient, Binder
|
||||
|
||||
is
|
||||
|
||||
Create returns ActorOfTransientProcess;
|
||||
|
||||
Transferring (me : mutable; start : Transient; TP : ProcessForTransient)
|
||||
returns Binder is redefined;
|
||||
-- calls the one below
|
||||
|
||||
Transfer (me : mutable; start : Transient; TP : TransientProcess)
|
||||
returns Binder is virtual;
|
||||
-- default calls TransferTransient i.e. does nothing, to be redefined
|
||||
|
||||
TransferTransient (me : mutable; start : Transient;
|
||||
TP : TransientProcess)
|
||||
returns Transient is virtual;
|
||||
-- default does nothing, can be redefined
|
||||
-- usefull when a result is Transient, simpler to define than Transfer with
|
||||
-- a Binder
|
||||
|
||||
end ActorOfTransientProcess;
|
@@ -11,9 +11,14 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Transfer_ActorOfTransientProcess.ixx>
|
||||
#include <Transfer_TransientProcess.hxx>
|
||||
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <Transfer_ActorOfTransientProcess.hxx>
|
||||
#include <Transfer_Binder.hxx>
|
||||
#include <Transfer_ProcessForTransient.hxx>
|
||||
#include <Transfer_SimpleBinderOfTransient.hxx>
|
||||
#include <Transfer_TransientProcess.hxx>
|
||||
|
||||
Transfer_ActorOfTransientProcess::Transfer_ActorOfTransientProcess () { }
|
||||
|
||||
|
71
src/Transfer/Transfer_ActorOfTransientProcess.hxx
Normal file
71
src/Transfer/Transfer_ActorOfTransientProcess.hxx
Normal file
@@ -0,0 +1,71 @@
|
||||
// Created on: 1996-09-04
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1996-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Transfer_ActorOfTransientProcess_HeaderFile
|
||||
#define _Transfer_ActorOfTransientProcess_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Transfer_ActorOfProcessForTransient.hxx>
|
||||
class Transfer_Binder;
|
||||
class Standard_Transient;
|
||||
class Transfer_ProcessForTransient;
|
||||
class Transfer_TransientProcess;
|
||||
|
||||
|
||||
class Transfer_ActorOfTransientProcess;
|
||||
DEFINE_STANDARD_HANDLE(Transfer_ActorOfTransientProcess, Transfer_ActorOfProcessForTransient)
|
||||
|
||||
//! The original class was renamed. Compatibility only
|
||||
class Transfer_ActorOfTransientProcess : public Transfer_ActorOfProcessForTransient
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT Transfer_ActorOfTransientProcess();
|
||||
|
||||
Standard_EXPORT virtual Handle(Transfer_Binder) Transferring (const Handle(Standard_Transient)& start, const Handle(Transfer_ProcessForTransient)& TP) Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual Handle(Transfer_Binder) Transfer (const Handle(Standard_Transient)& start, const Handle(Transfer_TransientProcess)& TP);
|
||||
|
||||
Standard_EXPORT virtual Handle(Standard_Transient) TransferTransient (const Handle(Standard_Transient)& start, const Handle(Transfer_TransientProcess)& TP);
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(Transfer_ActorOfTransientProcess,Transfer_ActorOfProcessForTransient)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Transfer_ActorOfTransientProcess_HeaderFile
|
@@ -1,150 +0,0 @@
|
||||
-- Created on: 1993-06-09
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1993-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
deferred class Binder from Transfer inherits TShared
|
||||
|
||||
---Purpose : 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
|
||||
|
||||
uses CString, Type, HArray1OfInteger,
|
||||
HSequenceOfTransient from TColStd, DictionaryOfTransient from Dico,
|
||||
Check, ParamType, StatusResult, StatusExec
|
||||
|
||||
raises TransferFailure
|
||||
|
||||
is
|
||||
|
||||
Initialize;
|
||||
---Purpose : Sets fields at initial values
|
||||
|
||||
Merge (me : mutable; other : Binder);
|
||||
---Purpose : 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
|
||||
|
||||
IsMultiple (me) returns Boolean is virtual;
|
||||
---Purpose : Returns True if a Binder has several results, either by itself
|
||||
-- or because it has next results
|
||||
-- Can be defined by sub-classes.
|
||||
|
||||
ResultType (me) returns Type is deferred;
|
||||
---Purpose : Returns the Type which characterizes the Result (if known)
|
||||
|
||||
ResultTypeName (me) returns CString is deferred;
|
||||
---Purpose : Returns the Name of the Type which characterizes the Result
|
||||
-- Can be returned even if ResultType itself is unknown
|
||||
|
||||
AddResult (me : mutable; next : Binder);
|
||||
---Purpose : Adds a next result (at the end of the list)
|
||||
-- Remark : this information is not processed by Merge
|
||||
|
||||
CutResult (me : mutable; next : Binder) is private;
|
||||
---Purpose : Called by AddResult, to keep unicity of each item in the list
|
||||
|
||||
NextResult (me) returns Binder;
|
||||
---Purpose : Returns the next result, Null if none
|
||||
|
||||
-- -- Mapping management internal services -- --
|
||||
|
||||
SetResultPresent (me : mutable)
|
||||
---Purpose : 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
|
||||
raises TransferFailure is protected;
|
||||
-- Error if Result is already set and used
|
||||
|
||||
HasResult (me) returns Boolean;
|
||||
---Purpose : 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
|
||||
|
||||
SetAlreadyUsed (me : mutable);
|
||||
---Purpose : Declares that result is now used by another one, it means that
|
||||
-- it cannot be modified (by Rebind)
|
||||
|
||||
Status (me) returns StatusResult;
|
||||
---Purpose : 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)
|
||||
|
||||
-- -- Check Management -- --
|
||||
|
||||
StatusExec (me) returns StatusExec;
|
||||
---Purpose : Returns execution status
|
||||
|
||||
SetStatusExec (me : mutable; stat : StatusExec);
|
||||
---Purpose : Modifies execution status; called by TransferProcess only
|
||||
-- (for StatusError, rather use SetError, below)
|
||||
|
||||
AddFail (me : mutable; mess : CString; orig : CString = "");
|
||||
---Purpose : Used to declare an individual transfer as beeing 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)
|
||||
|
||||
AddWarning (me : mutable; mess : CString; orig : CString = "");
|
||||
---Purpose : Used to attach a Warning Message to an individual Transfer
|
||||
-- It has no effect on the Status
|
||||
|
||||
Check (me) returns Check;
|
||||
---Purpose : Returns Check which stores Fail messages
|
||||
-- Note that no Entity is associated in this Check
|
||||
---C++ : return const
|
||||
|
||||
CCheck (me : mutable) returns Check;
|
||||
---Purpose : Returns Check which stores Fail messages, in order to modify
|
||||
-- it (adding messages, or replacing it)
|
||||
|
||||
|
||||
fields
|
||||
|
||||
-- REMEMBER : The Result itself is brought by sub-classes of Binder
|
||||
-- (specific to each kind of Result)
|
||||
thestatus : StatusResult; -- enum : Void, Defined, Used
|
||||
theexecst : StatusExec; -- enum : Initial, Run, Done, Error, Loop
|
||||
thecheck : Check;
|
||||
thenextr : Binder;
|
||||
|
||||
end Binder;
|
@@ -11,20 +11,20 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Transfer_Binder.ixx>
|
||||
#include <Transfer_VoidBinder.hxx>
|
||||
#include <Transfer_TransferFailure.hxx>
|
||||
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
#include <Interface_IntVal.hxx>
|
||||
#include <Geom2d_CartesianPoint.hxx>
|
||||
|
||||
#include <Interface_Check.hxx>
|
||||
#include <Interface_IntVal.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
#include <Transfer_Binder.hxx>
|
||||
#include <Transfer_TransferFailure.hxx>
|
||||
#include <Transfer_VoidBinder.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : Transfer_Binder
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Transfer_Binder::Transfer_Binder ()
|
||||
{
|
||||
thestatus = Transfer_StatusVoid;
|
||||
|
174
src/Transfer/Transfer_Binder.hxx
Normal file
174
src/Transfer/Transfer_Binder.hxx
Normal file
@@ -0,0 +1,174 @@
|
||||
// Created on: 1993-06-09
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1993-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Transfer_Binder_HeaderFile
|
||||
#define _Transfer_Binder_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Transfer_StatusResult.hxx>
|
||||
#include <Transfer_StatusExec.hxx>
|
||||
#include <MMgt_TShared.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
class Interface_Check;
|
||||
class Transfer_TransferFailure;
|
||||
|
||||
|
||||
class Transfer_Binder;
|
||||
DEFINE_STANDARD_HANDLE(Transfer_Binder, MMgt_TShared)
|
||||
|
||||
//! 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
|
||||
class Transfer_Binder : public MMgt_TShared
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! 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
|
||||
Standard_EXPORT void Merge (const Handle(Transfer_Binder)& other);
|
||||
|
||||
//! Returns True if a Binder has several results, either by itself
|
||||
//! or because it has next results
|
||||
//! Can be defined by sub-classes.
|
||||
Standard_EXPORT virtual Standard_Boolean IsMultiple() const;
|
||||
|
||||
//! Returns the Type which characterizes the Result (if known)
|
||||
Standard_EXPORT virtual Handle(Standard_Type) ResultType() const = 0;
|
||||
|
||||
//! Returns the Name of the Type which characterizes the Result
|
||||
//! Can be returned even if ResultType itself is unknown
|
||||
Standard_EXPORT virtual Standard_CString ResultTypeName() const = 0;
|
||||
|
||||
//! Adds a next result (at the end of the list)
|
||||
//! Remark : this information is not processed by Merge
|
||||
Standard_EXPORT void AddResult (const Handle(Transfer_Binder)& next);
|
||||
|
||||
//! Returns the next result, Null if none
|
||||
Standard_EXPORT Handle(Transfer_Binder) NextResult() 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
|
||||
Standard_EXPORT Standard_Boolean HasResult() const;
|
||||
|
||||
//! Declares that result is now used by another one, it means that
|
||||
//! it cannot be modified (by Rebind)
|
||||
Standard_EXPORT void SetAlreadyUsed();
|
||||
|
||||
//! 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)
|
||||
Standard_EXPORT Transfer_StatusResult Status() const;
|
||||
|
||||
//! Returns execution status
|
||||
Standard_EXPORT Transfer_StatusExec StatusExec() const;
|
||||
|
||||
//! Modifies execution status; called by TransferProcess only
|
||||
//! (for StatusError, rather use SetError, below)
|
||||
Standard_EXPORT void SetStatusExec (const Transfer_StatusExec stat);
|
||||
|
||||
//! Used to declare an individual transfer as beeing 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)
|
||||
Standard_EXPORT void AddFail (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
|
||||
Standard_EXPORT void AddWarning (const Standard_CString mess, const Standard_CString orig = "");
|
||||
|
||||
//! Returns Check which stores Fail messages
|
||||
//! Note that no Entity is associated in this Check
|
||||
Standard_EXPORT const Handle(Interface_Check) Check() const;
|
||||
|
||||
//! Returns Check which stores Fail messages, in order to modify
|
||||
//! it (adding messages, or replacing it)
|
||||
Standard_EXPORT Handle(Interface_Check) CCheck();
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(Transfer_Binder,MMgt_TShared)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
//! Sets fields at initial values
|
||||
Standard_EXPORT Transfer_Binder();
|
||||
|
||||
//! 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
|
||||
Standard_EXPORT void SetResultPresent();
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
//! Called by AddResult, to keep unicity of each item in the list
|
||||
Standard_EXPORT void CutResult (const Handle(Transfer_Binder)& next);
|
||||
|
||||
Transfer_StatusResult thestatus;
|
||||
Transfer_StatusExec theexecst;
|
||||
Handle(Interface_Check) thecheck;
|
||||
Handle(Transfer_Binder) thenextr;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Transfer_Binder_HeaderFile
|
@@ -1,44 +0,0 @@
|
||||
-- Created on: 1995-02-27
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1995-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class BinderOfTransientInteger from Transfer inherits SimpleBinderOfTransient
|
||||
|
||||
---Purpose : This type of Binder allows to attach as result, besides a
|
||||
-- Transient Object, an Integer Value, which can be an Index
|
||||
-- in the Object if it defines a List, for instance
|
||||
--
|
||||
-- This Binder is otherwise a kind of SimpleBinderOfTransient,
|
||||
-- i.e. its basic result (for iterators, etc) is the Transient
|
||||
|
||||
uses Integer
|
||||
|
||||
is
|
||||
|
||||
Create returns BinderOfTransientInteger;
|
||||
---Purpose : Creates an empty BinderOfTransientInteger; Default value for
|
||||
-- the integer part is zero
|
||||
|
||||
SetInteger (me : mutable; value : Integer);
|
||||
---Purpose : Sets a value for the integer part
|
||||
|
||||
Integer (me) returns Integer;
|
||||
---Purpose : Returns the value set for the integer part
|
||||
|
||||
fields
|
||||
|
||||
theintval : Integer;
|
||||
|
||||
end BinderOfTransientInteger;
|
@@ -11,7 +11,9 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Transfer_BinderOfTransientInteger.ixx>
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
#include <Transfer_BinderOfTransientInteger.hxx>
|
||||
|
||||
Transfer_BinderOfTransientInteger::Transfer_BinderOfTransientInteger ()
|
||||
: theintval (0) { }
|
||||
|
76
src/Transfer/Transfer_BinderOfTransientInteger.hxx
Normal file
76
src/Transfer/Transfer_BinderOfTransientInteger.hxx
Normal file
@@ -0,0 +1,76 @@
|
||||
// Created on: 1995-02-27
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1995-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Transfer_BinderOfTransientInteger_HeaderFile
|
||||
#define _Transfer_BinderOfTransientInteger_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Transfer_SimpleBinderOfTransient.hxx>
|
||||
|
||||
|
||||
class Transfer_BinderOfTransientInteger;
|
||||
DEFINE_STANDARD_HANDLE(Transfer_BinderOfTransientInteger, Transfer_SimpleBinderOfTransient)
|
||||
|
||||
//! This type of Binder allows to attach as result, besides a
|
||||
//! Transient Object, an Integer Value, which can be an Index
|
||||
//! in the Object if it defines a List, for instance
|
||||
//!
|
||||
//! This Binder is otherwise a kind of SimpleBinderOfTransient,
|
||||
//! i.e. its basic result (for iterators, etc) is the Transient
|
||||
class Transfer_BinderOfTransientInteger : public Transfer_SimpleBinderOfTransient
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Creates an empty BinderOfTransientInteger; Default value for
|
||||
//! the integer part is zero
|
||||
Standard_EXPORT Transfer_BinderOfTransientInteger();
|
||||
|
||||
//! Sets a value for the integer part
|
||||
Standard_EXPORT void SetInteger (const Standard_Integer value);
|
||||
|
||||
//! Returns the value set for the integer part
|
||||
Standard_EXPORT Standard_Integer Integer() const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(Transfer_BinderOfTransientInteger,Transfer_SimpleBinderOfTransient)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Standard_Integer theintval;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Transfer_BinderOfTransientInteger_HeaderFile
|
@@ -1,35 +0,0 @@
|
||||
-- Created on: 1996-09-04
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1996-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class DataInfo from Transfer
|
||||
|
||||
---Purpose : Gives informations on an object
|
||||
-- Used as template to instantiate Mapper and SimpleBinder
|
||||
-- This class is for Transient
|
||||
|
||||
uses CString, Transient, Type
|
||||
|
||||
is
|
||||
|
||||
Type (myclass; ent : Transient) returns Type;
|
||||
---Purpose : Returns the Type attached to an object
|
||||
-- Here, the Dynamic Type of a Transient. Null Type if unknown
|
||||
|
||||
TypeName (myclass; ent : Transient) returns CString;
|
||||
---Purpose : Returns Type Name (string)
|
||||
-- Allows to name type of non-handled objects
|
||||
|
||||
end DataInfo;
|
@@ -11,7 +11,9 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Transfer_DataInfo.ixx>
|
||||
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <Transfer_DataInfo.hxx>
|
||||
|
||||
Handle(Standard_Type) Transfer_DataInfo::Type
|
||||
(const Handle(Standard_Transient)& ent)
|
||||
|
70
src/Transfer/Transfer_DataInfo.hxx
Normal file
70
src/Transfer/Transfer_DataInfo.hxx
Normal file
@@ -0,0 +1,70 @@
|
||||
// Created on: 1996-09-04
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1996-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Transfer_DataInfo_HeaderFile
|
||||
#define _Transfer_DataInfo_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
class Standard_Transient;
|
||||
|
||||
|
||||
//! Gives informations on an object
|
||||
//! Used as template to instantiate Mapper and SimpleBinder
|
||||
//! This class is for Transient
|
||||
class Transfer_DataInfo
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Returns the Type attached to an object
|
||||
//! Here, the Dynamic Type of a Transient. Null Type if unknown
|
||||
Standard_EXPORT static Handle(Standard_Type) Type (const Handle(Standard_Transient)& ent);
|
||||
|
||||
//! Returns Type Name (string)
|
||||
//! Allows to name type of non-handled objects
|
||||
Standard_EXPORT static Standard_CString TypeName (const Handle(Standard_Transient)& ent);
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Transfer_DataInfo_HeaderFile
|
@@ -1,64 +0,0 @@
|
||||
-- Created on: 1993-06-17
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1993-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class DispatchControl from Transfer inherits CopyControl from Interface
|
||||
|
||||
---Purpose : This is an auxiliary class for TransferDispatch, which allows
|
||||
-- to record simple copies, as CopyControl from Interface, but
|
||||
-- based on a TransientProcess. Hence, it allows in addition
|
||||
-- more actions (such as recording results of adaptations)
|
||||
|
||||
uses Transient, TransientProcess, InterfaceModel
|
||||
|
||||
raises InterfaceError
|
||||
|
||||
is
|
||||
|
||||
Create (model : InterfaceModel; TP : TransientProcess)
|
||||
returns DispatchControl;
|
||||
---Purpose : Creates the DispatchControl, ready for use
|
||||
|
||||
TransientProcess (me) returns TransientProcess;
|
||||
---Purpose : Returns the content of the DispatchControl : it can be used
|
||||
-- for a direct call, if the basic methods do not suffice
|
||||
---C++ : return const &
|
||||
|
||||
StartingModel (me) returns any InterfaceModel;
|
||||
---Purpose : Returns the Model from which the transfer is to be done
|
||||
---C++ : return const &
|
||||
|
||||
-- Now, inherited methods used for Copy (the minimum set)
|
||||
|
||||
Clear (me : mutable);
|
||||
---Purpose : Clears the List of Copied Results
|
||||
|
||||
Bind (me : mutable; ent : Transient; res : Transient)
|
||||
---Purpose : Binds a (Transient) Result to a (Transient) Starting Entity
|
||||
raises InterfaceError;
|
||||
-- Error if <ent> is already bound
|
||||
|
||||
Search (me; ent : Transient; res : out Transient)
|
||||
returns Boolean;
|
||||
---Purpose : Searches for the Result bound to a Starting Entity
|
||||
-- If Found, returns True and fills <res>
|
||||
-- Else, returns False and nullifies <res>
|
||||
|
||||
fields
|
||||
|
||||
theTP : TransientProcess;
|
||||
themodel : InterfaceModel;
|
||||
|
||||
end DispatchControl;
|
@@ -11,9 +11,13 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Transfer_DispatchControl.ixx>
|
||||
|
||||
|
||||
#include <Interface_InterfaceError.hxx>
|
||||
#include <Interface_InterfaceModel.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <Transfer_DispatchControl.hxx>
|
||||
#include <Transfer_TransientProcess.hxx>
|
||||
|
||||
Transfer_DispatchControl::Transfer_DispatchControl
|
||||
(const Handle(Interface_InterfaceModel)& model,
|
||||
|
90
src/Transfer/Transfer_DispatchControl.hxx
Normal file
90
src/Transfer/Transfer_DispatchControl.hxx
Normal file
@@ -0,0 +1,90 @@
|
||||
// Created on: 1993-06-17
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1993-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Transfer_DispatchControl_HeaderFile
|
||||
#define _Transfer_DispatchControl_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Interface_CopyControl.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Transfer_TransientProcess;
|
||||
class Interface_InterfaceModel;
|
||||
class Interface_InterfaceError;
|
||||
class Standard_Transient;
|
||||
|
||||
|
||||
class Transfer_DispatchControl;
|
||||
DEFINE_STANDARD_HANDLE(Transfer_DispatchControl, Interface_CopyControl)
|
||||
|
||||
//! This is an auxiliary class for TransferDispatch, which allows
|
||||
//! to record simple copies, as CopyControl from Interface, but
|
||||
//! based on a TransientProcess. Hence, it allows in addition
|
||||
//! more actions (such as recording results of adaptations)
|
||||
class Transfer_DispatchControl : public Interface_CopyControl
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Creates the DispatchControl, ready for use
|
||||
Standard_EXPORT Transfer_DispatchControl(const Handle(Interface_InterfaceModel)& model, const Handle(Transfer_TransientProcess)& TP);
|
||||
|
||||
//! Returns the content of the DispatchControl : it can be used
|
||||
//! for a direct call, if the basic methods do not suffice
|
||||
Standard_EXPORT const Handle(Transfer_TransientProcess)& TransientProcess() const;
|
||||
|
||||
//! Returns the Model from which the transfer is to be done
|
||||
Standard_EXPORT const Handle(Interface_InterfaceModel)& StartingModel() const;
|
||||
|
||||
//! Clears the List of Copied Results
|
||||
Standard_EXPORT void Clear();
|
||||
|
||||
//! Binds a (Transient) Result to a (Transient) Starting Entity
|
||||
Standard_EXPORT void Bind (const Handle(Standard_Transient)& ent, const Handle(Standard_Transient)& res);
|
||||
|
||||
//! Searches for the Result bound to a Starting Entity
|
||||
//! If Found, returns True and fills <res>
|
||||
//! Else, returns False and nullifies <res>
|
||||
Standard_EXPORT Standard_Boolean Search (const Handle(Standard_Transient)& ent, Handle(Standard_Transient)& res) const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(Transfer_DispatchControl,Interface_CopyControl)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Handle(Transfer_TransientProcess) theTP;
|
||||
Handle(Interface_InterfaceModel) themodel;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Transfer_DispatchControl_HeaderFile
|
@@ -1,40 +0,0 @@
|
||||
-- Created on: 1994-11-04
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1994-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class FindHasher from Transfer
|
||||
|
||||
---Purpose : FindHasher defines HashCode for Finder, which is : ask a
|
||||
-- Finder its HashCode ! Because this is the Finder itself which
|
||||
-- brings the HashCode for its Key
|
||||
--
|
||||
-- This class complies to the template given in TCollection by
|
||||
-- MapHasher itself
|
||||
|
||||
uses Finder
|
||||
|
||||
is
|
||||
|
||||
HashCode (myclass; K : Finder; Upper : Integer) returns Integer;
|
||||
---Purpose : Returns a HashCode in the range <0,Upper> for a Finder :
|
||||
-- asks the Finder its HashCode then transforms it to be in the
|
||||
-- required range
|
||||
|
||||
IsEqual (myclass; K1, K2 : Finder) returns Boolean;
|
||||
---Purpose : Returns True if two keys are the same.
|
||||
-- The test does not work on the Finders themselves but by
|
||||
-- calling their methods Equates
|
||||
|
||||
end FindHasher;
|
@@ -11,8 +11,9 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Transfer_FindHasher.ixx>
|
||||
|
||||
#include <Transfer_Finder.hxx>
|
||||
#include <Transfer_FindHasher.hxx>
|
||||
|
||||
Standard_Integer Transfer_FindHasher::HashCode
|
||||
(const Handle(Transfer_Finder)& K, const Standard_Integer Upper)
|
||||
|
75
src/Transfer/Transfer_FindHasher.hxx
Normal file
75
src/Transfer/Transfer_FindHasher.hxx
Normal file
@@ -0,0 +1,75 @@
|
||||
// Created on: 1994-11-04
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1994-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Transfer_FindHasher_HeaderFile
|
||||
#define _Transfer_FindHasher_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Transfer_Finder;
|
||||
|
||||
|
||||
//! FindHasher defines HashCode for Finder, which is : ask a
|
||||
//! Finder its HashCode ! Because this is the Finder itself which
|
||||
//! brings the HashCode for its Key
|
||||
//!
|
||||
//! This class complies to the template given in TCollection by
|
||||
//! MapHasher itself
|
||||
class Transfer_FindHasher
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Returns a HashCode in the range <0,Upper> for a Finder :
|
||||
//! asks the Finder its HashCode then transforms it to be in the
|
||||
//! required range
|
||||
Standard_EXPORT static Standard_Integer HashCode (const Handle(Transfer_Finder)& K, const Standard_Integer Upper);
|
||||
|
||||
//! Returns True if two keys are the same.
|
||||
//! The test does not work on the Finders themselves but by
|
||||
//! calling their methods Equates
|
||||
Standard_EXPORT static Standard_Boolean IsEqual (const Handle(Transfer_Finder)& K1, const Handle(Transfer_Finder)& K2);
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Transfer_FindHasher_HeaderFile
|
@@ -1,144 +0,0 @@
|
||||
-- Created on: 1994-11-04
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1994-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
deferred class Finder from Transfer inherits TShared
|
||||
|
||||
---Purpose : a Finder allows to map any kind of object as a Key for a Map.
|
||||
-- This works by defining, for a Hash Code, that of the real Key,
|
||||
-- not of the Finder which acts only as an intermediate.
|
||||
-- When a Map asks for the HashCode of a Finder, this one returns
|
||||
-- the code it has determined at creation time
|
||||
|
||||
uses CString, Type, Transient,
|
||||
DictionaryOfTransient from Dico, ParamType from Interface
|
||||
|
||||
is
|
||||
|
||||
SetHashCode (me : mutable; code : Integer) is static protected;
|
||||
---Purpose : Stores the HashCode which corresponds to the Value given to
|
||||
-- create the Mapper
|
||||
|
||||
GetHashCode (me) returns Integer is static;
|
||||
---Purpose : Returns the HashCode which has been stored by SetHashCode
|
||||
-- (remark that HashCode could be deferred then be defined by
|
||||
-- sub-classes, the result is the same)
|
||||
|
||||
Equates (me; other : Finder) returns Boolean is deferred;
|
||||
---Purpose : Specific testof equallity : to be defined by each sub-class,
|
||||
-- must be False if Finders have not the same true Type, else
|
||||
-- their contents must be compared
|
||||
|
||||
ValueType (me) returns Type is virtual;
|
||||
---Purpose : Returns the Type of the Value. By default, returns the
|
||||
-- DynamicType of <me>, but can be redefined
|
||||
|
||||
ValueTypeName (me) returns CString is virtual;
|
||||
---Purpose : Returns the name of the Type of the Value. Default is name
|
||||
-- of ValueType, unless it is for a non-handled object
|
||||
|
||||
-- -- Attributes
|
||||
|
||||
|
||||
SetAttribute (me : mutable; name : CString; val : Transient);
|
||||
---Purpose : Adds an attribute with a given name (replaces the former one
|
||||
-- with the same name if already exists)
|
||||
|
||||
RemoveAttribute (me : mutable; name : CString) returns Boolean;
|
||||
---Purpose : Removes an attribute
|
||||
-- Returns True when done, False if this attribute did not exist
|
||||
|
||||
GetAttribute (me; name : CString; type : Type from Standard;
|
||||
val : out Transient) returns Boolean;
|
||||
---Purpose : Returns an attribute from its name, filtered by a type
|
||||
-- If no attribute has this name, or if it is not kind of this
|
||||
-- type, <val> is Null and returned value is False
|
||||
-- Else, it is True
|
||||
|
||||
Attribute (me; name : CString) returns Transient;
|
||||
---Purpose : Returns an attribute from its name. Null Handle if not recorded
|
||||
-- (whatever Transient, Integer, Real ...)
|
||||
|
||||
AttributeType (me; name : CString) returns ParamType from Interface;
|
||||
---Purpose : Returns the type of an attribute :
|
||||
-- ParamInt , ParamReal , ParamText (String) , ParamIdent (any)
|
||||
-- or ParamVoid (not recorded)
|
||||
|
||||
|
||||
SetIntegerAttribute (me : mutable; name : CString; val : Integer);
|
||||
---Purpose : Adds an integer value for an attribute
|
||||
|
||||
GetIntegerAttribute (me; name : CString; val : out Integer) returns Boolean;
|
||||
---Purpose : Returns an attribute from its name, as integer
|
||||
-- If no attribute has this name, or not an integer,
|
||||
-- <val> is 0 and returned value is False
|
||||
-- Else, it is True
|
||||
|
||||
IntegerAttribute (me; name : CString) returns Integer;
|
||||
---Purpose : Returns an integer attribute from its name. 0 if not recorded
|
||||
|
||||
SetRealAttribute (me : mutable; name : CString; val : Real);
|
||||
---Purpose : Adds a real value for an attribute
|
||||
|
||||
GetRealAttribute (me; name : CString; val : out Real) returns Boolean;
|
||||
---Purpose : Returns an attribute from its name, as real
|
||||
-- If no attribute has this name, or not a real
|
||||
-- <val> is 0.0 and returned value is False
|
||||
-- Else, it is True
|
||||
|
||||
RealAttribute (me; name : CString) returns Real;
|
||||
---Purpose : Returns a real attribute from its name. 0.0 if not recorded
|
||||
|
||||
SetStringAttribute (me : mutable; name : CString; val : CString);
|
||||
---Purpose : Adds a String value for an attribute
|
||||
|
||||
GetStringAttribute (me; name : CString; val : out CString) returns Boolean;
|
||||
---Purpose : Returns an attribute from its name, as String
|
||||
-- If no attribute has this name, or not a String
|
||||
-- <val> is 0.0 and returned value is False
|
||||
-- Else, it is True
|
||||
|
||||
StringAttribute (me; name : CString) returns CString;
|
||||
---Purpose : Returns a String attribute from its name. "" if not recorded
|
||||
|
||||
AttrList (me) returns DictionaryOfTransient;
|
||||
---Purpose : Returns the exhaustive list of attributes
|
||||
|
||||
SameAttributes (me : mutable; other : Finder);
|
||||
---Purpose : Gets the list of attributes from <other>, as such, i.e.
|
||||
-- not copied : attributes are shared, any attribute edited,
|
||||
-- added, or removed in <other> is also in <me> and vice versa
|
||||
-- The former list of attributes of <me> is dropped
|
||||
|
||||
GetAttributes (me : mutable; other : Finder;
|
||||
fromname : CString = ""; copied : Boolean = Standard_True);
|
||||
---Purpose : Gets the list of attributes from <other>, by copying it
|
||||
-- By default, considers all the attributes from <other>
|
||||
-- If <fromname> is given, considers only the attributes with
|
||||
-- name beginning by <fromname>
|
||||
--
|
||||
-- For each attribute, if <copied> is True (D), its value is also
|
||||
-- copied if it is a basic type (Integer,Real,String), else it
|
||||
-- remains shared between <other> and <me>
|
||||
--
|
||||
-- These new attributes are added to the existing ones in <me>,
|
||||
-- in case of same name, they replace the existing ones
|
||||
|
||||
fields
|
||||
|
||||
thecode : Integer;
|
||||
theattrib : DictionaryOfTransient;
|
||||
|
||||
end Finder;
|
@@ -11,12 +11,15 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Transfer_Finder.ixx>
|
||||
#include <Interface_IntVal.hxx>
|
||||
#include <Geom2d_CartesianPoint.hxx>
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
#include <Dico_IteratorOfDictionaryOfTransient.hxx>
|
||||
|
||||
#include <Dico_DictionaryOfTransient.hxx>
|
||||
#include <Dico_IteratorOfDictionaryOfTransient.hxx>
|
||||
#include <Geom2d_CartesianPoint.hxx>
|
||||
#include <Interface_IntVal.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
#include <Transfer_Finder.hxx>
|
||||
|
||||
void Transfer_Finder::SetHashCode (const Standard_Integer code)
|
||||
{ thecode = code; }
|
||||
|
176
src/Transfer/Transfer_Finder.hxx
Normal file
176
src/Transfer/Transfer_Finder.hxx
Normal file
@@ -0,0 +1,176 @@
|
||||
// Created on: 1994-11-04
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1994-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Transfer_Finder_HeaderFile
|
||||
#define _Transfer_Finder_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <MMgt_TShared.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
#include <Interface_ParamType.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
class Dico_DictionaryOfTransient;
|
||||
class Standard_Transient;
|
||||
|
||||
|
||||
class Transfer_Finder;
|
||||
DEFINE_STANDARD_HANDLE(Transfer_Finder, MMgt_TShared)
|
||||
|
||||
//! a Finder allows to map any kind of object as a Key for a Map.
|
||||
//! This works by defining, for a Hash Code, that of the real Key,
|
||||
//! not of the Finder which acts only as an intermediate.
|
||||
//! When a Map asks for the HashCode of a Finder, this one returns
|
||||
//! the code it has determined at creation time
|
||||
class Transfer_Finder : public MMgt_TShared
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Returns the HashCode which has been stored by SetHashCode
|
||||
//! (remark that HashCode could be deferred then be defined by
|
||||
//! sub-classes, the result is the same)
|
||||
Standard_EXPORT Standard_Integer GetHashCode() const;
|
||||
|
||||
//! Specific testof equallity : to be defined by each sub-class,
|
||||
//! must be False if Finders have not the same true Type, else
|
||||
//! their contents must be compared
|
||||
Standard_EXPORT virtual Standard_Boolean Equates (const Handle(Transfer_Finder)& other) const = 0;
|
||||
|
||||
//! Returns the Type of the Value. By default, returns the
|
||||
//! DynamicType of <me>, but can be redefined
|
||||
Standard_EXPORT virtual Handle(Standard_Type) ValueType() const;
|
||||
|
||||
//! Returns the name of the Type of the Value. Default is name
|
||||
//! of ValueType, unless it is for a non-handled object
|
||||
Standard_EXPORT virtual Standard_CString ValueTypeName() const;
|
||||
|
||||
//! Adds an attribute with a given name (replaces the former one
|
||||
//! with the same name if already exists)
|
||||
Standard_EXPORT void SetAttribute (const Standard_CString name, const Handle(Standard_Transient)& val);
|
||||
|
||||
//! Removes an attribute
|
||||
//! Returns True when done, False if this attribute did not exist
|
||||
Standard_EXPORT Standard_Boolean RemoveAttribute (const Standard_CString name);
|
||||
|
||||
//! Returns an attribute from its name, filtered by a type
|
||||
//! If no attribute has this name, or if it is not kind of this
|
||||
//! type, <val> is Null and returned value is False
|
||||
//! Else, it is True
|
||||
Standard_EXPORT Standard_Boolean GetAttribute (const Standard_CString name, const Handle(Standard_Type)& type, Handle(Standard_Transient)& val) const;
|
||||
|
||||
//! Returns an attribute from its name. Null Handle if not recorded
|
||||
//! (whatever Transient, Integer, Real ...)
|
||||
Standard_EXPORT Handle(Standard_Transient) Attribute (const Standard_CString name) const;
|
||||
|
||||
//! Returns the type of an attribute :
|
||||
//! ParamInt , ParamReal , ParamText (String) , ParamIdent (any)
|
||||
//! or ParamVoid (not recorded)
|
||||
Standard_EXPORT Interface_ParamType AttributeType (const Standard_CString name) const;
|
||||
|
||||
//! Adds an integer value for an attribute
|
||||
Standard_EXPORT void SetIntegerAttribute (const Standard_CString name, const Standard_Integer val);
|
||||
|
||||
//! Returns an attribute from its name, as integer
|
||||
//! If no attribute has this name, or not an integer,
|
||||
//! <val> is 0 and returned value is False
|
||||
//! Else, it is True
|
||||
Standard_EXPORT Standard_Boolean GetIntegerAttribute (const Standard_CString name, Standard_Integer& val) const;
|
||||
|
||||
//! Returns an integer attribute from its name. 0 if not recorded
|
||||
Standard_EXPORT Standard_Integer IntegerAttribute (const Standard_CString name) const;
|
||||
|
||||
//! Adds a real value for an attribute
|
||||
Standard_EXPORT void SetRealAttribute (const Standard_CString name, const Standard_Real val);
|
||||
|
||||
//! Returns an attribute from its name, as real
|
||||
//! If no attribute has this name, or not a real
|
||||
//! <val> is 0.0 and returned value is False
|
||||
//! Else, it is True
|
||||
Standard_EXPORT Standard_Boolean GetRealAttribute (const Standard_CString name, Standard_Real& val) const;
|
||||
|
||||
//! Returns a real attribute from its name. 0.0 if not recorded
|
||||
Standard_EXPORT Standard_Real RealAttribute (const Standard_CString name) const;
|
||||
|
||||
//! Adds a String value for an attribute
|
||||
Standard_EXPORT void SetStringAttribute (const Standard_CString name, const Standard_CString val);
|
||||
|
||||
//! Returns an attribute from its name, as String
|
||||
//! If no attribute has this name, or not a String
|
||||
//! <val> is 0.0 and returned value is False
|
||||
//! Else, it is True
|
||||
Standard_EXPORT Standard_Boolean GetStringAttribute (const Standard_CString name, Standard_CString& val) const;
|
||||
|
||||
//! Returns a String attribute from its name. "" if not recorded
|
||||
Standard_EXPORT Standard_CString StringAttribute (const Standard_CString name) const;
|
||||
|
||||
//! Returns the exhaustive list of attributes
|
||||
Standard_EXPORT Handle(Dico_DictionaryOfTransient) AttrList() const;
|
||||
|
||||
//! Gets the list of attributes from <other>, as such, i.e.
|
||||
//! not copied : attributes are shared, any attribute edited,
|
||||
//! added, or removed in <other> is also in <me> and vice versa
|
||||
//! The former list of attributes of <me> is dropped
|
||||
Standard_EXPORT void SameAttributes (const Handle(Transfer_Finder)& other);
|
||||
|
||||
//! Gets the list of attributes from <other>, by copying it
|
||||
//! By default, considers all the attributes from <other>
|
||||
//! If <fromname> is given, considers only the attributes with
|
||||
//! name beginning by <fromname>
|
||||
//!
|
||||
//! For each attribute, if <copied> is True (D), its value is also
|
||||
//! copied if it is a basic type (Integer,Real,String), else it
|
||||
//! remains shared between <other> and <me>
|
||||
//!
|
||||
//! These new attributes are added to the existing ones in <me>,
|
||||
//! in case of same name, they replace the existing ones
|
||||
Standard_EXPORT void GetAttributes (const Handle(Transfer_Finder)& other, const Standard_CString fromname = "", const Standard_Boolean copied = Standard_True);
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(Transfer_Finder,MMgt_TShared)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
//! Stores the HashCode which corresponds to the Value given to
|
||||
//! create the Mapper
|
||||
Standard_EXPORT void SetHashCode (const Standard_Integer code);
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Standard_Integer thecode;
|
||||
Handle(Dico_DictionaryOfTransient) theattrib;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Transfer_Finder_HeaderFile
|
@@ -1,71 +0,0 @@
|
||||
-- Created on: 1996-09-04
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1996-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class FinderProcess from Transfer inherits ProcessForFinder
|
||||
|
||||
---Purpose : Adds specific features to the generic definition :
|
||||
-- PrintTrace is adapted
|
||||
|
||||
uses InterfaceModel from Interface,
|
||||
Messenger from Message,
|
||||
Finder, TransientMapper
|
||||
|
||||
is
|
||||
|
||||
Create (nb : Integer = 10000) returns FinderProcess;
|
||||
---Purpose : Sets FinderProcess at initial state, with an initial size
|
||||
|
||||
SetModel (me : mutable; model : InterfaceModel);
|
||||
---Purpose : Sets an InterfaceModel, which can be used during transfer
|
||||
-- for instance if a context must be managed, it is in the Model
|
||||
|
||||
Model (me) returns InterfaceModel;
|
||||
---Purpose : Returns the Model which can be used for context
|
||||
|
||||
NextMappedWithAttribute (me; name : CString; num0 : Integer) returns Integer;
|
||||
---Purpose : In the list of mapped items (between 1 and NbMapped),
|
||||
-- searches for the first mapped item which follows <num0>
|
||||
-- (not included) and which has an attribute named <name>
|
||||
-- The considered Attributes are those brought by Finders,i.e.
|
||||
-- by Input data.
|
||||
-- While NextItemWithAttribute works on Result data (Binders)
|
||||
--
|
||||
-- Hence, allows such an iteration
|
||||
--
|
||||
-- for (num = FP->NextMappedWithAttribute(name,0);
|
||||
-- num > 0;
|
||||
-- num = FP->NextMappedWithAttribute(name,num) {
|
||||
-- .. process mapped item <num>
|
||||
-- }
|
||||
|
||||
TransientMapper (me; obj : Transient) returns TransientMapper;
|
||||
---Purpose : Returns a TransientMapper for a given Transient Object
|
||||
-- Either <obj> is already mapped, then its Mapper is returned
|
||||
-- Or it is not, then a new one is created then returned, BUT
|
||||
-- it is not mapped here (use Bind or FindElseBind to do this)
|
||||
|
||||
|
||||
PrintTrace (me; start : Finder; S : Messenger from Message) is redefined;
|
||||
---Purpose : Specific printing to trace a Finder (by its method ValueType)
|
||||
|
||||
PrintStats (me; mode : Integer; S : Messenger from Message);
|
||||
---Purpose : Prints statistics on a given output, according mode
|
||||
|
||||
fields
|
||||
|
||||
themodel : InterfaceModel;
|
||||
|
||||
end FinderProcess;
|
@@ -11,12 +11,17 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Transfer_FinderProcess.ixx>
|
||||
#include <Interface_MSG.hxx>
|
||||
#include <Transfer_Binder.hxx>
|
||||
#include <Interface_Check.hxx>
|
||||
#include <Transfer_TransientMapper.hxx>
|
||||
|
||||
#include <Interface_Check.hxx>
|
||||
#include <Interface_InterfaceModel.hxx>
|
||||
#include <Interface_MSG.hxx>
|
||||
#include <Message_Messenger.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <Transfer_Binder.hxx>
|
||||
#include <Transfer_Finder.hxx>
|
||||
#include <Transfer_FinderProcess.hxx>
|
||||
#include <Transfer_TransientMapper.hxx>
|
||||
|
||||
Transfer_FinderProcess::Transfer_FinderProcess (const Standard_Integer nb)
|
||||
: Transfer_ProcessForFinder (nb) { }
|
||||
|
106
src/Transfer/Transfer_FinderProcess.hxx
Normal file
106
src/Transfer/Transfer_FinderProcess.hxx
Normal file
@@ -0,0 +1,106 @@
|
||||
// Created on: 1996-09-04
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1996-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Transfer_FinderProcess_HeaderFile
|
||||
#define _Transfer_FinderProcess_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Transfer_ProcessForFinder.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
class Interface_InterfaceModel;
|
||||
class Transfer_TransientMapper;
|
||||
class Standard_Transient;
|
||||
class Transfer_Finder;
|
||||
class Message_Messenger;
|
||||
|
||||
|
||||
class Transfer_FinderProcess;
|
||||
DEFINE_STANDARD_HANDLE(Transfer_FinderProcess, Transfer_ProcessForFinder)
|
||||
|
||||
//! Adds specific features to the generic definition :
|
||||
//! PrintTrace is adapted
|
||||
class Transfer_FinderProcess : public Transfer_ProcessForFinder
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Sets FinderProcess at initial state, with an initial size
|
||||
Standard_EXPORT Transfer_FinderProcess(const Standard_Integer nb = 10000);
|
||||
|
||||
//! Sets an InterfaceModel, which can be used during transfer
|
||||
//! for instance if a context must be managed, it is in the Model
|
||||
Standard_EXPORT void SetModel (const Handle(Interface_InterfaceModel)& model);
|
||||
|
||||
//! Returns the Model which can be used for context
|
||||
Standard_EXPORT Handle(Interface_InterfaceModel) Model() const;
|
||||
|
||||
//! In the list of mapped items (between 1 and NbMapped),
|
||||
//! searches for the first mapped item which follows <num0>
|
||||
//! (not included) and which has an attribute named <name>
|
||||
//! The considered Attributes are those brought by Finders,i.e.
|
||||
//! by Input data.
|
||||
//! While NextItemWithAttribute works on Result data (Binders)
|
||||
//!
|
||||
//! Hence, allows such an iteration
|
||||
//!
|
||||
//! for (num = FP->NextMappedWithAttribute(name,0);
|
||||
//! num > 0;
|
||||
//! num = FP->NextMappedWithAttribute(name,num) {
|
||||
//! .. process mapped item <num>
|
||||
//! }
|
||||
Standard_EXPORT Standard_Integer NextMappedWithAttribute (const Standard_CString name, const Standard_Integer num0) const;
|
||||
|
||||
//! Returns a TransientMapper for a given Transient Object
|
||||
//! Either <obj> is already mapped, then its Mapper is returned
|
||||
//! Or it is not, then a new one is created then returned, BUT
|
||||
//! it is not mapped here (use Bind or FindElseBind to do this)
|
||||
Standard_EXPORT Handle(Transfer_TransientMapper) TransientMapper (const Handle(Standard_Transient)& obj) const;
|
||||
|
||||
//! Specific printing to trace a Finder (by its method ValueType)
|
||||
Standard_EXPORT virtual void PrintTrace (const Handle(Transfer_Finder)& start, const Handle(Message_Messenger)& S) const Standard_OVERRIDE;
|
||||
|
||||
//! Prints statistics on a given output, according mode
|
||||
Standard_EXPORT void PrintStats (const Standard_Integer mode, const Handle(Message_Messenger)& S) const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(Transfer_FinderProcess,Transfer_ProcessForFinder)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Handle(Interface_InterfaceModel) themodel;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Transfer_FinderProcess_HeaderFile
|
@@ -0,0 +1,102 @@
|
||||
// Created on: 1992-02-03
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1992-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Transfer_IndexedDataMapNodeOfTransferMapOfProcessForFinder_HeaderFile
|
||||
#define _Transfer_IndexedDataMapNodeOfTransferMapOfProcessForFinder_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <TCollection_MapNodePtr.hxx>
|
||||
#include <TCollection_MapNode.hxx>
|
||||
class Transfer_Finder;
|
||||
class Transfer_Binder;
|
||||
class Transfer_FindHasher;
|
||||
class Transfer_TransferMapOfProcessForFinder;
|
||||
|
||||
|
||||
class Transfer_IndexedDataMapNodeOfTransferMapOfProcessForFinder;
|
||||
DEFINE_STANDARD_HANDLE(Transfer_IndexedDataMapNodeOfTransferMapOfProcessForFinder, TCollection_MapNode)
|
||||
|
||||
|
||||
class Transfer_IndexedDataMapNodeOfTransferMapOfProcessForFinder : public TCollection_MapNode
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Transfer_IndexedDataMapNodeOfTransferMapOfProcessForFinder(const Handle(Transfer_Finder)& K1, const Standard_Integer K2, const Handle(Transfer_Binder)& I, const TCollection_MapNodePtr& n1, const TCollection_MapNodePtr& n2);
|
||||
|
||||
Handle(Transfer_Finder)& Key1() const;
|
||||
|
||||
Standard_Integer& Key2() const;
|
||||
|
||||
TCollection_MapNodePtr& Next2() const;
|
||||
|
||||
Handle(Transfer_Binder)& Value() const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(Transfer_IndexedDataMapNodeOfTransferMapOfProcessForFinder,TCollection_MapNode)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Handle(Transfer_Finder) myKey1;
|
||||
Standard_Integer myKey2;
|
||||
Handle(Transfer_Binder) myValue;
|
||||
TCollection_MapNodePtr myNext2;
|
||||
|
||||
|
||||
};
|
||||
|
||||
#define TheKey Handle(Transfer_Finder)
|
||||
#define TheKey_hxx <Transfer_Finder.hxx>
|
||||
#define TheItem Handle(Transfer_Binder)
|
||||
#define TheItem_hxx <Transfer_Binder.hxx>
|
||||
#define Hasher Transfer_FindHasher
|
||||
#define Hasher_hxx <Transfer_FindHasher.hxx>
|
||||
#define TCollection_IndexedDataMapNode Transfer_IndexedDataMapNodeOfTransferMapOfProcessForFinder
|
||||
#define TCollection_IndexedDataMapNode_hxx <Transfer_IndexedDataMapNodeOfTransferMapOfProcessForFinder.hxx>
|
||||
#define Handle_TCollection_IndexedDataMapNode Handle(Transfer_IndexedDataMapNodeOfTransferMapOfProcessForFinder)
|
||||
#define TCollection_IndexedDataMap Transfer_TransferMapOfProcessForFinder
|
||||
#define TCollection_IndexedDataMap_hxx <Transfer_TransferMapOfProcessForFinder.hxx>
|
||||
|
||||
#include <TCollection_IndexedDataMapNode.lxx>
|
||||
|
||||
#undef TheKey
|
||||
#undef TheKey_hxx
|
||||
#undef TheItem
|
||||
#undef TheItem_hxx
|
||||
#undef Hasher
|
||||
#undef Hasher_hxx
|
||||
#undef TCollection_IndexedDataMapNode
|
||||
#undef TCollection_IndexedDataMapNode_hxx
|
||||
#undef Handle_TCollection_IndexedDataMapNode
|
||||
#undef TCollection_IndexedDataMap
|
||||
#undef TCollection_IndexedDataMap_hxx
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Transfer_IndexedDataMapNodeOfTransferMapOfProcessForFinder_HeaderFile
|
@@ -0,0 +1,47 @@
|
||||
// Created on: 1992-02-03
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1992-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Transfer_IndexedDataMapNodeOfTransferMapOfProcessForFinder.hxx>
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Transfer_Finder.hxx>
|
||||
#include <Transfer_Binder.hxx>
|
||||
#include <Transfer_FindHasher.hxx>
|
||||
#include <Transfer_TransferMapOfProcessForFinder.hxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define TheKey Handle(Transfer_Finder)
|
||||
#define TheKey_hxx <Transfer_Finder.hxx>
|
||||
#define TheItem Handle(Transfer_Binder)
|
||||
#define TheItem_hxx <Transfer_Binder.hxx>
|
||||
#define Hasher Transfer_FindHasher
|
||||
#define Hasher_hxx <Transfer_FindHasher.hxx>
|
||||
#define TCollection_IndexedDataMapNode Transfer_IndexedDataMapNodeOfTransferMapOfProcessForFinder
|
||||
#define TCollection_IndexedDataMapNode_hxx <Transfer_IndexedDataMapNodeOfTransferMapOfProcessForFinder.hxx>
|
||||
#define Handle_TCollection_IndexedDataMapNode Handle(Transfer_IndexedDataMapNodeOfTransferMapOfProcessForFinder)
|
||||
#define TCollection_IndexedDataMap Transfer_TransferMapOfProcessForFinder
|
||||
#define TCollection_IndexedDataMap_hxx <Transfer_TransferMapOfProcessForFinder.hxx>
|
||||
#include <TCollection_IndexedDataMapNode.gxx>
|
||||
|
@@ -0,0 +1,102 @@
|
||||
// Created on: 1992-02-03
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1992-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Transfer_IndexedDataMapNodeOfTransferMapOfProcessForTransient_HeaderFile
|
||||
#define _Transfer_IndexedDataMapNodeOfTransferMapOfProcessForTransient_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <TCollection_MapNodePtr.hxx>
|
||||
#include <TCollection_MapNode.hxx>
|
||||
#include <TColStd_MapTransientHasher.hxx>
|
||||
class Standard_Transient;
|
||||
class Transfer_Binder;
|
||||
class Transfer_TransferMapOfProcessForTransient;
|
||||
|
||||
|
||||
class Transfer_IndexedDataMapNodeOfTransferMapOfProcessForTransient;
|
||||
DEFINE_STANDARD_HANDLE(Transfer_IndexedDataMapNodeOfTransferMapOfProcessForTransient, TCollection_MapNode)
|
||||
|
||||
|
||||
class Transfer_IndexedDataMapNodeOfTransferMapOfProcessForTransient : public TCollection_MapNode
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Transfer_IndexedDataMapNodeOfTransferMapOfProcessForTransient(const Handle(Standard_Transient)& K1, const Standard_Integer K2, const Handle(Transfer_Binder)& I, const TCollection_MapNodePtr& n1, const TCollection_MapNodePtr& n2);
|
||||
|
||||
Handle(Standard_Transient)& Key1() const;
|
||||
|
||||
Standard_Integer& Key2() const;
|
||||
|
||||
TCollection_MapNodePtr& Next2() const;
|
||||
|
||||
Handle(Transfer_Binder)& Value() const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(Transfer_IndexedDataMapNodeOfTransferMapOfProcessForTransient,TCollection_MapNode)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Handle(Standard_Transient) myKey1;
|
||||
Standard_Integer myKey2;
|
||||
Handle(Transfer_Binder) myValue;
|
||||
TCollection_MapNodePtr myNext2;
|
||||
|
||||
|
||||
};
|
||||
|
||||
#define TheKey Handle(Standard_Transient)
|
||||
#define TheKey_hxx <Standard_Transient.hxx>
|
||||
#define TheItem Handle(Transfer_Binder)
|
||||
#define TheItem_hxx <Transfer_Binder.hxx>
|
||||
#define Hasher TColStd_MapTransientHasher
|
||||
#define Hasher_hxx <TColStd_MapTransientHasher.hxx>
|
||||
#define TCollection_IndexedDataMapNode Transfer_IndexedDataMapNodeOfTransferMapOfProcessForTransient
|
||||
#define TCollection_IndexedDataMapNode_hxx <Transfer_IndexedDataMapNodeOfTransferMapOfProcessForTransient.hxx>
|
||||
#define Handle_TCollection_IndexedDataMapNode Handle(Transfer_IndexedDataMapNodeOfTransferMapOfProcessForTransient)
|
||||
#define TCollection_IndexedDataMap Transfer_TransferMapOfProcessForTransient
|
||||
#define TCollection_IndexedDataMap_hxx <Transfer_TransferMapOfProcessForTransient.hxx>
|
||||
|
||||
#include <TCollection_IndexedDataMapNode.lxx>
|
||||
|
||||
#undef TheKey
|
||||
#undef TheKey_hxx
|
||||
#undef TheItem
|
||||
#undef TheItem_hxx
|
||||
#undef Hasher
|
||||
#undef Hasher_hxx
|
||||
#undef TCollection_IndexedDataMapNode
|
||||
#undef TCollection_IndexedDataMapNode_hxx
|
||||
#undef Handle_TCollection_IndexedDataMapNode
|
||||
#undef TCollection_IndexedDataMap
|
||||
#undef TCollection_IndexedDataMap_hxx
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Transfer_IndexedDataMapNodeOfTransferMapOfProcessForTransient_HeaderFile
|
@@ -0,0 +1,46 @@
|
||||
// Created on: 1992-02-03
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1992-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Transfer_IndexedDataMapNodeOfTransferMapOfProcessForTransient.hxx>
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <Transfer_Binder.hxx>
|
||||
#include <Transfer_TransferMapOfProcessForTransient.hxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define TheKey Handle(Standard_Transient)
|
||||
#define TheKey_hxx <Standard_Transient.hxx>
|
||||
#define TheItem Handle(Transfer_Binder)
|
||||
#define TheItem_hxx <Transfer_Binder.hxx>
|
||||
#define Hasher TColStd_MapTransientHasher
|
||||
#define Hasher_hxx <TColStd_MapTransientHasher.hxx>
|
||||
#define TCollection_IndexedDataMapNode Transfer_IndexedDataMapNodeOfTransferMapOfProcessForTransient
|
||||
#define TCollection_IndexedDataMapNode_hxx <Transfer_IndexedDataMapNodeOfTransferMapOfProcessForTransient.hxx>
|
||||
#define Handle_TCollection_IndexedDataMapNode Handle(Transfer_IndexedDataMapNodeOfTransferMapOfProcessForTransient)
|
||||
#define TCollection_IndexedDataMap Transfer_TransferMapOfProcessForTransient
|
||||
#define TCollection_IndexedDataMap_hxx <Transfer_TransferMapOfProcessForTransient.hxx>
|
||||
#include <TCollection_IndexedDataMapNode.gxx>
|
||||
|
81
src/Transfer/Transfer_IteratorOfProcessForFinder.hxx
Normal file
81
src/Transfer/Transfer_IteratorOfProcessForFinder.hxx
Normal file
@@ -0,0 +1,81 @@
|
||||
// Created on: 1992-02-03
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1992-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Transfer_IteratorOfProcessForFinder_HeaderFile
|
||||
#define _Transfer_IteratorOfProcessForFinder_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Transfer_HSequenceOfFinder.hxx>
|
||||
#include <Transfer_TransferIterator.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Standard_NoSuchObject;
|
||||
class Transfer_Finder;
|
||||
class Transfer_FindHasher;
|
||||
class Transfer_ProcessForFinder;
|
||||
class Transfer_TransferMapOfProcessForFinder;
|
||||
class Transfer_IndexedDataMapNodeOfTransferMapOfProcessForFinder;
|
||||
class Transfer_ActorOfProcessForFinder;
|
||||
class Transfer_Binder;
|
||||
|
||||
|
||||
|
||||
class Transfer_IteratorOfProcessForFinder : public Transfer_TransferIterator
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT Transfer_IteratorOfProcessForFinder(const Standard_Boolean withstarts);
|
||||
|
||||
Standard_EXPORT void Add (const Handle(Transfer_Binder)& binder);
|
||||
|
||||
Standard_EXPORT void Add (const Handle(Transfer_Binder)& binder, const Handle(Transfer_Finder)& start);
|
||||
|
||||
Standard_EXPORT void Filter (const Handle(Transfer_HSequenceOfFinder)& list, const Standard_Boolean keep = Standard_True);
|
||||
|
||||
Standard_EXPORT Standard_Boolean HasStarting() const;
|
||||
|
||||
Standard_EXPORT const Handle(Transfer_Finder)& Starting() const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Handle(Transfer_HSequenceOfFinder) thestarts;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Transfer_IteratorOfProcessForFinder_HeaderFile
|
53
src/Transfer/Transfer_IteratorOfProcessForFinder_0.cxx
Normal file
53
src/Transfer/Transfer_IteratorOfProcessForFinder_0.cxx
Normal file
@@ -0,0 +1,53 @@
|
||||
// Created on: 1992-02-03
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1992-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Transfer_IteratorOfProcessForFinder.hxx>
|
||||
|
||||
#include <Standard_NoSuchObject.hxx>
|
||||
#include <Transfer_Finder.hxx>
|
||||
#include <Transfer_FindHasher.hxx>
|
||||
#include <Transfer_ProcessForFinder.hxx>
|
||||
#include <Transfer_TransferMapOfProcessForFinder.hxx>
|
||||
#include <Transfer_IndexedDataMapNodeOfTransferMapOfProcessForFinder.hxx>
|
||||
#include <Transfer_ActorOfProcessForFinder.hxx>
|
||||
#include <Transfer_Binder.hxx>
|
||||
|
||||
|
||||
#define TheStart Handle(Transfer_Finder)
|
||||
#define TheStart_hxx <Transfer_Finder.hxx>
|
||||
#define TheMapHasher Transfer_FindHasher
|
||||
#define TheMapHasher_hxx <Transfer_FindHasher.hxx>
|
||||
#define Handle_TheList Handle(Transfer_HSequenceOfFinder)
|
||||
#define TheList Transfer_HSequenceOfFinder
|
||||
#define TheList_hxx <Transfer_HSequenceOfFinder.hxx>
|
||||
#define Transfer_TransferMap Transfer_TransferMapOfProcessForFinder
|
||||
#define Transfer_TransferMap_hxx <Transfer_TransferMapOfProcessForFinder.hxx>
|
||||
#define Transfer_IndexedDataMapNodeOfTransferMap Transfer_IndexedDataMapNodeOfTransferMapOfProcessForFinder
|
||||
#define Transfer_IndexedDataMapNodeOfTransferMap_hxx <Transfer_IndexedDataMapNodeOfTransferMapOfProcessForFinder.hxx>
|
||||
#define Transfer_IndexedDataMapNodeOfTransferMap Transfer_IndexedDataMapNodeOfTransferMapOfProcessForFinder
|
||||
#define Transfer_IndexedDataMapNodeOfTransferMap_hxx <Transfer_IndexedDataMapNodeOfTransferMapOfProcessForFinder.hxx>
|
||||
#define Transfer_Iterator Transfer_IteratorOfProcessForFinder
|
||||
#define Transfer_Iterator_hxx <Transfer_IteratorOfProcessForFinder.hxx>
|
||||
#define Transfer_Actor Transfer_ActorOfProcessForFinder
|
||||
#define Transfer_Actor_hxx <Transfer_ActorOfProcessForFinder.hxx>
|
||||
#define Handle_Transfer_IndexedDataMapNodeOfTransferMap Handle(Transfer_IndexedDataMapNodeOfTransferMapOfProcessForFinder)
|
||||
#define Handle_Transfer_IndexedDataMapNodeOfTransferMap Handle(Transfer_IndexedDataMapNodeOfTransferMapOfProcessForFinder)
|
||||
#define Handle_Transfer_Actor Handle(Transfer_ActorOfProcessForFinder)
|
||||
#define Transfer_TransferProcess Transfer_ProcessForFinder
|
||||
#define Transfer_TransferProcess_hxx <Transfer_ProcessForFinder.hxx>
|
||||
#define Handle_Transfer_TransferProcess Handle(Transfer_ProcessForFinder)
|
||||
#include <Transfer_Iterator.gxx>
|
||||
|
81
src/Transfer/Transfer_IteratorOfProcessForTransient.hxx
Normal file
81
src/Transfer/Transfer_IteratorOfProcessForTransient.hxx
Normal file
@@ -0,0 +1,81 @@
|
||||
// Created on: 1992-02-03
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1992-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Transfer_IteratorOfProcessForTransient_HeaderFile
|
||||
#define _Transfer_IteratorOfProcessForTransient_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <TColStd_HSequenceOfTransient.hxx>
|
||||
#include <Transfer_TransferIterator.hxx>
|
||||
#include <TColStd_MapTransientHasher.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Standard_NoSuchObject;
|
||||
class Standard_Transient;
|
||||
class Transfer_ProcessForTransient;
|
||||
class Transfer_TransferMapOfProcessForTransient;
|
||||
class Transfer_IndexedDataMapNodeOfTransferMapOfProcessForTransient;
|
||||
class Transfer_ActorOfProcessForTransient;
|
||||
class Transfer_Binder;
|
||||
|
||||
|
||||
|
||||
class Transfer_IteratorOfProcessForTransient : public Transfer_TransferIterator
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT Transfer_IteratorOfProcessForTransient(const Standard_Boolean withstarts);
|
||||
|
||||
Standard_EXPORT void Add (const Handle(Transfer_Binder)& binder);
|
||||
|
||||
Standard_EXPORT void Add (const Handle(Transfer_Binder)& binder, const Handle(Standard_Transient)& start);
|
||||
|
||||
Standard_EXPORT void Filter (const Handle(TColStd_HSequenceOfTransient)& list, const Standard_Boolean keep = Standard_True);
|
||||
|
||||
Standard_EXPORT Standard_Boolean HasStarting() const;
|
||||
|
||||
Standard_EXPORT const Handle(Standard_Transient)& Starting() const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Handle(TColStd_HSequenceOfTransient) thestarts;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Transfer_IteratorOfProcessForTransient_HeaderFile
|
52
src/Transfer/Transfer_IteratorOfProcessForTransient_0.cxx
Normal file
52
src/Transfer/Transfer_IteratorOfProcessForTransient_0.cxx
Normal file
@@ -0,0 +1,52 @@
|
||||
// Created on: 1992-02-03
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1992-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Transfer_IteratorOfProcessForTransient.hxx>
|
||||
|
||||
#include <Standard_NoSuchObject.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <Transfer_ProcessForTransient.hxx>
|
||||
#include <Transfer_TransferMapOfProcessForTransient.hxx>
|
||||
#include <Transfer_IndexedDataMapNodeOfTransferMapOfProcessForTransient.hxx>
|
||||
#include <Transfer_ActorOfProcessForTransient.hxx>
|
||||
#include <Transfer_Binder.hxx>
|
||||
|
||||
|
||||
#define TheStart Handle(Standard_Transient)
|
||||
#define TheStart_hxx <Standard_Transient.hxx>
|
||||
#define TheMapHasher TColStd_MapTransientHasher
|
||||
#define TheMapHasher_hxx <TColStd_MapTransientHasher.hxx>
|
||||
#define Handle_TheList Handle(TColStd_HSequenceOfTransient)
|
||||
#define TheList TColStd_HSequenceOfTransient
|
||||
#define TheList_hxx <TColStd_HSequenceOfTransient.hxx>
|
||||
#define Transfer_TransferMap Transfer_TransferMapOfProcessForTransient
|
||||
#define Transfer_TransferMap_hxx <Transfer_TransferMapOfProcessForTransient.hxx>
|
||||
#define Transfer_IndexedDataMapNodeOfTransferMap Transfer_IndexedDataMapNodeOfTransferMapOfProcessForTransient
|
||||
#define Transfer_IndexedDataMapNodeOfTransferMap_hxx <Transfer_IndexedDataMapNodeOfTransferMapOfProcessForTransient.hxx>
|
||||
#define Transfer_IndexedDataMapNodeOfTransferMap Transfer_IndexedDataMapNodeOfTransferMapOfProcessForTransient
|
||||
#define Transfer_IndexedDataMapNodeOfTransferMap_hxx <Transfer_IndexedDataMapNodeOfTransferMapOfProcessForTransient.hxx>
|
||||
#define Transfer_Iterator Transfer_IteratorOfProcessForTransient
|
||||
#define Transfer_Iterator_hxx <Transfer_IteratorOfProcessForTransient.hxx>
|
||||
#define Transfer_Actor Transfer_ActorOfProcessForTransient
|
||||
#define Transfer_Actor_hxx <Transfer_ActorOfProcessForTransient.hxx>
|
||||
#define Handle_Transfer_IndexedDataMapNodeOfTransferMap Handle(Transfer_IndexedDataMapNodeOfTransferMapOfProcessForTransient)
|
||||
#define Handle_Transfer_IndexedDataMapNodeOfTransferMap Handle(Transfer_IndexedDataMapNodeOfTransferMapOfProcessForTransient)
|
||||
#define Handle_Transfer_Actor Handle(Transfer_ActorOfProcessForTransient)
|
||||
#define Transfer_TransferProcess Transfer_ProcessForTransient
|
||||
#define Transfer_TransferProcess_hxx <Transfer_ProcessForTransient.hxx>
|
||||
#define Handle_Transfer_TransferProcess Handle(Transfer_ProcessForTransient)
|
||||
#include <Transfer_Iterator.gxx>
|
||||
|
@@ -1,38 +0,0 @@
|
||||
-- Created on: 2001-09-10
|
||||
-- Created by: Sergey KUUL
|
||||
-- Copyright (c) 2001-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class MapContainer from Transfer inherits TShared from MMgt
|
||||
|
||||
---Purpose:
|
||||
|
||||
uses
|
||||
|
||||
DataMapOfTransientTransient from TColStd
|
||||
|
||||
is
|
||||
|
||||
Create returns MapContainer from Transfer;
|
||||
|
||||
SetMapObjects(me : mutable; theMapObjects : in out DataMapOfTransientTransient from TColStd);
|
||||
---Purposes:Set map already translated geometry objects.
|
||||
|
||||
GetMapObjects(me: mutable) returns DataMapOfTransientTransient from TColStd;
|
||||
---Purposes:Get map already translated geometry objects.
|
||||
---C++:return &
|
||||
fields
|
||||
|
||||
myMapObj : DataMapOfTransientTransient from TColStd;
|
||||
|
||||
end MapContainer;
|
@@ -11,7 +11,9 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Transfer_MapContainer.ixx>
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
#include <Transfer_MapContainer.hxx>
|
||||
|
||||
Transfer_MapContainer::Transfer_MapContainer()
|
||||
{
|
||||
|
68
src/Transfer/Transfer_MapContainer.hxx
Normal file
68
src/Transfer/Transfer_MapContainer.hxx
Normal file
@@ -0,0 +1,68 @@
|
||||
// Created on: 2001-09-10
|
||||
// Created by: Sergey KUUL
|
||||
// Copyright (c) 2001-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Transfer_MapContainer_HeaderFile
|
||||
#define _Transfer_MapContainer_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <TColStd_DataMapOfTransientTransient.hxx>
|
||||
#include <MMgt_TShared.hxx>
|
||||
|
||||
|
||||
class Transfer_MapContainer;
|
||||
DEFINE_STANDARD_HANDLE(Transfer_MapContainer, MMgt_TShared)
|
||||
|
||||
|
||||
class Transfer_MapContainer : public MMgt_TShared
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT Transfer_MapContainer();
|
||||
|
||||
//! Set map already translated geometry objects.
|
||||
Standard_EXPORT void SetMapObjects (TColStd_DataMapOfTransientTransient& theMapObjects);
|
||||
|
||||
//! Get map already translated geometry objects.
|
||||
Standard_EXPORT TColStd_DataMapOfTransientTransient& GetMapObjects();
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(Transfer_MapContainer,MMgt_TShared)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
TColStd_DataMapOfTransientTransient myMapObj;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Transfer_MapContainer_HeaderFile
|
@@ -1,62 +0,0 @@
|
||||
-- Created on: 1994-11-04
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1994-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
generic class Mapper from Transfer
|
||||
(TheKey as any;
|
||||
TheHasher as any;
|
||||
TheInfo as any)
|
||||
inherits Finder
|
||||
|
||||
---Purpose : a Mapper defines a Finder for a specific input class
|
||||
-- its definition includes the value of the Key to be mapped,
|
||||
-- and the HashCoder associated to the class of the Key
|
||||
--
|
||||
-- TheKey defines the class to be keyed
|
||||
-- TheHasher is the associated Hasher
|
||||
-- TheInfo is an additionnal class which helps to provide
|
||||
-- informations on the value (template : see DataInfo)
|
||||
|
||||
uses CString
|
||||
|
||||
is
|
||||
|
||||
Create (akey : any TheKey) returns Mapper;
|
||||
---Purpose : Creates a Mapper with a Value. This Value can then not be
|
||||
-- changed. It is used by the Hasher to compute the HashCode,
|
||||
-- which will then be stored for an immediate reading.
|
||||
|
||||
Value (me) returns any TheKey is static;
|
||||
---Purpose : Returns the contained value
|
||||
---C++ : return const &
|
||||
|
||||
Equates (me; other : Finder) returns Boolean;
|
||||
---Purpose : Specific testof equallity : defined as False if <other> has
|
||||
-- not the same true Type, else contents are compared (by
|
||||
-- C++ operator ==)
|
||||
|
||||
ValueType (me) returns Type is redefined;
|
||||
---Purpose : Returns the Type of the Value. By default, returns the
|
||||
-- DynamicType of <me>, but can be redefined
|
||||
|
||||
ValueTypeName (me) returns CString is redefined;
|
||||
---Purpose : Returns the name of the Type of the Value. Default is name
|
||||
-- of ValueType, unless it is for a non-handled object
|
||||
|
||||
fields
|
||||
|
||||
theval : TheKey;
|
||||
|
||||
end Mapper;
|
@@ -1,84 +0,0 @@
|
||||
-- Created on: 1993-04-07
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1993-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class MultipleBinder from Transfer inherits Binder
|
||||
|
||||
---Purpose : Allows direct binding between a starting Object and the Result
|
||||
-- of its transfer, when it can be made of several Transient
|
||||
-- Objects. Compared to a Transcriptor, it has no Transfer Action
|
||||
--
|
||||
-- Result is a list of Transient Results. Unique Result is not
|
||||
-- available : SetResult is redefined to start the list on the
|
||||
-- first call, and refuse the other times.
|
||||
--
|
||||
-- rr
|
||||
--
|
||||
-- Remark : MultipleBinder itself is intended to be created and
|
||||
-- filled by TransferProcess itself (method Bind). In particular,
|
||||
-- conflicts between Unique (Standard) result and Multiple result
|
||||
-- are avoided through management made by TransferProcess.
|
||||
--
|
||||
-- Also, a Transcriptor (with an effective Transfer Method) which
|
||||
-- can produce a Multiple Result, may be defined as a sub-class
|
||||
-- of MultipleBinder by redefining method Transfer.
|
||||
|
||||
uses CString, Transient, Type, HSequenceOfTransient from TColStd
|
||||
|
||||
raises TransferFailure, OutOfRange
|
||||
|
||||
is
|
||||
|
||||
Create returns MultipleBinder;
|
||||
---Purpose : normal standard constructor, creates an empty MultipleBinder
|
||||
|
||||
IsMultiple (me) returns Boolean is redefined;
|
||||
---Purpose : Returns True if a starting object is bound with SEVERAL
|
||||
-- results : Here, returns allways True
|
||||
|
||||
ResultType (me) returns Type;
|
||||
---Purpose : Returns the Type permitted for Results, i.e. here Transient
|
||||
|
||||
ResultTypeName (me) returns CString;
|
||||
---Purpose : Returns the Name of the Type which characterizes the Result
|
||||
-- Here, returns "(list)"
|
||||
|
||||
|
||||
AddResult (me : mutable; res : Transient);
|
||||
---Purpose : Adds a new Item to the Multiple Result
|
||||
|
||||
NbResults (me) returns Integer;
|
||||
---Purpose : Returns the actual count of recorded (Transient) results
|
||||
|
||||
ResultValue (me; num : Integer) returns Transient
|
||||
---Purpose : Returns the value of the recorded result n0 <num>
|
||||
raises OutOfRange;
|
||||
-- Error if <num> is out of range
|
||||
|
||||
MultipleResult (me) returns HSequenceOfTransient from TColStd;
|
||||
---Purpose : Returns the Multiple Result, if it is defined (at least one
|
||||
-- Item). Else, returns a Null Handle
|
||||
|
||||
SetMultipleResult (me : mutable;
|
||||
mulres : HSequenceOfTransient from TColStd)
|
||||
raises TransferFailure;
|
||||
---Purpose : Defines a Binding with a Multiple Result, given as a Sequence
|
||||
-- Error if a Unique Result has yet been defined
|
||||
|
||||
fields
|
||||
|
||||
themulres : HSequenceOfTransient from TColStd;
|
||||
|
||||
end MultipleBinder;
|
@@ -11,19 +11,17 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Transfer_MultipleBinder.ixx>
|
||||
#include <Transfer_TransferFailure.hxx>
|
||||
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
#include <Transfer_MultipleBinder.hxx>
|
||||
#include <Transfer_TransferFailure.hxx>
|
||||
|
||||
// Resultat Multiple
|
||||
// Possibilite de definir un Resultat Multiple : plusieurs objets resultant
|
||||
// d un Transfert, sans pouvoir les distinguer
|
||||
// N.B. : Pour l heure, tous Transients (pourra evoluer)
|
||||
|
||||
|
||||
|
||||
Transfer_MultipleBinder::Transfer_MultipleBinder () { }
|
||||
|
||||
|
||||
|
116
src/Transfer/Transfer_MultipleBinder.hxx
Normal file
116
src/Transfer/Transfer_MultipleBinder.hxx
Normal file
@@ -0,0 +1,116 @@
|
||||
// Created on: 1993-04-07
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1993-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Transfer_MultipleBinder_HeaderFile
|
||||
#define _Transfer_MultipleBinder_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <TColStd_HSequenceOfTransient.hxx>
|
||||
#include <Transfer_Binder.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
class Transfer_TransferFailure;
|
||||
class Standard_OutOfRange;
|
||||
class Standard_Transient;
|
||||
|
||||
|
||||
class Transfer_MultipleBinder;
|
||||
DEFINE_STANDARD_HANDLE(Transfer_MultipleBinder, Transfer_Binder)
|
||||
|
||||
//! Allows direct binding between a starting Object and the Result
|
||||
//! of its transfer, when it can be made of several Transient
|
||||
//! Objects. Compared to a Transcriptor, it has no Transfer Action
|
||||
//!
|
||||
//! Result is a list of Transient Results. Unique Result is not
|
||||
//! available : SetResult is redefined to start the list on the
|
||||
//! first call, and refuse the other times.
|
||||
//!
|
||||
//! rr
|
||||
//!
|
||||
//! Remark : MultipleBinder itself is intended to be created and
|
||||
//! filled by TransferProcess itself (method Bind). In particular,
|
||||
//! conflicts between Unique (Standard) result and Multiple result
|
||||
//! are avoided through management made by TransferProcess.
|
||||
//!
|
||||
//! Also, a Transcriptor (with an effective Transfer Method) which
|
||||
//! can produce a Multiple Result, may be defined as a sub-class
|
||||
//! of MultipleBinder by redefining method Transfer.
|
||||
class Transfer_MultipleBinder : public Transfer_Binder
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! normal standard constructor, creates an empty MultipleBinder
|
||||
Standard_EXPORT Transfer_MultipleBinder();
|
||||
|
||||
//! Returns True if a starting object is bound with SEVERAL
|
||||
//! results : Here, returns allways True
|
||||
Standard_EXPORT virtual Standard_Boolean IsMultiple() const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the Type permitted for Results, i.e. here Transient
|
||||
Standard_EXPORT Handle(Standard_Type) ResultType() const;
|
||||
|
||||
//! Returns the Name of the Type which characterizes the Result
|
||||
//! Here, returns "(list)"
|
||||
Standard_EXPORT Standard_CString ResultTypeName() const;
|
||||
|
||||
//! Adds a new Item to the Multiple Result
|
||||
Standard_EXPORT void AddResult (const Handle(Standard_Transient)& res);
|
||||
|
||||
//! Returns the actual count of recorded (Transient) results
|
||||
Standard_EXPORT Standard_Integer NbResults() const;
|
||||
|
||||
//! Returns the value of the recorded result n0 <num>
|
||||
Standard_EXPORT Handle(Standard_Transient) ResultValue (const Standard_Integer num) const;
|
||||
|
||||
//! Returns the Multiple Result, if it is defined (at least one
|
||||
//! Item). Else, returns a Null Handle
|
||||
Standard_EXPORT Handle(TColStd_HSequenceOfTransient) MultipleResult() const;
|
||||
|
||||
//! Defines a Binding with a Multiple Result, given as a Sequence
|
||||
//! Error if a Unique Result has yet been defined
|
||||
Standard_EXPORT void SetMultipleResult (const Handle(TColStd_HSequenceOfTransient)& mulres);
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(Transfer_MultipleBinder,Transfer_Binder)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Handle(TColStd_HSequenceOfTransient) themulres;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Transfer_MultipleBinder_HeaderFile
|
228
src/Transfer/Transfer_ProcessForFinder.hxx
Normal file
228
src/Transfer/Transfer_ProcessForFinder.hxx
Normal file
@@ -0,0 +1,228 @@
|
||||
// Created on: 1992-02-03
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1992-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Transfer_ProcessForFinder_HeaderFile
|
||||
#define _Transfer_ProcessForFinder_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <TColStd_IndexedMapOfInteger.hxx>
|
||||
#include <Transfer_TransferMapOfProcessForFinder.hxx>
|
||||
#include <MMgt_TShared.hxx>
|
||||
#include <Transfer_HSequenceOfFinder.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
class Message_Messenger;
|
||||
class Transfer_Finder;
|
||||
class Transfer_Binder;
|
||||
class Transfer_ActorOfProcessForFinder;
|
||||
class Message_ProgressIndicator;
|
||||
class Interface_InterfaceError;
|
||||
class Transfer_TransferFailure;
|
||||
class Transfer_FindHasher;
|
||||
class Transfer_TransferMapOfProcessForFinder;
|
||||
class Transfer_IndexedDataMapNodeOfTransferMapOfProcessForFinder;
|
||||
class Transfer_IteratorOfProcessForFinder;
|
||||
class Message_Msg;
|
||||
class Interface_Check;
|
||||
class Standard_Transient;
|
||||
class Interface_CheckIterator;
|
||||
|
||||
|
||||
class Transfer_ProcessForFinder;
|
||||
DEFINE_STANDARD_HANDLE(Transfer_ProcessForFinder, MMgt_TShared)
|
||||
|
||||
|
||||
class Transfer_ProcessForFinder : public MMgt_TShared
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT Transfer_ProcessForFinder(const Standard_Integer nb = 10000);
|
||||
|
||||
Standard_EXPORT Transfer_ProcessForFinder(const Handle(Message_Messenger)& printer, const Standard_Integer nb = 10000);
|
||||
|
||||
Standard_EXPORT void Clear();
|
||||
|
||||
Standard_EXPORT void Clean();
|
||||
|
||||
Standard_EXPORT void Resize (const Standard_Integer nb);
|
||||
|
||||
Standard_EXPORT void SetActor (const Handle(Transfer_ActorOfProcessForFinder)& actor);
|
||||
|
||||
Standard_EXPORT Handle(Transfer_ActorOfProcessForFinder) Actor() const;
|
||||
|
||||
Standard_EXPORT Handle(Transfer_Binder) Find (const Handle(Transfer_Finder)& start) const;
|
||||
|
||||
Standard_EXPORT Standard_Boolean IsBound (const Handle(Transfer_Finder)& start) const;
|
||||
|
||||
Standard_EXPORT Standard_Boolean IsAlreadyUsed (const Handle(Transfer_Finder)& start) const;
|
||||
|
||||
Standard_EXPORT void Bind (const Handle(Transfer_Finder)& start, const Handle(Transfer_Binder)& binder);
|
||||
|
||||
Standard_EXPORT void Rebind (const Handle(Transfer_Finder)& start, const Handle(Transfer_Binder)& binder);
|
||||
|
||||
Standard_EXPORT Standard_Boolean Unbind (const Handle(Transfer_Finder)& start);
|
||||
|
||||
Standard_EXPORT Handle(Transfer_Binder) FindElseBind (const Handle(Transfer_Finder)& start);
|
||||
|
||||
Standard_EXPORT void SetMessenger (const Handle(Message_Messenger)& messenger);
|
||||
|
||||
Standard_EXPORT Handle(Message_Messenger) Messenger() const;
|
||||
|
||||
Standard_EXPORT void SetTraceLevel (const Standard_Integer tracelev);
|
||||
|
||||
Standard_EXPORT Standard_Integer TraceLevel() const;
|
||||
|
||||
Standard_EXPORT void SendFail (const Handle(Transfer_Finder)& start, const Message_Msg& amsg);
|
||||
|
||||
Standard_EXPORT void SendWarning (const Handle(Transfer_Finder)& start, const Message_Msg& amsg);
|
||||
|
||||
Standard_EXPORT void SendMsg (const Handle(Transfer_Finder)& start, const Message_Msg& amsg);
|
||||
|
||||
Standard_EXPORT void AddFail (const Handle(Transfer_Finder)& start, const Standard_CString mess, const Standard_CString orig = "");
|
||||
|
||||
Standard_EXPORT void AddError (const Handle(Transfer_Finder)& start, const Standard_CString mess, const Standard_CString orig = "");
|
||||
|
||||
Standard_EXPORT void AddFail (const Handle(Transfer_Finder)& start, const Message_Msg& amsg);
|
||||
|
||||
Standard_EXPORT void AddWarning (const Handle(Transfer_Finder)& start, const Standard_CString mess, const Standard_CString orig = "");
|
||||
|
||||
Standard_EXPORT void AddWarning (const Handle(Transfer_Finder)& start, const Message_Msg& amsg);
|
||||
|
||||
Standard_EXPORT void Mend (const Handle(Transfer_Finder)& start, const Standard_CString pref = "");
|
||||
|
||||
Standard_EXPORT Handle(Interface_Check) Check (const Handle(Transfer_Finder)& start) const;
|
||||
|
||||
Standard_EXPORT void BindTransient (const Handle(Transfer_Finder)& start, const Handle(Standard_Transient)& res);
|
||||
|
||||
Standard_EXPORT const Handle(Standard_Transient)& FindTransient (const Handle(Transfer_Finder)& start) const;
|
||||
|
||||
Standard_EXPORT void BindMultiple (const Handle(Transfer_Finder)& start);
|
||||
|
||||
Standard_EXPORT void AddMultiple (const Handle(Transfer_Finder)& start, const Handle(Standard_Transient)& res);
|
||||
|
||||
Standard_EXPORT Standard_Boolean FindTypedTransient (const Handle(Transfer_Finder)& start, const Handle(Standard_Type)& atype, Handle(Standard_Transient)& val) const;
|
||||
|
||||
Standard_EXPORT Standard_Boolean GetTypedTransient (const Handle(Transfer_Binder)& binder, const Handle(Standard_Type)& atype, Handle(Standard_Transient)& val) const;
|
||||
|
||||
Standard_EXPORT Standard_Integer NbMapped() const;
|
||||
|
||||
Standard_EXPORT const Handle(Transfer_Finder)& Mapped (const Standard_Integer num) const;
|
||||
|
||||
Standard_EXPORT Standard_Integer MapIndex (const Handle(Transfer_Finder)& start) const;
|
||||
|
||||
Standard_EXPORT Handle(Transfer_Binder) MapItem (const Standard_Integer num) const;
|
||||
|
||||
Standard_EXPORT void SetRoot (const Handle(Transfer_Finder)& start);
|
||||
|
||||
Standard_EXPORT void SetRootManagement (const Standard_Boolean stat);
|
||||
|
||||
Standard_EXPORT Standard_Integer NbRoots() const;
|
||||
|
||||
Standard_EXPORT const Handle(Transfer_Finder)& Root (const Standard_Integer num) const;
|
||||
|
||||
Standard_EXPORT Handle(Transfer_Binder) RootItem (const Standard_Integer num) const;
|
||||
|
||||
Standard_EXPORT Standard_Integer RootIndex (const Handle(Transfer_Finder)& start) const;
|
||||
|
||||
Standard_EXPORT Standard_Integer NestingLevel() const;
|
||||
|
||||
Standard_EXPORT void ResetNestingLevel();
|
||||
|
||||
Standard_EXPORT Standard_Boolean Recognize (const Handle(Transfer_Finder)& start) const;
|
||||
|
||||
Standard_EXPORT Handle(Transfer_Binder) Transferring (const Handle(Transfer_Finder)& start);
|
||||
|
||||
Standard_EXPORT Standard_Boolean Transfer (const Handle(Transfer_Finder)& start);
|
||||
|
||||
Standard_EXPORT void SetErrorHandle (const Standard_Boolean err);
|
||||
|
||||
Standard_EXPORT Standard_Boolean ErrorHandle() const;
|
||||
|
||||
Standard_EXPORT void StartTrace (const Handle(Transfer_Binder)& binder, const Handle(Transfer_Finder)& start, const Standard_Integer level, const Standard_Integer mode) const;
|
||||
|
||||
Standard_EXPORT virtual void PrintTrace (const Handle(Transfer_Finder)& start, const Handle(Message_Messenger)& S) const;
|
||||
|
||||
Standard_EXPORT Standard_Boolean IsLooping (const Standard_Integer alevel) const;
|
||||
|
||||
Standard_EXPORT Transfer_IteratorOfProcessForFinder RootResult (const Standard_Boolean withstart = Standard_False) const;
|
||||
|
||||
Standard_EXPORT Transfer_IteratorOfProcessForFinder CompleteResult (const Standard_Boolean withstart = Standard_False) const;
|
||||
|
||||
Standard_EXPORT Transfer_IteratorOfProcessForFinder AbnormalResult() const;
|
||||
|
||||
Standard_EXPORT Interface_CheckIterator CheckList (const Standard_Boolean erronly) const;
|
||||
|
||||
Standard_EXPORT Transfer_IteratorOfProcessForFinder ResultOne (const Handle(Transfer_Finder)& start, const Standard_Integer level, const Standard_Boolean withstart = Standard_False) const;
|
||||
|
||||
Standard_EXPORT Interface_CheckIterator CheckListOne (const Handle(Transfer_Finder)& start, const Standard_Integer level, const Standard_Boolean erronly) const;
|
||||
|
||||
Standard_EXPORT Standard_Boolean IsCheckListEmpty (const Handle(Transfer_Finder)& start, const Standard_Integer level, const Standard_Boolean erronly) const;
|
||||
|
||||
Standard_EXPORT void RemoveResult (const Handle(Transfer_Finder)& start, const Standard_Integer level, const Standard_Boolean compute = Standard_True);
|
||||
|
||||
Standard_EXPORT virtual Standard_Integer CheckNum (const Handle(Transfer_Finder)& start) const;
|
||||
|
||||
Standard_EXPORT void SetProgress (const Handle(Message_ProgressIndicator)& theProgress);
|
||||
|
||||
Standard_EXPORT Handle(Message_ProgressIndicator) GetProgress() const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(Transfer_ProcessForFinder,MMgt_TShared)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Standard_EXPORT Handle(Transfer_Binder) FindAndMask (const Handle(Transfer_Finder)& start);
|
||||
|
||||
Standard_EXPORT Handle(Transfer_Binder) TransferProduct (const Handle(Transfer_Finder)& start);
|
||||
|
||||
Standard_Boolean theerrh;
|
||||
Standard_Integer thetrace;
|
||||
Handle(Message_Messenger) themessenger;
|
||||
Standard_Integer thelevel;
|
||||
Standard_Integer therootl;
|
||||
Standard_Boolean therootm;
|
||||
TColStd_IndexedMapOfInteger theroots;
|
||||
Handle(Transfer_Finder) thelastobj;
|
||||
Handle(Transfer_Binder) thelastbnd;
|
||||
Standard_Integer theindex;
|
||||
Handle(Transfer_ActorOfProcessForFinder) theactor;
|
||||
Transfer_TransferMapOfProcessForFinder themap;
|
||||
Handle(Message_ProgressIndicator) myProgress;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Transfer_ProcessForFinder_HeaderFile
|
70
src/Transfer/Transfer_ProcessForFinder_0.cxx
Normal file
70
src/Transfer/Transfer_ProcessForFinder_0.cxx
Normal file
@@ -0,0 +1,70 @@
|
||||
// Created on: 1992-02-03
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1992-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Transfer_ProcessForFinder.hxx>
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Message_Messenger.hxx>
|
||||
#include <Transfer_Finder.hxx>
|
||||
#include <Transfer_Binder.hxx>
|
||||
#include <Transfer_ActorOfProcessForFinder.hxx>
|
||||
#include <Message_ProgressIndicator.hxx>
|
||||
#include <Interface_InterfaceError.hxx>
|
||||
#include <Transfer_TransferFailure.hxx>
|
||||
#include <Transfer_FindHasher.hxx>
|
||||
#include <Transfer_TransferMapOfProcessForFinder.hxx>
|
||||
#include <Transfer_IndexedDataMapNodeOfTransferMapOfProcessForFinder.hxx>
|
||||
#include <Transfer_IteratorOfProcessForFinder.hxx>
|
||||
#include <Message_Msg.hxx>
|
||||
#include <Interface_Check.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <Interface_CheckIterator.hxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define TheStart Handle(Transfer_Finder)
|
||||
#define TheStart_hxx <Transfer_Finder.hxx>
|
||||
#define TheMapHasher Transfer_FindHasher
|
||||
#define TheMapHasher_hxx <Transfer_FindHasher.hxx>
|
||||
#define Handle_TheList Handle(Transfer_HSequenceOfFinder)
|
||||
#define TheList Transfer_HSequenceOfFinder
|
||||
#define TheList_hxx <Transfer_HSequenceOfFinder.hxx>
|
||||
#define Transfer_TransferMap Transfer_TransferMapOfProcessForFinder
|
||||
#define Transfer_TransferMap_hxx <Transfer_TransferMapOfProcessForFinder.hxx>
|
||||
#define Transfer_IndexedDataMapNodeOfTransferMap Transfer_IndexedDataMapNodeOfTransferMapOfProcessForFinder
|
||||
#define Transfer_IndexedDataMapNodeOfTransferMap_hxx <Transfer_IndexedDataMapNodeOfTransferMapOfProcessForFinder.hxx>
|
||||
#define Transfer_IndexedDataMapNodeOfTransferMap Transfer_IndexedDataMapNodeOfTransferMapOfProcessForFinder
|
||||
#define Transfer_IndexedDataMapNodeOfTransferMap_hxx <Transfer_IndexedDataMapNodeOfTransferMapOfProcessForFinder.hxx>
|
||||
#define Transfer_Iterator Transfer_IteratorOfProcessForFinder
|
||||
#define Transfer_Iterator_hxx <Transfer_IteratorOfProcessForFinder.hxx>
|
||||
#define Transfer_Actor Transfer_ActorOfProcessForFinder
|
||||
#define Transfer_Actor_hxx <Transfer_ActorOfProcessForFinder.hxx>
|
||||
#define Handle_Transfer_IndexedDataMapNodeOfTransferMap Handle(Transfer_IndexedDataMapNodeOfTransferMapOfProcessForFinder)
|
||||
#define Handle_Transfer_IndexedDataMapNodeOfTransferMap Handle(Transfer_IndexedDataMapNodeOfTransferMapOfProcessForFinder)
|
||||
#define Handle_Transfer_Actor Handle(Transfer_ActorOfProcessForFinder)
|
||||
#define Transfer_TransferProcess Transfer_ProcessForFinder
|
||||
#define Transfer_TransferProcess_hxx <Transfer_ProcessForFinder.hxx>
|
||||
#define Handle_Transfer_TransferProcess Handle(Transfer_ProcessForFinder)
|
||||
#include <Transfer_TransferProcess.gxx>
|
||||
|
227
src/Transfer/Transfer_ProcessForTransient.hxx
Normal file
227
src/Transfer/Transfer_ProcessForTransient.hxx
Normal file
@@ -0,0 +1,227 @@
|
||||
// Created on: 1992-02-03
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1992-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Transfer_ProcessForTransient_HeaderFile
|
||||
#define _Transfer_ProcessForTransient_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <TColStd_IndexedMapOfInteger.hxx>
|
||||
#include <Transfer_TransferMapOfProcessForTransient.hxx>
|
||||
#include <MMgt_TShared.hxx>
|
||||
#include <TColStd_MapTransientHasher.hxx>
|
||||
#include <TColStd_HSequenceOfTransient.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
class Message_Messenger;
|
||||
class Standard_Transient;
|
||||
class Transfer_Binder;
|
||||
class Transfer_ActorOfProcessForTransient;
|
||||
class Message_ProgressIndicator;
|
||||
class Interface_InterfaceError;
|
||||
class Transfer_TransferFailure;
|
||||
class Transfer_TransferMapOfProcessForTransient;
|
||||
class Transfer_IndexedDataMapNodeOfTransferMapOfProcessForTransient;
|
||||
class Transfer_IteratorOfProcessForTransient;
|
||||
class Message_Msg;
|
||||
class Interface_Check;
|
||||
class Interface_CheckIterator;
|
||||
|
||||
|
||||
class Transfer_ProcessForTransient;
|
||||
DEFINE_STANDARD_HANDLE(Transfer_ProcessForTransient, MMgt_TShared)
|
||||
|
||||
|
||||
class Transfer_ProcessForTransient : public MMgt_TShared
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT Transfer_ProcessForTransient(const Standard_Integer nb = 10000);
|
||||
|
||||
Standard_EXPORT Transfer_ProcessForTransient(const Handle(Message_Messenger)& printer, const Standard_Integer nb = 10000);
|
||||
|
||||
Standard_EXPORT void Clear();
|
||||
|
||||
Standard_EXPORT void Clean();
|
||||
|
||||
Standard_EXPORT void Resize (const Standard_Integer nb);
|
||||
|
||||
Standard_EXPORT void SetActor (const Handle(Transfer_ActorOfProcessForTransient)& actor);
|
||||
|
||||
Standard_EXPORT Handle(Transfer_ActorOfProcessForTransient) Actor() const;
|
||||
|
||||
Standard_EXPORT Handle(Transfer_Binder) Find (const Handle(Standard_Transient)& start) const;
|
||||
|
||||
Standard_EXPORT Standard_Boolean IsBound (const Handle(Standard_Transient)& start) const;
|
||||
|
||||
Standard_EXPORT Standard_Boolean IsAlreadyUsed (const Handle(Standard_Transient)& start) const;
|
||||
|
||||
Standard_EXPORT void Bind (const Handle(Standard_Transient)& start, const Handle(Transfer_Binder)& binder);
|
||||
|
||||
Standard_EXPORT void Rebind (const Handle(Standard_Transient)& start, const Handle(Transfer_Binder)& binder);
|
||||
|
||||
Standard_EXPORT Standard_Boolean Unbind (const Handle(Standard_Transient)& start);
|
||||
|
||||
Standard_EXPORT Handle(Transfer_Binder) FindElseBind (const Handle(Standard_Transient)& start);
|
||||
|
||||
Standard_EXPORT void SetMessenger (const Handle(Message_Messenger)& messenger);
|
||||
|
||||
Standard_EXPORT Handle(Message_Messenger) Messenger() const;
|
||||
|
||||
Standard_EXPORT void SetTraceLevel (const Standard_Integer tracelev);
|
||||
|
||||
Standard_EXPORT Standard_Integer TraceLevel() const;
|
||||
|
||||
Standard_EXPORT void SendFail (const Handle(Standard_Transient)& start, const Message_Msg& amsg);
|
||||
|
||||
Standard_EXPORT void SendWarning (const Handle(Standard_Transient)& start, const Message_Msg& amsg);
|
||||
|
||||
Standard_EXPORT void SendMsg (const Handle(Standard_Transient)& start, const Message_Msg& amsg);
|
||||
|
||||
Standard_EXPORT void AddFail (const Handle(Standard_Transient)& start, const Standard_CString mess, const Standard_CString orig = "");
|
||||
|
||||
Standard_EXPORT void AddError (const Handle(Standard_Transient)& start, const Standard_CString mess, const Standard_CString orig = "");
|
||||
|
||||
Standard_EXPORT void AddFail (const Handle(Standard_Transient)& start, const Message_Msg& amsg);
|
||||
|
||||
Standard_EXPORT void AddWarning (const Handle(Standard_Transient)& start, const Standard_CString mess, const Standard_CString orig = "");
|
||||
|
||||
Standard_EXPORT void AddWarning (const Handle(Standard_Transient)& start, const Message_Msg& amsg);
|
||||
|
||||
Standard_EXPORT void Mend (const Handle(Standard_Transient)& start, const Standard_CString pref = "");
|
||||
|
||||
Standard_EXPORT Handle(Interface_Check) Check (const Handle(Standard_Transient)& start) const;
|
||||
|
||||
Standard_EXPORT void BindTransient (const Handle(Standard_Transient)& start, const Handle(Standard_Transient)& res);
|
||||
|
||||
Standard_EXPORT const Handle(Standard_Transient)& FindTransient (const Handle(Standard_Transient)& start) const;
|
||||
|
||||
Standard_EXPORT void BindMultiple (const Handle(Standard_Transient)& start);
|
||||
|
||||
Standard_EXPORT void AddMultiple (const Handle(Standard_Transient)& start, const Handle(Standard_Transient)& res);
|
||||
|
||||
Standard_EXPORT Standard_Boolean FindTypedTransient (const Handle(Standard_Transient)& start, const Handle(Standard_Type)& atype, Handle(Standard_Transient)& val) const;
|
||||
|
||||
Standard_EXPORT Standard_Boolean GetTypedTransient (const Handle(Transfer_Binder)& binder, const Handle(Standard_Type)& atype, Handle(Standard_Transient)& val) const;
|
||||
|
||||
Standard_EXPORT Standard_Integer NbMapped() const;
|
||||
|
||||
Standard_EXPORT const Handle(Standard_Transient)& Mapped (const Standard_Integer num) const;
|
||||
|
||||
Standard_EXPORT Standard_Integer MapIndex (const Handle(Standard_Transient)& start) const;
|
||||
|
||||
Standard_EXPORT Handle(Transfer_Binder) MapItem (const Standard_Integer num) const;
|
||||
|
||||
Standard_EXPORT void SetRoot (const Handle(Standard_Transient)& start);
|
||||
|
||||
Standard_EXPORT void SetRootManagement (const Standard_Boolean stat);
|
||||
|
||||
Standard_EXPORT Standard_Integer NbRoots() const;
|
||||
|
||||
Standard_EXPORT const Handle(Standard_Transient)& Root (const Standard_Integer num) const;
|
||||
|
||||
Standard_EXPORT Handle(Transfer_Binder) RootItem (const Standard_Integer num) const;
|
||||
|
||||
Standard_EXPORT Standard_Integer RootIndex (const Handle(Standard_Transient)& start) const;
|
||||
|
||||
Standard_EXPORT Standard_Integer NestingLevel() const;
|
||||
|
||||
Standard_EXPORT void ResetNestingLevel();
|
||||
|
||||
Standard_EXPORT Standard_Boolean Recognize (const Handle(Standard_Transient)& start) const;
|
||||
|
||||
Standard_EXPORT Handle(Transfer_Binder) Transferring (const Handle(Standard_Transient)& start);
|
||||
|
||||
Standard_EXPORT Standard_Boolean Transfer (const Handle(Standard_Transient)& start);
|
||||
|
||||
Standard_EXPORT void SetErrorHandle (const Standard_Boolean err);
|
||||
|
||||
Standard_EXPORT Standard_Boolean ErrorHandle() const;
|
||||
|
||||
Standard_EXPORT void StartTrace (const Handle(Transfer_Binder)& binder, const Handle(Standard_Transient)& start, const Standard_Integer level, const Standard_Integer mode) const;
|
||||
|
||||
Standard_EXPORT virtual void PrintTrace (const Handle(Standard_Transient)& start, const Handle(Message_Messenger)& S) const;
|
||||
|
||||
Standard_EXPORT Standard_Boolean IsLooping (const Standard_Integer alevel) const;
|
||||
|
||||
Standard_EXPORT Transfer_IteratorOfProcessForTransient RootResult (const Standard_Boolean withstart = Standard_False) const;
|
||||
|
||||
Standard_EXPORT Transfer_IteratorOfProcessForTransient CompleteResult (const Standard_Boolean withstart = Standard_False) const;
|
||||
|
||||
Standard_EXPORT Transfer_IteratorOfProcessForTransient AbnormalResult() const;
|
||||
|
||||
Standard_EXPORT Interface_CheckIterator CheckList (const Standard_Boolean erronly) const;
|
||||
|
||||
Standard_EXPORT Transfer_IteratorOfProcessForTransient ResultOne (const Handle(Standard_Transient)& start, const Standard_Integer level, const Standard_Boolean withstart = Standard_False) const;
|
||||
|
||||
Standard_EXPORT Interface_CheckIterator CheckListOne (const Handle(Standard_Transient)& start, const Standard_Integer level, const Standard_Boolean erronly) const;
|
||||
|
||||
Standard_EXPORT Standard_Boolean IsCheckListEmpty (const Handle(Standard_Transient)& start, const Standard_Integer level, const Standard_Boolean erronly) const;
|
||||
|
||||
Standard_EXPORT void RemoveResult (const Handle(Standard_Transient)& start, const Standard_Integer level, const Standard_Boolean compute = Standard_True);
|
||||
|
||||
Standard_EXPORT virtual Standard_Integer CheckNum (const Handle(Standard_Transient)& start) const;
|
||||
|
||||
Standard_EXPORT void SetProgress (const Handle(Message_ProgressIndicator)& theProgress);
|
||||
|
||||
Standard_EXPORT Handle(Message_ProgressIndicator) GetProgress() const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(Transfer_ProcessForTransient,MMgt_TShared)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Standard_EXPORT Handle(Transfer_Binder) FindAndMask (const Handle(Standard_Transient)& start);
|
||||
|
||||
Standard_EXPORT Handle(Transfer_Binder) TransferProduct (const Handle(Standard_Transient)& start);
|
||||
|
||||
Standard_Boolean theerrh;
|
||||
Standard_Integer thetrace;
|
||||
Handle(Message_Messenger) themessenger;
|
||||
Standard_Integer thelevel;
|
||||
Standard_Integer therootl;
|
||||
Standard_Boolean therootm;
|
||||
TColStd_IndexedMapOfInteger theroots;
|
||||
Handle(Standard_Transient) thelastobj;
|
||||
Handle(Transfer_Binder) thelastbnd;
|
||||
Standard_Integer theindex;
|
||||
Handle(Transfer_ActorOfProcessForTransient) theactor;
|
||||
Transfer_TransferMapOfProcessForTransient themap;
|
||||
Handle(Message_ProgressIndicator) myProgress;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Transfer_ProcessForTransient_HeaderFile
|
68
src/Transfer/Transfer_ProcessForTransient_0.cxx
Normal file
68
src/Transfer/Transfer_ProcessForTransient_0.cxx
Normal file
@@ -0,0 +1,68 @@
|
||||
// Created on: 1992-02-03
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1992-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Transfer_ProcessForTransient.hxx>
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Message_Messenger.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <Transfer_Binder.hxx>
|
||||
#include <Transfer_ActorOfProcessForTransient.hxx>
|
||||
#include <Message_ProgressIndicator.hxx>
|
||||
#include <Interface_InterfaceError.hxx>
|
||||
#include <Transfer_TransferFailure.hxx>
|
||||
#include <Transfer_TransferMapOfProcessForTransient.hxx>
|
||||
#include <Transfer_IndexedDataMapNodeOfTransferMapOfProcessForTransient.hxx>
|
||||
#include <Transfer_IteratorOfProcessForTransient.hxx>
|
||||
#include <Message_Msg.hxx>
|
||||
#include <Interface_Check.hxx>
|
||||
#include <Interface_CheckIterator.hxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define TheStart Handle(Standard_Transient)
|
||||
#define TheStart_hxx <Standard_Transient.hxx>
|
||||
#define TheMapHasher TColStd_MapTransientHasher
|
||||
#define TheMapHasher_hxx <TColStd_MapTransientHasher.hxx>
|
||||
#define Handle_TheList Handle(TColStd_HSequenceOfTransient)
|
||||
#define TheList TColStd_HSequenceOfTransient
|
||||
#define TheList_hxx <TColStd_HSequenceOfTransient.hxx>
|
||||
#define Transfer_TransferMap Transfer_TransferMapOfProcessForTransient
|
||||
#define Transfer_TransferMap_hxx <Transfer_TransferMapOfProcessForTransient.hxx>
|
||||
#define Transfer_IndexedDataMapNodeOfTransferMap Transfer_IndexedDataMapNodeOfTransferMapOfProcessForTransient
|
||||
#define Transfer_IndexedDataMapNodeOfTransferMap_hxx <Transfer_IndexedDataMapNodeOfTransferMapOfProcessForTransient.hxx>
|
||||
#define Transfer_IndexedDataMapNodeOfTransferMap Transfer_IndexedDataMapNodeOfTransferMapOfProcessForTransient
|
||||
#define Transfer_IndexedDataMapNodeOfTransferMap_hxx <Transfer_IndexedDataMapNodeOfTransferMapOfProcessForTransient.hxx>
|
||||
#define Transfer_Iterator Transfer_IteratorOfProcessForTransient
|
||||
#define Transfer_Iterator_hxx <Transfer_IteratorOfProcessForTransient.hxx>
|
||||
#define Transfer_Actor Transfer_ActorOfProcessForTransient
|
||||
#define Transfer_Actor_hxx <Transfer_ActorOfProcessForTransient.hxx>
|
||||
#define Handle_Transfer_IndexedDataMapNodeOfTransferMap Handle(Transfer_IndexedDataMapNodeOfTransferMapOfProcessForTransient)
|
||||
#define Handle_Transfer_IndexedDataMapNodeOfTransferMap Handle(Transfer_IndexedDataMapNodeOfTransferMapOfProcessForTransient)
|
||||
#define Handle_Transfer_Actor Handle(Transfer_ActorOfProcessForTransient)
|
||||
#define Transfer_TransferProcess Transfer_ProcessForTransient
|
||||
#define Transfer_TransferProcess_hxx <Transfer_ProcessForTransient.hxx>
|
||||
#define Handle_Transfer_TransferProcess Handle(Transfer_ProcessForTransient)
|
||||
#include <Transfer_TransferProcess.gxx>
|
||||
|
@@ -1,152 +0,0 @@
|
||||
-- Created on: 1995-11-16
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1995-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class ResultFromModel from Transfer inherits TShared
|
||||
|
||||
---Purpose : ResultFromModel is used to store a final result stored in a
|
||||
-- TransientProcess, respectfully to its structuration in scopes
|
||||
-- by using a set of ResultFromTransient
|
||||
-- Hence, it can be regarded as a passive equivalent of the
|
||||
-- stored data in the TransientProcess, while an Iterator gives
|
||||
-- a flat view of it.
|
||||
--
|
||||
-- A ResultFromModel is intended to be attached to the transfer
|
||||
-- of one entity (typically root entity but it is not mandatory)
|
||||
--
|
||||
-- It is then possible to :
|
||||
-- - Create and fill a ResultFromModel from a TransientProcess,
|
||||
-- by designating a starting entity
|
||||
-- - Fill back the TransientProcess from a ResultFromModel, as it
|
||||
-- were filled by the operation which filled it the first time
|
||||
|
||||
uses CString, AsciiString, HSequenceOfTransient from TColStd,
|
||||
InterfaceModel, CheckIterator, CheckStatus,
|
||||
ResultFromTransient, TransientProcess
|
||||
|
||||
is
|
||||
|
||||
Create returns ResultFromModel;
|
||||
---Purpose : Creates a ResultFromModel, empty
|
||||
|
||||
SetModel (me : mutable; model : InterfaceModel);
|
||||
---Purpose : Sets starting Model
|
||||
|
||||
SetFileName (me : mutable; filename : CString);
|
||||
---Purpose : Sets starting File Name
|
||||
|
||||
Model (me) returns InterfaceModel;
|
||||
---Purpose : Returns starting Model (null if not set)
|
||||
|
||||
FileName (me) returns CString;
|
||||
---Purpose : Returns starting File Name (empty if not set)
|
||||
|
||||
Fill (me : mutable; TP : TransientProcess; ent : Transient) returns Boolean;
|
||||
---Purpose : Fills from a TransientProcess, with the result attached to
|
||||
-- a starting entity. Considers its Model if it is set.
|
||||
-- This action produces a structured set of ResultFromTransient,
|
||||
-- considering scopes, starting by that of <ent>.
|
||||
-- If <ent> has no recorded result, it remains empty
|
||||
-- Returns True if a result is recorded, False else
|
||||
|
||||
Strip (me : mutable; mode : Integer);
|
||||
---Purpose : Clears some data attached to binders used by TransientProcess,
|
||||
-- which become useless once the transfer has been done,
|
||||
-- by calling Strip on its ResultFromTransient
|
||||
--
|
||||
-- mode = 0 : minimum, clears data remaining from TransferProcess
|
||||
-- mode = 10 : just keeps file name, label, check status ...,
|
||||
-- and MainResult but only the result (Binder)
|
||||
-- mode = 11 : also clears MainResult (status and names remain)
|
||||
|
||||
FillBack (me; TP : TransientProcess);
|
||||
---Purpose : Fills back a TransientProcess from the structured set of
|
||||
-- binders. Also sets the Model.
|
||||
|
||||
|
||||
HasResult (me) returns Boolean;
|
||||
---Purpose : Returns True if a Result is recorded
|
||||
|
||||
MainResult (me) returns ResultFromTransient;
|
||||
---Purpose : Returns the main recorded ResultFromTransient, or a null
|
||||
|
||||
SetMainResult (me : mutable; amain : ResultFromTransient);
|
||||
---Purpose : Sets a new value for the main recorded ResultFromTransient
|
||||
|
||||
MainLabel (me) returns CString;
|
||||
---Purpose : Returns the label in starting model attached to main entity
|
||||
-- (updated by Fill or SetMainResult, if Model is known)
|
||||
|
||||
MainNumber (me) returns Integer;
|
||||
---Purpose : Returns the label in starting model attached to main entity
|
||||
|
||||
-- Global Queries --
|
||||
|
||||
ResultFromKey (me; start : Transient) returns ResultFromTransient;
|
||||
---Purpose : Searches for a key (starting entity) and returns its result
|
||||
-- Returns a null handle if not found
|
||||
|
||||
Results (me; level : Integer) returns HSequenceOfTransient;
|
||||
---Purpose : Internal method which returns the list of ResultFromTransient,
|
||||
-- according level (2:complete; 1:sub-level 1; 0:main only)
|
||||
|
||||
TransferredList (me; level : Integer = 2) returns HSequenceOfTransient;
|
||||
---Purpose : Returns the list of recorded starting entities, ending by the
|
||||
-- root. Entities with check but no transfer result are ignored
|
||||
-- <level> = 2 (D), considers the complete list
|
||||
-- <level> = 1 considers the main result plus immediate subs
|
||||
-- <level> = 0 just the main result
|
||||
|
||||
CheckedList (me; check : CheckStatus; result : Boolean)
|
||||
returns HSequenceOfTransient;
|
||||
---Purpose : Returns the list of starting entities to which a check status
|
||||
-- is attached.
|
||||
-- <check> = -2 , all entities whatever the check (see result)
|
||||
-- <check> = -1 , entities with no fail (warning allowed)
|
||||
-- <check> = 0 , entities with no check at all
|
||||
-- <check> = 1 , entities with warning but no fail
|
||||
-- <check> = 2 , entities with fail
|
||||
-- <result> : if True, only entities with an attached result
|
||||
-- Remark : result True and check=0 will give an empty list
|
||||
|
||||
CheckList (me; erronly : Boolean; level : Integer = 2)
|
||||
returns CheckIterator;
|
||||
---Purpose : Returns the check-list of this set of results
|
||||
-- <erronly> true : only fails are considered
|
||||
-- <level> = 0 : considers only main binder
|
||||
-- <level> = 1 : considers main binder plus immediate subs
|
||||
-- <level> = 2 (D) : considers all checks
|
||||
|
||||
CheckStatus (me) returns CheckStatus;
|
||||
---Purpose : Returns the check status with corresponds to the content
|
||||
-- of this ResultFromModel; considers all levels of transfer
|
||||
-- (worst status). Returns CheckAny if not yet computed
|
||||
-- Reads it from recorded status if already computed, else
|
||||
-- recomputes one
|
||||
|
||||
ComputeCheckStatus (me : mutable; enforce : Boolean) returns CheckStatus;
|
||||
---Purpose : Computes and records check status (see CheckStatus)
|
||||
-- Does not computes it if already done and <enforce> False
|
||||
|
||||
fields
|
||||
|
||||
themodel : InterfaceModel;
|
||||
thename : AsciiString;
|
||||
themain : ResultFromTransient;
|
||||
themlab : AsciiString;
|
||||
themnum : Integer;
|
||||
themchk : CheckStatus;
|
||||
|
||||
end ResultFromModel;
|
@@ -11,13 +11,19 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Transfer_ResultFromModel.ixx>
|
||||
#include <TColStd_IndexedMapOfTransient.hxx>
|
||||
#include <Interface_Check.hxx>
|
||||
#include <Interface_Macros.hxx>
|
||||
#include <Transfer_Binder.hxx>
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
|
||||
#include <Interface_Check.hxx>
|
||||
#include <Interface_CheckIterator.hxx>
|
||||
#include <Interface_InterfaceModel.hxx>
|
||||
#include <Interface_Macros.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
#include <TColStd_IndexedMapOfTransient.hxx>
|
||||
#include <Transfer_Binder.hxx>
|
||||
#include <Transfer_ResultFromModel.hxx>
|
||||
#include <Transfer_ResultFromTransient.hxx>
|
||||
#include <Transfer_TransientProcess.hxx>
|
||||
|
||||
Transfer_ResultFromModel::Transfer_ResultFromModel ()
|
||||
{ themnum = 0; themchk = Interface_CheckAny; }
|
||||
|
187
src/Transfer/Transfer_ResultFromModel.hxx
Normal file
187
src/Transfer/Transfer_ResultFromModel.hxx
Normal file
@@ -0,0 +1,187 @@
|
||||
// Created on: 1995-11-16
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1995-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Transfer_ResultFromModel_HeaderFile
|
||||
#define _Transfer_ResultFromModel_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Interface_CheckStatus.hxx>
|
||||
#include <MMgt_TShared.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <TColStd_HSequenceOfTransient.hxx>
|
||||
class Interface_InterfaceModel;
|
||||
class Transfer_ResultFromTransient;
|
||||
class Transfer_TransientProcess;
|
||||
class Standard_Transient;
|
||||
class Interface_CheckIterator;
|
||||
|
||||
|
||||
class Transfer_ResultFromModel;
|
||||
DEFINE_STANDARD_HANDLE(Transfer_ResultFromModel, MMgt_TShared)
|
||||
|
||||
//! ResultFromModel is used to store a final result stored in a
|
||||
//! TransientProcess, respectfully to its structuration in scopes
|
||||
//! by using a set of ResultFromTransient
|
||||
//! Hence, it can be regarded as a passive equivalent of the
|
||||
//! stored data in the TransientProcess, while an Iterator gives
|
||||
//! a flat view of it.
|
||||
//!
|
||||
//! A ResultFromModel is intended to be attached to the transfer
|
||||
//! of one entity (typically root entity but it is not mandatory)
|
||||
//!
|
||||
//! It is then possible to :
|
||||
//! - Create and fill a ResultFromModel from a TransientProcess,
|
||||
//! by designating a starting entity
|
||||
//! - Fill back the TransientProcess from a ResultFromModel, as it
|
||||
//! were filled by the operation which filled it the first time
|
||||
class Transfer_ResultFromModel : public MMgt_TShared
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Creates a ResultFromModel, empty
|
||||
Standard_EXPORT Transfer_ResultFromModel();
|
||||
|
||||
//! Sets starting Model
|
||||
Standard_EXPORT void SetModel (const Handle(Interface_InterfaceModel)& model);
|
||||
|
||||
//! Sets starting File Name
|
||||
Standard_EXPORT void SetFileName (const Standard_CString filename);
|
||||
|
||||
//! Returns starting Model (null if not set)
|
||||
Standard_EXPORT Handle(Interface_InterfaceModel) Model() const;
|
||||
|
||||
//! Returns starting File Name (empty if not set)
|
||||
Standard_EXPORT Standard_CString FileName() const;
|
||||
|
||||
//! Fills from a TransientProcess, with the result attached to
|
||||
//! a starting entity. Considers its Model if it is set.
|
||||
//! This action produces a structured set of ResultFromTransient,
|
||||
//! considering scopes, starting by that of <ent>.
|
||||
//! If <ent> has no recorded result, it remains empty
|
||||
//! Returns True if a result is recorded, False else
|
||||
Standard_EXPORT Standard_Boolean Fill (const Handle(Transfer_TransientProcess)& TP, const Handle(Standard_Transient)& ent);
|
||||
|
||||
//! Clears some data attached to binders used by TransientProcess,
|
||||
//! which become useless once the transfer has been done,
|
||||
//! by calling Strip on its ResultFromTransient
|
||||
//!
|
||||
//! mode = 0 : minimum, clears data remaining from TransferProcess
|
||||
//! mode = 10 : just keeps file name, label, check status ...,
|
||||
//! and MainResult but only the result (Binder)
|
||||
//! mode = 11 : also clears MainResult (status and names remain)
|
||||
Standard_EXPORT void Strip (const Standard_Integer mode);
|
||||
|
||||
//! Fills back a TransientProcess from the structured set of
|
||||
//! binders. Also sets the Model.
|
||||
Standard_EXPORT void FillBack (const Handle(Transfer_TransientProcess)& TP) const;
|
||||
|
||||
//! Returns True if a Result is recorded
|
||||
Standard_EXPORT Standard_Boolean HasResult() const;
|
||||
|
||||
//! Returns the main recorded ResultFromTransient, or a null
|
||||
Standard_EXPORT Handle(Transfer_ResultFromTransient) MainResult() const;
|
||||
|
||||
//! Sets a new value for the main recorded ResultFromTransient
|
||||
Standard_EXPORT void SetMainResult (const Handle(Transfer_ResultFromTransient)& amain);
|
||||
|
||||
//! Returns the label in starting model attached to main entity
|
||||
//! (updated by Fill or SetMainResult, if Model is known)
|
||||
Standard_EXPORT Standard_CString MainLabel() const;
|
||||
|
||||
//! Returns the label in starting model attached to main entity
|
||||
Standard_EXPORT Standard_Integer MainNumber() const;
|
||||
|
||||
//! Searches for a key (starting entity) and returns its result
|
||||
//! Returns a null handle if not found
|
||||
Standard_EXPORT Handle(Transfer_ResultFromTransient) ResultFromKey (const Handle(Standard_Transient)& start) const;
|
||||
|
||||
//! Internal method which returns the list of ResultFromTransient,
|
||||
//! according level (2:complete; 1:sub-level 1; 0:main only)
|
||||
Standard_EXPORT Handle(TColStd_HSequenceOfTransient) Results (const Standard_Integer level) const;
|
||||
|
||||
//! Returns the list of recorded starting entities, ending by the
|
||||
//! root. Entities with check but no transfer result are ignored
|
||||
//! <level> = 2 (D), considers the complete list
|
||||
//! <level> = 1 considers the main result plus immediate subs
|
||||
//! <level> = 0 just the main result
|
||||
Standard_EXPORT Handle(TColStd_HSequenceOfTransient) TransferredList (const Standard_Integer level = 2) const;
|
||||
|
||||
//! Returns the list of starting entities to which a check status
|
||||
//! is attached.
|
||||
//! <check> = -2 , all entities whatever the check (see result)
|
||||
//! <check> = -1 , entities with no fail (warning allowed)
|
||||
//! <check> = 0 , entities with no check at all
|
||||
//! <check> = 1 , entities with warning but no fail
|
||||
//! <check> = 2 , entities with fail
|
||||
//! <result> : if True, only entities with an attached result
|
||||
//! Remark : result True and check=0 will give an empty list
|
||||
Standard_EXPORT Handle(TColStd_HSequenceOfTransient) CheckedList (const Interface_CheckStatus check, const Standard_Boolean result) const;
|
||||
|
||||
//! Returns the check-list of this set of results
|
||||
//! <erronly> true : only fails are considered
|
||||
//! <level> = 0 : considers only main binder
|
||||
//! <level> = 1 : considers main binder plus immediate subs
|
||||
//! <level> = 2 (D) : considers all checks
|
||||
Standard_EXPORT Interface_CheckIterator CheckList (const Standard_Boolean erronly, const Standard_Integer level = 2) const;
|
||||
|
||||
//! Returns the check status with corresponds to the content
|
||||
//! of this ResultFromModel; considers all levels of transfer
|
||||
//! (worst status). Returns CheckAny if not yet computed
|
||||
//! Reads it from recorded status if already computed, else
|
||||
//! recomputes one
|
||||
Standard_EXPORT Interface_CheckStatus CheckStatus() const;
|
||||
|
||||
//! Computes and records check status (see CheckStatus)
|
||||
//! Does not computes it if already done and <enforce> False
|
||||
Standard_EXPORT Interface_CheckStatus ComputeCheckStatus (const Standard_Boolean enforce);
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(Transfer_ResultFromModel,MMgt_TShared)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Handle(Interface_InterfaceModel) themodel;
|
||||
TCollection_AsciiString thename;
|
||||
Handle(Transfer_ResultFromTransient) themain;
|
||||
TCollection_AsciiString themlab;
|
||||
Standard_Integer themnum;
|
||||
Interface_CheckStatus themchk;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Transfer_ResultFromModel_HeaderFile
|
@@ -1,103 +0,0 @@
|
||||
-- Created on: 1995-11-16
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1995-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class ResultFromTransient from Transfer inherits TShared
|
||||
|
||||
---Purpose : This class, in conjunction with ResultFromModel, allows to
|
||||
-- record the result of a transfer initially stored in a
|
||||
-- TransientProcess.
|
||||
--
|
||||
-- A ResultFromTransient records a couple (Transient,Binder for
|
||||
-- the result and checks) plus a list of "sub-results", which
|
||||
-- have been recorded in the TrabsientProcess, under scope
|
||||
-- attached to the starting transient.
|
||||
|
||||
uses Transient, HSequenceOfTransient, IndexedMapOfTransient,
|
||||
Check, CheckStatus, Binder, TransientProcess
|
||||
|
||||
is
|
||||
|
||||
Create returns ResultFromTransient;
|
||||
---Purpose : Creates a ResultFromTransient, empty
|
||||
|
||||
SetStart (me : mutable; start : any Transient);
|
||||
---Purpose : Sets starting entity
|
||||
|
||||
SetBinder (me : mutable; binder : any Binder);
|
||||
---Purpose : Sets Binder (for result plus individual check)
|
||||
|
||||
Start (me) returns any Transient;
|
||||
---Purpose : Returns the starting entity
|
||||
|
||||
Binder (me) returns any Binder;
|
||||
---Purpose : Returns the binder
|
||||
|
||||
HasResult (me) returns Boolean;
|
||||
---Purpose : Returns True if a result is recorded
|
||||
|
||||
Check (me) returns Check;
|
||||
---Purpose : Returns the check (or an empty one if no binder)
|
||||
---C++ : return const
|
||||
|
||||
CheckStatus (me) returns CheckStatus;
|
||||
---Purpose : Returns the check status
|
||||
|
||||
|
||||
ClearSubs (me : mutable);
|
||||
---Purpose : Clears the list of (immediate) sub-results
|
||||
|
||||
AddSubResult (me : mutable; sub : ResultFromTransient);
|
||||
---Purpose : Adds a sub-result
|
||||
|
||||
NbSubResults (me) returns Integer;
|
||||
---Purpose : Returns the count of recorded sub-results
|
||||
|
||||
SubResult (me; num : Integer) returns ResultFromTransient;
|
||||
---Purpose : Returns a sub-result, given its rank
|
||||
|
||||
ResultFromKey (me; key : Transient) returns ResultFromTransient;
|
||||
---Purpose : Returns the ResultFromTransient attached to a given starting
|
||||
-- entity (the key). Returns a null handle if not found
|
||||
|
||||
FillMap (me; map : in out IndexedMapOfTransient);
|
||||
---Purpose : This method is used by ResultFromModel to collate the list of
|
||||
-- ResultFromTransient, avoiding duplications with a map
|
||||
-- Remark : <me> is already in the map and has not to be bound
|
||||
|
||||
|
||||
Fill (me : mutable; TP : TransientProcess);
|
||||
---Purpose : Fills from a TransientProcess, with the starting entity which
|
||||
-- must have been set before. It works with scopes, calls Fill
|
||||
-- on each of its sub-results
|
||||
|
||||
Strip (me : mutable);
|
||||
---Purpose : Clears some data attached to binders used by TransientProcess,
|
||||
-- which become useless once the transfer has been done :
|
||||
-- the list of sub-scoped binders, which is now recorded as
|
||||
-- sub-results
|
||||
|
||||
FillBack (me; TP : TransientProcess);
|
||||
---Purpose : Fills back a TransientProcess with definition of a
|
||||
-- ResultFromTransient, respectfully to its structuration in
|
||||
-- scopes
|
||||
|
||||
fields
|
||||
|
||||
thestart : Transient;
|
||||
thebinder : Binder;
|
||||
thesubs : HSequenceOfTransient;
|
||||
|
||||
end ResultFromTransient;
|
@@ -11,9 +11,14 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Transfer_ResultFromTransient.ixx>
|
||||
#include <TColStd_HArray1OfInteger.hxx>
|
||||
|
||||
#include <Interface_Check.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TColStd_HArray1OfInteger.hxx>
|
||||
#include <Transfer_Binder.hxx>
|
||||
#include <Transfer_ResultFromTransient.hxx>
|
||||
#include <Transfer_TransientProcess.hxx>
|
||||
|
||||
static Handle(Interface_Check) voidcheck = new Interface_Check;
|
||||
|
||||
|
139
src/Transfer/Transfer_ResultFromTransient.hxx
Normal file
139
src/Transfer/Transfer_ResultFromTransient.hxx
Normal file
@@ -0,0 +1,139 @@
|
||||
// Created on: 1995-11-16
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1995-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Transfer_ResultFromTransient_HeaderFile
|
||||
#define _Transfer_ResultFromTransient_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <TColStd_HSequenceOfTransient.hxx>
|
||||
#include <MMgt_TShared.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Interface_CheckStatus.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <TColStd_IndexedMapOfTransient.hxx>
|
||||
class Standard_Transient;
|
||||
class Transfer_Binder;
|
||||
class Interface_Check;
|
||||
class Transfer_TransientProcess;
|
||||
|
||||
|
||||
class Transfer_ResultFromTransient;
|
||||
DEFINE_STANDARD_HANDLE(Transfer_ResultFromTransient, MMgt_TShared)
|
||||
|
||||
//! This class, in conjunction with ResultFromModel, allows to
|
||||
//! record the result of a transfer initially stored in a
|
||||
//! TransientProcess.
|
||||
//!
|
||||
//! A ResultFromTransient records a couple (Transient,Binder for
|
||||
//! the result and checks) plus a list of "sub-results", which
|
||||
//! have been recorded in the TrabsientProcess, under scope
|
||||
//! attached to the starting transient.
|
||||
class Transfer_ResultFromTransient : public MMgt_TShared
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Creates a ResultFromTransient, empty
|
||||
Standard_EXPORT Transfer_ResultFromTransient();
|
||||
|
||||
//! Sets starting entity
|
||||
Standard_EXPORT void SetStart (const Handle(Standard_Transient)& start);
|
||||
|
||||
//! Sets Binder (for result plus individual check)
|
||||
Standard_EXPORT void SetBinder (const Handle(Transfer_Binder)& binder);
|
||||
|
||||
//! Returns the starting entity
|
||||
Standard_EXPORT Handle(Standard_Transient) Start() const;
|
||||
|
||||
//! Returns the binder
|
||||
Standard_EXPORT Handle(Transfer_Binder) Binder() const;
|
||||
|
||||
//! Returns True if a result is recorded
|
||||
Standard_EXPORT Standard_Boolean HasResult() const;
|
||||
|
||||
//! Returns the check (or an empty one if no binder)
|
||||
Standard_EXPORT const Handle(Interface_Check) Check() const;
|
||||
|
||||
//! Returns the check status
|
||||
Standard_EXPORT Interface_CheckStatus CheckStatus() const;
|
||||
|
||||
//! Clears the list of (immediate) sub-results
|
||||
Standard_EXPORT void ClearSubs();
|
||||
|
||||
//! Adds a sub-result
|
||||
Standard_EXPORT void AddSubResult (const Handle(Transfer_ResultFromTransient)& sub);
|
||||
|
||||
//! Returns the count of recorded sub-results
|
||||
Standard_EXPORT Standard_Integer NbSubResults() const;
|
||||
|
||||
//! Returns a sub-result, given its rank
|
||||
Standard_EXPORT Handle(Transfer_ResultFromTransient) SubResult (const Standard_Integer num) const;
|
||||
|
||||
//! Returns the ResultFromTransient attached to a given starting
|
||||
//! entity (the key). Returns a null handle if not found
|
||||
Standard_EXPORT Handle(Transfer_ResultFromTransient) ResultFromKey (const Handle(Standard_Transient)& key) const;
|
||||
|
||||
//! This method is used by ResultFromModel to collate the list of
|
||||
//! ResultFromTransient, avoiding duplications with a map
|
||||
//! Remark : <me> is already in the map and has not to be bound
|
||||
Standard_EXPORT void FillMap (TColStd_IndexedMapOfTransient& map) const;
|
||||
|
||||
//! Fills from a TransientProcess, with the starting entity which
|
||||
//! must have been set before. It works with scopes, calls Fill
|
||||
//! on each of its sub-results
|
||||
Standard_EXPORT void Fill (const Handle(Transfer_TransientProcess)& TP);
|
||||
|
||||
//! Clears some data attached to binders used by TransientProcess,
|
||||
//! which become useless once the transfer has been done :
|
||||
//! the list of sub-scoped binders, which is now recorded as
|
||||
//! sub-results
|
||||
Standard_EXPORT void Strip();
|
||||
|
||||
//! Fills back a TransientProcess with definition of a
|
||||
//! ResultFromTransient, respectfully to its structuration in
|
||||
//! scopes
|
||||
Standard_EXPORT void FillBack (const Handle(Transfer_TransientProcess)& TP) const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(Transfer_ResultFromTransient,MMgt_TShared)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Handle(Standard_Transient) thestart;
|
||||
Handle(Transfer_Binder) thebinder;
|
||||
Handle(TColStd_HSequenceOfTransient) thesubs;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Transfer_ResultFromTransient_HeaderFile
|
@@ -1,71 +0,0 @@
|
||||
-- Created on: 1993-06-10
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1993-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class SimpleBinderOfTransient from Transfer inherits Binder
|
||||
|
||||
---Purpose : An adapted instantiation of SimpleBinder for Transient Result,
|
||||
-- i.e. ResultType can be computed from the Result itself,
|
||||
-- instead of being static
|
||||
|
||||
uses CString, Type, Transient
|
||||
|
||||
raises TransferFailure
|
||||
|
||||
is
|
||||
|
||||
Create returns SimpleBinderOfTransient;
|
||||
---Purpose : Creates an empty SimpleBinderOfTransient
|
||||
|
||||
-- IsMultiple (me) returns Boolean;
|
||||
---Purpose : Returns True if a starting object is bound with SEVERAL
|
||||
-- results : Here, returns allways False
|
||||
-- See Binder itself
|
||||
|
||||
ResultType (me) returns Type;
|
||||
---Purpose : Returns the Effective (Dynamic) Type of the Result
|
||||
-- (Standard_Transient if no Result is defined)
|
||||
|
||||
ResultTypeName (me) returns CString;
|
||||
---Purpose : Returns the Effective Name of (Dynamic) Type of the Result
|
||||
-- (void) if no result is defined
|
||||
|
||||
SetResult (me : mutable; res : any Transient)
|
||||
---Purpose : Defines the Result
|
||||
raises TransferFailure;
|
||||
-- Error if the Result is already used (see class Binder)
|
||||
|
||||
Result (me) returns any Transient
|
||||
---Purpose : Returns the defined Result, if there is one
|
||||
raises TransferFailure;
|
||||
-- Error if the Result is not defined (see class Binder)
|
||||
---C++ : return const &
|
||||
|
||||
GetTypedResult (myclass; bnd : Binder; atype : Type;
|
||||
res : out Transient) returns Boolean;
|
||||
---Purpose : Returns a transient result according to its type (IsKind)
|
||||
-- i.e. the result itself if IsKind(atype), else searches in
|
||||
-- NextResult, until first found, then returns True
|
||||
-- If not found, returns False (res is NOT touched)
|
||||
--
|
||||
-- This syntactic form avoids to do DownCast : if a result is
|
||||
-- found with the good type, it is loaded in <res> and can be
|
||||
-- immediately used, well initialised
|
||||
|
||||
fields
|
||||
|
||||
theres : Transient;
|
||||
|
||||
end SimpleBinderOfTransient;
|
@@ -11,12 +11,14 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Transfer_SimpleBinderOfTransient.ixx>
|
||||
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <Transfer_Binder.hxx>
|
||||
#include <Transfer_SimpleBinderOfTransient.hxx>
|
||||
#include <Transfer_TransferFailure.hxx>
|
||||
|
||||
// "Handle(Standard_Transient)" : la classe de base pour le Resultat
|
||||
|
||||
|
||||
Transfer_SimpleBinderOfTransient::Transfer_SimpleBinderOfTransient () { }
|
||||
|
||||
|
||||
|
98
src/Transfer/Transfer_SimpleBinderOfTransient.hxx
Normal file
98
src/Transfer/Transfer_SimpleBinderOfTransient.hxx
Normal file
@@ -0,0 +1,98 @@
|
||||
// Created on: 1993-06-10
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1993-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Transfer_SimpleBinderOfTransient_HeaderFile
|
||||
#define _Transfer_SimpleBinderOfTransient_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Transfer_Binder.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Standard_Transient;
|
||||
class Transfer_TransferFailure;
|
||||
class Transfer_Binder;
|
||||
|
||||
|
||||
class Transfer_SimpleBinderOfTransient;
|
||||
DEFINE_STANDARD_HANDLE(Transfer_SimpleBinderOfTransient, Transfer_Binder)
|
||||
|
||||
//! An adapted instantiation of SimpleBinder for Transient Result,
|
||||
//! i.e. ResultType can be computed from the Result itself,
|
||||
//! instead of being static
|
||||
class Transfer_SimpleBinderOfTransient : public Transfer_Binder
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Creates an empty SimpleBinderOfTransient
|
||||
//! Returns True if a starting object is bound with SEVERAL
|
||||
//! results : Here, returns allways False
|
||||
//! See Binder itself
|
||||
Standard_EXPORT Transfer_SimpleBinderOfTransient();
|
||||
|
||||
//! Returns the Effective (Dynamic) Type of the Result
|
||||
//! (Standard_Transient if no Result is defined)
|
||||
Standard_EXPORT Handle(Standard_Type) ResultType() const;
|
||||
|
||||
//! Returns the Effective Name of (Dynamic) Type of the Result
|
||||
//! (void) if no result is defined
|
||||
Standard_EXPORT Standard_CString ResultTypeName() const;
|
||||
|
||||
//! Defines the Result
|
||||
Standard_EXPORT void SetResult (const Handle(Standard_Transient)& res);
|
||||
|
||||
//! Returns the defined Result, if there is one
|
||||
Standard_EXPORT const Handle(Standard_Transient)& Result() const;
|
||||
|
||||
//! Returns a transient result according to its type (IsKind)
|
||||
//! i.e. the result itself if IsKind(atype), else searches in
|
||||
//! NextResult, until first found, then returns True
|
||||
//! If not found, returns False (res is NOT touched)
|
||||
//!
|
||||
//! This syntactic form avoids to do DownCast : if a result is
|
||||
//! found with the good type, it is loaded in <res> and can be
|
||||
//! immediately used, well initialised
|
||||
Standard_EXPORT static Standard_Boolean GetTypedResult (const Handle(Transfer_Binder)& bnd, const Handle(Standard_Type)& atype, Handle(Standard_Transient)& res);
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(Transfer_SimpleBinderOfTransient,Transfer_Binder)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Handle(Standard_Transient) theres;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Transfer_SimpleBinderOfTransient_HeaderFile
|
30
src/Transfer/Transfer_StatusExec.hxx
Normal file
30
src/Transfer/Transfer_StatusExec.hxx
Normal file
@@ -0,0 +1,30 @@
|
||||
// Created on: 1992-02-03
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1992-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Transfer_StatusExec_HeaderFile
|
||||
#define _Transfer_StatusExec_HeaderFile
|
||||
|
||||
//! execution status of an individual transfer (see Transcriptor)
|
||||
enum Transfer_StatusExec
|
||||
{
|
||||
Transfer_StatusInitial,
|
||||
Transfer_StatusRun,
|
||||
Transfer_StatusDone,
|
||||
Transfer_StatusError,
|
||||
Transfer_StatusLoop
|
||||
};
|
||||
|
||||
#endif // _Transfer_StatusExec_HeaderFile
|
28
src/Transfer/Transfer_StatusResult.hxx
Normal file
28
src/Transfer/Transfer_StatusResult.hxx
Normal file
@@ -0,0 +1,28 @@
|
||||
// Created on: 1992-02-03
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1992-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Transfer_StatusResult_HeaderFile
|
||||
#define _Transfer_StatusResult_HeaderFile
|
||||
|
||||
//! result status of transferring an entity (see Transcriptor)
|
||||
enum Transfer_StatusResult
|
||||
{
|
||||
Transfer_StatusVoid,
|
||||
Transfer_StatusDefined,
|
||||
Transfer_StatusUsed
|
||||
};
|
||||
|
||||
#endif // _Transfer_StatusResult_HeaderFile
|
37
src/Transfer/Transfer_TransferDeadLoop.hxx
Normal file
37
src/Transfer/Transfer_TransferDeadLoop.hxx
Normal file
@@ -0,0 +1,37 @@
|
||||
// Created on: 1992-02-03
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1992-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Transfer_TransferDeadLoop_HeaderFile
|
||||
#define _Transfer_TransferDeadLoop_HeaderFile
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
#include <Standard_DefineException.hxx>
|
||||
#include <Standard_SStream.hxx>
|
||||
#include <Transfer_TransferFailure.hxx>
|
||||
|
||||
class Transfer_TransferDeadLoop;
|
||||
DEFINE_STANDARD_HANDLE(Transfer_TransferDeadLoop, Transfer_TransferFailure)
|
||||
|
||||
#if !defined No_Exception && !defined No_Transfer_TransferDeadLoop
|
||||
#define Transfer_TransferDeadLoop_Raise_if(CONDITION, MESSAGE) \
|
||||
if (CONDITION) Transfer_TransferDeadLoop::Raise(MESSAGE);
|
||||
#else
|
||||
#define Transfer_TransferDeadLoop_Raise_if(CONDITION, MESSAGE)
|
||||
#endif
|
||||
|
||||
DEFINE_STANDARD_EXCEPTION(Transfer_TransferDeadLoop, Transfer_TransferFailure)
|
||||
|
||||
#endif // _Transfer_TransferDeadLoop_HeaderFile
|
@@ -1,66 +0,0 @@
|
||||
-- Created on: 1992-02-07
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1992-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class TransferDispatch from Transfer inherits CopyTool
|
||||
|
||||
---Purpose : 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
|
||||
|
||||
uses Transient, InterfaceModel, GeneralLib, Protocol from Interface,
|
||||
TransientProcess
|
||||
|
||||
raises InterfaceError
|
||||
|
||||
is
|
||||
|
||||
Create (amodel : InterfaceModel; lib : GeneralLib) returns TransferDispatch;
|
||||
---Purpose : 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
|
||||
|
||||
Create (amodel : InterfaceModel; protocol : Protocol from Interface)
|
||||
returns TransferDispatch;
|
||||
---Purpose : Same as above, but Library is defined through a Protocol
|
||||
|
||||
Create (amodel : InterfaceModel) returns TransferDispatch
|
||||
---Purpose : Same as above, but works with the Active Protocol
|
||||
raises InterfaceError;
|
||||
-- Error if no Active Protocol is defined
|
||||
|
||||
TransientProcess (me) returns TransientProcess;
|
||||
---Purpose : Returns the content of Control Object, as a TransientProcess
|
||||
|
||||
|
||||
Copy (me : in out; entfrom : Transient; entto : out Transient;
|
||||
mapped : Boolean; errstat : Boolean)
|
||||
returns Boolean is redefined;
|
||||
---Purpose : 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
|
||||
|
||||
end TransferDispatch;
|
@@ -11,12 +11,17 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Transfer_TransferDispatch.ixx>
|
||||
|
||||
#include <Interface_GeneralLib.hxx>
|
||||
#include <Interface_InterfaceError.hxx>
|
||||
#include <Interface_InterfaceModel.hxx>
|
||||
#include <Interface_Macros.hxx>
|
||||
#include <Interface_Protocol.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <Transfer_DispatchControl.hxx>
|
||||
#include <Transfer_SimpleBinderOfTransient.hxx>
|
||||
#include <Interface_Macros.hxx>
|
||||
|
||||
|
||||
#include <Transfer_TransferDispatch.hxx>
|
||||
#include <Transfer_TransientProcess.hxx>
|
||||
|
||||
Transfer_TransferDispatch::Transfer_TransferDispatch
|
||||
(const Handle(Interface_InterfaceModel)& amodel,
|
||||
|
97
src/Transfer/Transfer_TransferDispatch.hxx
Normal file
97
src/Transfer/Transfer_TransferDispatch.hxx
Normal file
@@ -0,0 +1,97 @@
|
||||
// Created on: 1992-02-07
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1992-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Transfer_TransferDispatch_HeaderFile
|
||||
#define _Transfer_TransferDispatch_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Interface_CopyTool.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Interface_InterfaceError;
|
||||
class Interface_InterfaceModel;
|
||||
class Interface_GeneralLib;
|
||||
class Interface_Protocol;
|
||||
class Transfer_TransientProcess;
|
||||
class Standard_Transient;
|
||||
|
||||
|
||||
//! 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
|
||||
class Transfer_TransferDispatch : public Interface_CopyTool
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! 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
|
||||
Standard_EXPORT Transfer_TransferDispatch(const Handle(Interface_InterfaceModel)& amodel, const Interface_GeneralLib& lib);
|
||||
|
||||
//! Same as above, but Library is defined through a Protocol
|
||||
Standard_EXPORT Transfer_TransferDispatch(const Handle(Interface_InterfaceModel)& amodel, const Handle(Interface_Protocol)& protocol);
|
||||
|
||||
//! Same as above, but works with the Active Protocol
|
||||
Standard_EXPORT Transfer_TransferDispatch(const Handle(Interface_InterfaceModel)& amodel);
|
||||
|
||||
//! Returns the content of Control Object, as a TransientProcess
|
||||
Standard_EXPORT Handle(Transfer_TransientProcess) TransientProcess() const;
|
||||
|
||||
//! 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
|
||||
Standard_EXPORT virtual Standard_Boolean Copy (const Handle(Standard_Transient)& entfrom, Handle(Standard_Transient)& entto, const Standard_Boolean mapped, const Standard_Boolean errstat) Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Transfer_TransferDispatch_HeaderFile
|
37
src/Transfer/Transfer_TransferFailure.hxx
Normal file
37
src/Transfer/Transfer_TransferFailure.hxx
Normal file
@@ -0,0 +1,37 @@
|
||||
// Created on: 1992-02-03
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1992-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Transfer_TransferFailure_HeaderFile
|
||||
#define _Transfer_TransferFailure_HeaderFile
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
#include <Standard_DefineException.hxx>
|
||||
#include <Standard_SStream.hxx>
|
||||
#include <Interface_InterfaceError.hxx>
|
||||
|
||||
class Transfer_TransferFailure;
|
||||
DEFINE_STANDARD_HANDLE(Transfer_TransferFailure, Interface_InterfaceError)
|
||||
|
||||
#if !defined No_Exception && !defined No_Transfer_TransferFailure
|
||||
#define Transfer_TransferFailure_Raise_if(CONDITION, MESSAGE) \
|
||||
if (CONDITION) Transfer_TransferFailure::Raise(MESSAGE);
|
||||
#else
|
||||
#define Transfer_TransferFailure_Raise_if(CONDITION, MESSAGE)
|
||||
#endif
|
||||
|
||||
DEFINE_STANDARD_EXCEPTION(Transfer_TransferFailure, Interface_InterfaceError)
|
||||
|
||||
#endif // _Transfer_TransferFailure_HeaderFile
|
@@ -1,82 +0,0 @@
|
||||
-- Created on: 1992-02-04
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1992-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class TransferInput from Transfer
|
||||
|
||||
---Purpose : A TransferInput is a Tool which fills an InterfaceModel with
|
||||
-- the result of the Transfer of CasCade Objects, once determined
|
||||
-- The Result comes from a TransferProcess, either from
|
||||
-- Transient (the Complete Result is considered, it must contain
|
||||
-- only Transient Objects)
|
||||
|
||||
uses InterfaceModel, EntityIterator, Protocol from Interface,
|
||||
TransferIterator, TransientProcess, FinderProcess
|
||||
|
||||
raises TransferFailure
|
||||
|
||||
is
|
||||
|
||||
Create returns TransferInput;
|
||||
---Purpose : Creates a TransferInput ready to use
|
||||
|
||||
Entities (me; list : in out TransferIterator) returns EntityIterator
|
||||
---Purpose : Takes the transient items stored in a TransferIterator
|
||||
raises TransferFailure;
|
||||
-- Error if one of the Resulting Objects is defined not Transient
|
||||
|
||||
|
||||
FillModel (me; proc : TransientProcess;
|
||||
amodel : InterfaceModel)
|
||||
---Purpose : Fills an InterfaceModel with the Complete Result of a Transfer
|
||||
-- stored in a TransientProcess (Starting Objects are Transient)
|
||||
-- The complete result is exactly added to the model
|
||||
raises TransferFailure;
|
||||
-- Error if one of the Resulting Objects is defined not Transient
|
||||
|
||||
FillModel (me; proc : TransientProcess;
|
||||
amodel : InterfaceModel;
|
||||
proto : Protocol from Interface;
|
||||
roots : Boolean = Standard_True)
|
||||
---Purpose : Fills an InterfaceModel with results of the Transfer recorded
|
||||
-- in a TransientProcess (Starting Objects are Transient) :
|
||||
-- Root Result if <roots> is True (Default), Complete Result else
|
||||
-- The entities added to the model are determined from the result
|
||||
-- by by adding the referenced entities
|
||||
raises TransferFailure;
|
||||
-- Error if one of the Resulting Objects is defined not Transient
|
||||
|
||||
|
||||
FillModel (me; proc : FinderProcess;
|
||||
amodel : InterfaceModel)
|
||||
---Purpose : Fills an InterfaceModel with the Complete Result of a Transfer
|
||||
-- stored in a TransientProcess (Starting Objects are Transient)
|
||||
-- The complete result is exactly added to the model
|
||||
raises TransferFailure;
|
||||
-- Error if one of the Resulting Objects is defined not Transient
|
||||
|
||||
FillModel (me; proc : FinderProcess;
|
||||
amodel : InterfaceModel;
|
||||
proto : Protocol from Interface;
|
||||
roots : Boolean = Standard_True)
|
||||
---Purpose : Fills an InterfaceModel with results of the Transfer recorded
|
||||
-- in a TransientProcess (Starting Objects are Transient) :
|
||||
-- Root Result if <roots> is True (Default), Complete Result else
|
||||
-- The entities added to the model are determined from the result
|
||||
-- by by adding the referenced entities
|
||||
raises TransferFailure;
|
||||
-- Error if one of the Resulting Objects is defined not Transient
|
||||
|
||||
end TransferInput;
|
@@ -11,16 +11,23 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Transfer_TransferInput.ixx>
|
||||
#include <Transfer_Binder.hxx>
|
||||
#include <Transfer_IteratorOfProcessForTransient.hxx>
|
||||
#include <Transfer_IteratorOfProcessForFinder.hxx>
|
||||
#include <Transfer_VoidBinder.hxx>
|
||||
#include <Transfer_SimpleBinderOfTransient.hxx>
|
||||
#include <Transfer_MultipleBinder.hxx>
|
||||
#include <TColStd_HSequenceOfTransient.hxx>
|
||||
#include <Interface_Macros.hxx>
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
#include <Interface_InterfaceModel.hxx>
|
||||
#include <Interface_Macros.hxx>
|
||||
#include <Interface_Protocol.hxx>
|
||||
#include <TColStd_HSequenceOfTransient.hxx>
|
||||
#include <Transfer_Binder.hxx>
|
||||
#include <Transfer_FinderProcess.hxx>
|
||||
#include <Transfer_IteratorOfProcessForFinder.hxx>
|
||||
#include <Transfer_IteratorOfProcessForTransient.hxx>
|
||||
#include <Transfer_MultipleBinder.hxx>
|
||||
#include <Transfer_SimpleBinderOfTransient.hxx>
|
||||
#include <Transfer_TransferFailure.hxx>
|
||||
#include <Transfer_TransferInput.hxx>
|
||||
#include <Transfer_TransferIterator.hxx>
|
||||
#include <Transfer_TransientProcess.hxx>
|
||||
#include <Transfer_VoidBinder.hxx>
|
||||
|
||||
Transfer_TransferInput::Transfer_TransferInput () { }
|
||||
|
||||
|
99
src/Transfer/Transfer_TransferInput.hxx
Normal file
99
src/Transfer/Transfer_TransferInput.hxx
Normal file
@@ -0,0 +1,99 @@
|
||||
// Created on: 1992-02-04
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1992-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Transfer_TransferInput_HeaderFile
|
||||
#define _Transfer_TransferInput_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Transfer_TransferFailure;
|
||||
class Interface_EntityIterator;
|
||||
class Transfer_TransferIterator;
|
||||
class Transfer_TransientProcess;
|
||||
class Interface_InterfaceModel;
|
||||
class Interface_Protocol;
|
||||
class Transfer_FinderProcess;
|
||||
|
||||
|
||||
//! A TransferInput is a Tool which fills an InterfaceModel with
|
||||
//! the result of the Transfer of CasCade Objects, once determined
|
||||
//! The Result comes from a TransferProcess, either from
|
||||
//! Transient (the Complete Result is considered, it must contain
|
||||
//! only Transient Objects)
|
||||
class Transfer_TransferInput
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Creates a TransferInput ready to use
|
||||
Standard_EXPORT Transfer_TransferInput();
|
||||
|
||||
//! Takes the transient items stored in a TransferIterator
|
||||
Standard_EXPORT Interface_EntityIterator Entities (Transfer_TransferIterator& list) const;
|
||||
|
||||
//! Fills an InterfaceModel with the Complete Result of a Transfer
|
||||
//! stored in a TransientProcess (Starting Objects are Transient)
|
||||
//! The complete result is exactly added to the model
|
||||
Standard_EXPORT void FillModel (const Handle(Transfer_TransientProcess)& proc, const Handle(Interface_InterfaceModel)& amodel) const;
|
||||
|
||||
//! Fills an InterfaceModel with results of the Transfer recorded
|
||||
//! in a TransientProcess (Starting Objects are Transient) :
|
||||
//! Root Result if <roots> is True (Default), Complete Result else
|
||||
//! The entities added to the model are determined from the result
|
||||
//! by by adding the referenced entities
|
||||
Standard_EXPORT void FillModel (const Handle(Transfer_TransientProcess)& proc, const Handle(Interface_InterfaceModel)& amodel, const Handle(Interface_Protocol)& proto, const Standard_Boolean roots = Standard_True) const;
|
||||
|
||||
//! Fills an InterfaceModel with the Complete Result of a Transfer
|
||||
//! stored in a TransientProcess (Starting Objects are Transient)
|
||||
//! The complete result is exactly added to the model
|
||||
Standard_EXPORT void FillModel (const Handle(Transfer_FinderProcess)& proc, const Handle(Interface_InterfaceModel)& amodel) const;
|
||||
|
||||
//! Fills an InterfaceModel with results of the Transfer recorded
|
||||
//! in a TransientProcess (Starting Objects are Transient) :
|
||||
//! Root Result if <roots> is True (Default), Complete Result else
|
||||
//! The entities added to the model are determined from the result
|
||||
//! by by adding the referenced entities
|
||||
Standard_EXPORT void FillModel (const Handle(Transfer_FinderProcess)& proc, const Handle(Interface_InterfaceModel)& amodel, const Handle(Interface_Protocol)& proto, const Standard_Boolean roots = Standard_True) const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Transfer_TransferInput_HeaderFile
|
@@ -1,138 +0,0 @@
|
||||
-- Created on: 1992-10-28
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1992-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class TransferIterator from Transfer
|
||||
|
||||
---Purpose : Defines an Iterator on the result of a Transfer
|
||||
-- Available for Normal Results or not (Erroneous Transfer)
|
||||
-- It gives several kinds of Informations, and allows to consider
|
||||
-- various criteria (criteria are cumulative)
|
||||
|
||||
uses Integer, Boolean, Transient, Type,
|
||||
HSequenceOfInteger,
|
||||
Check, Binder, StatusExec, HSequenceOfBinder
|
||||
|
||||
raises NoSuchObject
|
||||
|
||||
is
|
||||
|
||||
-- -- Building the Iterator -- --
|
||||
|
||||
Create returns TransferIterator;
|
||||
---Purpose : Creates an empty Iterator
|
||||
|
||||
AddItem (me : in out; atr : Binder) is static;
|
||||
---Purpose : Adds a Binder to the iteration list (construction)
|
||||
|
||||
SelectBinder (me : in out; atype : Type; keep : Boolean) is static;
|
||||
---Purpose : Selects Items on the Type of Binder : keep only
|
||||
-- Binders which are of a given Type (if keep is True) or
|
||||
-- reject only them (if keep is False)
|
||||
|
||||
SelectResult (me : in out; atype : Type; keep : Boolean) is static;
|
||||
---Purpose : Selects Items on the Type of Result. Considers only Unique
|
||||
-- Results. Considers Dynamic Type for Transient Result,
|
||||
-- Static Type (the one given to define the Binder) else.
|
||||
--
|
||||
-- Results which are of a given Type (if keep is True) or reject
|
||||
-- only them (if keep is False)
|
||||
|
||||
SelectUnique (me : in out; keep : Boolean) is static;
|
||||
---Purpose : Select Items according Unicity : keep only Unique Results (if
|
||||
-- keep is True) or keep only Multiple Results (if keep is False)
|
||||
|
||||
SelectItem (me : in out; num : Integer; keep : Boolean);
|
||||
---Purpose : Selects/Unselect (according to <keep> an item designated by
|
||||
-- its rank <num> in the list
|
||||
-- Used by sub-classes which have specific criteria
|
||||
|
||||
-- -- Queries (Iteration, etc...) -- --
|
||||
|
||||
Number (me) returns Integer is static;
|
||||
---Purpose : Returns count of Binders to be iterated
|
||||
|
||||
Start (me : in out) is static;
|
||||
---Purpose : Clears Iteration in progress, to allow it to be restarted
|
||||
|
||||
More (me : in out) returns Boolean is static;
|
||||
---Purpose : Returns True if there are other Items to iterate
|
||||
|
||||
Next (me : in out) is static;
|
||||
---Purpose : Sets Iteration to the next Item
|
||||
|
||||
Value (me) returns Binder
|
||||
---Purpose : Returns the current Binder
|
||||
raises NoSuchObject is static;
|
||||
-- Error if Iteration has ended
|
||||
-- Some remarkable data can be accessed by following methods :
|
||||
---C++ : return const &
|
||||
|
||||
|
||||
HasResult (me) returns Boolean raises NoSuchObject is static;
|
||||
---Purpose : Returns True if current Item brings a Result, Transient
|
||||
-- (Handle) or not or Multiple. That is to say, if it corresponds
|
||||
-- to a normally acheived Transfer, Transient Result is read by
|
||||
-- specific TransientResult below.
|
||||
-- Other kind of Result must be read specifically from its Binder
|
||||
|
||||
HasUniqueResult (me) returns Boolean raises NoSuchObject is static;
|
||||
---Purpose : Returns True if Current Item has a Unique Result
|
||||
|
||||
ResultType (me) returns Type raises NoSuchObject is static;
|
||||
---Purpose : Returns the Type of the Result of the current Item, if Unique.
|
||||
-- If No Unique Result (Error Transfert or Multiple Result),
|
||||
-- returns a Null Handle
|
||||
-- The Type is : the Dynamic Type for a Transient Result,
|
||||
-- the Type defined by the Binder Class else
|
||||
|
||||
HasTransientResult (me) returns Boolean raises NoSuchObject is static;
|
||||
---Purpose : Returns True if the current Item has a Transient Unique
|
||||
-- Result (if yes, use TransientResult to get it)
|
||||
|
||||
TransientResult (me) returns any Transient
|
||||
raises NoSuchObject is static;
|
||||
---Purpose : Returns the Transient Result of the current Item if there is
|
||||
-- (else, returns a null Handle)
|
||||
-- Supposes that Binding is done by a SimpleBinderOfTransient
|
||||
---C++ : return const &
|
||||
|
||||
|
||||
Status (me) returns StatusExec is static;
|
||||
---Purpose : Returns Execution Status of current Binder
|
||||
-- Normal transfer corresponds to StatusDone
|
||||
|
||||
HasFails (me) returns Boolean is static;
|
||||
---Purpose : Returns True if Fail Messages are recorded with the current
|
||||
-- Binder. They can then be read through Check (see below)
|
||||
|
||||
HasWarnings (me) returns Boolean is static;
|
||||
---Purpose : Returns True if Warning Messages are recorded with the current
|
||||
-- Binder. They can then be read through Check (see below)
|
||||
|
||||
Check (me) returns Check is static;
|
||||
---Purpose : Returns Check associated to current Binder
|
||||
-- (in case of error, it brings Fail messages)
|
||||
-- (in case of warnings, it brings Warning messages)
|
||||
---C++ : return const
|
||||
|
||||
fields
|
||||
|
||||
theitems : HSequenceOfBinder;
|
||||
theselect : HSequenceOfInteger;
|
||||
themaxi : Integer;
|
||||
thecurr : Integer is protected; -- for read by sub-classes
|
||||
|
||||
end TransferIterator;
|
@@ -11,10 +11,13 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Transfer_TransferIterator.ixx>
|
||||
#include <Transfer_SimpleBinderOfTransient.hxx>
|
||||
|
||||
#include <Interface_Check.hxx>
|
||||
#include <Standard_NoSuchObject.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <Transfer_Binder.hxx>
|
||||
#include <Transfer_SimpleBinderOfTransient.hxx>
|
||||
#include <Transfer_TransferIterator.hxx>
|
||||
|
||||
static Handle(Standard_Transient) nultrans; // pour retour const&(Null)
|
||||
|
||||
|
160
src/Transfer/Transfer_TransferIterator.hxx
Normal file
160
src/Transfer/Transfer_TransferIterator.hxx
Normal file
@@ -0,0 +1,160 @@
|
||||
// Created on: 1992-10-28
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1992-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Transfer_TransferIterator_HeaderFile
|
||||
#define _Transfer_TransferIterator_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Transfer_HSequenceOfBinder.hxx>
|
||||
#include <TColStd_HSequenceOfInteger.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Transfer_StatusExec.hxx>
|
||||
class Standard_NoSuchObject;
|
||||
class Transfer_Binder;
|
||||
class Standard_Transient;
|
||||
class Interface_Check;
|
||||
|
||||
|
||||
//! Defines an Iterator on the result of a Transfer
|
||||
//! Available for Normal Results or not (Erroneous Transfer)
|
||||
//! It gives several kinds of Informations, and allows to consider
|
||||
//! various criteria (criteria are cumulative)
|
||||
class Transfer_TransferIterator
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Creates an empty Iterator
|
||||
Standard_EXPORT Transfer_TransferIterator();
|
||||
|
||||
//! Adds a Binder to the iteration list (construction)
|
||||
Standard_EXPORT void AddItem (const Handle(Transfer_Binder)& atr);
|
||||
|
||||
//! Selects Items on the Type of Binder : keep only
|
||||
//! Binders which are of a given Type (if keep is True) or
|
||||
//! reject only them (if keep is False)
|
||||
Standard_EXPORT void SelectBinder (const Handle(Standard_Type)& atype, const Standard_Boolean keep);
|
||||
|
||||
//! Selects Items on the Type of Result. Considers only Unique
|
||||
//! Results. Considers Dynamic Type for Transient Result,
|
||||
//! Static Type (the one given to define the Binder) else.
|
||||
//!
|
||||
//! Results which are of a given Type (if keep is True) or reject
|
||||
//! only them (if keep is False)
|
||||
Standard_EXPORT void SelectResult (const Handle(Standard_Type)& atype, const Standard_Boolean keep);
|
||||
|
||||
//! Select Items according Unicity : keep only Unique Results (if
|
||||
//! keep is True) or keep only Multiple Results (if keep is False)
|
||||
Standard_EXPORT void SelectUnique (const Standard_Boolean keep);
|
||||
|
||||
//! Selects/Unselect (according to <keep> an item designated by
|
||||
//! its rank <num> in the list
|
||||
//! Used by sub-classes which have specific criteria
|
||||
Standard_EXPORT void SelectItem (const Standard_Integer num, const Standard_Boolean keep);
|
||||
|
||||
//! Returns count of Binders to be iterated
|
||||
Standard_EXPORT Standard_Integer Number() const;
|
||||
|
||||
//! Clears Iteration in progress, to allow it to be restarted
|
||||
Standard_EXPORT void Start();
|
||||
|
||||
//! Returns True if there are other Items to iterate
|
||||
Standard_EXPORT Standard_Boolean More();
|
||||
|
||||
//! Sets Iteration to the next Item
|
||||
Standard_EXPORT void Next();
|
||||
|
||||
//! Returns the current Binder
|
||||
Standard_EXPORT const Handle(Transfer_Binder)& Value() const;
|
||||
|
||||
//! Returns True if current Item brings a Result, Transient
|
||||
//! (Handle) or not or Multiple. That is to say, if it corresponds
|
||||
//! to a normally acheived Transfer, Transient Result is read by
|
||||
//! specific TransientResult below.
|
||||
//! Other kind of Result must be read specifically from its Binder
|
||||
Standard_EXPORT Standard_Boolean HasResult() const;
|
||||
|
||||
//! Returns True if Current Item has a Unique Result
|
||||
Standard_EXPORT Standard_Boolean HasUniqueResult() const;
|
||||
|
||||
//! Returns the Type of the Result of the current Item, if Unique.
|
||||
//! If No Unique Result (Error Transfert or Multiple Result),
|
||||
//! returns a Null Handle
|
||||
//! The Type is : the Dynamic Type for a Transient Result,
|
||||
//! the Type defined by the Binder Class else
|
||||
Standard_EXPORT Handle(Standard_Type) ResultType() const;
|
||||
|
||||
//! Returns True if the current Item has a Transient Unique
|
||||
//! Result (if yes, use TransientResult to get it)
|
||||
Standard_EXPORT Standard_Boolean HasTransientResult() const;
|
||||
|
||||
//! Returns the Transient Result of the current Item if there is
|
||||
//! (else, returns a null Handle)
|
||||
//! Supposes that Binding is done by a SimpleBinderOfTransient
|
||||
Standard_EXPORT const Handle(Standard_Transient)& TransientResult() const;
|
||||
|
||||
//! Returns Execution Status of current Binder
|
||||
//! Normal transfer corresponds to StatusDone
|
||||
Standard_EXPORT Transfer_StatusExec Status() const;
|
||||
|
||||
//! Returns True if Fail Messages are recorded with the current
|
||||
//! Binder. They can then be read through Check (see below)
|
||||
Standard_EXPORT Standard_Boolean HasFails() const;
|
||||
|
||||
//! Returns True if Warning Messages are recorded with the current
|
||||
//! Binder. They can then be read through Check (see below)
|
||||
Standard_EXPORT Standard_Boolean HasWarnings() const;
|
||||
|
||||
//! Returns Check associated to current Binder
|
||||
//! (in case of error, it brings Fail messages)
|
||||
//! (in case of warnings, it brings Warning messages)
|
||||
Standard_EXPORT const Handle(Interface_Check) Check() const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
Standard_Integer thecurr;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Handle(Transfer_HSequenceOfBinder) theitems;
|
||||
Handle(TColStd_HSequenceOfInteger) theselect;
|
||||
Standard_Integer themaxi;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Transfer_TransferIterator_HeaderFile
|
118
src/Transfer/Transfer_TransferMapOfProcessForFinder.hxx
Normal file
118
src/Transfer/Transfer_TransferMapOfProcessForFinder.hxx
Normal file
@@ -0,0 +1,118 @@
|
||||
// Created on: 1992-02-03
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1992-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Transfer_TransferMapOfProcessForFinder_HeaderFile
|
||||
#define _Transfer_TransferMapOfProcessForFinder_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <TCollection_BasicMap.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Address.hxx>
|
||||
class Standard_DomainError;
|
||||
class Standard_OutOfRange;
|
||||
class Standard_NoSuchObject;
|
||||
class Transfer_Finder;
|
||||
class Transfer_Binder;
|
||||
class Transfer_FindHasher;
|
||||
class Transfer_IndexedDataMapNodeOfTransferMapOfProcessForFinder;
|
||||
|
||||
|
||||
|
||||
class Transfer_TransferMapOfProcessForFinder : public TCollection_BasicMap
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT Transfer_TransferMapOfProcessForFinder(const Standard_Integer NbBuckets = 1);
|
||||
|
||||
Standard_EXPORT Transfer_TransferMapOfProcessForFinder& Assign (const Transfer_TransferMapOfProcessForFinder& Other);
|
||||
Transfer_TransferMapOfProcessForFinder& operator = (const Transfer_TransferMapOfProcessForFinder& Other)
|
||||
{
|
||||
return Assign(Other);
|
||||
}
|
||||
|
||||
Standard_EXPORT void ReSize (const Standard_Integer NbBuckets);
|
||||
|
||||
Standard_EXPORT void Clear();
|
||||
~Transfer_TransferMapOfProcessForFinder()
|
||||
{
|
||||
Clear();
|
||||
}
|
||||
|
||||
Standard_EXPORT Standard_Integer Add (const Handle(Transfer_Finder)& K, const Handle(Transfer_Binder)& I);
|
||||
|
||||
Standard_EXPORT void Substitute (const Standard_Integer I, const Handle(Transfer_Finder)& K, const Handle(Transfer_Binder)& T);
|
||||
|
||||
Standard_EXPORT void RemoveLast();
|
||||
|
||||
Standard_EXPORT Standard_Boolean Contains (const Handle(Transfer_Finder)& K) const;
|
||||
|
||||
Standard_EXPORT const Handle(Transfer_Finder)& FindKey (const Standard_Integer I) const;
|
||||
|
||||
Standard_EXPORT const Handle(Transfer_Binder)& FindFromIndex (const Standard_Integer I) const;
|
||||
const Handle(Transfer_Binder)& operator () (const Standard_Integer I) const
|
||||
{
|
||||
return FindFromIndex(I);
|
||||
}
|
||||
|
||||
Standard_EXPORT Handle(Transfer_Binder)& ChangeFromIndex (const Standard_Integer I);
|
||||
Handle(Transfer_Binder)& operator () (const Standard_Integer I)
|
||||
{
|
||||
return ChangeFromIndex(I);
|
||||
}
|
||||
|
||||
Standard_EXPORT Standard_Integer FindIndex (const Handle(Transfer_Finder)& K) const;
|
||||
|
||||
Standard_EXPORT const Handle(Transfer_Binder)& FindFromKey (const Handle(Transfer_Finder)& K) const;
|
||||
|
||||
Standard_EXPORT Handle(Transfer_Binder)& ChangeFromKey (const Handle(Transfer_Finder)& K);
|
||||
|
||||
Standard_EXPORT Standard_Address FindFromKey1 (const Handle(Transfer_Finder)& K) const;
|
||||
|
||||
Standard_EXPORT Standard_Address ChangeFromKey1 (const Handle(Transfer_Finder)& K);
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Standard_EXPORT Transfer_TransferMapOfProcessForFinder(const Transfer_TransferMapOfProcessForFinder& Other);
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Transfer_TransferMapOfProcessForFinder_HeaderFile
|
40
src/Transfer/Transfer_TransferMapOfProcessForFinder_0.cxx
Normal file
40
src/Transfer/Transfer_TransferMapOfProcessForFinder_0.cxx
Normal file
@@ -0,0 +1,40 @@
|
||||
// Created on: 1992-02-03
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1992-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Transfer_TransferMapOfProcessForFinder.hxx>
|
||||
|
||||
#include <Standard_DomainError.hxx>
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
#include <Standard_NoSuchObject.hxx>
|
||||
#include <Transfer_Finder.hxx>
|
||||
#include <Transfer_Binder.hxx>
|
||||
#include <Transfer_FindHasher.hxx>
|
||||
#include <Transfer_IndexedDataMapNodeOfTransferMapOfProcessForFinder.hxx>
|
||||
|
||||
|
||||
#define TheKey Handle(Transfer_Finder)
|
||||
#define TheKey_hxx <Transfer_Finder.hxx>
|
||||
#define TheItem Handle(Transfer_Binder)
|
||||
#define TheItem_hxx <Transfer_Binder.hxx>
|
||||
#define Hasher Transfer_FindHasher
|
||||
#define Hasher_hxx <Transfer_FindHasher.hxx>
|
||||
#define TCollection_IndexedDataMapNode Transfer_IndexedDataMapNodeOfTransferMapOfProcessForFinder
|
||||
#define TCollection_IndexedDataMapNode_hxx <Transfer_IndexedDataMapNodeOfTransferMapOfProcessForFinder.hxx>
|
||||
#define Handle_TCollection_IndexedDataMapNode Handle(Transfer_IndexedDataMapNodeOfTransferMapOfProcessForFinder)
|
||||
#define TCollection_IndexedDataMap Transfer_TransferMapOfProcessForFinder
|
||||
#define TCollection_IndexedDataMap_hxx <Transfer_TransferMapOfProcessForFinder.hxx>
|
||||
#include <TCollection_IndexedDataMap.gxx>
|
||||
|
118
src/Transfer/Transfer_TransferMapOfProcessForTransient.hxx
Normal file
118
src/Transfer/Transfer_TransferMapOfProcessForTransient.hxx
Normal file
@@ -0,0 +1,118 @@
|
||||
// Created on: 1992-02-03
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1992-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Transfer_TransferMapOfProcessForTransient_HeaderFile
|
||||
#define _Transfer_TransferMapOfProcessForTransient_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <TCollection_BasicMap.hxx>
|
||||
#include <TColStd_MapTransientHasher.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Address.hxx>
|
||||
class Standard_DomainError;
|
||||
class Standard_OutOfRange;
|
||||
class Standard_NoSuchObject;
|
||||
class Standard_Transient;
|
||||
class Transfer_Binder;
|
||||
class Transfer_IndexedDataMapNodeOfTransferMapOfProcessForTransient;
|
||||
|
||||
|
||||
|
||||
class Transfer_TransferMapOfProcessForTransient : public TCollection_BasicMap
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
Standard_EXPORT Transfer_TransferMapOfProcessForTransient(const Standard_Integer NbBuckets = 1);
|
||||
|
||||
Standard_EXPORT Transfer_TransferMapOfProcessForTransient& Assign (const Transfer_TransferMapOfProcessForTransient& Other);
|
||||
Transfer_TransferMapOfProcessForTransient& operator = (const Transfer_TransferMapOfProcessForTransient& Other)
|
||||
{
|
||||
return Assign(Other);
|
||||
}
|
||||
|
||||
Standard_EXPORT void ReSize (const Standard_Integer NbBuckets);
|
||||
|
||||
Standard_EXPORT void Clear();
|
||||
~Transfer_TransferMapOfProcessForTransient()
|
||||
{
|
||||
Clear();
|
||||
}
|
||||
|
||||
Standard_EXPORT Standard_Integer Add (const Handle(Standard_Transient)& K, const Handle(Transfer_Binder)& I);
|
||||
|
||||
Standard_EXPORT void Substitute (const Standard_Integer I, const Handle(Standard_Transient)& K, const Handle(Transfer_Binder)& T);
|
||||
|
||||
Standard_EXPORT void RemoveLast();
|
||||
|
||||
Standard_EXPORT Standard_Boolean Contains (const Handle(Standard_Transient)& K) const;
|
||||
|
||||
Standard_EXPORT const Handle(Standard_Transient)& FindKey (const Standard_Integer I) const;
|
||||
|
||||
Standard_EXPORT const Handle(Transfer_Binder)& FindFromIndex (const Standard_Integer I) const;
|
||||
const Handle(Transfer_Binder)& operator () (const Standard_Integer I) const
|
||||
{
|
||||
return FindFromIndex(I);
|
||||
}
|
||||
|
||||
Standard_EXPORT Handle(Transfer_Binder)& ChangeFromIndex (const Standard_Integer I);
|
||||
Handle(Transfer_Binder)& operator () (const Standard_Integer I)
|
||||
{
|
||||
return ChangeFromIndex(I);
|
||||
}
|
||||
|
||||
Standard_EXPORT Standard_Integer FindIndex (const Handle(Standard_Transient)& K) const;
|
||||
|
||||
Standard_EXPORT const Handle(Transfer_Binder)& FindFromKey (const Handle(Standard_Transient)& K) const;
|
||||
|
||||
Standard_EXPORT Handle(Transfer_Binder)& ChangeFromKey (const Handle(Standard_Transient)& K);
|
||||
|
||||
Standard_EXPORT Standard_Address FindFromKey1 (const Handle(Standard_Transient)& K) const;
|
||||
|
||||
Standard_EXPORT Standard_Address ChangeFromKey1 (const Handle(Standard_Transient)& K);
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Standard_EXPORT Transfer_TransferMapOfProcessForTransient(const Transfer_TransferMapOfProcessForTransient& Other);
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Transfer_TransferMapOfProcessForTransient_HeaderFile
|
39
src/Transfer/Transfer_TransferMapOfProcessForTransient_0.cxx
Normal file
39
src/Transfer/Transfer_TransferMapOfProcessForTransient_0.cxx
Normal file
@@ -0,0 +1,39 @@
|
||||
// Created on: 1992-02-03
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1992-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Transfer_TransferMapOfProcessForTransient.hxx>
|
||||
|
||||
#include <Standard_DomainError.hxx>
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
#include <Standard_NoSuchObject.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <Transfer_Binder.hxx>
|
||||
#include <Transfer_IndexedDataMapNodeOfTransferMapOfProcessForTransient.hxx>
|
||||
|
||||
|
||||
#define TheKey Handle(Standard_Transient)
|
||||
#define TheKey_hxx <Standard_Transient.hxx>
|
||||
#define TheItem Handle(Transfer_Binder)
|
||||
#define TheItem_hxx <Transfer_Binder.hxx>
|
||||
#define Hasher TColStd_MapTransientHasher
|
||||
#define Hasher_hxx <TColStd_MapTransientHasher.hxx>
|
||||
#define TCollection_IndexedDataMapNode Transfer_IndexedDataMapNodeOfTransferMapOfProcessForTransient
|
||||
#define TCollection_IndexedDataMapNode_hxx <Transfer_IndexedDataMapNodeOfTransferMapOfProcessForTransient.hxx>
|
||||
#define Handle_TCollection_IndexedDataMapNode Handle(Transfer_IndexedDataMapNodeOfTransferMapOfProcessForTransient)
|
||||
#define TCollection_IndexedDataMap Transfer_TransferMapOfProcessForTransient
|
||||
#define TCollection_IndexedDataMap_hxx <Transfer_TransferMapOfProcessForTransient.hxx>
|
||||
#include <TCollection_IndexedDataMap.gxx>
|
||||
|
@@ -1,113 +0,0 @@
|
||||
-- Created on: 1992-02-04
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1992-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class TransferOutput from Transfer
|
||||
|
||||
---Purpose : A TransferOutput is a Tool which manages the transfer of
|
||||
-- entities created by an Interface, stored in an InterfaceModel,
|
||||
-- into a set of Objects suitable for an Application
|
||||
-- Objects to be transferred are given, by method Transfer
|
||||
-- (which calls Transfer from TransientProcess)
|
||||
-- A default action is available to get all roots of the Model
|
||||
-- Result is given as a TransferIterator (see TransferProcess)
|
||||
-- Also, it is possible to pilot directly the TransientProcess
|
||||
|
||||
uses Transient, HSequenceOfTransient,
|
||||
InterfaceModel, Protocol from Interface, Graph, EntityIterator,
|
||||
TransientProcess, ActorOfTransientProcess
|
||||
|
||||
raises NoSuchObject, TransferFailure
|
||||
|
||||
is
|
||||
|
||||
Create (actor : ActorOfTransientProcess; amodel : InterfaceModel)
|
||||
returns TransferOutput;
|
||||
---Purpose : Creates a TransferOutput ready to use, with a TransientProcess
|
||||
|
||||
Create (proc : TransientProcess; amodel : InterfaceModel)
|
||||
returns TransferOutput;
|
||||
---Purpose : Creates a TransferOutput from an already existing
|
||||
-- TransientProcess, and a Model
|
||||
|
||||
-- ScopeMode (me : in out) returns Boolean;
|
||||
---Purpose : Returns (by Reference, hence can be changed) the Mode for
|
||||
-- Scope Management. False (D) means Scope is ignored.
|
||||
-- True means that each individual Transfer (direct or through
|
||||
-- TransferRoots) is regarded as one Scope
|
||||
---C++ : return &
|
||||
|
||||
Model (me) returns InterfaceModel;
|
||||
---Purpose : Returns the Starting Model
|
||||
|
||||
TransientProcess (me) returns TransientProcess;
|
||||
---Purpose : Returns the TransientProcess used to work
|
||||
|
||||
Transfer (me : in out; obj : Transient)
|
||||
---Purpose : Transfer checks that all taken Entities come from the same
|
||||
-- Model, then calls Transfer from TransientProcess
|
||||
raises TransferFailure;
|
||||
-- Error if <obj> does not come from starting Model
|
||||
|
||||
|
||||
TransferRoots (me : in out; protocol : Protocol from Interface);
|
||||
---Purpose : Runs transfer on the roots of the Interface Model
|
||||
-- The Roots are computed with a ShareFlags created from a
|
||||
-- Protocol given as Argument
|
||||
|
||||
TransferRoots (me : in out; G : Graph from Interface);
|
||||
---Purpose : Runs transfer on the roots defined by a Graph of dependences
|
||||
-- (which detains also a Model and its Entities)
|
||||
-- Roots are computed with a ShareFlags created from the Graph
|
||||
|
||||
TransferRoots (me : in out);
|
||||
---Purpose : Runs transfer on the roots of the Interface Model
|
||||
-- Remark : the Roots are computed with a ShareFlags created
|
||||
-- from the Active Protocol
|
||||
|
||||
-- Helping Extractions --
|
||||
|
||||
ListForStatus (me; normal : Boolean; roots : Boolean = Standard_True)
|
||||
returns EntityIterator;
|
||||
---Purpose : Returns the list of Starting Entities with these criteria :
|
||||
-- - <normal> False, gives the entities bound with ABNORMAL STATUS
|
||||
-- (e.g. : Fail recorded, Exception raised during Transfer)
|
||||
-- - <normal> True, gives Entities with or without a Result, but
|
||||
-- with no Fail, no Exception (Warnings are not counted)
|
||||
-- - <roots> False, considers all entities recorded (either for
|
||||
-- Result, or for at least one Fail or Warning message)
|
||||
-- - <roots> True (Default), considers only roots of Transfer
|
||||
-- (the Entities recorded at highest level)
|
||||
-- This method is based on AbnormalResult from TransferProcess
|
||||
|
||||
ModelForStatus (me; protocol : Protocol;
|
||||
normal : Boolean; roots : Boolean = Standard_True)
|
||||
returns InterfaceModel;
|
||||
---Purpose : Fills a Model with the list determined by ListForStatus
|
||||
-- This model starts from scratch (made by NewEmptyModel from the
|
||||
-- current Model), then is filled by AddWithRefs
|
||||
--
|
||||
-- Useful to get separately from a transfer, the entities which
|
||||
-- have caused problem, in order to furtherly analyse them (with
|
||||
-- normal = False), or the "good" entities, to obtain a data set
|
||||
-- "which works well" (with normal = True)
|
||||
|
||||
fields
|
||||
|
||||
theproc : TransientProcess;
|
||||
themodel : InterfaceModel;
|
||||
-- thescope : Boolean;
|
||||
|
||||
end TransferOutput;
|
@@ -12,13 +12,19 @@
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
//szv#4 S4163
|
||||
#include <Transfer_TransferOutput.ixx>
|
||||
#include <Transfer_Binder.hxx>
|
||||
#include <Interface_ShareFlags.hxx>
|
||||
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
#include <Interface_Graph.hxx>
|
||||
#include <Interface_InterfaceModel.hxx>
|
||||
#include <Interface_Protocol.hxx>
|
||||
#include <Interface_ShareFlags.hxx>
|
||||
#include <Standard_NoSuchObject.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <Transfer_ActorOfTransientProcess.hxx>
|
||||
#include <Transfer_Binder.hxx>
|
||||
#include <Transfer_TransferFailure.hxx>
|
||||
|
||||
|
||||
#include <Transfer_TransferOutput.hxx>
|
||||
#include <Transfer_TransientProcess.hxx>
|
||||
|
||||
Transfer_TransferOutput::Transfer_TransferOutput (const Handle(Transfer_ActorOfTransientProcess)& actor,
|
||||
const Handle(Interface_InterfaceModel)& amodel)
|
||||
|
134
src/Transfer/Transfer_TransferOutput.hxx
Normal file
134
src/Transfer/Transfer_TransferOutput.hxx
Normal file
@@ -0,0 +1,134 @@
|
||||
// Created on: 1992-02-04
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1992-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Transfer_TransferOutput_HeaderFile
|
||||
#define _Transfer_TransferOutput_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Boolean.hxx>
|
||||
class Transfer_TransientProcess;
|
||||
class Interface_InterfaceModel;
|
||||
class Standard_NoSuchObject;
|
||||
class Transfer_TransferFailure;
|
||||
class Transfer_ActorOfTransientProcess;
|
||||
class Standard_Transient;
|
||||
class Interface_Protocol;
|
||||
class Interface_Graph;
|
||||
class Interface_EntityIterator;
|
||||
|
||||
|
||||
//! A TransferOutput is a Tool which manages the transfer of
|
||||
//! entities created by an Interface, stored in an InterfaceModel,
|
||||
//! into a set of Objects suitable for an Application
|
||||
//! Objects to be transferred are given, by method Transfer
|
||||
//! (which calls Transfer from TransientProcess)
|
||||
//! A default action is available to get all roots of the Model
|
||||
//! Result is given as a TransferIterator (see TransferProcess)
|
||||
//! Also, it is possible to pilot directly the TransientProcess
|
||||
class Transfer_TransferOutput
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Creates a TransferOutput ready to use, with a TransientProcess
|
||||
Standard_EXPORT Transfer_TransferOutput(const Handle(Transfer_ActorOfTransientProcess)& actor, const Handle(Interface_InterfaceModel)& amodel);
|
||||
|
||||
//! Creates a TransferOutput from an already existing
|
||||
//! TransientProcess, and a Model
|
||||
//! Returns (by Reference, hence can be changed) the Mode for
|
||||
//! Scope Management. False (D) means Scope is ignored.
|
||||
//! True means that each individual Transfer (direct or through
|
||||
//! TransferRoots) is regarded as one Scope
|
||||
Standard_EXPORT Transfer_TransferOutput(const Handle(Transfer_TransientProcess)& proc, const Handle(Interface_InterfaceModel)& amodel);
|
||||
|
||||
//! Returns the Starting Model
|
||||
Standard_EXPORT Handle(Interface_InterfaceModel) Model() const;
|
||||
|
||||
//! Returns the TransientProcess used to work
|
||||
Standard_EXPORT Handle(Transfer_TransientProcess) TransientProcess() const;
|
||||
|
||||
//! Transfer checks that all taken Entities come from the same
|
||||
//! Model, then calls Transfer from TransientProcess
|
||||
Standard_EXPORT void Transfer (const Handle(Standard_Transient)& obj);
|
||||
|
||||
//! Runs transfer on the roots of the Interface Model
|
||||
//! The Roots are computed with a ShareFlags created from a
|
||||
//! Protocol given as Argument
|
||||
Standard_EXPORT void TransferRoots (const Handle(Interface_Protocol)& protocol);
|
||||
|
||||
//! Runs transfer on the roots defined by a Graph of dependences
|
||||
//! (which detains also a Model and its Entities)
|
||||
//! Roots are computed with a ShareFlags created from the Graph
|
||||
Standard_EXPORT void TransferRoots (const Interface_Graph& G);
|
||||
|
||||
//! Runs transfer on the roots of the Interface Model
|
||||
//! Remark : the Roots are computed with a ShareFlags created
|
||||
//! from the Active Protocol
|
||||
Standard_EXPORT void TransferRoots();
|
||||
|
||||
//! Returns the list of Starting Entities with these criteria :
|
||||
//! - <normal> False, gives the entities bound with ABNORMAL STATUS
|
||||
//! (e.g. : Fail recorded, Exception raised during Transfer)
|
||||
//! - <normal> True, gives Entities with or without a Result, but
|
||||
//! with no Fail, no Exception (Warnings are not counted)
|
||||
//! - <roots> False, considers all entities recorded (either for
|
||||
//! Result, or for at least one Fail or Warning message)
|
||||
//! - <roots> True (Default), considers only roots of Transfer
|
||||
//! (the Entities recorded at highest level)
|
||||
//! This method is based on AbnormalResult from TransferProcess
|
||||
Standard_EXPORT Interface_EntityIterator ListForStatus (const Standard_Boolean normal, const Standard_Boolean roots = Standard_True) const;
|
||||
|
||||
//! Fills a Model with the list determined by ListForStatus
|
||||
//! This model starts from scratch (made by NewEmptyModel from the
|
||||
//! current Model), then is filled by AddWithRefs
|
||||
//!
|
||||
//! Useful to get separately from a transfer, the entities which
|
||||
//! have caused problem, in order to furtherly analyse them (with
|
||||
//! normal = False), or the "good" entities, to obtain a data set
|
||||
//! "which works well" (with normal = True)
|
||||
Standard_EXPORT Handle(Interface_InterfaceModel) ModelForStatus (const Handle(Interface_Protocol)& protocol, const Standard_Boolean normal, const Standard_Boolean roots = Standard_True) const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
Handle(Transfer_TransientProcess) theproc;
|
||||
Handle(Interface_InterfaceModel) themodel;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Transfer_TransferOutput_HeaderFile
|
@@ -1,733 +0,0 @@
|
||||
-- Created on: 1992-02-03
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1992-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
generic class TransferProcess from Transfer
|
||||
(TheStart as any; -- either Transient or Finder
|
||||
TheMapHasher as any;
|
||||
TheList as Transient) -- HSequence from TCollection(TheStart)
|
||||
-- TheStart as Handle (i.e. Finder-Transient only)
|
||||
-- TheMapMasher : only for the Map
|
||||
-- TheList : for Starting Objects in Iterator (a HSequence from TColStd)
|
||||
inherits TShared
|
||||
|
||||
---Purpose : This class gives the frame for doing a direct transfer : it
|
||||
-- provides required basic tools, such as a Map, and automatisms
|
||||
-- which simplify work, while their use is not mandatory.
|
||||
--
|
||||
-- Starting Objects managed by Mapping can be Transient or any
|
||||
-- (by two instantiations provided by the package,
|
||||
-- TransientProcess and FinderProcess, see class Finder).
|
||||
--
|
||||
-- A direct Transfer must maintain data sharing whenever possible
|
||||
-- (that is, when described by both sides) : this is managed by a
|
||||
-- Map. It works with intermediate Objects, the Binders. Hence it
|
||||
-- allows a binding, one/several-one/several, and it controls
|
||||
-- that a Resulting Data can be used by another one only
|
||||
-- if its creation has been ended. Also it keeps error status.
|
||||
--
|
||||
-- Several results can be bound to a starting object, identified
|
||||
-- by a category number. The default one (the only one considered
|
||||
-- for final analysis) is zero. But mapping accesses allow to
|
||||
-- precise a category number different from zero
|
||||
--
|
||||
-- In order to work more easily in most cases, automatisms are
|
||||
-- offered. Classically, to transfer an object, its result is
|
||||
-- computed then bound. This applies recursively for referenced
|
||||
-- objects. Each Transfer of a kind of object can be performed
|
||||
-- by a specific Tool, which can use TransferProcess to work.
|
||||
--
|
||||
--
|
||||
-- Many often, a specific Transfer can work as : "Search the good
|
||||
-- Tool to Perform the Transfer (if not provided), run the Tool,
|
||||
-- then Bind the Result", where "Perform" is seen as a black box.
|
||||
--
|
||||
-- This way of working is assumed through automatisms which use
|
||||
-- two types of auxiliary objects :
|
||||
-- - An Actor acts as a Library of Transfer Actions :
|
||||
-- it recognizes the operation to perform on a starting object,
|
||||
-- then runs it (see class Actor)
|
||||
-- - it produces a Binder, which is then recorded in the Map
|
||||
-- - of course, if the Transfer has been already done, it is not
|
||||
-- run once more : the first Result is available
|
||||
-- - it is possible to re-evaluate the Result if required (i.e.
|
||||
-- if the definitive Result is known only once other Transfers
|
||||
-- have been engaged)
|
||||
-- - in the case of a second (or more) ask for Transfer, the
|
||||
-- Result is considered as "AlreadyUsed", hence it may not be
|
||||
-- changed (in the Binder itself or by Rebinding another one)
|
||||
--
|
||||
-- This gives a top-down process, in which first object to be
|
||||
-- transferred asks for another one it references to be, etc...
|
||||
-- This allows automatic management of Roots : only first
|
||||
-- transfers (asked by the user) can be Root Transfers.
|
||||
--
|
||||
--
|
||||
-- Other features are : Management of Root Entities (the Entities
|
||||
-- by which the Transfer has started, and their Results, can be
|
||||
-- identified as Roots, by the user or by automatisms); Error
|
||||
-- Handling (if automatisms are used);
|
||||
-- Returning Results, which can be specialized for
|
||||
-- Roots, or Erroneous Data, or complete/partial (for one entity)
|
||||
--
|
||||
-- Finally, TransferProcess inherits TShared : this allows to
|
||||
-- run successive steps on the same set of data attached to a
|
||||
-- given Transfer, by easily transmitting this set.
|
||||
|
||||
uses Integer, Boolean, Transient, Type,
|
||||
IndexedMapOfInteger,SequenceOfInteger,HArray1OfInteger, SequenceOfTransient,
|
||||
HSequenceOfTransient, DictionaryOfInteger from Dico,
|
||||
Msg from Message, Messenger from Message,
|
||||
ParamType from Interface,
|
||||
Check from Interface, CheckIterator from Interface, Binder from Transfer,
|
||||
ProgressIndicator from Message
|
||||
-- also : parameter TheStart; nested Actor, Iterator, TransferMap
|
||||
|
||||
raises InterfaceError, TransferFailure
|
||||
|
||||
|
||||
-- -- Nested Classes -- --
|
||||
|
||||
class TransferMap instantiates IndexedDataMap from TCollection
|
||||
(TheStart,Binder,TheMapHasher);
|
||||
---Purpose : This is the Map used by TransferProcess
|
||||
|
||||
|
||||
class Iterator inherits TransferIterator
|
||||
---Purpose : This is a TransferIterator PLUS the capability to access
|
||||
-- the Starting Objects. It is given as a Result from
|
||||
-- TransferProcess. It can be used when a TransferIterator
|
||||
-- is required
|
||||
---See also : TransferIterator, for more information
|
||||
|
||||
uses Boolean, Binder -- , TheStart, TheList
|
||||
|
||||
raises NoSuchObject
|
||||
|
||||
is
|
||||
|
||||
Create (withstarts : Boolean) returns Iterator;
|
||||
---Purpose : Creates an empty Iterator
|
||||
-- if withstarts is True, each Binder to be iterated will
|
||||
-- be associated to its corresponding Starting Object
|
||||
|
||||
Add (me : in out; binder : Binder)
|
||||
---Purpose : Adds a Binder to the iteration list (construction)
|
||||
-- with no corresponding Starting Object
|
||||
-- (note that Result is brought by Binder)
|
||||
raises NoSuchObject is static;
|
||||
-- Error if Starting Objects were required at Creation
|
||||
-- time
|
||||
|
||||
Add (me : in out; binder : Binder; start : TheStart) is static;
|
||||
---Purpose : Adds a Binder to the iteration list, associated with
|
||||
-- its corresponding Starting Object "start"
|
||||
-- Starting Object is ignored if not required at
|
||||
-- Creation time
|
||||
|
||||
Filter (me : in out; list : TheList; keep : Boolean = Standard_True);
|
||||
---Purpose : After having added all items, keeps or rejects items
|
||||
-- which are attached to starting data given by <only>
|
||||
-- <keep> = True (D) : keeps. <keep> = False : rejects
|
||||
-- Does nothing if <withstarts> was False
|
||||
|
||||
HasStarting (me) returns Boolean is static;
|
||||
---Purpose : Returns True if Starting Object is available
|
||||
-- (defined at Creation Time)
|
||||
|
||||
Starting (me) returns TheStart
|
||||
---Purpose : Returns corresponding Starting Object
|
||||
raises NoSuchObject is static;
|
||||
-- Error if the Iterator was not created with Starting
|
||||
-- Objects (Create called with <withstarts> = True)
|
||||
---C++ : return const &
|
||||
|
||||
fields
|
||||
|
||||
thestarts : TheList;
|
||||
|
||||
end Iterator;
|
||||
|
||||
|
||||
-- (should be deferred, not allowed for a nested class)
|
||||
class Actor inherits TShared
|
||||
---Purpose : An Actor performs the effective Transfer of a Starting
|
||||
-- Object, piloted by a TransferProcess. That is :
|
||||
-- - It recognizes, for a Starting Object, the case to be run
|
||||
-- - Then, it performs the Transfer : the recommanded way to
|
||||
-- work is to define for each Type of Object to Transfer, a
|
||||
-- specific Transfer Tool, then to call it by the Actor
|
||||
-- - It assumes that the Result of Transfer is stored in a
|
||||
-- Binder, it creates it if the Tool does not do
|
||||
-- It can use the TransferProcess for intermediate Results
|
||||
-- - It returns the Binder which stores the Result
|
||||
-- It no Result can be produced, it returns a Null Handle
|
||||
-- It may bind this Binder to <start> but is not obliged :
|
||||
-- TransferProcess controls this point.
|
||||
--
|
||||
-- Remark about the kind of returned Binder :
|
||||
-- - for a Transient Result, use the method TransientResult
|
||||
-- - else, cast and query the Binder itself
|
||||
--
|
||||
-- An Actor can be built by combination : this allows to
|
||||
-- gather several Actors, each one processing a set of cases.
|
||||
|
||||
uses Transient, Binder,
|
||||
SimpleBinderOfTransient
|
||||
-- TransferProcess, TheStart
|
||||
|
||||
raises DomainError
|
||||
|
||||
is
|
||||
|
||||
Create returns Actor;
|
||||
|
||||
Recognize (me : mutable; start : TheStart)
|
||||
returns Boolean is virtual;
|
||||
---Purpose : Prerequesite for Transfer : the method Transfer is
|
||||
-- called on a starting object only if Recognize has
|
||||
-- returned True on it
|
||||
-- This allows to define a list of Actors, each one
|
||||
-- processing a definite kind of data
|
||||
-- TransferProcess calls Recognize on each one before
|
||||
-- calling Transfer. But even if Recognize has returned
|
||||
-- True, Transfer can reject by returning a Null Binder
|
||||
-- (afterwards rejection), the next actor is then invoked
|
||||
--
|
||||
-- The provided default returns True, can be redefined
|
||||
|
||||
Transferring (me : mutable;
|
||||
start : TheStart; TP : TransferProcess)
|
||||
returns Binder
|
||||
---Purpose : Specific action of Transfer. The Result is stored in
|
||||
-- the returned Binder, or a Null Handle for "No result"
|
||||
-- (Default defined as doing nothing; should be deffered)
|
||||
-- "mutable" allows the Actor to record intermediate
|
||||
-- information, in addition to those of TransferProcess
|
||||
raises DomainError is virtual; -- should be deferred;
|
||||
-- In case of Error during a Transfer, any kind of
|
||||
-- exception can be raised
|
||||
|
||||
TransientResult (me; res : any Transient)
|
||||
returns SimpleBinderOfTransient;
|
||||
---Purpose : Prepares and Returns a Binder for a Transient Result
|
||||
-- Returns a Null Handle if <res> is itself Null
|
||||
|
||||
NullResult (me) returns Binder;
|
||||
---Purpose : Returns a Binder for No Result, i.e. a Null Handle
|
||||
|
||||
|
||||
SetLast (me : mutable; mode : Boolean = Standard_True);
|
||||
---Purpose : If <mode> is True, commands an Actor to be set at the
|
||||
-- end of the list of Actors (see SetNext)
|
||||
-- If it is False (creation default), each add Actor is
|
||||
-- set at the beginning of the list
|
||||
-- This allows to define default Actors (which are Last)
|
||||
|
||||
IsLast (me) returns Boolean;
|
||||
---Purpose : Returns the Last status (see SetLast).
|
||||
|
||||
SetNext (me : mutable; next : Actor);
|
||||
---Purpose : Defines a Next Actor : it can then be asked to work if
|
||||
-- <me> produces no result for a given type of Object.
|
||||
-- If Next is already set and is not "Last", calls
|
||||
-- SetNext on it. If Next defined and "Last", the new
|
||||
-- actor is added before it in the list
|
||||
|
||||
Next (me) returns Actor;
|
||||
---Purpose : Returns the Actor defined as Next, or a Null Handle
|
||||
|
||||
fields
|
||||
|
||||
thenext : Actor;
|
||||
thelast : Boolean;
|
||||
|
||||
end Actor;
|
||||
|
||||
-- -- The class TransferProcess itself -- --
|
||||
|
||||
is
|
||||
|
||||
Create (nb : Integer = 10000) returns TransferProcess from Transfer;
|
||||
---Purpose : Sets TransferProcess at initial state. Gives an Initial size
|
||||
-- (indicative) for the Map when known (default is 10000).
|
||||
-- Sets default trace file as a printer and default trace level
|
||||
-- (see Message_TraceFile).
|
||||
|
||||
Create (printer: Messenger from Message; nb: Integer = 10000)
|
||||
returns TransferProcess from Transfer;
|
||||
---Purpose : Sets TransferProcess at initial state. Gives an Initial size
|
||||
-- (indicative) for the Map when known (default is 10000).
|
||||
-- Sets a specified printer.
|
||||
|
||||
Clear (me : mutable);
|
||||
---Purpose : Resets a TransferProcess as ready for a completely new work.
|
||||
-- Clears general data (roots) and the Map
|
||||
|
||||
Clean (me : mutable);
|
||||
---Purpose : Rebuilds the Map and the roots to really remove Unbound items
|
||||
-- Because Unbind keeps the entity in place, even if not bound
|
||||
-- Hence, working by checking new items is meaningless if a
|
||||
-- formerly unbound item is rebound
|
||||
|
||||
Resize (me : mutable; nb : Integer);
|
||||
---Purpose : Resizes the Map as required (if a new reliable value has been
|
||||
-- determined). Acts only if <nb> is greater than actual NbMapped
|
||||
|
||||
SetActor (me : mutable; actor : Actor);
|
||||
---Purpose : Defines an Actor, which is used for automatic Transfer
|
||||
-- If already defined, the new Actor is cumulated
|
||||
-- (see SetNext from Actor)
|
||||
|
||||
Actor (me) returns Actor;
|
||||
---Purpose : Returns the defined Actor. Returns a Null Handle if
|
||||
-- not set.
|
||||
|
||||
-- -- Fine Access to Map -- --
|
||||
-- This access works on : Binder (default), or Handle Result
|
||||
-- (Transient,Finder) as privileged kinds of Result
|
||||
|
||||
Find (me; start : TheStart) returns Binder;
|
||||
---Purpose : Returns the Binder which is linked with a starting Object
|
||||
-- It can either bring a Result (Transfer done) or none (for a
|
||||
-- pre-binding).
|
||||
-- If no Binder is linked with <start>, returns a Null Handle
|
||||
-- Considers a category number, by default 0
|
||||
---Warning : it is not equivalent to IsBound, which demands a Result
|
||||
-- C++ : return const &
|
||||
|
||||
IsBound (me; start : TheStart) returns Boolean;
|
||||
---Purpose : Returns True if a Result (whatever its form) is Bound with
|
||||
-- a starting Object. I.e., if a Binder with a Result set,
|
||||
-- is linked with it
|
||||
-- Considers a category number, by default 0
|
||||
|
||||
IsAlreadyUsed (me; start : TheStart) returns Boolean;
|
||||
---Purpose : Returns True if the result of the transfer of an object is
|
||||
-- already used in other ones. If it is, Rebind cannot change it.
|
||||
-- Considers a category number, by default 0
|
||||
|
||||
FindAndMask (me : mutable; start : TheStart)
|
||||
returns Binder is private;
|
||||
---Purpose : Same as Find but stores the last access to the map, for a
|
||||
-- faster access on next calls (as Bind does too)
|
||||
-- Considers a category number, by default 0
|
||||
-- C++ : return const &
|
||||
|
||||
Bind (me : mutable; start : TheStart; binder : Binder)
|
||||
---Purpose : Creates a Link a starting Object with a Binder. This Binder
|
||||
-- can either bring a Result (effective Binding) or none (it can
|
||||
-- be set later : pre-binding).
|
||||
-- Considers a category number, by default 0
|
||||
raises TransferFailure;
|
||||
-- Error if a Binder with a Result set is already linked with
|
||||
-- this Object (Binder with StatusResult not Initial)
|
||||
|
||||
Rebind (me : mutable; start : TheStart; binder : Binder)
|
||||
---Purpose : Changes the Binder linked with a starting Object for its
|
||||
-- unitary transfer. This it can be useful when the exact form
|
||||
-- of the result is known once the transfer is widely engaged.
|
||||
-- This can be done only on first transfer.
|
||||
-- Considers a category number, by default 0
|
||||
raises TransferFailure;
|
||||
-- Error if : - the Result is known as Already Used
|
||||
-- or if - No Result is bound to <start>
|
||||
-- or if - <binder> brings No result
|
||||
|
||||
Unbind (me : mutable; start : TheStart) returns Boolean
|
||||
---Purpose : Removes the Binder linked with a starting object
|
||||
-- If this Binder brings a non-empty Check, it is replaced by
|
||||
-- a VoidBinder. Also removes from the list of Roots as required.
|
||||
-- Returns True if done, False if <start> was not bound
|
||||
-- Considers a category number, by default 0
|
||||
raises TransferFailure;
|
||||
-- Error if : - the Result is known as Already Used
|
||||
|
||||
FindElseBind (me : mutable; start : TheStart)
|
||||
returns Binder;
|
||||
---Purpose : Returns a Binder for a starting entity, as follows :
|
||||
-- Tries to Find the already bound one
|
||||
-- If none found, creates a VoidBinder and Binds it
|
||||
|
||||
-- Check management (uses Binder's Check)
|
||||
|
||||
SetMessenger (me: mutable; messenger: Messenger from Message);
|
||||
---Purpose : Sets Messenger used for outputting messages.
|
||||
|
||||
Messenger (me) returns Messenger from Message;
|
||||
---Purpose : Returns Messenger used for outputting messages.
|
||||
-- The returned object is guaranteed to be non-null;
|
||||
-- default is Message::Messenger().
|
||||
|
||||
SetTraceLevel (me: mutable; tracelev: Integer);
|
||||
---Purpose : Sets trace level used for outputting messages:
|
||||
-- <trace> = 0 : no trace at all
|
||||
-- <trace> = 1 : handled exceptions and calls to AddError
|
||||
-- <trace> = 2 : also calls to AddWarning
|
||||
-- <trace> = 3 : also traces new Roots
|
||||
-- (uses method ErrorTrace).
|
||||
-- Default is 1 : Errors traced
|
||||
|
||||
TraceLevel (me) returns Integer;
|
||||
---Purpose : Returns trace level used for outputting messages.
|
||||
|
||||
SendFail (me : mutable; start : TheStart; amsg : Msg from Message);
|
||||
---Purpose : New name for AddFail (Msg)
|
||||
|
||||
SendWarning (me : mutable; start : TheStart; amsg : Msg from Message);
|
||||
---Purpose : New name for AddWarning (Msg)
|
||||
|
||||
SendMsg (me : mutable; start : TheStart; amsg : Msg from Message);
|
||||
---Purpose : Adds an information message
|
||||
-- Trace is filled if trace level is at least 3
|
||||
|
||||
AddFail (me : mutable; start : TheStart; mess : CString; orig : CString = "");
|
||||
---Purpose : Adds an Error message to a starting entity (to the check of
|
||||
-- its Binder of category 0, as a Fail)
|
||||
|
||||
AddError (me : mutable; start : TheStart; mess : CString; orig : CString = "");
|
||||
---Purpose : (other name of AddFail, maintained for compatibility)
|
||||
|
||||
AddFail (me : mutable; start : TheStart; amsg : Msg from Message);
|
||||
---Purpose : Adds an Error Message to a starting entity from the definition
|
||||
-- of a Msg (Original+Value)
|
||||
|
||||
AddWarning (me : mutable; start : TheStart; mess : CString; orig : CString = "");
|
||||
---Purpose : Adds a Warning message to a starting entity (to the check of
|
||||
-- its Binder of category 0)
|
||||
|
||||
AddWarning (me : mutable; start : TheStart; amsg : Msg from Message);
|
||||
---Purpose : Adds a Warning Message to a starting entity from the definition
|
||||
-- of a Msg (Original+Value)
|
||||
|
||||
|
||||
Mend (me : mutable; start : TheStart; pref : CString = "");
|
||||
---Pirpose : Mends messages bound to a starting entity, if there are some
|
||||
-- <pref> as for Check from Interface :
|
||||
-- Default converts all fails to warnings and that's all
|
||||
|
||||
Check (me; start : TheStart) returns Check;
|
||||
---Purpose : Returns the Check attached to a starting entity. If <start>
|
||||
-- is unknown, returns an empty Check
|
||||
|
||||
-- AddCaseName (me : mutable; start : TheStart; casename : CString);
|
||||
---Purpose : Adds a case name to a starting entity
|
||||
|
||||
-- AddCaseValue (me : mutable; start : TheStart; caseval : Transient);
|
||||
---Purpose : Adds a case value to a starting entity
|
||||
|
||||
-- CaseList (me; start : TheStart) returns HSequenceOfTransient;
|
||||
---Purpose : Returns the complete case list for an entity. Null Handle if empty
|
||||
|
||||
-- NextItemWithAttribute (me; name : CString; num0 : Integer) returns Integer;
|
||||
---Purpose : In the list of mapped items (between 1 and NbMapped),
|
||||
-- searches for the first item which follows <num0>(not included)
|
||||
-- and which has an attribute named <name>
|
||||
-- Attributes are brought by Binders
|
||||
-- Hence, allows such an iteration
|
||||
--
|
||||
-- for (num = TP->NextItemWithAttribute(name,0);
|
||||
-- num > 0;
|
||||
-- num = TP->NextItemWithAttribute(name,num) {
|
||||
-- .. process mapped item <num>
|
||||
-- }
|
||||
|
||||
-- AttributeType (me; name : CString) returns ParamType;
|
||||
---Purpose : Returns the type of an Attribute attached to binders
|
||||
-- If this name gives no Attribute, returns ParamVoid
|
||||
-- If this name gives several different types, returns ParamMisc
|
||||
-- Else, returns the effective type (ParamInteger, ParamReal,
|
||||
-- ParamIdent, or ParamText)
|
||||
|
||||
-- Attributes (me; rootname : CString = "") returns DictionaryOfInteger;
|
||||
---Purpose : Returns the list of recorded Attribute Names, as a Dictionary
|
||||
-- of Integer : each value gives the count of items which bring
|
||||
-- this attribute name
|
||||
-- By default, considers all the attribute names
|
||||
-- If <rootname> is given, considers only the attribute names
|
||||
-- which begin by <rootname>
|
||||
|
||||
-- Most Useful Specific Bindings --
|
||||
|
||||
BindTransient (me : mutable; start : TheStart; res : any Transient)
|
||||
---Purpose : Binds a starting object with a Transient Result.
|
||||
-- Uses a SimpleBinderOfTransient to work. If there is already
|
||||
-- one but with no Result set, sets its Result.
|
||||
-- Considers a category number, by default 0
|
||||
raises TransferFailure;
|
||||
-- Error if a result is already bound (Binder not Initial)
|
||||
|
||||
FindTransient (me; start : TheStart)
|
||||
returns any Transient;
|
||||
---Purpose : Returns the Result of the Transfer of an object <start> as a
|
||||
-- Transient Result.
|
||||
-- Returns a Null Handle if there is no Transient Result
|
||||
-- Considers a category number, by default 0
|
||||
-- Warning : Supposes that Binding is done with a SimpleBinderOfTransient
|
||||
---C++ : return const &
|
||||
|
||||
|
||||
BindMultiple (me : mutable; start : TheStart)
|
||||
---Purpose : Prepares an object <start> to be bound with several results.
|
||||
-- If no Binder is yet attached to <obj>, a MultipleBinder
|
||||
-- is created, empty. If a Binder is already set, it must
|
||||
-- accept Multiple Binding.
|
||||
-- Considers a category number, by default 0
|
||||
raises TransferFailure;
|
||||
-- Error if a UNIQUE result is already bound (if a Multiple
|
||||
-- Result is, nothing is done)
|
||||
|
||||
AddMultiple (me : mutable; start : TheStart; res : Transient)
|
||||
---Purpose : Adds an item to a list of results bound to a starting object.
|
||||
-- Considers a category number, by default 0, for all results
|
||||
raises TransferFailure;
|
||||
-- Error if no Binder accepting Multiple Binding is attached
|
||||
-- to <start> (none at all, or for a unique result)
|
||||
|
||||
FindTypedTransient (me; start : TheStart; atype : Type from Standard;
|
||||
val : out Transient) returns Boolean;
|
||||
---Purpose : Searches for a transient result attached to a starting object,
|
||||
-- according to its type, by criterium IsKind(atype)
|
||||
--
|
||||
-- In case of multiple result, explores the list and gives in
|
||||
-- <val> the first transient result IsKind(atype)
|
||||
-- Returns True and fills <val> if found
|
||||
-- Else, returns False (<val> is not touched, not even nullified)
|
||||
--
|
||||
-- This syntactic form avoids to do DownCast : if a result is
|
||||
-- found with the good type, it is loaded in <val> and can be
|
||||
-- immediately used, well initialised
|
||||
|
||||
GetTypedTransient (me; binder : Binder; atype : Type from Standard;
|
||||
val : out Transient) returns Boolean;
|
||||
---Purpose : Searches for a transient result recorded in a Binder, whatever
|
||||
-- this Binder is recorded or not in <me>
|
||||
--
|
||||
-- This is strictly equivalent to the class method GetTypedResult
|
||||
-- from class SimpleBinderOfTransient, but is just lighter to call
|
||||
--
|
||||
-- Apart from this, works as FindTypedTransient
|
||||
|
||||
|
||||
-- -- Atomic access to Map -- --
|
||||
|
||||
NbMapped (me) returns Integer;
|
||||
---Purpose : Returns the maximum possible value for Map Index
|
||||
-- (no result can be bound with a value greater than it)
|
||||
|
||||
Mapped (me; num : Integer) returns any TheStart;
|
||||
---Purpose : Returns the Starting Object bound to an Index,
|
||||
---C++ : return const &
|
||||
|
||||
MapIndex (me; start : TheStart) returns Integer;
|
||||
---Purpose : Returns the Index value bound to a Starting Object, 0 if none
|
||||
|
||||
MapItem (me; num : Integer) returns Binder;
|
||||
---Purpose : Returns the Binder bound to an Index
|
||||
-- Considers a category number, by default 0
|
||||
|
||||
-- -- Root Management -- --
|
||||
|
||||
SetRoot (me : mutable; start : TheStart)
|
||||
---Purpose : Declares <obj> (and its Result) as Root. This status will be
|
||||
-- later exploited by RootResult, see below (Result can be
|
||||
-- produced at any time)
|
||||
raises TransferFailure;
|
||||
-- Error if <obj> is not bound before calling to SetRoot
|
||||
|
||||
SetRootManagement (me : mutable; stat : Boolean);
|
||||
---Purpose : Enable (if <stat> True) or Disables (if <stat> False) Root
|
||||
-- Management. If it is set, Transfers are considered as stacked
|
||||
-- (a first Transfer commands other Transfers, and so on) and
|
||||
-- the Transfers commanded by an external caller are "Root".
|
||||
-- Remark : SetRoot can be called whatever this status, on every
|
||||
-- object.
|
||||
-- Default is set to True.
|
||||
|
||||
NbRoots (me) returns Integer;
|
||||
---Purpose : Returns the count of recorded Roots
|
||||
|
||||
Root (me; num : Integer) returns any TheStart;
|
||||
---Purpose : Returns a Root Entity given its number in the list (1-NbRoots)
|
||||
---C++ : return const &
|
||||
|
||||
RootItem (me; num : Integer) returns Binder;
|
||||
---Purpose : Returns the Binder bound with a Root Entity given its number
|
||||
-- Considers a category number, by default 0
|
||||
|
||||
RootIndex (me; start : TheStart) returns Integer;
|
||||
---Purpose : Returns the index in the list of roots for a starting item,
|
||||
-- or 0 if it is not recorded as a root
|
||||
|
||||
NestingLevel (me) returns Integer;
|
||||
---Purpose : Returns Nesting Level of Transfers (managed by methods
|
||||
-- TranscriptWith & Co). Starts to zero. If no automatic Transfer
|
||||
-- is used, it remains to zero. Zero means Root Level.
|
||||
|
||||
ResetNestingLevel (me : mutable);
|
||||
---Purpose : Resets Nesting Level of Transfers to Zero (Root Level),
|
||||
-- whatever its current value.
|
||||
|
||||
-- -- The Transfer Operations themselves -- --
|
||||
|
||||
Recognize (me; start : TheStart) returns Boolean;
|
||||
---Purpose : Tells if <start> has been recognized as good candidate for
|
||||
-- Transfer. i.e. queries the Actor and its Nexts
|
||||
|
||||
Transferring (me : mutable; start : TheStart) returns Binder
|
||||
---Purpose : Performs the Transfer of a Starting Object, by calling
|
||||
-- the method TransferProduct (see below).
|
||||
-- Mapping and Roots are managed : nothing is done if a Result is
|
||||
-- already Bound, an exception is raised in case of error.
|
||||
raises TransferFailure;
|
||||
-- Error : if the Transfer falls in a loop, or asks to Rebind an
|
||||
-- Object already Bound AND Used or reads a non computed Result
|
||||
--
|
||||
-- Remark : if ErrorHandle is set, no exception is raised : see
|
||||
-- the method SetErrorHandle for more details
|
||||
-- C++ : return const &
|
||||
|
||||
TransferProduct (me : mutable; start : TheStart) returns Binder
|
||||
---Purpose : Internal action of Transfer, called by Transferring, with or
|
||||
-- without ErrorHandle. It invokes the Actor to work (set by
|
||||
-- SetActor), and tries its Nexts if no result is produced,
|
||||
-- until a Non Null Binder is produced.
|
||||
-- But keep in mind that a Null Binder can allways be returned
|
||||
-- if a Starting Entity has not been recognized at all.
|
||||
raises TransferFailure
|
||||
is private;
|
||||
-- Error if the Transfer Action does any bad use of the Bindings
|
||||
|
||||
Transfer (me : mutable; start : TheStart) returns Boolean
|
||||
--- Purpose : Same as Transferring but does not return the Binder.
|
||||
-- Simply returns True in case of success (for user call)
|
||||
raises TransferFailure;
|
||||
-- Error : from Transferring.
|
||||
|
||||
-- -- Error Control on run-time -- --
|
||||
|
||||
SetErrorHandle (me : mutable; err : Boolean);
|
||||
---Purpose : Allows controls if exceptions will be handled
|
||||
-- Transfer Operations
|
||||
-- <err> False : they are not handled with try {} catch {}
|
||||
-- <err> True : they are
|
||||
-- Default is False: no handling performed
|
||||
|
||||
ErrorHandle (me) returns Boolean;
|
||||
---Purpose : Returns error handling flag
|
||||
|
||||
StartTrace (me; binder : Binder; start : TheStart; level,mode : Integer);
|
||||
---Purpose : Method called when trace is asked
|
||||
-- Calls PrintTrace to display information relevant for starting
|
||||
-- objects (which can be redefined)
|
||||
-- <level> is Nesting Level of Transfer (0 = root)
|
||||
-- <mode> controls the way the trace is done :
|
||||
-- 0 neutral, 1 for Error, 2 for Warning message, 3 for new Root
|
||||
|
||||
PrintTrace (me; start : TheStart; S : Messenger from Message) is virtual;
|
||||
---Purpose : Prints a short information on a starting object. By default
|
||||
-- prints its Dynamic Type. Can be redefined
|
||||
|
||||
IsLooping (me; alevel : Integer) returns Boolean;
|
||||
---Purpose : Returns True if we are surely in a DeadLoop. Evaluation is not
|
||||
-- exact, it is a "majorant" which must be computed fast.
|
||||
-- This "majorant" is : <alevel> greater than NbMapped.
|
||||
|
||||
-- -- Results and Error Log -- --
|
||||
-- The Map can be consulted term by term (as being indexed),
|
||||
-- or through an Iterator
|
||||
|
||||
|
||||
RootResult (me; withstart : Boolean = Standard_False) returns Iterator;
|
||||
---Purpose : Returns, as an iterator, the log of root transfer, i.e. the
|
||||
-- created objects and Binders bound to starting roots
|
||||
-- If withstart is given True, Starting Objets are also returned
|
||||
|
||||
CompleteResult (me; withstart : Boolean = Standard_False) returns Iterator;
|
||||
---Purpose : Returns, as an Iterator, the entire log of transfer (list of
|
||||
-- created objects and Binders which can bring errors)
|
||||
-- If withstart is given True, Starting Objets are also returned
|
||||
|
||||
AbnormalResult (me) returns Iterator;
|
||||
---Purpose : Returns Binders which are neither "Done" nor "Initial",
|
||||
-- that is Error,Loop or Run (abnormal states at end of Transfer)
|
||||
-- Starting Objects are given in correspondance in the iterator
|
||||
|
||||
CheckList (me; erronly : Boolean) returns CheckIterator;
|
||||
---Purpose : Returns a CheckList as a list of Check : each one is for a
|
||||
-- starting entity which have either check (warning or fail)
|
||||
-- messages are attached, or are in abnormal state : that case
|
||||
-- gives a specific message
|
||||
-- If <erronly> is True, checks with Warnings only are ignored
|
||||
|
||||
ResultOne (me; start : TheStart; level : Integer;
|
||||
withstart : Boolean = Standard_False) returns Iterator;
|
||||
---Purpose : Returns, as an Iterator, the log of transfer for one object
|
||||
-- <level> = 0 : this object only
|
||||
-- and if <start> is a scope owner (else, <level> is ignored) :
|
||||
-- <level> = 1 : object plus its immediate scoped ones
|
||||
-- <level> = 2 : object plus all its scoped ones
|
||||
|
||||
CheckListOne (me; start : TheStart; level : Integer;
|
||||
erronly : Boolean) returns CheckIterator;
|
||||
---Purpose : Returns a CheckList for one starting object
|
||||
-- <level> interpreted as by ResultOne
|
||||
-- If <erronly> is True, checks with Warnings only are ignored
|
||||
|
||||
IsCheckListEmpty (me; start : TheStart; level : Integer;
|
||||
erronly : Boolean) returns Boolean;
|
||||
---Purpose : Returns True if no check message is attached to a starting
|
||||
-- object. <level> interpreted as by ResultOne
|
||||
-- If <erronly> is True, checks with Warnings only are ignored
|
||||
|
||||
RemoveResult (me : mutable; start : TheStart; level : Integer;
|
||||
compute : Boolean = Standard_True);
|
||||
---Purpose : Removes Results attached to (== Unbinds) a given object and,
|
||||
-- according <level> :
|
||||
-- <level> = 0 : only it
|
||||
-- <level> = 1 : it plus its immediately owned sub-results(scope)
|
||||
-- <level> = 2 : it plus all its owned sub-results(scope)
|
||||
|
||||
CheckNum (me; start : TheStart) returns Integer is virtual;
|
||||
---Purpose : Computes a number to be associated to a starting object in
|
||||
-- a check or a check-list
|
||||
-- By default, returns 0; can be redefined
|
||||
|
||||
SetProgress(me : mutable; theProgress : ProgressIndicator from Message);
|
||||
---Purpose: Sets Progress indicator
|
||||
|
||||
GetProgress(me) returns ProgressIndicator from Message;
|
||||
---Purpose: Gets Progress indicator
|
||||
|
||||
fields
|
||||
|
||||
theerrh : Boolean; -- to handle or not exception raisings
|
||||
thetrace : Integer; -- trace level (exceptions,errors, etc...)
|
||||
themessenger : Messenger from Message; -- messenger for sending messages
|
||||
|
||||
thelevel : Integer;
|
||||
therootl : Integer; -- level of root at each time (not allways 1)
|
||||
therootm : Boolean; -- Flag for Root Management set or not
|
||||
theroots : IndexedMapOfInteger; -- indices of roots in the map
|
||||
|
||||
thelastobj : TheStart; -- Last Starting Object Bound
|
||||
thelastbnd : Binder; -- Its attached Binder (noted to optimize)
|
||||
theindex : Integer; -- And Index
|
||||
theactor : Actor;
|
||||
themap : TransferMap;
|
||||
|
||||
myProgress : ProgressIndicator from Message; -- Progress indicator
|
||||
|
||||
end TransferProcess;
|
@@ -1,64 +0,0 @@
|
||||
-- Created on: 1994-10-03
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1994-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class TransientListBinder from Transfer inherits Binder from Transfer
|
||||
|
||||
---Purpose : This binder binds several (a list of) Transients with a starting
|
||||
-- entity, when this entity itself corresponds to a simple list
|
||||
-- of Transients. Each part is not seen as a sub-result of an
|
||||
-- independant componant, but as an item of a built-in list
|
||||
|
||||
uses CString, Type,
|
||||
HSequenceOfTransient from TColStd
|
||||
|
||||
raises TypeMismatch, OutOfRange
|
||||
|
||||
is
|
||||
|
||||
Create returns TransientListBinder;
|
||||
|
||||
Create (list : HSequenceOfTransient from TColStd)
|
||||
returns TransientListBinder;
|
||||
|
||||
IsMultiple (me) returns Boolean is redefined;
|
||||
-- returns True if more than one result
|
||||
|
||||
ResultType (me) returns Type;
|
||||
-- returns Standard_Transient
|
||||
|
||||
ResultTypeName (me) returns CString;
|
||||
-- returns list(Standard_Transient)
|
||||
|
||||
AddResult (me : mutable; res : Transient);
|
||||
---Purpose : Adds an item to the result list
|
||||
|
||||
Result (me) returns HSequenceOfTransient from TColStd;
|
||||
|
||||
SetResult (me : mutable; num : Integer; res : Transient);
|
||||
---Purpose : Changes an already defined sub-result
|
||||
|
||||
NbTransients (me) returns Integer;
|
||||
|
||||
Transient (me; num : Integer) returns Transient
|
||||
raises OutOfRange;
|
||||
---C++ : return const &
|
||||
|
||||
|
||||
fields
|
||||
|
||||
theres : HSequenceOfTransient from TColStd;
|
||||
|
||||
end TransientListBinder;
|
@@ -11,14 +11,18 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Transfer_TransientListBinder.ixx>
|
||||
//#include <TColStd.hxx>
|
||||
|
||||
#include <Standard_OutOfRange.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <Standard_TypeMismatch.hxx>
|
||||
#include <Transfer_TransientListBinder.hxx>
|
||||
|
||||
//#include <TColStd.hxx>
|
||||
//=======================================================================
|
||||
//function : Constructor
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Transfer_TransientListBinder::Transfer_TransientListBinder ()
|
||||
{ theres = new TColStd_HSequenceOfTransient(); }
|
||||
|
||||
|
93
src/Transfer/Transfer_TransientListBinder.hxx
Normal file
93
src/Transfer/Transfer_TransientListBinder.hxx
Normal file
@@ -0,0 +1,93 @@
|
||||
// Created on: 1994-10-03
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1994-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Transfer_TransientListBinder_HeaderFile
|
||||
#define _Transfer_TransientListBinder_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <TColStd_HSequenceOfTransient.hxx>
|
||||
#include <Transfer_Binder.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
class Standard_TypeMismatch;
|
||||
class Standard_OutOfRange;
|
||||
class Standard_Transient;
|
||||
|
||||
|
||||
class Transfer_TransientListBinder;
|
||||
DEFINE_STANDARD_HANDLE(Transfer_TransientListBinder, Transfer_Binder)
|
||||
|
||||
//! This binder binds several (a list of) Transients with a starting
|
||||
//! entity, when this entity itself corresponds to a simple list
|
||||
//! of Transients. Each part is not seen as a sub-result of an
|
||||
//! independant componant, but as an item of a built-in list
|
||||
class Transfer_TransientListBinder : public Transfer_Binder
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT Transfer_TransientListBinder();
|
||||
|
||||
Standard_EXPORT Transfer_TransientListBinder(const Handle(TColStd_HSequenceOfTransient)& list);
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean IsMultiple() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Handle(Standard_Type) ResultType() const;
|
||||
|
||||
Standard_EXPORT Standard_CString ResultTypeName() const;
|
||||
|
||||
//! Adds an item to the result list
|
||||
Standard_EXPORT void AddResult (const Handle(Standard_Transient)& res);
|
||||
|
||||
Standard_EXPORT Handle(TColStd_HSequenceOfTransient) Result() const;
|
||||
|
||||
//! Changes an already defined sub-result
|
||||
Standard_EXPORT void SetResult (const Standard_Integer num, const Handle(Standard_Transient)& res);
|
||||
|
||||
Standard_EXPORT Standard_Integer NbTransients() const;
|
||||
|
||||
Standard_EXPORT const Handle(Standard_Transient)& Transient (const Standard_Integer num) const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(Transfer_TransientListBinder,Transfer_Binder)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Handle(TColStd_HSequenceOfTransient) theres;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Transfer_TransientListBinder_HeaderFile
|
77
src/Transfer/Transfer_TransientMapper.hxx
Normal file
77
src/Transfer/Transfer_TransientMapper.hxx
Normal file
@@ -0,0 +1,77 @@
|
||||
// Created on: 1992-02-03
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1992-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Transfer_TransientMapper_HeaderFile
|
||||
#define _Transfer_TransientMapper_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Transfer_Finder.hxx>
|
||||
#include <TColStd_MapTransientHasher.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
class Standard_Transient;
|
||||
class Transfer_DataInfo;
|
||||
class Transfer_Finder;
|
||||
|
||||
|
||||
class Transfer_TransientMapper;
|
||||
DEFINE_STANDARD_HANDLE(Transfer_TransientMapper, Transfer_Finder)
|
||||
|
||||
|
||||
class Transfer_TransientMapper : public Transfer_Finder
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT Transfer_TransientMapper(const Handle(Standard_Transient)& akey);
|
||||
|
||||
Standard_EXPORT const Handle(Standard_Transient)& Value() const;
|
||||
|
||||
Standard_EXPORT Standard_Boolean Equates (const Handle(Transfer_Finder)& other) const;
|
||||
|
||||
Standard_EXPORT virtual Handle(Standard_Type) ValueType() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual Standard_CString ValueTypeName() const Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(Transfer_TransientMapper,Transfer_Finder)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Handle(Standard_Transient) theval;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Transfer_TransientMapper_HeaderFile
|
44
src/Transfer/Transfer_TransientMapper_0.cxx
Normal file
44
src/Transfer/Transfer_TransientMapper_0.cxx
Normal file
@@ -0,0 +1,44 @@
|
||||
// Created on: 1992-02-03
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1992-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Transfer_TransientMapper.hxx>
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <Transfer_DataInfo.hxx>
|
||||
#include <Transfer_Finder.hxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#define TheKey Handle(Standard_Transient)
|
||||
#define TheKey_hxx <Standard_Transient.hxx>
|
||||
#define TheHasher TColStd_MapTransientHasher
|
||||
#define TheHasher_hxx <TColStd_MapTransientHasher.hxx>
|
||||
#define TheInfo Transfer_DataInfo
|
||||
#define TheInfo_hxx <Transfer_DataInfo.hxx>
|
||||
#define Transfer_Mapper Transfer_TransientMapper
|
||||
#define Transfer_Mapper_hxx <Transfer_TransientMapper.hxx>
|
||||
#define Handle_Transfer_Mapper Handle(Transfer_TransientMapper)
|
||||
#include <Transfer_Mapper.gxx>
|
||||
|
@@ -1,102 +0,0 @@
|
||||
-- Created on: 1996-09-04
|
||||
-- Created by: Christian CAILLET
|
||||
-- Copyright (c) 1996-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class TransientProcess from Transfer inherits ProcessForTransient
|
||||
|
||||
---Purpose : Adds specific features to the generic definition :
|
||||
-- TransientProcess is intended to work from an InterfaceModel
|
||||
-- to a set of application objects.
|
||||
--
|
||||
-- Hence, some informations about starting entities can be gotten
|
||||
-- from the model : for Trace, CheckList, Integrity Status
|
||||
|
||||
uses Transient, Type,
|
||||
DictionaryOfTransient,
|
||||
InterfaceModel, HGraph, Graph, EntityIterator,
|
||||
HSequenceOfTransient from TColStd,
|
||||
Messenger from Message
|
||||
|
||||
is
|
||||
|
||||
Create (nb : Integer = 10000) returns TransientProcess;
|
||||
---Purpose : Sets TransientProcess at initial state, with an initial size
|
||||
|
||||
SetModel (me : mutable; model : InterfaceModel);
|
||||
---Purpose : Sets an InterfaceModel, used by StartTrace, CheckList, queries
|
||||
-- on Integrity, to give informations significant for each norm.
|
||||
|
||||
Model (me) returns InterfaceModel;
|
||||
---Purpose : Returns the Model used for StartTrace
|
||||
|
||||
SetGraph (me : mutable; HG : HGraph);
|
||||
---Purpose : Sets a Graph : superseedes SetModel if already done
|
||||
|
||||
HasGraph (me) returns Boolean;
|
||||
HGraph (me) returns HGraph;
|
||||
Graph (me) returns Graph;
|
||||
---C++ : return const &
|
||||
|
||||
SetContext (me : mutable; name : CString; ctx : Transient);
|
||||
---Purpose : Sets a Context : according to receiving appli, to be
|
||||
-- interpreted by the Actor
|
||||
|
||||
GetContext (me; name : CString; type : Type; ctx : out Transient)
|
||||
returns Boolean;
|
||||
---Purpose : Returns the Context attached to a name, if set and if it is
|
||||
-- Kind of the type, else a Null Handle
|
||||
-- Returns True if OK, False if no Context
|
||||
|
||||
Context (me : mutable) returns DictionaryOfTransient;
|
||||
---Purpose : Returns (modifiable) the whole definition of Context
|
||||
-- Rather for internal use (ex.: preparing and setting in once)
|
||||
---C++ : return &
|
||||
|
||||
PrintTrace (me; start : Transient; S : Messenger from Message) is redefined;
|
||||
---Purpose : Specific printing to trace an entity : prints label and type
|
||||
-- (if model is set)
|
||||
|
||||
CheckNum (me; ent : Transient) returns Integer is redefined;
|
||||
---Purpose : Specific number of a starting object for check-list : Number
|
||||
-- in model
|
||||
|
||||
TypedSharings (me; start : Transient; type : Type) returns EntityIterator;
|
||||
---Purpose : Returns the list of sharings entities, AT ANY LEVEL, which are
|
||||
-- kind of a given type. Calls TypedSharings from Graph
|
||||
-- Returns an empty list if the Graph has not been aknowledged
|
||||
|
||||
IsDataLoaded (me; ent : Transient) returns Boolean;
|
||||
---Purpose : Tells if an entity is well loaded from file (even if its data
|
||||
-- fail on checking, they are present). Mostly often, answers
|
||||
-- True. Else, there was a syntactic error in the file.
|
||||
-- A non-loaded entity MAY NOT BE transferred, unless its Report
|
||||
-- (in the model) is interpreted
|
||||
|
||||
IsDataFail (me; ent : Transient) returns Boolean;
|
||||
---Purpose : Tells if an entity fails on data checking (load time,
|
||||
-- syntactic, or semantic check). Normally, should answer False.
|
||||
-- It is not prudent to try transferring an entity which fails on
|
||||
-- data checking
|
||||
|
||||
PrintStats (me; mode : Integer; S : Messenger from Message);
|
||||
---Purpose : Prints statistics on a given output, according mode
|
||||
RootsForTransfer(me : mutable) returns HSequenceOfTransient from TColStd;
|
||||
fields
|
||||
|
||||
themodel : InterfaceModel;
|
||||
thegraph : HGraph;
|
||||
thectx : DictionaryOfTransient;
|
||||
thetrroots : HSequenceOfTransient from TColStd;
|
||||
end TransientProcess;
|
@@ -11,18 +11,25 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <Transfer_TransientProcess.ixx>
|
||||
#include <Interface_Check.hxx>
|
||||
#include <Interface_MSG.hxx>
|
||||
#include <Transfer_Binder.hxx>
|
||||
#include <TColStd_HSequenceOfTransient.hxx>
|
||||
|
||||
#include <Dico_DictionaryOfTransient.hxx>
|
||||
#include <Interface_Check.hxx>
|
||||
#include <Interface_EntityIterator.hxx>
|
||||
#include <Interface_Graph.hxx>
|
||||
#include <Interface_HGraph.hxx>
|
||||
#include <Interface_InterfaceModel.hxx>
|
||||
#include <Interface_MSG.hxx>
|
||||
#include <Message_Messenger.hxx>
|
||||
#include <Standard_Transient.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TColStd_HSequenceOfTransient.hxx>
|
||||
#include <Transfer_Binder.hxx>
|
||||
#include <Transfer_TransientProcess.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : Transfer_TransientProcess
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Transfer_TransientProcess::Transfer_TransientProcess
|
||||
(const Standard_Integer nb) : Transfer_ProcessForTransient (nb)
|
||||
{
|
||||
|
143
src/Transfer/Transfer_TransientProcess.hxx
Normal file
143
src/Transfer/Transfer_TransientProcess.hxx
Normal file
@@ -0,0 +1,143 @@
|
||||
// Created on: 1996-09-04
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1996-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Transfer_TransientProcess_HeaderFile
|
||||
#define _Transfer_TransientProcess_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <TColStd_HSequenceOfTransient.hxx>
|
||||
#include <Transfer_ProcessForTransient.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
class Interface_InterfaceModel;
|
||||
class Interface_HGraph;
|
||||
class Dico_DictionaryOfTransient;
|
||||
class Interface_Graph;
|
||||
class Standard_Transient;
|
||||
class Message_Messenger;
|
||||
class Interface_EntityIterator;
|
||||
|
||||
|
||||
class Transfer_TransientProcess;
|
||||
DEFINE_STANDARD_HANDLE(Transfer_TransientProcess, Transfer_ProcessForTransient)
|
||||
|
||||
//! Adds specific features to the generic definition :
|
||||
//! TransientProcess is intended to work from an InterfaceModel
|
||||
//! to a set of application objects.
|
||||
//!
|
||||
//! Hence, some informations about starting entities can be gotten
|
||||
//! from the model : for Trace, CheckList, Integrity Status
|
||||
class Transfer_TransientProcess : public Transfer_ProcessForTransient
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Sets TransientProcess at initial state, with an initial size
|
||||
Standard_EXPORT Transfer_TransientProcess(const Standard_Integer nb = 10000);
|
||||
|
||||
//! Sets an InterfaceModel, used by StartTrace, CheckList, queries
|
||||
//! on Integrity, to give informations significant for each norm.
|
||||
Standard_EXPORT void SetModel (const Handle(Interface_InterfaceModel)& model);
|
||||
|
||||
//! Returns the Model used for StartTrace
|
||||
Standard_EXPORT Handle(Interface_InterfaceModel) Model() const;
|
||||
|
||||
//! Sets a Graph : superseedes SetModel if already done
|
||||
Standard_EXPORT void SetGraph (const Handle(Interface_HGraph)& HG);
|
||||
|
||||
Standard_EXPORT Standard_Boolean HasGraph() const;
|
||||
|
||||
Standard_EXPORT Handle(Interface_HGraph) HGraph() const;
|
||||
|
||||
Standard_EXPORT const Interface_Graph& Graph() const;
|
||||
|
||||
//! Sets a Context : according to receiving appli, to be
|
||||
//! interpreted by the Actor
|
||||
Standard_EXPORT void SetContext (const Standard_CString name, const Handle(Standard_Transient)& ctx);
|
||||
|
||||
//! Returns the Context attached to a name, if set and if it is
|
||||
//! Kind of the type, else a Null Handle
|
||||
//! Returns True if OK, False if no Context
|
||||
Standard_EXPORT Standard_Boolean GetContext (const Standard_CString name, const Handle(Standard_Type)& type, Handle(Standard_Transient)& ctx) const;
|
||||
|
||||
//! Returns (modifiable) the whole definition of Context
|
||||
//! Rather for internal use (ex.: preparing and setting in once)
|
||||
Standard_EXPORT Handle(Dico_DictionaryOfTransient)& Context();
|
||||
|
||||
//! Specific printing to trace an entity : prints label and type
|
||||
//! (if model is set)
|
||||
Standard_EXPORT virtual void PrintTrace (const Handle(Standard_Transient)& start, const Handle(Message_Messenger)& S) const Standard_OVERRIDE;
|
||||
|
||||
//! Specific number of a starting object for check-list : Number
|
||||
//! in model
|
||||
Standard_EXPORT virtual Standard_Integer CheckNum (const Handle(Standard_Transient)& ent) const Standard_OVERRIDE;
|
||||
|
||||
//! Returns the list of sharings entities, AT ANY LEVEL, which are
|
||||
//! kind of a given type. Calls TypedSharings from Graph
|
||||
//! Returns an empty list if the Graph has not been aknowledged
|
||||
Standard_EXPORT Interface_EntityIterator TypedSharings (const Handle(Standard_Transient)& start, const Handle(Standard_Type)& type) const;
|
||||
|
||||
//! Tells if an entity is well loaded from file (even if its data
|
||||
//! fail on checking, they are present). Mostly often, answers
|
||||
//! True. Else, there was a syntactic error in the file.
|
||||
//! A non-loaded entity MAY NOT BE transferred, unless its Report
|
||||
//! (in the model) is interpreted
|
||||
Standard_EXPORT Standard_Boolean IsDataLoaded (const Handle(Standard_Transient)& ent) const;
|
||||
|
||||
//! Tells if an entity fails on data checking (load time,
|
||||
//! syntactic, or semantic check). Normally, should answer False.
|
||||
//! It is not prudent to try transferring an entity which fails on
|
||||
//! data checking
|
||||
Standard_EXPORT Standard_Boolean IsDataFail (const Handle(Standard_Transient)& ent) const;
|
||||
|
||||
//! Prints statistics on a given output, according mode
|
||||
Standard_EXPORT void PrintStats (const Standard_Integer mode, const Handle(Message_Messenger)& S) const;
|
||||
|
||||
Standard_EXPORT Handle(TColStd_HSequenceOfTransient) RootsForTransfer();
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(Transfer_TransientProcess,Transfer_ProcessForTransient)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Handle(Interface_InterfaceModel) themodel;
|
||||
Handle(Interface_HGraph) thegraph;
|
||||
Handle(Dico_DictionaryOfTransient) thectx;
|
||||
Handle(TColStd_HSequenceOfTransient) thetrroots;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Transfer_TransientProcess_HeaderFile
|
29
src/Transfer/Transfer_UndefMode.hxx
Normal file
29
src/Transfer/Transfer_UndefMode.hxx
Normal file
@@ -0,0 +1,29 @@
|
||||
// Created on: 1992-02-03
|
||||
// Created by: Christian CAILLET
|
||||
// Copyright (c) 1992-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Transfer_UndefMode_HeaderFile
|
||||
#define _Transfer_UndefMode_HeaderFile
|
||||
|
||||
//! used on processing Undefined Entities (see TransferOutput)
|
||||
enum Transfer_UndefMode
|
||||
{
|
||||
Transfer_UndefIgnore,
|
||||
Transfer_UndefFailure,
|
||||
Transfer_UndefContent,
|
||||
Transfer_UndefUser
|
||||
};
|
||||
|
||||
#endif // _Transfer_UndefMode_HeaderFile
|
@@ -1,42 +0,0 @@
|
||||
-- Created on: 1994-06-27
|
||||
-- Created by: Design
|
||||
-- Copyright (c) 1994-1999 Matra Datavision
|
||||
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
--
|
||||
-- This file is part of Open CASCADE Technology software library.
|
||||
--
|
||||
-- This library is free software; you can redistribute it and/or modify it under
|
||||
-- the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
-- by the Free Software Foundation, with special exception defined in the file
|
||||
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
-- distribution for complete text of the license and disclaimer of any warranty.
|
||||
--
|
||||
-- Alternatively, this file may be used under the terms of Open CASCADE
|
||||
-- commercial license or contractual agreement.
|
||||
|
||||
class VoidBinder from Transfer inherits Binder
|
||||
|
||||
---Purpose : a VoidBinder is used to bind a starting item with a status,
|
||||
-- error or warning messages, but no result
|
||||
-- It is interpreted by TransferProcess, which admits a
|
||||
-- VoidBinder to be over-written, and copies its check to the
|
||||
-- new Binder
|
||||
|
||||
uses CString, Type
|
||||
|
||||
is
|
||||
|
||||
Create returns VoidBinder;
|
||||
|
||||
-- IsMultiple (me) returns Boolean;
|
||||
---Purpose : a VoidBinder is not Multiple (Remark : it is not Simple too)
|
||||
-- But it can bring next results ...
|
||||
|
||||
ResultType (me) returns Type;
|
||||
---Purpose : while a VoidBinder admits no Result, its ResultType returns
|
||||
-- the type of <me>
|
||||
|
||||
ResultTypeName (me) returns CString;
|
||||
---Purpose : Returns "(void)"
|
||||
|
||||
end VoidBinder;
|
@@ -16,7 +16,8 @@
|
||||
|
||||
// <design>
|
||||
|
||||
#include <Transfer_VoidBinder.ixx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <Transfer_VoidBinder.hxx>
|
||||
|
||||
Transfer_VoidBinder::Transfer_VoidBinder () { }
|
||||
|
||||
|
76
src/Transfer/Transfer_VoidBinder.hxx
Normal file
76
src/Transfer/Transfer_VoidBinder.hxx
Normal file
@@ -0,0 +1,76 @@
|
||||
// Created on: 1994-06-27
|
||||
// Created by: Design
|
||||
// Copyright (c) 1994-1999 Matra Datavision
|
||||
// Copyright (c) 1999-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Transfer_VoidBinder_HeaderFile
|
||||
#define _Transfer_VoidBinder_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <Transfer_Binder.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
|
||||
|
||||
class Transfer_VoidBinder;
|
||||
DEFINE_STANDARD_HANDLE(Transfer_VoidBinder, Transfer_Binder)
|
||||
|
||||
//! a VoidBinder is used to bind a starting item with a status,
|
||||
//! error or warning messages, but no result
|
||||
//! It is interpreted by TransferProcess, which admits a
|
||||
//! VoidBinder to be over-written, and copies its check to the
|
||||
//! new Binder
|
||||
class Transfer_VoidBinder : public Transfer_Binder
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! a VoidBinder is not Multiple (Remark : it is not Simple too)
|
||||
//! But it can bring next results ...
|
||||
Standard_EXPORT Transfer_VoidBinder();
|
||||
|
||||
//! while a VoidBinder admits no Result, its ResultType returns
|
||||
//! the type of <me>
|
||||
Standard_EXPORT Handle(Standard_Type) ResultType() const;
|
||||
|
||||
//! Returns "(void)"
|
||||
Standard_EXPORT Standard_CString ResultTypeName() const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(Transfer_VoidBinder,Transfer_Binder)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _Transfer_VoidBinder_HeaderFile
|
Reference in New Issue
Block a user