0025266: Debug statements in the source are getting flushed on to the console
[occt.git] / src / IGESControl / IGESControl_Writer.cdl
1 -- Created on: 1996-01-30
2 -- Created by: Christian CAILLET
3 -- Copyright (c) 1996-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 class Writer  from IGESControl
18
19         ---Purpose : This class creates and writes
20         -- IGES files from CAS.CADE models. An IGES file can be written to
21         -- an existing IGES file or to a new one.
22         -- The translation can be performed in one or several
23         -- operations. Each translation operation
24         -- outputs a distinct root entity in the IGES file.
25         --   To write an IGES file it is possible to use the following sequence:
26         -- To modify the IGES file header or to change translation
27         -- parameters it is necessary to use class Interface_Static (see
28         -- IGESParameters and GeneralParameters).
29
30 uses CString, OStream, Transient,     Shape from TopoDS,
31      FinderProcess, BasicEditor from IGESData, IGESModel, IGESEntity
32
33 is
34
35     Create returns Writer;
36         ---Purpose : Creates a writer object with the
37         -- default unit (millimeters) and write mode (Face).
38         -- IGESControl_Writer (const Standard_CString unit,
39         -- const Standard_Integer modecr = 0);
40
41     Create (unit : CString; modecr : Integer = 0) returns Writer;
42         ---Purpose : Creates a writer with given
43         -- values for units and for write mode.
44         -- unit may be any unit that is accepted by the IGES standard.
45         -- By default, it is the millimeter.
46         -- modecr defines the write mode and may be:
47         -- - 0: Faces (default)
48         -- - 1: BRep.
49
50     Create (model : IGESModel; modecr : Integer = 0) returns Writer;
51         ---Purpose : Creates a writer object with the
52         -- prepared IGES model model in write mode.
53         -- modecr defines the write mode and may be:
54         -- - 0: Faces (default)
55         -- - 1: BRep.
56
57     Model (me) returns IGESModel;
58         ---Purpose : Returns the IGES model to be written in output.
59
60     TransferProcess    (me) returns FinderProcess;
61     SetTransferProcess (me : in out; TP : FinderProcess);
62         ---Purpose : Returns/Sets the TransferProcess : it contains final results
63         --           and if some, check messages
64
65     AddShape (me : in out; sh : Shape) returns Boolean;
66         ---Purpose : Translates a Shape to IGES Entities and adds them to the model
67         --           Returns True if done, False if Shape not suitable for IGES or null
68
69     AddGeom  (me : in out; geom : Transient) returns Boolean;
70         ---Purpose : Translates a Geometry (Surface or Curve) to IGES Entities and
71         --           adds them to the model
72         --           Returns True if done, False if geom is neither a Surface or
73         --           a Curve suitable for IGES or is null
74
75     AddEntity (me : in out; ent : IGESEntity) returns Boolean;
76         ---Purpose : Adds an IGES entity (and the ones it references) to the model
77
78     ComputeModel (me : in out);
79         ---Purpose : Computes the entities found in
80         -- the model, which is ready to be written.
81         -- This contrasts with the default computation of headers only.
82
83     Write (me : in out; S : in out OStream; fnes : Boolean = Standard_False)
84         returns Boolean;
85         ---Purpose : Computes then writes the model to an OStream
86         --           Returns True when done, false in case of error
87
88     Write (me : in out; file : CString; fnes : Boolean = Standard_False)
89         returns Boolean;
90         ---Purpose : Prepares and writes an IGES model
91         -- either to an OStream, S or to a file name,CString.
92         -- Returns True if the operation was performed correctly and 
93         -- False if an error occurred (for instance,
94         -- if the processor could not create the file).
95
96     PrintStatsTransfer (me; what : Integer; mode : Integer = 0);
97         ---Purpose : Prints Statistics about Transfer
98
99 fields
100
101     theTP  : FinderProcess;
102     themod : IGESModel;
103     thedit : BasicEditor from IGESData;
104     thecr  : Integer;  -- mode ecr
105     thest  : Boolean;  -- computed ?
106
107 end Writer;