-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2023 CEA, EDF, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
int aLength = 0, aLength1 = 0, anIndex, i, unitsSize = 0, commentSize = 0;
- for(i=1; i<=aNames.size(); i++)
- aLength += aNames[i-1].size() + 1;
+ for(i=1; i<=(int)aNames.size(); i++)
+ 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;
}
std::string varType;
std::string varIndex;
- for (int i=0 ;i < myNoteBookVars.size(); i++ ) {
+ for (int i=0 ;i < (int)myNoteBookVars.size(); i++ ) {
// For each variable create HDF group
hdf_notebook_var = new HDFgroup((char*)myNoteBookVars[i]->Name().c_str(),hdf_notebook_vars);
hdf_notebook_var->CreateOnDisk();
}
// 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::string set_method = _GetNoteBookAccessor()+".set(";
std::string varName;
std::string varValue;
- for(int i = 0 ; i < myNoteBookVars.size();i++ ) {
+ for(int i = 0 ; i < (int)myNoteBookVars.size();i++ ) {
varName = myNoteBookVars[i]->Name();
varValue = myNoteBookVars[i]->SaveToScript();
dump+=set_method+"\""+varName+"\", "+varValue+")\n";
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];
std::string aTab(Tab), anID(theSO.GetID());
fp << aTab << anID << std::endl;
std::vector<DF_Attribute*> attribs = theSO.GetLabel().GetAttributes();
- for(int i = 0; i<attribs.size(); i++) {
+ for(int i = 0; i<(int)attribs.size(); i++) {
SALOMEDSImpl_GenericAttribute* anAttr = dynamic_cast<SALOMEDSImpl_GenericAttribute*>(attribs[i]);
if(!anAttr) {
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++) {
//============================================================================
void SALOMEDSImpl_Study::SetStringVariableAsDouble(const std::string& theVarName,
const double theValue,
- const SALOMEDSImpl_GenericVariable::VariableTypes theType)
+ const SALOMEDSImpl_GenericVariable::VariableTypes /*theType*/)
{
SALOMEDSImpl_GenericVariable* aGVar = GetVariable(theVarName);
if(SALOMEDSImpl_ScalarVariable* aSVar = dynamic_cast<SALOMEDSImpl_ScalarVariable*>(aGVar))
{
std::vector<std::string> aResult;
- for(int i = 0; i < myNoteBookVars.size(); i++)
+ for(int i = 0; i < (int)myNoteBookVars.size(); i++)
aResult.push_back(myNoteBookVars[i]->Name());
return aResult;
SALOMEDSImpl_GenericVariable* SALOMEDSImpl_Study::GetVariable(const std::string& theName) const
{
SALOMEDSImpl_GenericVariable* aResult = NULL;
- for(int i = 0; i < myNoteBookVars.size();i++) {
+ for(int i = 0; i < (int)myNoteBookVars.size();i++) {
if(theName.compare(myNoteBookVars[i]->Name()) == 0) {
aResult = myNoteBookVars[i];
break;
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);