0024428: Implementation of LGPL license
[occt.git] / src / Aspect / Aspect_TypeMapEntry.cdl
1 -- Created on: 1993-09-07
2 -- Created by: GG
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
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.
13 --
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
16
17 class TypeMapEntry from Aspect
18
19         ---Version: 0.0
20
21         ---Purpose: This class defines a typemap entry.
22         --          A typemap entry is an association between
23         --          a LineStyle object and an index in the typemap.
24         ---Keywords:
25         ---Warning:
26         ---References:
27
28 uses
29         LineStyle from Aspect
30
31 raises
32         BadAccess       from Aspect
33
34 is
35         Create
36         returns TypeMapEntry from Aspect;
37         ---Level: Public
38         ---Purpose: Creates an unallocated typemap entry
39         
40         Create ( index : Integer from Standard; 
41                  style : LineStyle from Aspect)
42         returns TypeMapEntry;
43         ---Level: Public
44         ---Purpose: Creates an allocated typemap entry
45
46         Create ( entry : TypeMapEntry from Aspect )
47         returns TypeMapEntry
48         ---Level: Public
49         ---Purpose: Creates an allocated typemap entry.
50         --  Warning: Raises error if the typemap entry <entry>
51         --          is unallocated.
52         raises BadAccess from Aspect;
53
54         SetValue ( me: in out; index : Integer from Standard;
55                                style : LineStyle from Aspect );
56         ---Level: Public
57         ---Purpose: Sets typemap entry value and allocates it.
58  
59         SetValue ( me: in out; entry : TypeMapEntry from Aspect);
60         ---Level: Public
61         ---Purpose: Sets typemap entry value and allocates it.
62         ---C++: alias operator =
63  
64         SetType ( me: in out; Style : LineStyle from Aspect );
65         ---Level: Public
66         ---Purpose: Sets the line style of typemap entry.
67
68         Type ( me ) returns LineStyle from Aspect
69         ---Warning: Raises error if the typemap entry is unallocated .
70         raises BadAccess from Aspect;
71         ---C++: return const & 
72
73         SetIndex ( me: in out; index : Integer from Standard);
74         ---Level: Public
75         ---Purpose: Sets index value of a typemap entry.
76
77         Index ( me ) returns Integer from Standard 
78         ---Level: Public
79         ---Purpose: Returns index value of a typemap entry.
80         --  Warning: Raises error if the typemap entry is unallocated .
81         raises BadAccess from Aspect;
82
83         Free ( me : in out );
84         ---Level: Public
85         ---Purpose: Unallocates the typemap entry.
86
87         IsAllocated ( me ) returns Boolean from Standard;
88         ---Level: Public
89         ---Purpose: Returns True if the typemap entry is allocated.
90         --  Warning: A typemap entry is allocated when the type and
91         --          the index is defined.
92
93         Dump( me ) ;
94         ---Level: Internal
95
96 fields
97         MyType          : LineStyle from Aspect;
98         MyIndex         : Integer from Standard;
99         MyTypeIsDef     : Boolean from Standard;
100         MyIndexIsDef    : Boolean from Standard;
101
102 end TypeMapEntry from Aspect;