#include "SALOME_Basics.hxx"
#include <string>
#include <iostream>
-
+#define SALOME_UNUSED(var) (void)var
#ifndef WIN32
#include <sys/time.h>
#else
SALOME::vectorOfDouble* SALOME_CorbaDoubleCSender_i::sendPart(CORBA::ULong offset, CORBA::ULong length){
SALOME::vectorOfDouble_var c1 = new SALOME::vectorOfDouble;
c1->length(length);
- for (long i=0; i<length; i++)
+ for (unsigned long i=0; i<length; i++)
c1[i] = ((double *)_tabToSend)[i+offset];
return c1._retn();
}
SALOME::vectorOfLong* SALOME_CorbaLongCSender_i::sendPart(CORBA::ULong offset, CORBA::ULong length){
SALOME::vectorOfLong_var c1 = new SALOME::vectorOfLong;
c1->length(length);
- for (long i=0; i<length; i++)
+ for (unsigned long i=0; i<length; i++)
c1[i] = ((long *)_tabToSend)[i+offset];
return c1._retn();
}
Engines::FieldsDict* Engines_Component_i::getProperties()
{
Engines::FieldsDict_var copie = new Engines::FieldsDict;
- copie->length(_fieldsDict.size());
+ copie->length((_CORBA_ULong)_fieldsDict.size()); //!< TODO: conversion from size_t to _CORBA_ULong
std::map<std::string,CORBA::Any>::iterator it;
CORBA::ULong i = 0;
for (it = _fieldsDict.begin(); it != _fieldsDict.end(); it++, i++)
char* aBuffer = new char[strlen(aScript)+1];
strcpy(aBuffer, aScript);
CORBA::Octet* anOctetBuf = (CORBA::Octet*)aBuffer;
- int aBufferSize = strlen(aBuffer)+1;
+ int aBufferSize = (int)strlen(aBuffer)+1; //!< TODO: conversion from size_t to int
Engines::TMPFile_var aStreamFile = new Engines::TMPFile(aBufferSize, aBufferSize, anOctetBuf, 1);
isValidScript = true;
return aStreamFile._retn();
{
itm->second->destroy();
}
- catch(const CORBA::Exception& e)
+ catch(const CORBA::Exception& /*e*/) //!< TODO: unused variable
{
// ignore this entry and continue
}
bool Engines_Container_i::isPythonContainer(const char* ContainerName)
{
bool ret=false;
- int len=strlen(ContainerName);
+ size_t len=strlen(ContainerName);
if(len>=2)
if(strcmp(ContainerName+len-2,"Py")==0)
ret=true;
aSalome_file->setLocalFile(origFileName);
aSalome_file->recvFiles();
}
- catch (const SALOME::SALOME_Exception& e)
+ catch (const SALOME::SALOME_Exception& /*e*/) //!< TODO: unused variable
{
return Engines::Salome_file::_nil();
}
MESSAGE("=================================================================");
// set stdout to line buffering (aka C++ std::cout)
setvbuf(stdout, (char *)NULL, _IOLBF, BUFSIZ);
- wchar_t* salome_python;
+ wchar_t* salome_python; //!< TODO: unused variable
char* env_python=getenv("SALOME_PYTHON");
if(env_python != 0)
{
for(std::size_t i=0;i<sz;i++)
args[i] = strdup(command[i].c_str());
args[sz] = nullptr;
- execvp( command[0].c_str() , args );
+ execvp( command[0].c_str() , args );
std::ostringstream oss;
oss << "Error when launching " << command[0];
throw SALOME_Exception(oss.str().c_str()); // execvp failed
CORBA::Octet *buf;
buf = Engines::fileBlock::allocbuf(FILEBLOCK_SIZE);
- int nbRed = fread(buf, sizeof(CORBA::Octet), FILEBLOCK_SIZE, fp);
+ int nbRed = (int)fread(buf, sizeof(CORBA::Octet), FILEBLOCK_SIZE, fp); //!< TODO: conversion from size_t to int
//SCRUTE(nbRed);
aBlock->replace(nbRed, nbRed, buf, 1); // 1 means give ownership
return aBlock;
CORBA::Octet *buf;
buf = Engines::fileBlock::allocbuf(FILEBLOCK_SIZE);
size_t nbRed = fread(buf, sizeof(CORBA::Octet), FILEBLOCK_SIZE, fp);
- aBlock->replace(nbRed, nbRed, buf, 1); // 1 means give ownership
+ aBlock->replace((_CORBA_ULong)nbRed, (_CORBA_ULong)nbRed, buf, 1); // 1 means give ownership //!< TODO: conversion from size_t to _CORBA_ULong
return aBlock;
}
// Used by SALOME_Launcher
std::shared_ptr<ResourcesManager_cpp> _ResManager;
- virtual void notifyObservers(const std::string & event_name, const std::string & event_data) {}
+ virtual void notifyObservers(const std::string & event_name, const std::string & event_data) { SALOME_UNUSED(event_name); SALOME_UNUSED(event_data);}
int addJob(Launcher::Job * new_job);
// Methods used by user interface methods
}
std::vector<std::string> cmd(command_list.length());
const char *toto(command_list[0]);
- for(auto i=0;i<command_list.length();i++)
+ for(auto i=0;i<(int)command_list.length();i++)
cmd[i] = command_list[i];
long pid(0);
try
SALOME::StringVec *ret(new SALOME::StringVec);
std::vector<std::string> loes(ListOfExternalServersCpp(_NS));
std::size_t sz(loes.size());
- ret->length(sz);
+ ret->length((_CORBA_ULong)sz); //!< TODO: conversion from size_t to _CORBA_ULong
for(auto i = 0; i<sz ; i++)
{
(*ret)[i]=CORBA::string_dup(loes[i].c_str());
t.read(buffer.get(),size);
//
std::unique_ptr<SALOME::ByteVec> ret(new SALOME::ByteVec);
- ret->length(size);
+ ret->length((_CORBA_ULong)size); //!< TODO: conversion from size_t to _CORBA_ULong
for(std::size_t i=0;i<size;++i)
- (*ret)[i] = buffer.get()[i];
+ (*ret)[(_CORBA_ULong)i] = buffer.get()[i]; //!< TODO: conversion from size_t to _CORBA_ULong
//
if( unlink(file_name)!=0 )
{
result->job_file = CORBA::string_dup(job_parameters.job_file.c_str());
result->pre_command = CORBA::string_dup(job_parameters.pre_command.c_str());
result->env_file = CORBA::string_dup(job_parameters.env_file.c_str());
- result->in_files.length(job_parameters.in_files.size());
+ result->in_files.length((_CORBA_ULong)job_parameters.in_files.size()); //!< TODO: conversion from size_t to _CORBA_ULong
int i = 0;
for(const std::string& it : job_parameters.in_files)
result->in_files[i] = CORBA::string_dup(it.c_str());
i++;
}
- result->out_files.length(job_parameters.out_files.size());
+ result->out_files.length((_CORBA_ULong)job_parameters.out_files.size()); //!< TODO: conversion from size_t to _CORBA_ULong
i = 0;
for(const std::string& it : job_parameters.out_files)
{
= job_parameters.specific_parameters;
if (!specific_parameters.empty())
{
- result->specific_parameters.length(specific_parameters.size());
+ result->specific_parameters.length((_CORBA_ULong)specific_parameters.size()); //!< TODO: conversion from size_t to _CORBA_ULong
CORBA::ULong i = 0;
for (const auto& it_specific : specific_parameters)
{
// --- Check if containerName contains machine name (if yes: rg>0)
char *stContainer=strdup(containerName);
std::string st2Container(stContainer);
- int rg=st2Container.find("/");
+ int rg=(int)st2Container.find("/"); //!< TODO: conversion from size_t to int
Engines::ContainerParameters params;
preSet(params);
}
std::string path;
- lengthPath = splitPath.size();
+ lengthPath = (int)splitPath.size(); //!< TODO: conversion from size_t to int
for (int k = 0 ; k < lengthPath ;k++)
{
path += "/";
{
ASSERT(_SessionName) ;
ASSERT(strlen(_SessionName)>0) ;
- return _reg.size() ;
+ return (CORBA::ULong)_reg.size() ; //!< TODO: conversion from size_t to CORBA::ULong
}
CORBA::ULong RegistryService::add( const Registry::Infos & infos )
Registry::AllInfos *all = new Registry::AllInfos ;
ASSERT(all) ;
const size_t RegLength = mymap.size();
- all->length(RegLength);
+ all->length((_CORBA_ULong)RegLength); //!< TODO: conversion from size_t to _CORBA_ULong
std::map<int,client_infos *>::iterator im;
for (im=mymap.begin();im!=mymap.end(); im++)
class RESOURCESMANAGER_EXPORT LoadRateManager
{
public:
- virtual std::string Find(const std::vector<std::string>& hosts,
- const MapOfParserResourcesType& resList) { return ""; }
+ virtual std::string Find(const std::vector<std::string>& hosts, const MapOfParserResourcesType& resList) { SALOME_UNUSED(hosts); SALOME_UNUSED(resList); return ""; }
};
class RESOURCESMANAGER_EXPORT LoadRateManagerFirst : public LoadRateManager
typename T::_var_type strvec_CPPtoCORBA(const vector<string> & strvecCpp)
{
typename T::_var_type strvecCorba = new T;
- strvecCorba->length(strvecCpp.size());
+ strvecCorba->length((_CORBA_ULong)strvecCpp.size()); //!< TODO: conversion from size_t to _CORBA_ULong
for(unsigned int i=0;i<strvecCpp.size();i++)
strvecCorba[i] = strvecCpp[i].c_str();
return strvecCorba;
}
else {
SALOMEDS::DoubleSeq_var aSeq = new SALOMEDS::DoubleSeq;
- int length = theArray.size();
+ int length = (int)theArray.size(); //!< TODO: conversion from size_t to int
if(length) {
aSeq->length(length);
for(int i = 0; i<length; i++) aSeq[i] = theArray[i];
}
else {
SALOMEDS::LongSeq_var aSeq = new SALOMEDS::LongSeq;
- int length = theArray.size();
+ int length = (int)theArray.size(); //!< TODO: conversion from size_t to int
if(length) {
aSeq->length(length);
for(int i = 0; i<length; i++) aSeq[i] = theArray[i];
}
else {
SALOMEDS::StringSeq_var aSeq = new SALOMEDS::StringSeq;
- int length = theArray.size();
+ int length = (int)theArray.size(); //!< TODO: conversion from size_t to int
if(length) {
aSeq->length(length);
for(int i = 0; i<length; i++) aSeq[i] = CORBA::string_dup(theArray[i].c_str());
Unexpect aCatch (AP_InvalidIdentifier);
SALOMEDS::DoubleSeq_var aSeq = new SALOMEDS::DoubleSeq;
std::vector<double> v = dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_impl)->GetRealArray(theID);
- int length = v.size();
+ int length = (int)v.size(); //!< TODO: conversion from size_t to int
if(length) {
aSeq->length(length);
for(int i = 0; i<length; i++) aSeq[i] = v[i];
Unexpect aCatch (AP_InvalidIdentifier);
SALOMEDS::LongSeq_var aSeq = new SALOMEDS::LongSeq;
std::vector<int> v = dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_impl)->GetIntArray(theID);
- int length = v.size();
+ int length = (int)v.size(); //!< TODO: conversion from size_t to int
if(length) {
aSeq->length(length);
for(int i = 0; i<length; i++) aSeq[i] = v[i];
Unexpect aCatch (AP_InvalidIdentifier);
SALOMEDS::StringSeq_var aSeq = new SALOMEDS::StringSeq;
std::vector<std::string> v = dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_impl)->GetStrArray(theID);
- int length = v.size();
+ int length = (int)v.size(); //!< TODO: conversion from size_t to int
if(length) {
aSeq->length(length);
for(int i = 0; i<length; i++) aSeq[i] = CORBA::string_dup(v[i].c_str());
std::vector<std::string> A = dynamic_cast<SALOMEDSImpl_AttributeParameter*>(_impl)->GetIDs((Parameter_Types)theType);
if(A.size()) {
- int length = A.size();
+ int length = (int)A.size(); //!< TODO: conversion from size_t to int
CorbaSeq->length(length);
for (int i = 0; i < length; i++) CorbaSeq[i] = CORBA::string_dup(A[i].c_str());;
}
void SALOMEDS_AttributeSequenceOfInteger::Assign(const std::vector<int>& other)
{
- int i, aLength = other.size();
+ int i, aLength = (int)other.size(); //!< TODO: conversion from size_t to int
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
SALOMEDS::AttributeSequenceOfInteger_var aSeqAttr =
SALOMEDS::AttributeSequenceOfInteger::_narrow(_corba_impl);
aLength = aSeqAttr->Length();
- for (i = 1; i <=aLength; i++) aVector.push_back(aSeqAttr->Value(i));
+ for (i = 1; i <=aLength; i++) aVector.push_back(aSeqAttr->Value((CORBA::Short)i)); //!< TODO: conversion from int to CORBA::Short
}
return aVector;
}
SALOMEDS::Locker lock;
aValue = dynamic_cast<SALOMEDSImpl_AttributeSequenceOfInteger*>(_local_impl)->Value(index);
}
- else aValue = SALOMEDS::AttributeSequenceOfInteger::_narrow(_corba_impl)->Value(index);
+ else aValue = SALOMEDS::AttributeSequenceOfInteger::_narrow(_corba_impl)->Value((CORBA::Short)index); //!< TODO: conversion from int to CORBA::Short
return aValue;
}
SALOMEDS::Locker lock;
SALOMEDS::LongSeq_var CorbaSeq = new SALOMEDS::LongSeq;
const std::vector<int>& CasCadeSeq = dynamic_cast<SALOMEDSImpl_AttributeSequenceOfInteger*>(_impl)->Array();
- int len = CasCadeSeq.size();
+ int len = (int)CasCadeSeq.size(); //!< TODO: conversion from size_t to int
CorbaSeq->length(len);
for (int i = 0; i < len; i++) {
CorbaSeq[i] = CasCadeSeq[i];
void SALOMEDS_AttributeSequenceOfReal::Assign(const std::vector<double>& other)
{
- int i, aLength = other.size();
+ int i, aLength = (int)other.size(); //!< TODO: conversion from size_t to int
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
else {
SALOMEDS::AttributeSequenceOfReal_var aSeqAttr = SALOMEDS::AttributeSequenceOfReal::_narrow(_corba_impl);
aLength = aSeqAttr->Length();
- for (i = 1; i <=aLength; i++) aVector.push_back(aSeqAttr->Value(i));
+ for (i = 1; i <=aLength; i++) aVector.push_back(aSeqAttr->Value((CORBA::Short)i)); //!< TODO: conversion from int to CORBA::Short
}
return aVector;
}
SALOMEDS::Locker lock;
aValue = dynamic_cast<SALOMEDSImpl_AttributeSequenceOfReal*>(_local_impl)->Value(index);
}
- else aValue = SALOMEDS::AttributeSequenceOfReal::_narrow(_corba_impl)->Value(index);
+ else aValue = SALOMEDS::AttributeSequenceOfReal::_narrow(_corba_impl)->Value((CORBA::Short)index); //!< TODO: conversion from int to CORBA::Short
return aValue;
}
SALOMEDS::Locker lock;
CheckLocked();
std::vector<double> CasCadeSeq;
- for (int i = 0; i < other.length(); i++) {
- CasCadeSeq.push_back(other[i]);
+ for (size_t i = 0; i < other.length(); i++) {
+ CasCadeSeq.push_back(other[(_CORBA_ULong)i]); //!< TODO: conversion from size_t to _CORBA_ULong
}
dynamic_cast<SALOMEDSImpl_AttributeSequenceOfReal*>(_impl)->Assign(CasCadeSeq);
}
SALOMEDS::Locker lock;
SALOMEDS::DoubleSeq_var CorbaSeq = new SALOMEDS::DoubleSeq;
const std::vector<double>& CasCadeSeq = dynamic_cast<SALOMEDSImpl_AttributeSequenceOfReal*>(_impl)->Array();
- int len = CasCadeSeq.size();
+ int len = (int)CasCadeSeq.size(); //!< TODO: conversion from size_t to int
CorbaSeq->length(len);
for (int i = 0; i < len; i++) {
CorbaSeq[i] = CasCadeSeq[i];
std::vector<int> aMinutes, aHours, aDays, aMonths, aYears;
SALOMEDSImpl_AttributeStudyProperties* anImpl = dynamic_cast<SALOMEDSImpl_AttributeStudyProperties*>(_local_impl);
anImpl->GetModifications(aNames, aMinutes, aHours, aDays, aMonths, aYears);
- aLength = aNames.size();
+ aLength = (int)aNames.size(); //!< TODO: conversion from size_t to int
i = ((theWithCreator) ? 1 : 2);
for (; i <= aLength; i++) {
theNames.push_back(aNames[i-1]);
std::vector<int> aMinutes, aHours, aDays, aMonths, aYears;
SALOMEDSImpl_AttributeStudyProperties* aProp = dynamic_cast<SALOMEDSImpl_AttributeStudyProperties*>(_impl);
aProp->GetModifications(aNames, aMinutes, aHours, aDays, aMonths, aYears);
- int aLength = aNames.size();
+ int aLength = (int)aNames.size(); //!< TODO: conversion from size_t to int
int aRetLength = aLength - ((theWithCreator) ? 0 : 1);
theNames = new SALOMEDS::StringSeq;
theMinutes = new SALOMEDS::LongSeq;
SALOMEDS::Locker lock;
std::vector<std::string> components = dynamic_cast<SALOMEDSImpl_AttributeStudyProperties*>(_impl)->GetStoredComponents();
SALOMEDS::StringSeq_var c_components = new SALOMEDS::StringSeq();
- c_components->length(components.size());
+ c_components->length((_CORBA_ULong)components.size()); //!< TODO: conversion from size_t to _CORBA_ULong
for (int i = 0; i < components.size(); i++) {
c_components[i] = CORBA::string_dup(components[i].c_str());
}
SALOMEDS::Locker lock;
std::vector<std::string> versions = dynamic_cast<SALOMEDSImpl_AttributeStudyProperties*>(_impl)->GetComponentVersions(theComponent);
SALOMEDS::StringSeq_var c_versions = new SALOMEDS::StringSeq();
- c_versions->length(versions.size());
+ c_versions->length((_CORBA_ULong)versions.size()); //!< TODO: conversion from size_t to _CORBA_ULong
for (int i = 0; i < versions.size(); i++) {
c_versions[i] = CORBA::string_dup(versions[i].c_str());
}
void SALOMEDS_AttributeTableOfInteger::SetRowTitles(const std::vector<std::string>& theTitles)
{
- int aLength = theTitles.size(), i;
+ int aLength = (int)theTitles.size(), i; //!< TODO: conversion from size_t to int
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
void SALOMEDS_AttributeTableOfInteger::SetColumnTitles(const std::vector<std::string>& theTitles)
{
- int aLength = theTitles.size(), i;
+ int aLength = (int)theTitles.size(), i; //!< TODO: conversion from size_t to int
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
void SALOMEDS_AttributeTableOfInteger::SetRowUnits(const std::vector<std::string>& theUnits)
{
- int aLength = theUnits.size(), i;
+ int aLength = (int)theUnits.size(), i; //!< TODO: conversion from size_t to int
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
void SALOMEDS_AttributeTableOfInteger::AddRow(const std::vector<int>& theData)
{
- int aLength = theData.size(), i;
+ int aLength = (int)theData.size(), i; //!< TODO: conversion from size_t to int
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
void SALOMEDS_AttributeTableOfInteger::SetRow(int theRow, const std::vector<int>& theData)
{
- int aLength = theData.size(), i;
+ int aLength = (int)theData.size(), i; //!< TODO: conversion from size_t to int
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
void SALOMEDS_AttributeTableOfInteger::AddColumn(const std::vector<int>& theData)
{
- int aLength = theData.size(), i;
+ int aLength = (int)theData.size(), i; //!< TODO: conversion from size_t to int
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
void SALOMEDS_AttributeTableOfInteger::SetColumn(int theColumn, const std::vector<int>& theData)
{
- int aLength = theData.size(), i;
+ int aLength = (int)theData.size(), i; //!< TODO: conversion from size_t to int
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
CheckLocked();
SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_impl);
if (theTitles.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength();
- for (int i = 0; i < theTitles.length(); i++) {
+ for (int i = 0; i < (int)theTitles.length(); i++) {
SetRowTitle(i + 1, theTitles[i]);
}
}
SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_impl);
SALOMEDS::StringSeq_var aTitles = new SALOMEDS::StringSeq;
aTitles->length(aTable->GetNbRows());
- for(int i = 0; i < aTitles->length(); i++)
+ for(int i = 0; i < (int)aTitles->length(); i++)
aTitles[i] = CORBA::string_dup(aTable->GetRowTitle(i + 1).c_str());
return aTitles._retn();
}
CheckLocked();
SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_impl);
if (theTitles.length() != aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength();
- for (int i = 0; i < theTitles.length(); i++) {
+ for (int i = 0; i < (int)theTitles.length(); i++) {
aTable->SetColumnTitle(i + 1, (char*)theTitles[i].in());
}
}
SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_impl);
SALOMEDS::StringSeq_var aTitles = new SALOMEDS::StringSeq;
aTitles->length(aTable->GetNbColumns());
- for(int i = 0; i < aTitles->length(); i++)
+ for(int i = 0; i < (int)aTitles->length(); i++)
aTitles[i] = CORBA::string_dup(aTable->GetColumnTitle(i + 1).c_str());
return aTitles._retn();
}
CheckLocked();
SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_impl);
if (theUnits.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength();
- for (int i = 0; i < theUnits.length(); i++) {
+ for (int i = 0; i < (int)theUnits.length(); i++) {
aTable->SetRowUnit(i + 1, (char*)theUnits[i].in());
}
}
SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_impl);
SALOMEDS::StringSeq_var aUnits = new SALOMEDS::StringSeq;
aUnits->length(aTable->GetNbRows());
- for(int i = 0; i < aUnits->length(); i++)
+ for(int i = 0; i < (int)aUnits->length(); i++)
aUnits[i] = CORBA::string_dup(aTable->GetRowUnit(i + 1).c_str());
return aUnits._retn();
}
SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_impl);
std::vector<int> aRow;
- for (int i = 0; i < theData.length(); i++) aRow.push_back(theData[i]);
+ for (size_t i = 0; i < theData.length(); i++) aRow.push_back(theData[(_CORBA_ULong)i]); //!< TODO: conversion from size_t to _CORBA_ULong
try {
aTable->SetRowData(aTable->GetNbRows() + 1, aRow);
}
SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_impl);
std::vector<int> aRow;
- for (int i = 0; i < theData.length(); i++) aRow.push_back(theData[i]);
+ for (size_t i = 0; i < theData.length(); i++) aRow.push_back(theData[(_CORBA_ULong)i]); //!< TODO: conversion from size_t to _CORBA_ULong
try {
aTable->SetRowData(theRow, aRow);
}
SALOMEDS::LongSeq_var CorbaSeq = new SALOMEDS::LongSeq;
std::vector<int> aRow = aTable->GetRowData(theRow);
- CorbaSeq->length(aRow.size());
+ CorbaSeq->length((_CORBA_ULong)aRow.size()); //!< TODO: conversion from size_t to _CORBA_ULong
for (int i = 0; i < aRow.size(); i++) {
CorbaSeq[i] = aRow[i];
}
SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_impl);
std::vector<int> aColumn;
- for (int i = 0; i < theData.length(); i++) aColumn.push_back(theData[i]);
+ for (size_t i = 0; i < theData.length(); i++) aColumn.push_back(theData[(_CORBA_ULong)i]); //!< TODO: conversion from size_t to _CORBA_ULong
try {
aTable->SetColumnData(aTable->GetNbColumns() + 1, aColumn);
}
SALOMEDSImpl_AttributeTableOfInteger* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfInteger*>(_impl);
std::vector<int> aColumn;
- for (int i = 0; i < theData.length(); i++) aColumn.push_back(theData[i]);
+ for (size_t i = 0; i < theData.length(); i++) aColumn.push_back(theData[(_CORBA_ULong)i]); //!< TODO: conversion from size_t to _CORBA_ULong
try {
aTable->SetColumnData(theColumn, aColumn);
}
SALOMEDS::LongSeq_var CorbaSeq = new SALOMEDS::LongSeq;
std::vector<int> aColumn = aTable->GetColumnData(theColumn);
- CorbaSeq->length(aColumn.size());
+ CorbaSeq->length((_CORBA_ULong)aColumn.size()); //!< TODO: conversion from size_t to _CORBA_ULong
for (int i = 0; i < aColumn.size(); i++) {
CorbaSeq[i] = aColumn[i];
}
SALOMEDS::LongSeq_var CorbaSeq = new SALOMEDS::LongSeq;
std::vector<int> aSeq = aTable->GetSetRowIndices(theRow);
- CorbaSeq->length(aSeq.size());
+ CorbaSeq->length((_CORBA_ULong)aSeq.size()); //!< TODO: conversion from size_t to _CORBA_ULong
for (int i = 0; i < aSeq.size(); i++) {
CorbaSeq[i] = aSeq[i];
}
std::string aString = aTable->Save();
char* aBuffer = (char*)CORBA::string_dup(aString.c_str());
- int aBufferSize = strlen((char*)aBuffer);
+ int aBufferSize = (int)strlen((char*)aBuffer); //!< TODO: conversion from size_t to int
CORBA::Octet* anOctetBuf = (CORBA::Octet*)aBuffer;
catch(...) {
throw SALOMEDS::AttributeTable::IncorrectIndex();
}
- CorbaSeq->length(aSeq.size());
+ CorbaSeq->length((_CORBA_ULong)aSeq.size()); //!< TODO: conversion from size_t to _CORBA_ULong
for (int i = 0; i < aSeq.size(); i++) {
CorbaSeq[i] = aSeq[i];
}
catch(...) {
throw SALOMEDS::AttributeTable::IncorrectIndex();
}
- CorbaSeq->length(aSeq.size());
+ CorbaSeq->length((_CORBA_ULong)aSeq.size()); //!< TODO: conversion from size_t to _CORBA_ULong
for (int i = 0; i < aSeq.size(); i++) {
CorbaSeq[i] = aSeq[i];
}
catch(...) {
throw SALOMEDS::AttributeTable::IncorrectIndex();
}
- CorbaSeq->length(aSeq.size());
+ CorbaSeq->length((_CORBA_ULong)aSeq.size()); //!< TODO: conversion from size_t to _CORBA_ULong
for (int i = 0; i < aSeq.size(); i++) {
CorbaSeq[i] = aSeq[i];
}
catch(...) {
throw SALOMEDS::AttributeTable::IncorrectIndex();
}
- CorbaSeq->length(aSeq.size());
+ CorbaSeq->length((_CORBA_ULong)aSeq.size()); //!< TODO: conversion from size_t to _CORBA_ULong
for (int i = 0; i < aSeq.size(); i++) {
CorbaSeq[i] = aSeq[i];
}
void SALOMEDS_AttributeTableOfReal::SetRowTitles(const std::vector<std::string>& theTitles)
{
CheckLocked();
- int aLength = theTitles.size(), i;
+ int aLength = (int)theTitles.size(), i; //!< TODO: conversion from size_t to int
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
void SALOMEDS_AttributeTableOfReal::SetColumnTitles(const std::vector<std::string>& theTitles)
{
- int aLength = theTitles.size(), i;
+ int aLength = (int)theTitles.size(), i; //!< TODO: conversion from size_t to int
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
void SALOMEDS_AttributeTableOfReal::SetRowUnits(const std::vector<std::string>& theUnits)
{
- int aLength = theUnits.size(), i;
+ int aLength = (int)theUnits.size(), i; //!< TODO: conversion from size_t to int
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
void SALOMEDS_AttributeTableOfReal::AddRow(const std::vector<double>& theData)
{
- int aLength = theData.size(), i;
+ int aLength = (int)theData.size(), i; //!< TODO: conversion from size_t to int
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
void SALOMEDS_AttributeTableOfReal::SetRow(int theRow, const std::vector<double>& theData)
{
- int aLength = theData.size(), i;
+ int aLength = (int)theData.size(), i; //!< TODO: conversion from size_t to int
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
void SALOMEDS_AttributeTableOfReal::AddColumn(const std::vector<double>& theData)
{
- int aLength = theData.size(), i;
+ int aLength = (int)theData.size(), i; //!< TODO: conversion from size_t to int
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
void SALOMEDS_AttributeTableOfReal::SetColumn(int theColumn, const std::vector<double>& theData)
{
- int aLength = theData.size(), i;
+ int aLength = (int)theData.size(), i; //!< TODO: conversion from size_t to int
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
CheckLocked();
SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_impl);
if (theTitles.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength();
- for (int i = 0; i < theTitles.length(); i++) {
+ for (int i = 0; i < (int)theTitles.length(); i++) {
aTable->SetRowTitle(i + 1, (char*)theTitles[i].in());
}
}
SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_impl);
SALOMEDS::StringSeq_var aTitles = new SALOMEDS::StringSeq;
aTitles->length(aTable->GetNbRows());
- for(int i = 0; i < aTitles->length(); i++)
+ for(int i = 0; i < (int)aTitles->length(); i++)
aTitles[i] = CORBA::string_dup(aTable->GetRowTitle(i + 1).c_str());
return aTitles._retn();
}
CheckLocked();
SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_impl);
if (theTitles.length() != aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength();
- for (int i = 0; i < theTitles.length(); i++) {
+ for (int i = 0; i < (int)theTitles.length(); i++) {
aTable->SetColumnTitle(i + 1, (char*)theTitles[i].in());
}
}
SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_impl);
SALOMEDS::StringSeq_var aTitles = new SALOMEDS::StringSeq;
aTitles->length(aTable->GetNbColumns());
- for(int i = 0; i < aTitles->length(); i++)
+ for(int i = 0; i < (int)aTitles->length(); i++)
aTitles[i] = CORBA::string_dup(aTable->GetColumnTitle(i + 1).c_str());
return aTitles._retn();
}
CheckLocked();
SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_impl);
if (theUnits.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength();
- for (int i = 0; i < theUnits.length(); i++) {
+ for (int i = 0; i < (int)theUnits.length(); i++) {
aTable->SetRowUnit(i + 1, (char*)theUnits[i].in());
}
}
SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_impl);
SALOMEDS::StringSeq_var aUnits = new SALOMEDS::StringSeq;
aUnits->length(aTable->GetNbRows());
- for(int i = 0; i < aUnits->length(); i++)
+ for(int i = 0; i < (int)aUnits->length(); i++)
aUnits[i] = CORBA::string_dup(aTable->GetRowUnit(i + 1).c_str());
return aUnits._retn();
}
SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_impl);
std::vector<double> aRow;
- for (int i = 0; i < theData.length(); i++) aRow.push_back(theData[i]);
+ for (size_t i = 0; i < theData.length(); i++) aRow.push_back(theData[(_CORBA_ULong)i]); //!< TODO: conversion from size_t to _CORBA_ULong
aTable->SetRowData(aTable->GetNbRows() + 1, aRow);
}
SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_impl);
std::vector<double> aRow;
- for (int i = 0; i < theData.length(); i++) aRow.push_back(theData[i]);
+ for (size_t i = 0; i < theData.length(); i++) aRow.push_back(theData[(_CORBA_ULong)i]); //!< TODO: conversion from size_t to _CORBA_ULong
aTable->SetRowData(theRow, aRow);
}
SALOMEDS::DoubleSeq_var CorbaSeq = new SALOMEDS::DoubleSeq;
std::vector<double> aRow = aTable->GetRowData(theRow);
- CorbaSeq->length(aRow.size());
+ CorbaSeq->length((_CORBA_ULong)aRow.size()); //!< TODO: conversion from size_t to _CORBA_ULong
for (int i = 0; i < aRow.size(); i++) {
CorbaSeq[i] = aRow[i];
}
SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_impl);
std::vector<double> aColumn;
- for (int i = 0; i < theData.length(); i++) aColumn.push_back(theData[i]);
+ for (size_t i = 0; i < theData.length(); i++) aColumn.push_back(theData[(_CORBA_ULong)i]); //!< TODO: conversion from size_t to _CORBA_ULong
aTable->SetColumnData(aTable->GetNbColumns() + 1, aColumn);
}
SALOMEDSImpl_AttributeTableOfReal* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfReal*>(_impl);
std::vector<double> aColumn;
- for (int i = 0; i < theData.length(); i++) aColumn.push_back(theData[i]);
+ for (size_t i = 0; i < theData.length(); i++) aColumn.push_back(theData[(_CORBA_ULong)i]); //!< TODO: conversion from size_t to _CORBA_ULong
aTable->SetColumnData(theColumn, aColumn);
}
SALOMEDS::DoubleSeq_var CorbaSeq = new SALOMEDS::DoubleSeq;
std::vector<double> aColumn = aTable->GetColumnData(theColumn);
- CorbaSeq->length(aColumn.size());
+ CorbaSeq->length((_CORBA_ULong)aColumn.size()); //!< TODO: conversion from size_t to _CORBA_ULong
for (int i = 0; i < aColumn.size(); i++) {
CorbaSeq[i] = aColumn[i];
}
SALOMEDS::LongSeq_var CorbaSeq = new SALOMEDS::LongSeq;
std::vector<int> aSeq = aTable->GetSetRowIndices(theRow);
- int len = aSeq.size();
+ int len = (int)aSeq.size(); //!< TODO: conversion from size_t to int
CorbaSeq->length(len);
for (int i = 0; i < len; i++) {
CorbaSeq[i] = aSeq[i];
std::string aString = aTable->Save();
char* aBuffer = (char*)CORBA::string_dup(aString.c_str());
- int aBufferSize = strlen((char*)aBuffer);
+ int aBufferSize = (int)strlen((char*)aBuffer); //!< TODO: conversion from size_t to int
CORBA::Octet* anOctetBuf = (CORBA::Octet*)aBuffer;
catch(...) {
throw SALOMEDS::AttributeTable::IncorrectIndex();
}
- CorbaSeq->length(aSeq.size());
+ CorbaSeq->length((_CORBA_ULong)aSeq.size()); //!< TODO: conversion from size_t to _CORBA_ULong
for (int i = 0; i < aSeq.size(); i++) {
CorbaSeq[i] = aSeq[i];
}
catch(...) {
throw SALOMEDS::AttributeTable::IncorrectIndex();
}
- CorbaSeq->length(aSeq.size());
+ CorbaSeq->length((_CORBA_ULong)aSeq.size()); //!< TODO: conversion from size_t to _CORBA_ULong
for (int i = 0; i < aSeq.size(); i++) {
CorbaSeq[i] = aSeq[i];
}
catch(...) {
throw SALOMEDS::AttributeTable::IncorrectIndex();
}
- CorbaSeq->length(aSeq.size());
+ CorbaSeq->length((_CORBA_ULong)aSeq.size()); //!< TODO: conversion from size_t to _CORBA_ULong
for (int i = 0; i < aSeq.size(); i++) {
CorbaSeq[i] = aSeq[i];
}
catch(...) {
throw SALOMEDS::AttributeTable::IncorrectIndex();
}
- CorbaSeq->length(aSeq.size());
+ CorbaSeq->length((_CORBA_ULong)aSeq.size()); //!< TODO: conversion from size_t to _CORBA_ULong
for (int i = 0; i < aSeq.size(); i++) {
CorbaSeq[i] = aSeq[i];
}
void SALOMEDS_AttributeTableOfString::SetRowTitles(const std::vector<std::string>& theTitles)
{
- int aLength = theTitles.size(), i;
+ int aLength = (int)theTitles.size(), i; //!< TODO: conversion from size_t to int
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
void SALOMEDS_AttributeTableOfString::SetColumnTitles(const std::vector<std::string>& theTitles)
{
- int aLength = theTitles.size(), i;
+ int aLength = (int)theTitles.size(), i; //!< TODO: conversion from size_t to int
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
void SALOMEDS_AttributeTableOfString::SetRowUnits(const std::vector<std::string>& theUnits)
{
- int aLength = theUnits.size(), i;
+ int aLength = (int)theUnits.size(), i; //!< TODO: conversion from size_t to int
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
void SALOMEDS_AttributeTableOfString::AddRow(const std::vector<std::string>& theData)
{
- int aLength = theData.size(), i;
+ int aLength = (int)theData.size(), i; //!< TODO: conversion from size_t to int
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
void SALOMEDS_AttributeTableOfString::SetRow(int theRow, const std::vector<std::string>& theData)
{
- int aLength = theData.size(), i;
+ int aLength = (int)theData.size(), i; //!< TODO: conversion from size_t to int
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
void SALOMEDS_AttributeTableOfString::AddColumn(const std::vector<std::string>& theData)
{
- int aLength = theData.size(), i;
+ int aLength = (int)theData.size(), i; //!< TODO: conversion from size_t to int
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
void SALOMEDS_AttributeTableOfString::SetColumn(int theColumn, const std::vector<std::string>& theData)
{
- int aLength = theData.size(), i;
+ int aLength = (int)theData.size(), i; //!< TODO: conversion from size_t to int
if (_isLocal) {
CheckLocked();
SALOMEDS::Locker lock;
CheckLocked();
SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_impl);
if (theTitles.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength();
- for (int i = 0; i < theTitles.length(); i++) {
+ for (int i = 0; i < (int)theTitles.length(); i++) {
aTable->SetRowTitle(i + 1, std::string((char*)theTitles[i].in()));
}
}
SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_impl);
SALOMEDS::StringSeq_var aTitles = new SALOMEDS::StringSeq;
aTitles->length(aTable->GetNbRows());
- for(int i = 0; i < aTitles->length(); i++)
+ for(int i = 0; i < (int)aTitles->length(); i++)
aTitles[i] =CORBA::string_dup(aTable->GetRowTitle(i + 1).c_str());
return aTitles._retn();
}
CheckLocked();
SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_impl);
if (theTitles.length() != aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength();
- for (int i = 0; i < theTitles.length(); i++) {
+ for (int i = 0; i < (int)theTitles.length(); i++) {
aTable->SetColumnTitle(i + 1, std::string((char*)theTitles[i].in()));
}
}
SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_impl);
SALOMEDS::StringSeq_var aTitles = new SALOMEDS::StringSeq;
aTitles->length(aTable->GetNbColumns());
- for(int i = 0; i < aTitles->length(); i++)
+ for(int i = 0; i < (int)aTitles->length(); i++)
aTitles[i] = CORBA::string_dup(aTable->GetColumnTitle(i + 1).c_str());
return aTitles._retn();
}
CheckLocked();
SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_impl);
if (theUnits.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength();
- for (int i = 0; i < theUnits.length(); i++) {
+ for (int i = 0; i < (int)theUnits.length(); i++) {
aTable->SetRowUnit(i + 1, std::string((char*)theUnits[i].in()));
}
}
SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_impl);
SALOMEDS::StringSeq_var aUnits = new SALOMEDS::StringSeq;
aUnits->length(aTable->GetNbRows());
- for(int i = 0; i < aUnits->length(); i++)
+ for(int i = 0; i < (int)aUnits->length(); i++)
aUnits[i] = CORBA::string_dup(aTable->GetRowUnit(i + 1).c_str());
return aUnits._retn();
}
SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_impl);
std::vector<std::string> aRow;
- for (int i = 0; i < theData.length(); i++) aRow.push_back(std::string(CORBA::string_dup(theData[i])));
+ for (size_t i = 0; i < theData.length(); i++) aRow.push_back(std::string(CORBA::string_dup(theData[(_CORBA_ULong)i]))); //!< TODO: conversion from size_t to _CORBA_ULong
aTable->SetRowData(aTable->GetNbRows() + 1, aRow);
}
SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_impl);
std::vector<std::string> aRow;
- for (int i = 0; i < theData.length(); i++) aRow.push_back(std::string(CORBA::string_dup(theData[i].in())));
+ for (size_t i = 0; i < theData.length(); i++) aRow.push_back(std::string(CORBA::string_dup(theData[(_CORBA_ULong)i].in()))); //!< TODO: conversion from size_t to _CORBA_ULong
aTable->SetRowData(theRow, aRow);
}
SALOMEDS::StringSeq_var CorbaSeq = new SALOMEDS::StringSeq;
std::vector<std::string> aRow = aTable->GetRowData(theRow);
- CorbaSeq->length(aRow.size());
+ CorbaSeq->length((_CORBA_ULong)aRow.size()); //!< TODO: conversion from size_t to _CORBA_ULong
for (int i = 0; i < aRow.size(); i++) {
CorbaSeq[i] = CORBA::string_dup(aRow[i].c_str());
}
SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_impl);
std::vector<std::string> aColumn;
- for (int i = 0; i < theData.length(); i++) aColumn.push_back(std::string(CORBA::string_dup(theData[i])));
+ for (size_t i = 0; i < theData.length(); i++) aColumn.push_back(std::string(CORBA::string_dup(theData[(_CORBA_ULong)i]))); //!< TODO: conversion from size_t to _CORBA_ULong
aTable->SetColumnData(aTable->GetNbColumns() + 1, aColumn);
}
SALOMEDSImpl_AttributeTableOfString* aTable = dynamic_cast<SALOMEDSImpl_AttributeTableOfString*>(_impl);
std::vector<std::string> aColumn;
- for (int i = 0; i < theData.length(); i++) aColumn.push_back(std::string(CORBA::string_dup(theData[i])));
+ for (size_t i = 0; i < theData.length(); i++) aColumn.push_back(std::string(CORBA::string_dup(theData[(_CORBA_ULong)i]))); //!< TODO: conversion from size_t to _CORBA_ULong
aTable->SetColumnData(theColumn, aColumn);
}
SALOMEDS::StringSeq_var CorbaSeq = new SALOMEDS::StringSeq;
std::vector<std::string> aColumn = aTable->GetColumnData(theColumn);
- CorbaSeq->length(aColumn.size());
+ CorbaSeq->length((_CORBA_ULong)aColumn.size()); //!< TODO: conversion from size_t to _CORBA_ULong
for (int i = 0; i < aColumn.size(); i++) {
CorbaSeq[i] = CORBA::string_dup(aColumn[i].c_str());
}
SALOMEDS::LongSeq_var CorbaSeq = new SALOMEDS::LongSeq;
std::vector<int> aSeq = aTable->GetSetRowIndices(theRow);
- CorbaSeq->length(aSeq.size());
+ CorbaSeq->length((_CORBA_ULong)aSeq.size()); //!< TODO: conversion from size_t to _CORBA_ULong
for (int i = 0; i < aSeq.size(); i++) {
CorbaSeq[i] = aSeq[i];
}
std::string aString = aTable->Save();
char* aBuffer = (char*)CORBA::string_dup(aString.c_str());
- int aBufferSize = strlen((char*)aBuffer);
+ int aBufferSize = (int)strlen((char*)aBuffer); //!< TODO: conversion from size_t to int
CORBA::Octet* anOctetBuf = (CORBA::Octet*)aBuffer;
catch(...) {
throw SALOMEDS::AttributeTable::IncorrectIndex();
}
- CorbaSeq->length(aSeq.size());
+ CorbaSeq->length((_CORBA_ULong)aSeq.size()); //!< TODO: conversion from size_t to _CORBA_ULong
for (int i = 0; i < aSeq.size(); i++) {
CorbaSeq[i] = aSeq[i];
}
catch(...) {
throw SALOMEDS::AttributeTable::IncorrectIndex();
}
- CorbaSeq->length(aSeq.size());
+ CorbaSeq->length((_CORBA_ULong)aSeq.size()); //!< TODO: conversion from size_t to _CORBA_ULong
for (int i = 0; i < aSeq.size(); i++) {
CorbaSeq[i] = aSeq[i];
}
catch(...) {
throw SALOMEDS::AttributeTable::IncorrectIndex();
}
- CorbaSeq->length(aSeq.size());
+ CorbaSeq->length((_CORBA_ULong)aSeq.size()); //!< TODO: conversion from size_t to _CORBA_ULong
for (int i = 0; i < aSeq.size(); i++) {
CorbaSeq[i] = aSeq[i];
}
catch(...) {
throw SALOMEDS::AttributeTable::IncorrectIndex();
}
- CorbaSeq->length(aSeq.size());
+ CorbaSeq->length((_CORBA_ULong)aSeq.size()); //!< TODO: conversion from size_t to _CORBA_ULong
for (int i = 0; i < aSeq.size(); i++) {
CorbaSeq[i] = aSeq[i];
}
if (_isLocal) {
SALOMEDS::Locker lock;
std::vector<SALOMEDSImpl_SObject> aSeq = dynamic_cast<SALOMEDSImpl_AttributeTarget*>(_local_impl)->Get();
- aLength = aSeq.size();
+ aLength = (int)aSeq.size(); //!< TODO: conversion from size_t to int
for (i = 0; i < aLength; i++) {
aSO = new SALOMEDS_SObject(aSeq[i]);
aVector.push_back(_PTR(SObject)(aSO));
SALOMEDS::Locker lock;
std::vector<SALOMEDSImpl_SObject> aSeq = dynamic_cast<SALOMEDSImpl_AttributeTarget*>(_impl)->Get();
SALOMEDS::Study::ListOfSObject_var aSList = new SALOMEDS::Study::ListOfSObject;
- int aLength = aSeq.size(), i;
+ int aLength = (int)aSeq.size(), i; //!< TODO: conversion from size_t to int
if (aLength == 0) return aSList._retn();
aSList->length(aLength);
for(i=0; i <aLength; i++) {
catch(CORBA::Exception&) {
MESSAGE( "Caught CORBA::Exception." )
}
- catch(omniORB::fatalException& fe) {
+ catch(omniORB::fatalException& /*fe*/) { //!< TODO: unused variable
MESSAGE( "Caught omniORB::fatalException:" )
MESSAGE( " file: " << fe.file() )
MESSAGE( " line: " << fe.line() )
aStream = _driver->Save(sco.in(), url, isMultiFile);
SALOMEDSImpl_TMPFile* aTMPFile = new SALOMEDS_TMPFile_i(aStream._retn());
- theStreamLength = aTMPFile->Size();
+ theStreamLength = (long)aTMPFile->Size(); //!< TODO: conversion from size_t to long
sco->UnRegister();
SALOMEDS::lock();
aStream = _driver->SaveASCII(sco.in(), url, isMultiFile);
SALOMEDSImpl_TMPFile* aTMPFile = new SALOMEDS_TMPFile_i(aStream._retn());
- theStreamLength = aTMPFile->Size();
+ theStreamLength = (long)aTMPFile->Size(); //!< TODO: conversion from size_t to long
sco->UnRegister();
SALOMEDS::lock();
aStream = _driver->CopyFrom(so.in(), anObjectID);
SALOMEDSImpl_TMPFile* aTMPFile = new SALOMEDS_TMPFile_i(aStream._retn());
- theStreamLength = aTMPFile->Size();
+ theStreamLength = (long)aTMPFile->Size(); //!< TODO: conversion from size_t to long
theObjectID = anObjectID;
so->UnRegister();
aStream = _engine->DumpPython(isPublished, isMultiFile, aValidScript);
SALOMEDSImpl_TMPFile* aTMPFile = new Engines_TMPFile_i(aStream._retn());
- theStreamLength = aTMPFile->Size();
+ theStreamLength = (long)aTMPFile->Size(); //!< TODO: conversion from size_t to long
isValidScript = aValidScript;
SALOMEDS::lock();
v = _ap->GetStrArray(listName);
v.push_back(value);
_ap->SetStrArray(listName, v);
- return (v.size()-1);
+ return (int)(v.size()-1); //!< TODO: conversion from size_t to int
}
int SALOMEDS_IParameters::nbValues(const std::string& listName)
if(!_ap) return -1;
if(!_ap->IsSet(listName, PT_STRARRAY)) return 0;
std::vector<std::string> v = _ap->GetStrArray(listName);
- return v.size();
+ return (int)v.size(); //!< TODO: conversion from size_t to int
}
std::vector<std::string> SALOMEDS_IParameters::getValues(const std::string& listName)
if(!_ap) return "";
if(!_ap->IsSet(entry, PT_STRARRAY)) return "";
std::vector<std::string> v = _ap->GetStrArray(entry);
- int length = v.size();
+ int length = (int)v.size(); //!< TODO: conversion from size_t to int
for(int i = 0; i<length; i+=1) {
if(v[i] == parameterName) return v[i+1];
}
if(!_ap) return v;
if(!_ap->IsSet(entry, PT_STRARRAY)) return v;
v = _ap->GetStrArray(entry);
- int length = v.size();
+ int length = (int)v.size(); //!< TODO: conversion from size_t to int
for(int i = 0; i<length; i+=2) {
names.push_back(v[i]);
}
if(!_ap) return "";
if(!_ap->IsSet(entry, PT_STRARRAY)) return "";
std::vector<std::string> v = _ap->GetStrArray(entry);
- int length = v.size();
+ int length = (int)v.size(); //!< TODO: conversion from size_t to int
for(int i = 0; i<length; i+=1) {
if(v[i] == _PT_ID_) return v[i+1];
}
if(!_ap) return v;
if(!_ap->IsSet(entry, PT_STRARRAY)) return v;
v = _ap->GetStrArray(entry);
- int length = v.size();
+ int length = (int)v.size(); //!< TODO: conversion from size_t to int
for(int i = 1; i<length; i+=2) {
values.push_back(v[i]);
}
{
if(!_ap) return -1;
if(!_ap->IsSet(entry, PT_STRARRAY)) return -1;
- return _ap->GetStrArray(entry).size()/2;
+ return (int)(_ap->GetStrArray(entry).size()/2); //!< TODO: conversion from size_t to int
}
std::vector<std::string> SALOMEDS_IParameters::getEntries()
std::string val(value);
std::vector<std::string> v;
int pos;
- if(fromEnd) pos = val.rfind(separator);
- else pos = val.find(separator);
+ if(fromEnd) pos = (int)val.rfind(separator); //!< TODO: conversion from size_t to int
+ else pos = (int)val.find(separator); //!< TODO: conversion from size_t to int
if(pos < 0) {
v.push_back(value);
std::string SALOMEDS_IParameters::decodeEntry(const std::string& entry)
{
- int pos = entry.rfind("_");
+ int pos = (int)entry.rfind("_"); //!< TODO: conversion from size_t to int
if(pos < 0 || pos >= entry.length()) return entry;
std::string compName(entry, 0, pos), compID, tail(entry, pos+1, entry.length()-1);
if (_isLocal) {
SALOMEDS::Locker lock;
std::vector<DF_Attribute*> aSeq = _local_impl->GetAllAttributes();
- aLength = aSeq.size();
+ aLength = (int)aSeq.size(); //!< TODO: conversion from size_t to int
for (int i = 0; i < aLength; i++) {
anAttr = SALOMEDS_GenericAttribute::CreateAttribute(dynamic_cast<SALOMEDSImpl_GenericAttribute*>(aSeq[i]));
aVector.push_back(_PTR(GenericAttribute)(anAttr));
SALOMEDS::Locker lock;
std::vector<DF_Attribute*> aSeq = _impl->GetAllAttributes();
SALOMEDS::ListOfAttributes_var SeqOfAttr = new SALOMEDS::ListOfAttributes;
- int length = aSeq.size();
+ int length = (int)aSeq.size(); //!< TODO: conversion from size_t to int
SeqOfAttr->length(length);
CORBA::Short SALOMEDS_SObject_i::Tag()
{
SALOMEDS::Locker lock;
- return _impl->Tag();
+ return (CORBA::Short)_impl->Tag(); //!< TODO: conversion from int to CORBA::Short
}
//============================================================================
CORBA::Short SALOMEDS_SObject_i::Depth()
{
SALOMEDS::Locker lock;
- return _impl->Depth();
+ return (CORBA::Short)_impl->Depth(); //!< TODO: conversion from int to CORBA::Short
}
//============================================================================
SALOMEDS::Locker lock;
std::vector<SALOMEDSImpl_SObject> aSeq = _local_impl->FindObjectByName(anObjectName, aComponentName);
- aLength = aSeq.size();
+ aLength = (int)aSeq.size(); //!< TODO: conversion from size_t to int
for (i = 0; i< aLength; i++)
aVector.push_back(_PTR(SObject)(new SALOMEDS_SObject(aSeq[i])));
}
std::vector<SALOMEDSImpl_SObject> aSeq = _local_impl->FindDependances(*(aSO->GetLocalImpl()));
if (aSeq.size()) {
- aLength = aSeq.size();
+ aLength = (int)aSeq.size(); //!< TODO: conversion from size_t to int
for (i = 0; i < aLength; i++)
aVector.push_back(_PTR(SObject)(new SALOMEDS_SObject(aSeq[i])));
}
std::string((char*)aComponentName));
SALOMEDS::Study::ListOfSObject_var listSO = new SALOMEDS::Study::ListOfSObject;
- int aLength = aSeq.size();
+ int aLength = (int)aSeq.size(); //!< TODO: conversion from size_t to int
listSO->length(aLength);
for (int i = 0; i < aLength; i++) {
SALOMEDS::SObject_var so = SALOMEDS_SObject_i::New(aSeq[i], _orb);
std::vector<std::string> aSeq = _impl->GetModificationsDate();
- int aLength = aSeq.size();
+ int aLength = (int)aSeq.size(); //!< TODO: conversion from size_t to int
aDates->length(aLength);
for (int anIndex = 0; anIndex < aLength; anIndex++) {
aDates[anIndex] = CORBA::string_dup(aSeq[anIndex].c_str());
std::vector<std::string> aSeq = _impl->GetLockerID();
- int aLength = aSeq.size();
+ int aLength = (int)aSeq.size(); //!< TODO: conversion from size_t to int
aResult->length(aLength);
for(int anIndex = 0; anIndex < aLength; anIndex++) {
aResult[anIndex] = CORBA::string_dup(aSeq[anIndex].c_str());
std::vector<std::string> aVarNames = _impl->GetVariableNames();
- int aLen = aVarNames.size();
+ int aLen = (int)aVarNames.size(); //!< TODO: conversion from size_t to int
aResult->length(aLen);
for (int anInd = 0; anInd < aLen; anInd++)
aResult[anInd] = CORBA::string_dup(aVarNames[anInd].c_str());
std::vector< std::vector<std::string> > aSections = _impl->ParseVariables(std::string(theVarName));
- int aSectionsLen = aSections.size();
+ int aSectionsLen = (int)aSections.size(); //!< TODO: conversion from size_t to int
aResult->length(aSectionsLen);
for (int aSectionInd = 0; aSectionInd < aSectionsLen; aSectionInd++) {
SALOMEDS::ListOfStrings_var aList = new SALOMEDS::ListOfStrings;
- int aLen = aVarNames.size();
+ int aLen = (int)aVarNames.size(); //!< TODO: conversion from size_t to int
aList->length(aLen);
for (int anInd = 0; anInd < aLen; anInd++)
if(theIndex < 0 || theIndex >= myStream->length())
throw std::out_of_range("SALOMEDS_TMPFile_i::Get(size_t) const - theIndex < 0 || theIndex >= myStream->length()");
- return myStream[theIndex];
+ return myStream[(_CORBA_ULong)theIndex]; //!< TODO: conversion from size_t to _CORBA_ULong
}
if(theIndex < 0 || theIndex >= myStream->length())
throw std::out_of_range("Engines_TMPFile_i::Get(size_t) const - theIndex < 0 || theIndex >= myStream->length()");
- return myStream[theIndex];
+ return myStream[(_CORBA_ULong)theIndex]; //!< TODO: conversion from size_t to _CROBA_ULong
}
void SALOMEDSImpl_AttributeGraphic::SetVisibility(const int theViewId,
const bool theValue )
{
- if ( myVisibility.find( theViewId ) != myVisibility.end() && myVisibility[theViewId] == theValue )
+ if ( myVisibility.find( theViewId ) != myVisibility.end() && ((bool)myVisibility[theViewId] == theValue) ) //!< TODO: comparing int and bool variables
return;
Backup();
// of the character (2 characters)
std::string convertString(const std::string& S)
{
- int length = S.size();
+ size_t length = S.size();
if ( length == 0 )
return "0";
char c[3], *buffer = new char[length*3+1];
//Restors a string converted by the function convertString
std::string restoreString(const std::string& S)
{
- int length = S.size();
+ size_t length = S.size();
if ( length == 1 )
return "";
char c[3], *buffer = new char[length/3+1];
int SALOMEDSImpl_AttributePythonObject::GetLength() const
{
- return mySequence.size();
+ return (int)mySequence.size(); //!< TODO: conversion from size_t to int
}
const std::string& SALOMEDSImpl_AttributePythonObject::ID() const
(int)(aMonths[anIndex]),
(int)(aYears[anIndex]),
(char*)(aNames[anIndex].c_str()));
- a = strlen(aProperty);
+ a = (int)strlen(aProperty); //!< TODO: conversion from size_t to int
aProperty[a++] = 1;
}
//Write units if need
if(units.size() > 0) {
sprintf(&(aProperty[a]),"%s",units.c_str());
- a = strlen(aProperty);
+ a = (int)strlen(aProperty); //!< TODO: conversion from size_t to int
}
aProperty[a++] = 1; //delimiter of the units and comments
//Write comments if need
if(comment.size() > 0) {
sprintf(&(aProperty[a]),"%s",comment.c_str());
- a = strlen(aProperty);
+ a = (int)strlen(aProperty); //!< TODO: conversion from size_t to int
}
aProperty[a++] = 30; //delimiter of the component versions
sprintf(&(aProperty[a]),"%s=%s",
(char*)(versionsIt->first.c_str()),
(char*)(versionsIt->second.c_str()));
- a = strlen(aProperty);
+ a = (int)strlen(aProperty); //!< TODO: conversion from size_t to int
aProperty[a++] = 1;
}
aVersions[verSize] = 0;
std::string mVersions = aVersions;
- int start = 0, idx = mVersions.find( ';', start );
+ int start = 0, idx = (int)mVersions.find( ';', start ); //!< TODO: conversion from size_t to int
while ( idx != std::string::npos ) {
SetComponentVersion( aModule, mVersions.substr( start, idx-start ) );
start = idx + 1;
- idx = mVersions.find( ';', start );
+ idx = (int)mVersions.find( ';', start ); //!< TODO: conversion from size_t to int
}
SetComponentVersion( aModule, mVersions.substr( start ) );
size_t i, aShift = (theRow-1)*myNbColumns, aLength = theData.size();
for(i = 1; i <= aLength; i++) {
- myTable[aShift + i] = theData[i-1];
+ myTable[(int)(aShift + i)] = theData[i-1]; //!< TODO: conversion from size_t to int
}
if(theRow > myNbRows) myNbRows = theRow;
{
if (theUnits.size() != GetNbRows()) throw DFexception("Invalid number of rows");
size_t aLength = theUnits.size(), i;
- for(i = 1; i <= aLength; i++) SetRowUnit(i, theUnits[i-1]);
+ for(i = 1; i <= aLength; i++) SetRowUnit((int)i, theUnits[i-1]); //!< TODO: conversion from size_t to int
SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved
}
{
if (theTitles.size() != GetNbRows()) throw DFexception("Invalid number of rows");
size_t aLength = theTitles.size(), i;
- for(i = 1; i <= aLength; i++) SetRowTitle(i, theTitles[i-1]);
+ for(i = 1; i <= aLength; i++) SetRowTitle((int)i, theTitles[i-1]); //!< TODO: conversion from size_t to int
SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved
}
size_t i, aLength = theData.size();
for(i = 1; i <= aLength; i++) {
- myTable[myNbColumns*(i-1)+theColumn] = theData[i-1];
+ myTable[myNbColumns*((int)i-1)+theColumn] = theData[i-1]; //!< TODO: conversion from size_t to int
}
if(aLength > myNbRows) {
- myNbRows = aLength;
+ myNbRows = (int)aLength; //!< TODO: conversion from size_t to int
while (myRows.size() < myNbRows) { // append empty row titles
myRows.push_back(std::string(""));
}
//Title
l = myTitle.size();
- sprintf(buffer, "%d\n", l);
+ sprintf(buffer, "%Iu\n", l);
aString+=buffer;
for(i=0; i<l; i++) {
aString += myTitle[i];
//Row titles
for(i=0; i<myNbRows; i++) {
l = myRows[i].size();
- sprintf(buffer, "%d\n", l);
+ sprintf(buffer, "%Iu\n", l);
aString+=buffer;
for(j=0; j<l; j++) {
aString += myRows[i][j];
//Columns titles
for(i=0; i<myNbColumns; i++) {
l = myCols[i].size();
- sprintf(buffer, "%d\n", l);
+ sprintf(buffer, "%Iu\n", l);
aString+=buffer;
for(j=0; j<l; j++) {
aString += myCols[i][j];
//Store the table values
l = myTable.size();
- sprintf(buffer, "%d\n", l);
+ sprintf(buffer, "%Iu\n", l);
aString+=buffer;
for(MI p = myTable.begin(); p != myTable.end(); p++) {
sprintf(buffer, "%d\n%d\n", p->first, p->second);
size_t i, aShift = (theRow-1)*myNbColumns, aLength = theData.size();
for(i = 1; i <= aLength; i++) {
- myTable[aShift + i] = theData[i-1];
+ myTable[(int)(aShift + i)] = theData[i-1]; //!< TODO: conversion from size_t to int
}
if(theRow > myNbRows) myNbRows = theRow;
{
if (theUnits.size() != GetNbRows()) throw DFexception("Invalid number of rows");
size_t aLength = theUnits.size(), i;
- for(i = 1; i <= aLength; i++) SetRowUnit(i, theUnits[i-1]);
+ for(i = 1; i <= aLength; i++) SetRowUnit((int)i, theUnits[i-1]); //!< TODO: conversion from size_t to int
SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved
}
{
if (theTitles.size() != GetNbRows()) throw DFexception("Invalid number of rows");
size_t aLength = theTitles.size(), i;
- for(i = 1; i <= aLength; i++) SetRowTitle(i, theTitles[i-1]);
+ for(i = 1; i <= aLength; i++) SetRowTitle((int)i, theTitles[i-1]); //!< TODO: conversion from size_t to int
SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved
}
size_t i, aLength = theData.size();
for(i = 1; i <= aLength; i++) {
- myTable[myNbColumns*(i-1)+theColumn] = theData[i-1];
+ myTable[myNbColumns*((int)i-1)+theColumn] = theData[i-1]; //!< TODO: conversion from size_t to int
}
if(aLength > myNbRows) {
- myNbRows = aLength;
+ myNbRows = (int)aLength; //!< TODO: conversion from size_t to int
while (myRows.size() < myNbRows) { // append empty row titles
myRows.push_back(std::string(""));
}
//Title
l = myTitle.size();
- sprintf(buffer, "%d\n", l);
+ sprintf(buffer, "%Iu\n", l);
aString+=buffer;
for(i=0; i<l; i++) {
aString += myTitle[i];
//Row titles
for(i=0; i<myNbRows; i++) {
l = myRows[i].size();
- sprintf(buffer, "%d\n", l);
+ sprintf(buffer, "%Iu\n", l);
aString+=buffer;
for(j=0; j<l; j++) {
aString += myRows[i][j];
//Columns titles
for(i=0; i<myNbColumns; i++) {
l = myCols[i].size();
- sprintf(buffer, "%d\n", l);
+ sprintf(buffer, "%Iu\n", l);
aString+=buffer;
for(j=0; j<l; j++) {
aString += myCols[i][j];
//Store the table values
l = myTable.size();
- sprintf(buffer, "%d\n", l);
+ sprintf(buffer, "%Iu\n", l);
aString+=buffer;
for(MI p = myTable.begin(); p != myTable.end(); p++) {
sprintf(buffer, "%d\n%.64e\n", p->first, p->second);
{
if (theUnits.size() != GetNbRows()) throw DFexception("Invalid number of rows");
size_t aLength = theUnits.size(), i;
- for(i = 1; i <= aLength; i++) SetRowUnit(i, theUnits[i-1]);
+ for(i = 1; i <= aLength; i++) SetRowUnit((int)i, theUnits[i-1]); //!< TODO: conversion from size_t to int
}
std::vector<std::string> SALOMEDSImpl_AttributeTableOfString::GetRowUnits()
{
if (theTitles.size() != GetNbRows()) throw DFexception("Invalid number of rows");
size_t aLength = theTitles.size(), i;
- for(i = 1; i <= aLength; i++) SetRowTitle(i, theTitles[i-1]);
+ for(i = 1; i <= aLength; i++) SetRowTitle((int)i, theTitles[i-1]); //!< TODO: conversion from size_t to int
SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved
}
size_t i, aShift = (theRow-1)*myNbColumns, aLength = theData.size();
for(i = 1; i <= aLength; i++) {
- myTable[aShift + i] = theData[i-1];
+ myTable[int(aShift + i)] = theData[i-1]; //!< TODO: conversion from size_t to int
}
if(theRow > myNbRows) myNbRows = theRow;
size_t i, aLength = theData.size();
for(i = 1; i <= aLength; i++) {
- myTable[myNbColumns*(i-1)+theColumn] = theData[i-1];
+ myTable[myNbColumns*((int)i-1)+theColumn] = theData[i-1]; //!< TODO: conversion from size_t to int
}
if(aLength > myNbRows) {
- myNbRows = aLength;
+ myNbRows = (int)aLength; //!< TODO: conversion from size_t to int
while (myRows.size() < myNbRows) { // append empty row titles
myRows.push_back(std::string(""));
}
//Title
l = myTitle.size();
- sprintf(buffer, "%d\n", l);
+ sprintf(buffer, "%Iu\n", l);
aString+=buffer;
for(i=0; i<l; i++) {
aString += myTitle[i];
//Row titles
for(i=0; i<myNbRows; i++) {
l = myRows[i].size();
- sprintf(buffer, "%d\n", l);
+ sprintf(buffer, "%Iu\n", l);
aString+=buffer;
for(j=0; j<l; j++) {
aString += myRows[i][j];
//Columns titles
for(i=0; i<myNbColumns; i++) {
l = myCols[i].size();
- sprintf(buffer, "%d\n", l);
+ sprintf(buffer, "%Iu\n", l);
aString+=buffer;
for(j=0; j<l; j++) {
aString += myCols[i][j];
//Store the table values
l = myTable.size();
- sprintf(buffer, "%d\n", l);
+ sprintf(buffer, "%Iu\n", l);
aString+=buffer;
for(MI p = myTable.begin(); p!=myTable.end(); p++) {
if (p->second.size()) { // check empty string in the value table
if (HasFirst()) aFirst = GetFirst()->Label().Entry(); else aFirst = "!";
int aLength = 4;
- aLength += aFather.size() + aPrevious.size() + aNext.size() + aFirst.size();
+ aLength += (int)(aFather.size() + aPrevious.size() + aNext.size() + aFirst.size()); //!< TODO: conversion from size_t to int
char* aResult = new char[aLength];
sprintf(aResult, "%s %s %s %s", aFather.c_str(), aPrevious.c_str(), aNext.c_str(), aFirst.c_str());
std::string ret(aResult);
v = _ap->GetStrArray(listName);
v.push_back(value);
_ap->SetStrArray(listName, v);
- return (v.size()-1);
+ return (int)(v.size()-1); //!< TODO: conversion from size_t to int
}
int SALOMEDSImpl_IParameters::nbValues(const std::string& listName)
if(!_ap) return -1;
if(!_ap->IsSet(listName, PT_STRARRAY)) return 0;
std::vector<std::string> v = _ap->GetStrArray(listName);
- return v.size();
+ return (int)v.size(); //!< TODO: conversion from size_t to int
}
std::vector<std::string> SALOMEDSImpl_IParameters::getValues(const std::string& listName)
if(!_ap) return "";
if(!_ap->IsSet(entry, PT_STRARRAY)) return "";
std::vector<std::string> v = _ap->GetStrArray(entry);
- int length = v.size();
+ size_t length = v.size();
for(int i = 0; i<length; i+=1) {
if(v[i] == parameterName) return v[i+1];
}
if(!_ap) return "";
if(!_ap->IsSet(entry, PT_STRARRAY)) return "";
std::vector<std::string> v = _ap->GetStrArray(entry);
- int length = v.size();
+ size_t length = v.size();
for(int i = 0; i<length; i+=1) {
if(v[i] == _PT_ID_) return v[i+1];
}
if(!_ap) return v;
if(!_ap->IsSet(entry, PT_STRARRAY)) return v;
v = _ap->GetStrArray(entry);
- int length = v.size();
+ size_t length = v.size();
for(int i = 0; i<length; i+=2) {
names.push_back(v[i]);
}
if(!_ap) return v;
if(!_ap->IsSet(entry, PT_STRARRAY)) return v;
v = _ap->GetStrArray(entry);
- int length = v.size();
+ size_t length = v.size();
for(int i = 1; i<length; i+=2) {
values.push_back(v[i]);
}
{
if(!_ap) return -1;
if(!_ap->IsSet(entry, PT_STRARRAY)) return -1;
- return _ap->GetStrArray(entry).size()/2;
+ return int(_ap->GetStrArray(entry).size()/2); //!< TODO: conversion from size_t to int
}
std::vector<std::string> SALOMEDSImpl_IParameters::getEntries()
std::string SALOMEDSImpl_IParameters::decodeEntry(const std::string& entry)
{
- int pos = entry.rfind("_");
+ size_t pos = entry.rfind("_");
if(pos < 0 || pos >= entry.size()) return entry;
std::string compName(entry, 0, pos), compID, tail(entry, pos+1, entry.length()-1);
if(!onlyId) {
dump += shift + "# set up entry " + v[i] +" ("+so_name+")" + " parameters" + "\n";
if(hasId) {
- int idIndex = std::distance(names.begin(), it);
+ int idIndex = (int)std::distance(names.begin(), it); //!< TODO: conversion from __int64 to int
dump += shift + "objId = " + values[idIndex] + "\n";
}
std::vector<DF_Attribute*> SALOMEDSImpl_SObject::GetAllAttributes() const
{
std::vector<DF_Attribute*> va1, va = _lab.GetAttributes();
- for(int i = 0, len = va.size(); i<len; i++) {
+ for(size_t i = 0, len = va.size(); i<len; i++) {
SALOMEDSImpl_GenericAttribute* ga = dynamic_cast<SALOMEDSImpl_GenericAttribute*>(va[i]);
if(ga && ga->Type() != std::string("AttributeReference"))
va1.push_back(va[i]);
}
else {
#ifdef OLDSTUDY_COMPATIBILITY
- int dotpos = strCopy.find(',');
+ size_t dotpos = strCopy.find(',');
if (dotpos != std::string::npos)
strCopy.replace(dotpos, 1, ".");
#endif // OLDSTUDY_COMPATIBILITY
int aLength = 0, aLength1 = 0, anIndex, i, unitsSize = 0, commentSize = 0;
for(i=1; i<=aNames.size(); i++)
- aLength += aNames[i-1].size() + 1;
+ aLength += (int)aNames[i-1].size() + 1; //!< TODO: conversion from size_t to int
std::map< std::string, std::vector<std::string> >::const_iterator it;
for (it = allVersions.begin(); it != allVersions.end(); ++it ) {
vlist += *vlit;
}
versions[ it->first ] = vlist;
- aLength1 += it->first.size() + vlist.size() + 2;
+ aLength1 += int(it->first.size() + vlist.size() + 2); //!< TODO: conversion from size_t to int
}
- unitsSize = units.size();
- commentSize = comment.size();
+ unitsSize = (int)units.size(); //!< TODO: conversion from size_t to int
+ commentSize = (int)comment.size(); //!< TODO: conversion from size_t to int
//string format:
//locked flag, modified flag,
sprintf(aProperty,"%c%c", (char)aProp->GetCreationMode(), (aProp->IsLocked())?'l':'u');
- aLength = aNames.size();
+ aLength = (int)aNames.size(); //!< TODO: conversion from size_t to int
int a = 2;
for(anIndex = 0; anIndex<aLength; anIndex++) {
sprintf(&(aProperty[a]),"%2d%2d%2d%2d%4d%s",
(int)(aMonths[anIndex]),
(int)(aYears[anIndex]),
aNames[anIndex].c_str());
- a = strlen(aProperty);
+ a = (int)strlen(aProperty); //!< TODO: conversion from size_t to int
aProperty[a++] = 1;
}
//Write units if need
if(units.size() > 0) {
sprintf(&(aProperty[a]),"%s",units.c_str());
- a = strlen(aProperty);
+ a = (int)strlen(aProperty); //!< TODO: conversion from size_t to int
}
aProperty[a++] = 1;
//Write comments if need
if(comment.size() > 0) {
sprintf(&(aProperty[a]),"%s",comment.c_str());
- a = strlen(aProperty);
+ a = (int)strlen(aProperty); //!< TODO: conversion from size_t to int
}
aProperty[a++] = 30; //delimiter of the component versions
sprintf(&(aProperty[a]),"%s=%s",
(char*)(versionsIt->first.c_str()),
(char*)(versionsIt->second.c_str()));
- a = a + versionsIt->first.size() + versionsIt->second.size() + 1;
+ a = a + (int)versionsIt->first.size() + (int)versionsIt->second.size() + 1; //!< TODO: conversion from size_t to int
aProperty[a++] = 1;
}
}
// iterate attributes
std::vector<DF_Attribute*> attrList = theSource.GetAttributes();
- for(int i = 0, len = attrList.size(); i<len; i++) {
+ for(int i = 0, len = (int)attrList.size(); i<len; i++) { //!< TODO: conversion from size_t to int
DF_Attribute* anAttr = attrList[i];
std::string type = SALOMEDSImpl_GenericAttribute::Impl_GetType(anAttr);
if (type.substr(0, 17) == std::string("AttributeTreeNode")) continue; // never copy tree node attribute
if (theEngine->CanPaste(aCompName, anObjID->Value())) {
std::string aTMPStr = aNameAttribute->Value();
- int aLen = aTMPStr.size();
+ int aLen = (int)aTMPStr.size(); //!< TODO: conversion from size_t to int
unsigned char* aStream = NULL;
if(aLen > 0) {
aStream = new unsigned char[aLen+10];
// iterate attributes
std::vector<DF_Attribute*> attrList = theSource.GetAttributes();
- for(int i = 0, len = attrList.size(); i<len; i++) {
+ for(int i = 0, len = (int)attrList.size(); i<len; i++) { //!< TODO: conversion from size_t to int
DF_Attribute* anAttr = attrList[i];
if (aTargetLabel.FindAttribute(anAttr->ID())) {
aTargetLabel.ForgetAttribute(anAttr->ID());
std::string aPath(thePath), aToken;
SALOMEDSImpl_SObject aSO;
- int aLength = aPath.size();
+ int aLength = (int)aPath.size(); //!< TODO: conversion from size_t to int
bool isRelative = false;
if(aLength == 0) { //Empty path - return the current context
}
std::vector<std::string> vs = SALOMEDSImpl_Tool::splitString(aPath, '/');
- for(int i = 0, len = vs.size(); i<len; i++) {
+ for(int i = 0, len = (int)vs.size(); i<len; i++) { //!< TODO: conversion from size_t to int
aToken = vs[i];
if(aToken.size() == 0) break;
std::vector<int> aMinutes, aHours, aDays, aMonths, aYears;
aProp->GetModifications(aNames, aMinutes, aHours, aDays, aMonths, aYears);
- int aLastIndex = aNames.size()-1;
+ int aLastIndex = (int)aNames.size()-1; //!< TODO: conversion from size_t to int
char aResult[20];
sprintf(aResult, "%2.2d/%2.2d/%4.4d %2.2d:%2.2d",
(int)(aDays[aLastIndex]),(int)(aMonths[aLastIndex]), (int)(aYears[aLastIndex]),
std::vector<int> aMinutes, aHours, aDays, aMonths, aYears;
aProp->GetModifications(aNames, aMinutes, aHours, aDays, aMonths, aYears);
- int anIndex, aLength = aNames.size();
+ int anIndex, aLength = (int)aNames.size(); //!< TODO: conversion from size_t to int
std::vector<std::string> aDates;
for (anIndex = 1; anIndex < aLength; anIndex++) {
// dump all components and create the components specific scripts
bool isOk = true;
- int aLength = aSeq.size();
+ int aLength = (int)aSeq.size(); //!< TODO: conversion from size_t to int
for(int i = 1; i <= aLength; i++) {
std::string aCompType = aSeq[i-1];
void SALOMEDSImpl_Study::UnLockStudy(const char* theLockerID)
{
std::vector<std::string>::iterator vsI = _lockers.begin();
- int length = _lockers.size();
+ int length = (int)_lockers.size(); //!< TODO: conversion from size_t to int
bool isFound = false;
std::string id(theLockerID);
for(int i = 0; i<length; i++, vsI++) {
std::string aString = aStringAttr->Value();
std::vector< std::vector<std::string> > aSections = ParseVariables( aString );
- for( int i = 0, n = aSections.size(); i < n; i++ )
+ for( int i = 0, n = (int)aSections.size(); i < n; i++ ) //!< TODO: conversion from size_t to int
{
std::vector<std::string> aVector = aSections[i];
- for( int j = 0, m = aVector.size(); j < m; j++ )
+ for( int j = 0, m = (int)aVector.size(); j < m; j++ ) //!< TODO: conversion from size_t to int
{
std::string aStr = aVector[j];
if( aStr.compare( theName ) == 0 )
std::string aNewString, aCurrentString = aStringAttr->Value();
std::vector< std::vector<std::string> > aSections = ParseVariables( aCurrentString );
- for( int i = 0, n = aSections.size(); i < n; i++ )
+ for( int i = 0, n = (int)aSections.size(); i < n; i++ ) //!< TODO: conversion from size_t to int
{
std::vector<std::string> aVector = aSections[i];
- for( int j = 0, m = aVector.size(); j < m; j++ )
+ for( int j = 0, m = (int)aVector.size(); j < m; j++ ) //!< TODO: conversion from size_t to int
{
std::string aStr = aVector[j];
if( aStr.compare( theSource ) == 0 )
hdf_size size[1];
std::vector<DF_Attribute*> attrList = aSO.GetLabel().GetAttributes();
DF_Attribute* anAttr = NULL;
- for(int i = 0, len = attrList.size(); i<len; i++) {
+ for(int i = 0, len = (int)attrList.size(); i<len; i++) { //!< TODO: conversion from size_t to int
anAttr = attrList[i];
//The following attributes are not supposed to be written to the file
std::string type = SALOMEDSImpl_GenericAttribute::Impl_GetType(anAttr);
bool aResult = true;
if(aStreamFile && aStreamSize > 0 ) {
aResult = (ASCIIfileState[0]=='A')?
- aDriver->LoadASCII(anSCO, aStreamFile, aStreamSize, aDir.c_str(), aMultifileState[0]=='M'):
- aDriver->Load(anSCO, aStreamFile, aStreamSize, aDir.c_str(), aMultifileState[0]=='M');
+ aDriver->LoadASCII(anSCO, aStreamFile, (long)aStreamSize, aDir.c_str(), aMultifileState[0]=='M'): //!< TODO: conversion from size_t to const long
+ aDriver->Load(anSCO, aStreamFile, (long)aStreamSize, aDir.c_str(), aMultifileState[0]=='M'); //!< TODO: conversion from size_t to const long
}
if(aStreamFile != NULL) delete []aStreamFile;
for(; aChildItr.More(); aChildItr.Next())
aList.push_back(aChildItr.Value());
- for(int i = 0, len = aList.size(); i<len; i++) {
+ for(size_t i = 0, len = aList.size(); i<len; i++) {
if(aList[i]->Label() == aCurrent) { //The current node is removed
aRef->Set(_root->Label()); //Reset the current node to the root
}
{
std::string aDirName = theDirectory;
- int i, aLength = theFiles.size();
+ size_t i, aLength = theFiles.size();
for(i=1; i<=aLength; i++) {
std::string aFile(aDirName);
aFile += theFiles[i-1];
const std::vector<std::string>& theFileNames,
const int theNamesOnly)
{
- int i, aLength = theFiles.size();
+ int i, aLength = (int)theFiles.size(); //!< TODO: conversion from size_t to int
if(aLength == 0)
return (new SALOMEDS::TMPFile);
std::ifstream aFile(aFullPath.c_str());
#endif
aFile.seekg(0, std::ios::end);
- aFileSize[i] = aFile.tellg();
+ aFileSize[i] = (long)aFile.tellg(); //!< TODO: conversion from std::streamoff to long
aBufferSize += aFileSize[i]; //Add a space to store the file
}
- aFileNameSize[i] = theFileNames[i].length()+1;
+ aFileNameSize[i] = (int)theFileNames[i].length()+1; //!< TODO: conversion from size_t to int
aBufferSize += aFileNameSize[i]; //Add a space to store the file name
aBufferSize += (theNamesOnly)?4:12; //Add 4 bytes: a length of the file name,
// 8 bytes: length of the file itself
//Put a file name to aFileName
memcpy(aFileName, (aBuffer + aCurrentPos), aFileNameSize);
#ifdef WIN32
- for (int i = 0; i < strlen(aFileName); i++)
+ for (i = 0; i < strlen(aFileName); i++)
{
if (aFileName[i] == ':')
aFileName[i] = '_';
if (thePath.empty()) return "";
std::string aPath = thePath;
bool isFound = false;
- int pos = aPath.rfind('/');
+ size_t pos = aPath.rfind('/');
if(pos > 0) {
aPath = aPath.substr(pos+1, aPath.size());
isFound = true;
std::string SALOMEDS_Tool::GetDirFromPath(const std::string& thePath) {
if (thePath.empty()) return "";
- int pos = thePath.rfind('/');
+ size_t pos = thePath.rfind('/');
std::string path;
if(pos > 0) {
path = thePath.substr(0, pos+1);
if(path.size() == 2 && path[1] == ':') path +='\\';
#endif
- for(int i = 0, len = path.size(); i<len; i++)
+ for(size_t i = 0, len = path.size(); i<len; i++)
if(path[i] == '|') path[i] = '/';
return path;
}
#else
static std::string hostName(4096, 0);
#endif
- static DWORD nSize = hostName.length();
+ static DWORD nSize = (DWORD)hostName.length(); //!< TODO: conversion from size_t to DWORD
static int res = ::GetComputerNameEx(ComputerNameDnsFullyQualified, &hostName[0], &nSize);
ASSERT( res );
#ifdef UNICODE
#else
static std::string retVal(4096, 0);
#endif
- static DWORD dwSize = retVal.length() + 1;
+ static DWORD dwSize = (DWORD)(retVal.length() + 1); //!< TODO: conversion from size_t to DWORD
static int res = GetUserName( &retVal[0], &dwSize );
ASSERT( res );
#ifdef UNICODE