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 <Interface_FileParameter.hxx>
16 #include <TCollection_AsciiString.hxx>
17 
18 //=======================================================================
19 //function : Interface_FileParameter
20 //purpose  :
21 //=======================================================================
Interface_FileParameter()22 Interface_FileParameter::Interface_FileParameter ()
23 {
24 thetype = Interface_ParamMisc;  thenum = 0;
25 }
26 
27 //=======================================================================
28 //function : Init
29 //purpose  :
30 //=======================================================================
Init(const TCollection_AsciiString & val,const Interface_ParamType typ)31 void Interface_FileParameter::Init(const TCollection_AsciiString& val,
32 				   const Interface_ParamType typ)
33 {
34   theval  = new char[val.Length()+1];
35   strcpy(theval,val.ToCString());
36   thetype = typ;
37   thenum  = 0;
38 }
39 
40 //=======================================================================
41 //function : Init
42 //purpose  :
43 //=======================================================================
Init(const Standard_CString val,const Interface_ParamType typ)44 void Interface_FileParameter::Init (const Standard_CString val,
45 				    const Interface_ParamType typ)
46 {
47   theval  = (Standard_PCharacter)val;  // Principe : Allocation geree par contenant (ParamSet)
48   thetype = typ;
49   thenum  = 0;
50 }
51 //=======================================================================
52 //function : CValue
53 //purpose  :
54 //=======================================================================
CValue() const55 Standard_CString  Interface_FileParameter::CValue () const
56 {
57   return theval;
58 }
59 //=======================================================================
60 //function : ParamType
61 //purpose  :
62 //=======================================================================
ParamType() const63 Interface_ParamType Interface_FileParameter::ParamType () const
64 {
65   return thetype;
66 }
67 //=======================================================================
68 //function : SetEntityNumber
69 //purpose  :
70 //=======================================================================
SetEntityNumber(const Standard_Integer num)71 void Interface_FileParameter::SetEntityNumber (const Standard_Integer num)
72 {
73   thenum = num;
74 }
75 //=======================================================================
76 //function : EntityNumber
77 //purpose  :
78 //=======================================================================
EntityNumber() const79 Standard_Integer Interface_FileParameter::EntityNumber () const
80 {
81   return thenum;
82 }
83 //=======================================================================
84 //function : Clear
85 //purpose  :
86 //=======================================================================
Clear()87 void Interface_FileParameter::Clear ()
88 {
89   theval = NULL;
90 }  // delete theval;  pas si gere par ParamSet
91 //=======================================================================
92 //function : Destroy
93 //purpose  :
94 //=======================================================================
Destroy()95 void Interface_FileParameter::Destroy ()
96 {
97 }
98 
99