0031668: Visualization - WebGL sample doesn't work on Emscripten 1.39
[occt.git] / src / IGESData / IGESData_DirPart.cxx
1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
2 //
3 // This file is part of Open CASCADE Technology software library.
4 //
5 // This library is free software; you can redistribute it and/or modify it under
6 // the terms of the GNU Lesser General Public License version 2.1 as published
7 // by the Free Software Foundation, with special exception defined in the file
8 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9 // distribution for complete text of the license and disclaimer of any warranty.
10 //
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
13
14
15 #include <IGESData_DirPart.hxx>
16 #include <IGESData_IGESType.hxx>
17 #include <Standard_PCharacter.hxx>
18
19 IGESData_DirPart::IGESData_DirPart ()  {  }
20
21     void IGESData_DirPart::Init
22       (const Standard_Integer  i1, const Standard_Integer i2, const Standard_Integer i3, const Standard_Integer i4,
23        const Standard_Integer  i5, const Standard_Integer i6, const Standard_Integer i7, const Standard_Integer i8,
24        const Standard_Integer  i9, const Standard_Integer i10, const Standard_Integer i11,
25        const Standard_Integer i12, const Standard_Integer i13, const Standard_Integer i14,
26        const Standard_Integer i15, const Standard_Integer i16, const Standard_Integer i17,
27        const Standard_CString res1, const Standard_CString res2,
28        const Standard_CString label, const Standard_CString subscript)
29 {
30   thevals[ 0] =  i1; thevals[ 1] =  i2; thevals[ 2] =  i3; thevals[ 3] =  i4;
31   thevals[ 4] =  i5; thevals[ 5] =  i6; thevals[ 6] =  i7; thevals[ 7] =  i8;
32   thevals[ 8] =  i9; thevals[ 9] = i10; thevals[10] = i11; thevals[11] = i12;
33   thevals[12] = i13; thevals[13] = i14; thevals[14] = i15; thevals[15] = i16;
34   thevals[16] = i17;
35   for (Standard_Integer i = 0; i < 8; i ++) {
36     theres1[i] = res1 [i];  theres2[i] = res2[i];
37     thelabl[i] = label[i];  thesubs[i] = subscript[i]; 
38   }
39   theres1[8] = '\0'; theres2[8] = '\0'; thelabl[8] = '\0'; thesubs[8] = '\0';
40 }
41
42 //   CString : on modifie leur CONTENU, pas le POINTEUR LUI-MEME
43
44 //=======================================================================
45 //function : Values
46 //purpose  : 
47 //=======================================================================
48 void IGESData_DirPart::Values (Standard_Integer&  i1, 
49                                Standard_Integer&  i2, 
50                                Standard_Integer&  i3, 
51                                Standard_Integer&  i4, 
52                                Standard_Integer&  i5,
53                                Standard_Integer&  i6, 
54                                Standard_Integer&  i7, 
55                                Standard_Integer&  i8, 
56                                Standard_Integer&  i9, 
57                                Standard_Integer& i10,
58                                Standard_Integer& i11, 
59                                Standard_Integer& i12, 
60                                Standard_Integer& i13, 
61                                Standard_Integer& i14, 
62                                Standard_Integer& i15,
63                                Standard_Integer& i16, 
64                                Standard_Integer& i17,
65                                const Standard_CString res1, 
66                                const Standard_CString res2, 
67                                const Standard_CString label, 
68                                const Standard_CString subscript) const
69 {
70   Standard_PCharacter pres1, pres2, plabel, psubscript;
71   Standard_Integer i;
72   //
73   pres1=(Standard_PCharacter)res1;
74   pres2=(Standard_PCharacter)res2;
75   plabel=(Standard_PCharacter)label;
76   psubscript=(Standard_PCharacter)subscript;
77   //
78   i1  = thevals[ 0]; i2  = thevals[ 1]; i3  = thevals[ 2]; i4  = thevals[ 3];
79   i5  = thevals[ 4]; i6  = thevals[ 5]; i7  = thevals[ 6]; i8  = thevals[ 7];
80   i9  = thevals[ 8]; i10 = thevals[ 9]; i11 = thevals[10]; i12 = thevals[11];
81   i13 = thevals[12]; i14 = thevals[13]; i15 = thevals[14]; i16 = thevals[15];
82   i17 = thevals[16];
83   for (i = 0; i < 8; ++i) {
84     pres1 [i] = theres1[i]; 
85     pres2     [i] = theres2[i];
86     plabel[i] = thelabl[i]; 
87     psubscript[i] = thesubs[i];
88   }
89   pres1[8] = '\0'; 
90   pres2[8] = '\0'; 
91   plabel[8] = '\0'; 
92   psubscript[8] = '\0';
93 }
94
95
96     IGESData_IGESType IGESData_DirPart::Type () const
97       {  return IGESData_IGESType(thevals[0],thevals[16]);  }  // type & forme