0024428: Implementation of LGPL license
[occt.git] / src / Aspect / Aspect_WidthMap.cdl
CommitLineData
b311480e 1-- Created on: 1993-03-23
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.
7fd59977 16
17class WidthMap from Aspect inherits TShared from MMgt
18
19 ---Version: 0.0
20
21 ---Purpose: This class defines a WidthMap object.
22 ---Keywords:
23 ---Warning:
24 ---References:
25
26uses
27 WidthOfLine from Aspect,
28 WidthMapEntry from Aspect,
29 SequenceOfWidthMapEntry from Aspect,
30 Length from Quantity
31
32raises
33 BadAccess from Aspect
34
35is
36 Create
37 returns mutable WidthMap from Aspect;
38 ---Level: Public
39 ---Purpose: Creates a width map.
40
41 AddEntry (me : mutable; AnEntry : WidthMapEntry from Aspect)
42 ---Level: Public
43 ---Purpose: Adds an entry in the Width map <me>.
44 -- Warning: Raises BadAccess if WidthMap size is exceeded.
45 raises BadAccess from Aspect;
46
47 AddEntry (me : mutable; aStyle : WidthOfLine from Aspect)
48 returns Integer from Standard;
49 ---Level: Public
50 ---Purpose: Search an identical line width entry in the width map <me>
51 -- and returns the WidthMapEntry Index if exist.
52 -- Or add a new entry and returns the computed WidthMapEntry index used.
53
54 AddEntry (me : mutable; aStyle : Length from Quantity)
55 returns Integer from Standard;
56 ---Level: Public
57 ---Purpose: Search an identical line width entry in the width map <me>
58 -- and returns the WidthMapEntry Index if exist.
59 -- Or add a new entry and returns the computed WidthMapEntry index used.
60
61 Size( me ) returns Integer from Standard is static;
62 ---Level: Public
63 ---Purpose: Returns the Allocated widthmap Size
64
65 Index( me ; aWidthmapIndex : Integer ) returns Integer from Standard
66 ---Level: Public
67 ---Purpose: Returns the WidthMapEntry.Index of the WidthMap
68 -- at rank <aWidthmapIndex> .
69 raises BadAccess from Aspect is static;
70 ---Trigger: Raises BadAccess if the index less than 1 or
71 -- greater than Size.
72
73 Entry ( me ;
74 AnIndex : Integer from Standard )
75 returns WidthMapEntry from Aspect
76 ---Level: Public
77 ---Purpose: Returns the Width map entry with the index <AnIndex>.
78 -- Warning: Raises BadAccess if the index less than 1 or
79 -- greater than Size.
80 raises BadAccess from Aspect is static;
81
82 Dump ( me ) ;
83 ---Level: Internal
84
85fields
86 mydata : SequenceOfWidthMapEntry from Aspect is protected;
87
88end WidthMap ;