0024428: Implementation of LGPL license
[occt.git] / src / MeshVS / MeshVS_TwoColors.hxx
1 // Created on: 2003-10-08
2 // Created by: Alexander SOLOVYOV
3 // Copyright (c) 2003-2014 OPEN CASCADE SAS
4 //
5 // This file is part of Open CASCADE Technology software library.
6 //
7 // This library is free software; you can redistribute it and / or modify it
8 // under the terms of the GNU Lesser General Public version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
12 //
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
15
16 #ifndef MeshVS_TWOCOLORSHXX
17 #define MeshVS_TWOCOLORSHXX
18
19 #ifndef _Standard_HeaderFile
20 #include <Standard.hxx>
21 #endif
22 #ifndef _Standard_Macro_HeaderFile
23 #include <Standard_Macro.hxx>
24 #endif
25
26 #include <Quantity_Color.hxx>
27
28 typedef struct {
29   unsigned int r1 : 8;
30   unsigned int g1 : 8;
31   unsigned int b1 : 8;
32   unsigned int r2 : 8;
33   unsigned int g2 : 8;
34   unsigned int b2 : 8;
35 } MeshVS_TwoColors;
36
37
38 Standard_EXPORT Standard_Integer HashCode ( const MeshVS_TwoColors& theKey,
39                                             const Standard_Integer  theUpper  );
40
41 Standard_EXPORT Standard_Boolean IsEqual (const MeshVS_TwoColors& K1,
42                                           const MeshVS_TwoColors& K2  );
43
44 Standard_EXPORT Standard_Boolean operator== ( const MeshVS_TwoColors& K1,
45                                               const MeshVS_TwoColors& K2  );
46
47 Standard_EXPORT MeshVS_TwoColors  BindTwoColors ( const Quantity_Color&, const Quantity_Color& );
48 Standard_EXPORT Quantity_Color    ExtractColor  ( MeshVS_TwoColors&, const Standard_Integer );
49 Standard_EXPORT void              ExtractColors ( MeshVS_TwoColors&, Quantity_Color&, Quantity_Color& );
50
51 #endif