- SMESH::log_array_var aLog;
- try
- {
- list < SMESHDS_Command * >logDS = _impl->GetLog();
- aLog = new SMESH::log_array;
- int indexLog = 0;
- int lg = logDS.size();
- SCRUTE(lg);
- aLog->length(lg);
- list < SMESHDS_Command * >::iterator its = logDS.begin();
- while (its != logDS.end())
- {
- SMESHDS_Command *com = *its;
- int comType = com->GetType();
- //SCRUTE(comType);
- int lgcom = com->GetNumber();
- //SCRUTE(lgcom);
- const list < int >&intList = com->GetIndexes();
- int inum = intList.size();
- //SCRUTE(inum);
- list < int >::const_iterator ii = intList.begin();
- const list < double >&coordList = com->GetCoords();
- int rnum = coordList.size();
- //SCRUTE(rnum);
- list < double >::const_iterator ir = coordList.begin();
- aLog[indexLog].commandType = comType;
- aLog[indexLog].number = lgcom;
- aLog[indexLog].coords.length(rnum);
- aLog[indexLog].indexes.length(inum);
- for (int i = 0; i < rnum; i++)
- {
- aLog[indexLog].coords[i] = *ir;
- //MESSAGE(" "<<i<<" "<<ir.Value());
- ir++;
- }
- for (int i = 0; i < inum; i++)
- {
- aLog[indexLog].indexes[i] = *ii;
- //MESSAGE(" "<<i<<" "<<ii.Value());
- ii++;
- }
- indexLog++;
- its++;
- }
- if (clearAfterGet)
- _impl->ClearLog();
- }
- catch(SALOME_Exception & S_ex)
- {
- THROW_SALOME_CORBA_EXCEPTION(S_ex.what(), SALOME::BAD_PARAM);
- }
- return aLog._retn();
-}
-
-// SMESH::string_array* SMESH_Mesh_i::GetLog(CORBA::Boolean clearAfterGet)
-// throw (SALOME::SALOME_Exception)
-// {
-// MESSAGE("SMESH_Mesh_i::GetLog");
-
-// SMESH::string_array_var aLog;
-// try
-// {
-// const SMESHDS_ListOfCommand& logDS =_impl->GetLog();
-// aLog = new SMESH::string_array;
-// int logSize = 0;
-// int indexLog = 0;
-// int lg = logDS.Extent();
-// SCRUTE(lg);
-// SMESHDS_ListIteratorOfListOfCommand its(logDS);
-// while(its.More())
-// {
-// Handle(SMESHDS_Command) com = its.Value();
-// int comType = com->GetType();
-// SCRUTE(comType);
-// int lgcom = com->GetNumber();
-// SCRUTE(lgcom);
-// logSize += lgcom;
-// aLog->length(logSize);
-// SCRUTE(logSize);
-// const TColStd_ListOfInteger& intList = com->GetIndexes();
-// TColStd_ListIteratorOfListOfInteger ii(intList);
-// const TColStd_ListOfReal& coordList = com->GetCoords();
-// TColStd_ListIteratorOfListOfReal ir(coordList);
-// for (int icom = 1; icom <= lgcom; icom++)
-// {
-// ostringstream S;
-// switch (comType)
-// {
-// case SMESHDS_AddNode:
-// S << "AddNode " << ii.Value(); ii.Next();
-// S << " " << ir.Value(); ir.Next();
-// S << " " << ir.Value(); ir.Next();
-// S << " " << ir.Value(); ir.Next();
-// break;
-// case SMESHDS_AddEdge:
-// S << "AddEdge " << ii.Value(); ii.Next();
-// S << " " << ii.Value(); ii.Next();
-// S << " " << ii.Value(); ii.Next();
-// break;
-// case SMESHDS_AddTriangle:
-// S << "AddFace " << ii.Value(); ii.Next();
-// S << " " << ii.Value(); ii.Next();
-// S << " " << ii.Value(); ii.Next();
-// S << " " << ii.Value(); ii.Next();
-// break;
-// case SMESHDS_AddQuadrangle:
-// S << "AddFace " << ii.Value(); ii.Next();
-// S << " " << ii.Value(); ii.Next();
-// S << " " << ii.Value(); ii.Next();
-// S << " " << ii.Value(); ii.Next();
-// S << " " << ii.Value(); ii.Next();
-// break;
-// case SMESHDS_AddTetrahedron:
-// S << "AddVolume " << ii.Value(); ii.Next();
-// S << " " << ii.Value(); ii.Next();
-// S << " " << ii.Value(); ii.Next();
-// S << " " << ii.Value(); ii.Next();
-// S << " " << ii.Value(); ii.Next();
-// break;
-// case SMESHDS_AddPyramid:
-// S << "AddVolume " << ii.Value(); ii.Next();
-// S << " " << ii.Value(); ii.Next();
-// S << " " << ii.Value(); ii.Next();
-// S << " " << ii.Value(); ii.Next();
-// S << " " << ii.Value(); ii.Next();
-// S << " " << ii.Value(); ii.Next();
-// break;
-// case SMESHDS_AddPrism:
-// S << "AddVolume " << ii.Value(); ii.Next();
-// S << " " << ii.Value(); ii.Next();
-// S << " " << ii.Value(); ii.Next();
-// S << " " << ii.Value(); ii.Next();
-// S << " " << ii.Value(); ii.Next();
-// S << " " << ii.Value(); ii.Next();
-// S << " " << ii.Value(); ii.Next();
-// break;
-// case SMESHDS_AddHexahedron:
-// S << "AddVolume " << ii.Value(); ii.Next();
-// S << " " << ii.Value(); ii.Next();
-// S << " " << ii.Value(); ii.Next();
-// S << " " << ii.Value(); ii.Next();
-// S << " " << ii.Value(); ii.Next();
-// S << " " << ii.Value(); ii.Next();
-// S << " " << ii.Value(); ii.Next();
-// S << " " << ii.Value(); ii.Next();
-// S << " " << ii.Value(); ii.Next();
-// break;
-// case SMESHDS_RemoveNode:
-// S << "RemoveNode " << ii.Value(); ii.Next();
-// break;
-// case SMESHDS_RemoveElement:
-// S << "RemoveElement " << ii.Value(); ii.Next();
-// break;
-// default:
-// ASSERT(0);
-// break;
-// }
-// string ch = S.str();
-// SCRUTE(ch);
-// aLog[indexLog++] = CORBA::string_dup(ch.c_str());
-// }
-// its.Next();
-// }
-// if (clearAfterGet) _impl->ClearLog();
-// }
-// catch (SALOME_Exception& S_ex)
-// {
-// THROW_SALOME_CORBA_EXCEPTION(S_ex.what(), SALOME::BAD_PARAM);
-// }
-// return aLog._retn();
-// }