Salome HOME
Join modifications from branch BR_PR_V320b1
[modules/kernel.git] / src / Communication / SALOME_Matrix_i.cxx
1 #include "SALOME_Matrix_i.hxx"
2 #include "SenderFactory.hxx"
3
4 SALOME_Matrix_i::SALOME_Matrix_i(const SALOMEMultiComm& multiCommunicator,const double *tabToSend,int nbOfRow,int nbOfColumn,bool ownTabToSend):_tabToSend(tabToSend),
5                                                                                                                                                 _nbOfRow(nbOfRow),
6                                                                                                                                                 _nbOfColumn(nbOfColumn),
7                                                                                                                                                 _ownTabToSend(ownTabToSend),
8                                                                                                                                                 _type(multiCommunicator)
9 {
10 }
11
12 SALOME_Matrix_i::~SALOME_Matrix_i()
13 {
14   if(_ownTabToSend)
15     delete [] _tabToSend;
16 }
17
18 SALOME::SenderDouble_ptr SALOME_Matrix_i::getData()
19 {
20   return SenderFactory::buildSender(_type,_tabToSend,_nbOfRow*_nbOfColumn,_ownTabToSend);
21 }
22
23 CORBA::Long SALOME_Matrix_i::getSizeOfColumn()
24 {
25   return _nbOfColumn;
26 }
27
28 void SALOME_Matrix_i::release()
29 {
30   PortableServer::ObjectId_var oid = _default_POA()->servant_to_id(this);
31   _default_POA()->deactivate_object(oid);
32   _remove_ref();
33 }