0024428: Implementation of LGPL license
[occt.git] / src / Aspect / Aspect_WidthMapEntry.cdl
CommitLineData
b311480e 1-- Created on: 1993-09-09
2-- Created by: GG
3-- Copyright (c) 1993-1999 Matra Datavision
973c2be1 4-- Copyright (c) 1999-2014 OPEN CASCADE SAS
7fd59977 5--
973c2be1 6-- This file is part of Open CASCADE Technology software library.
7fd59977 7--
973c2be1 8-- This library is free software; you can redistribute it and / or modify it
9-- under the terms of the GNU Lesser General Public 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.
7fd59977 13--
973c2be1 14-- Alternatively, this file may be used under the terms of Open CASCADE
15-- commercial license or contractual agreement.
b311480e 16
17-- Updated by JLF (Reason : Width MUST be given in METER 2 Mars 94)
7fd59977 18
19class WidthMapEntry from Aspect
20
21 ---Version: 0.0
22
23 ---Purpose: This class defines a widthmap entry.
24 -- A widthmap entry is an association between
25 -- a LineStyle object and an index in the widthmap.
26 ---Keywords:
27 ---Warning:
28 ---References:
29
30uses
31 WidthOfLine from Aspect,
32 Length from Quantity
33
34raises
35 OutOfRange from Standard,
36 BadAccess from Aspect
37
38is
39 Create
40 returns WidthMapEntry from Aspect;
41 ---Level: Public
42 ---Purpose: Creates an unallocated widthmap entry
43
44 Create ( index : Integer from Standard;
45 style : WidthOfLine from Aspect)
46 returns WidthMapEntry;
47 ---Level: Public
48 ---Purpose: Creates an allocated widthmap entry from width style
49
50 Create ( index : Integer from Standard;
51 width : Length from Quantity)
52 returns WidthMapEntry;
53 ---Level: Public
54 ---Purpose: Creates an allocated widthmap entry from width value
55
56 Create ( entry : WidthMapEntry from Aspect )
57 returns WidthMapEntry
58 ---Level: Public
59 ---Purpose: Creates an allocated widthmap entry.
60 ---Warning: Raises error if the widthmap entry <entry>
61 -- is unallocated.
62 raises BadAccess from Aspect;
63
64 SetValue ( me: in out; index : Integer from Standard;
65 style : WidthOfLine from Aspect );
66 ---Level: Public
67 ---Purpose: Sets widthmap entry value from width style
68 -- and allocates it.
69
70 SetValue ( me: in out; index : Integer from Standard;
71 width : Length from Quantity);
72 ---Level: Public
73 ---Purpose: Sets widthmap entry value from width value
74 -- and allocates it.
75
76 SetValue ( me: in out; entry : WidthMapEntry from Aspect);
77 ---Level: Public
78 ---Purpose: Sets widthmap entry value and allocates it.
79 ---C++: alias operator =
80
81 SetIndex ( me: in out; index : Integer from Standard);
82 ---Level: Public
83 ---Purpose: Sets index value of a widthmap entry.
84
85 SetType ( me: in out; Style : WidthOfLine from Aspect );
86 ---Level: Public
87 ---Purpose: Sets width style of widthmap entry.
88
89 SetWidth ( me: in out; Width : Length from Quantity);
90 ---Level: Public
91 ---Purpose: Sets width value of widthmap entry.
92
93 Type ( me ) returns WidthOfLine from Aspect
94 ---Level: Public
95 ---Warning: Raises error if the widthmap entry is unallocated .
96 raises BadAccess from Aspect;
97
98 Width ( me ) returns Length from Quantity
99 ---Level: Public
100 ---Purpose: Returns width value of widthmap entry.
101 -- Warning: Raises error if the widthmap entry is unallocated .
102 raises BadAccess from Aspect;
103
104 Index ( me ) returns Integer from Standard
105 ---Level: Public
106 ---Purpose: Returns index value of a widthmap entry.
107 -- Warning: Raises error if the widthmap entry is unallocated .
108 raises BadAccess from Aspect;
109
110 Free ( me : in out );
111 ---Level: Public
112 ---Purpose: Unallocates the widthmap entry.
113
114 IsAllocated ( me ) returns Boolean from Standard;
115 ---Level: Public
116 ---Purpose: Returns True if the widthmap entry is allocated.
117 -- Warning: A widthmap entry is allocated when the width and
118 -- the index is defined.
119
120 Dump( me );
121 ---Level: Internal
122
123 ----------------------------
124 -- Category: Private methods
125 ----------------------------
126
127 SetPredefinedStyle ( me : in out;
128 Type : WidthOfLine from Aspect )
129 ---Level: Internal
130 ---Purpose: Set Line Width with the predefined style values
131 -- according of type
132 -- Warning: Raises error if the Width style is USER_DEFINED
133 raises BadAccess from Aspect is private;
134 ---Category: Private methods
135
136fields
137 MyType : WidthOfLine from Aspect;
138 MyWidth : Real from Standard;
139 MyIndex : Integer from Standard;
140 MyTypeIsDef : Boolean from Standard;
141 MyIndexIsDef : Boolean from Standard;
142
143end WidthMapEntry from Aspect;