0033661: Data Exchange, Step Import - Tessellated GDTs are not imported
[occt.git] / src / Transfer / Transfer_TransferOutput.hxx
1 // Created on: 1992-02-04
2 // Created by: Christian CAILLET
3 // Copyright (c) 1992-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 #ifndef _Transfer_TransferOutput_HeaderFile
18 #define _Transfer_TransferOutput_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23 #include <Message_ProgressRange.hxx>
24
25 class Transfer_TransientProcess;
26 class Interface_InterfaceModel;
27 class Transfer_ActorOfTransientProcess;
28 class Standard_Transient;
29 class Interface_Protocol;
30 class Interface_Graph;
31 class Interface_EntityIterator;
32
33 //! A TransferOutput is a Tool which manages the transfer of
34 //! entities created by an Interface, stored in an InterfaceModel,
35 //! into a set of Objects suitable for an Application
36 //! Objects to be transferred are given, by method Transfer
37 //! (which calls Transfer from TransientProcess)
38 //! A default action is available to get all roots of the Model
39 //! Result is given as a TransferIterator (see TransferProcess)
40 //! Also, it is possible to pilot directly the TransientProcess
41 class Transfer_TransferOutput 
42 {
43 public:
44
45   DEFINE_STANDARD_ALLOC
46
47   
48   //! Creates a TransferOutput ready to use, with a TransientProcess
49   Standard_EXPORT Transfer_TransferOutput(const Handle(Transfer_ActorOfTransientProcess)& actor, const Handle(Interface_InterfaceModel)& amodel);
50   
51   //! Creates a TransferOutput from an already existing
52   //! TransientProcess, and a Model
53   //! Returns (by Reference, hence can be changed) the Mode for
54   //! Scope Management. False (D) means Scope is ignored.
55   //! True means that each individual Transfer (direct or through
56   //! TransferRoots) is regarded as one Scope
57   Standard_EXPORT Transfer_TransferOutput(const Handle(Transfer_TransientProcess)& proc, const Handle(Interface_InterfaceModel)& amodel);
58   
59   //! Returns the Starting Model
60   Standard_EXPORT Handle(Interface_InterfaceModel) Model() const;
61   
62   //! Returns the TransientProcess used to work
63   Standard_EXPORT Handle(Transfer_TransientProcess) TransientProcess() const;
64   
65   //! Transfer checks that all taken Entities come from the same
66   //! Model, then calls Transfer from TransientProcess
67   Standard_EXPORT void Transfer (const Handle(Standard_Transient)& obj,
68                                  const Message_ProgressRange& theProgress = Message_ProgressRange());
69   
70   //! Runs transfer on the roots of the Interface Model
71   //! The Roots are computed with a ShareFlags created from a
72   //! Protocol given as Argument
73   Standard_EXPORT void TransferRoots (const Handle(Interface_Protocol)& protocol,
74                                       const Message_ProgressRange& theProgress = Message_ProgressRange());
75   
76   //! Runs transfer on the roots defined by a Graph of dependences
77   //! (which detains also a Model and its Entities)
78   //! Roots are computed with a ShareFlags created from the Graph
79   Standard_EXPORT void TransferRoots (const Interface_Graph& G,
80                                       const Message_ProgressRange& theProgress = Message_ProgressRange());
81   
82   //! Runs transfer on the roots of the Interface Model
83   //! Remark : the Roots are computed with a ShareFlags created
84   //! from the Active Protocol
85   Standard_EXPORT void TransferRoots(const Message_ProgressRange& theProgress = Message_ProgressRange());
86   
87   //! Returns the list of Starting Entities with these criteria :
88   //! - <normal> False, gives the entities bound with ABNORMAL STATUS
89   //! (e.g. : Fail recorded, Exception raised during Transfer)
90   //! - <normal> True, gives Entities with or without a Result, but
91   //! with no Fail, no Exception (Warnings are not counted)
92   //! - <roots> False, considers all entities recorded (either for
93   //! Result, or for at least one Fail or Warning message)
94   //! - <roots> True (Default), considers only roots of Transfer
95   //! (the Entities recorded at highest level)
96   //! This method is based on AbnormalResult from TransferProcess
97   Standard_EXPORT Interface_EntityIterator ListForStatus (const Standard_Boolean normal, const Standard_Boolean roots = Standard_True) const;
98   
99   //! Fills a Model with the list determined by ListForStatus
100   //! This model starts from scratch (made by NewEmptyModel from the
101   //! current Model), then is filled by AddWithRefs
102   //!
103   //! Useful to get separately from a transfer, the entities which
104   //! have caused problem, in order to furtherly analyse them (with
105   //! normal = False), or the "good" entities, to obtain a data set
106   //! "which works well" (with normal = True)
107   Standard_EXPORT Handle(Interface_InterfaceModel) ModelForStatus (const Handle(Interface_Protocol)& protocol, const Standard_Boolean normal, const Standard_Boolean roots = Standard_True) const;
108
109
110
111
112 protected:
113
114
115
116
117
118 private:
119
120
121
122   Handle(Transfer_TransientProcess) theproc;
123   Handle(Interface_InterfaceModel) themodel;
124
125
126 };
127
128
129
130
131
132
133
134 #endif // _Transfer_TransferOutput_HeaderFile