Integration of OCCT 6.5.0 from SVN
[occt.git] / src / Interface / Interface_FileParameter.cxx
1 #include <Interface_FileParameter.ixx>
2
3 //=======================================================================
4 //function : Interface_FileParameter
5 //purpose  : 
6 //=======================================================================
7 Interface_FileParameter::Interface_FileParameter ()
8 {  
9 thetype = Interface_ParamMisc;  thenum = 0;  
10 }
11
12 //=======================================================================
13 //function : Init
14 //purpose  : 
15 //=======================================================================
16 void Interface_FileParameter::Init(const TCollection_AsciiString& val, 
17                                    const Interface_ParamType typ)
18 {
19   theval  = new char[val.Length()+1];
20   strcpy(theval,val.ToCString());
21   thetype = typ;
22   thenum  = 0;
23 }
24
25 //=======================================================================
26 //function : Init
27 //purpose  : 
28 //=======================================================================
29 void Interface_FileParameter::Init (const Standard_CString val, 
30                                     const Interface_ParamType typ)
31 {
32   theval  = (Standard_PCharacter)val;  // Principe : Allocation geree par contenant (ParamSet)
33   thetype = typ;
34   thenum  = 0;
35 }
36 //=======================================================================
37 //function : CValue
38 //purpose  : 
39 //=======================================================================
40 Standard_CString  Interface_FileParameter::CValue () const
41 {
42   return theval;  
43 }
44 //=======================================================================
45 //function : ParamType
46 //purpose  : 
47 //=======================================================================
48 Interface_ParamType Interface_FileParameter::ParamType () const
49 {
50   return thetype;  
51 }
52 //=======================================================================
53 //function : SetEntityNumber
54 //purpose  : 
55 //=======================================================================
56 void Interface_FileParameter::SetEntityNumber (const Standard_Integer num)
57 {
58   thenum = num;  
59 }
60 //=======================================================================
61 //function : EntityNumber
62 //purpose  : 
63 //=======================================================================
64 Standard_Integer Interface_FileParameter::EntityNumber () const
65 {
66   return thenum;  
67 }
68 //=======================================================================
69 //function : Clear
70 //purpose  : 
71 //=======================================================================
72 void Interface_FileParameter::Clear ()
73 {
74   theval = NULL; 
75 }  // delete theval;  pas si gere par ParamSet
76 //=======================================================================
77 //function : Destroy
78 //purpose  : 
79 //=======================================================================
80 void Interface_FileParameter::Destroy ()  
81 {
82 }
83