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 <Standard_OutOfRange.hxx>
16 #include <Standard_Transient.hxx>
17 #include <Standard_Type.hxx>
18 #include <Standard_TypeMismatch.hxx>
19 #include <Transfer_TransientListBinder.hxx>
21 IMPLEMENT_STANDARD_RTTIEXT(Transfer_TransientListBinder,Transfer_Binder)
23 //#include <TColStd.hxx>
24 //=======================================================================
25 //function : Constructor
27 //=======================================================================
28 Transfer_TransientListBinder::Transfer_TransientListBinder ()
29 { theres = new TColStd_HSequenceOfTransient(); }
31 //=======================================================================
32 //function : Constructor
34 //=======================================================================
36 Transfer_TransientListBinder::Transfer_TransientListBinder
37 (const Handle(TColStd_HSequenceOfTransient)& list)
40 //=======================================================================
41 //function : IsMultiple
43 //=======================================================================
45 Standard_Boolean Transfer_TransientListBinder::IsMultiple () const
46 { return (NbTransients() > 1); }
48 //=======================================================================
49 //function : ResultType
51 //=======================================================================
53 Handle(Standard_Type) Transfer_TransientListBinder::ResultType () const
54 { return STANDARD_TYPE(Transfer_TransientListBinder); }
56 //=======================================================================
57 //function : ResultTypeName
59 //=======================================================================
61 Standard_CString Transfer_TransientListBinder::ResultTypeName () const
62 { return "list(Standard_Transient)"; }
65 //=======================================================================
66 //function : AddResult
68 //=======================================================================
70 void Transfer_TransientListBinder::AddResult (const Handle(Standard_Transient)& Transient)
71 { theres->Append(Transient); }
73 //=======================================================================
76 //=======================================================================
78 Handle(TColStd_HSequenceOfTransient) Transfer_TransientListBinder::Result () const
81 //=======================================================================
82 //function : SetResult
84 //=======================================================================
86 void Transfer_TransientListBinder::SetResult
87 (const Standard_Integer num, const Handle(Standard_Transient)& Transient)
88 { theres->SetValue(num,Transient); }
90 //=======================================================================
91 //function : NbTransients
93 //=======================================================================
95 Standard_Integer Transfer_TransientListBinder::NbTransients () const
96 { return theres->Length(); }
98 //=======================================================================
99 //function : Transient
101 //=======================================================================
103 const Handle(Standard_Transient)&
104 Transfer_TransientListBinder::Transient (const Standard_Integer num) const
105 { return theres->Value(num); }