0022627: Change OCCT memory management defaults
[occt.git] / src / IGESData / IGESData_DirPart.cxx
1 #include <IGESData_DirPart.ixx>
2 #include <Standard_PCharacter.hxx>
3
4
5
6     IGESData_DirPart::IGESData_DirPart ()  {  }
7
8     void IGESData_DirPart::Init
9       (const Standard_Integer  i1, const Standard_Integer i2, const Standard_Integer i3, const Standard_Integer i4,
10        const Standard_Integer  i5, const Standard_Integer i6, const Standard_Integer i7, const Standard_Integer i8,
11        const Standard_Integer  i9, const Standard_Integer i10, const Standard_Integer i11,
12        const Standard_Integer i12, const Standard_Integer i13, const Standard_Integer i14,
13        const Standard_Integer i15, const Standard_Integer i16, const Standard_Integer i17,
14        const Standard_CString res1, const Standard_CString res2,
15        const Standard_CString label, const Standard_CString subscript)
16 {
17   thevals[ 0] =  i1; thevals[ 1] =  i2; thevals[ 2] =  i3; thevals[ 3] =  i4;
18   thevals[ 4] =  i5; thevals[ 5] =  i6; thevals[ 6] =  i7; thevals[ 7] =  i8;
19   thevals[ 8] =  i9; thevals[ 9] = i10; thevals[10] = i11; thevals[11] = i12;
20   thevals[12] = i13; thevals[13] = i14; thevals[14] = i15; thevals[15] = i16;
21   thevals[16] = i17;
22   for (Standard_Integer i = 0; i < 8; i ++) {
23     theres1[i] = res1 [i];  theres2[i] = res2[i];
24     thelabl[i] = label[i];  thesubs[i] = subscript[i]; 
25   }
26   theres1[8] = '\0'; theres2[8] = '\0'; thelabl[8] = '\0'; thesubs[8] = '\0';
27 }
28
29 //   CString : on modifie leur CONTENU, pas le POINTEUR LUI-MEME
30
31 //=======================================================================
32 //function : Values
33 //purpose  : 
34 //=======================================================================
35 void IGESData_DirPart::Values (Standard_Integer&  i1, 
36                                Standard_Integer&  i2, 
37                                Standard_Integer&  i3, 
38                                Standard_Integer&  i4, 
39                                Standard_Integer&  i5,
40                                Standard_Integer&  i6, 
41                                Standard_Integer&  i7, 
42                                Standard_Integer&  i8, 
43                                Standard_Integer&  i9, 
44                                Standard_Integer& i10,
45                                Standard_Integer& i11, 
46                                Standard_Integer& i12, 
47                                Standard_Integer& i13, 
48                                Standard_Integer& i14, 
49                                Standard_Integer& i15,
50                                Standard_Integer& i16, 
51                                Standard_Integer& i17,
52                                const Standard_CString res1, 
53                                const Standard_CString res2, 
54                                const Standard_CString label, 
55                                const Standard_CString subscript) const
56 {
57   Standard_PCharacter pres1, pres2, plabel, psubscript;
58   Standard_Integer i;
59   //
60   pres1=(Standard_PCharacter)res1;
61   pres2=(Standard_PCharacter)res2;
62   plabel=(Standard_PCharacter)label;
63   psubscript=(Standard_PCharacter)subscript;
64   //
65   i1  = thevals[ 0]; i2  = thevals[ 1]; i3  = thevals[ 2]; i4  = thevals[ 3];
66   i5  = thevals[ 4]; i6  = thevals[ 5]; i7  = thevals[ 6]; i8  = thevals[ 7];
67   i9  = thevals[ 8]; i10 = thevals[ 9]; i11 = thevals[10]; i12 = thevals[11];
68   i13 = thevals[12]; i14 = thevals[13]; i15 = thevals[14]; i16 = thevals[15];
69   i17 = thevals[16];
70   for (i = 0; i < 8; ++i) {
71     pres1 [i] = theres1[i]; 
72     pres2     [i] = theres2[i];
73     plabel[i] = thelabl[i]; 
74     psubscript[i] = thesubs[i];
75   }
76   pres1[8] = '\0'; 
77   pres2[8] = '\0'; 
78   plabel[8] = '\0'; 
79   psubscript[8] = '\0';
80 }
81
82
83     IGESData_IGESType IGESData_DirPart::Type () const
84       {  return IGESData_IGESType(thevals[0],thevals[16]);  }  // type & forme