0023024: Update headers of OCCT files
[occt.git] / src / Standard / Standard_GUID.cdl
1 -- Created on: 1997-06-19
2 -- Created by: Christophe LEYNADIER
3 -- Copyright (c) 1997-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
5 --
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
10 --
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13 --
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
20
21
22 class GUID from Standard 
23
24 inherits Storable from Standard
25
26 is
27     Create returns GUID from Standard;
28     
29     Create(aGuid : CString from Standard)
30         returns GUID from Standard;
31     ---Purpose: build a GUID from an ascii string with the
32     --          following format:
33     --          Length : 36 char
34     --          "00000000-0000-0000-0000-000000000000"
35
36     Create(aGuid : ExtString from Standard)
37         returns GUID from Standard;
38     ---Purpose: build a GUID from an unicode string with the
39     --          following format:
40     --          
41     --          "00000000-0000-0000-0000-000000000000"
42
43     
44     Create(a32b : Integer from Standard;
45            a16b1 : ExtCharacter from Standard;
46            a16b2 : ExtCharacter from Standard;
47            a16b3 : ExtCharacter from Standard;
48            a8b1 : Byte from Standard;
49            a8b2 : Byte from Standard;
50            a8b3 : Byte from Standard;
51            a8b4 : Byte from Standard;
52            a8b5 : Byte from Standard;
53            a8b6 : Byte from Standard)
54         returns GUID from Standard;
55         
56     Create(aGuid : UUID from Standard)
57         returns GUID from Standard;
58
59     Create(aGuid : GUID from Standard)
60         returns GUID from Standard;
61
62     ToUUID(me)
63         returns UUID from Standard ;
64
65     ToCString(me; aStrGuid : PCharacter from Standard);
66     ---Purpose: translate the GUID into ascii string
67     --          the aStrGuid is allocated by user.
68     --          the guid have the following format:
69     --          
70     --          "00000000-0000-0000-0000-000000000000"
71       
72     ToExtString(me; aStrGuid : PExtCharacter from Standard);
73     ---Purpose: translate the GUID into unicode string
74     --          the aStrGuid is allocated by user.
75     --          the guid have the following format:
76     --          
77     --          "00000000-0000-0000-0000-000000000000"
78       
79     IsSame(me; uid : GUID from Standard)
80             returns Boolean from Standard;
81     ---C++: alias operator ==      
82  
83     IsNotSame(me; uid : GUID from Standard)
84             returns Boolean from Standard;
85     ---C++: alias operator !=   
86                     
87     Assign(me : out; uid : GUID from Standard);
88     ---C++: alias operator =
89
90     Assign(me : out; uid : UUID from Standard);
91     ---C++: alias operator =
92                     
93     ShallowDump(me; aStream : in out OStream from Standard) is redefined;
94     ---Purpose: Display the GUID with the following format:
95     --          
96     --          "00000000-0000-0000-0000-000000000000"
97
98     CheckGUIDFormat(myclass; aGuid : CString from Standard)
99         returns Boolean from Standard;
100     ---Purpose: Check the format of a GUID string.
101     --          It checks the size, the position of the '-' and the correct size of fields.
102
103     Hash(me; Upper : Integer)
104     returns Integer;
105     ---Level: Internal
106     ---Purpose: Hash function for GUID.
107     
108     HashCode(myclass ; aguid : GUID from Standard; Upper : Integer)
109     returns Integer;
110     ---Level: Internal
111     ---Purpose: H method used by collections.
112
113     IsEqual(myclass ; string1 : GUID from Standard; 
114             string2 : GUID from Standard)
115     returns Boolean;
116     ---Level: Internal
117     ---Purpose: Returns True  when the two GUID are the same. 
118
119     fields
120
121          my32b : Integer;
122          my16b1 : ExtCharacter;
123          my16b2 : ExtCharacter;
124          my16b3 : ExtCharacter;
125          my8b1 : Byte;
126          my8b2 : Byte;
127          my8b3 : Byte;
128          my8b4 : Byte;
129          my8b5 : Byte;
130          my8b6 : Byte; 
131         
132 end;