1 // File : SALOMEDS_AttributeSequenceOfInteger_i.cxx
2 // Author : Sergey RUIN
6 #include "SALOMEDS_AttributeSequenceOfInteger_i.hxx"
7 #include "SALOMEDS.hxx"
8 #include <TColStd_HSequenceOfInteger.hxx>
13 void SALOMEDS_AttributeSequenceOfInteger_i::Assign(const SALOMEDS::LongSeq& other)
15 SALOMEDS::Locker lock;
17 Handle(TColStd_HSequenceOfInteger) CasCadeSeq = new TColStd_HSequenceOfInteger;
18 for (int i = 0; i < other.length(); i++) {
19 CasCadeSeq->Append(other[i]);
21 Handle(SALOMEDSImpl_AttributeSequenceOfInteger)::DownCast(_impl)->Assign(CasCadeSeq);
24 SALOMEDS::LongSeq* SALOMEDS_AttributeSequenceOfInteger_i::CorbaSequence()
26 SALOMEDS::Locker lock;
27 SALOMEDS::LongSeq_var CorbaSeq = new SALOMEDS::LongSeq;
28 Handle(SALOMEDSImpl_AttributeSequenceOfInteger) CasCadeSeq;
29 CasCadeSeq = Handle(SALOMEDSImpl_AttributeSequenceOfInteger)::DownCast(_impl);
30 CorbaSeq->length(CasCadeSeq->Length());
31 for (int i = 0; i < CasCadeSeq->Length(); i++) {
32 CorbaSeq[i] = CasCadeSeq->Value(i+1);;
34 return CorbaSeq._retn();
37 void SALOMEDS_AttributeSequenceOfInteger_i::Add(CORBA::Long value)
39 SALOMEDS::Locker lock;
41 Handle(SALOMEDSImpl_AttributeSequenceOfInteger)::DownCast(_impl)->Add(value);
44 void SALOMEDS_AttributeSequenceOfInteger_i::Remove(CORBA::Long index)
46 SALOMEDS::Locker lock;
48 Handle(SALOMEDSImpl_AttributeSequenceOfInteger)::DownCast(_impl)->Remove(index);
51 void SALOMEDS_AttributeSequenceOfInteger_i::ChangeValue(CORBA::Long index, CORBA::Long value)
53 SALOMEDS::Locker lock;
55 Handle(SALOMEDSImpl_AttributeSequenceOfInteger)::DownCast(_impl)->ChangeValue(index, value);
58 CORBA::Long SALOMEDS_AttributeSequenceOfInteger_i::Value(CORBA::Short index)
60 SALOMEDS::Locker lock;
61 return Handle(SALOMEDSImpl_AttributeSequenceOfInteger)::DownCast(_impl)->Value(index);
64 CORBA::Long SALOMEDS_AttributeSequenceOfInteger_i::Length()
66 SALOMEDS::Locker lock;
67 return Handle(SALOMEDSImpl_AttributeSequenceOfInteger)::DownCast(_impl)->Length();