1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
3 // This file is part of Open CASCADE Technology software library.
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.
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
15 #include <IGESData_DirPart.hxx>
16 #include <IGESData_IGESType.hxx>
17 #include <Standard_PCharacter.hxx>
19 IGESData_DirPart::IGESData_DirPart () { }
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)
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;
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];
39 theres1[8] = '\0'; theres2[8] = '\0'; thelabl[8] = '\0'; thesubs[8] = '\0';
42 // CString : on modifie leur CONTENU, pas le POINTEUR LUI-MEME
44 //=======================================================================
47 //=======================================================================
48 void IGESData_DirPart::Values (Standard_Integer& i1,
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
70 Standard_PCharacter pres1, pres2, plabel, psubscript;
73 pres1=(Standard_PCharacter)res1;
74 pres2=(Standard_PCharacter)res2;
75 plabel=(Standard_PCharacter)label;
76 psubscript=(Standard_PCharacter)subscript;
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];
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];
96 IGESData_IGESType IGESData_DirPart::Type () const
97 { return IGESData_IGESType(thevals[0],thevals[16]); } // type & forme