0024784: Move documentation in CDL files to proper location
[occt.git] / src / STEPConstruct / STEPConstruct_ContextTool.cdl
1 -- Created on: 1993-09-14
2 -- Created by: Frederic MAUPAS
3 -- Copyright (c) 1993-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 ContextTool from STEPConstruct
18
19     ---Purpose : Maintains global context tool for writing.
20     --           Gives access to Product Definition Context (one per Model)
21     --           Maintains ApplicationProtocolDefinition entity (common for all
22     --           products)
23     --           Also maintains context specific for AP203 and provides set of
24     --           methods to work with various STEP constructs as required 
25     --           by Actor
26
27 uses
28     SequenceOfInteger from TColStd,
29     HSequenceOfTransient from TColStd,
30     HAsciiString from TCollection,
31     StepModel from StepData,
32     ApplicationProtocolDefinition from StepBasic,
33     ShapeDefinitionRepresentation from StepShape,
34     Axis2Placement3d from StepGeom,
35     AP203Context from STEPConstruct,
36     Assembly from STEPConstruct,
37     Part from STEPConstruct
38     
39
40 is
41
42     Create returns ContextTool from STEPConstruct;
43     
44     Create (aStepModel : StepModel from StepData) returns ContextTool from STEPConstruct;
45     
46     ---Management of ApplicationProtocolDefinition
47     
48     SetModel (me : in out; aStepModel : StepModel from StepData);
49         ---Purpose: Initialize ApplicationProtocolDefinition by the first
50         --          entity of that type found in the model
51
52     GetAPD(me : in out) returns ApplicationProtocolDefinition from StepBasic;
53         ---Purpose: 
54
55     AddAPD(me : in out; enforce : Boolean = Standard_False);
56
57     IsAP203 (me) returns Boolean;
58         ---Purpose: Returns True if APD.schema_name is config_control_design
59
60     IsAP214 (me) returns Boolean;
61         ---Purpose: Returns True if APD.schema_name is automotive_design
62
63     -- AC : Application Context
64
65     GetACstatus(me : in out) returns HAsciiString from TCollection;
66         
67     GetACschemaName(me : in out) returns HAsciiString from TCollection;
68         
69     GetACyear(me : in out) returns Integer;
70
71 --    GetACapplication(me : in out)
72 --      returns HAsciiString from TCollection;  via the SDR
73
74     GetACname (me : in out) returns HAsciiString from TCollection;
75
76     SetACstatus (me: in out; status: HAsciiString from TCollection);
77
78     SetACschemaName(me: in out; schemaName: HAsciiString from TCollection);
79
80     SetACyear (me: in out; year: Integer);
81
82 --    SetACapplication(me : in out;
83 --                   application : HAsciiString from TCollection);
84
85     SetACname (me: in out; name : HAsciiString from TCollection);
86
87     -- Other context items
88
89     GetDefaultAxis (me: in out) returns Axis2Placement3d from StepGeom;
90         ---Purpose: Returns a default axis placement
91     
92     AP203Context (me: in out) returns AP203Context from STEPConstruct;
93         ---Purpose: Returns tool which maintains context specific for AP203
94         ---C++: return &
95
96     -- Management of assembly level for naming products
97     
98     Level (me) returns Integer;
99         ---Purpose: Returns current assembly level
100
101     NextLevel (me: in out);
102     PrevLevel (me: in out);
103     SetLevel (me: in out; lev: Integer );
104         ---Purpose: Changes current assembly level
105
106     Index (me) returns Integer;
107         ---Purpose: Returns current index of assembly component on current level
108
109     NextIndex (me: in out);
110     PrevIndex (me: in out);
111     SetIndex (me: in out; ind: Integer );
112         ---Purpose: Changes current index of assembly component on current level
113
114     GetProductName (me) returns HAsciiString from TCollection;
115         ---Purpose: Generates a product name basing on write.step.product.name
116         --          parameter and current position in the assembly structure
117
118     -- Methods for collecting all roots corresponding to some constructs
119     
120     GetRootsForPart (me: in out; SDRTool: Part from STEPConstruct)
121     returns HSequenceOfTransient from TColStd;
122         ---Purpose: Produces and returns a full list of root entities required
123         --          for part identified by SDRTool (including SDR itself)
124     
125     GetRootsForAssemblyLink (me: in out; assembly: Assembly from STEPConstruct)
126     returns HSequenceOfTransient from TColStd;
127         ---Purpose: Produces and returns a full list of root entities required
128         --          for assembly link identified by assembly (including NAUO and CDSR)
129     
130 fields
131
132     myLevel  : SequenceOfInteger from TColStd; -- level of assembly for auto naming products
133     theAPD   : ApplicationProtocolDefinition from StepBasic;
134     theAP203 : AP203Context from STEPConstruct;
135     myAxis   : Axis2Placement3d from StepGeom;
136
137 end ContextTool;