b311480e |
1 | -- Created on: 1997-09-08 |
2 | -- Created by: Yves FRICAUD |
3 | -- Copyright (c) 1997-1999 Matra Datavision |
973c2be1 |
4 | -- Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | -- |
973c2be1 |
6 | -- This file is part of Open CASCADE Technology software library. |
b311480e |
7 | -- |
d5f74e42 |
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 |
973c2be1 |
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. |
b311480e |
13 | -- |
973c2be1 |
14 | -- Alternatively, this file may be used under the terms of Open CASCADE |
15 | -- commercial license or contractual agreement. |
7fd59977 |
16 | |
17 | class Naming from TNaming inherits Attribute from TDF |
18 | |
19 | |
20 | ---Purpose: This attribute store the topological naming of any |
21 | -- selected shape, when this shape is not already |
22 | -- attached to a specific label. This class is also used |
23 | -- to solve it when the argumentsof the toipological |
24 | -- naming are modified. |
25 | |
26 | |
27 | |
28 | uses |
29 | |
30 | Attribute from TDF, |
31 | Label from TDF, |
32 | LabelMap from TDF, |
33 | RelocationTable from TDF, |
34 | GUID from Standard, |
35 | NamedShape from TNaming, |
36 | Name from TNaming, |
37 | Shape from TopoDS, |
38 | AttributeIndexedMap from TDF, |
39 | IDFilter from TDF, |
40 | DataSet from TDF, |
41 | Scope from TNaming |
42 | |
43 | is |
44 | |
45 | |
46 | |
47 | ---Purpose: following code from TDesignStd |
48 | -- ============================== |
49 | |
50 | |
51 | GetID (myclass) |
52 | ---C++: return const & |
53 | returns GUID from Standard; |
54 | |
55 | Insert (myclass; under : Label from TDF) |
56 | returns Naming from TNaming; |
57 | |
58 | Name (myclass; where : Label from TDF; |
59 | Selection : Shape from TopoDS; |
60 | Context : Shape from TopoDS; |
61 | Geometry : Boolean from Standard = Standard_False; |
62 | KeepOrientation : Boolean from Standard = Standard_False; |
63 | BNproblem : Boolean from Standard = Standard_False) |
64 | returns NamedShape from TNaming; |
65 | ---Purpose: Creates a Namimg attribute at label <where> to |
66 | -- identify the shape <Selection>. Geometry is |
67 | -- Standard_True if we are only interested by the |
68 | -- underlying geometry (e.g. setting a |
69 | -- constraint). <Context> is used to find neighbours of |
70 | -- <S> when required by the naming. |
71 | -- If KeepOrientation is True the Selection orientation is taken |
72 | -- into account. BNproblem == True points out that Context sub-shapes |
73 | -- in DF have orientation differences with Context shape itself. |
74 | |
75 | |
76 | ---Purpose: instance method |
77 | -- =============== |
78 | |
79 | |
80 | Create |
6e33d3ce |
81 | returns Naming from TNaming; |
7fd59977 |
82 | |
83 | IsDefined (me) returns Boolean from Standard; |
84 | |
85 | GetName(me) |
86 | returns Name from TNaming; |
87 | ---C++: return const & |
88 | |
89 | ChangeName(me : mutable) |
90 | returns Name from TNaming; |
91 | ---C++: return & |
92 | |
93 | Regenerate (me:mutable; scope : in out LabelMap from TDF) |
94 | ---Purpose: regenerate only the Name associated to me |
95 | returns Boolean; |
96 | |
97 | Solve (me : mutable; scope : in out LabelMap from TDF) |
98 | ---Purpose: Regenerate recursively the whole name with scope. If |
99 | -- scope is empty it means that all the labels of the |
100 | -- framework are valid. |
101 | returns Boolean from Standard; |
102 | |
103 | ID(me) |
104 | ---C++: return const & |
105 | returns GUID from Standard |
106 | is redefined; |
107 | |
108 | ---Purpose: Deferred methods from TDF_Attribute |
109 | -- =================================== |
110 | |
111 | NewEmpty (me) |
6e33d3ce |
112 | returns Attribute from TDF; |
7fd59977 |
113 | |
114 | Restore (me: mutable; With : Attribute from TDF); |
115 | |
6e33d3ce |
116 | Paste (me; Into : Attribute from TDF; |
117 | RT : RelocationTable from TDF); |
7fd59977 |
118 | |
119 | References (me; aDataSet : DataSet from TDF) |
120 | is redefined virtual; |
121 | |
122 | Dump(me; anOS : in out OStream from Standard) |
123 | returns OStream from Standard |
124 | is redefined; |
125 | ---C++: return & |
126 | |
127 | ExtendedDump(me; |
128 | anOS : in out OStream from Standard; |
129 | aFilter : IDFilter from TDF; |
130 | aMap : in out AttributeIndexedMap from TDF) |
131 | is redefined; |
132 | |
133 | |
134 | fields |
135 | |
136 | myName : Name from TNaming; |
137 | |
138 | end Naming; |
139 | |