return;
else
{
- int ret;
- ret = pthread_mutex_lock(&_listMutex); // acquire lock, an check again
+ pthread_mutex_lock(&_listMutex); // acquire lock, an check again
if (std::find(_objList.begin(), _objList.end(), anObject)
!= _objList.end())
{
DEVTRACE("PROTECTED_DELETE::deleteInstance2 " << &_objList);
_objList.remove(anObject);
}
- ret = pthread_mutex_unlock(&_listMutex); // release lock
+ pthread_mutex_unlock(&_listMutex); // release lock
}
}
*/
// ============================================================================
-const int GENERIC_DESTRUCTOR::Add(GENERIC_DESTRUCTOR &anObject)
+int GENERIC_DESTRUCTOR::Add(GENERIC_DESTRUCTOR &anObject)
{
DEVTRACE("GENERIC_DESTRUCTOR::Add("<<typeid(anObject).name()<<") "
<< &anObject);
static std::list<GENERIC_DESTRUCTOR*> *Destructors;
virtual ~GENERIC_DESTRUCTOR() {};
- static const int Add(GENERIC_DESTRUCTOR &anObject);
+ static int Add(GENERIC_DESTRUCTOR &anObject);
virtual void operator()(void) = 0;
};
{
std::string tmp_str = file_path;
auto pos = file_path.rfind( _separator_ );
- if ( pos >= 0 )
- tmp_str = pos < (int)file_path.size()-1 ? file_path.substr( pos+1 ) : "";
+ if ( pos != std::string::npos )
+ tmp_str = pos < file_path.size()-1 ? file_path.substr( pos+1 ) : "";
pos = tmp_str.rfind( _extension_ );
- if( !with_extension && pos >= 0 )
- tmp_str = pos < (int)tmp_str.size()-1 ? tmp_str.substr( 0, pos ) : "";
+ if( !with_extension && pos != std::string::npos )
+ tmp_str = pos < tmp_str.size()-1 ? tmp_str.substr( 0, pos ) : "";
return tmp_str;
}
std::string GetDirName( const std::string& file_path )
{
auto pos = file_path.rfind( _separator_ );
- if ( pos >= 0 )
- return pos < (int)file_path.size()-1 ? file_path.substr(0, pos ) : "";
+ if ( pos != std::string::npos )
+ return pos < file_path.size()-1 ? file_path.substr(0, pos ) : "";
return std::string(".");
}
{
std::string tmp_str = name;
auto pos = tmp_str.rfind( _extension_ );
- if( pos < 0 )
+ if( pos == std::string::npos )
return tmp_str.append( _extension_ );
return tmp_str;
}
--- /dev/null
+// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+
+#ifndef BASICS_MPIUTILS_HXX
+#define BASICS_MPIUTILS_HXX
+
+#ifdef HAVE_MPI2
+#include "mpi.h"
+#endif
+
+#if !defined(MPI_ERROR_HANDLER)
+# if MPI_VERSION >= 2
+# define MPI_ERROR_HANDLER(var) MPI_Comm_set_errhandler(MPI_COMM_WORLD, var)
+# else
+# define MPI_ERROR_HANDLER(var) MPI_Errhandler_set(MPI_COMM_WORLD, var)
+# endif
+#endif
+
+#endif // BASICS_MPIUTILS_HXX
#pragma warning (disable : 4251)
#endif
+#ifndef SALOME_UNUSED
+#define SALOME_UNUSED(var) (void)var
+#endif
namespace Kernel_Utils
{
*/
// ============================================================================
-int main(int argc, char* argv[])
+int main()
{
// --- Create the event manager and test controller
CPPUNIT_NS::TestResult controller;
/*!
This method performs the transfert of double array with the remote SenderDouble given. If it fails with this SenderDouble it tries with an another protocol (CORBA by default).
*/
-double *ReceiverFactory::getValue(SALOME::SenderDouble_ptr sender,long &size)throw(MultiCommException)
+double *ReceiverFactory::getValue(SALOME::SenderDouble_ptr sender,long &size)
{
double *ret;
try{
/*!
This method performs the transfert of int array with the remote SenderInt given. If it fails with this SenderInt it tries with an another protocol (CORBA by default).
*/
-int *ReceiverFactory::getValue(SALOME::SenderInt_ptr sender,long &size)throw(MultiCommException)
+int *ReceiverFactory::getValue(SALOME::SenderInt_ptr sender,long &size)
{
int *ret;
try{
/*!
This method performs the transfert with the remote SenderDouble given. If it fails an exception is thrown.
*/
-double *ReceiverFactory::getValueOneShot(SALOME::SenderDouble_ptr sender,long &size)throw(MultiCommException)
+double *ReceiverFactory::getValueOneShot(SALOME::SenderDouble_ptr sender,long &size)
{
SALOME::CorbaDoubleNCSender_ptr cncD_ptr;
SALOME::CorbaDoubleCSender_ptr cwcD_ptr;
/*!
This method performs the transfert with the remote SenderInt given. If it fails an exception is thrown.
*/
-int *ReceiverFactory::getValueOneShot(SALOME::SenderInt_ptr sender,long &size)throw(MultiCommException)
+int *ReceiverFactory::getValueOneShot(SALOME::SenderInt_ptr sender,long &size)
{
SALOME::CorbaLongNCSender_ptr cncL_ptr;
SALOME::CorbaLongCSender_ptr cwcL_ptr;
class COMMUNICATION_EXPORT ReceiverFactory
{
public:
- static double *getValue(SALOME::SenderDouble_ptr sender,long &size)throw(MultiCommException);
- static int *getValue(SALOME::SenderInt_ptr sender,long &size)throw(MultiCommException);
+ static double *getValue(SALOME::SenderDouble_ptr sender,long &size);
+ static int *getValue(SALOME::SenderInt_ptr sender,long &size);
private:
- static double *getValueOneShot(SALOME::SenderDouble_ptr sender,long &size)throw(MultiCommException);
- static int *getValueOneShot(SALOME::SenderInt_ptr sender,long &size)throw(MultiCommException);
+ static double *getValueOneShot(SALOME::SenderDouble_ptr sender,long &size);
+ static int *getValueOneShot(SALOME::SenderInt_ptr sender,long &size);
};
#endif
#include "omniORB4/poa.h"
#include "utilities.h"
+#include "Basics_MpiUtils.hxx"
#define TAILLE_SPLIT 100000
#define TIMEOUT 20
SALOME::MPISender::param_var p =_mySender->getParam();
_mySender->send();
sproc = p->myproc;
-#if OMPI_MAJOR_VERSION >= 4
- MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_RETURN);
-#else
- MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_RETURN);
-#endif
+ MPI_ERROR_HANDLER(MPI_ERRORS_RETURN);
while ( i != TIMEOUT && MPI_Lookup_name((char*)p->service,MPI_INFO_NULL,port_name_clt) != MPI_SUCCESS) {
i++;
}
-#if OMPI_MAJOR_VERSION >= 4
- MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_ARE_FATAL);
-#else
- MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_ARE_FATAL);
-#endif
+ MPI_ERROR_HANDLER(MPI_ERRORS_ARE_FATAL);
if ( i == TIMEOUT ) {
MPI_Finalize();
exit(-1);
// TIMEOUT is inefficient since MPI_Comm_Connect doesn't return if we asked for
// a service that has been unpublished !
-#if OMPI_MAJOR_VERSION >= 4
- MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_RETURN);
-#else
- MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_RETURN);
-#endif
+ MPI_ERROR_HANDLER(MPI_ERRORS_RETURN);
i = 0;
while ( i != TIMEOUT && MPI_Comm_connect(port_name_clt, MPI_INFO_NULL, 0, MPI_COMM_WORLD, &com)!=MPI_SUCCESS ) {
i++;
}
-#if OMPI_MAJOR_VERSION >= 4
- MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_ARE_FATAL);
-#else
- MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_ARE_FATAL);
-#endif
+ MPI_ERROR_HANDLER(MPI_ERRORS_ARE_FATAL);
if ( i == TIMEOUT ) {
MPI_Finalize();
exit(-1);
#include "omnithread.h"
#include "Utils_SINGLETON.hxx"
#include "Utils_ORB_INIT.hxx"
+#include "Basics_MpiUtils.hxx"
#include "utilities.h"
#include "SenderFactory.hxx"
return dynamic_cast<SALOME_SenderInt_i *>(ret);
}
-SALOME_CorbaDoubleNCSender_i::SALOME_CorbaDoubleNCSender_i(const double *tabToSend,long lgrTabToSend,bool ownTabToSend):SALOME_SenderDouble_i(tabToSend,lgrTabToSend,ownTabToSend),SALOME_Sender_i(tabToSend,lgrTabToSend,sizeof(double),ownTabToSend){
+SALOME_CorbaDoubleNCSender_i::SALOME_CorbaDoubleNCSender_i(const double *tabToSend,long lgrTabToSend,bool ownTabToSend):SALOME_Sender_i(tabToSend,lgrTabToSend,sizeof(double),ownTabToSend),SALOME_SenderDouble_i(tabToSend,lgrTabToSend,ownTabToSend){
}
SALOME_CorbaDoubleNCSender_i::~SALOME_CorbaDoubleNCSender_i(){
return c1._retn();
}
-SALOME_CorbaDoubleCSender_i::SALOME_CorbaDoubleCSender_i(const double *tabToSend,long lgrTabToSend,bool ownTabToSend):SALOME_SenderDouble_i(tabToSend,lgrTabToSend,ownTabToSend),SALOME_Sender_i(tabToSend,lgrTabToSend,sizeof(double),ownTabToSend){
+SALOME_CorbaDoubleCSender_i::SALOME_CorbaDoubleCSender_i(const double *tabToSend,long lgrTabToSend,bool ownTabToSend):SALOME_Sender_i(tabToSend,lgrTabToSend,sizeof(double),ownTabToSend),SALOME_SenderDouble_i(tabToSend,lgrTabToSend,ownTabToSend){
}
SALOME_CorbaDoubleCSender_i::~SALOME_CorbaDoubleCSender_i(){
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_CorbaLongNCSender_i::SALOME_CorbaLongNCSender_i(const int *tabToSend,long lgrTabToSend,bool ownTabToSend):SALOME_SenderInt_i(tabToSend,lgrTabToSend,ownTabToSend),SALOME_Sender_i(tabToSend,lgrTabToSend,sizeof(int),ownTabToSend){
+SALOME_CorbaLongNCSender_i::SALOME_CorbaLongNCSender_i(const int *tabToSend,long lgrTabToSend,bool ownTabToSend):SALOME_Sender_i(tabToSend,lgrTabToSend,sizeof(int),ownTabToSend),SALOME_SenderInt_i(tabToSend,lgrTabToSend,ownTabToSend){
}
SALOME_CorbaLongNCSender_i::~SALOME_CorbaLongNCSender_i(){
return c1._retn();
}
-SALOME_CorbaLongCSender_i::SALOME_CorbaLongCSender_i(const int *tabToSend,long lgrTabToSend,bool ownTabToSend):SALOME_SenderInt_i(tabToSend,lgrTabToSend,ownTabToSend),SALOME_Sender_i(tabToSend,lgrTabToSend,sizeof(int),ownTabToSend){
+SALOME_CorbaLongCSender_i::SALOME_CorbaLongCSender_i(const int *tabToSend,long lgrTabToSend,bool ownTabToSend):SALOME_Sender_i(tabToSend,lgrTabToSend,sizeof(int),ownTabToSend),SALOME_SenderInt_i(tabToSend,lgrTabToSend,ownTabToSend){
}
SALOME_CorbaLongCSender_i::~SALOME_CorbaLongCSender_i(){
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();
}
p->tag2 =_tag2;
_tag2Inst=_tag2;
std::string service("toto_");
- sprintf(stag,"%d_",_tag1);
+ sprintf(stag,"%ld_",_tag1);
service += stag;
sprintf(stag,"%d_",p->tag2);
service += stag;
p->service = CORBA::string_dup(service.c_str());
MPI_Open_port(MPI_INFO_NULL, _portName);
-#if OMPI_MAJOR_VERSION >= 4
- MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_RETURN);
-#else
- MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_RETURN);
-#endif
+ MPI_ERROR_HANDLER(MPI_ERRORS_RETURN);
while ( i != TIMEOUT && MPI_Publish_name((char*)service.c_str(),MPI_INFO_NULL,_portName) != MPI_SUCCESS) {
i++;
}
-#if OMPI_MAJOR_VERSION >= 4
- MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_ARE_FATAL);
-#else
- MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_ARE_FATAL);
-#endif
+ MPI_ERROR_HANDLER(MPI_ERRORS_ARE_FATAL);
if ( i == TIMEOUT ) {
MPI_Close_port(_portName);
MPI_Finalize();
}
SALOME_MPISenderDouble_i::SALOME_MPISenderDouble_i(const double *tabToSend,long lgrTabToSend,bool ownTabToSend)
- :SALOME_SenderDouble_i(tabToSend,lgrTabToSend,ownTabToSend),SALOME_MPISender_i(tabToSend,lgrTabToSend,sizeof(double),ownTabToSend)
- ,SALOME_Sender_i(tabToSend,lgrTabToSend,sizeof(double),ownTabToSend)
+ :SALOME_Sender_i(tabToSend,lgrTabToSend,sizeof(double),ownTabToSend)
+ ,SALOME_SenderDouble_i(tabToSend,lgrTabToSend,ownTabToSend),SALOME_MPISender_i(tabToSend,lgrTabToSend,sizeof(double),ownTabToSend)
{
}
SALOME_MPISenderInt_i::SALOME_MPISenderInt_i(const int *tabToSend,long lgrTabToSend,bool ownTabToSend)
- :SALOME_SenderInt_i(tabToSend,lgrTabToSend,ownTabToSend),SALOME_MPISender_i(tabToSend,lgrTabToSend,sizeof(int),ownTabToSend)
- ,SALOME_Sender_i(tabToSend,lgrTabToSend,sizeof(int),ownTabToSend)
+ :SALOME_Sender_i(tabToSend,lgrTabToSend,sizeof(int),ownTabToSend)
+ ,SALOME_SenderInt_i(tabToSend,lgrTabToSend,ownTabToSend),SALOME_MPISender_i(tabToSend,lgrTabToSend,sizeof(int),ownTabToSend)
{
}
return args;
}
-void SALOME_SocketSender_i::initCom() throw(SALOME::SALOME_Exception)
+void SALOME_SocketSender_i::initCom()
{
struct sockaddr_in serv_addr;
socklen_t n;
SCRUTE(_port);
}
-void SALOME_SocketSender_i::acceptCom() throw(SALOME::SALOME_Exception)
+void SALOME_SocketSender_i::acceptCom()
{
socklen_t sin_size;
struct sockaddr_in client_addr;
~SALOME_SocketSender_i();
SALOME::SocketSender::param* getParam();
void send();
- void initCom() throw(SALOME::SALOME_Exception);
- void acceptCom() throw(SALOME::SALOME_Exception);
+ void initCom();
+ void acceptCom();
void endOfCom();
void closeCom();
private:
#define SALOME_CorbaLongSender SALOME_CorbaLongCSender_i
#endif
-SALOME::SenderDouble_ptr SenderFactory::buildSender(SALOMEMultiComm &multiCommunicator,const double *tab,long lgr,bool ownTab)throw(MultiCommException){
+SALOME::SenderDouble_ptr SenderFactory::buildSender(SALOMEMultiComm &multiCommunicator,const double *tab,long lgr,bool ownTab) {
switch(multiCommunicator.getProtocol())
{
case SALOME::CORBA_:
}
}
-SALOME::SenderInt_ptr SenderFactory::buildSender(SALOMEMultiComm &multiCommunicator,const int *tab,long lgr,bool ownTab)throw(MultiCommException){
+SALOME::SenderInt_ptr SenderFactory::buildSender(SALOMEMultiComm &multiCommunicator,const int *tab,long lgr,bool ownTab) {
switch(multiCommunicator.getProtocol())
{
case SALOME::CORBA_:
class COMMUNICATION_EXPORT SenderFactory
{
public:
- static SALOME::SenderDouble_ptr buildSender(SALOMEMultiComm &multiCommunicator,const double *tab,long lgr,bool ownTab=false) throw(MultiCommException);
- static SALOME::SenderInt_ptr buildSender(SALOMEMultiComm &multiCommunicator,const int *tab,long lgr,bool ownTab=false) throw(MultiCommException);
+ static SALOME::SenderDouble_ptr buildSender(SALOMEMultiComm &multiCommunicator,const double *tab,long lgr,bool ownTab=false);
+ static SALOME::SenderInt_ptr buildSender(SALOMEMultiComm &multiCommunicator,const int *tab,long lgr,bool ownTab=false);
static SALOME::SenderDouble_ptr buildSender(SALOME::TypeOfCommunication NewType,SALOME_SenderDouble_i *src);
static SALOME::SenderInt_ptr buildSender(SALOME::TypeOfCommunication NewType,SALOME_SenderInt_i *src);
};
*/
//=============================================================================
-Engines_Component_i::Engines_Component_i():_myConnexionToRegistry(0), _notifSupplier(0), _id(0)
+Engines_Component_i::Engines_Component_i(): _id(0), _myConnexionToRegistry(0), _notifSupplier(0)
{
//ASSERT(0);
MESSAGE("Default Constructor, not for normal use...");
bool regist ) :
_instanceName(instanceName),
_interfaceName(interfaceName),
+ _id(0),
+ _contId(0),
_myConnexionToRegistry(0),
_notifSupplier(0),
+ _graphName("") ,
+ _nodeName(""),
_ThreadId(0) ,
_ThreadCpuUsed(0) ,
_Executed(false) ,
- _graphName("") ,
- _nodeName(""),
- _id(0),
- _contId(0),
_CanceledThread(false)
{
MESSAGE("Component constructor with instanceName "<< _instanceName);
bool regist) :
_instanceName(instanceName),
_interfaceName(interfaceName),
+ _id(0),
+ _contId(0),
_myConnexionToRegistry(0),
_notifSupplier(0),
+ _graphName("") ,
+ _nodeName(""),
_ThreadId(0) ,
_ThreadCpuUsed(0) ,
_Executed(false) ,
- _graphName("") ,
- _nodeName(""),
- _id(0),
- _contId(0),
_CanceledThread(false)
{
MESSAGE("Component constructor with instanceName "<< _instanceName);
Engines::FieldsDict* Engines_Component_i::getProperties()
{
Engines::FieldsDict_var copie = new Engines::FieldsDict;
- copie->length(_fieldsDict.size());
+ copie->length((CORBA::ULong)_fieldsDict.size());
std::map<std::string,CORBA::Any>::iterator it;
CORBA::ULong i = 0;
for (it = _fieldsDict.begin(); it != _fieldsDict.end(); it++, i++)
if ( !_CanceledThread )
_ThreadCpuUsed = CpuUsed_impl() ;
- float cpus=_ThreadCpuUsed/1000.;
+ float cpus=_ThreadCpuUsed/1000.f;
std::cerr << "endService for " << serviceName << " Component instance : " << _instanceName ;
std::cerr << " Cpu Used: " << cpus << " (s) " << std::endl;
MESSAGE("Send EndService notification for " << serviceName
*/
//=============================================================================
-Engines::TMPFile* Engines_Component_i::DumpPython(CORBA::Boolean isPublished,
+Engines::TMPFile* Engines_Component_i::DumpPython(CORBA::Boolean /*isPublished*/,
CORBA::Boolean isMultiFile,
CORBA::Boolean& isValidScript)
{
const char* aScript = isMultiFile ? "def RebuildData(): pass" : "";
char* aBuffer = new char[strlen(aScript)+1];
strcpy(aBuffer, aScript);
- CORBA::Octet* anOctetBuf = (CORBA::Octet*)aBuffer;
- int aBufferSize = strlen(aBuffer)+1;
- Engines::TMPFile_var aStreamFile = new Engines::TMPFile(aBufferSize, aBufferSize, anOctetBuf, 1);
+ size_t aBufferSize = strlen(aBuffer)+1;
+ Engines::TMPFile_var aStreamFile = new Engines::TMPFile((CORBA::ULong)aBufferSize, (CORBA::ULong)aBufferSize, (CORBA::Octet*)aBuffer, 1);
isValidScript = true;
return aStreamFile._retn();
}
*/
//=============================================================================
void
-Engines_Component_i::configureSalome_file(std::string service_name,
- std::string file_port_name,
- Salome_file_i * file)
+Engines_Component_i::configureSalome_file(std::string /*service_name*/,
+ std::string /*file_port_name*/,
+ Salome_file_i* /*file*/)
{
// By default this method does nothing
}
//=============================================================================
/*!
- \brief Get version of the component
-
- This method is supposed to be implemented in all derived classes; default implementation
- returns empty string that means that no version information about the component is available.
+ * \brief Return \c true if component can provide creation information.
+ */
+//=============================================================================
+bool Engines_Component_i::hasObjectInfo()
+{
+ return false;
+}
- \note The version of the component is stored to the study, as a part of general persistence
- mechanism; once stored, version information in the study cannot be changed.
+//=============================================================================
+/*!
+ * \brief Get creation information for object addressed by given entry.
+ */
+//=============================================================================
+char* Engines_Component_i::getObjectInfo(const char* /*entry*/)
+{
+ return CORBA::string_dup("");
+}
- \return string containing component's version, e.g. "1.0"
-*/
+//=============================================================================
+/*!
+ * \brief Get version of the component
+ *
+ * This method is supposed to be implemented in all derived classes; default implementation
+ * returns empty string that means that no version information about the component is available.
+ *
+ * \note The version of the component is stored to the study, as a part of general persistence
+ * mechanism; once stored, version information in the study cannot be changed.
+ *
+ * \return string containing component's version, e.g. "1.0"
+ */
+//=============================================================================
char* Engines_Component_i::getVersion()
{
return CORBA::string_dup( "" );
//=============================================================================
Engines_Container_i::Engines_Container_i () :
-_numInstance(0),_id(0),_NS(0)
+ _NS(0),_id(0),_numInstance(0)
{
}
bool activAndRegist,
bool isServantAloneInProcess
) :
- _numInstance(0),_isServantAloneInProcess(isServantAloneInProcess),_id(0),_NS(0)
+ _NS(0),_id(0),_numInstance(0),_isServantAloneInProcess(isServantAloneInProcess)
{
_pid = (long)getpid();
{
itm->second->destroy();
}
- catch(const CORBA::Exception& e)
+ catch(const CORBA::Exception&)
{
// ignore this entry and continue
}
Engines::EngineComponent_ptr
Engines_Container_i::load_impl( const char* genericRegisterName,
- const char* componentName )
+ const char* /*componentName*/ )
{
char* reason;
std::string impl_name = std::string(LIB) + genericRegisterName + ENGINESO;
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;
void CallCancelThread() ;
#ifndef WIN32
-void SigIntHandler(int what ,
+void SigIntHandler(int /*what*/ ,
siginfo_t * siginfo ,
- void * toto )
+ void * /*toto*/ )
{
//PAL9042 JR : during the execution of a Signal Handler (and of methods called through Signal Handlers)
// use of streams (and so on) should never be used because :
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();
}
}
static PyObject*
-ContainerPyStdOut_flush(ContainerPyStdOut *self)
+ContainerPyStdOut_flush(ContainerPyStdOut */*self*/, PyObject */*args*/)
{
Py_INCREF(Py_None);
return Py_None;
static PyMethodDef ContainerPyStdOut_methods[] = {
{"write", (PyCFunction)ContainerPyStdOut_write, METH_VARARGS, PyDoc_STR("write(string) -> None")},
{"flush", (PyCFunction)ContainerPyStdOut_flush, METH_NOARGS, PyDoc_STR("flush() -> None")},
- {NULL, NULL} /* sentinel */
+ {0, 0, 0, 0} /* sentinel */
};
static PyMemberDef ContainerPyStdOut_memberlist[] = {
- {(char*)"softspace", T_INT, offsetof(ContainerPyStdOut, softspace), 0,
- (char*)"flag indicating that a space needs to be printed; used by print"},
- {NULL} /* Sentinel */
+ {(char*)"softspace", T_INT, offsetof(ContainerPyStdOut, softspace), 0, (char*)"flag indicating that a space needs to be printed; used by print"},
+ {0, 0, 0, 0, 0} /* sentinel */
};
static PyTypeObject ContainerPyStdOut_Type = {
MESSAGE("=================================================================");
// set stdout to line buffering (aka C++ std::cout)
setvbuf(stdout, (char *)NULL, _IOLBF, BUFSIZ);
- wchar_t* salome_python;
char* env_python=getenv("SALOME_PYTHON");
if(env_python != 0)
{
script += "import sys\n";
script += "sys.excepthook = _custom_except_hook\n";
script += "del _custom_except_hook, sys\n";
- int res = PyRun_SimpleString(script.c_str());
+ PyRun_SimpleString(script.c_str());
// VSR (22/09/2016): end of workaround
PyEval_InitThreads(); // Create (and acquire) the interpreter lock
const char* Salome_file_name);
// Object information
- virtual bool hasObjectInfo() { return false; }
- virtual char* getObjectInfo(const char* entry) { return CORBA::string_dup(""); }
+ virtual bool hasObjectInfo();
+ virtual char* getObjectInfo(const char* entry);
// Version information
virtual char* getVersion();
if(!CORBA::is_nil(cont) && pid != cont->getPID())
lstCont.push_back((*iter));
}
- catch(const CORBA::Exception& e)
+ catch(const CORBA::Exception&)
{
// ignore this entry and continue
}
break;
}
}
- catch(const SALOME_Exception &ex)
+ catch(const SALOME_Exception &ex) //!< TODO: unused variable
{
MESSAGE("[GiveContainer] Exception in ResourceManager find !: " << ex.what());
return ret;
std::string hostname(resource_definition.HostName);
std::string containerNameInNS;
if(params.isMPI){
- int nbproc;
- if ( params.nb_proc <= 0 )
- nbproc = 1;
- else
- nbproc = params.nb_proc;
+ int nbproc = params.nb_proc <= 0 ? 1 : params.nb_proc;
try
{
if( GetenvThreadSafe("LIBBATCH_NODEFILE") != NULL )
else
return Engines::Container::_narrow(obj);
}
- catch(const CORBA::Exception& e)
+ catch(const CORBA::Exception&)
{
return Engines::Container::_nil();
}
{
return false; // VSR 02/08/2013: Python containers are no more supported
bool ret = false;
- int len = strlen(ContainerName);
+ size_t len = strlen(ContainerName);
if (len >= 2)
if (strcmp(ContainerName + len - 2, "Py") == 0)
command = BuildTempFileToLaunchRemoteContainer(resource_name, params, tmpFileName);
else
{
- int nbproc;
const ParserResourcesType resInfo(_resManager->GetResourceDefinition(resource_name));
- if (params.isMPI)
- {
- if ( params.nb_proc <= 0 )
- nbproc = 1;
- else
- nbproc = params.nb_proc;
- }
-
std::string wdir = params.workingdir.in();
- // "ssh -l user machine distantPath/runRemote.sh hostNS portNS WORKINGDIR workingdir \
- // SALOME_Container containerName -ORBInitRef NameService=IOR:01000..."
+ // "ssh -l user machine distantPath/runRemote.sh hostNS portNS WORKINGDIR workingdir
+ // SALOME_Container containerName -ORBInitRef NameService=IOR:01000..."
// or
// "ssh -l user machine distantLauncher remote -p hostNS -m portNS -d dir
// -- SALOME_Container contName -ORBInitRef NameService=IOR:01000..."
if(params.isMPI)
{
+ int nbproc = params.nb_proc <= 0 ? 1 : params.nb_proc;
command += " mpirun -np ";
std::ostringstream o;
o << nbproc << " ";
{
tmpFileName = BuildTemporaryFileName();
std::string command;
- int nbproc = 0;
std::ostringstream o;
if (params.isMPI)
{
- o << "mpirun -np ";
+ int nbproc = params.nb_proc <= 0 ? 1 : params.nb_proc;
- if ( params.nb_proc <= 0 )
- nbproc = 1;
- else
- nbproc = params.nb_proc;
+ o << "mpirun -np ";
o << nbproc << " ";
void SALOME_ContainerManager::RmTmpFile(std::string& tmpFileName)
{
- int length = tmpFileName.size();
+ size_t length = tmpFileName.size();
if ( length > 0)
{
#ifdef WIN32
if (params.isMPI)
{
- tempOutputFile << "mpirun -np ";
- int nbproc;
-
- if ( params.nb_proc <= 0 )
- nbproc = 1;
- else
- nbproc = params.nb_proc;
+ int nbproc = params.nb_proc <= 0 ? 1 : params.nb_proc;
- std::ostringstream o;
+ tempOutputFile << "mpirun -np ";
tempOutputFile << nbproc << " ";
#ifdef LAM_MPI
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
#else
Engines::Container_ptr
-SALOME_ContainerManager::StartPaCOPPContainer(const Engines::ContainerParameters& params,
- std::string resource_selected)
+SALOME_ContainerManager::StartPaCOPPContainer(const Engines::ContainerParameters& /*params*/,
+ std::string /*resource_selected*/)
{
Engines::Container_ptr ret = Engines::Container::_nil();
INFOS("[StarPaCOPPContainer] is disabled !");
}
std::string
-SALOME_ContainerManager::BuildCommandToLaunchPaCOProxyContainer(const Engines::ContainerParameters& params,
- std::string machine_file_name,
- std::string & proxy_hostname)
+SALOME_ContainerManager::BuildCommandToLaunchPaCOProxyContainer(const Engines::ContainerParameters& /*params*/,
+ std::string /*machine_file_name*/,
+ std::string & /*proxy_hostname*/)
{
return "";
}
std::string
-SALOME_ContainerManager::BuildCommandToLaunchPaCONodeContainer(const Engines::ContainerParameters& params,
- const std::string & machine_file_name,
- SALOME_ContainerManager::actual_launch_machine_t & vect_machine,
- const std::string & proxy_hostname)
+SALOME_ContainerManager::BuildCommandToLaunchPaCONodeContainer(const Engines::ContainerParameters& /*params*/,
+ const std::string & /*machine_file_name*/,
+ SALOME_ContainerManager::actual_launch_machine_t & /*vect_machine*/,
+ const std::string & /*proxy_hostname*/)
{
return "";
}
void
-SALOME_ContainerManager::LogConfiguration(const std::string & log_type,
- const std::string & exe_type,
- const std::string & container_name,
- const std::string & hostname,
- std::string & begin,
- std::string & end)
+SALOME_ContainerManager::LogConfiguration(const std::string & /*log_type*/,
+ const std::string & /*exe_type*/,
+ const std::string & /*container_name*/,
+ const std::string & /*hostname*/,
+ std::string & /*begin*/,
+ std::string & /*end*/)
{
}
CORBA::Object_ptr
-SALOME_ContainerManager::LaunchPaCOProxyContainer(const std::string& command,
- const Engines::ContainerParameters& params,
- const std::string& hostname)
+SALOME_ContainerManager::LaunchPaCOProxyContainer(const std::string& /*command*/,
+ const Engines::ContainerParameters& /*params*/,
+ const std::string& /*hostname*/)
{
CORBA::Object_ptr ret = CORBA::Object::_nil();
return ret;
}
bool
-SALOME_ContainerManager::LaunchPaCONodeContainer(const std::string& command,
- const Engines::ContainerParameters& params,
- const std::string& name,
- SALOME_ContainerManager::actual_launch_machine_t & vect_machine)
+SALOME_ContainerManager::LaunchPaCONodeContainer(const std::string& /*command*/,
+ const Engines::ContainerParameters& /*params*/,
+ const std::string& /*name*/,
+ SALOME_ContainerManager::actual_launch_machine_t & /*vect_machine*/)
{
return false;
}
CORBA::Octet *buf;
buf = Engines::fileBlock::allocbuf(FILEBLOCK_SIZE);
- int nbRed = fread(buf, sizeof(CORBA::Octet), FILEBLOCK_SIZE, fp);
+ size_t nbRed = fread(buf, sizeof(CORBA::Octet), FILEBLOCK_SIZE, fp);
//SCRUTE(nbRed);
- aBlock->replace(nbRed, nbRed, buf, 1); // 1 means give ownership
+ aBlock->replace((CORBA::ULong)nbRed, (CORBA::ULong)nbRed, buf, 1); // 1 means give ownership
return aBlock;
}
HDFfile *hdf_file;
HDFgroup *hdf_group;
HDFdataset *hdf_dataset;
- int size;
+ size_t size;
int fd;
char * value;
char * buffer;
std::string text = "open failed";
es.text = CORBA::string_dup(text.c_str());
throw SALOME::SALOME_Exception(es);
- };
+ }
hdf_dataset->ReadFromDisk(buffer);
- if ( write(fd,buffer,size) <0) {
+ if ( write(fd,buffer,(unsigned int)size) <0) {
SALOME::ExceptionStruct es;
es.type = SALOME::INTERNAL_ERROR;
std::string text = "write failed";
es.text = CORBA::string_dup(text.c_str());
throw SALOME::SALOME_Exception(es);
- };
+ }
// Close the target file
::close(fd);
std::string cp_file_name(comp_file_name);
std::size_t index = cp_file_name.rfind("/");
- if (index != -1)
+ if (index != std::string::npos)
{
file_name = cp_file_name.substr(index+1);
path = cp_file_name.substr(0,index+1);
std::string cp_file_name(comp_file_name);
std::size_t index = cp_file_name.rfind("/");
- if (index != -1)
+ if (index != std::string::npos)
{
file_name = cp_file_name.substr(index+1);
path = cp_file_name.substr(0,index+1);
*/
//=============================================================================
void
-Salome_file_i::removeFile(const char* file_name)
+Salome_file_i::removeFile(const char* /*file_name*/)
{
MESSAGE("Salome_file_i::removeFile : NOT YET IMPLEMENTED");
}
Salome_file_i::getFilesInfos() {
Engines::files * infos = new Engines::files();
- infos->length(_fileManaged.size());
+ infos->length((CORBA::ULong)_fileManaged.size());
_t_fileManaged::iterator begin = _fileManaged.begin();
_t_fileManaged::iterator end = _fileManaged.end();
// see Advanced CORBA Programming with C++ pp 187-194
CORBA::Octet *buf;
buf = Engines::fileBlock::allocbuf(FILEBLOCK_SIZE);
- int nbRed = fread(buf, sizeof(CORBA::Octet), FILEBLOCK_SIZE, fp);
- aBlock->replace(nbRed, nbRed, buf, 1); // 1 means give ownership
+ size_t nbRed = fread(buf, sizeof(CORBA::Octet), FILEBLOCK_SIZE, fp);
+ aBlock->replace((CORBA::ULong)nbRed, (CORBA::ULong)nbRed, buf, 1); // 1 means give ownership //!< TODO: conversion from size_t to CORBA::ULong
return aBlock;
}
std::cerr << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << std::endl;
std::cerr << "Test of getFilesInfos()" << std::endl;
all_infos = file.getFilesInfos();
- for (int i = 0; i < all_infos->length(); i++)
+ for (int i = 0; i < (int)all_infos->length(); i++)
{
print_infos(&((*all_infos)[i]));
}
std::cerr << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" << std::endl;
std::cerr << "Test of getFilesInfos()" << std::endl;
all_infos = file.getFilesInfos();
- for (int i = 0; i < all_infos->length(); i++)
+ for (int i = 0; i < (int)all_infos->length(); i++)
{
print_infos(&((*all_infos)[i]));
}
file4.load("test.hdf");
all_infos = file4.getFilesInfos();
- for (int i = 0; i < all_infos->length(); i++)
+ for (int i = 0; i < (int)all_infos->length(); i++)
{
print_infos(&((*all_infos)[i]));
}
print_state(state);
file5.load("test2.hdf");
all_infos = file5.getFilesInfos();
- for (int i = 0; i < all_infos->length(); i++)
+ for (int i = 0; i < (int)all_infos->length(); i++)
{
print_infos(&((*all_infos)[i]));
}
//Returns a number of existent documents
int DF_Application::NbDocuments()
{
- return _documents.size();
+ return (int)_documents.size() ;
}
//Restores a Document from the given file, returns a smart
//pointer to opened document.
-DF_Document* DF_Application::Open(const std::string& theFileName)
+DF_Document* DF_Application::Open(const std::string& /*theFileName*/)
{
//Not implemented
return NULL;
//Saves a Document in a given file with name theFileName
-void DF_Application::SaveAs(const DF_Document* theDocument, const std::string& theFileName)
+void DF_Application::SaveAs(const DF_Document* /*theDocument*/, const std::string& /*theFileName*/)
{
//Not implemented
}
//Constructor
Standard_EXPORT DF_Application();
- Standard_EXPORT ~DF_Application();
+ Standard_EXPORT virtual ~DF_Application();
//Creates a new document with given type, returns a smart pointer to
//newly created document.
if(node) vn.push_back(node);
}
- for(int i = 0, len = vn.size(); i<len; i++)
+ for(size_t i = 0, len = vn.size(); i<len; i++)
delete vn[i];
_root._node->Reset();
//Restores a content of the Document from the std::string theData
-void DF_Document::Load(const std::string& theData)
+void DF_Document::Load(const std::string& /*theData*/)
{
//Not implemented
}
//Constructor
Standard_EXPORT DF_Document(const std::string& theDocumentType);
- Standard_EXPORT ~DF_Document();
+ Standard_EXPORT virtual ~DF_Document();
Standard_EXPORT DF_Application* GetApplication();
std::vector<DF_Attribute*> va = GetAttributes();
_node->_attributes.clear();
- for(int i = 0, len = va.size(); i<len; i++) {
+ for(size_t i = 0, len = va.size(); i<len; i++) {
va[i]->BeforeForget();
delete va[i];
}
sorted.push_back(p->first);
sort(sorted.begin(), sorted.end());
- int len = sorted.size();
- for(int i = 0; i<len; i++)
+ size_t len = sorted.size();
+ for(size_t i = 0; i<len; i++)
attributes.push_back(_node->_attributes[sorted[i]]);
return attributes;
for(AI p = _attributes.begin(); p!=_attributes.end(); p++)
va.push_back(p->second);
- for(int i = 0, len = va.size(); i<len; i++)
+ for(size_t i = 0, len = va.size(); i<len; i++)
delete va[i];
_attributes.clear();
for(AI p = _attributes.begin(); p!=_attributes.end(); p++)
va.push_back(p->second);
- for(int i = 0, len = va.size(); i<len; i++)
+ for(size_t i = 0, len = va.size(); i<len; i++)
delete va[i];
_attributes.clear();
struct tm transfert;
struct timeval tval;
struct timezone tzone;
- int status;
-
- status = gettimeofday( &tval, &tzone );
+
+ gettimeofday( &tval, &tzone );
memcpy(&transfert, localtime((time_t *)&tval.tv_sec), sizeof(tm));
month = transfert.tm_mon + 1;
}
-int main (int argc, char * argv[])
+int main ()
{
std::cout << "Test started " << std::endl;
PortableServer::ObjectId * contId,
const char *instanceName,
const char *interfaceName,
- bool notif) : Engines_Component_i(orb,
- poa,
- contId,
- instanceName,
- interfaceName)
+ bool /*notif*/) : Engines_Component_i(orb,
+ poa,
+ contId,
+ instanceName,
+ interfaceName)
{
#ifdef MYDEBUG
std::cerr << "--Engines_DSC_i: MARK 1 --" << instanceName << "----" << std::endl;
virtual void add_provides_port(Ports::Port_ptr ref,
const char* provides_port_name,
Ports::PortProperties_ptr port_prop)
- throw (Engines::DSC::PortAlreadyDefined,
- Engines::DSC::NilPort,
- Engines::DSC::BadProperty) {
+ {
Engines_DSC_interface::add_provides_port(ref,
provides_port_name,
port_prop);
virtual void add_uses_port(const char* repository_id,
const char* uses_port_name,
Ports::PortProperties_ptr port_prop)
- throw (Engines::DSC::PortAlreadyDefined,
- Engines::DSC::BadProperty) {
+ {
Engines_DSC_interface::add_uses_port(repository_id,
uses_port_name,
port_prop);
*/
virtual Ports::Port_ptr get_provides_port(const char* provides_port_name,
const CORBA::Boolean connection_error)
- throw (Engines::DSC::PortNotDefined,
- Engines::DSC::PortNotConnected) {
+ {
return Engines_DSC_interface::get_provides_port(provides_port_name,
connection_error);
}
* \see Engines::DSC::get_uses_port
*/
virtual Engines::DSC::uses_port * get_uses_port(const char* uses_port_name)
- throw (Engines::DSC::PortNotDefined,
- Engines::DSC::PortNotConnected) {
+ {
return Engines_DSC_interface::get_uses_port(uses_port_name);
}
* \see Engines::DSC::connect_provides_port
*/
virtual void connect_provides_port(const char* provides_port_name)
- throw (Engines::DSC::PortNotDefined) {
+ {
Engines_DSC_interface::connect_provides_port(provides_port_name);
}
*/
virtual void connect_uses_port(const char* uses_port_name,
Ports::Port_ptr provides_port_ref)
- throw (Engines::DSC::PortNotDefined,
- Engines::DSC::BadPortType,
- Engines::DSC::NilPort) {
- Engines_DSC_interface::connect_uses_port(uses_port_name,
- provides_port_ref);
- }
+ {
+ Engines_DSC_interface::connect_uses_port(uses_port_name,
+ provides_port_ref);
+ }
/*!
* \see Engines::DSC::is_connected
*/
virtual CORBA::Boolean is_connected(const char* port_name)
- throw (Engines::DSC::PortNotDefined) {
+ {
return Engines_DSC_interface::is_connected(port_name);
}
*/
virtual void disconnect_provides_port(const char* provides_port_name,
const Engines::DSC::Message message)
- throw (Engines::DSC::PortNotDefined,
- Engines::DSC::PortNotConnected) {
+ {
Engines_DSC_interface::disconnect_provides_port(provides_port_name,
message);
}
virtual void disconnect_uses_port(const char* uses_port_name,
Ports::Port_ptr provides_port_ref,
const Engines::DSC::Message message)
- throw (Engines::DSC::PortNotDefined,
- Engines::DSC::PortNotConnected,
- Engines::DSC::BadPortReference) {
+ {
Engines_DSC_interface::disconnect_uses_port(uses_port_name,
provides_port_ref,
message);
* \see Engines::DSC::get_port_properties
*/
virtual Ports::PortProperties_ptr get_port_properties(const char* port_name)
- throw (Engines::DSC::PortNotDefined) {
+ {
return Engines_DSC_interface::get_port_properties(port_name);
}
};
Engines_DSC_interface::add_provides_port(Ports::Port_ptr ref,
const char* provides_port_name,
Ports::PortProperties_ptr port_prop)
-throw (Engines::DSC::PortAlreadyDefined,
- Engines::DSC::NilPort,
- Engines::DSC::BadProperty)
{
// Method args test
assert(provides_port_name);
Engines_DSC_interface::add_uses_port(const char* repository_id,
const char* uses_port_name,
Ports::PortProperties_ptr port_prop)
-throw (Engines::DSC::PortAlreadyDefined,
- Engines::DSC::BadProperty)
{
// Method args test
// Note : We can't be shure that repository id
Ports::Port_ptr
Engines_DSC_interface::get_provides_port(const char* provides_port_name,
const CORBA::Boolean connection_error)
- throw (Engines::DSC::PortNotDefined,
- Engines::DSC::PortNotConnected,
- Engines::DSC::BadPortType)
{
// Method arg test
assert(provides_port_name);
Engines::DSC::uses_port *
Engines_DSC_interface::get_uses_port(const char* uses_port_name)
- throw (Engines::DSC::PortNotDefined,
- Engines::DSC::PortNotConnected,
- Engines::DSC::BadPortType)
{
// Method arg test
assert(uses_port_name);
void
Engines_DSC_interface::connect_provides_port(const char* provides_port_name)
- throw (Engines::DSC::PortNotDefined)
{
// Method arg test
assert(provides_port_name);
void
Engines_DSC_interface::connect_uses_port(const char* uses_port_name,
Ports::Port_ptr provides_port_ref)
- throw (Engines::DSC::PortNotDefined,
- Engines::DSC::BadPortType,
- Engines::DSC::NilPort)
{
// Method arg test
assert(uses_port_name);
CORBA::Boolean
Engines_DSC_interface::is_connected(const char* port_name)
- throw (Engines::DSC::PortNotDefined)
{
CORBA::Boolean rtn = false;
void
Engines_DSC_interface::disconnect_provides_port(const char* provides_port_name,
const Engines::DSC::Message message)
-throw (Engines::DSC::PortNotDefined,
- Engines::DSC::PortNotConnected)
{
// Method args test
assert(provides_port_name);
Engines_DSC_interface::disconnect_uses_port(const char* uses_port_name,
Ports::Port_ptr provides_port_ref,
const Engines::DSC::Message message)
-throw (Engines::DSC::PortNotDefined,
- Engines::DSC::PortNotConnected,
- Engines::DSC::BadPortReference)
{
// Method args test
assert(uses_port_name);
if (my_ports[uses_port_name]->connection_nbr > 0) {
CORBA::Long port_index = -1;
CORBA::ULong seq_length = my_ports[uses_port_name]->uses_port_refs.length();
- for(int i = 0; i < seq_length; i++)
+ for(int i = 0; i < (int)seq_length; i++)
{
if (my_ports[uses_port_name]->uses_port_refs[i]->_is_equivalent(provides_port_ref))
{
int index_ancien = 0;
int index_nouveau = 0;
- for(;index_ancien < seq_length;) {
+ for(;index_ancien < (int)seq_length;) {
if (index_ancien == port_index)
{
// Rien a faire !
Ports::PortProperties_ptr
Engines_DSC_interface::get_port_properties(const char* port_name)
- throw (Engines::DSC::PortNotDefined)
{
Ports::PortProperties_ptr rtn_properties = Ports::PortProperties::_nil();
*/
virtual void add_provides_port(Ports::Port_ptr ref,
const char* provides_port_name,
- Ports::PortProperties_ptr port_prop)
- throw (Engines::DSC::PortAlreadyDefined,
- Engines::DSC::NilPort,
- Engines::DSC::BadProperty);
+ Ports::PortProperties_ptr port_prop);
/*!
* \see Engines::DSC::add_uses_port
*/
virtual void add_uses_port(const char* repository_id,
const char* uses_port_name,
- Ports::PortProperties_ptr port_prop)
- throw (Engines::DSC::PortAlreadyDefined,
- Engines::DSC::BadProperty);
+ Ports::PortProperties_ptr port_prop);
/*!
* \see Engines::DSC::get_provides_port
*/
virtual Ports::Port_ptr get_provides_port(const char* provides_port_name,
- const CORBA::Boolean connection_error)
- throw (Engines::DSC::PortNotDefined,
- Engines::DSC::PortNotConnected,
- Engines::DSC::BadPortType);
+ const CORBA::Boolean connection_error);
/*!
* \see Engines::DSC::get_uses_port
*/
- virtual Engines::DSC::uses_port * get_uses_port(const char* uses_port_name)
- throw (Engines::DSC::PortNotDefined,
- Engines::DSC::PortNotConnected,
- Engines::DSC::BadPortType);
+ virtual Engines::DSC::uses_port * get_uses_port(const char* uses_port_name);
/*!
* \see Engines::DSC::connect_provides_port
* port doesn't know its uses ports references. It's framework or application role
* to manage connections between ports.
*/
- virtual void connect_provides_port(const char* provides_port_name)
- throw (Engines::DSC::PortNotDefined);
+ virtual void connect_provides_port(const char* provides_port_name);
/*!
* \see Engines::DSC::connect_uses_port
* port how much provides ports are connected with.
*/
virtual void connect_uses_port(const char* uses_port_name,
- Ports::Port_ptr provides_port_ref)
- throw (Engines::DSC::PortNotDefined,
- Engines::DSC::BadPortType,
- Engines::DSC::NilPort);
+ Ports::Port_ptr provides_port_ref);
/*!
* \see Engines::DSC::is_connected
*/
- virtual CORBA::Boolean is_connected(const char* port_name)
- throw (Engines::DSC::PortNotDefined);
+ virtual CORBA::Boolean is_connected(const char* port_name);
/*!
* \see Engines::DSC::disconnect_provides_port
* to manage connections between ports.
*/
virtual void disconnect_provides_port(const char* provides_port_name,
- const Engines::DSC::Message message)
- throw (Engines::DSC::PortNotDefined,
- Engines::DSC::PortNotConnected);
+ const Engines::DSC::Message message);
/*!
* \see Engines::DSC::disconnect_uses_port
*/
virtual void disconnect_uses_port(const char* uses_port_name,
Ports::Port_ptr provides_port_ref,
- const Engines::DSC::Message message)
- throw (Engines::DSC::PortNotDefined,
- Engines::DSC::PortNotConnected,
- Engines::DSC::BadPortReference);
+ const Engines::DSC::Message message);
/*!
* \see Engines::DSC::get_port_properties
*/
- virtual Ports::PortProperties_ptr get_port_properties(const char* port_name)
- throw (Engines::DSC::PortNotDefined);
+ virtual Ports::PortProperties_ptr get_port_properties(const char* port_name);
static void writeEvent(const char* request,const std::string& containerName, const char* instance_name,
const char* port_name, const char* error, const char* message);
PortProperties_i::~PortProperties_i() {}
void
-PortProperties_i::set_property(const char * name, const CORBA::Any& value)
- throw (Ports::NotDefined, Ports::BadType)
+PortProperties_i::set_property(const char* /*name*/, const CORBA::Any& /*value*/)
{
// Default case, the object has no properties.
throw Ports::NotDefined();
}
CORBA::Any*
-PortProperties_i::get_property(const char* name)
- throw (Ports::NotDefined)
+PortProperties_i::get_property(const char* /*name*/)
{
// Default case, the object has no properties.
throw Ports::NotDefined();
* CORBA method : set a value to a property
* \see Ports::PortProperties::set_property
*/
- virtual void set_property(const char * name,
- const CORBA::Any& value)
- throw (Ports::NotDefined, Ports::BadType);
+ virtual void set_property(const char* name,
+ const CORBA::Any& value);
/*!
* CORBA method : get the value of a property
* \see Ports::PortProperties::get_property
*/
- virtual CORBA::Any* get_property(const char* name)
- throw (Ports::NotDefined);
+ virtual CORBA::Any* get_property(const char* name);
};
#endif
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-FIND_PACKAGE(SWIG REQUIRED)
INCLUDE(${SWIG_USE_FILE})
SET_SOURCE_FILES_PROPERTIES(calcium.i PROPERTIES CPLUSPLUS ON)
std::cerr << "data_short_port_uses::put is NULL" << std::endl;
else
{
- for(int i = 0; i < _my_ports->length(); i++)
+ for(int i = 0; i < (int)_my_ports->length(); i++) //TODO: mismatch signed/unsigned
{
Ports::Data_Short_Port_ptr port = Ports::Data_Short_Port::_narrow((*_my_ports)[i]);
port->put(data);
void
data_short_port_uses::uses_port_changed(Engines::DSC::uses_port * new_uses_port,
- const Engines::DSC::Message message)
+ const Engines::DSC::Message /*message*/)
{
if (_my_ports)
delete _my_ports;
* \param message message associated to the modification.
*/
virtual void uses_port_changed(Engines::DSC::uses_port * new_uses_port,
- const Engines::DSC::Message message);
+ const Engines::DSC::Message /*message*/);
private :
Engines::DSC::uses_port * _my_ports;
_what = oss;
}
- virtual const char* what( void ) const throw ()
+ virtual const char* what( void ) const noexcept
{
return _what.c_str() ;
}
// Le destructeur de la SALOME_Exception devrait être virtuel
// sinon pb avec nos attributs de type pointeur.
- virtual ~DSC_Exception(void) throw() {};
+ virtual ~DSC_Exception(void) noexcept {};
virtual const std::string & getExceptionName() const {return _exceptionName;};
) : DSC_Exception(text,fileName,lineNumber,funcName) { \
_exceptionName = #Derived; \
} \
- virtual ~Derived(void) throw();\
+ virtual ~Derived(void) noexcept;\
};\
//Sert à eviter le problème d'identification RTTI des exceptions
//Crée un unique typeInfo pour tous les bibliothèques composants SALOME
//dans un fichier cxx
-#define DSC_EXCEPTION_CXX(NameSpace,Derived) NameSpace::Derived::~Derived(void) throw() {};
+#define DSC_EXCEPTION_CXX(NameSpace,Derived) NameSpace::Derived::~Derived(void) noexcept {}
#endif /* DSC_EXCEPTION_HXX */
Engines::Container_ptr contain,
const char *instanceName,
const char *interfaceName,
- bool notif) :
+ bool /*notif*/) :
Superv_Component_i(orb, poa,contain, instanceName, interfaceName,false,false)
{
}
if(std::string(mode) == "IN")
{
- provides_port * port ;
+ provides_port * port = 0;
//provides port
try
{
}
else if(std::string(mode) == "OUT")
{
- uses_port * uport ;
+ uses_port * uport = 0;
try
{
uport = compo->create_uses_data_port(type);
const char *interfaceName,
bool notif = false);
virtual ~PySupervCompo();
- CORBA::Boolean init_service(const char * service_name){return true;};
- CORBA::Boolean init_service_with_multiple(const char* service_name,
- const Engines::Superv_Component::seq_multiple_param & params)
+ CORBA::Boolean init_service(const char * /*service_name*/){return true;};
+ CORBA::Boolean init_service_with_multiple(const char* /*service_name*/,
+ const Engines::Superv_Component::seq_multiple_param & /*params*/)
{
return true;
}
/* std::cerr << "-------- CalciumInterface(C Part) MARK 3 ------------------" << std::endl; */ \
\
return info; \
- }; \
+ } \
void ecp_##_name##_free ( _type _qual * data) { \
ecp_lecture_##_typeName##_free(data); \
- };
+ }
/* L'interface de cette routine diffère de celle obtenue par la macro :
size_t _nRead;
long _i=*i;
+ (void)strSize; // unused parameter
fflush(stdout);fflush(stderr);
InfoType info = ecp_lecture_str (component, mode, ti, tf, &_i,
*nRead=_nRead;
fflush(stdout);fflush(stderr);
return info;
-};
+}
void ecp_lch_free (char* * data) { \
ecp_lecture_str_free(data); \
-};
+}
#define STAR *
/*REVERIFIER MAINTENANT 0 COPY avec int2integer*/
-CALCIUM_EXT_LECT_INTERFACE_C_(len,float,int,int2integer,);
-CALCIUM_EXT_LECT_INTERFACE_C_(lre,float,float,float,);
+CALCIUM_EXT_LECT_INTERFACE_C_(len,float,int,int2integer,)
+CALCIUM_EXT_LECT_INTERFACE_C_(lre,float,float,float,)
/*Permet d'envoyer/recevoir des réels sur un port Double */
-CALCIUM_EXT_LECT_INTERFACE_C_(lrd,float ,float ,float2double,);
-CALCIUM_EXT_LECT_INTERFACE_C_(ldb,double,double,double,);
+CALCIUM_EXT_LECT_INTERFACE_C_(lrd,float ,float ,float2double,)
+CALCIUM_EXT_LECT_INTERFACE_C_(ldb,double,double,double,)
-CALCIUM_EXT_LECT_INTERFACE_C_(llo,float,int,bool,);
-CALCIUM_EXT_LECT_INTERFACE_C_(lcp,float,float,cplx,);
+CALCIUM_EXT_LECT_INTERFACE_C_(llo,float,int,bool,)
+CALCIUM_EXT_LECT_INTERFACE_C_(lcp,float,float,cplx,)
/* CALCIUM_EXT_LECT_INTERFACE_C_(lch,float,char,STAR[]); */
fflush(stderr); \
\
return info; \
- }; \
+ } \
void cp_##_name##_free ( _type _qual * data) { \
ecp_lecture_##_typeName##_free(data); \
- };
+ }
/* L'interface de cette routine diffère de celle obtenue par la macro :
/* CALCIUM_LECT_INTERFACE_C_( <suffixe du nom de l'interface à générer>, <type du paramètre temporel>, <type d'entier à utiliser pour les paramètres de type entier>,
<type de données>, <nom de l'interface C2CPP à utiliser>, <qualificateur de type optionnel des données>,<paramètres supplémentaire ignoré>)*/
-CALCIUM_LECT_INTERFACE_C_(len,float ,int,int ,int2integer,,);
+CALCIUM_LECT_INTERFACE_C_(len,float ,int,int ,int2integer,,)
/*llg ne fonctionnera pas toujours correctement (port calcium_integer) si sizeof(long) == 64 bits && cal_int==int (32 bits)
sinon problème de conversion de 64bits vers 32bits */
-CALCIUM_LECT_INTERFACE_C_(llg,float ,int,long ,long2integer,,);
+CALCIUM_LECT_INTERFACE_C_(llg,float ,int,long ,long2integer,,)
-CALCIUM_LECT_INTERFACE_C_(lln,float ,int,long ,long,,);
+CALCIUM_LECT_INTERFACE_C_(lln,float ,int,long ,long,,)
-CALCIUM_LECT_INTERFACE_C_(lre,float ,int,float ,float,,);
+CALCIUM_LECT_INTERFACE_C_(lre,float ,int,float ,float,,)
/*Permet d'envoyer/recevoir des réels sur un port Double */
-CALCIUM_LECT_INTERFACE_C_(lrd,float ,int,float ,float2double,,);
-CALCIUM_LECT_INTERFACE_C_(ldb,double,int,double ,double,,);
+CALCIUM_LECT_INTERFACE_C_(lrd,float ,int,float ,float2double,,)
+CALCIUM_LECT_INTERFACE_C_(ldb,double,int,double ,double,,)
-CALCIUM_LECT_INTERFACE_C_(llo,float ,int,int ,bool,,);
-CALCIUM_LECT_INTERFACE_C_(lcp,float ,int,float ,cplx,,);
+CALCIUM_LECT_INTERFACE_C_(llo,float ,int,int ,bool,,)
+CALCIUM_LECT_INTERFACE_C_(lcp,float ,int,float ,cplx,,)
#define STAR *
#define LCH_LAST_PARAM ,int strsize
-CALCIUM_LECT_INTERFACE_C_(lch,float ,int,char ,str,STAR, LCH_LAST_PARAM );
+CALCIUM_LECT_INTERFACE_C_(lch,float ,int,char ,str,STAR, LCH_LAST_PARAM )
/* Definition des méthodes calcium destinées à l'interfaçage fortran
avec une taille des INTEGER fortran paramétrés à la configuration du KERNEL */
-CALCIUM_LECT_INTERFACE_C_(len_fort_,float ,cal_int,cal_int ,integer,,);
-CALCIUM_LECT_INTERFACE_C_(lin_fort_,float ,cal_int,int ,int2integer,,);
+CALCIUM_LECT_INTERFACE_C_(len_fort_,float ,cal_int,cal_int ,integer,,)
+CALCIUM_LECT_INTERFACE_C_(lin_fort_,float ,cal_int,int ,int2integer,,)
/*llg_fort_ ne fonctionnera pas toujours correctement (port calcium_integer) si sizeof(long) == 64 bits && cal_int==int (32 bits)
sinon problème de conversion de 64bits vers 32bits */
-CALCIUM_LECT_INTERFACE_C_(llg_fort_,float ,cal_int,long ,long2integer,,);
+CALCIUM_LECT_INTERFACE_C_(llg_fort_,float ,cal_int,long ,long2integer,,)
-CALCIUM_LECT_INTERFACE_C_(lre_fort_,float ,cal_int,float ,float,,);
-CALCIUM_LECT_INTERFACE_C_(lrd_fort_,float ,cal_int,float ,float2double,,);
-CALCIUM_LECT_INTERFACE_C_(ldb_fort_,double,cal_int,double ,double,,);
-CALCIUM_LECT_INTERFACE_C_(llo_fort_,float ,cal_int,int ,bool,,); /*int pour bool ou cal_int */
-CALCIUM_LECT_INTERFACE_C_(lcp_fort_,float ,cal_int,float ,cplx,,);
-CALCIUM_LECT_INTERFACE_C_(lch_fort_,float ,cal_int,char ,str,STAR, LCH_LAST_PARAM );
+CALCIUM_LECT_INTERFACE_C_(lre_fort_,float ,cal_int,float ,float,,)
+CALCIUM_LECT_INTERFACE_C_(lrd_fort_,float ,cal_int,float ,float2double,,)
+CALCIUM_LECT_INTERFACE_C_(ldb_fort_,double,cal_int,double ,double,,)
+CALCIUM_LECT_INTERFACE_C_(llo_fort_,float ,cal_int,int ,bool,,) /*int pour bool ou cal_int */
+CALCIUM_LECT_INTERFACE_C_(lcp_fort_,float ,cal_int,float ,cplx,,)
+CALCIUM_LECT_INTERFACE_C_(lch_fort_,float ,cal_int,char ,str,STAR, LCH_LAST_PARAM )
-CALCIUM_LECT_INTERFACE_C_(lln_fort_,float ,cal_int,long ,long,,);
+CALCIUM_LECT_INTERFACE_C_(lln_fort_,float ,cal_int,long ,long,,)
/**********************************************/
/* INTERFACES DE DÉBUT ET DE FIN DE COUPLAGE */
fflush(stderr); \
\
return info; \
- }; \
+ } \
/* Definition des méthodes calcium standard */
/* CALCIUM_ECR_INTERFACE_C_(_name,_timeType,_calInt,type,_typeName,_qual) */
-CALCIUM_ECR_INTERFACE_C_(een,float ,int,int ,int2integer,,);
+CALCIUM_ECR_INTERFACE_C_(een,float ,int,int ,int2integer,,)
/*elg ne fonctionnera pas toujours correctement (port calcium_integer) si sizeof(long) == 64 bits && cal_int==int (32 bits)
sinon problème de conversion de 64bits vers 32bits */
-CALCIUM_ECR_INTERFACE_C_(elg,float ,int,long ,long2integer,,);
-CALCIUM_ECR_INTERFACE_C_(ere,float ,int,float ,float,,);
+CALCIUM_ECR_INTERFACE_C_(elg,float ,int,long ,long2integer,,)
+CALCIUM_ECR_INTERFACE_C_(ere,float ,int,float ,float,,)
/*Permet d'envoyer/recevoir des réels sur un port Double */
-CALCIUM_ECR_INTERFACE_C_(erd,float ,int,float ,float2double,,);
-CALCIUM_ECR_INTERFACE_C_(edb,double,int,double,double,,);
+CALCIUM_ECR_INTERFACE_C_(erd,float ,int,float ,float2double,,)
+CALCIUM_ECR_INTERFACE_C_(edb,double,int,double,double,,)
-CALCIUM_ECR_INTERFACE_C_(elo,float ,int,int ,bool,,);
-CALCIUM_ECR_INTERFACE_C_(ecp,float ,int,float ,cplx,,);
-CALCIUM_ECR_INTERFACE_C_(ech,float ,int,char ,str,STAR,LCH_LAST_PARAM );
+CALCIUM_ECR_INTERFACE_C_(elo,float ,int,int ,bool,,)
+CALCIUM_ECR_INTERFACE_C_(ecp,float ,int,float ,cplx,,)
+CALCIUM_ECR_INTERFACE_C_(ech,float ,int,char ,str,STAR,LCH_LAST_PARAM )
-CALCIUM_ECR_INTERFACE_C_(eln,float ,int,long ,long,,);
+CALCIUM_ECR_INTERFACE_C_(eln,float ,int,long ,long,,)
/* Definition des méthodes calcium destinées à l'interfaçage fortran
avec une taille des INTEGER fortran paramétrés à la configuration du KERNEL */
-CALCIUM_ECR_INTERFACE_C_(een_fort_,float ,cal_int,cal_int,integer,,);
+CALCIUM_ECR_INTERFACE_C_(een_fort_,float ,cal_int,cal_int,integer,,)
/*elg_fort_ ne fonctionnera pas toujours correctement (port calcium_integer) si sizeof(long) == 64 bits && cal_int==int (32 bits)
sinon problème de conversion de 64bits vers 32bits */
-CALCIUM_ECR_INTERFACE_C_(elg_fort_,float ,cal_int,long ,long2integer,,);
-CALCIUM_ECR_INTERFACE_C_(ein_fort_,float ,cal_int,int ,int2integer,,);
-CALCIUM_ECR_INTERFACE_C_(ere_fort_,float ,cal_int,float ,float,,);
-CALCIUM_ECR_INTERFACE_C_(erd_fort_,float ,cal_int,float ,float2double,,);
-CALCIUM_ECR_INTERFACE_C_(edb_fort_,double,cal_int,double,double,,);
-CALCIUM_ECR_INTERFACE_C_(elo_fort_,float ,cal_int,int ,bool,,);
-CALCIUM_ECR_INTERFACE_C_(ecp_fort_,float ,cal_int,float ,cplx,,);
-CALCIUM_ECR_INTERFACE_C_(ech_fort_,float ,cal_int,char ,str,STAR,LCH_LAST_PARAM );
-
-CALCIUM_ECR_INTERFACE_C_(eln_fort_,float ,cal_int,long ,long,,);
+CALCIUM_ECR_INTERFACE_C_(elg_fort_,float ,cal_int,long ,long2integer,,)
+CALCIUM_ECR_INTERFACE_C_(ein_fort_,float ,cal_int,int ,int2integer,,)
+CALCIUM_ECR_INTERFACE_C_(ere_fort_,float ,cal_int,float ,float,,)
+CALCIUM_ECR_INTERFACE_C_(erd_fort_,float ,cal_int,float ,float2double,,)
+CALCIUM_ECR_INTERFACE_C_(edb_fort_,double,cal_int,double,double,,)
+CALCIUM_ECR_INTERFACE_C_(elo_fort_,float ,cal_int,int ,bool,,)
+CALCIUM_ECR_INTERFACE_C_(ecp_fort_,float ,cal_int,float ,cplx,,)
+CALCIUM_ECR_INTERFACE_C_(ech_fort_,float ,cal_int,char ,str,STAR,LCH_LAST_PARAM )
+
+CALCIUM_ECR_INTERFACE_C_(eln_fort_,float ,cal_int,long ,long,,)
/***************************/
/* Interface for cleaning */
le manipulateur de données d'effectuer une recopie (qui fonctionne si les types sont compatibles).
*/
// CALCIUM_C2CPP_INTERFACE_CXX_(_name,_porttype,_type,_qual)
-CALCIUM_C2CPP_INTERFACE_CXX_(intc,int,int,);
-CALCIUM_C2CPP_INTERFACE_CXX_(long,long,long,);
+CALCIUM_C2CPP_INTERFACE_CXX_(intc,int,int,)
+CALCIUM_C2CPP_INTERFACE_CXX_(long,long,long,)
-CALCIUM_C2CPP_INTERFACE_CXX_(integer,integer,cal_int,);
-CALCIUM_C2CPP_INTERFACE_CXX_(int2integer ,integer, int,);
-CALCIUM_C2CPP_INTERFACE_CXX_(long2integer, integer, long,);
+CALCIUM_C2CPP_INTERFACE_CXX_(integer,integer,cal_int,)
+CALCIUM_C2CPP_INTERFACE_CXX_(int2integer ,integer, int,)
+CALCIUM_C2CPP_INTERFACE_CXX_(long2integer, integer, long,)
-CALCIUM_C2CPP_INTERFACE_CXX_(float,float,float, );
-CALCIUM_C2CPP_INTERFACE_CXX_(double,double,double,);
+CALCIUM_C2CPP_INTERFACE_CXX_(float,float,float, )
+CALCIUM_C2CPP_INTERFACE_CXX_(double,double,double,)
-CALCIUM_C2CPP_INTERFACE_CXX_(float2double,double,float, );
+CALCIUM_C2CPP_INTERFACE_CXX_(float2double,double,float, )
/* Fonnctionne mais essai suivant pour simplification de Calcium.c CALCIUM_C2CPP_INTERFACE_(bool,bool,);*/
-CALCIUM_C2CPP_INTERFACE_CXX_(bool,bool,int,);
-CALCIUM_C2CPP_INTERFACE_CXX_(cplx,cplx,float,);
-CALCIUM_C2CPP_INTERFACE_CXX_(str,str,char*,);
+CALCIUM_C2CPP_INTERFACE_CXX_(bool,bool,int,)
+CALCIUM_C2CPP_INTERFACE_CXX_(cplx,cplx,float,)
+CALCIUM_C2CPP_INTERFACE_CXX_(str,str,char*,)
/* Définition de ecp_fin */
extern "C" CalciumTypes::InfoType
return ex.getInfo();
}
return CalciumTypes::CPOK;
-};
+}
extern "C" CalciumTypes::InfoType
ecp_cd_ (void * component, char * instanceName) {
il sera mappé sur le type int (si il est 32bits). Le type CORBA:LongLong est mappé sur le type long
s'il est 64 bits sinon celà peut être un long long (s'il existe).
*/
-CALCIUM_C2CPP_INTERFACE_HXX_(intc,int,int,);
-CALCIUM_C2CPP_INTERFACE_HXX_(long,long,long,);
+CALCIUM_C2CPP_INTERFACE_HXX_(intc,int,int,)
+CALCIUM_C2CPP_INTERFACE_HXX_(long,long,long,)
-CALCIUM_C2CPP_INTERFACE_HXX_(integer,integer,cal_int,);
-CALCIUM_C2CPP_INTERFACE_HXX_(int2integer,integer,int,);
-CALCIUM_C2CPP_INTERFACE_HXX_(long2integer,integer, long,);
+CALCIUM_C2CPP_INTERFACE_HXX_(integer,integer,cal_int,)
+CALCIUM_C2CPP_INTERFACE_HXX_(int2integer,integer,int,)
+CALCIUM_C2CPP_INTERFACE_HXX_(long2integer,integer, long,)
-CALCIUM_C2CPP_INTERFACE_HXX_(float,float,float, );
-CALCIUM_C2CPP_INTERFACE_HXX_(double,double,double,);
+CALCIUM_C2CPP_INTERFACE_HXX_(float,float,float, )
+CALCIUM_C2CPP_INTERFACE_HXX_(double,double,double,)
-CALCIUM_C2CPP_INTERFACE_HXX_(float2double,double,float, );
+CALCIUM_C2CPP_INTERFACE_HXX_(float2double,double,float, )
/* Fonctionne mais essai suivant pour simplification de Calcium.c CALCIUM_C2CPP_INTERFACE_(bool,bool,);*/
-CALCIUM_C2CPP_INTERFACE_HXX_(bool,bool,int,);
-CALCIUM_C2CPP_INTERFACE_HXX_(cplx,cplx,float,);
-CALCIUM_C2CPP_INTERFACE_HXX_(str,str,char*,);
+CALCIUM_C2CPP_INTERFACE_HXX_(bool,bool,int,)
+CALCIUM_C2CPP_INTERFACE_HXX_(cplx,cplx,float,)
+CALCIUM_C2CPP_INTERFACE_HXX_(str,str,char*,)
/* Déclaration de ecp_fin */
extern "C" CalciumTypes::InfoType ecp_fin_ (void * component, int code);
_interpolationSchem(CalciumTypes::L1_SCHEM),
_extrapolationSchem(CalciumTypes::UNDEFINED_EXTRA_SCHEM),
_alpha(0.0),_deltaT(CalciumTypes::EPSILON),
- _disconnectDirective(CalciumTypes::UNDEFINED_DIRECTIVE){};
+ _disconnectDirective(CalciumTypes::UNDEFINED_DIRECTIVE){}
void CalciumCouplingPolicy::setDependencyType (CalciumTypes::DependencyType dependencyType) {_dependencyType=dependencyType;}
CalciumTypes::DependencyType CalciumCouplingPolicy::getDependencyType () const { return _dependencyType;}
void CalciumCouplingPolicy::setStorageLevel (size_t storageLevel) {
MESSAGE( "CalciumCouplingPolicy::setStorageLevel: " << storageLevel );
- if ( storageLevel < 1 && (storageLevel != CalciumTypes::UNLIMITED_STORAGE_LEVEL) )
+ if ( storageLevel < 1 && (storageLevel != (size_t)CalciumTypes::UNLIMITED_STORAGE_LEVEL) )
throw CalciumException(CalciumTypes::CPRENA,LOC("StorageLevel < 1 is not allowed"));
_storageLevel = storageLevel;
}
_extrapolationSchem=extrapolationSchem;
}
-CalciumTypes::InterpolationSchem CalciumCouplingPolicy::getInterpolationSchem () const { return _interpolationSchem; };
-CalciumTypes::ExtrapolationSchem CalciumCouplingPolicy::getExtrapolationSchem () const { return _extrapolationSchem; };
+CalciumTypes::InterpolationSchem CalciumCouplingPolicy::getInterpolationSchem () const { return _interpolationSchem; }
+CalciumTypes::ExtrapolationSchem CalciumCouplingPolicy::getExtrapolationSchem () const { return _extrapolationSchem; }
CalciumCouplingPolicy::TimeType
template <typename DataManipulator, class EnableIf >
struct CalciumCouplingPolicy::BoundedDataIdProcessor{
- BoundedDataIdProcessor(const CouplingPolicy & couplingPolicy) {};
+ BoundedDataIdProcessor(const CouplingPolicy & /*couplingPolicy*/) {};
template < typename Iterator, typename DataId >
- void inline apply(typename iterator_t<Iterator>::value_type & data,
- const DataId & dataId,
- const Iterator & it1) const {
+ void inline apply(typename iterator_t<Iterator>::value_type & /*data*/,
+ const DataId & /*dataId*/,
+ const Iterator & /*it1*/) const {
typedef typename iterator_t<Iterator>::value_type value_type;
#ifdef MYDEBUG
std::cout << "-------- Calcium Generic BoundedDataIdProcessor.apply() called " << std::endl;
std::cout << "-------- CalciumCouplingPolicy::eraseDataId, storedDatasSize : " << storedDatas.size() << std::endl;
#endif
- if ( _couplingPolicy._storageLevel == CalciumTypes::UNLIMITED_STORAGE_LEVEL ) return;
+ if ( _couplingPolicy._storageLevel == (size_t)CalciumTypes::UNLIMITED_STORAGE_LEVEL ) return;
size_t storedDatasSize = storedDatas.size();
long s = storedDatasSize - _couplingPolicy._storageLevel;
storedDatas.erase(storedDatas.begin());
}
// Si l'itérateur pointait sur une valeur que l'on vient de supprimer
- if (dist < s ) {
+ if (dist < (size_t)s ) {
throw(CalciumException(CalciumTypes::CPNTNULL,LOC(OSS()<< "StorageLevel management "
<< _couplingPolicy._storageLevel <<
" has just removed the data to send")));
namespace CalciumInterface
{
-};
+}
#endif
return;
- };
+ }
template <typename T1> static void
ecp_ecriture ( Superv_Component_i & component,
T1 const & data )
{
ecp_ecriture<T1,T1> (component,dependencyType,t,i,nomVar,bufferLength,data);
- };
+ }
static inline void
ecp_fini(Superv_Component_i & component,const std::string & nomVar,long const & i)
msg << "i<=" << i ;
Engines_DSC_interface::writeEvent("CP_FINI",containerName,componentName,nomVar.c_str(),"",msg.str().c_str());
- };
+ }
static inline void
ecp_fint(Superv_Component_i & component,const std::string & nomVar,double const & t)
msg << "t<=" << t ;
Engines_DSC_interface::writeEvent("CP_FINT",containerName,componentName,nomVar.c_str(),"",msg.str().c_str());
- };
+ }
static inline void
ecp_effi(Superv_Component_i & component,const std::string & nomVar,long const & i)
msg << "i>=" << i ;
Engines_DSC_interface::writeEvent("CP_EFFI",containerName,componentName,nomVar.c_str(),"",msg.str().c_str());
- };
+ }
static inline void
ecp_efft(Superv_Component_i & component,const std::string & nomVar,double const & t)
msg << "t>=" << t ;
Engines_DSC_interface::writeEvent("CP_EFFT",containerName,componentName,nomVar.c_str(),"",msg.str().c_str());
- };
+ }
-};
+}
#endif
DSC_Exception(ex),_info(info),_exceptionName("CalciumException")
{};
- virtual ~CalciumException() throw() {};
+ virtual ~CalciumException() noexcept {};
CalciumTypes::InfoType getInfo() const { return _info;}
void setInfo(CalciumTypes::InfoType info) {_info=info;}
virtual const std::string & getExceptionName() const {return _exceptionName;};
return POA_Ports::PortProperties::_this(); \
} \
\
- virtual void set_property(const char * name, const CORBA::Any& value) \
- throw (Ports::NotDefined, Ports::BadType, Ports::BadValue); \
+ virtual void set_property(const char * name, const CORBA::Any& value); \
\
- virtual CORBA::Any* get_property(const char* name) \
- throw (Ports::NotDefined); \
+ virtual CORBA::Any* get_property(const char* name); \
\
- virtual void provides_port_changed(int connection_nbr, \
+ virtual void provides_port_changed(int /*connection_nbr*/, \
const Engines::DSC::Message message) { \
if ( message == Engines::DSC::AddingConnection) \
{ \
#define CALCIUM_GENERIC_PROVIDES_PORT_CXX(specificPortName) \
\
- specificPortName::~specificPortName(void) {}; \
+ specificPortName::~specificPortName(void) {} \
\
void specificPortName::set_property(const char * name, const CORBA::Any& value) \
- throw (Ports::NotDefined, Ports::BadType, Ports::BadValue) { \
+ { \
\
const std::string key(name); \
CORBA::Long sl; \
\
\
CORBA::Any* specificPortName::get_property(const char* name) \
- throw (Ports::NotDefined) { \
+ { \
const std::string key(name); \
CORBA::Any* value=new CORBA::Any; \
if (key == "StorageLevel" ) \
throw Ports::NotDefined(); \
} \
return value; \
- };
+ }
#endif
if (!this->_my_ports)
throw DSC_Exception(LOC("There is no connected provides port to communicate with."));
- for(int i = 0; i < this->_my_ports->length(); i++) {
+ for(int i = 0; i < (int)this->_my_ports->length(); i++) {
CorbaPortTypePtr port = CorbaPortType::_narrow((*this->_my_ports)[i]);
try {
#ifdef MYDEBUG
*ti=(CalTimeType< _type _qual >::TimeType)(_ti); \
DEBTRACE( "-------- CalciumInterface(lecture Inter Part), Data Ptr :" << *data ) \
return CalciumTypes::CPOK; \
- }; \
+ } \
\
\
extern "C" void ecp_lecture_##_name##_free ( _type _qual * data) \
{ \
CalciumInterface::ecp_free< _type, _porttype >(data); \
- }; \
+ } \
\
\
extern "C" CalciumTypes::InfoType ecp_ecriture_##_name (void * component, int dependencyType, \
} \
DEBTRACE( "-------- CalciumInterface(ecriture Inter Part), Valeur de data :" << data ) \
return CalciumTypes::CPOK; \
- }; \
+ } \
#endif
/* Erreur PVM */
// const int CPPVM = 37;
// const int CPCOM = 37;
- /* Erreur detectee au niveau de l'int CPERRINST = 38;
+ /* Erreur detectee au niveau de l'int CPERRINST = 38; */
/* Mode d'execution non defini */
// const int CPMODE = 39;
struct Copy2UserSpace{
template <class T1, class T2>
- static void apply( T1 * & data, T2 & corbaData, size_t nRead ){
+ static void apply( T1 * & data, T2 & corbaData, size_t /*nRead*/ ){
typedef typename DataManipulator::InnerType InnerType;
template <bool rel, typename DataManipulator >
struct DeleteTraits {
template <typename T>
- static void apply(T * dataPtr) {
+ static void apply(T * /*dataPtr*/) {
typedef typename DataManipulator::Type DataType; // Attention != T
#include "calcium_logical_port_uses.hxx"
#include "calcium_complex_port_uses.hxx"
-calcium_real_port_uses::~calcium_real_port_uses(void) {};
-calcium_double_port_uses::~calcium_double_port_uses(void) {};
-calcium_integer_port_uses::~calcium_integer_port_uses(void) {};
-calcium_long_port_uses::~calcium_long_port_uses(void) {};
-calcium_intc_port_uses::~calcium_intc_port_uses(void) {};
-calcium_logical_port_uses::~calcium_logical_port_uses(void) {};
-calcium_complex_port_uses::~calcium_complex_port_uses(void) {};
-calcium_string_port_uses::~calcium_string_port_uses(void) {};
+calcium_real_port_uses::~calcium_real_port_uses(void) {}
+calcium_double_port_uses::~calcium_double_port_uses(void) {}
+calcium_integer_port_uses::~calcium_integer_port_uses(void) {}
+calcium_long_port_uses::~calcium_long_port_uses(void) {}
+calcium_intc_port_uses::~calcium_intc_port_uses(void) {}
+calcium_logical_port_uses::~calcium_logical_port_uses(void) {}
+calcium_complex_port_uses::~calcium_complex_port_uses(void) {}
+calcium_string_port_uses::~calcium_string_port_uses(void) {}
virtual InterpolationSchem getInterpolationSchem () const =0;
virtual ExtrapolationSchem getExtrapolationSchem () const =0;
- virtual void calcium_erase (float t,long i, bool before) {};
+ virtual void calcium_erase (float /*t*/,long /*i*/, bool /*before*/) {};
};
#endif
public :
calcium_uses_port();
virtual ~calcium_uses_port();
- virtual void disconnect (bool provideLastGivenValue) {};
+ virtual void disconnect (bool /*provideLastGivenValue*/) {};
};
#endif
void F_FUNC(cpcd,CPCD)(long *compo,STR_PSTR(nom),cal_int *info STR_PLEN(nom))
{
+ (void)info; // unused parameter
/* nom is OUT argument */
cp_cd((void *)*compo,STR_PTR(nom));
/* replace in place ??? */
for (index = 0; index < *n; index++)
{
strncpy(&tab[index * STR_LEN(tab)], tabChaine[index], strlen(tabChaine[index]));
- if(STR_LEN(tab) > strlen(tabChaine[index]))
+ if(STR_LEN(tab) > (int)strlen(tabChaine[index]))
memset(&tab[index * STR_LEN(tab)+strlen(tabChaine[index])],' ',STR_LEN(tab)-strlen(tabChaine[index]));
}
}
lastarg ) ; \
-CALCIUM_ECR_INTERFACE_C_H(een_fort_,float ,cal_int,cal_int,integer,,);
-CALCIUM_ECR_INTERFACE_C_H(elg_fort_,float ,cal_int,long ,long2integer,,);
-CALCIUM_ECR_INTERFACE_C_H(eln_fort_,float ,cal_int,long ,long,,);
-CALCIUM_ECR_INTERFACE_C_H(ein_fort_,float ,cal_int,int ,int2integer,,);
-CALCIUM_ECR_INTERFACE_C_H(ere_fort_,float ,cal_int,float ,float,,);
-CALCIUM_ECR_INTERFACE_C_H(erd_fort_,float ,cal_int,float ,float2double,,);
-CALCIUM_ECR_INTERFACE_C_H(edb_fort_,double,cal_int,double,double,,);
-CALCIUM_ECR_INTERFACE_C_H(elo_fort_,float ,cal_int,int ,bool,,); /*int pour bool ou cal_int */
-CALCIUM_ECR_INTERFACE_C_H(ecp_fort_,float ,cal_int,float ,cplx,,);
-CALCIUM_ECR_INTERFACE_C_H(ech_fort_,float ,cal_int,char ,str,STAR,LCH_LAST_PARAM );
+CALCIUM_ECR_INTERFACE_C_H(een_fort_,float ,cal_int,cal_int,integer,,)
+CALCIUM_ECR_INTERFACE_C_H(elg_fort_,float ,cal_int,long ,long2integer,,)
+CALCIUM_ECR_INTERFACE_C_H(eln_fort_,float ,cal_int,long ,long,,)
+CALCIUM_ECR_INTERFACE_C_H(ein_fort_,float ,cal_int,int ,int2integer,,)
+CALCIUM_ECR_INTERFACE_C_H(ere_fort_,float ,cal_int,float ,float,,)
+CALCIUM_ECR_INTERFACE_C_H(erd_fort_,float ,cal_int,float ,float2double,,)
+CALCIUM_ECR_INTERFACE_C_H(edb_fort_,double,cal_int,double,double,,)
+CALCIUM_ECR_INTERFACE_C_H(elo_fort_,float ,cal_int,int ,bool,,) /*int pour bool ou cal_int */
+CALCIUM_ECR_INTERFACE_C_H(ecp_fort_,float ,cal_int,float ,cplx,,)
+CALCIUM_ECR_INTERFACE_C_H(ech_fort_,float ,cal_int,char ,str,STAR,LCH_LAST_PARAM )
\
-CALCIUM_LECT_INTERFACE_C_H(len_fort_,float ,cal_int,cal_int ,integer,,);
-CALCIUM_LECT_INTERFACE_C_H(llg_fort_,float ,cal_int,long ,long2integer,,);
-CALCIUM_LECT_INTERFACE_C_H(lln_fort_,float ,cal_int,long ,long,,);
-CALCIUM_LECT_INTERFACE_C_H(lin_fort_,float ,cal_int,int ,int2integer,,);
-CALCIUM_LECT_INTERFACE_C_H(lre_fort_,float ,cal_int,float ,float,,);
-CALCIUM_LECT_INTERFACE_C_H(lrd_fort_,float ,cal_int,float ,float2double,,);
-CALCIUM_LECT_INTERFACE_C_H(ldb_fort_,double,cal_int,double ,double,,);
-CALCIUM_LECT_INTERFACE_C_H(llo_fort_,float ,cal_int,int ,bool,,); /*int pour bool ou cal_int */
-CALCIUM_LECT_INTERFACE_C_H(lcp_fort_,float ,cal_int,float ,cplx,,);
-CALCIUM_LECT_INTERFACE_C_H(lch_fort_,float ,cal_int,char ,str,STAR, LCH_LAST_PARAM );
+CALCIUM_LECT_INTERFACE_C_H(len_fort_,float ,cal_int,cal_int ,integer,,)
+CALCIUM_LECT_INTERFACE_C_H(llg_fort_,float ,cal_int,long ,long2integer,,)
+CALCIUM_LECT_INTERFACE_C_H(lln_fort_,float ,cal_int,long ,long,,)
+CALCIUM_LECT_INTERFACE_C_H(lin_fort_,float ,cal_int,int ,int2integer,,)
+CALCIUM_LECT_INTERFACE_C_H(lre_fort_,float ,cal_int,float ,float,,)
+CALCIUM_LECT_INTERFACE_C_H(lrd_fort_,float ,cal_int,float ,float2double,,)
+CALCIUM_LECT_INTERFACE_C_H(ldb_fort_,double,cal_int,double ,double,,)
+CALCIUM_LECT_INTERFACE_C_H(llo_fort_,float ,cal_int,int ,bool,,) /*int pour bool ou cal_int */
+CALCIUM_LECT_INTERFACE_C_H(lcp_fort_,float ,cal_int,float ,cplx,,)
+CALCIUM_LECT_INTERFACE_C_H(lch_fort_,float ,cal_int,char ,str,STAR, LCH_LAST_PARAM )
TEST2 test2;
TEST3 test3;
return !test1.ret+!test2.ret+!test3.ret;
-};
+}
// }
// Operation de destruction d'une donnee: rien a faire car pas de memoire a liberer
- static inline void delete_data(Type data) {}
+ static inline void delete_data(Type /*data*/) {}
// Renvoie la taille de la donnée
static inline size_t size(Type data) {
InnerType *dataPtr = getPointer(data,false);
- for (int i = 0; i< isize; ++i)
+ for (size_t i = 0; i< isize; ++i)
idata[i]=dataPtr[i];
// Le mode de recopie suivant ne permet pas la conversion de type (ex int -> CORBA::Long)
// Si idata[i] n'a pas été alloué suffisament grand,
// il y a corruption de la mémoire
- for (int i = 0; i< isize; ++i)
+ for (size_t i = 0; i< isize; ++i)
strcpy(idata[i],dataPtr[i]);
}
template <typename T, typename U> std::ostream & operator <<(std::ostream & os, const std::pair<T,U> & p)
{ os << "(" << p.first << "," << p.second << ")";
return os;
-};
+}
#endif
template < typename DataManipulator, typename COUPLING_POLICY >
GenericPort<DataManipulator, COUPLING_POLICY >::GenericPort() :
- cond_instance(& this->storedDatas_mutex),waitingForConvenientDataId(false),
- waitingForAnyDataId(false),lastDataIdSet(false) {}
+ waitingForConvenientDataId(false),waitingForAnyDataId(false),lastDataIdSet(false),
+ cond_instance(& this->storedDatas_mutex){}
template < typename DataManipulator, typename COUPLING_POLICY>
GenericPort<DataManipulator, COUPLING_POLICY>::~GenericPort() {
// Du coup interaction potentielle entre le 0 copy et gestion des niveaux
return dataToTransmit;
-};
+}
#endif
#include "DSC_Exception.hxx"
-// #define GENERATE_USES_PORT(dataManip,portType,portName) \
-// const char * _repository_##portType##_name_ = "IDL:Ports/##portType##:1.0"; \
-// GenericUsesPort< dataManip, portType, _repository_##portType##_name_ > portName;
+/* #define GENERATE_USES_PORT(dataManip,portType,portName) \
+ const char * _repository_##portType##_name_ = "IDL:Ports/##portType##:1.0"; \
+ GenericUsesPort< dataManip, portType, _repository_##portType##_name_ > portName;
-//ex : GENERATE_USES_PORT(Ports::Data_Short_Port,data_short_port);
+ex : GENERATE_USES_PORT(Ports::Data_Short_Port,data_short_port);*/
template <typename DataManipulator, typename CorbaPortType, char * repositoryName,
typename UsesPort=uses_port >
// OLD : Pour l'instant on résoud PB2 en créant une copie de la donnée en cas
// OLD : de connexions multiples. Il faudra tester la collocalisation.
// OLD : DataType copyOfData; // = data; PB1
- for(int i = 0; i < _my_ports->length(); i++) {
+ for(int i = 0; i < (int)_my_ports->length(); i++) { //TODO: mismatch signed/unsigned
CorbaPortTypeVar port = CorbaPortType::_narrow((*_my_ports)[i]);
//if (i) { PB1
void
GenericUsesPort< DataManipulator, CorbaPortType, repositoryName, UsesPort
>::uses_port_changed(Engines::DSC::uses_port * new_uses_port,
- const Engines::DSC::Message message)
+ const Engines::DSC::Message /*message*/)
{
if (_my_ports) delete _my_ports;
}
uses_port *
-palm_port_factory::create_data_proxy(std::string type) {
+palm_port_factory::create_data_proxy(std::string /*type*/) {
uses_port * rtn_port = NULL;
return rtn_port;
}
int main() {
TEST1 test1;
TEST2 test2;
-};
+}
//
void fake_method(void) {
// int fake_int;
-};
+}
//
#include "Superv_Component_i.hxx"
-DSC_EXCEPTION_CXX(Superv_Component_i,BadFabType);
-DSC_EXCEPTION_CXX(Superv_Component_i,BadType);
-DSC_EXCEPTION_CXX(Superv_Component_i,BadCast);
-DSC_EXCEPTION_CXX(Superv_Component_i,UnexpectedState);
-DSC_EXCEPTION_CXX(Superv_Component_i,PortAlreadyDefined);
-DSC_EXCEPTION_CXX(Superv_Component_i,PortNotDefined);
-DSC_EXCEPTION_CXX(Superv_Component_i,PortNotConnected);
-DSC_EXCEPTION_CXX(Superv_Component_i,NilPort);
-DSC_EXCEPTION_CXX(Superv_Component_i,BadProperty);
+DSC_EXCEPTION_CXX(Superv_Component_i,BadFabType)
+DSC_EXCEPTION_CXX(Superv_Component_i,BadType)
+DSC_EXCEPTION_CXX(Superv_Component_i,BadCast)
+DSC_EXCEPTION_CXX(Superv_Component_i,UnexpectedState)
+DSC_EXCEPTION_CXX(Superv_Component_i,PortAlreadyDefined)
+DSC_EXCEPTION_CXX(Superv_Component_i,PortNotDefined)
+DSC_EXCEPTION_CXX(Superv_Component_i,PortNotConnected)
+DSC_EXCEPTION_CXX(Superv_Component_i,NilPort)
+DSC_EXCEPTION_CXX(Superv_Component_i,BadProperty)
std::map<std::string, port_factory*> Superv_Component_i::_factory_map;
long Superv_Component_i::dscTimeOut=0;
PortableServer::ObjectId * contId,
const char *instanceName,
const char *interfaceName,
- bool notif) :
+ bool /*notif*/) :
Engines_DSC_i(orb, poa, contId, instanceName, interfaceName)
{
#ifdef MYDEBUG
provides_port *
Superv_Component_i::create_provides_data_port(const std::string& port_fab_type)
- throw (BadFabType)
+
{
provides_port * rtn_port = NULL;
std::string factory_name;
uses_port *
Superv_Component_i::create_uses_data_port(const std::string& port_fab_type)
-throw (BadFabType)
+
{
uses_port * rtn_proxy = NULL;
std::string factory_name;
Superv_Component_i::add_port(const char * port_fab_type,
const char * port_type,
const char * port_name)
- throw (PortAlreadyDefined, BadFabType, BadType, BadProperty)
+
{
assert(port_fab_type);
assert(port_type);
void
Superv_Component_i::add_port(provides_port * port,
const char* provides_port_name)
- throw (PortAlreadyDefined, NilPort, BadProperty)
+
{
assert(port);
assert(provides_port_name);
void
Superv_Component_i::add_port(uses_port * port,
const char* uses_port_name)
- throw (PortAlreadyDefined, NilPort, BadProperty)
+
{
assert(port);
assert(uses_port_name);
void
Superv_Component_i::get_port(provides_port *& port,
const char * provides_port_name)
- throw (PortNotDefined,PortNotConnected)
+
{
assert(provides_port_name);
void
Superv_Component_i::get_port(uses_port *& port,
const char * uses_port_name)
- throw (PortNotDefined, PortNotConnected)
+
{
assert(uses_port_name);
void
Superv_Component_i::get_uses_port_names(std::vector<std::string> & port_names,
- const std::string servicename) const {
-
+ const std::string /*servicename*/) const
+{
port_names.reserve(my_superv_ports.size());
superv_ports::const_iterator it;
// Exceptions declarations.
// There are defined on the Superv_Component_i.cxx to avoid problems
// from dlopen.
- DSC_EXCEPTION(BadFabType);
- DSC_EXCEPTION(BadType);
- DSC_EXCEPTION(BadCast);
- DSC_EXCEPTION(UnexpectedState);
- DSC_EXCEPTION(PortAlreadyDefined);
- DSC_EXCEPTION(PortNotDefined);
- DSC_EXCEPTION(PortNotConnected);
- DSC_EXCEPTION(NilPort);
- DSC_EXCEPTION(BadProperty);
+ DSC_EXCEPTION(BadFabType)
+ DSC_EXCEPTION(BadType)
+ DSC_EXCEPTION(BadCast)
+ DSC_EXCEPTION(UnexpectedState)
+ DSC_EXCEPTION(PortAlreadyDefined)
+ DSC_EXCEPTION(PortNotDefined)
+ DSC_EXCEPTION(PortNotConnected)
+ DSC_EXCEPTION(NilPort)
+ DSC_EXCEPTION(BadProperty)
/*!
* \warning currently disabled.
/*!
* \warning currently disabled.
*/
- virtual provides_port * create_provides_data_and_control_port(const char* port_type)
+ virtual provides_port * create_provides_data_and_control_port(const char* /*port_type*/)
{return NULL;}
/*!
/*!
* \warning currently disabled.
*/
- virtual uses_port * create_uses_data_and_control_port(const char* port_type)
+ virtual uses_port * create_uses_data_and_control_port(const char* /*port_type*/)
{return NULL;}
/*!
*
* \note It's user repsonsability to destroy the provides port.
*/
- virtual provides_port * create_provides_data_port(const std::string& port_fab_type)
- throw (BadFabType);
+ virtual provides_port * create_provides_data_port(const std::string& port_fab_type);
/*!
*
* \note It's user repsonsability to destroy the uses port.
*/
- virtual uses_port * create_uses_data_port(const std::string& port_fab_type)
- throw (BadFabType);
+ virtual uses_port * create_uses_data_port(const std::string& port_fab_type);
/*!
* Adds a port to the component. With this method only Salomé's provided DSC ports
*/
virtual void add_port(const char * port_fab_type,
const char * port_type,
- const char * port_name)
- throw (PortAlreadyDefined, BadFabType, BadType, BadProperty);
+ const char * port_name);
/*!
* Adds a port to the component. With this method only Salomé's provided DSC ports
template < typename SpecificPortType >
SpecificPortType * add_port(const char * port_fab_type,
const char * port_type,
- const char * port_name)
- throw (PortAlreadyDefined, BadFabType, BadType, BadCast, BadProperty);
+ const char * port_name);
/*!
* Adds a created provides port to the component.
* \param provides_port_name the name of the port in the component.
*/
virtual void add_port(provides_port * port,
- const char* provides_port_name)
- throw (PortAlreadyDefined, NilPort, BadProperty);
+ const char* provides_port_name);
/*!
* Adds a created uses port to the component.
* \param uses_port_name the name of the port in the component.
*/
virtual void add_port(uses_port * port,
- const char* uses_port_name)
- throw (PortAlreadyDefined, NilPort, BadProperty);
+ const char* uses_port_name);
/*!
* Gets the provides port already added in the component.
* \param provides_port_name the name of the port.
*/
virtual void get_port(provides_port *& port,
- const char* provides_port_name)
- throw (PortNotDefined, PortNotConnected);
+ const char* provides_port_name);
/*!
* Gets the uses port already added in the component.
* \param uses_port_name the name of the port.
*/
virtual void get_port(uses_port *& port,
- const char* uses_port_name)
- throw (PortNotDefined, PortNotConnected);
+ const char* uses_port_name);
/*!
* Gets the list of the ports of a service.
* \return a port's pointer.
*/
template <typename SpecificPortType >
- SpecificPortType * get_port( const char * port_name)
- throw (PortNotDefined, PortNotConnected, BadCast, UnexpectedState);
+ SpecificPortType * get_port( const char * port_name);
/*!
* \see DSC_Callbacks::provides_port_changed
// This method is implemented by default since it is a very specific usage.
// It also permits to not break compatibility with older components.
- virtual CORBA::Boolean init_service_with_multiple(const char* service_name,
- const Engines::Superv_Component::seq_multiple_param & params)
+ virtual CORBA::Boolean init_service_with_multiple(const char* /*service_name*/,
+ const Engines::Superv_Component::seq_multiple_param & /*params*/)
{
return true;
}
Superv_Component_i::add_port(const char * port_fab_type,
const char * port_type,
const char * port_name)
- throw (PortAlreadyDefined, BadFabType, BadType, BadCast, BadProperty)
+
{
assert(port_fab_type);
assert(port_type);
<< port_type));
return retPort;
-};
+}
template <typename SpecificPortType > SpecificPortType *
Superv_Component_i::get_port( const char * port_name)
- throw (PortNotDefined, PortNotConnected, BadCast, UnexpectedState)
+
{
assert(port_name);
}
return retPort;
-};
+}
#endif
* \param connection_nbr current connection number.
* \param message message associated with this connection.
*/
- virtual void provides_port_changed(int connection_nbr,
- const Engines::DSC::Message message) {}
+ virtual void provides_port_changed(int /*connection_nbr*/,
+ const Engines::DSC::Message /*message*/) {}
};
class A {
public:
- DSC_EXCEPTION(Exp1);
- DSC_EXCEPTION(Exp2);
+ DSC_EXCEPTION(Exp1)
+ DSC_EXCEPTION(Exp2)
A() {};
virtual ~A() {};
// La salome exception ne permet pas de passer une chaine ""
- void lanceException1_1() throw(Exp1) { throw Exp1("_");}
- void lanceException1_2() throw(Exp1) { throw Exp1("Ceci est l'exception 1_2");}
- void lanceException1_3() throw(Exp1) { throw Exp1(LOC("Ceci est l'exception 1_3"));}
- void lanceException1_4() throw(Exp1) { throw Exp1(LOC(OSS() << "Ceci est l'exeption 1_4" )); }
- void lanceException1_5() throw(Exp1) {
+ void lanceException1_1() { throw Exp1("_");}
+ void lanceException1_2() { throw Exp1("Ceci est l'exception 1_2");}
+ void lanceException1_3() { throw Exp1(LOC("Ceci est l'exception 1_3"));}
+ void lanceException1_4() { throw Exp1(LOC(OSS() << "Ceci est l'exeption 1_4" )); }
+ void lanceException1_5() {
int a=1;
throw Exp1(LOC(OSS() << "Ceci est l'exeption 1_5 avec la valeur A : " << a )); }
- void lanceException1_6() throw(Exp1) {
+ void lanceException1_6() {
Exp1 exp1(LOC(OSS() << "Ceci est l'exeption 1_6"));
std::cout << "Affichage de exp1.what() dans lanceException1_6() " << exp1.what() << std::endl;
throw Exp1(exp1);
}
- void lanceException1_7() throw(Exp1) {
+ void lanceException1_7() {
throw Exp1(LOC(OSS() << "Ceci est l'exeption 1_7"));
}
};
-DSC_EXCEPTION_CXX(A,Exp1);
-DSC_EXCEPTION_CXX(A,Exp2);
+DSC_EXCEPTION_CXX(A,Exp1)
+DSC_EXCEPTION_CXX(A,Exp2)
int main() {
a.lanceException1_2();
}
// Essai par valeur (ne pas faire çà !)
- catch ( A::Exp1 ex ) {
+ catch ( A::Exp1& ex ) {
std::cout << "Exception 1 bien reçue" << std::endl;
std::cout << ex.what() << std::endl;
} catch ( const DSC_Exception & dscE ) {
try {
a.lanceException1_6();
}
- catch ( SALOME_Exception ex ) {
+ catch ( SALOME_Exception& ex ) {
std::cout << "Exception SALOME bien reçue" << std::endl;
std::cout << ex.what() << std::endl;
} catch ( ...) {
std::cout << "Exception ... reçue mais aurait dû recevoir Exception DSC" << std::endl;
}
-};
+}
virtual void add_provides_port(Ports::Port_ptr ref,
const char* provides_port_name,
Ports::PortProperties_ptr port_prop)
- throw (Engines::DSC::PortAlreadyDefined,
- Engines::DSC::NilPort,
- Engines::DSC::BadProperty) {
+ {
Engines_DSC_interface::add_provides_port(ref,
provides_port_name,
port_prop);
virtual void add_uses_port(const char* repository_id,
const char* uses_port_name,
Ports::PortProperties_ptr port_prop)
- throw (Engines::DSC::PortAlreadyDefined,
- Engines::DSC::BadProperty) {
+ {
Engines_DSC_interface::add_uses_port(repository_id,
uses_port_name,
port_prop);
*/
virtual Ports::Port_ptr get_provides_port(const char* provides_port_name,
const CORBA::Boolean connection_error)
- throw (Engines::DSC::PortNotDefined,
- Engines::DSC::PortNotConnected) {
+ {
return Engines_DSC_interface::get_provides_port(provides_port_name,
connection_error);
}
* \see Engines::DSC::get_uses_port
*/
virtual Engines::DSC::uses_port * get_uses_port(const char* uses_port_name)
- throw (Engines::DSC::PortNotDefined,
- Engines::DSC::PortNotConnected) {
+ {
return Engines_DSC_interface::get_uses_port(uses_port_name);
}
* \see Engines::DSC::connect_provides_port
*/
virtual void connect_provides_port(const char* provides_port_name)
- throw (Engines::DSC::PortNotDefined) {
+ {
Engines_DSC_interface::connect_provides_port(provides_port_name);
}
*/
virtual void connect_uses_port(const char* uses_port_name,
Ports::Port_ptr provides_port_ref)
- throw (Engines::DSC::PortNotDefined,
- Engines::DSC::BadPortType,
- Engines::DSC::NilPort) {
- Engines_DSC_interface::connect_uses_port(uses_port_name,
- provides_port_ref);
- }
+ {
+ Engines_DSC_interface::connect_uses_port(uses_port_name,
+ provides_port_ref);
+ }
/*!
* \see Engines::DSC::is_connected
*/
virtual CORBA::Boolean is_connected(const char* port_name)
- throw (Engines::DSC::PortNotDefined) {
+ {
return Engines_DSC_interface::is_connected(port_name);
}
*/
virtual void disconnect_provides_port(const char* provides_port_name,
const Engines::DSC::Message message)
- throw (Engines::DSC::PortNotDefined,
- Engines::DSC::PortNotConnected) {
+ {
Engines_DSC_interface::disconnect_provides_port(provides_port_name,
message);
}
virtual void disconnect_uses_port(const char* uses_port_name,
Ports::Port_ptr provides_port_ref,
const Engines::DSC::Message message)
- throw (Engines::DSC::PortNotDefined,
- Engines::DSC::PortNotConnected,
- Engines::DSC::BadPortReference) {
+ {
Engines_DSC_interface::disconnect_uses_port(uses_port_name,
provides_port_ref,
message);
}
virtual Ports::PortProperties_ptr get_port_properties(const char* port_name)
- throw (Engines::DSC::PortNotDefined) {
+ {
return Engines_DSC_interface::get_port_properties(port_name);
}
UnRegister();
}
-}; // end of namespace SALOME
+} // end of namespace SALOME
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+ *
+ * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+ * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+ */
/*----------------------------------------------------------------------------
SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+ *
+ * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+ * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+ */
/*----------------------------------------------------------------------------
SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+ *
+ * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+ * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+ */
/*----------------------------------------------------------------------------
SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+ *
+ * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+ * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+ */
/*----------------------------------------------------------------------------
SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+ *
+ * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+ * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+ */
/*----------------------------------------------------------------------------
SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+ *
+ * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+ * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+ */
/*----------------------------------------------------------------------------
SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
return NULL;
}
- int length = strlen(aPath.c_str());
+ size_t length = strlen(aPath.c_str());
char *new_str = new char[ 1+length ];
strcpy(new_str , aPath.c_str()) ;
delete [] name;
hdf_dataset->GetDim(dim);
- fprintf(fp, " %i\n", ndim);
+ fprintf(fp, " %li\n", ndim);
for(int i = 0;i < ndim;i++) {
- fprintf(fp, " %i", dim[i]);
+ fprintf(fp, " %lu", (unsigned long)dim[i]);
}
fprintf(fp, "\n");
array->GetDim(arr_dim);
for( int i = 0;i < arr_ndim; i++ ) {
- fprintf(fp, " %i", arr_dim[i]);
+ fprintf(fp, " %lu", (unsigned long)arr_dim[i]);
}
//And write the data array
// function : SaveAttributeInASCIIfile
// purpose :
//============================================================================
-void SaveAttributeInASCIIfile(HDFattribute *hdf_attribute, FILE* fp, int ident)
+void SaveAttributeInASCIIfile(HDFattribute *hdf_attribute, FILE* fp, int /*ident*/)
{
hdf_attribute->OpenOnDisk();
hdf_type type = hdf_attribute->GetType();
char* name = makeName(hdf_attribute->GetName());
- int size = hdf_attribute->GetSize();
+ size_t size = hdf_attribute->GetSize();
fprintf(fp, "%s\n", ATTRIBUTE_ID);
- fprintf(fp, "%s %i %i\n", name, type, size);
+ fprintf(fp, "%s %i %lu\n", name, type, size);
delete [] name;
return NULL;
}
- int length = strlen(aTmpDir.c_str());
+ size_t length = strlen(aTmpDir.c_str());
char *new_str = new char[ 1+length ];
strcpy(new_str , aTmpDir.c_str()) ;
bool CreateDatasetFromASCII(HDFcontainerObject *father, FILE *fp)
{
char name[HDF_NAME_MAX_LEN+1];
- hdf_type type;
- hdf_byte_order order;
+ int type;
+ int order;
int nbDim, nbAttr;
long i, size;
HDFarray* anArray = 0;
if( type == HDF_ARRAY ){
//Get array information
- hdf_type arr_data_type;
+ int arr_data_type;
int arr_ndim;
fscanf(fp, "%c", &tmp);
fscanf(fp, " %i\n", &arr_data_type ); //Get array data type
fscanf(fp, " %i", &tdim);
arr_dim[i] = tdim;
}
- anArray = new HDFarray(0, arr_data_type, arr_ndim, arr_dim);
+ anArray = new HDFarray(0, (hdf_type)arr_data_type, arr_ndim, arr_dim);
anArray->CreateOnDisk();
type = arr_data_type;
delete [] arr_dim;
}
- HDFdataset* hdf_dataset = new HDFdataset(new_name, father, anArray ? HDF_ARRAY : type, sizeArray, nbDim, order);
+ HDFdataset* hdf_dataset = new HDFdataset(new_name, father, anArray ? HDF_ARRAY : (hdf_type)type, sizeArray, nbDim, (hdf_byte_order)order);
if(anArray)
hdf_dataset->SetArrayId(anArray->GetId());
} else if(type == HDF_CHAR) {
hdf_char* val = new hdf_char[size];
for(i=0; i<size; i++) {
- fscanf(fp, " %i", &(val[i]));
+ fscanf(fp, " %c", &(val[i]));
}
hdf_dataset->WriteOnDisk(val);
delete [] val;
{
char name[HDF_NAME_MAX_LEN+1];
- hdf_type type;
+ int type;
int size;
fscanf(fp, "%s %i %i\n", name, &type, &size);
char* new_name = restoreName(name);
- HDFattribute* hdf_attribute = new HDFattribute(new_name, father, type, size);
+ HDFattribute* hdf_attribute = new HDFattribute(new_name, father, (hdf_type)type, size);
hdf_attribute->CreateOnDisk();
char* makeName(char* name)
{
std::string aName(name), aNewName;
- int i, length = aName.size();
+ size_t i, length = aName.size();
char replace = (char)19;
for(i=0; i<length; i++) {
char* restoreName(char* name)
{
std::string aName(name), aNewName;
- int i, length = aName.size();
+ size_t i, length = aName.size();
char replace = (char)19;
for(i=0; i<length; i++) {
void write_float64(FILE* fp, hdf_float64* value)
{
unsigned char* array = (unsigned char*)value;
- for(int i = 0; i < sizeof(hdf_float64); i++) {
+ for(int i = 0; i < (int)sizeof(hdf_float64); i++) {
unsigned tmp = (unsigned short)array[i];
fprintf(fp, " %2x", tmp);
}
void read_float64(FILE* fp, hdf_float64* value)
{
unsigned char* array = (unsigned char*)value;
- for(int i = 0; i < sizeof(hdf_float64); i++) {
+ for(int i = 0; i < (int)sizeof(hdf_float64); i++) {
unsigned tmp;
fscanf(fp, " %x", &tmp);
array[i] = (unsigned char)tmp;
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+ *
+ * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+ * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+ */
/*----------------------------------------------------------------------------
SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+ *
+ * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+ * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+ */
/*----------------------------------------------------------------------------
SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+ *
+ * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+ * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+ */
/*----------------------------------------------------------------------------
SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+ *
+ * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+ * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+ */
/*----------------------------------------------------------------------------
SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+ *
+ * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+ * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+ */
/*----------------------------------------------------------------------------
File : HDFattrOpen.c
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+ *
+ * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+ * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+ */
/*----------------------------------------------------------------------------
SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+ *
+ * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+ * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+ */
/*----------------------------------------------------------------------------
SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
size_t HDFattribute::GetSize()
{
if(_size == 0) {
- if((_size = HDFattrGetSize(_id)) < 0)
+ if((long)(_size = HDFattrGetSize(_id)) < 0)
throw HDFexception("Can't determine the size of data in the attribute");
}
return _size;
return 0;
}
-void HDFcontainerObject::InternalObjectIndentify(int rank, char *object_name)
+void HDFcontainerObject::InternalObjectIndentify(int /*rank*/, char* /*object_name*/)
{
- object_name = NULL;
}
void HDFcontainerObject::AddSon(HDFinternalObject *son)
#else
// Sort de la compilation
-#error Necessite l''utilisation de la primitive mmap
+#error "Necessite l'utilisation de la primitive mmap"
#endif
return -1;
};
-
- return length;
-};
+ return (int)length;
+}
#include <iostream>
-herr_t dataset_attr(hid_t loc_id, const char *attr_name, void *operator_data)
+herr_t dataset_attr(hid_t /*loc_id*/, const char *attr_name, void *operator_data)
{
*(char**)operator_data = new char[strlen(attr_name)+1];
strcpy(*(char**)operator_data, attr_name);
{
int size_type;
- if (_size == -1)
+ if ((long)_size == -1)
{
- if ((_size = HDFdatasetGetSize(_id)) < 0)
+ if ((long)(_size = HDFdatasetGetSize(_id)) < 0)
throw HDFexception("Can't determine the size of the dataset");
if (_type == HDF_NONE)
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+ *
+ * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+ * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+ */
/*----------------------------------------------------------------------------
SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+ *
+ * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+ * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+ */
/*----------------------------------------------------------------------------
SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
{
hdf_idt dataset, dataspace = 0;
hdf_err ret;
- hdf_idt type_hdf, new_type_hdf = -1;
+ hdf_idt type_hdf = -1, new_type_hdf = -1;
switch(type)
{
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+ *
+ * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+ * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+ */
/*----------------------------------------------------------------------------
SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+ *
+ * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+ * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+ */
/*----------------------------------------------------------------------------
SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+ *
+ * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+ * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+ */
/*----------------------------------------------------------------------------
SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
{
hdf_size size;
- if ((size = H5Dget_storage_size(id)) < 0)
+ if ((long)(size = H5Dget_storage_size(id)) < 0)
return -1;
return (int) size;
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+ *
+ * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+ * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+ */
/*----------------------------------------------------------------------------
SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+ *
+ * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+ * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+ */
/*----------------------------------------------------------------------------
SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+ *
+ * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+ * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+ */
/*----------------------------------------------------------------------------
SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+ *
+ * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+ * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+ */
/*----------------------------------------------------------------------------
SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
if ((datatype = H5Dget_type(id)) < 0)
return -1;
-//#if defined (PCLINUX) || defined (PCLINUX64)
+/*#if defined (PCLINUX) || defined (PCLINUX64)*/
if ((H5Tget_class(datatype) == H5T_INTEGER) && (H5Tget_size(datatype) == 4))
datatype = H5T_NATIVE_INT;
-//#endif
+/*#endif*/
if ((ret = H5Dread(id,datatype,H5S_ALL,H5S_ALL,H5P_DEFAULT, val)) < 0)
return -1;
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+ *
+ * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+ * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+ */
/*----------------------------------------------------------------------------
SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
hdf_idt datatype;
hdf_err ret;
#if defined (PCLINUX) || defined (PCLINUX64)
+ int i, ndim;
+ hdf_size *dim;
int isI32BE = 0;
int size = 0;
#endif
isI32BE = 1; /* See HDFdatasetCreate */
/*SRN : bug IPAL9619: replaced the method of getting the size of INT32 dataset */
- int i, ndim = HDFdatasetGetnDim(id);
+
+ ndim = HDFdatasetGetnDim(id);
if(ndim < 0) return -1;
- hdf_size *dim = (hdf_size *) malloc(sizeof(hdf_size)*ndim);
+ dim = (hdf_size *) malloc(sizeof(hdf_size)*ndim);
if ((ret = HDFdatasetGetDim(id, dim)) < 0) return -1;
for(i=0; i<ndim; i++) size+=dim[i];
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+ *
+ * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+ * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+ */
/*----------------------------------------------------------------------------
SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
#include "HDFfile.hxx"
#include "HDFexception.hxx"
-herr_t file_attr(hid_t loc_id, const char *attr_name, void *operator_data)
+herr_t file_attr(hid_t /*loc_id*/, const char *attr_name, void *operator_data)
{
*(char**)operator_data = new char[strlen(attr_name)+1];
strcpy(*(char**)operator_data, attr_name);
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+ *
+ * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+ * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+ */
/*----------------------------------------------------------------------------
SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+ *
+ * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+ * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+ */
/*----------------------------------------------------------------------------
SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+ *
+ * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+ * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+ */
/*----------------------------------------------------------------------------
SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+ *
+ * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+ * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+ */
/*----------------------------------------------------------------------------
SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+ *
+ * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+ * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+ */
/*----------------------------------------------------------------------------
SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
#include "HDFgroup.hxx"
#include "HDFexception.hxx"
-herr_t group_attr(hid_t loc_id, const char *attr_name, void *operator_data)
+herr_t group_attr(hid_t /*loc_id*/, const char *attr_name, void *operator_data)
{
*(char**)operator_data = new char[strlen(attr_name)+1];
strcpy(*(char**)operator_data, attr_name);
_father->AddSon(this);
_mid = -1;
_attribute = NULL;
-};
+}
void HDFgroup::CreateOnDisk()
{
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+ *
+ * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+ * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+ */
/*----------------------------------------------------------------------------
SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+ *
+ * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+ * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+ */
/*----------------------------------------------------------------------------
SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+ *
+ * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+ * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+ */
/*----------------------------------------------------------------------------
SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+ *
+ * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+ * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+ */
/*----------------------------------------------------------------------------
SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
hdf_err Num(hdf_idt id,const char *name, void *data)
{
int *count;
+ (void)name;
+ (void)id;
count = (int *) data;
(*count)++;
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+ *
+ * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+ * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+ */
/*----------------------------------------------------------------------------
SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
hdf_err RankInfo(hdf_idt id, const char *name, void *data)
{
+ (void)id;
+
if ( data )
strcpy( (char*)data, name );
else
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+ *
+ * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+ * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+ */
/*----------------------------------------------------------------------------
SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+ *
+ * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+ * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+ */
/*----------------------------------------------------------------------------------
SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
-//
-// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
+/* Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+ *
+ * Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+ * CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+ */
/*----------------------------------------------------------------------
SALOME HDFPersist : implementation of HDF persitent ( save/ restore )
for (int i=0; i<10; i++) {
try {
int pid = salomeLauncher->getPID();
+ SALOME_UNUSED(pid); // unused in release mode
LOG("["<<i<<"] SALOME launcher PID = " << pid);
}
catch (const SALOME::SALOME_Exception & ex) {
-int main (int argc, char * argv[]) {
+int main () {
TEST_corba();
TEST_getLifeCycleCORBA();
TEST_getStudy();
//===========================================================================
- SALOMEDS_DriverDefaultImpl::SALOMEDS_DriverDefaultImpl(CORBA::ORB_ptr orb,
- PortableServer::POA_ptr poa,
- PortableServer::ObjectId * contId,
- const char *instanceName,
- const char *interfaceName)
+ SALOMEDS_DriverDefaultImpl::SALOMEDS_DriverDefaultImpl(CORBA::ORB_ptr /*orb*/,
+ PortableServer::POA_ptr /*poa*/,
+ PortableServer::ObjectId * /*contId*/,
+ const char * /*instanceName*/,
+ const char * /*interfaceName*/)
// :Engines_Component_i(orb, poa, contId, instanceName, interfaceName)
{
MESSAGE("SALOMEDS_DriverDefaultImpl::SALOMEDS_DriverDefaultImpl : ");
- };
+ }
//===========================================================================
SALOMEDS_DriverDefaultImpl::~SALOMEDS_DriverDefaultImpl()
{
MESSAGE("SALOMEDS_DriverDefaultImpl::~SALOMEDS_DriverDefaultImpl");
- };
+ }
//===========================================================================
- CORBA::Boolean SALOMEDS_DriverDefaultImpl::Load(SALOMEDS::SComponent_ptr theComponent,
- const SALOMEDS::TMPFile & theStream,
- const char* theURL,
- bool isMultiFile)
+ CORBA::Boolean SALOMEDS_DriverDefaultImpl::Load(SALOMEDS::SComponent_ptr /*theComponent*/,
+ const SALOMEDS::TMPFile & /*theStream*/,
+ const char* /*theURL*/,
+ bool /*isMultiFile*/)
{
MESSAGE("--------------------------------------");
MESSAGE("--------------------------------------");
MESSAGE("--------------------------------------");
MESSAGE("--------------------------------------");
return false;
- };
+ }
//===========================================================================
- CORBA::Boolean SALOMEDS_DriverDefaultImpl::LoadASCII(SALOMEDS::SComponent_ptr theComponent,
- const SALOMEDS::TMPFile & theStream,
- const char* theURL,
- bool isMultiFile)
+ CORBA::Boolean SALOMEDS_DriverDefaultImpl::LoadASCII(SALOMEDS::SComponent_ptr /*theComponent*/,
+ const SALOMEDS::TMPFile & /*theStream*/,
+ const char* /*theURL*/,
+ bool /*isMultiFile*/)
{
MESSAGE("--------------------------------------");
MESSAGE("--------------------------------------");
MESSAGE("--------------------------------------");
MESSAGE("--------------------------------------");
return false;
- };
+ }
//===========================================================================
- char* SALOMEDS_DriverDefaultImpl::LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
- const char* aLocalPersistentID,
- CORBA::Boolean isMultiFile,
- CORBA::Boolean isASCII)
+ char* SALOMEDS_DriverDefaultImpl::LocalPersistentIDToIOR(SALOMEDS::SObject_ptr /*theSObject*/,
+ const char* /*aLocalPersistentID*/,
+ CORBA::Boolean /*isMultiFile*/,
+ CORBA::Boolean /*isASCII*/)
{
MESSAGE("--------------------------------------");
MESSAGE("--------------------------------------");
MESSAGE("--------------------------------------");
CORBA::String_var aString("");
return aString._retn();
- };
+ }
//===========================================================================
- SALOMEDS::TMPFile* SALOMEDS_DriverDefaultImpl::Save(SALOMEDS::SComponent_ptr theComponent,
- const char* theURL,
- bool isMultiFile)
+ SALOMEDS::TMPFile* SALOMEDS_DriverDefaultImpl::Save(SALOMEDS::SComponent_ptr /*theComponent*/,
+ const char* /*theURL*/,
+ bool /*isMultiFile*/)
{
MESSAGE("--------------------------------------");
MESSAGE("--------------------------------------");
MESSAGE("--------------------------------------");
SALOMEDS::TMPFile_var aStreamFile = new SALOMEDS::TMPFile(0);
return aStreamFile._retn();
- };
+ }
//===========================================================================
- SALOMEDS::TMPFile* SALOMEDS_DriverDefaultImpl::SaveASCII(SALOMEDS::SComponent_ptr theComponent,
- const char* theURL,
- bool isMultiFile)
+ SALOMEDS::TMPFile* SALOMEDS_DriverDefaultImpl::SaveASCII(SALOMEDS::SComponent_ptr /*theComponent*/,
+ const char* /*theURL*/,
+ bool /*isMultiFile*/)
{
MESSAGE("--------------------------------------");
MESSAGE("--------------------------------------");
MESSAGE("--------------------------------------");
SALOMEDS::TMPFile_var aStreamFile = new SALOMEDS::TMPFile(0);
return aStreamFile._retn();
- };
+ }
//===========================================================================
- char* SALOMEDS_DriverDefaultImpl::IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
- const char* IORString,
- CORBA::Boolean isMultiFile,
- CORBA::Boolean isASCII)
+ char* SALOMEDS_DriverDefaultImpl::IORToLocalPersistentID(SALOMEDS::SObject_ptr /*theSObject*/,
+ const char* /*IORString*/,
+ CORBA::Boolean /*isMultiFile*/,
+ CORBA::Boolean /*isASCII*/)
{
MESSAGE("-----------------------------------------");
MESSAGE("-----------------------------------------");
MESSAGE("-----------------------------------------");
CORBA::String_var aString("");
return aString._retn();
- };
+ }
//===========================================================================
- void SALOMEDS_DriverDefaultImpl::Close(SALOMEDS::SComponent_ptr theComponent)
+ void SALOMEDS_DriverDefaultImpl::Close(SALOMEDS::SComponent_ptr /*theComponent*/)
{
MESSAGE("------------------------");
MESSAGE("SALOMEDS_DriverDefaultImpl::Close");
MESSAGE("------------------------");
- };
+ }
//===========================================================================
char* SALOMEDS_DriverDefaultImpl::ComponentDataType()
MESSAGE("-----------------------------------------");
MESSAGE("-----------------------------------------");
return CORBA::string_dup("J aurais du nommer mon type prefere");
- };
+ }
//===========================================================================
- bool SALOMEDS_DriverDefaultImpl::CanPublishInStudy(CORBA::Object_ptr theIOR)
+ bool SALOMEDS_DriverDefaultImpl::CanPublishInStudy(CORBA::Object_ptr /*theIOR*/)
{
MESSAGE("-----------------------------------------");
MESSAGE("-----------------------------------------");
MESSAGE("-----------------------------------------");
MESSAGE("-----------------------------------------");
return false;
- };
+ }
//===========================================================================
- SALOMEDS::SObject_ptr SALOMEDS_DriverDefaultImpl::PublishInStudy(SALOMEDS::SObject_ptr theSObject,
- CORBA::Object_ptr theObject,
- const char* theName)
- throw (SALOME::SALOME_Exception)
+ SALOMEDS::SObject_ptr SALOMEDS_DriverDefaultImpl::PublishInStudy(SALOMEDS::SObject_ptr /*theSObject*/,
+ CORBA::Object_ptr /*theObject*/,
+ const char* /* theName*/)
{
MESSAGE("-----------------------------------------");
MESSAGE("-----------------------------------------");
MESSAGE("-----------------------------------------");
SALOMEDS::SObject_var aResultSO;
return aResultSO._retn();
- };
+ }
//===========================================================================
- CORBA::Boolean SALOMEDS_DriverDefaultImpl::CanCopy(SALOMEDS::SObject_ptr theObject)
+ CORBA::Boolean SALOMEDS_DriverDefaultImpl::CanCopy(SALOMEDS::SObject_ptr /*theObject*/)
{
MESSAGE("-----------------------------------------");
MESSAGE("-----------------------------------------");
MESSAGE("-----------------------------------------");
//return false;
return true;
- };
+ }
//===========================================================================
- SALOMEDS::TMPFile* SALOMEDS_DriverDefaultImpl::CopyFrom(SALOMEDS::SObject_ptr theObject,
- CORBA::Long& theObjectID)
+ SALOMEDS::TMPFile* SALOMEDS_DriverDefaultImpl::CopyFrom(SALOMEDS::SObject_ptr /*theObject*/,
+ CORBA::Long& /*theObjectID*/)
{
MESSAGE("--------------------------------------");
MESSAGE("--------------------------------------");
MESSAGE("--------------------------------------");
SALOMEDS::TMPFile_var aStreamFile = new SALOMEDS::TMPFile(0);
return aStreamFile._retn();
-};
+}
//===========================================================================
- SALOMEDS::SObject_ptr SALOMEDS_DriverDefaultImpl::PasteInto( const SALOMEDS::TMPFile & theStream,
- CORBA::Long theObjectID,
- SALOMEDS::SObject_ptr theSObject)
+ SALOMEDS::SObject_ptr SALOMEDS_DriverDefaultImpl::PasteInto( const SALOMEDS::TMPFile & /*theStream*/,
+ CORBA::Long /*theObjectID*/,
+ SALOMEDS::SObject_ptr /*theSObject*/)
{
MESSAGE("-----------------------------------------");
MESSAGE("-----------------------------------------");
MESSAGE("-----------------------------------------");
SALOMEDS::SObject_var aResultSO;
return aResultSO._retn();
- };
+ }
//===========================================================================
- CORBA::Boolean SALOMEDS_DriverDefaultImpl::CanPaste ( const char *theComponentName,
- CORBA::Long theObjectID)
+ CORBA::Boolean SALOMEDS_DriverDefaultImpl::CanPaste ( const char * /*theComponentName*/,
+ CORBA::Long /*theObjectID*/)
{
MESSAGE("-----------------------------------------");
MESSAGE("-----------------------------------------");
MESSAGE("-----------------------------------------");
MESSAGE("-----------------------------------------");
return false;
- };
+ }
virtual SALOMEDS::SObject_ptr PublishInStudy(SALOMEDS::SObject_ptr theSObject,
CORBA::Object_ptr theObject,
- const char* theName)
- throw (SALOME::SALOME_Exception);
+ const char* theName);
virtual CORBA::Boolean CanCopy(SALOMEDS::SObject_ptr theObject);
// We can use the macros defined by SALOMELocalTrace/utilities.h
#include "utilities.h"
#define SALOMELOG(msg) {MESS_BEGIN("[XSALOME]") << msg << MESS_END}
+#ifdef LOG
+#undef LOG
+#endif
#define LOG SALOMELOG
#include "Utils_CorbaException.hxx"
Engines::SalomeLauncher_var salomeLauncher = KERNEL::getSalomeLauncher();
try {
int pid = salomeLauncher->getPID();
+ SALOME_UNUSED(pid); // unused in release mode
LOG("SALOME launcher PID = " << pid);
}
catch (const SALOME::SALOME_Exception & ex) {
new_job->setWorkDirectory(job_params.MachinesList[clusterName].WorkDirectory);
new_job->setEnvFile(job_params.MachinesList[clusterName].EnvFile);
- for(int i=0; i < job_params.InputFile.size(); i++)
+ for(size_t i=0; i < job_params.InputFile.size(); i++)
new_job->add_in_file(job_params.InputFile[i]);
- for(int i=0; i < job_params.OutputFile.size();i++)
+ for(size_t i=0; i < job_params.OutputFile.size();i++)
new_job->add_out_file(job_params.OutputFile[i]);
resourceParams p;
// 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*/) {}
int addJob(Launcher::Job * new_job);
// Methods used by user interface methods
XML_Persistence::createJobFromString(const std::string& jobDump)
{
xmlDocPtr doc;
- doc = xmlReadMemory(jobDump.c_str(), jobDump.length(), "noname.xml", NULL, 0);
+ doc = xmlReadMemory(jobDump.c_str(), (int)jobDump.length(), "noname.xml", NULL, 0); //TODO: conversion from size_t to int, possible loss of data
if (doc == NULL)
{
std::string error = "Error in xmlReadMemory in XML_Persistence::createJobFromString, could not parse string: " + jobDump;
std::vector<long> pids(pyh->evalVL(oss.str()));
std::size_t sz(pids.size());
ret->length(sz);
- for(auto i=0;i<sz;i++)
+ for(size_t i=0;i<sz;i++)
(*ret)[i] = pids[i];
#endif
return ret;
throw SALOME_LauncherException(oss2.str());
}
std::vector<std::string> cmd(command_list.length());
- const char *toto(command_list[0]);
- for(auto i=0;i<command_list.length();i++)
+ for(size_t i=0;i<command_list.length();i++)
cmd[i] = command_list[i];
long pid(0);
try
std::vector<std::string> loes(ListOfExternalServersCpp(_NS));
std::size_t sz(loes.size());
ret->length(sz);
- for(auto i = 0; i<sz ; i++)
+ for(size_t i=0; i<sz; i++)
{
(*ret)[i]=CORBA::string_dup(loes[i].c_str());
}
//
std::unique_ptr<SALOME::ByteVec> ret(new SALOME::ByteVec);
ret->length(size);
- for(std::size_t i=0;i<size;++i)
+ for(size_t i=0;i<size;++i)
(*ret)[i] = buffer.get()[i];
//
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)
{
{
// setsig(SIGSEGV,&Handler);
std::set_terminate(&terminateHandler);
- std::set_unexpected(&unexpectedHandler);
+ //std::set_unexpected(&unexpectedHandler);
}
/* Init libxml
* To avoid memory leak, need to call xmlInitParser in the main thread
"RefDirectory: " << RefDirectory << std::endl <<
"NbOfProcesses: " << NbOfProcesses << std::endl <<
"InputFile: ";
- for(int i=0; i <InputFile.size();i++)
+ for(size_t i=0; i <InputFile.size();i++)
oss << InputFile[i] << " ";
oss << std::endl << "OutputFile: ";
- for(int i=0; i <OutputFile.size();i++)
+ for(size_t i=0; i <OutputFile.size();i++)
oss << OutputFile[i] << " ";
oss << std::endl <<
"Command: " << Command << std::endl <<
#include <string>
#include <memory>
-int main(int argc, char** argv)
+int main()
{
std::string xmlfile("");
{
listOfResources = _ResManager->GetFittingResources(new_params.resource_params);
}
- catch( const SALOME::SALOME_Exception& ex )
+ catch( const SALOME::SALOME_Exception& /*ex*/ ) //!< TODO: unused variable
{
return Engines::EngineComponent::_nil();
}
{
listOfResources = _ResManager->GetFittingResources(new_params.resource_params);
}
- catch( const SALOME::SALOME_Exception& ex )
+ catch( const SALOME::SALOME_Exception& /*ex*/ ) //!< TODO: unused variable
{
return Engines::EngineComponent::_nil();
}
{
listOfResources = _ResManager->GetFittingResources(new_params.resource_params);
}
- catch( const SALOME::SALOME_Exception& ex )
+ catch( const SALOME::SALOME_Exception& /*ex*/ ) //!< TODO: unused variable
{
return Engines::EngineComponent::_nil();
}
// --- Check if containerName contains machine name (if yes: rg>0)
char *stContainer=strdup(containerName);
std::string st2Container(stContainer);
- int rg=st2Container.find("/");
+ size_t rg=st2Container.find("/");
Engines::ContainerParameters params;
preSet(params);
- if (rg<0)
+ if (rg == std::string::npos)
{
// containerName doesn't contain "/" => Local container
params.container_name = CORBA::string_dup(stContainer);
if ( !CORBA::is_nil(connMan) && ( pid != connMan->getPID() ) )
connMan->ShutdownWithExit();
}
- catch(const CORBA::Exception& e)
+ catch(const CORBA::Exception& /*e*/) //!< TODO: unused variable
{
// ignore and continue
}
study->Shutdown();
_NS->Destroy_Name("/Study");
}
- catch(const CORBA::Exception& e)
+ catch(const CORBA::Exception& /*e*/) //!< TODO: unused variable
{
// ignore and continue
}
catalog->shutdown();
_NS->Destroy_Name("/Kernel/ModulCatalog");
}
- catch(const CORBA::Exception& e)
+ catch(const CORBA::Exception& /*e*/) //!< TODO: unused variable
{
// ignore and continue
}
if ( !CORBA::is_nil(dsm) )
dsm->shutdownScopes();
}
- catch(const CORBA::Exception& e)
+ catch(const CORBA::Exception& /*e*/) //!< TODO: unused variable
{
// ignore and continue
}
if ( !CORBA::is_nil(dsm) )
dsm->shutdownServers();
}
- catch(const CORBA::Exception& e)
+ catch(const CORBA::Exception& /*e*/) //!< TODO: unused variable
{
// ignore and continue
}
launcher->Shutdown();
}
}
- catch(const CORBA::Exception& e)
+ catch(const CORBA::Exception& /*e*/) //!< TODO: unused variable
{
// ignore and continue
}
registry->Shutdown();
_NS->Destroy_Name("/Registry");
}
- catch(const CORBA::Exception& e)
+ catch(const CORBA::Exception& /*e*/) //!< TODO: unused variable
{
// ignore and continue
}
int cmax=0;
int fmin=10;
int fmax=0;
- int nbpmax;
+ int nbpmax=1;
for(std::map<std::string,int>::iterator iter=cycle.begin();iter!=cycle.end();iter++){
if(strcmp((*iter).first.c_str(),"localhost")!=0){
Engines::ResourceDefinition *p = _ResManager->GetResourceDefinition((*iter).first.c_str());
try {
$action
}
- catch (ServiceUnreachable) {
+ catch (ServiceUnreachable&) {
Py_BLOCK_THREADS
PyErr_SetString(PyExc_RuntimeError,"Naming Service Unreacheable");
return NULL;
public:
//constructor w/o parameters
//all messages will be put into terminal via cout
- Logger();
+ Logger();
//constructor with parameter, filename is output file
//all messages will be put into special file passed as parameter
Logger(const char *filename);
- virtual ~Logger();
+ virtual ~Logger();
//put message into one special place for all servers
void putMessage(const char* message);
void ping();
bool m_putIntoFile;
//ofstream class specialized for disk file output
std::ofstream m_outputFile;
-
//synchronisation object
static omni_mutex myLock;
try {
obj = inc->resolve(name);
if (!CORBA::is_nil(obj)) m_pInterfaceLogger = SALOME_Logger::Logger::_narrow(obj);
- } catch(CosNaming::NamingContext::NotFound) {
+ } catch(CosNaming::NamingContext::NotFound&) {
} catch(...) {
}
if (!CORBA::is_nil(m_pInterfaceLogger)) {
return 1;
}
-void SALOME_Trace::putMessage(std::ostream& msg)
+void SALOME_Trace::putMessage(std::ostream& /*msg*/)
{
//if (!isInitialized) std::cout<<"!!! SALOME_Trace is used without initialising !!!"<<std::endl;
//write resulting string into Logger CORBA server
{
reason=CORBA::string_dup("");
- pthread_t *th;
+ pthread_t *th = 0;
if(_numproc == 0){
th = new pthread_t[_nbproc];
for(int ip=1;ip<_nbproc;ip++){
// Create an instance of component
Engines::EngineComponent_ptr
Engines_MPIContainer_i::create_component_instance_env( const char* componentName,
- const Engines::FieldsDict& env,
+ const Engines::FieldsDict& /*env*/,
CORBA::String_out reason)
{
reason=CORBA::string_dup("");
- pthread_t *th;
+ pthread_t *th = 0;
if(_numproc == 0){
th = new pthread_t[_nbproc];
for(int ip=1;ip<_nbproc;ip++){
Engines::EngineComponent_ptr Engines_MPIContainer_i::load_impl(const char* nameToRegister,
const char* componentName)
{
- pthread_t *th;
+ pthread_t *th = 0;
if(_numproc == 0){
th = new pthread_t[_nbproc];
for(int ip=1;ip<_nbproc;ip++){
Engines::MPIObject_ptr pcptr;
Engines::MPIObject_ptr spcptr;
- pthread_t *th;
+ pthread_t *th = 0;
if(_numproc == 0){
pcptr = (Engines::MPIObject_ptr)component_i;
th = new pthread_t[_nbproc];
void Engines_MPIContainer_i::finalize_removal()
{
- pthread_t *th;
+ pthread_t *th = 0;
if(_numproc == 0){
th = new pthread_t[_nbproc];
for(int ip=1;ip<_nbproc;ip++){
#include "MPIObject_i.hxx"
#include "utilities.h"
#include "Utils_SALOME_Exception.hxx"
+#include "Basics_MpiUtils.hxx"
#define TIMEOUT 5
for(unsigned int ip=0;ip<tior->length();ip++)
tior[ip] = (*_tior)[ip];
return tior._retn();
-};
+}
void MPIObject_i::tior(const Engines::IORTab& ior)
{
_srv[service] = false;
MPI_Barrier(MPI_COMM_WORLD);
-#if OMPI_MAJOR_VERSION >= 4
- MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_RETURN);
-#else
- MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_RETURN);
-#endif
+ MPI_ERROR_HANDLER(MPI_ERRORS_RETURN);
MPI_Info_create(&info);
MPI_Info_set(info, "ompi_unique", "true");
if( _numproc == 0 )
throw SALOME_Exception(msg.str().c_str());
}
}
-#if OMPI_MAJOR_VERSION >= 4
- MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_ARE_FATAL);
-#else
- MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_ARE_FATAL);
-#endif
+ MPI_ERROR_HANDLER(MPI_ERRORS_ARE_FATAL);
/* If rank 0 is server, all processes call MPI_Comm_accept */
/* If rank 0 is not server, all processes call MPI_Comm_connect */
#include <mpi.h>
-int main(int argc, char** argv)
+int main()
{
#ifdef OPEN_MPI
return 1;
# include <unistd.h>
#endif
+#include "Basics_MpiUtils.hxx"
+
int main(int argc, char**argv)
{
int *indg;
double *vector, sum=0., norm=1., etalon=0.;
int rank, size, grank, gsize, rsize;
- int vsize=20, lvsize, rlvsize;
+ int vsize=20, lvsize;
+ //int rlvsize;
int i, k1, k2, imin, imax, nb;
int srv=0;
MPI_Comm com, icom;
MPI_Comm_rank( MPI_COMM_WORLD, &rank );
MPI_Barrier(MPI_COMM_WORLD);
-#if OMPI_MAJOR_VERSION >= 4
- MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_RETURN);
-#else
- MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_RETURN);
-#endif
+ MPI_ERROR_HANDLER(MPI_ERRORS_RETURN);
#ifdef HAVE_MPI2
MPI_Info_create(&info);
exit(1);
}
}
-#if OMPI_MAJOR_VERSION >= 4
- MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_ARE_FATAL);
-#else
- MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_ARE_FATAL);
-#endif
+ MPI_ERROR_HANDLER(MPI_ERRORS_ARE_FATAL);
MPI_Bcast(&srv,1,MPI_INT,0,MPI_COMM_WORLD);
if ( srv )
MPI_Comm_accept( port_name, MPI_INFO_NULL, 0, MPI_COMM_WORLD, &icom );
}
for(i=0;i<rsize;i++){
- rlvsize = ((i+1)*vsize) / rsize - (i*vsize) / rsize;
+ //rlvsize = ((i+1)*vsize) / rsize - (i*vsize) / rsize;
k1 = (i*vsize)/rsize;
k2 = ((i+1)*vsize)/rsize -1;
#include "SALOME_ModuleCatalog_Acomponent_impl.hxx"
#include "Utils_ExceptHandlers.hxx"
-UNEXPECT_CATCH(MC_NotFound, SALOME_ModuleCatalog::NotFound);
+UNEXPECT_CATCH(MC_NotFound, SALOME_ModuleCatalog::NotFound)
#include "utilities.h"
//----------------------------------------------------------------------
SALOME_ModuleCatalog::DefinitionInterface*
SALOME_ModuleCatalog_AcomponentImpl::GetInterface(const char* interfacename)
- throw(SALOME_ModuleCatalog::NotFound)
{
if(MYDEBUG) BEGIN_OF("GetInterface");
if(MYDEBUG) SCRUTE(interfacename);
//----------------------------------------------------------------------
SALOME_ModuleCatalog::ListOfServices*
SALOME_ModuleCatalog_AcomponentImpl::GetServiceList(const char* interfacename)
- throw(SALOME_ModuleCatalog::NotFound)
{
if(MYDEBUG) BEGIN_OF("GetServiceList");
if(MYDEBUG) SCRUTE(interfacename);
SALOME_ModuleCatalog::Service*
SALOME_ModuleCatalog_AcomponentImpl::GetService(const char* interfacename,
const char* servicename)
- throw(SALOME_ModuleCatalog::NotFound)
{
if(MYDEBUG) BEGIN_OF("GetService");
if(MYDEBUG) SCRUTE(interfacename);
//----------------------------------------------------------------------
SALOME_ModuleCatalog::Service*
SALOME_ModuleCatalog_AcomponentImpl::GetDefaultService(const char* interfacename)
- throw(SALOME_ModuleCatalog::NotFound)
{
if(MYDEBUG) BEGIN_OF("GetDefaultService");
if(MYDEBUG) SCRUTE(interfacename);
//----------------------------------------------------------------------
char*
SALOME_ModuleCatalog_AcomponentImpl::GetPathPrefix(const char* machinename)
- throw(SALOME_ModuleCatalog::NotFound)
{
if(MYDEBUG) BEGIN_OF("GetPathPrefix");
if(MYDEBUG) SCRUTE(machinename);
#ifdef WIN32
#pragma warning(disable:4275) // Disable warning interface non dll
-#pragma warning(disable:4290) // Warning Exception ...
+//#pragma warning(disable:4290) // Warning Exception ...
#endif
class MODULECATALOG_EXPORT SALOME_ModuleCatalog_AcomponentImpl: public POA_SALOME_ModuleCatalog::Acomponent
\return the wanted interface
*/
virtual SALOME_ModuleCatalog::DefinitionInterface*
- GetInterface(const char* interfacename)
- throw(SALOME_ModuleCatalog::NotFound);
+ GetInterface(const char* interfacename);
//! method to get a list of the services name of an interface of a component
/*!If the specified interface doesn't exist, the Notfound exception is thrown
\return a list of the services of the wanted interface
*/
virtual SALOME_ModuleCatalog::ListOfServices*
- GetServiceList(const char* interfacename)
- throw(SALOME_ModuleCatalog::NotFound);
+ GetServiceList(const char* interfacename);
//! method to get one service of an interface of a component
*/
virtual SALOME_ModuleCatalog::Service*
GetService(const char* interfacename,
- const char* servicename)
- throw(SALOME_ModuleCatalog::NotFound);
+ const char* servicename);
//! method to get the default service of an interface of a component
/*! If the specified interface doesn't exist, the Notfound exception is thrown
\return the default service of the interface
*/
virtual SALOME_ModuleCatalog::Service*
- GetDefaultService(const char* interfacename)
- throw(SALOME_ModuleCatalog::NotFound);
+ GetDefaultService(const char* interfacename);
//! method to get the PathPrefix of a computer
/*! If the wanted computer doesn't exist, the Notfound exception is thrown
\param machinename const char* arguments
\return the prefix path
*/
- virtual char* GetPathPrefix(const char* machinename)
- throw(SALOME_ModuleCatalog::NotFound);
+ virtual char* GetPathPrefix(const char* machinename);
//! method to obtain the constraint affected to a component
/*! to be resolved by LifeCycle for the computer choice
\return the constraint
*/
- virtual char* constraint() ;
+ virtual char* constraint();
//! method to obtain the componentname
/*!
PrintComponent(Superv);
// obtain prefix path for a computer
- char* path;
- path =Superv->GetPathPrefix("omote");
- MESSAGE("Path prefix pour omote : " << path);
+ MESSAGE("Path prefix pour omote : " << Superv->GetPathPrefix("omote"));
// obtain prefix path for a computer
- path =Geom->GetPathPrefix("eri");
- MESSAGE("Path prefix pour eri : " << path);
+ MESSAGE("Path prefix pour eri : " << Geom->GetPathPrefix("eri"));
}
catch(SALOME_ModuleCatalog::NotFound &ex){
SALOME_ModuleCatalog_Handler::SALOME_ModuleCatalog_Handler(ParserPathPrefixes& pathList,
ParserComponents& moduleList,
ParserTypes& typeMap,
- TypeList& typeList):_typeMap(typeMap),_typeList(typeList),
- _pathList(pathList),_moduleList(moduleList)
+ TypeList& typeList):_pathList(pathList),_moduleList(moduleList),
+ _typeMap(typeMap),_typeList(typeList)
{
if(MYDEBUG) BEGIN_OF("SALOME_ModuleCatalog_Handler");
std::ostream & operator<< (std::ostream & f,
const ParserService & S)
{
- int i, n;
+ size_t i, n;
f << " name : " << S.name << std::endl;
f << " default : " << (S.byDefault ? "yes" : "no")
<< std::endl;
std::ostream & operator<< (std::ostream & f,
const ParserInterface & I)
{
- int j, n;
+ size_t j, n;
f << " name : " << I.name << std::endl;
n = I.services.size();
std::ostream & operator<< (std::ostream & f,
const ParserComponent & C)
{
- int j, n;
+ size_t j, n;
f << std::endl
<< " name : " << C.name << std::endl;
f << " user name : " << C.username << std::endl;
//
long TIMESleep = 500000000;
int NumberOfTries = 40;
-#ifndef WIN32
- int a;
-#endif
timespec ts_req;
ts_req.tv_nsec=TIMESleep;
ts_req.tv_sec=0;
{
if (i!=1)
#ifndef WIN32
- a=nanosleep(&ts_req,&ts_rem);
+ nanosleep(&ts_req,&ts_rem);
#else
Sleep(TIMESleep/1000000);
#endif
{
if (j!=1)
#ifndef WIN32
- a=nanosleep(&ts_req, &ts_rem);
+ nanosleep(&ts_req, &ts_rem);
#else
Sleep(TIMESleep/1000000);
#endif
try{
object = inc->resolve(name);}
- catch(CosNaming::NamingContext::NotFound)
+ catch(CosNaming::NamingContext::NotFound&)
{
INFOS( "Logger Server wasn't found" );
}
{
std::list<std::string> aList;
- int sepLen = theSeparator.length();
- int startPos = 0, sepPos = theString.find(theSeparator, startPos);
+ size_t sepLen = theSeparator.length();
+ size_t startPos = 0, sepPos = theString.find(theSeparator, startPos);
while (1)
{
\param pathlist ParserPathPrefixes arguments
\param typeMap ParserTypes arguments
*/
- virtual void _parse_xml_file(const char* file,
- ParserComponents & modulelist,
- ParserPathPrefixes & pathlist,
- ParserTypes& typeMap,
- TypeList& typeList);
+ void _parse_xml_file(const char* file,
+ ParserComponents & modulelist,
+ ParserPathPrefixes & pathlist,
+ ParserTypes& typeMap,
+ TypeList& typeList);
//! method to find component in the parser list
/*!
\param pathlist ListOfParserPathPrefix arguments
\return true if verification is OK
*/
- virtual bool _verify_path_prefix(ParserPathPrefixes & pathlist);
+ bool _verify_path_prefix(ParserPathPrefixes & pathlist);
// Theses variables will contain the path to the general and personal catalogs
char* _general_path;
SALOME_ModuleCatalog::ListOfTypeDefinition* SALOME_ModuleCatalogImpl::GetTypes()
{
SALOME_ModuleCatalog::ListOfTypeDefinition_var type_list = new SALOME_ModuleCatalog::ListOfTypeDefinition();
- type_list->length(myPrivate->_typeList.size());
+ type_list->length((CORBA::ULong)myPrivate->_typeList.size());
for (unsigned int ind = 0 ; ind < myPrivate->_typeList.size() ; ind++)
{
type_list[ind].kind=SALOME_ModuleCatalog::Objref;
type_list[ind].id=CORBA::string_dup(myPrivate->_typeList[ind].id.c_str());
//bases
- type_list[ind].bases.length(myPrivate->_typeList[ind].bases.size());
+ type_list[ind].bases.length((CORBA::ULong)myPrivate->_typeList[ind].bases.size());
std::vector<std::string>::const_iterator miter;
miter=myPrivate->_typeList[ind].bases.begin();
int n_memb=0;
{
type_list[ind].kind=SALOME_ModuleCatalog::Struc;
//members
- type_list[ind].members.length(myPrivate->_typeList[ind].members.size());
+ type_list[ind].members.length((CORBA::ULong)myPrivate->_typeList[ind].members.size());
std::vector< std::pair<std::string,std::string> >::const_iterator miter;
miter=myPrivate->_typeList[ind].members.begin();
SALOME_ModuleCatalog::ListOfComponents_var _list_components =
new SALOME_ModuleCatalog::ListOfComponents;
- _list_components->length(myPrivate->_personal_module_list.size());
+ _list_components->length((CORBA::ULong)myPrivate->_personal_module_list.size());
// All the components defined in the personal catalog are taken
for(unsigned int ind=0; ind < myPrivate->_personal_module_list.size();ind++){
if(MYDEBUG) SCRUTE(_list_components[ind]) ;
}
- int indice = myPrivate->_personal_module_list.size() ;
+ size_t indice = myPrivate->_personal_module_list.size();
bool _find = false;
// The components in the general catalog are taken only if they're
if(!_find){
if(MYDEBUG) MESSAGE("A new component " << myPrivate->_general_module_list[ind].name
<< " has to be to added in the list");
- _list_components->length(indice+1);
+ _list_components->length((CORBA::ULong)indice+1);
// The component is not already defined => has to be taken
- _list_components[indice]=(myPrivate->_general_module_list[ind].name).c_str();
- if(MYDEBUG) SCRUTE(_list_components[indice]) ;
+ _list_components[(CORBA::ULong)indice]=(myPrivate->_general_module_list[ind].name).c_str();
+ if(MYDEBUG) SCRUTE(_list_components[(CORBA::ULong)indice]) ;
indice++;
}else{
SALOME_ModuleCatalog::ListOfIAPP_Affich_var _list_components_icone =
new SALOME_ModuleCatalog::ListOfIAPP_Affich;
- _list_components_icone->length(myPrivate->_personal_module_list.size());
+ _list_components_icone->length((CORBA::ULong)myPrivate->_personal_module_list.size());
// All the components defined in the personal catalog are taken
for(unsigned int ind=0; ind < myPrivate->_personal_module_list.size();ind++){
//if(MYDEBUG) SCRUTE(_list_components_icone[ind].moduleicone);
}
- int indice = myPrivate->_personal_module_list.size() ;
+ size_t indice = myPrivate->_personal_module_list.size();
bool _find = false;
// The components in the general catalog are taken only if they're
}
if(!_find){
// if(MYDEBUG) MESSAGE("A new component " << _general_module_list[ind].name << " has to be to added in the list");
- _list_components_icone->length(indice+1);
+ _list_components_icone->length((CORBA::ULong)indice+1);
// The component is not already defined => has to be taken
- _list_components_icone[indice].modulename=myPrivate->_general_module_list[ind].name.c_str();
- _list_components_icone[indice].moduleusername=myPrivate->_general_module_list[ind].username.c_str();
- _list_components_icone[indice].moduleicone=myPrivate->_general_module_list[ind].icon.c_str();
- _list_components_icone[indice].moduleversion=myPrivate->_general_module_list[ind].version.c_str();
- _list_components_icone[indice].modulecomment=myPrivate->_general_module_list[ind].comment.c_str();
- //if(MYDEBUG) SCRUTE(_list_components_icone[indice].modulename) ;
- //if(MYDEBUG) SCRUTE(_list_components_icone[indice].moduleicone);
+ _list_components_icone[(CORBA::ULong)indice].modulename=myPrivate->_general_module_list[ind].name.c_str();
+ _list_components_icone[(CORBA::ULong)indice].moduleusername=myPrivate->_general_module_list[ind].username.c_str();
+ _list_components_icone[(CORBA::ULong)indice].moduleicone=myPrivate->_general_module_list[ind].icon.c_str();
+ _list_components_icone[(CORBA::ULong)indice].moduleversion=myPrivate->_general_module_list[ind].version.c_str();
+ _list_components_icone[(CORBA::ULong)indice].modulecomment=myPrivate->_general_module_list[ind].comment.c_str();
+ //if(MYDEBUG) SCRUTE(_list_components_icone[(CORBA::ULong)indice].modulename) ;
+ //if(MYDEBUG) SCRUTE(_list_components_icone[(CORBA::ULong)indice].moduleicone);
indice++;
}
_list_typed_component->length(0);
// Transform SALOME_ModuleCatalog::ComponentType in ParserComponentType
- ParserComponentType _temp_component_type;
+ ParserComponentType _temp_component_type = OTHER;
switch(component_type){
case SALOME_ModuleCatalog::GEOM:
_temp_component_type = GEOM ;
void SALOME_ModuleCatalogImpl::shutdown()
{
if (!CORBA::is_nil(_orb)) _orb->shutdown(0);
-};
+}
C_corba.implementationType=SALOME_ModuleCatalog::SO;
C_corba.implname = CORBA::string_dup(C_parser.implementationName.c_str());
- unsigned int _length = C_parser.interfaces.size();
- C_corba.interfaces.length(_length);
+ size_t _length = C_parser.interfaces.size();
+ C_corba.interfaces.length((CORBA::ULong)_length);
for (unsigned int ind = 0; ind < _length; ind++)
duplicate(C_corba.interfaces[ind], C_parser.interfaces[ind]);
I_corba.interfacename = CORBA::string_dup(I_parser.name.c_str());
// duplicate service list
- unsigned int _length = I_parser.services.size();
+ size_t _length = I_parser.services.size();
// if(MYDEBUG) SCRUTE(_length);
// I_corba.interfaceservicelist
// = new SALOME_ModuleCatalog::ListOfInterfaceService;
- I_corba.interfaceservicelist.length(_length);
+ I_corba.interfaceservicelist.length((CORBA::ULong)_length);
for (unsigned int ind1 = 0; ind1 < _length ; ind1 ++)
duplicate(I_corba.interfaceservicelist[ind1],
S_corba.TypeOfNode = S_parser.typeOfNode;
- unsigned int _length;
+ size_t _length;
// duplicate in Parameters
_length = S_parser.inParameters.size();
- S_corba.ServiceinParameter.length(_length);
+ S_corba.ServiceinParameter.length((CORBA::ULong)_length);
for (unsigned int ind2 = 0; ind2 < _length ; ind2 ++)
duplicate(S_corba.ServiceinParameter[ind2],
// duplicate out Parameters
_length = S_parser.outParameters.size();
- S_corba.ServiceoutParameter.length(_length);
+ S_corba.ServiceoutParameter.length((CORBA::ULong)_length);
for (unsigned int ind2 = 0; ind2 < _length ; ind2 ++)
duplicate(S_corba.ServiceoutParameter[ind2],
// duplicate in DataStreamParameters
_length = S_parser.inDataStreamParameters.size();
- S_corba.ServiceinDataStreamParameter.length(_length);
+ S_corba.ServiceinDataStreamParameter.length((CORBA::ULong)_length);
for (unsigned int ind2 = 0; ind2 < _length ; ind2 ++)
duplicate(S_corba.ServiceinDataStreamParameter[ind2],
// duplicate out DataStreamParameters
_length = S_parser.outDataStreamParameters.size();
// if(MYDEBUG) SCRUTE(_length);
- S_corba.ServiceoutDataStreamParameter.length(_length);
+ S_corba.ServiceoutDataStreamParameter.length((CORBA::ULong)_length);
for (unsigned int ind2 = 0; ind2 < _length ; ind2 ++)
duplicate(S_corba.ServiceoutDataStreamParameter[ind2],
void SALOME_NamingService::Register(CORBA::Object_ptr ObjRef,
const char* Path)
- throw(ServiceUnreachable)
+
{
Utils_Locker lock (&_myMutex);
// --- The current directory is now the directory where the object should
// be recorded
- int sizePath = splitPath.size();
- if (sizePath > dimension_resultat){
- ASSERT(sizePath == dimension_resultat+1);
+ size_t sizePath = splitPath.size();
+ if (sizePath > (size_t)dimension_resultat){
+ ASSERT(sizePath == (size_t)dimension_resultat+1);
context_name.length(1);
try{
// ============================================================================
CORBA::Object_ptr SALOME_NamingService::Resolve(const char* Path)
- throw(ServiceUnreachable)
+
{
Utils_Locker lock (&_myMutex);
// ============================================================================
CORBA::Object_ptr SALOME_NamingService::ResolveFirst(const char* Path)
- throw(ServiceUnreachable)
+
{
Utils_Locker lock (&_myMutex);
const char* containerName,
const char* componentName,
const int nbproc)
- throw(ServiceUnreachable)
+
{
Utils_Locker lock (&_myMutex);
if ( nbproc >= 1 )
{
- char *str_nbproc = new char[8];
+ char *str_nbproc = new char[16];
sprintf(str_nbproc, "_%d", nbproc);
if( strstr(name.c_str(),str_nbproc) == NULL)
continue; // check only containers with _%d in name
// ============================================================================
int SALOME_NamingService::Find(const char* name)
-throw(ServiceUnreachable)
+
{
Utils_Locker lock (&_myMutex);
*/
// ============================================================================
-bool SALOME_NamingService::Create_Directory(const char* Path) throw(ServiceUnreachable)
+bool SALOME_NamingService::Create_Directory(const char* Path)
{
Utils_Locker lock (&_myMutex);
*/
// ============================================================================
-bool SALOME_NamingService::Change_Directory(const char* Path) throw(ServiceUnreachable)
+bool SALOME_NamingService::Change_Directory(const char* Path)
{
Utils_Locker lock (&_myMutex);
*/
// ============================================================================
-char *SALOME_NamingService::Current_Directory() throw(ServiceUnreachable)
+char *SALOME_NamingService::Current_Directory()
{
Utils_Locker lock (&_myMutex);
}
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 += "/";
*/
// ============================================================================
-void SALOME_NamingService::list() throw(ServiceUnreachable)
+void SALOME_NamingService::list()
{
Utils_Locker lock (&_myMutex)
*/
// ============================================================================
-std::vector<std::string> SALOME_NamingService::list_directory() throw(ServiceUnreachable)
+std::vector<std::string> SALOME_NamingService::list_directory()
{
Utils_Locker lock (&_myMutex);
std::vector<std::string> dirList ;
*/
// ============================================================================
-std::vector<std::string> SALOME_NamingService::list_subdirs() throw(ServiceUnreachable)
+std::vector<std::string> SALOME_NamingService::list_subdirs()
{
Utils_Locker lock (&_myMutex);
std::vector<std::string> dirList ;
// ============================================================================
std::vector<std::string> SALOME_NamingService::list_directory_recurs()
-throw(ServiceUnreachable)
+
{
Utils_Locker lock (&_myMutex);
// ============================================================================
void SALOME_NamingService::Destroy_Name(const char* Path)
-throw(ServiceUnreachable)
+
{
Utils_Locker lock (&_myMutex);
// --- The current directory is now the directory where the object should
// be destroyed
- int sizePath = splitPath.size();
- if (sizePath > dimension_resultat)
+ size_t sizePath = splitPath.size();
+ if (sizePath > (size_t)dimension_resultat)
{
- ASSERT(sizePath == dimension_resultat+1);
+ ASSERT(sizePath == (size_t)dimension_resultat+1);
context_name.length(1);
try
*/
// ============================================================================
-void SALOME_NamingService::Destroy_Directory(const char* Path) throw(ServiceUnreachable)
+void SALOME_NamingService::Destroy_Directory(const char* Path)
{
Utils_Locker lock (&_myMutex);
*/
// ============================================================================
-void SALOME_NamingService::Destroy_FullDirectory(const char* Path) throw(ServiceUnreachable)
+void SALOME_NamingService::Destroy_FullDirectory(const char* Path)
{
//no need to lock here because method calls are threadsafe.
if( Change_Directory(Path) )
endWithDelim = true;
if (endIdx == std::string::npos)
endIdx = path.length();
- int lsub = endIdx - begIdx;
+ size_t lsub = endIdx - begIdx;
if (lsub >= 1)
splitPath.push_back(path.substr(begIdx, lsub));
begIdx = path.find_first_not_of(delims, endIdx);
int dim;
if (onlyDir) // only directory part
{
- dim = splitPath.size()-1; // omit final object
+ dim = (int)splitPath.size()-1; // omit final object
if (endWithDelim) // unless the path ends with a delimiter
dim++;
endWithDelim = true;
}
else
- dim = splitPath.size(); // directories and final object
+ dim = (int)splitPath.size(); // directories and final object
- context_name.length(dim);
+ context_name.length((CORBA::ULong)dim);
for (int i=0; i<dim; i++)
{
// SCRUTE(splitPath[i]);
// MESSAGE("--- " <<splitPath[i] <<".dir");
}
}
- return dim;
+ return dim; //TODO: return <int> or <size_t>?
}
// ============================================================================
#include "SALOME_NamingService_defs.hxx"
#ifdef WIN32
-#pragma warning(disable:4290) // Warning Exception ...
+//#pragma warning(disable:4290) // Warning Exception ...
#endif
class NAMINGSERVICE_EXPORT SALOME_NamingService
virtual ~SALOME_NamingService();
void init_orb(CORBA::ORB_ptr orb=0);
- void Register(CORBA::Object_ptr ObjRef, const char* Path) throw(ServiceUnreachable);
- CORBA::Object_ptr Resolve(const char* Path) throw( ServiceUnreachable);
- CORBA::Object_ptr ResolveFirst(const char* Path) throw( ServiceUnreachable);
+ void Register(CORBA::Object_ptr ObjRef, const char* Path) ;
+ CORBA::Object_ptr Resolve(const char* Path) ;
+ CORBA::Object_ptr ResolveFirst(const char* Path) ;
CORBA::Object_ptr ResolveComponent(const char* hostname,
const char* containerName,
const char* componentName,
- const int nbproc=0) throw(ServiceUnreachable);
+ const int nbproc=0) ;
std::string ContainerName(const char *ContainerName);
std::string ContainerName(const Engines::ContainerParameters& params);
std::string BuildContainerNameForNS(const char *ContainerName, const char *hostname);
std::string BuildContainerNameForNS(const Engines::ContainerParameters& params, const char *hostname);
- int Find(const char* name) throw(ServiceUnreachable);
- bool Create_Directory(const char* Path) throw(ServiceUnreachable);
- bool Change_Directory(const char* Path) throw(ServiceUnreachable);
- char* Current_Directory() throw(ServiceUnreachable);
- void list() throw(ServiceUnreachable);
- std::vector<std::string> list_directory() throw(ServiceUnreachable);
- std::vector<std::string> list_subdirs() throw(ServiceUnreachable);
- std::vector<std::string> list_directory_recurs() throw(ServiceUnreachable);
- void Destroy_Name(const char* Path) throw(ServiceUnreachable);
- virtual void Destroy_Directory(const char* Path) throw(ServiceUnreachable);
- virtual void Destroy_FullDirectory(const char* Path) throw(ServiceUnreachable);
+ int Find(const char* name) ;
+ bool Create_Directory(const char* Path) ;
+ bool Change_Directory(const char* Path) ;
+ char* Current_Directory() ;
+ void list() ;
+ std::vector<std::string> list_directory() ;
+ std::vector<std::string> list_subdirs() ;
+ std::vector<std::string> list_directory_recurs() ;
+ void Destroy_Name(const char* Path) ;
+ virtual void Destroy_Directory(const char* Path) ;
+ virtual void Destroy_FullDirectory(const char* Path) ;
char *getIORaddr();
CORBA::ORB_ptr orb();
if (_NS.Change_Directory(path.c_str()))
{
std::vector<std::string> subdirs = _NS.list_subdirs();
- for (int i=0; i<subdirs.size(); i++)
+ for (size_t i=0; i<subdirs.size(); i++)
{
std::string subpath=path + "/" +subdirs[i];
_destroyDirectoryRecurs(subpath);
#include "NOTIFICATION.hxx"
NOTIFICATION_Consumer::NOTIFICATION_Consumer():
- proxy_supplier(0),
- _ok(false)
+ _ok(false),
+ proxy_supplier(0)
{
CosNA_EventChannel_ptr channel = NOTIFICATION_channel();
if (CORBA::is_nil(channel)) {
void NOTIFICATION_Consumer::disconnect_structured_pull_consumer() {
}
-void NOTIFICATION_Consumer::offer_change(const CosN_EventTypeSeq& added, const CosN_EventTypeSeq& deled) {
+void NOTIFICATION_Consumer::offer_change(const CosN_EventTypeSeq& /*added*/, const CosN_EventTypeSeq& /*deled*/) {
}
long NOTIFICATION_Supplier::_stamp = 0;
NOTIFICATION_Supplier::NOTIFICATION_Supplier(const char* instanceName, bool notif):
+ _ok(false),
_sender(instanceName),
_counter(0),
- proxy_consumer(0),
- _ok(false)
+ proxy_consumer(0)
{
if (notif) {
CosNA_EventChannel_ptr channel = NOTIFICATION_channel();
void NOTIFICATION_Supplier::disconnect_structured_push_supplier() {
}
-void NOTIFICATION_Supplier::subscription_change(const CosN_EventTypeSeq& added, const CosN_EventTypeSeq& deled) {
+void NOTIFICATION_Supplier::subscription_change(const CosN_EventTypeSeq& /*added*/, const CosN_EventTypeSeq& /*deled*/) {
}
# include <stdio.h>
}
-Registry::Components_var Connexion( int argc , char **argv , const char *ptrSessionName ) throw( CommException )
+Registry::Components_var Connexion( int argc , char **argv , const char */*ptrSessionName*/ )
{
Registry::Components_var varComponents = 0 ;
- ASSERT(ptrSessionName) ;
- ASSERT(strlen(ptrSessionName)>0) ;
const char *registryName = "Registry" ;
try
const Identity lesInfos( aName ) ;
Registry::Infos infos ;
infos.name = CORBA::string_dup( lesInfos.name() ) ;
- infos.pid = lesInfos.pid() ;
- infos.machine = CORBA::string_dup( lesInfos.host_char() ) ;
+ infos.pid = lesInfos.pid() ;
+ infos.machine = CORBA::string_dup( lesInfos.host_char() ) ;
infos.adip = CORBA::string_dup( lesInfos.adip() ) ;
- infos.uid = (long)lesInfos.uid() ;
- infos.pwname = CORBA::string_dup( lesInfos.pwname() ) ;
- infos.tc_start = lesInfos.start() ;
- infos.tc_hello = 0 ;
- infos.tc_end = 0 ;
- infos.difftime = 0 ;
+ infos.uid = (CORBA::Long)lesInfos.uid() ; //!< TODO: pointer truncation from const PSID to long
+ infos.pwname = CORBA::string_dup( lesInfos.pwname() ) ;
+ infos.tc_start = (CORBA::Long)lesInfos.start() ; //!< TODO: conversation from const time_t to CORBA::Long
+ infos.tc_hello = 0 ;
+ infos.tc_end = 0 ;
+ infos.difftime = 0 ;
infos.cdir = CORBA::string_dup( lesInfos.rep() ) ;
- infos.status = -1 ;
- infos.ior = CORBA::string_dup(_Ior);
+ infos.status = -1 ;
+ infos.ior = CORBA::string_dup(_Ior);
ASSERT(!CORBA::is_nil(this->_VarComponents)) ;
{
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 )
ASSERT(_reg.find(id)!=_reg.end())
_reg[id]->_status=TERMINATED;
- _reg[id]->_ts_end = time(NULL) ;
+ _reg[id]->_ts_end = (long)time(NULL) ; //!< TODO: conversation from time_t to long
_fin[id]=_reg[id];
_reg.erase(id);
ASSERT(strlen(_SessionName)>0) ;
ASSERT(_reg.find(id)!=_reg.end())
- _reg[id]->_ts_hello = time(NULL) ;
+ _reg[id]->_ts_hello = (long)time(NULL) ; //!< TODO: conversation from time_t to long
END_OF("RegistryService::hello") ;
return ;
Registry::AllInfos *all = new Registry::AllInfos ;
ASSERT(all) ;
- const int RegLength = mymap.size();
- all->length(RegLength);
+ size_t RegLength = mymap.size();
+ all->length((CORBA::ULong)RegLength);
std::map<int,client_infos *>::iterator im;
for (im=mymap.begin();im!=mymap.end(); im++)
_adip(duplicate(infos.adip)),\
_uid(infos.uid),\
_pwname(duplicate(infos.pwname)),\
- _ts_start(time(NULL)),\
+ _ts_start((long)time(NULL)),\
_difftime(infos.tc_start - _ts_start),\
_cdir(duplicate(infos.cdir)),\
_ts_hello(_ts_start),\
const char *registryName = "Registry" ;
long TIMESleep = 250000000;
int NumberOfTries = 40;
-#ifndef WIN32
- int a;
-#endif
timespec ts_req;
ts_req.tv_nsec=TIMESleep;
ts_req.tv_sec=0;
{
if (i!=1)
#ifndef WIN32
- a=nanosleep(&ts_req,&ts_rem);
+ nanosleep(&ts_req,&ts_rem);
#else
Sleep(TIMESleep/1000000);
#endif
{
if (j!=1)
#ifndef WIN32
- a=nanosleep(&ts_req, &ts_rem);
+ nanosleep(&ts_req, &ts_rem);
#else
Sleep(TIMESleep/1000000);
#endif
{
object = inc->resolve(name);
}
- catch(CosNaming::NamingContext::NotFound)
+ catch(CosNaming::NamingContext::NotFound&)
{
MESSAGE( "Registry Server: Logger Server wasn't found" );
}
*/
//=============================================================================
-ResourcesManager_cpp::ResourcesManager_cpp() throw(ResourcesException)
+ResourcesManager_cpp::ResourcesManager_cpp()
{
RES_MESSAGE("ResourcesManager_cpp constructor");
//=============================================================================
std::vector<std::string>
-ResourcesManager_cpp::GetFittingResources(const resourceParams& params) throw(ResourcesException)
+ResourcesManager_cpp::GetFittingResources(const resourceParams& params)
{
RES_MESSAGE("[GetFittingResources] on computer " << Kernel_Utils::GetHostname().c_str());
RES_MESSAGE("[GetFittingResources] with resource name: " << params.name);
#ifdef WIN32
#pragma warning(disable:4251) // Warning DLL Interface ...
-#pragma warning(disable:4290) // Warning Exception ...
+//#pragma warning(disable:4290) // Warning Exception ...
#endif
// --- WARNING ---
public:
ResourcesManager_cpp(const char *xmlFilePath);
- ResourcesManager_cpp() throw(ResourcesException);
+ ResourcesManager_cpp();
~ResourcesManager_cpp();
std::vector<std::string>
- GetFittingResources(const resourceParams& params) throw(ResourcesException);
+ GetFittingResources(const resourceParams& params);
std::string Find(const std::string& policy, const std::vector<std::string>& listOfResources) const;
#include <map>
std::string LoadRateManagerFirst::Find(const std::vector<std::string>& hosts,
- const MapOfParserResourcesType& resList)
+ const MapOfParserResourcesType& /*resList*/)
{
if (hosts.size() == 0)
return std::string("");
}
std::string LoadRateManagerAltCycl::Find(const std::vector<std::string>& hosts,
- const MapOfParserResourcesType& resList)
+ const MapOfParserResourcesType& /*resList*/)
{
if (hosts.size() == 0)
return std::string("");
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*/) { return ""; }
};
class RESOURCESMANAGER_EXPORT LoadRateManagerFirst : public LoadRateManager
{
resource.setAccessProtocolTypeStr((const char *)protocol);
}
- catch (const ResourcesException & e)
+ catch (const ResourcesException & )
{
std::cerr << "SALOME_ResourcesCatalog_Handler::ProcessMember : Warning found a machine with a bad protocol" << std::endl;
std::cerr << "SALOME_ResourcesCatalog_Handler::ProcessMember : Warning this machine will not be added" << std::endl;
{
resource.setClusterInternalProtocolStr((const char *)iprotocol);
}
- catch (const ResourcesException & e)
+ catch (const ResourcesException &)
{
std::cerr << "SALOME_ResourcesCatalog_Handler::ProcessMember : Warning found a machine with a bad protocol" << std::endl;
std::cerr << "SALOME_ResourcesCatalog_Handler::ProcessMember : Warning this machine will not be added" << std::endl;
{
resource.setResourceTypeStr((const char*)type);
}
- catch (const ResourcesException & e)
+ catch (const ResourcesException &)
{
cerr << "Warning, invalid type \"" << (const char*)type << "\" for resource \"" <<
resource.Name << "\", using default value \"" << resource.getResourceTypeStr() <<
{
resource.setAccessProtocolTypeStr((const char *)protocol);
}
- catch (const ResourcesException & e)
+ catch (const ResourcesException &)
{
cerr << "Warning, invalid protocol \"" << (const char*)protocol << "\" for resource \"" <<
resource.Name << "\", using default value \"" <<
{
resource.setClusterInternalProtocolStr((const char *)iprotocol);
}
- catch (const ResourcesException & e)
+ catch (const ResourcesException &)
{
cerr << "Warning, invalid internal protocol \"" << (const char*)iprotocol <<
"\" for resource \"" << resource.Name << "\", using default value \"" <<
{
resource.setBatchTypeStr((const char *)batch);
}
- catch (const ResourcesException & e)
+ catch (const ResourcesException &)
{
cerr << "Warning, invalid batch manager \"" << (const char*)batch <<
"\" for resource \"" << resource.Name << "\", using default value \"" <<
{
resource.setMpiImplTypeStr((const char *)mpi);
}
- catch (const ResourcesException & e)
+ catch (const ResourcesException &)
{
cerr << "Warning, invalid MPI implementation \"" << (const char*)mpi <<
"\" for resource \"" << resource.Name << "\", using default value \"" <<
{
resource.setCanLaunchBatchJobsStr((const char *)can_launch_batch_jobs);
}
- catch (const ResourcesException & e)
+ catch (const ResourcesException &)
{
cerr << "Warning, invalid can_launch_batch_jobs parameter value \"" <<
(const char*)can_launch_batch_jobs << "\" for resource \"" << resource.Name <<
{
resource.setCanRunContainersStr((const char *)can_run_containers);
}
- catch (const ResourcesException & e)
+ catch (const ResourcesException &)
{
cerr << "Warning, invalid can_run_containers parameter value \"" <<
(const char*)can_run_containers << "\" for resource \"" << resource.Name <<
ParserResourcesType::ParserResourcesType()
-: type(single_machine),
- Protocol(ssh),
+: Protocol(ssh),
ClusterInternalProtocol(ssh),
+ type(single_machine),
Batch(none),
mpi(nompi),
nbOfProc(1),
machines=new Engines::ResourceList;
nbProcsOfMachines=new Engines::IntegerList;
std::size_t sz(ret0.size());
- machines->length(sz); nbProcsOfMachines->length(sz);
+ machines->length((CORBA::ULong)sz); nbProcsOfMachines->length((CORBA::ULong)sz);
for(std::size_t j=0;j<sz;j++)
{
- (*machines)[j]=CORBA::string_dup(ret0[j].c_str());
- (*nbProcsOfMachines)[j]=ret1[j];
+ (*machines)[(CORBA::ULong)j]=CORBA::string_dup(ret0[j].c_str());
+ (*nbProcsOfMachines)[(CORBA::ULong)j]=ret1[j];
}
}
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());
for(unsigned int i=0;i<strvecCpp.size();i++)
strvecCorba[i] = strvecCpp[i].c_str();
return strvecCorba;
// indirect recursion.
void lock();
void unlock();
-};
+}
#endif
}
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());
#include <vector>
#include "Utils_ExceptHandlers.hxx"
-UNEXPECT_CATCH(AP_InvalidIdentifier, SALOMEDS::AttributeParameter::InvalidIdentifier);
+UNEXPECT_CATCH(AP_InvalidIdentifier, SALOMEDS::AttributeParameter::InvalidIdentifier)
//=======================================================================
/*!
*/
//=======================================================================
CORBA::Long SALOMEDS_AttributeParameter_i::GetInt(const char* theID)
- throw (SALOMEDS::AttributeParameter::InvalidIdentifier)
{
SALOMEDS::Locker lock;
Unexpect aCatch (AP_InvalidIdentifier);
*/
//=======================================================================
CORBA::Double SALOMEDS_AttributeParameter_i::GetReal(const char* theID)
- throw (SALOMEDS::AttributeParameter::InvalidIdentifier)
{
SALOMEDS::Locker lock;
Unexpect aCatch (AP_InvalidIdentifier);
*/
//=======================================================================
char* SALOMEDS_AttributeParameter_i::GetString(const char* theID)
- throw (SALOMEDS::AttributeParameter::InvalidIdentifier)
{
SALOMEDS::Locker lock;
Unexpect aCatch (AP_InvalidIdentifier);
*/
//=======================================================================
CORBA::Boolean SALOMEDS_AttributeParameter_i::GetBool(const char* theID)
- throw (SALOMEDS::AttributeParameter::InvalidIdentifier)
{
SALOMEDS::Locker lock;
Unexpect aCatch (AP_InvalidIdentifier);
*/
//=======================================================================
SALOMEDS::DoubleSeq* SALOMEDS_AttributeParameter_i::GetRealArray(const char* theID)
- throw (SALOMEDS::AttributeParameter::InvalidIdentifier)
{
SALOMEDS::Locker lock;
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];
*/
//=======================================================================
SALOMEDS::LongSeq* SALOMEDS_AttributeParameter_i::GetIntArray(const char* theID)
- throw (SALOMEDS::AttributeParameter::InvalidIdentifier)
{
SALOMEDS::Locker lock;
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];
*/
//=======================================================================
SALOMEDS::StringSeq* SALOMEDS_AttributeParameter_i::GetStrArray(const char* theID)
- throw (SALOMEDS::AttributeParameter::InvalidIdentifier)
{
SALOMEDS::Locker lock;
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());;
}
virtual void SetInt(const char* theID, CORBA::Long theValue);
- virtual CORBA::Long GetInt(const char* theID)
- throw (SALOMEDS::AttributeParameter::InvalidIdentifier);
+ virtual CORBA::Long GetInt(const char* theID);
virtual void SetReal(const char* theID, CORBA::Double theValue);
- virtual CORBA::Double GetReal(const char* theID)
- throw (SALOMEDS::AttributeParameter::InvalidIdentifier);
+ virtual CORBA::Double GetReal(const char* theID);
virtual void SetString(const char* theID, const char* theValue);
- virtual char* GetString(const char* theID)
- throw (SALOMEDS::AttributeParameter::InvalidIdentifier);
+ virtual char* GetString(const char* theID);
virtual void SetBool(const char* theID, CORBA::Boolean theValue);
- virtual CORBA::Boolean GetBool(const char* theID)
- throw (SALOMEDS::AttributeParameter::InvalidIdentifier);
+ virtual CORBA::Boolean GetBool(const char* theID);
virtual void SetRealArray(const char* theID, const SALOMEDS::DoubleSeq& theArray);
- virtual SALOMEDS::DoubleSeq* GetRealArray(const char* theID)
- throw (SALOMEDS::AttributeParameter::InvalidIdentifier);
+ virtual SALOMEDS::DoubleSeq* GetRealArray(const char* theID);
virtual void SetIntArray(const char* theID, const SALOMEDS::LongSeq& theArray);
- virtual SALOMEDS::LongSeq* GetIntArray(const char* theID)
- throw (SALOMEDS::AttributeParameter::InvalidIdentifier);
+ virtual SALOMEDS::LongSeq* GetIntArray(const char* theID);
virtual void SetStrArray(const char* theID, const SALOMEDS::StringSeq& theArray);
- virtual SALOMEDS::StringSeq* GetStrArray(const char* theID)
- throw (SALOMEDS::AttributeParameter::InvalidIdentifier);
+ virtual SALOMEDS::StringSeq* GetStrArray(const char* theID);
virtual CORBA::Boolean IsSet(const char* theID, CORBA::Long theType);
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();
+ size_t len = CasCadeSeq.size();
CorbaSeq->length(len);
- for (int i = 0; i < len; i++) {
+ for (size_t i = 0; i < len; i++) {
CorbaSeq[i] = CasCadeSeq[i];
}
return CorbaSeq._retn();
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]);
- }
- dynamic_cast<SALOMEDSImpl_AttributeSequenceOfReal*>(_impl)->Assign(CasCadeSeq);
+ std::vector<double> aSeq;
+ for(int i = 0, len = other.length(); i<len; i++) aSeq.push_back(other[i]);
+ dynamic_cast<SALOMEDSImpl_AttributeSequenceOfReal*>(_impl)->Assign(aSeq);
}
SALOMEDS::DoubleSeq* SALOMEDS_AttributeSequenceOfReal_i::CorbaSequence()
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();
+ size_t len = CasCadeSeq.size();
CorbaSeq->length(len);
- for (int i = 0; i < len; i++) {
+ for (size_t i = 0; i < len; i++) {
CorbaSeq[i] = CasCadeSeq[i];
}
return CorbaSeq._retn();
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());
- for (int i = 0; i < components.size(); i++) {
+ c_components->length((CORBA::ULong)components.size()); //!< TODO: conversion from size_t to CORBA::ULong
+ for (int i = 0; i < (int)components.size(); i++) { //TODO: mismatch signed/unsigned
c_components[i] = CORBA::string_dup(components[i].c_str());
}
return c_components._retn();
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());
- for (int i = 0; i < versions.size(); i++) {
+ c_versions->length((CORBA::ULong)versions.size()); //!< TODO: conversion from size_t to CORBA::ULong
+ for (int i = 0; i < (int)versions.size(); i++) { //TODO: mismatch signed/unsigned
c_versions[i] = CORBA::string_dup(versions[i].c_str());
}
return c_versions._retn();
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;
#include <string>
#include <vector>
-UNEXPECT_CATCH(ATI_IncorrectIndex, SALOMEDS::AttributeTable::IncorrectIndex);
-UNEXPECT_CATCH(ATI_IncorrectArgumentLength, SALOMEDS::AttributeTable::IncorrectArgumentLength);
+UNEXPECT_CATCH(ATI_IncorrectIndex, SALOMEDS::AttributeTable::IncorrectIndex)
+UNEXPECT_CATCH(ATI_IncorrectArgumentLength, SALOMEDS::AttributeTable::IncorrectArgumentLength)
void SALOMEDS_AttributeTableOfInteger_i::SetTitle(const char* theTitle)
{
}
void SALOMEDS_AttributeTableOfInteger_i::SetRowTitle(CORBA::Long theIndex, const char* theTitle)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch (ATI_IncorrectIndex);
}
char* SALOMEDS_AttributeTableOfInteger_i::GetRowTitle(CORBA::Long theIndex)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch (ATI_IncorrectIndex);
}
void SALOMEDS_AttributeTableOfInteger_i::SetRowTitles(const SALOMEDS::StringSeq& theTitles)
- throw (SALOMEDS::AttributeTable::IncorrectArgumentLength)
{
SALOMEDS::Locker lock;
Unexpect aCatch (ATI_IncorrectArgumentLength);
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++) {
+ if ((int)theTitles.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength();
+ 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();
}
void SALOMEDS_AttributeTableOfInteger_i::SetColumnTitle(CORBA::Long theIndex, const char* theTitle)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch (ATI_IncorrectIndex);
}
char* SALOMEDS_AttributeTableOfInteger_i::GetColumnTitle(CORBA::Long theIndex)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch (ATI_IncorrectIndex);
}
void SALOMEDS_AttributeTableOfInteger_i::SetColumnTitles(const SALOMEDS::StringSeq& theTitles)
- throw (SALOMEDS::AttributeTable::IncorrectArgumentLength)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATI_IncorrectArgumentLength);
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++) {
+ if ((int)theTitles.length() != aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength();
+ 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();
}
//Units support
void SALOMEDS_AttributeTableOfInteger_i::SetRowUnit(CORBA::Long theIndex, const char* theUnit)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch (ATI_IncorrectIndex);
}
char* SALOMEDS_AttributeTableOfInteger_i::GetRowUnit(CORBA::Long theIndex)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch (ATI_IncorrectIndex);
}
void SALOMEDS_AttributeTableOfInteger_i::SetRowUnits(const SALOMEDS::StringSeq& theUnits)
- throw (SALOMEDS::AttributeTable::IncorrectArgumentLength)
{
SALOMEDS::Locker lock;
Unexpect aCatch (ATI_IncorrectArgumentLength);
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++) {
+ if ((int)theUnits.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength();
+ 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();
}
}
void SALOMEDS_AttributeTableOfInteger_i::AddRow(const SALOMEDS::LongSeq& theData)
- throw (SALOMEDS::AttributeTable::IncorrectArgumentLength)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATI_IncorrectArgumentLength);
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);
}
}
void SALOMEDS_AttributeTableOfInteger_i::SetRow(CORBA::Long theRow, const SALOMEDS::LongSeq& theData)
- throw (SALOMEDS::AttributeTable::IncorrectArgumentLength, SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATI_IncorrectArgumentLength);
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* SALOMEDS_AttributeTableOfInteger_i::GetRow(CORBA::Long theRow)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATI_IncorrectIndex);
SALOMEDS::LongSeq_var CorbaSeq = new SALOMEDS::LongSeq;
std::vector<int> aRow = aTable->GetRowData(theRow);
- CorbaSeq->length(aRow.size());
- for (int i = 0; i < aRow.size(); i++) {
+ CorbaSeq->length((CORBA::ULong)aRow.size()); //!< TODO: conversion from size_t to CORBA::ULong
+ for (int i = 0; i < (int)aRow.size(); i++) {
CorbaSeq[i] = aRow[i];
}
return CorbaSeq._retn();
}
void SALOMEDS_AttributeTableOfInteger_i::AddColumn(const SALOMEDS::LongSeq& theData)
- throw (SALOMEDS::AttributeTable::IncorrectArgumentLength)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATI_IncorrectArgumentLength);
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);
}
}
void SALOMEDS_AttributeTableOfInteger_i::SetColumn(CORBA::Long theColumn, const SALOMEDS::LongSeq& theData)
- throw (SALOMEDS::AttributeTable::IncorrectArgumentLength, SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATI_IncorrectArgumentLength);
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* SALOMEDS_AttributeTableOfInteger_i::GetColumn(CORBA::Long theColumn)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATI_IncorrectIndex);
SALOMEDS::LongSeq_var CorbaSeq = new SALOMEDS::LongSeq;
std::vector<int> aColumn = aTable->GetColumnData(theColumn);
- CorbaSeq->length(aColumn.size());
- for (int i = 0; i < aColumn.size(); i++) {
+ CorbaSeq->length((CORBA::ULong)aColumn.size()); //!< TODO: conversion from size_t to CORBA::ULong
+ for (int i = 0; i < (int)aColumn.size(); i++) {
CorbaSeq[i] = aColumn[i];
}
return CorbaSeq._retn();
}
void SALOMEDS_AttributeTableOfInteger_i::PutValue(CORBA::Long theValue, CORBA::Long theRow, CORBA::Long theColumn)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATI_IncorrectIndex);
}
CORBA::Long SALOMEDS_AttributeTableOfInteger_i::GetValue(CORBA::Long theRow, CORBA::Long theColumn)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATI_IncorrectIndex);
}
void SALOMEDS_AttributeTableOfInteger_i::RemoveValue(CORBA::Long theRow, CORBA::Long theColumn)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATI_IncorrectIndex);
SALOMEDS::LongSeq_var CorbaSeq = new SALOMEDS::LongSeq;
std::vector<int> aSeq = aTable->GetSetRowIndices(theRow);
- CorbaSeq->length(aSeq.size());
- for (int i = 0; i < aSeq.size(); i++) {
+ CorbaSeq->length((CORBA::ULong)aSeq.size()); //!< TODO: conversion from size_t to CORBA::ULong
+ for (int i = 0; i < (int)aSeq.size(); i++) { //TODO: mismatch signed/unsigned
CorbaSeq[i] = aSeq[i];
}
return CorbaSeq._retn();
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;
SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfInteger_i::SortRow(CORBA::Long theRow,
SALOMEDS::AttributeTable::SortOrder sortOrder,
SALOMEDS::AttributeTable::SortPolicy sortPolicy)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATI_IncorrectIndex);
catch(...) {
throw SALOMEDS::AttributeTable::IncorrectIndex();
}
- CorbaSeq->length(aSeq.size());
- for (int i = 0; i < aSeq.size(); i++) {
+ CorbaSeq->length((CORBA::ULong)aSeq.size()); //!< TODO: conversion from size_t to CORBA::ULong
+ for (int i = 0; i < (int)aSeq.size(); i++) { //TODO: mismatch signed/unsigned
CorbaSeq[i] = aSeq[i];
}
return CorbaSeq._retn();
SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfInteger_i::SortColumn(CORBA::Long theColumn,
SALOMEDS::AttributeTable::SortOrder sortOrder,
SALOMEDS::AttributeTable::SortPolicy sortPolicy)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATI_IncorrectIndex);
catch(...) {
throw SALOMEDS::AttributeTable::IncorrectIndex();
}
- CorbaSeq->length(aSeq.size());
- for (int i = 0; i < aSeq.size(); i++) {
+ CorbaSeq->length((CORBA::ULong)aSeq.size()); //!< TODO: conversion from size_t to CORBA::ULong
+ for (int i = 0; i < (int)aSeq.size(); i++) { //TODO: mismatch signed/unsigned
CorbaSeq[i] = aSeq[i];
}
return CorbaSeq._retn();
SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfInteger_i::SortByRow(CORBA::Long theRow,
SALOMEDS::AttributeTable::SortOrder sortOrder,
SALOMEDS::AttributeTable::SortPolicy sortPolicy)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATI_IncorrectIndex);
catch(...) {
throw SALOMEDS::AttributeTable::IncorrectIndex();
}
- CorbaSeq->length(aSeq.size());
- for (int i = 0; i < aSeq.size(); i++) {
+ CorbaSeq->length((CORBA::ULong)aSeq.size()); //!< TODO: conversion from size_t to CORBA::ULong
+ for (int i = 0; i < (int)aSeq.size(); i++) { //TODO: mismatch signed/unsigned
CorbaSeq[i] = aSeq[i];
}
return CorbaSeq._retn();
SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfInteger_i::SortByColumn(CORBA::Long theColumn,
SALOMEDS::AttributeTable::SortOrder sortOrder,
SALOMEDS::AttributeTable::SortPolicy sortPolicy)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATI_IncorrectIndex);
catch(...) {
throw SALOMEDS::AttributeTable::IncorrectIndex();
}
- CorbaSeq->length(aSeq.size());
- for (int i = 0; i < aSeq.size(); i++) {
+ CorbaSeq->length((CORBA::ULong)aSeq.size()); //!< TODO: conversion from size_t to CORBA::ULong
+ for (int i = 0; i < (int)aSeq.size(); i++) { //TODO: mismatch signed/unsigned
CorbaSeq[i] = aSeq[i];
}
return CorbaSeq._retn();
void SALOMEDS_AttributeTableOfInteger_i::SwapCells(CORBA::Long theRow1, CORBA::Long theColumn1,
CORBA::Long theRow2, CORBA::Long theColumn2)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATI_IncorrectIndex);
}
void SALOMEDS_AttributeTableOfInteger_i::SwapRows(CORBA::Long theRow1, CORBA::Long theRow2)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATI_IncorrectIndex);
}
void SALOMEDS_AttributeTableOfInteger_i::SwapColumns(CORBA::Long theColumn1, CORBA::Long theColumn2)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATI_IncorrectIndex);
virtual void SetTitle(const char* theTitle);
virtual char* GetTitle();
- virtual void SetRowTitle(CORBA::Long theIndex, const char* theTitle)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
- virtual char* GetRowTitle(CORBA::Long theIndex)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
- virtual void SetRowTitles(const SALOMEDS::StringSeq& theTitles)
- throw (SALOMEDS::AttributeTable::IncorrectArgumentLength);
+ virtual void SetRowTitle(CORBA::Long theIndex, const char* theTitle);
+ virtual char* GetRowTitle(CORBA::Long theIndex);
+ virtual void SetRowTitles(const SALOMEDS::StringSeq& theTitles);
virtual SALOMEDS::StringSeq* GetRowTitles();
- virtual void SetColumnTitle(CORBA::Long theIndex, const char* theTitle)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
- virtual char* GetColumnTitle(CORBA::Long theIndex)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
- virtual void SetColumnTitles(const SALOMEDS::StringSeq& theTitles)
- throw (SALOMEDS::AttributeTable::IncorrectArgumentLength);
+ virtual void SetColumnTitle(CORBA::Long theIndex, const char* theTitle);
+ virtual char* GetColumnTitle(CORBA::Long theIndex);
+ virtual void SetColumnTitles(const SALOMEDS::StringSeq& theTitles);
virtual SALOMEDS::StringSeq* GetColumnTitles();
- virtual void SetRowUnit(CORBA::Long theIndex, const char* theUnit)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
- virtual char* GetRowUnit(CORBA::Long theIndex)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
- virtual void SetRowUnits(const SALOMEDS::StringSeq& theUnits)
- throw (SALOMEDS::AttributeTable::IncorrectArgumentLength);
+ virtual void SetRowUnit(CORBA::Long theIndex, const char* theUnit);
+ virtual char* GetRowUnit(CORBA::Long theIndex);
+ virtual void SetRowUnits(const SALOMEDS::StringSeq& theUnits);
virtual SALOMEDS::StringSeq* GetRowUnits();
virtual CORBA::Long GetNbRows();
virtual CORBA::Long GetNbColumns();
- virtual void AddRow(const SALOMEDS::LongSeq& theData)
- throw (SALOMEDS::AttributeTable::IncorrectArgumentLength);
- virtual void SetRow(CORBA::Long theRow, const SALOMEDS::LongSeq& theData)
- throw (SALOMEDS::AttributeTable::IncorrectArgumentLength, SALOMEDS::AttributeTable::IncorrectIndex);
- virtual SALOMEDS::LongSeq* GetRow(CORBA::Long theRow)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
- virtual void AddColumn(const SALOMEDS::LongSeq& theData)
- throw (SALOMEDS::AttributeTable::IncorrectArgumentLength);
- virtual void SetColumn(CORBA::Long theColumn, const SALOMEDS::LongSeq& theData)
- throw (SALOMEDS::AttributeTable::IncorrectArgumentLength, SALOMEDS::AttributeTable::IncorrectIndex);
- virtual SALOMEDS::LongSeq* GetColumn(CORBA::Long theColumn)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
- virtual void PutValue(CORBA::Long theValue, CORBA::Long theRow, CORBA::Long theColumn)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
+ virtual void AddRow(const SALOMEDS::LongSeq& theData);
+ virtual void SetRow(CORBA::Long theRow, const SALOMEDS::LongSeq& theData);
+ virtual SALOMEDS::LongSeq* GetRow(CORBA::Long theRow);
+ virtual void AddColumn(const SALOMEDS::LongSeq& theData);
+ virtual void SetColumn(CORBA::Long theColumn, const SALOMEDS::LongSeq& theData);
+ virtual SALOMEDS::LongSeq* GetColumn(CORBA::Long theColumn);
+ virtual void PutValue(CORBA::Long theValue, CORBA::Long theRow, CORBA::Long theColumn);
virtual CORBA::Boolean HasValue(CORBA::Long theRow, CORBA::Long theColumn);
- virtual CORBA::Long GetValue(CORBA::Long theRow, CORBA::Long theColumn)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
- virtual void RemoveValue(CORBA::Long theRow, CORBA::Long theColumn)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
+ virtual CORBA::Long GetValue(CORBA::Long theRow, CORBA::Long theColumn);
+ virtual void RemoveValue(CORBA::Long theRow, CORBA::Long theColumn);
virtual SALOMEDS::LongSeq* GetRowSetIndices(CORBA::Long theRow);
virtual void SetNbColumns(CORBA::Long theNbColumns);
virtual SALOMEDS::LongSeq* SortRow(CORBA::Long theRow, SALOMEDS::AttributeTable::SortOrder sortOrder,
- SALOMEDS::AttributeTable::SortPolicy sortPolicy)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
+ SALOMEDS::AttributeTable::SortPolicy sortPolicy);
virtual SALOMEDS::LongSeq* SortColumn(CORBA::Long theColumn, SALOMEDS::AttributeTable::SortOrder sortOrder,
- SALOMEDS::AttributeTable::SortPolicy sortPolicy)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
+ SALOMEDS::AttributeTable::SortPolicy sortPolicy);
virtual SALOMEDS::LongSeq* SortByRow(CORBA::Long theRow, SALOMEDS::AttributeTable::SortOrder sortOrder,
- SALOMEDS::AttributeTable::SortPolicy sortPolicy)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
+ SALOMEDS::AttributeTable::SortPolicy sortPolicy);
virtual SALOMEDS::LongSeq* SortByColumn(CORBA::Long theColumn, SALOMEDS::AttributeTable::SortOrder sortOrder,
- SALOMEDS::AttributeTable::SortPolicy sortPolicy)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
+ SALOMEDS::AttributeTable::SortPolicy sortPolicy);
virtual void SwapCells(CORBA::Long theRow1, CORBA::Long theColumn1,
- CORBA::Long theRow2, CORBA::Long theColumn2)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
- virtual void SwapRows(CORBA::Long theRow1, CORBA::Long theRow2)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
- virtual void SwapColumns(CORBA::Long theColumn1, CORBA::Long theColumn2)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
+ CORBA::Long theRow2, CORBA::Long theColumn2);
+ virtual void SwapRows(CORBA::Long theRow1, CORBA::Long theRow2);
+ virtual void SwapColumns(CORBA::Long theColumn1, CORBA::Long theColumn2);
virtual bool ReadFromFile(const SALOMEDS::TMPFile& theStream);
virtual SALOMEDS::TMPFile* SaveToFile();
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;
#include <vector>
#include "Utils_ExceptHandlers.hxx"
-UNEXPECT_CATCH(ATR_IncorrectIndex, SALOMEDS::AttributeTable::IncorrectIndex);
-UNEXPECT_CATCH(ATR_IncorrectArgumentLength, SALOMEDS::AttributeTable::IncorrectArgumentLength);
+UNEXPECT_CATCH(ATR_IncorrectIndex, SALOMEDS::AttributeTable::IncorrectIndex)
+UNEXPECT_CATCH(ATR_IncorrectArgumentLength, SALOMEDS::AttributeTable::IncorrectArgumentLength)
void SALOMEDS_AttributeTableOfReal_i::SetTitle(const char* theTitle)
{
}
void SALOMEDS_AttributeTableOfReal_i::SetRowTitle(CORBA::Long theIndex, const char* theTitle)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch (ATR_IncorrectIndex);
}
char* SALOMEDS_AttributeTableOfReal_i::GetRowTitle(CORBA::Long theIndex)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch (ATR_IncorrectIndex);
}
void SALOMEDS_AttributeTableOfReal_i::SetRowTitles(const SALOMEDS::StringSeq& theTitles)
- throw (SALOMEDS::AttributeTable::IncorrectArgumentLength)
{
SALOMEDS::Locker lock;
Unexpect aCatch (ATR_IncorrectArgumentLength);
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++) {
+ if ((int)theTitles.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength();
+ 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();
}
void SALOMEDS_AttributeTableOfReal_i::SetColumnTitle(CORBA::Long theIndex, const char* theTitle)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch (ATR_IncorrectIndex);
}
char* SALOMEDS_AttributeTableOfReal_i::GetColumnTitle(CORBA::Long theIndex)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch (ATR_IncorrectIndex);
}
void SALOMEDS_AttributeTableOfReal_i::SetColumnTitles(const SALOMEDS::StringSeq& theTitles)
- throw (SALOMEDS::AttributeTable::IncorrectArgumentLength)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATR_IncorrectArgumentLength);
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++) {
+ if ((int)theTitles.length() != aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength();
+ 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();
}
//Units support
void SALOMEDS_AttributeTableOfReal_i::SetRowUnit(CORBA::Long theIndex, const char* theUnit)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch (ATR_IncorrectIndex);
}
char* SALOMEDS_AttributeTableOfReal_i::GetRowUnit(CORBA::Long theIndex)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch (ATR_IncorrectIndex);
}
void SALOMEDS_AttributeTableOfReal_i::SetRowUnits(const SALOMEDS::StringSeq& theUnits)
- throw (SALOMEDS::AttributeTable::IncorrectArgumentLength)
{
SALOMEDS::Locker lock;
Unexpect aCatch (ATR_IncorrectArgumentLength);
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++) {
+ if ((int)theUnits.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength();
+ 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();
}
}
void SALOMEDS_AttributeTableOfReal_i::AddRow(const SALOMEDS::DoubleSeq& theData)
- throw (SALOMEDS::AttributeTable::IncorrectArgumentLength)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATR_IncorrectArgumentLength);
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);
}
void SALOMEDS_AttributeTableOfReal_i::SetRow(CORBA::Long theRow, const SALOMEDS::DoubleSeq& theData)
- throw (SALOMEDS::AttributeTable::IncorrectArgumentLength, SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATR_IncorrectArgumentLength);
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* SALOMEDS_AttributeTableOfReal_i::GetRow(CORBA::Long theRow)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATR_IncorrectIndex);
SALOMEDS::DoubleSeq_var CorbaSeq = new SALOMEDS::DoubleSeq;
std::vector<double> aRow = aTable->GetRowData(theRow);
- CorbaSeq->length(aRow.size());
- for (int i = 0; i < aRow.size(); i++) {
+ CorbaSeq->length((CORBA::ULong)aRow.size()); //!< TODO: conversion from size_t to CORBA::ULong
+ for (int i = 0; i < (int)aRow.size(); i++) {
CorbaSeq[i] = aRow[i];
}
return CorbaSeq._retn();
}
void SALOMEDS_AttributeTableOfReal_i::AddColumn(const SALOMEDS::DoubleSeq& theData)
- throw (SALOMEDS::AttributeTable::IncorrectArgumentLength)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATR_IncorrectArgumentLength);
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);
}
void SALOMEDS_AttributeTableOfReal_i::SetColumn(CORBA::Long theColumn, const SALOMEDS::DoubleSeq& theData)
- throw (SALOMEDS::AttributeTable::IncorrectArgumentLength, SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATR_IncorrectArgumentLength);
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* SALOMEDS_AttributeTableOfReal_i::GetColumn(CORBA::Long theColumn)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATR_IncorrectIndex);
SALOMEDS::DoubleSeq_var CorbaSeq = new SALOMEDS::DoubleSeq;
std::vector<double> aColumn = aTable->GetColumnData(theColumn);
- CorbaSeq->length(aColumn.size());
- for (int i = 0; i < aColumn.size(); i++) {
+ CorbaSeq->length((CORBA::ULong)aColumn.size()); //!< TODO: conversion from size_t to CORBA::ULong
+ for (int i = 0; i < (int)aColumn.size(); i++) {
CorbaSeq[i] = aColumn[i];
}
return CorbaSeq._retn();
}
void SALOMEDS_AttributeTableOfReal_i::PutValue(CORBA::Double theValue, CORBA::Long theRow, CORBA::Long theColumn)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATR_IncorrectIndex);
}
CORBA::Double SALOMEDS_AttributeTableOfReal_i::GetValue(CORBA::Long theRow, CORBA::Long theColumn)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATR_IncorrectIndex);
}
void SALOMEDS_AttributeTableOfReal_i::RemoveValue(CORBA::Long theRow, CORBA::Long theColumn)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATR_IncorrectIndex);
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;
SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfReal_i::SortRow(CORBA::Long theRow,
SALOMEDS::AttributeTable::SortOrder sortOrder,
SALOMEDS::AttributeTable::SortPolicy sortPolicy)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATR_IncorrectIndex);
catch(...) {
throw SALOMEDS::AttributeTable::IncorrectIndex();
}
- CorbaSeq->length(aSeq.size());
- for (int i = 0; i < aSeq.size(); i++) {
+ CorbaSeq->length((CORBA::ULong)aSeq.size()); //!< TODO: conversion from size_t to CORBA::ULong
+ for (int i = 0; i < (int)aSeq.size(); i++) { //TODO: mismatch signed/unsigned
CorbaSeq[i] = aSeq[i];
}
return CorbaSeq._retn();
SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfReal_i::SortColumn(CORBA::Long theColumn,
SALOMEDS::AttributeTable::SortOrder sortOrder,
SALOMEDS::AttributeTable::SortPolicy sortPolicy)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATR_IncorrectIndex);
catch(...) {
throw SALOMEDS::AttributeTable::IncorrectIndex();
}
- CorbaSeq->length(aSeq.size());
- for (int i = 0; i < aSeq.size(); i++) {
+ CorbaSeq->length((CORBA::ULong)aSeq.size()); //!< TODO: conversion from size_t to CORBA::ULong
+ for (int i = 0; i < (int)aSeq.size(); i++) { //TODO: mismatch signed/unsigned
CorbaSeq[i] = aSeq[i];
}
return CorbaSeq._retn();
SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfReal_i::SortByRow(CORBA::Long theRow,
SALOMEDS::AttributeTable::SortOrder sortOrder,
SALOMEDS::AttributeTable::SortPolicy sortPolicy)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATR_IncorrectIndex);
catch(...) {
throw SALOMEDS::AttributeTable::IncorrectIndex();
}
- CorbaSeq->length(aSeq.size());
- for (int i = 0; i < aSeq.size(); i++) {
+ CorbaSeq->length((CORBA::ULong)aSeq.size()); //!< TODO: conversion from size_t to CORBA::ULong
+ for (int i = 0; i < (int)aSeq.size(); i++) { //TODO: mismatch signed/unsigned
CorbaSeq[i] = aSeq[i];
}
return CorbaSeq._retn();
SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfReal_i::SortByColumn(CORBA::Long theColumn,
SALOMEDS::AttributeTable::SortOrder sortOrder,
SALOMEDS::AttributeTable::SortPolicy sortPolicy)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATR_IncorrectIndex);
catch(...) {
throw SALOMEDS::AttributeTable::IncorrectIndex();
}
- CorbaSeq->length(aSeq.size());
- for (int i = 0; i < aSeq.size(); i++) {
+ CorbaSeq->length((CORBA::ULong)aSeq.size()); //!< TODO: conversion from size_t to CORBA::ULong
+ for (int i = 0; i < (int)aSeq.size(); i++) { //TODO: mismatch signed/unsigned
CorbaSeq[i] = aSeq[i];
}
return CorbaSeq._retn();
void SALOMEDS_AttributeTableOfReal_i::SwapCells(CORBA::Long theRow1, CORBA::Long theColumn1,
CORBA::Long theRow2, CORBA::Long theColumn2)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATR_IncorrectIndex);
}
void SALOMEDS_AttributeTableOfReal_i::SwapRows(CORBA::Long theRow1, CORBA::Long theRow2)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATR_IncorrectIndex);
}
void SALOMEDS_AttributeTableOfReal_i::SwapColumns(CORBA::Long theColumn1, CORBA::Long theColumn2)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATR_IncorrectIndex);
virtual void SetTitle(const char* theTitle);
virtual char* GetTitle();
- virtual void SetRowTitle(CORBA::Long theIndex, const char* theTitle)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
- virtual char* GetRowTitle(CORBA::Long theIndex)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
- virtual void SetRowTitles(const SALOMEDS::StringSeq& theTitles)
- throw (SALOMEDS::AttributeTable::IncorrectArgumentLength);
+ virtual void SetRowTitle(CORBA::Long theIndex, const char* theTitle);
+ virtual char* GetRowTitle(CORBA::Long theIndex);
+ virtual void SetRowTitles(const SALOMEDS::StringSeq& theTitles);
virtual SALOMEDS::StringSeq* GetRowTitles();
- virtual void SetColumnTitle(CORBA::Long theIndex, const char* theTitle)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
- virtual char* GetColumnTitle(CORBA::Long theIndex)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
- virtual void SetColumnTitles(const SALOMEDS::StringSeq& theTitles)
- throw (SALOMEDS::AttributeTable::IncorrectArgumentLength);
+ virtual void SetColumnTitle(CORBA::Long theIndex, const char* theTitle);
+ virtual char* GetColumnTitle(CORBA::Long theIndex);
+ virtual void SetColumnTitles(const SALOMEDS::StringSeq& theTitles);
virtual SALOMEDS::StringSeq* GetColumnTitles();
- virtual void SetRowUnit(CORBA::Long theIndex, const char* theUnit)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
- virtual char* GetRowUnit(CORBA::Long theIndex)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
- virtual void SetRowUnits(const SALOMEDS::StringSeq& theUnits)
- throw (SALOMEDS::AttributeTable::IncorrectArgumentLength);
+ virtual void SetRowUnit(CORBA::Long theIndex, const char* theUnit);
+ virtual char* GetRowUnit(CORBA::Long theIndex);
+ virtual void SetRowUnits(const SALOMEDS::StringSeq& theUnits);
virtual SALOMEDS::StringSeq* GetRowUnits();
virtual CORBA::Long GetNbRows();
virtual CORBA::Long GetNbColumns();
- virtual void AddRow(const SALOMEDS::DoubleSeq& theData)
- throw (SALOMEDS::AttributeTable::IncorrectArgumentLength);
- virtual void SetRow(CORBA::Long theRow, const SALOMEDS::DoubleSeq& theData)
- throw (SALOMEDS::AttributeTable::IncorrectArgumentLength, SALOMEDS::AttributeTable::IncorrectIndex);
- virtual SALOMEDS::DoubleSeq* GetRow(CORBA::Long theRow)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
- virtual void AddColumn(const SALOMEDS::DoubleSeq& theData)
- throw (SALOMEDS::AttributeTable::IncorrectArgumentLength);
- virtual void SetColumn(CORBA::Long theColumn, const SALOMEDS::DoubleSeq& theData)
- throw (SALOMEDS::AttributeTable::IncorrectArgumentLength, SALOMEDS::AttributeTable::IncorrectIndex);
- virtual SALOMEDS::DoubleSeq* GetColumn(CORBA::Long theColumn)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
- virtual void PutValue(CORBA::Double theValue, CORBA::Long theRow, CORBA::Long theColumn)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
+ virtual void AddRow(const SALOMEDS::DoubleSeq& theData);
+ virtual void SetRow(CORBA::Long theRow, const SALOMEDS::DoubleSeq& theData);
+ virtual SALOMEDS::DoubleSeq* GetRow(CORBA::Long theRow);
+ virtual void AddColumn(const SALOMEDS::DoubleSeq& theData);
+ virtual void SetColumn(CORBA::Long theColumn, const SALOMEDS::DoubleSeq& theData);
+ virtual SALOMEDS::DoubleSeq* GetColumn(CORBA::Long theColumn);
+ virtual void PutValue(CORBA::Double theValue, CORBA::Long theRow, CORBA::Long theColumn);
virtual CORBA::Boolean HasValue(CORBA::Long theRow, CORBA::Long theColumn);
- virtual CORBA::Double GetValue(CORBA::Long theRow, CORBA::Long theColumn)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
- virtual void RemoveValue(CORBA::Long theRow, CORBA::Long theColumn)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
+ virtual CORBA::Double GetValue(CORBA::Long theRow, CORBA::Long theColumn);
+ virtual void RemoveValue(CORBA::Long theRow, CORBA::Long theColumn);
virtual SALOMEDS::LongSeq* GetRowSetIndices(CORBA::Long theRow);
virtual void SetNbColumns(CORBA::Long theNbColumns);
virtual SALOMEDS::LongSeq* SortRow(CORBA::Long theRow, SALOMEDS::AttributeTable::SortOrder sortOrder,
- SALOMEDS::AttributeTable::SortPolicy sortPolicy)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
+ SALOMEDS::AttributeTable::SortPolicy sortPolicy);
virtual SALOMEDS::LongSeq* SortColumn(CORBA::Long theColumn, SALOMEDS::AttributeTable::SortOrder sortOrder,
- SALOMEDS::AttributeTable::SortPolicy sortPolicy)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
+ SALOMEDS::AttributeTable::SortPolicy sortPolicy);
virtual SALOMEDS::LongSeq* SortByRow(CORBA::Long theRow, SALOMEDS::AttributeTable::SortOrder sortOrder,
- SALOMEDS::AttributeTable::SortPolicy sortPolicy)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
+ SALOMEDS::AttributeTable::SortPolicy sortPolicy);
virtual SALOMEDS::LongSeq* SortByColumn(CORBA::Long theColumn, SALOMEDS::AttributeTable::SortOrder sortOrder,
- SALOMEDS::AttributeTable::SortPolicy sortPolicy)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
+ SALOMEDS::AttributeTable::SortPolicy sortPolicy);
virtual void SwapCells(CORBA::Long theRow1, CORBA::Long theColumn1,
- CORBA::Long theRow2, CORBA::Long theColumn2)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
- virtual void SwapRows(CORBA::Long theRow1, CORBA::Long theRow2)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
- virtual void SwapColumns(CORBA::Long theColumn1, CORBA::Long theColumn2)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
+ CORBA::Long theRow2, CORBA::Long theColumn2);
+ virtual void SwapRows(CORBA::Long theRow1, CORBA::Long theRow2);
+ virtual void SwapColumns(CORBA::Long theColumn1, CORBA::Long theColumn2);
virtual bool ReadFromFile(const SALOMEDS::TMPFile& theStream);
virtual SALOMEDS::TMPFile* SaveToFile();
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;
#include "Utils_ExceptHandlers.hxx"
-UNEXPECT_CATCH(ATS_IncorrectIndex, SALOMEDS::AttributeTable::IncorrectIndex);
-UNEXPECT_CATCH(ATS_IncorrectArgumentLength, SALOMEDS::AttributeTable::IncorrectArgumentLength);
+UNEXPECT_CATCH(ATS_IncorrectIndex, SALOMEDS::AttributeTable::IncorrectIndex)
+UNEXPECT_CATCH(ATS_IncorrectArgumentLength, SALOMEDS::AttributeTable::IncorrectArgumentLength)
void SALOMEDS_AttributeTableOfString_i::SetTitle(const char* theTitle)
{
}
void SALOMEDS_AttributeTableOfString_i::SetRowTitle(CORBA::Long theIndex, const char* theTitle)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATS_IncorrectIndex);
}
char* SALOMEDS_AttributeTableOfString_i::GetRowTitle(CORBA::Long theIndex)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch (ATS_IncorrectIndex);
}
void SALOMEDS_AttributeTableOfString_i::SetRowTitles(const SALOMEDS::StringSeq& theTitles)
- throw (SALOMEDS::AttributeTable::IncorrectArgumentLength)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATS_IncorrectArgumentLength);
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++) {
+ if ((int)theTitles.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength();
+ 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();
}
void SALOMEDS_AttributeTableOfString_i::SetColumnTitle(CORBA::Long theIndex, const char* theTitle)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATS_IncorrectIndex);
}
char* SALOMEDS_AttributeTableOfString_i::GetColumnTitle(CORBA::Long theIndex)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch (ATS_IncorrectIndex);
}
void SALOMEDS_AttributeTableOfString_i::SetColumnTitles(const SALOMEDS::StringSeq& theTitles)
- throw (SALOMEDS::AttributeTable::IncorrectArgumentLength)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATS_IncorrectArgumentLength);
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++) {
+ if ((int)theTitles.length() != aTable->GetNbColumns()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength();
+ 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();
}
//Units support
void SALOMEDS_AttributeTableOfString_i::SetRowUnit(CORBA::Long theIndex, const char* theUnit)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATS_IncorrectIndex);
}
char* SALOMEDS_AttributeTableOfString_i::GetRowUnit(CORBA::Long theIndex)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch (ATS_IncorrectIndex);
}
void SALOMEDS_AttributeTableOfString_i::SetRowUnits(const SALOMEDS::StringSeq& theUnits)
- throw (SALOMEDS::AttributeTable::IncorrectArgumentLength)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATS_IncorrectArgumentLength);
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++) {
+ if ((int)theUnits.length() != aTable->GetNbRows()) throw SALOMEDS::AttributeTable::IncorrectArgumentLength();
+ 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();
}
}
void SALOMEDS_AttributeTableOfString_i::AddRow(const SALOMEDS::StringSeq& theData)
- throw (SALOMEDS::AttributeTable::IncorrectArgumentLength)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATS_IncorrectArgumentLength);
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);
}
void SALOMEDS_AttributeTableOfString_i::SetRow(CORBA::Long theRow, const SALOMEDS::StringSeq& theData)
- throw (SALOMEDS::AttributeTable::IncorrectArgumentLength, SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATS_IncorrectArgumentLength);
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* SALOMEDS_AttributeTableOfString_i::GetRow(CORBA::Long theRow)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATS_IncorrectIndex);
SALOMEDS::StringSeq_var CorbaSeq = new SALOMEDS::StringSeq;
std::vector<std::string> aRow = aTable->GetRowData(theRow);
- CorbaSeq->length(aRow.size());
- for (int i = 0; i < aRow.size(); i++) {
+ CorbaSeq->length((CORBA::ULong)aRow.size()); //!< TODO: conversion from size_t to CORBA::ULong
+ for (int i = 0; i < (int)aRow.size(); i++) { //TODO: mismatch signed/unsigned
CorbaSeq[i] = CORBA::string_dup(aRow[i].c_str());
}
return CorbaSeq._retn();
}
void SALOMEDS_AttributeTableOfString_i::AddColumn(const SALOMEDS::StringSeq& theData)
- throw (SALOMEDS::AttributeTable::IncorrectArgumentLength)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATS_IncorrectArgumentLength);
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);
}
void SALOMEDS_AttributeTableOfString_i::SetColumn(CORBA::Long theColumn, const SALOMEDS::StringSeq& theData)
- throw (SALOMEDS::AttributeTable::IncorrectArgumentLength, SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATS_IncorrectArgumentLength);
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* SALOMEDS_AttributeTableOfString_i::GetColumn(CORBA::Long theColumn)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATS_IncorrectIndex);
SALOMEDS::StringSeq_var CorbaSeq = new SALOMEDS::StringSeq;
std::vector<std::string> aColumn = aTable->GetColumnData(theColumn);
- CorbaSeq->length(aColumn.size());
- for (int i = 0; i < aColumn.size(); i++) {
+ CorbaSeq->length((CORBA::ULong)aColumn.size()); //!< TODO: conversion from size_t to CORBA::ULong
+ for (int i = 0; i < (int)aColumn.size(); i++) { //TODO: mismatch signed/unsigned
CorbaSeq[i] = CORBA::string_dup(aColumn[i].c_str());
}
return CorbaSeq._retn();
}
void SALOMEDS_AttributeTableOfString_i::PutValue(const char* theValue, CORBA::Long theRow, CORBA::Long theColumn)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATS_IncorrectIndex);
}
char* SALOMEDS_AttributeTableOfString_i::GetValue(CORBA::Long theRow, CORBA::Long theColumn)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATS_IncorrectIndex);
}
void SALOMEDS_AttributeTableOfString_i::RemoveValue(CORBA::Long theRow, CORBA::Long theColumn)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATS_IncorrectIndex);
SALOMEDS::LongSeq_var CorbaSeq = new SALOMEDS::LongSeq;
std::vector<int> aSeq = aTable->GetSetRowIndices(theRow);
- CorbaSeq->length(aSeq.size());
- for (int i = 0; i < aSeq.size(); i++) {
+ CorbaSeq->length((CORBA::ULong)aSeq.size()); //!< TODO: conversion from size_t to CORBA::ULong
+ for (int i = 0; i < (int)aSeq.size(); i++) { //TODO: mismatch signed/unsigned
CorbaSeq[i] = aSeq[i];
}
return CorbaSeq._retn();
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;
SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfString_i::SortRow(CORBA::Long theRow,
SALOMEDS::AttributeTable::SortOrder sortOrder,
SALOMEDS::AttributeTable::SortPolicy sortPolicy)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATS_IncorrectIndex);
catch(...) {
throw SALOMEDS::AttributeTable::IncorrectIndex();
}
- CorbaSeq->length(aSeq.size());
- for (int i = 0; i < aSeq.size(); i++) {
+ CorbaSeq->length((CORBA::ULong)aSeq.size()); //!< TODO: conversion from size_t to CORBA::ULong
+ for (int i = 0; i < (int)aSeq.size(); i++) { //TODO: mismatch signed/unsigned
CorbaSeq[i] = aSeq[i];
}
return CorbaSeq._retn();
SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfString_i::SortColumn(CORBA::Long theColumn,
SALOMEDS::AttributeTable::SortOrder sortOrder,
SALOMEDS::AttributeTable::SortPolicy sortPolicy)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATS_IncorrectIndex);
catch(...) {
throw SALOMEDS::AttributeTable::IncorrectIndex();
}
- CorbaSeq->length(aSeq.size());
- for (int i = 0; i < aSeq.size(); i++) {
+ CorbaSeq->length((CORBA::ULong)aSeq.size()); //!< TODO: conversion from size_t to CORBA::ULong
+ for (int i = 0; i < (int)aSeq.size(); i++) { //TODO: mismatch signed/unsigned
CorbaSeq[i] = aSeq[i];
}
return CorbaSeq._retn();
SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfString_i::SortByRow(CORBA::Long theRow,
SALOMEDS::AttributeTable::SortOrder sortOrder,
SALOMEDS::AttributeTable::SortPolicy sortPolicy)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATS_IncorrectIndex);
catch(...) {
throw SALOMEDS::AttributeTable::IncorrectIndex();
}
- CorbaSeq->length(aSeq.size());
- for (int i = 0; i < aSeq.size(); i++) {
+ CorbaSeq->length((CORBA::ULong)aSeq.size()); //!< TODO: conversion from size_t to CORBA::ULong
+ for (int i = 0; i < (int)aSeq.size(); i++) { //TODO: mismatch signed/unsigned
CorbaSeq[i] = aSeq[i];
}
return CorbaSeq._retn();
SALOMEDS::LongSeq* SALOMEDS_AttributeTableOfString_i::SortByColumn(CORBA::Long theColumn,
SALOMEDS::AttributeTable::SortOrder sortOrder,
SALOMEDS::AttributeTable::SortPolicy sortPolicy)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATS_IncorrectIndex);
catch(...) {
throw SALOMEDS::AttributeTable::IncorrectIndex();
}
- CorbaSeq->length(aSeq.size());
- for (int i = 0; i < aSeq.size(); i++) {
+ CorbaSeq->length((CORBA::ULong)aSeq.size()); //!< TODO: conversion from size_t to CORBA::ULong
+ for (int i = 0; i < (int)aSeq.size(); i++) { //TODO: mismatch signed/unsigned
CorbaSeq[i] = aSeq[i];
}
return CorbaSeq._retn();
void SALOMEDS_AttributeTableOfString_i::SwapCells(CORBA::Long theRow1, CORBA::Long theColumn1,
CORBA::Long theRow2, CORBA::Long theColumn2)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATS_IncorrectIndex);
}
void SALOMEDS_AttributeTableOfString_i::SwapRows(CORBA::Long theRow1, CORBA::Long theRow2)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATS_IncorrectIndex);
}
void SALOMEDS_AttributeTableOfString_i::SwapColumns(CORBA::Long theColumn1, CORBA::Long theColumn2)
- throw (SALOMEDS::AttributeTable::IncorrectIndex)
{
SALOMEDS::Locker lock;
Unexpect aCatch(ATS_IncorrectIndex);
virtual void SetTitle(const char* theTitle);
virtual char* GetTitle();
- virtual void SetRowTitle(CORBA::Long theIndex, const char* theTitle)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
- virtual char* GetRowTitle(CORBA::Long theIndex)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
- virtual void SetRowTitles(const SALOMEDS::StringSeq& theTitles)
- throw (SALOMEDS::AttributeTable::IncorrectArgumentLength);
+ virtual void SetRowTitle(CORBA::Long theIndex, const char* theTitle);
+ virtual char* GetRowTitle(CORBA::Long theIndex);
+ virtual void SetRowTitles(const SALOMEDS::StringSeq& theTitles);
virtual SALOMEDS::StringSeq* GetRowTitles();
- virtual void SetColumnTitle(CORBA::Long theIndex, const char* theTitle)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
- virtual char* GetColumnTitle(CORBA::Long theIndex)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
- virtual void SetColumnTitles(const SALOMEDS::StringSeq& theTitles)
- throw (SALOMEDS::AttributeTable::IncorrectArgumentLength);
+ virtual void SetColumnTitle(CORBA::Long theIndex, const char* theTitle);
+ virtual char* GetColumnTitle(CORBA::Long theIndex);
+ virtual void SetColumnTitles(const SALOMEDS::StringSeq& theTitles);
virtual SALOMEDS::StringSeq* GetColumnTitles();
- virtual void SetRowUnit(CORBA::Long theIndex, const char* theUnit)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
- virtual char* GetRowUnit(CORBA::Long theIndex)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
- virtual void SetRowUnits(const SALOMEDS::StringSeq& theUnits)
- throw (SALOMEDS::AttributeTable::IncorrectArgumentLength);
+ virtual void SetRowUnit(CORBA::Long theIndex, const char* theUnit);
+ virtual char* GetRowUnit(CORBA::Long theIndex);
+ virtual void SetRowUnits(const SALOMEDS::StringSeq& theUnits);
virtual SALOMEDS::StringSeq* GetRowUnits();
virtual CORBA::Long GetNbRows();
virtual CORBA::Long GetNbColumns();
- virtual void AddRow(const SALOMEDS::StringSeq& theData)
- throw (SALOMEDS::AttributeTable::IncorrectArgumentLength);
- virtual void SetRow(CORBA::Long theRow, const SALOMEDS::StringSeq& theData)
- throw (SALOMEDS::AttributeTable::IncorrectArgumentLength, SALOMEDS::AttributeTable::IncorrectIndex);
- virtual SALOMEDS::StringSeq* GetRow(CORBA::Long theRow)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
- virtual void AddColumn(const SALOMEDS::StringSeq& theData)
- throw (SALOMEDS::AttributeTable::IncorrectArgumentLength);
- virtual void SetColumn(CORBA::Long theColumn, const SALOMEDS::StringSeq& theData)
- throw (SALOMEDS::AttributeTable::IncorrectArgumentLength, SALOMEDS::AttributeTable::IncorrectIndex);
- virtual SALOMEDS::StringSeq* GetColumn(CORBA::Long theColumn)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
- virtual void PutValue(const char* theValue, CORBA::Long theRow, CORBA::Long theColumn)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
+ virtual void AddRow(const SALOMEDS::StringSeq& theData);
+ virtual void SetRow(CORBA::Long theRow, const SALOMEDS::StringSeq& theData);
+ virtual SALOMEDS::StringSeq* GetRow(CORBA::Long theRow);
+ virtual void AddColumn(const SALOMEDS::StringSeq& theData);
+ virtual void SetColumn(CORBA::Long theColumn, const SALOMEDS::StringSeq& theData);
+ virtual SALOMEDS::StringSeq* GetColumn(CORBA::Long theColumn);
+ virtual void PutValue(const char* theValue, CORBA::Long theRow, CORBA::Long theColumn);
virtual CORBA::Boolean HasValue(CORBA::Long theRow, CORBA::Long theColumn);
- virtual char* GetValue(CORBA::Long theRow, CORBA::Long theColumn)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
- virtual void RemoveValue(CORBA::Long theRow, CORBA::Long theColumn)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
+ virtual char* GetValue(CORBA::Long theRow, CORBA::Long theColumn);
+ virtual void RemoveValue(CORBA::Long theRow, CORBA::Long theColumn);
virtual SALOMEDS::LongSeq* GetRowSetIndices(CORBA::Long theRow);
virtual void SetNbColumns(CORBA::Long theNbColumns);
virtual SALOMEDS::LongSeq* SortRow(CORBA::Long theRow, SALOMEDS::AttributeTable::SortOrder sortOrder,
- SALOMEDS::AttributeTable::SortPolicy sortPolicy)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
+ SALOMEDS::AttributeTable::SortPolicy sortPolicy);
virtual SALOMEDS::LongSeq* SortColumn(CORBA::Long theColumn, SALOMEDS::AttributeTable::SortOrder sortOrder,
- SALOMEDS::AttributeTable::SortPolicy sortPolicy)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
+ SALOMEDS::AttributeTable::SortPolicy sortPolicy);
virtual SALOMEDS::LongSeq* SortByRow(CORBA::Long theRow, SALOMEDS::AttributeTable::SortOrder sortOrder,
- SALOMEDS::AttributeTable::SortPolicy sortPolicy)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
+ SALOMEDS::AttributeTable::SortPolicy sortPolicy);
virtual SALOMEDS::LongSeq* SortByColumn(CORBA::Long theColumn, SALOMEDS::AttributeTable::SortOrder sortOrder,
- SALOMEDS::AttributeTable::SortPolicy sortPolicy)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
+ SALOMEDS::AttributeTable::SortPolicy sortPolicy);
virtual void SwapCells(CORBA::Long theRow1, CORBA::Long theColumn1,
- CORBA::Long theRow2, CORBA::Long theColumn2)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
- virtual void SwapRows(CORBA::Long theRow1, CORBA::Long theRow2)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
- virtual void SwapColumns(CORBA::Long theColumn1, CORBA::Long theColumn2)
- throw (SALOMEDS::AttributeTable::IncorrectIndex);
+ CORBA::Long theRow2, CORBA::Long theColumn2);
+ virtual void SwapRows(CORBA::Long theRow1, CORBA::Long theRow2);
+ virtual void SwapColumns(CORBA::Long theColumn1, CORBA::Long theColumn2);
virtual bool ReadFromFile(const SALOMEDS::TMPFile& theStream);
virtual SALOMEDS::TMPFile* SaveToFile();
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++) {
*/
//============================================================================
SALOMEDS_BasicAttribute_i* BasicAttributeFactory::Create(const char* type)
- throw (SALOME_Exception)
+
{
try {
if (!strcmp(type,"AttReal"))
BasicAttributeFactory() {};
virtual ~BasicAttributeFactory() {};
- SALOMEDS_BasicAttribute_i* Create(const char* type)
- throw (SALOME_Exception);
+ SALOMEDS_BasicAttribute_i* Create(const char* type);
};
#endif
MESSAGE("Explore Study and Write name of each object if it exists");
char* name;
+ SALOME_UNUSED(name); // unused in release mode
SALOMEDS::SComponentIterator_var itcomp = KERNEL::getStudyServant()->NewComponentIterator();
int offset = 1;
for (; itcomp->More(); itcomp->Next()) {
{
try {
char* name;
+ SALOME_UNUSED(name); // unused in release mode
SALOMEDS::Study_var myStudy = KERNEL::getStudyServant();
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();
SALOMEDS_DriverFactory_i(CORBA::ORB_ptr theORB);
- ~SALOMEDS_DriverFactory_i();
+ virtual ~SALOMEDS_DriverFactory_i();
virtual SALOMEDSImpl_Driver* GetDriverByType(const std::string& theComponentType);
#include <unistd.h>
#endif
-UNEXPECT_CATCH(GALockProtection, SALOMEDS::GenericAttribute::LockProtection);
+UNEXPECT_CATCH(GALockProtection, SALOMEDS::GenericAttribute::LockProtection)
SALOMEDS_GenericAttribute_i::SALOMEDS_GenericAttribute_i(DF_Attribute* theImpl, CORBA::ORB_ptr theOrb) :
GenericObj_i(SALOMEDS_Study_i::GetThePOA())
return PortableServer::POA::_duplicate(myPOA);
}
-void SALOMEDS_GenericAttribute_i::CheckLocked() throw (SALOMEDS::GenericAttribute::LockProtection)
+void SALOMEDS_GenericAttribute_i::CheckLocked()
{
SALOMEDS::Locker lock;
Unexpect aCatch(GALockProtection);
char* aTypeOfAttribute = (char*)aClassType.c_str();
SALOMEDS::GenericAttribute_var anAttribute;
SALOMEDS_GenericAttribute_i* attr_servant = NULL;
+ SALOME_UNUSED(attr_servant);
__CreateGenericCORBAAttribute
return anAttribute._retn();
virtual PortableServer::POA_ptr _default_POA();
- void CheckLocked() throw (SALOMEDS::GenericAttribute::LockProtection);
+ void CheckLocked();
virtual char* Type();
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(listName, PT_STRARRAY)) return "";
std::vector<std::string> v = _ap->GetStrArray(listName);
- if(index >= v.size()) return "";
+ if(index >= (int)v.size()) return ""; //TODO: mismatch signed/unsigned
return v[index];
}
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("_");
- if(pos < 0 || pos >= entry.length()) return entry;
+ int pos = (int)entry.rfind("_"); //!< TODO: conversion from size_t to int
+ if(pos < 0 || pos >= (int)entry.length()) return entry; //TODO: mismatch signed/unsigned
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
}
//============================================================================
// Obtain a reference to the root POA.
long TIMESleep = 500000000;
int NumberOfTries = 40;
- int a;
timespec ts_req;
ts_req.tv_nsec=TIMESleep;
ts_req.tv_sec=0;
{
if (i!=1)
#ifndef WIN32
- a=nanosleep(&ts_req,&ts_rem);
+ nanosleep(&ts_req,&ts_rem);
#else
- Sleep(TIMESleep/1000000);
+ Sleep(TIMESleep/1000000);
#endif
try
{
{
if (j!=1)
#ifndef WIN32
- a=nanosleep(&ts_req, &ts_rem);
+ nanosleep(&ts_req, &ts_rem);
#else
Sleep(TIMESleep/1000000);
#endif
{
object = inc->resolve(name);
}
- catch(CosNaming::NamingContext::NotFound)
+ catch(CosNaming::NamingContext::NotFound&)
{
MESSAGE( "SalomeDS Server: Logger Server wasn't found" ); }
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])));
}
#include <DF_Document.hxx>
#include <stdlib.h>
-UNEXPECT_CATCH(SBSalomeException, SALOME::SALOME_Exception);
-UNEXPECT_CATCH(SBLockProtection, SALOMEDS::StudyBuilder::LockProtection);
+UNEXPECT_CATCH(SBSalomeException, SALOME::SALOME_Exception)
+UNEXPECT_CATCH(SBLockProtection, SALOMEDS::StudyBuilder::LockProtection)
//============================================================================
/*! Function : constructor
*/
//============================================================================
void SALOMEDS_StudyBuilder_i::LoadWith(SALOMEDS::SComponent_ptr anSCO,
- SALOMEDS::Driver_ptr aDriver) throw(SALOME::SALOME_Exception)
+ SALOMEDS::Driver_ptr aDriver)
{
SALOMEDS::Locker lock;
Unexpect aCatch(SBSalomeException);
* Purpose :
*/
//============================================================================
-void SALOMEDS_StudyBuilder_i::Load(SALOMEDS::SObject_ptr sco)
+void SALOMEDS_StudyBuilder_i::Load(SALOMEDS::SObject_ptr /*sco*/)
{
MESSAGE ( "This function is not yet implemented");
}
* Purpose :
*/
//============================================================================
-void SALOMEDS_StudyBuilder_i::CommitCommand() throw (SALOMEDS::StudyBuilder::LockProtection)
+void SALOMEDS_StudyBuilder_i::CommitCommand()
{
SALOMEDS::Locker lock;
Unexpect aCatch(SBLockProtection);
* Purpose :
*/
//============================================================================
-void SALOMEDS_StudyBuilder_i::Undo() throw (SALOMEDS::StudyBuilder::LockProtection)
+void SALOMEDS_StudyBuilder_i::Undo()
{
SALOMEDS::Locker lock;
Unexpect aCatch(SBLockProtection);
* Purpose :
*/
//============================================================================
-void SALOMEDS_StudyBuilder_i::Redo() throw (SALOMEDS::StudyBuilder::LockProtection)
+void SALOMEDS_StudyBuilder_i::Redo()
{
SALOMEDS::Locker lock;
Unexpect aCatch(SBLockProtection);
* Purpose :
*/
//============================================================================
-void SALOMEDS_StudyBuilder_i::CheckLocked() throw (SALOMEDS::StudyBuilder::LockProtection)
+void SALOMEDS_StudyBuilder_i::CheckLocked()
{
SALOMEDS::Locker lock;
Unexpect aCatch(SBLockProtection);
*/
//============================================================================
void SALOMEDS_StudyBuilder_i::SetName(SALOMEDS::SObject_ptr theSO, const char* theValue)
- throw(SALOMEDS::StudyBuilder::LockProtection)
{
SALOMEDS::Locker lock;
Unexpect aCatch(SBLockProtection);
*/
//============================================================================
void SALOMEDS_StudyBuilder_i::SetComment(SALOMEDS::SObject_ptr theSO, const char* theValue)
- throw(SALOMEDS::StudyBuilder::LockProtection)
{
SALOMEDS::Locker lock;
Unexpect aCatch(SBLockProtection);
*/
//============================================================================
void SALOMEDS_StudyBuilder_i::SetIOR(SALOMEDS::SObject_ptr theSO, const char* theValue)
- throw(SALOMEDS::StudyBuilder::LockProtection)
{
SALOMEDS::Locker lock;
Unexpect aCatch(SBLockProtection);
*/
virtual SALOMEDS::SObject_ptr NewObjectToTag(SALOMEDS::SObject_ptr theFatherObject, CORBA::Long atag);
- virtual void LoadWith(SALOMEDS::SComponent_ptr sco, SALOMEDS::Driver_ptr Engine)
- throw(SALOME::SALOME_Exception);
+ virtual void LoadWith(SALOMEDS::SComponent_ptr sco, SALOMEDS::Driver_ptr Engine);
virtual void Load(SALOMEDS::SObject_ptr sco);
virtual void RemoveObject(SALOMEDS::SObject_ptr anObject);
virtual bool IsGUID(SALOMEDS::SObject_ptr anObject, const char* theGUID);
virtual void NewCommand();
- virtual void CommitCommand() throw(SALOMEDS::StudyBuilder::LockProtection);
+ virtual void CommitCommand();
virtual CORBA::Boolean HasOpenCommand();
virtual void AbortCommand();
- virtual void Undo() throw(SALOMEDS::StudyBuilder::LockProtection);
- virtual void Redo() throw(SALOMEDS::StudyBuilder::LockProtection);
+ virtual void Undo();
+ virtual void Redo();
CORBA::Boolean GetAvailableUndos();
CORBA::Boolean GetAvailableRedos();
CORBA::Boolean IsSaved();
virtual CORBA::Long UndoLimit();
virtual void UndoLimit(CORBA::Long);
- void CheckLocked() throw (SALOMEDS::StudyBuilder::LockProtection);
+ void CheckLocked();
- virtual void SetName(SALOMEDS::SObject_ptr theSO, const char* theValue) throw(SALOMEDS::StudyBuilder::LockProtection);
- virtual void SetComment(SALOMEDS::SObject_ptr theSO, const char* theValue) throw(SALOMEDS::StudyBuilder::LockProtection);
- virtual void SetIOR(SALOMEDS::SObject_ptr theSO, const char* theValue) throw(SALOMEDS::StudyBuilder::LockProtection);
+ virtual void SetName(SALOMEDS::SObject_ptr theSO, const char* theValue);
+ virtual void SetComment(SALOMEDS::SObject_ptr theSO, const char* theValue);
+ virtual void SetIOR(SALOMEDS::SObject_ptr theSO, const char* theValue);
SALOMEDSImpl_StudyBuilder* GetImpl() { return _impl; }
#include <unistd.h>
#endif
-UNEXPECT_CATCH(SalomeException,SALOME::SALOME_Exception);
-UNEXPECT_CATCH(LockProtection, SALOMEDS::StudyBuilder::LockProtection);
+UNEXPECT_CATCH(SalomeException,SALOME::SALOME_Exception)
+UNEXPECT_CATCH(LockProtection, SALOMEDS::StudyBuilder::LockProtection)
static SALOMEDS_Driver_i* GetDriver(const SALOMEDSImpl_SObject& theObject, CORBA::ORB_ptr orb);
gobj->Register();
}
}
- catch(const CORBA::Exception& e)
+ catch(const CORBA::Exception& /*e*/) //!< TODO: unused variable
{
}
}
gobj->UnRegister();
}
}
- catch(const CORBA::Exception& e)
+ catch(const CORBA::Exception& /*e*/) //!< TODO: unused variable
{
}
}
*/
//============================================================================
bool SALOMEDS_Study_i::Open(const wchar_t* aWUrl)
- throw(SALOME::SALOME_Exception)
+
{
if (!_closed)
Clear();
*/
//============================================================================
SALOMEDS::SObject_ptr SALOMEDS_Study_i::Paste(SALOMEDS::SObject_ptr theObject)
- throw(SALOMEDS::StudyBuilder::LockProtection)
+
{
SALOMEDS::Locker lock;
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());
* Purpose :
*/
//============================================================================
-void SALOMEDS_Study_i::AddPostponed(const char* theIOR)
+void SALOMEDS_Study_i::AddPostponed(const char* /*theIOR*/)
{
SALOMEDS::Locker lock;
//Not implemented
}
-void SALOMEDS_Study_i::AddCreatedPostponed(const char* theIOR)
+void SALOMEDS_Study_i::AddCreatedPostponed(const char* /*theIOR*/)
{
SALOMEDS::Locker lock;
//Not implemented
* Purpose :
*/
//============================================================================
-void SALOMEDS_Study_i::UndoPostponed(CORBA::Long theWay)
+void SALOMEDS_Study_i::UndoPostponed(CORBA::Long /*theWay*/)
{
SALOMEDS::Locker lock;
//Not implemented
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++)
\param char* arguments, the study URL
\return bool arguments
*/
- virtual bool Open(const wchar_t* aStudyUrl) throw (SALOME::SALOME_Exception);
+ virtual bool Open(const wchar_t* aStudyUrl);
//! method to check that a Study can be opened
/*!
/*!
\param theObject object to paste
*/
- virtual SALOMEDS::SObject_ptr Paste(SALOMEDS::SObject_ptr theObject) throw(SALOMEDS::StudyBuilder::LockProtection);
+ virtual SALOMEDS::SObject_ptr Paste(SALOMEDS::SObject_ptr theObject);
virtual CORBA::Boolean CanPaste(SALOMEDS::SObject_ptr theObject);
//! method to Get persistent reference of study (idem URL())
\return ListOfSObject_ptr arguments, a list of objects found
*/
- virtual SALOMEDS::Study::ListOfSObject* FindObjectByName( const char* anObjectName, const char* aComponentName ) ;
+ virtual SALOMEDS::Study::ListOfSObject* FindObjectByName( const char* anObjectName, const char* aComponentName );
//! method to Find an Object with ID = anObjectID
/*!
virtual void AddCreatedPostponed(const char* theIOR);
virtual void RemovePostponed(CORBA::Long theUndoLimit); // removes postponed IORs of old transaction
- // if theUndoLimit==0, removes all
+ // if theUndoLimit==0, removes all
virtual void UndoPostponed(CORBA::Long theWay); // theWay = 1: resurrect objects,
- // theWay = -1: get back to the list of postponed
+ // theWay = -1: get back to the list of postponed
virtual SALOMEDS::AttributeParameter_ptr GetCommonParameters(const char* theID, CORBA::Long theSavePoint);
virtual SALOMEDS::AttributeParameter_ptr GetModuleParameters(const char* theID,
if(!&myStream.in())
throw std::out_of_range("SALOMEDS_TMPFile_i::Get(size_t) const - !&myStream.in()");
- if(theIndex < 0 || theIndex >= myStream->length())
+ if(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(!&myStream.in())
throw std::out_of_range("Engines_TMPFile_i::Get(size_t) const - !&myStream.in()");
- if(theIndex < 0 || theIndex >= myStream->length())
+ if(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
}
CPPUNIT_ASSERT(v.size() == 3);
- for(int i = 0; i<v.size(); i++)
+ for(int i = 0; i<(int)v.size(); i++)
CPPUNIT_ASSERT((i+1) == v[i]);
v.push_back(5);
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];
buffer[length*3] = (char)0;
- for(int i = 0, pos = 0; i<length; i++, pos+=3) {
+ for(int i = 0, pos = 0; i<(int)length; i++, pos+=3) { //TODO: mismatch signed/unsigned
int val = (int)S[i];
buffer[pos] = '%';
sprintf(c, "%.2x", val);
//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];
buffer[length/3] = (char)0;
- for(int i = 0, pos = 0; i<length; i+=3, pos++) {
+ for(int i = 0, pos = 0; i<(int)length; i+=3, pos++) { //TODO: mismatch signed/unsigned
c[0] = S[i+1];
c[1] = S[i+2];
c[2] = (char)0;
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
CheckLocked();
Backup();
- if(Index <= 0 || Index > myValue.size()) throw DFexception("Out of range");
+ if(Index <= 0 || Index > (int)myValue.size()) throw DFexception("Out of range"); // TODO: mismatch signed/unsigned
myValue[Index-1] = Value;
CheckLocked();
Backup();
- if(Index <= 0 || Index > myValue.size()) throw DFexception("Out of range");
+ if(Index <= 0 || Index > (int)myValue.size()) throw DFexception("Out of range"); // TODO: mismatch signed/unsigned
typedef std::vector<int>::iterator VI;
int i = 1;
int SALOMEDSImpl_AttributeSequenceOfInteger::Length()
{
- return myValue.size();
+ return (int)myValue.size(); //!< TODO: conversion from size_t to int, possible loss of data
}
int SALOMEDSImpl_AttributeSequenceOfInteger::Value(const int Index)
{
- if(Index <= 0 || Index > myValue.size()) throw DFexception("Out of range");
+ if(Index <= 0 || Index > (int)myValue.size()) throw DFexception("Out of range"); // TODO: mismatch signed/unsigned
return myValue[Index-1];
}
int aLength = Length();
char* aResult = new char[aLength * 25];
aResult[0] = 0;
- int aPosition = 0;
+ size_t aPosition = 0;
for (int i = 1; i <= aLength; i++) {
sprintf(aResult + aPosition , "%d ", Value(i));
aPosition += strlen(aResult + aPosition);
CheckLocked();
Backup();
- if(Index <= 0 || Index > myValue.size()) throw DFexception("Out of range");
+ if(Index <= 0 || Index > (int)myValue.size()) throw DFexception("Out of range"); // TODO: mismatch signed/unsigned
myValue[Index-1] = Value;
CheckLocked();
Backup();
- if(Index <= 0 || Index > myValue.size()) throw DFexception("Out of range");
+ if(Index <= 0 || Index > (int)myValue.size()) throw DFexception("Out of range"); // TODO: mismatch signed/unsigned
typedef std::vector<double>::iterator VI;
int i = 1;
int SALOMEDSImpl_AttributeSequenceOfReal::Length()
{
- return myValue.size();
+ return (int)myValue.size(); //!< TODO: conversion from size_t to int, possible loss of data
}
double SALOMEDSImpl_AttributeSequenceOfReal::Value(const int Index)
{
- if(Index <= 0 || Index > myValue.size()) throw DFexception("Out of range");
+ if(Index <= 0 || Index > (int)myValue.size()) throw DFexception("Out of range"); // TODO: mismatch signed/unsigned
return myValue[Index-1];
}
int aLength = Length();
char* aResult = new char[aLength * 127];
aResult[0] = 0;
- int aPosition = 0;
+ size_t aPosition = 0;
for (int i = 1; i <= aLength; i++) {
sprintf(aResult + aPosition , "%.64e ", Value(i));
aPosition += strlen(aResult + aPosition);
std::vector<std::string> aNames;
std::vector<int> aMinutes, aHours, aDays, aMonths, aYears;
aProp->GetModifications(aNames, aMinutes, aHours, aDays, aMonths, aYears);
- for (int i = 0, len = aNames.size(); i < len; i++) {
+ for (size_t i = 0, len = aNames.size(); i < len; i++) {
myUserName.push_back(aNames[i]);
myMinute.push_back(aMinutes[i]);
myHour.push_back(aHours[i]);
aProp->Init();
int i;
- for(i = 0; i < myUserName.size(); i++) {
+ for(i = 0; i < (int)myUserName.size(); i++) { //TODO: mismatch signed/unsigned
aProp->SetModification(myUserName[i],
myMinute[i], myHour[i],
myDay[i], myMonth[i], myYear[i]);
std::string units = GetUnits();
std::string comment = GetComment();
- int aLength1 = 0;
+ size_t aLength1 = 0;
std::map<std::string, std::string> versions;
versionMap::const_iterator it;
for (aLength1 = 0, it = myComponentVersions.begin(); it != myComponentVersions.end(); ++it ) {
(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;
}
// - yyyy: year = 4 bytes
// - name: user's name = arbitrary value, minimal length is 0 bytes
// - 1 : records delimiter = 1 byte
- for (anIndex = 2; anIndex + 13 < value.size() ;) {
+ for (anIndex = 2; anIndex + 13 < (int)value.size() ;) { //TODO: mismatch signed/unsigned
char str[10];
int aMinute, aHour, aDay, aMonth, aYear;
str[0] = aCopy[anIndex++];
anIndex += aNameSize + 1;
//Check end of the modifications section
- if(anIndex < value.size() && aCopy[anIndex] == 30)
+ if(anIndex < (int)value.size() && aCopy[anIndex] == 30) //TODO: mismatch signed/unsigned
break;
}
//Case when study contains units and comment properties
- if( anIndex < value.size() ) {
+ if( anIndex < (int)value.size() ) { //TODO: mismatch signed/unsigned
anIndex++; //skip the delimiter of the sections: char(30)
int unitsSize;
for(unitsSize = 0; aCopy[anIndex+unitsSize] != 1; unitsSize++);
}
//Case when study contains components versions
- if( anIndex < value.size() ) {
- while ( anIndex < value.size() && aCopy[anIndex] != 0 ) {
+ if( anIndex < (int)value.size() ) { //TODO: mismatch signed/unsigned
+ while ( anIndex < (int)value.size() && aCopy[anIndex] != 0 ) { //TODO: mismatch signed/unsigned
int modSize;
for(modSize = 0; aCopy[anIndex+modSize] != '='; modSize++);
int verSize;
aVersions[verSize] = 0;
std::string mVersions = aVersions;
- int start = 0, idx = mVersions.find( ';', start );
+ size_t start = 0, idx = mVersions.find( ';', start );
while ( idx != std::string::npos ) {
SetComponentVersion( aModule, mVersions.substr( start, idx-start ) );
start = idx + 1;
static std::string getUnit(std::string theString)
{
std::string aString(theString);
- int aPos = aString.find(SEPARATOR);
- if(aPos <= 0 || aPos == aString.size() ) return std::string();
- return aString.substr(aPos+1, aString.size());
+ size_t aPos = aString.find(SEPARATOR);
+ return aPos >= aString.size()-1 ? std::string() : aString.substr(aPos+1);
}
static std::string getTitle(std::string theString)
{
std::string aString(theString);
- int aPos = aString.find(SEPARATOR);
- if(aPos < 1) return aString;
- if(aPos == 0) return std::string();
- return aString.substr(0, aPos);
+ size_t aPos = aString.find(SEPARATOR);
+ return aPos == std::string::npos ? aString : aString.substr(0, aPos);
}
const std::string& SALOMEDSImpl_AttributeTableOfInteger::GetID()
myNbColumns = theNbColumns;
- while (myCols.size() < myNbColumns) { // append empty columns titles
+ while ((int)myCols.size() < myNbColumns) { // append empty columns titles // TODO: mismatch signed/unsigned
myCols.push_back(std::string(""));
}
const std::vector<int>& theData)
{
CheckLocked();
- if(theData.size() > myNbColumns) SetNbColumns(theData.size());
+ if((int)theData.size() > myNbColumns) SetNbColumns((int)theData.size()); //!< TODO: conversion from size_t to const int, possible loss of data
Backup();
- while (myRows.size() < theRow) { // append new row titles
+ while ((int)myRows.size() < theRow) { // append new row titles // TODO: mismatch signed/unsigned
myRows.push_back(std::string(""));
}
- int i, aShift = (theRow-1)*myNbColumns, aLength = theData.size();
+ 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;
void SALOMEDSImpl_AttributeTableOfInteger::SetRowUnits(const std::vector<std::string>& theUnits)
{
- if (theUnits.size() != GetNbRows()) throw DFexception("Invalid number of rows");
- int aLength = theUnits.size(), i;
- for(i = 1; i <= aLength; i++) SetRowUnit(i, theUnits[i-1]);
+ if ((int)theUnits.size() != GetNbRows()) throw DFexception("Invalid number of rows"); // TODO: mismatch signed/unsigned
+ size_t aLength = theUnits.size(), i;
+ 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
}
std::vector<std::string> SALOMEDSImpl_AttributeTableOfInteger::GetRowUnits()
{
std::vector<std::string> aSeq;
- int aLength = myRows.size(), i;
+ size_t aLength = myRows.size(), i;
for(i=0; i<aLength; i++) aSeq.push_back(getUnit(myRows[i]));
return aSeq;
}
void SALOMEDSImpl_AttributeTableOfInteger::SetRowTitles(const std::vector<std::string>& theTitles)
{
- if (theTitles.size() != GetNbRows()) throw DFexception("Invalid number of rows");
- int aLength = theTitles.size(), i;
- for(i = 1; i <= aLength; i++) SetRowTitle(i, theTitles[i-1]);
+ if ((int)theTitles.size() != GetNbRows()) throw DFexception("Invalid number of rows"); //TODO: mismatch signed/unsigned
+ size_t aLength = theTitles.size(), i;
+ 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
}
std::vector<std::string> SALOMEDSImpl_AttributeTableOfInteger::GetRowTitles()
{
std::vector<std::string> aSeq;
- int aLength = myRows.size(), i;
+ size_t aLength = myRows.size(), i;
for(i=0; i<aLength; i++) aSeq.push_back(getTitle(myRows[i]));
return aSeq;
}
Backup();
- int i, aLength = theData.size();
+ 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;
- while (myRows.size() < myNbRows) { // append empty row titles
+ if((int)aLength > myNbRows) {
+ myNbRows = (int)aLength; //!< TODO: conversion from size_t to int
+ while ((int)myRows.size() < myNbRows) { // append empty row titles
myRows.push_back(std::string(""));
}
}
{
CheckLocked();
Backup();
- while(myCols.size() < theColumn) myCols.push_back(std::string(""));
+ while((int)myCols.size() < theColumn) myCols.push_back(std::string(""));
myCols[theColumn-1] = theTitle;
SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved
std::string SALOMEDSImpl_AttributeTableOfInteger::GetColumnTitle(const int theColumn) const
{
if(myCols.empty()) return "";
- if(myCols.size() < theColumn) return "";
+ if((int)myCols.size() < theColumn) return "";
return myCols[theColumn-1];
}
void SALOMEDSImpl_AttributeTableOfInteger::SetColumnTitles(const std::vector<std::string>& theTitles)
{
- if (theTitles.size() != myNbColumns) throw DFexception("Invalid number of columns");
- int aLength = theTitles.size(), i;
+ if ((int)theTitles.size() != myNbColumns) throw DFexception("Invalid number of columns");
+ size_t aLength = theTitles.size(), i;
for(i = 0; i < aLength; i++) myCols[i] = theTitles[i];
SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved
std::vector<std::string> SALOMEDSImpl_AttributeTableOfInteger::GetColumnTitles()
{
std::vector<std::string> aSeq;
- int aLength = myCols.size(), i;
+ size_t aLength = myCols.size(), i;
for(i=0; i<aLength; i++) aSeq.push_back(myCols[i]);
return aSeq;
}
myTable[anIndex] = theValue;
if(theRow > myNbRows) {
- while (myRows.size() < theRow) { // append empty row titles
+ while ((int)myRows.size() < theRow) { // append empty row titles
myRows.push_back(std::string(""));
}
myNbRows = theRow;
int i, j, l;
//Title
- l = myTitle.size();
+ l = (int)myTitle.size();
sprintf(buffer, "%d\n", l);
aString+=buffer;
for(i=0; i<l; i++) {
//Row titles
for(i=0; i<myNbRows; i++) {
- l = myRows[i].size();
+ l = (int)myRows[i].size();
sprintf(buffer, "%d\n", l);
aString+=buffer;
for(j=0; j<l; j++) {
//Columns titles
for(i=0; i<myNbColumns; i++) {
- l = myCols[i].size();
+ l = (int)myCols[i].size();
sprintf(buffer, "%d\n", l);
aString+=buffer;
for(j=0; j<l; j++) {
}
//Store the table values
- l = myTable.size();
+ l = (int)myTable.size();
sprintf(buffer, "%d\n", l);
aString+=buffer;
for(MI p = myTable.begin(); p != myTable.end(); p++) {
}
result = indices;
- for ( int col = 0; col < indices.size(); col++ ) {
+ for ( int col = 0; col < (int)indices.size(); col++ ) {//TODO: mismatch signed/unsigned
int idx = indices[col];
if ( col+1 == idx ) continue;
SwapCells(theRow, col+1, theRow, idx);
int idx1 = 0;
- for ( int i = col+1; i < indices.size() && idx1 == 0; i++)
+ for ( int i = col+1; i < (int)indices.size() && idx1 == 0; i++)//TODO: mismatch signed/unsigned
if ( indices[i] == col+1 ) idx1 = i;
indices[idx1] = idx;
}
}
result = indices;
- for ( int row = 0; row < indices.size(); row++ ) {
+ for ( int row = 0; row < (int)indices.size(); row++ ) {//TODO: mismatch signed/unsigned
int idx = indices[row];
if ( row+1 == idx ) continue;
SwapCells(row+1, theColumn, idx, theColumn);
int idx1 = 0;
- for ( int i = row+1; i < indices.size() && idx1 == 0; i++)
+ for ( int i = row+1; i < (int)indices.size() && idx1 == 0; i++)//TODO: mismatch signed/unsigned
if ( indices[i] == row+1 ) idx1 = i;
indices[idx1] = idx;
}
}
result = indices;
- for ( int col = 0; col < indices.size(); col++ ) {
+ for ( int col = 0; col < (int)indices.size(); col++ ) {//TODO: mismatch signed/unsigned
int idx = indices[col];
if ( col+1 == idx ) continue;
SwapColumns(col+1, idx);
int idx1 = 0;
- for ( int i = col+1; i < indices.size() && idx1 == 0; i++)
+ for ( int i = col+1; i < (int)indices.size() && idx1 == 0; i++)//TODO: mismatch signed/unsigned
if ( indices[i] == col+1 ) idx1 = i;
indices[idx1] = idx;
}
}
result = indices;
- for ( int row = 0; row < indices.size(); row++ ) {
+ for ( int row = 0; row < (int)indices.size(); row++ ) { //TODO: mismatch signed/unsigned
int idx = indices[row];
if ( row+1 == idx ) continue;
SwapRows(row+1, idx);
int idx1 = 0;
- for ( int i = row+1; i < indices.size() && idx1 == 0; i++)
+ for ( int i = row+1; i < (int)indices.size() && idx1 == 0; i++) //TODO: mismatch signed/unsigned
if ( indices[i] == row+1 ) idx1 = i;
indices[idx1] = idx;
}
static std::string getUnit(const std::string& theString)
{
std::string aString(theString);
- int aPos = aString.find(SEPARATOR);
- return aPos < 0 || aPos == aString.size()-1 ? std::string() : aString.substr(aPos+1, aString.size());
+ size_t aPos = aString.find(SEPARATOR);
+ return aPos >= aString.size()-1 ? std::string() : aString.substr(aPos+1);
}
static std::string getTitle(const std::string& theString)
{
std::string aString(theString);
- int aPos = aString.find(SEPARATOR);
- return aPos < 0 ? aString :aString.substr(0, aPos);
+ size_t aPos = aString.find(SEPARATOR);
+ return aPos == std::string::npos ? aString : aString.substr(0, aPos);
}
const std::string& SALOMEDSImpl_AttributeTableOfReal::GetID()
myNbColumns = theNbColumns;
- while (myCols.size() < myNbColumns) { // append empty columns titles
+ while ((int)myCols.size() < myNbColumns) { // append empty columns titles
myCols.push_back(std::string(""));
}
const std::vector<double>& theData)
{
CheckLocked();
- if(theData.size() > myNbColumns) SetNbColumns(theData.size());
+ if((int)theData.size() > myNbColumns) SetNbColumns((int)theData.size()); //!< TODO: conversion from size_t to const int, possible loss of data
Backup();
- while (myRows.size() < theRow) { // append new row titles
+ while ((int)myRows.size() < theRow) { // append new row titles
myRows.push_back(std::string(""));
}
- int i, aShift = (theRow-1)*myNbColumns, aLength = theData.size();
+ 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;
void SALOMEDSImpl_AttributeTableOfReal::SetRowUnits(const std::vector<std::string>& theUnits)
{
- if (theUnits.size() != GetNbRows()) throw DFexception("Invalid number of rows");
- int aLength = theUnits.size(), i;
- for(i = 1; i <= aLength; i++) SetRowUnit(i, theUnits[i-1]);
+ if ((int)theUnits.size() != GetNbRows()) throw DFexception("Invalid number of rows");
+ size_t aLength = theUnits.size(), i;
+ 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
}
std::vector<std::string> SALOMEDSImpl_AttributeTableOfReal::GetRowUnits()
{
std::vector<std::string> aSeq;
- int aLength = myRows.size(), i;
+ size_t aLength = myRows.size(), i;
for(i=0; i<aLength; i++) aSeq.push_back(getUnit(myRows[i]));
return aSeq;
}
void SALOMEDSImpl_AttributeTableOfReal::SetRowTitles(const std::vector<std::string>& theTitles)
{
- if (theTitles.size() != GetNbRows()) throw DFexception("Invalid number of rows");
- int aLength = theTitles.size(), i;
- for(i = 1; i <= aLength; i++) SetRowTitle(i, theTitles[i-1]);
+ if ((int)theTitles.size() != GetNbRows()) throw DFexception("Invalid number of rows");
+ size_t aLength = theTitles.size(), i;
+ 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
}
std::vector<std::string> SALOMEDSImpl_AttributeTableOfReal::GetRowTitles()
{
std::vector<std::string> aSeq;
- int aLength = myRows.size(), i;
+ size_t aLength = myRows.size(), i;
for(i=0; i<aLength; i++) aSeq.push_back(getTitle(myRows[i]));
return aSeq;
}
Backup();
- int i, aLength = theData.size();
+ 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;
- while (myRows.size() < myNbRows) { // append empty row titles
+ if((int)aLength > myNbRows) {
+ myNbRows = (int)aLength; //!< TODO: conversion from size_t to int
+ while ((int)myRows.size() < myNbRows) { // append empty row titles
myRows.push_back(std::string(""));
}
}
{
CheckLocked();
Backup();
- while(myCols.size() < theColumn) myCols.push_back(std::string(""));
+ while((int)myCols.size() < theColumn) myCols.push_back(std::string(""));
myCols[theColumn-1] = theTitle;
SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved
std::string SALOMEDSImpl_AttributeTableOfReal::GetColumnTitle(const int theColumn) const
{
if(myCols.empty()) return "";
- if(myCols.size() < theColumn) return "";
+ if((int)myCols.size() < theColumn) return "";
return myCols[theColumn-1];
}
void SALOMEDSImpl_AttributeTableOfReal::SetColumnTitles(const std::vector<std::string>& theTitles)
{
- if (theTitles.size() != myNbColumns) throw DFexception("Invalid number of columns");
- int aLength = theTitles.size(), i;
+ if ((int)theTitles.size() != myNbColumns) throw DFexception("Invalid number of columns");
+ size_t aLength = theTitles.size(), i;
for(i = 0; i < aLength; i++) myCols[i] = theTitles[i];
SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved
std::vector<std::string> SALOMEDSImpl_AttributeTableOfReal::GetColumnTitles()
{
std::vector<std::string> aSeq;
- int aLength = myCols.size(), i;
+ size_t aLength = myCols.size(), i;
for(i=0; i<aLength; i++) aSeq.push_back(myCols[i]);
return aSeq;
}
myTable[anIndex] = theValue;
if(theRow > myNbRows) {
- while (myRows.size() < theRow) { // append empty row titles
+ while ((int)myRows.size() < theRow) { // append empty row titles
myRows.push_back(std::string(""));
}
myNbRows = theRow;
int i, j, l;
//Title
- l = myTitle.size();
+ l = (int)myTitle.size();
sprintf(buffer, "%d\n", l);
aString+=buffer;
for(i=0; i<l; i++) {
//Row titles
for(i=0; i<myNbRows; i++) {
- l = myRows[i].size();
+ l = (int)myRows[i].size();
sprintf(buffer, "%d\n", l);
aString+=buffer;
for(j=0; j<l; j++) {
//Columns titles
for(i=0; i<myNbColumns; i++) {
- l = myCols[i].size();
+ l = (int)myCols[i].size();
sprintf(buffer, "%d\n", l);
aString+=buffer;
for(j=0; j<l; j++) {
}
//Store the table values
- l = myTable.size();
+ l = (int)myTable.size();
sprintf(buffer, "%d\n", l);
aString+=buffer;
for(MI p = myTable.begin(); p != myTable.end(); p++) {
}
result = indices;
- for ( int col = 0; col < indices.size(); col++ ) {
+ for ( int col = 0; col < (int)indices.size(); col++ ) {
int idx = indices[col];
if ( col+1 == idx ) continue;
SwapCells(theRow, col+1, theRow, idx);
int idx1 = 0;
- for ( int i = col+1; i < indices.size() && idx1 == 0; i++)
+ for ( int i = col+1; i < (int)indices.size() && idx1 == 0; i++)
if ( indices[i] == col+1 ) idx1 = i;
indices[idx1] = idx;
}
}
result = indices;
- for ( int row = 0; row < indices.size(); row++ ) {
+ for ( int row = 0; row < (int)indices.size(); row++ ) {
int idx = indices[row];
if ( row+1 == idx ) continue;
SwapCells(row+1, theColumn, idx, theColumn);
int idx1 = 0;
- for ( int i = row+1; i < indices.size() && idx1 == 0; i++)
+ for ( int i = row+1; i < (int)indices.size() && idx1 == 0; i++)
if ( indices[i] == row+1 ) idx1 = i;
indices[idx1] = idx;
}
}
result = indices;
- for ( int col = 0; col < indices.size(); col++ ) {
+ for ( int col = 0; col < (int)indices.size(); col++ ) {
int idx = indices[col];
if ( col+1 == idx ) continue;
SwapColumns(col+1, idx);
int idx1 = 0;
- for ( int i = col+1; i < indices.size() && idx1 == 0; i++)
+ for ( int i = col+1; i < (int)indices.size() && idx1 == 0; i++)
if ( indices[i] == col+1 ) idx1 = i;
indices[idx1] = idx;
}
}
result = indices;
- for ( int row = 0; row < indices.size(); row++ ) {
+ for ( int row = 0; row < (int)indices.size(); row++ ) {
int idx = indices[row];
if ( row+1 == idx ) continue;
SwapRows(row+1, idx);
int idx1 = 0;
- for ( int i = row+1; i < indices.size() && idx1 == 0; i++)
+ for ( int i = row+1; i < (int)indices.size() && idx1 == 0; i++)
if ( indices[i] == row+1 ) idx1 = i;
indices[idx1] = idx;
}
static std::string getUnit(std::string theString)
{
std::string aString(theString);
- int aPos = aString.find(SEPARATOR);
- if(aPos <= 0 || aPos == aString.size() ) return std::string();
- return aString.substr(aPos+1, aString.size());
+ size_t aPos = aString.find(SEPARATOR);
+ return aPos >= aString.size()-1 ? std::string() : aString.substr(aPos+1);
}
static std::string getTitle(std::string theString)
{
std::string aString(theString);
- int aPos = aString.find(SEPARATOR);
- if(aPos < 1) return aString;
- if(aPos == 0) return std::string();
- return aString.substr(0, aPos);
+ size_t aPos = aString.find(SEPARATOR);
+ return aPos == std::string::npos ? aString : aString.substr(0, aPos);
}
const std::string& SALOMEDSImpl_AttributeTableOfString::GetID()
myNbColumns = theNbColumns;
- while (myCols.size() < myNbColumns) { // append empty columns titles
+ while ((int)myCols.size() < myNbColumns) { // append empty columns titles
myCols.push_back(std::string(""));
}
void SALOMEDSImpl_AttributeTableOfString::SetRowUnits(const std::vector<std::string>& theUnits)
{
- if (theUnits.size() != GetNbRows()) throw DFexception("Invalid number of rows");
- int aLength = theUnits.size(), i;
- for(i = 1; i <= aLength; i++) SetRowUnit(i, theUnits[i-1]);
+ if ((int)theUnits.size() != GetNbRows()) throw DFexception("Invalid number of rows");
+ size_t aLength = theUnits.size(), i;
+ 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()
{
std::vector<std::string> aSeq;
- int aLength = myRows.size(), i;
+ size_t aLength = myRows.size(), i;
for(i=0; i<aLength; i++) aSeq.push_back(getUnit(myRows[i]));
return aSeq;
}
void SALOMEDSImpl_AttributeTableOfString::SetRowTitles(const std::vector<std::string>& theTitles)
{
- if (theTitles.size() != GetNbRows()) throw DFexception("Invalid number of rows");
- int aLength = theTitles.size(), i;
- for(i = 1; i <= aLength; i++) SetRowTitle(i, theTitles[i-1]);
+ if ((int)theTitles.size() != GetNbRows()) throw DFexception("Invalid number of rows");
+ size_t aLength = theTitles.size(), i;
+ 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
}
std::vector<std::string> SALOMEDSImpl_AttributeTableOfString::GetRowTitles()
{
std::vector<std::string> aSeq;
- int aLength = myRows.size(), i;
+ size_t aLength = myRows.size(), i;
for(i=0; i<aLength; i++) aSeq.push_back(getTitle(myRows[i]));
return aSeq;
}
const std::vector<std::string>& theData)
{
CheckLocked();
- if(theData.size() > myNbColumns) SetNbColumns(theData.size());
+ if((int)theData.size() > myNbColumns) SetNbColumns((int)theData.size()); //!< TODO: conversion from size_t to const int, possible loss of data
Backup();
- while (myRows.size() < theRow) { // append new row titles
+ while ((int)myRows.size() < theRow) { // append new row titles
myRows.push_back(std::string(""));
}
- int i, aShift = (theRow-1)*myNbColumns, aLength = theData.size();
+ 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;
Backup();
- int i, aLength = theData.size();
+ 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;
- while (myRows.size() < myNbRows) { // append empty row titles
+ if((int)aLength > myNbRows) {
+ myNbRows = (int)aLength; //!< TODO: conversion from size_t to int
+ while ((int)myRows.size() < myNbRows) { // append empty row titles
myRows.push_back(std::string(""));
}
}
{
CheckLocked();
Backup();
- while(myCols.size() < theColumn) myCols.push_back(std::string(""));
+ while((int)myCols.size() < theColumn) myCols.push_back(std::string(""));
myCols[theColumn-1] = theTitle;
SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved
std::string SALOMEDSImpl_AttributeTableOfString::GetColumnTitle(const int theColumn) const
{
if(myCols.empty()) return "";
- if(myCols.size() < theColumn) return "";
+ if((int)myCols.size() < theColumn) return "";
return myCols[theColumn-1];
}
void SALOMEDSImpl_AttributeTableOfString::SetColumnTitles(const std::vector<std::string>& theTitles)
{
- if (theTitles.size() != myNbColumns) throw DFexception("Invalid number of columns");
- int aLength = theTitles.size(), i;
+ if ((int)theTitles.size() != myNbColumns) throw DFexception("Invalid number of columns");
+ size_t aLength = theTitles.size(), i;
for(i = 0; i < aLength; i++) myCols[i] = theTitles[i];
SetModifyFlag(); //SRN: Mark the study as being modified, so it could be saved
std::vector<std::string> SALOMEDSImpl_AttributeTableOfString::GetColumnTitles()
{
std::vector<std::string> aSeq;
- int aLength = myCols.size(), i;
+ size_t aLength = myCols.size(), i;
for(i=0; i<aLength; i++) aSeq.push_back(myCols[i]);
return aSeq;
}
myTable[anIndex] = theValue;
if(theRow > myNbRows) {
- while (myRows.size() < theRow) { // append empty row titles
+ while ((int)myRows.size() < theRow) { // append empty row titles
myRows.push_back(std::string(""));
}
myNbRows = theRow;
int i, j, l;
//Title
- l = myTitle.size();
+ l = (int)myTitle.size();
sprintf(buffer, "%d\n", l);
aString+=buffer;
for(i=0; i<l; i++) {
//Row titles
for(i=0; i<myNbRows; i++) {
- l = myRows[i].size();
+ l = (int)myRows[i].size();
sprintf(buffer, "%d\n", l);
aString+=buffer;
for(j=0; j<l; j++) {
//Columns titles
for(i=0; i<myNbColumns; i++) {
- l = myCols[i].size();
+ l = (int)myCols[i].size();
sprintf(buffer, "%d\n", l);
aString+=buffer;
for(j=0; j<l; j++) {
}
//Store the table values
- l = myTable.size();
+ l = (int)myTable.size();
sprintf(buffer, "%d\n", l);
aString+=buffer;
for(MI p = myTable.begin(); p!=myTable.end(); p++) {
if (p->second.size()) { // check empty string in the value table
sprintf(buffer, "%d\n", p->first);
aString += buffer;
- unsigned long aValueSize = p->second.size();
+ unsigned long aValueSize = (unsigned long)p->second.size(); //!< TODO conversion from size_t to unsigned long, possible loss of data
sprintf(buffer, "%ld\n", aValueSize);
aString +=buffer;
aString += p->second;
}
result = indices;
- for ( int col = 0; col < indices.size(); col++ ) {
+ for ( int col = 0; col < (int)indices.size(); col++ ) { //TODO: mismatch signed/unsigned
int idx = indices[col];
if ( col+1 == idx ) continue;
SwapCells(theRow, col+1, theRow, idx);
int idx1 = 0;
- for ( int i = col+1; i < indices.size() && idx1 == 0; i++)
+ for ( int i = col+1; i < (int)indices.size() && idx1 == 0; i++) //TODO: mismatch signed/unsigned
if ( indices[i] == col+1 ) idx1 = i;
indices[idx1] = idx;
}
}
result = indices;
- for ( int row = 0; row < indices.size(); row++ ) {
+ for ( int row = 0; row < (int)indices.size(); row++ ) { //TODO: mismatch signed/unsigned
int idx = indices[row];
if ( row+1 == idx ) continue;
SwapCells(row+1, theColumn, idx, theColumn);
int idx1 = 0;
- for ( int i = row+1; i < indices.size() && idx1 == 0; i++)
+ for ( int i = row+1; i < (int)indices.size() && idx1 == 0; i++) //TODO: mismathc signed/unsigned
if ( indices[i] == row+1 ) idx1 = i;
indices[idx1] = idx;
}
}
result = indices;
- for ( int col = 0; col < indices.size(); col++ ) {
+ for ( int col = 0; col < (int)indices.size(); col++ ) { //TODO: mismatch signed/unsigned
int idx = indices[col];
if ( col+1 == idx ) continue;
SwapColumns(col+1, idx);
int idx1 = 0;
- for ( int i = col+1; i < indices.size() && idx1 == 0; i++)
+ for ( int i = col+1; i < (int)indices.size() && idx1 == 0; i++) //TODO: mismatch signed/unsigned
if ( indices[i] == col+1 ) idx1 = i;
indices[idx1] = idx;
}
}
result = indices;
- for ( int row = 0; row < indices.size(); row++ ) {
+ for ( int row = 0; row < (int)indices.size(); row++ ) { //TODO: mismatch signed/unsigned
int idx = indices[row];
if ( row+1 == idx ) continue;
SwapRows(row+1, idx);
int idx1 = 0;
- for ( int i = row+1; i < indices.size() && idx1 == 0; i++)
+ for ( int i = row+1; i < (int)indices.size() && idx1 == 0; i++) //TODO: mismatch signed/unsigned
if ( indices[i] == row+1 ) idx1 = i;
indices[idx1] = idx;
}
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);
SALOMEDSImpl_UseCaseBuilder* _builder;
public:
+ virtual ~SALOMEDSImpl_Callback() {}
SALOMEDSImpl_Callback(SALOMEDSImpl_UseCaseBuilder* builder)
{
class SALOMEDSIMPL_EXPORT SALOMEDSImpl_AbstractCallback
{
public:
- virtual bool addSO_Notification(const SALOMEDSImpl_SObject& theSObject){return false;};
- virtual bool removeSO_Notification(const SALOMEDSImpl_SObject& theSObject){return false;};
- virtual bool modifySO_Notification(const SALOMEDSImpl_SObject& theSObject, int reason ){return false;};
- virtual bool modifyNB_Notification(const char* theVarName){return false;};
- virtual void RegisterGenObj (const std::string& theIOR) {}
- virtual void UnRegisterGenObj(const std::string& theIOR) {}
+ virtual ~SALOMEDSImpl_AbstractCallback() {}
+ virtual bool addSO_Notification(const SALOMEDSImpl_SObject& /*theSObject*/){return false;}
+ virtual bool removeSO_Notification(const SALOMEDSImpl_SObject& /*theSObject*/){return false;}
+ virtual bool modifySO_Notification(const SALOMEDSImpl_SObject& /*theSObject*/, int /*reason*/ ){return false;}
+ virtual bool modifyNB_Notification(const char* /*theVarName*/){return false;}
+ virtual void RegisterGenObj (const std::string& /*theIOR*/) {}
+ virtual void UnRegisterGenObj(const std::string& /*theIOR*/) {}
};
#endif
SALOMEDSImpl_ChildIterator() {}
SALOMEDSImpl_ChildIterator(const SALOMEDSImpl_SObject& theSO);
SALOMEDSImpl_ChildIterator(const DF_Label& theLabel);
- ~SALOMEDSImpl_ChildIterator() {};
+ virtual ~SALOMEDSImpl_ChildIterator() {};
virtual void Init();
virtual void Init(const DF_Label& theLabel);
* Purpose :
*/
//============================================================================
-void SALOMEDSImpl_GenericVariable::Load(const std::string& theStrValue)
+void SALOMEDSImpl_GenericVariable::Load(const std::string& /*theStrValue*/)
{
}
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(listName, PT_STRARRAY)) return "";
std::vector<std::string> v = _ap->GetStrArray(listName);
- if(index >= v.size()) return "";
+ if(index >= (int)v.size()) return "";
return v[index];
}
if(!_ap) return "";
if(!_ap->IsSet(entry, PT_STRARRAY)) return "";
std::vector<std::string> v = _ap->GetStrArray(entry);
- int length = v.size();
- for(int i = 0; i<length; i+=1) {
+ size_t length = v.size();
+ for(int i = 0; i<(int)length; i+=1) {
if(v[i] == parameterName) return v[i+1];
}
return "";
if(!_ap) return "";
if(!_ap->IsSet(entry, PT_STRARRAY)) return "";
std::vector<std::string> v = _ap->GetStrArray(entry);
- int length = v.size();
- for(int i = 0; i<length; i+=1) {
+ size_t length = v.size();
+ for(int i = 0; i<(int)length; i+=1) {
if(v[i] == _PT_ID_) return v[i+1];
}
return "";
if(!_ap) return v;
if(!_ap->IsSet(entry, PT_STRARRAY)) return v;
v = _ap->GetStrArray(entry);
- int length = v.size();
- for(int i = 0; i<length; i+=2) {
+ size_t length = v.size();
+ for(int i = 0; i<(int)length; i+=2) {
names.push_back(v[i]);
}
return names;
if(!_ap) return v;
if(!_ap->IsSet(entry, PT_STRARRAY)) return v;
v = _ap->GetStrArray(entry);
- int length = v.size();
- for(int i = 1; i<length; i+=2) {
+ size_t length = v.size();
+ for(int i = 1; i<(int)length; i+=2) {
values.push_back(v[i]);
}
return values;
{
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("_");
- if(pos < 0 || pos >= entry.size()) return entry;
+ size_t pos = entry.rfind("_");
+ if(pos >= entry.size()) return entry;
std::string compName(entry, 0, pos), compID, tail(entry, pos+1, entry.length()-1);
std::vector<std::string> v = ip.getProperties();
if(v.size() > 0) {
dump += "#Set up visual properties:\n";
- for(int i = 0; i<v.size(); i++) {
+ for(int i = 0; i<(int)v.size(); i++) {//TODO: mismatch signed/unsigned
std::string prp = ip.getProperty(v[i]);
dump += "ipar.setProperty(\""+v[i]+"\", \""+prp+"\")\n";
}
v = ip.getLists();
if(v.size() > 0) {
dump += "#Set up lists:\n";
- for(int i = 0; i<v.size(); i++) {
+ for(int i = 0; i<(int)v.size(); i++) { //TODO: mismatch signed/unsigned
std::vector<std::string> lst = ip.getValues(v[i]);
dump += "# fill list "+v[i]+"\n";
- for(int j = 0; j < lst.size(); j++) {
- if (lst[j].find('\"') == -1)
+ for(int j = 0; j < (int)lst.size(); j++) { //TODO: mismatch signed/unsigned
+ if (lst[j].find('\"') == std::string::npos)
dump += "ipar.append(\""+v[i]+"\", \""+lst[j]+"\")\n";
else
dump += "ipar.append(\""+v[i]+"\", \"\"\""+lst[j]+"\"\"\")\n";
std::vector<std::string> v = ip.getProperties();
if(v.size() > 0) {
dump += shift +"#Set up visual properties:\n";
- for(int i = 0; i<v.size(); i++) {
+ for(int i = 0; i<(int)v.size(); i++) { //TODO: mismtach signed/unsigned
std::string prp = ip.getProperty(v[i]);
dump += shift +"ipar.setProperty(\""+v[i]+"\", \""+prp+"\")\n";
}
v = ip.getLists();
if(v.size() > 0) {
dump += shift +"#Set up lists:\n";
- for(int i = 0; i<v.size(); i++) {
+ for(int i = 0; i<(int)v.size(); i++) { //TODO: mismatch signed/unsigned
std::vector<std::string> lst = ip.getValues(v[i]);
dump += shift +"# fill list "+v[i]+"\n";
- for(int j = 0; j < lst.size(); j++)
+ for(int j = 0; j < (int)lst.size(); j++) //TODO: mismatch signed/unsigned
dump += shift +"ipar.append(\""+v[i]+"\", \""+lst[j]+"\")\n";
}
}
v = ip.getEntries();
if(v.size() > 0) {
dump += shift + "#Set up entries:\n";
- for(int i = 0; i<v.size(); i++) {
+ for(int i = 0; i<(int)v.size(); i++) { //TODO: mismatch signed/unsigned
std::vector<std::string> names = ip.getAllParameterNames(v[i]);
std::vector<std::string> values = ip.getAllParameterValues(v[i]);
std::string decodedEntry = ip.decodeEntry(v[i]);
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";
}
- for(int j = 0; j < names.size() && j < values.size(); j++) {
+ for(int j = 0; j < (int)names.size() && j < (int)values.size(); j++) { //TODO: mismtach siged/unsigned
if(names[j] == _PT_ID_) continue;
if(hasId)
dump += shift + "ipar.setParameter(" + "objId" + ", \"" + names[j] + "\", \"" + values[j] + "\")\n";
*/
//============================================================================
SALOMEDSImpl_SComponent::SALOMEDSImpl_SComponent(const SALOMEDSImpl_SComponent& theSCO)
+: SALOMEDSImpl_SObject()
{
_lab = theSCO._lab;
_value = theSCO._value;
SALOMEDSImpl_SComponentIterator(DF_Document* theDocument);
- ~SALOMEDSImpl_SComponentIterator() {};
+ virtual ~SALOMEDSImpl_SComponentIterator() {};
virtual void Init();
virtual bool More();
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;
+ 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);
hasModuleData = true;
unsigned char* aStreamFile = NULL;
- int aStreamSize = 0;
+ long aStreamSize = 0;
if (hdf_sco_group->ExistInternalObject("FILE_STREAM")) {
HDFdataset *hdf_dataset = new HDFdataset("FILE_STREAM", hdf_sco_group);
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, aStreamSize, aDir.c_str(), aMultifileState[0]=='M'): //!< TODO: conversion from size_t to const long
+ aDriver->Load(anSCO, aStreamFile, aStreamSize, aDir.c_str(), aMultifileState[0]=='M'); //!< TODO: conversion from size_t to const long
}
if(aStreamFile != NULL) delete []aStreamFile;
* Purpose :
*/
//============================================================================
-bool SALOMEDSImpl_StudyBuilder::Load(const SALOMEDSImpl_SObject& sco)
+bool SALOMEDSImpl_StudyBuilder::Load(const SALOMEDSImpl_SObject& /*sco*/)
{
_errorCode = "Not implemented";
return false;
* Purpose :
*/
//============================================================================
-void SALOMEDSImpl_StudyBuilder::UndoLimit(int n)
+void SALOMEDSImpl_StudyBuilder::UndoLimit(int /*n*/)
{
_errorCode = "";
CheckLocked();
SALOMEDSImpl_StudyBuilder(const SALOMEDSImpl_Study* theOwner);
- ~SALOMEDSImpl_StudyBuilder();
+ virtual ~SALOMEDSImpl_StudyBuilder();
virtual SALOMEDSImpl_SComponent NewComponent(const std::string& ComponentDataType);
typedef unsigned char TOctet;
//typedef unsigned int size_t;
+ virtual ~SALOMEDSImpl_TMPFile() {}
+
virtual size_t Size() = 0;
virtual TOctet* Data();
{
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];
//============================================================================
std::string SALOMEDSImpl_Tool::GetNameFromPath(const std::string& thePath) {
if (thePath.empty()) return "";
- int pos = thePath.rfind('/');
+ int pos = (int)thePath.rfind('/'); //TODO: conversion from size_t to int
if(pos >= 0) return thePath.substr(pos+1, thePath.size());
pos = thePath.rfind('\\');
if(pos >= 0) return thePath.substr(pos+1, thePath.size());
std::string path;
if (!thePath.empty()) {
- int pos = thePath.rfind('/');
+ int pos = (int)thePath.rfind('/'); //TODO: conversion from size_t to int
if (pos < 0) pos = thePath.rfind('\\');
if (pos < 0) pos = thePath.rfind('|');
{
std::vector<std::string> vs;
if(theValue[0] == separator && theValue.size() == 1) return vs;
- int pos = theValue.find(separator);
+ int pos = (int)theValue.find(separator); //TODO: conversion from size_t to int
if(pos < 0) {
vs.push_back(theValue);
return vs;
std::vector<std::string> treatRepetation(const std::string& theValue)
{
std::vector<std::string> aResult;
- int pos = theValue.find(";*=");
+ int pos = (int)theValue.find(";*="); //TODO: conversion from size_t to int
if(pos < 0 )
{
aResult.push_back(theValue);
{
std::vector<std::string> aResult;
if(theValue[0] == sep ) aResult.push_back(std::string());
- int pos = theValue.find(sep);
+ int pos = (int)theValue.find(sep); //TODO: conversion from size_t to int
if(pos < 0 ) {
if(sep == '|')
{
std::vector< std::vector<std::string> > aResult;
if(theValue.size() > 0) {
std::vector<std::string> aSections = splitStringWithEmpty( theValue, sep1 );
- for( int i = 0, n = aSections.size(); i < n; i++ )
+ for( size_t i = 0, n = aSections.size(); i < n; i++ )
aResult.push_back( splitStringWithEmpty( aSections[i], sep2 ) );
}
return aResult;
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
}
SALOMEDSImpl_UseCaseBuilder(DF_Document* theDocument);
//! standard destructor
- ~SALOMEDSImpl_UseCaseBuilder();
+ virtual ~SALOMEDSImpl_UseCaseBuilder();
virtual bool Append(const SALOMEDSImpl_SObject& theObject);
const bool allLevels);
//! standard destructor
- ~SALOMEDSImpl_UseCaseIterator();
+ virtual ~SALOMEDSImpl_UseCaseIterator();
virtual void Init(bool);
virtual bool More();
//#include "SALOMEDSImpl_.hxx"
-int main (int argc, char * argv[])
+int main ()
{
std::cout << "Test started " << std::endl;
aStudy->SetStudyLock("SRN");
std::cout << "Is study locked = " << aStudy->IsStudyLocked() << std::endl;
std::vector<std::string> ids = aStudy->GetLockerID();
- for(int i = 0; i<ids.size(); i++)
+ for(size_t i = 0; i<ids.size(); i++)
std::cout << "Get study locker : " << ids[i] << std::endl;
aStudy->UnLockStudy("SRN");
std::cout << "Is study locked = " << aStudy->IsStudyLocked() << std::endl;
std::cout << "Check the attributes on SObject" << std::endl;
std::vector<DF_Attribute*> aSeq = aSO.GetAllAttributes();
- for(int i = 0; i < aSeq.size(); i++)
+ for(size_t i = 0; i < aSeq.size(); i++)
std::cout << "Found: " << dynamic_cast<SALOMEDSImpl_GenericAttribute*>(aSeq[i])->Type() << std::endl;
std::vector<double> v2 = AP->GetRealArray("1");
std::cout.precision(10);
std::cout << " values : ";
- for(int i = 0; i<v2.size(); i++) std::cout << v2[i] << " ";
+ for(size_t i = 0; i<v2.size(); i++) std::cout << v2[i] << " ";
std::cout << std::endl;
v[0] = 211.111;
v2 = AP->GetRealArray("2");
std::cout << "Restored real array with id = 2 is: ";
- for(int i = 0; i<v2.size(); i++) std::cout << v2[i] << " ";
+ for(size_t i = 0; i<v2.size(); i++) std::cout << v2[i] << " ";
std::cout << std::endl;
vi = AP->GetIntArray("2");
std::cout << "Restored int array with id = 2 is: ";
- for(int i = 0; i<vi.size(); i++) std::cout << vi[i] << " ";
+ for(size_t i = 0; i<vi.size(); i++) std::cout << vi[i] << " ";
std::cout << std::endl;
vs = AP->GetStrArray("3");
std::cout << "Restored string array with id = 2 is: ";
- for(int i = 0; i<vs.size(); i++) std::cout << vs[i] << " ";
+ for(size_t i = 0; i<vs.size(); i++) std::cout << vs[i] << " ";
std::cout << std::endl;
std::cout << "Check RemoveID 1 with type PT_INTEGER" << std::endl;
{
if (_singleton == 0) // no need of lock when singleton already exists
{
- int ret;
- ret = pthread_mutex_lock(&_singletonMutex); // acquire lock to be alone
+ pthread_mutex_lock(&_singletonMutex); // acquire lock to be alone
if (_singleton == 0) // another thread may have got
{ // the lock after the first test
DEVTRACE("FileTraceCollector:: instance()");
_singleton = myInstance; // _singleton known only when init done
DEVTRACE("FileTraceCollector:: instance()-end");
}
- ret = pthread_mutex_unlock(&_singletonMutex); // release lock
+ pthread_mutex_unlock(&_singletonMutex); // release lock
}
return _singleton;
}
*/
// ============================================================================
-void* FileTraceCollector::run(void *bid)
+void* FileTraceCollector::run(void* /*bid*/)
{
//DEVTRACE("init run");
_threadId = new pthread_t;
FileTraceCollector:: ~FileTraceCollector()
{
- int ret;
- ret = pthread_mutex_lock(&_singletonMutex); // acquire lock to be alone
+ pthread_mutex_lock(&_singletonMutex); // acquire lock to be alone
if (_singleton)
{
DEVTRACE("FileTraceCollector:: ~FileTraceCollector()");
if (_threadId)
{
int ret = pthread_join(*_threadId, NULL);
- if (ret) std::cerr << "error close FileTraceCollector : "<< ret << std::endl;
- else DEVTRACE("FileTraceCollector destruction OK");
+ if (ret) { std::cerr << "error close FileTraceCollector : "<< ret << std::endl; }
+ else { DEVTRACE("FileTraceCollector destruction OK"); }
delete _threadId;
_threadId = 0;
_threadToClose = 0;
}
_singleton = 0;
}
- ret = pthread_mutex_unlock(&_singletonMutex); // release lock
+ pthread_mutex_unlock(&_singletonMutex); // release lock
}
// ============================================================================
{
if (_singleton == 0) // no need of lock when singleton already exists
{
- int ret;
- ret = pthread_mutex_lock(&_singletonMutex); // acquire lock to be alone
+ pthread_mutex_lock(&_singletonMutex); // acquire lock to be alone
if (_singleton == 0) // another thread may have got
{ // the lock after the first test
DEVTRACE("New buffer pool");
}
DEVTRACE("New buffer pool: end");
}
- ret = pthread_mutex_unlock(&_singletonMutex); // release lock
+ pthread_mutex_unlock(&_singletonMutex); // release lock
}
return _singleton;
}
LocalTraceBufferPool::~LocalTraceBufferPool()
{
- int ret = pthread_mutex_lock(&_singletonMutex); // acquire lock to be alone
+ pthread_mutex_lock(&_singletonMutex); // acquire lock to be alone
if (_singleton)
{
DEVTRACE("LocalTraceBufferPool::~LocalTraceBufferPool()");
delete (_myThreadTrace);
_myThreadTrace = 0;
- int ret;
#ifdef __APPLE__
dispatch_release(_freeBufferSemaphore);
dispatch_release(_fullBufferSemaphore);
#else
- ret=sem_destroy(&_freeBufferSemaphore);
- ret=sem_destroy(&_fullBufferSemaphore);
+ sem_destroy(&_freeBufferSemaphore);
+ sem_destroy(&_fullBufferSemaphore);
#endif
- ret=pthread_mutex_destroy(&_incrementMutex);
+ pthread_mutex_destroy(&_incrementMutex);
DEVTRACE("LocalTraceBufferPool::~LocalTraceBufferPool()-end");
_singleton = 0;
}
- ret = pthread_mutex_unlock(&_singletonMutex); // release lock
+ pthread_mutex_unlock(&_singletonMutex); // release lock
}
// ============================================================================
unsigned long LocalTraceBufferPool::lockedIncrement(unsigned long& pos)
{
- int ret;
- ret = pthread_mutex_lock(&_incrementMutex); // lock access to counters
+ pthread_mutex_lock(&_incrementMutex); // lock access to counters
unsigned long mypos = ++pos;
- ret = pthread_mutex_unlock(&_incrementMutex); // release lock
+ pthread_mutex_unlock(&_incrementMutex); // release lock
return mypos;
}
{
if (_singleton == 0) // no need of lock when singleton already exists
{
- int ret;
- ret = pthread_mutex_lock(&_singletonMutex); // acquire lock to be alone
+ pthread_mutex_lock(&_singletonMutex); // acquire lock to be alone
if (_singleton == 0) // another thread may have got
{ // the lock after the first test
BaseTraceCollector* myInstance = new LocalTraceCollector();
sem_wait(&_sem);
_singleton = myInstance; // _singleton known only when init done
}
- ret = pthread_mutex_unlock(&_singletonMutex); // release lock
+ pthread_mutex_unlock(&_singletonMutex); // release lock
}
return _singleton;
}
*/
// ============================================================================
-void* LocalTraceCollector::run(void *bid)
+void* LocalTraceCollector::run(void* /*bid*/)
{
_threadId = new pthread_t;
*_threadId = pthread_self();
LocalTraceCollector:: ~LocalTraceCollector()
{
- int ret;
- ret = pthread_mutex_lock(&_singletonMutex); // acquire lock to be alone
+ pthread_mutex_lock(&_singletonMutex); // acquire lock to be alone
if (_singleton)
{
DEVTRACE("LocalTraceCollector:: ~LocalTraceCollector()");
if (_threadId)
{
int ret = pthread_join(*_threadId, NULL);
- if (ret) std::cerr << "error close LocalTraceCollector : "<< ret << std::endl;
- else DEVTRACE("LocalTraceCollector destruction OK");
+ if (ret) { std::cerr << "error close LocalTraceCollector : "<< ret << std::endl; }
+ else { DEVTRACE("LocalTraceCollector destruction OK"); }
delete _threadId;
_threadId = 0;
_threadToClose = 0;
}
_singleton = 0;
}
- ret = pthread_mutex_unlock(&_singletonMutex); // release lock
+ pthread_mutex_unlock(&_singletonMutex); // release lock
}
// ============================================================================
void *PrintHello(void *threadid)
{
+ SALOME_UNUSED(threadid); // unused in release mode
#if defined(_DEBUG_) || defined(_DEBUG)
long id_thread = (long)threadid;
for (int i=0; i<NUM_MESSAGES;i++)
{
id=poa->activate_object(this);
}
- catch(PortableServer::POA::ServantAlreadyActive& e)
+ catch(PortableServer::POA::ServantAlreadyActive& /*e*/) //!< TODO: unused variables
{
id=poa->servant_to_id(this);
}
};
template<class T, class U>
- typename SALOMESDS::AutoRefCountPtr<U> DynamicCast(typename SALOMESDS::AutoRefCountPtr<T>& autoSubPtr) throw()
+ typename SALOMESDS::AutoRefCountPtr<U> DynamicCast(typename SALOMESDS::AutoRefCountPtr<T>& autoSubPtr)
{
T *subPtr(autoSubPtr);
U *ptr(dynamic_cast<U *>(subPtr));
{
SALOME::StringVec *ret(new SALOME::StringVec);
std::size_t sz(_vars.size());
- ret->length(sz);
+ ret->length((CORBA::ULong)sz); //!< TODO: size_t to CORBA::ULong
std::list< std::pair< SALOME::BasicDataServer_var, BasicDataServer * > >::iterator it(_vars.begin());
for(std::size_t i=0;i<sz;it++,i++)
{
BasicDataServer *obj((*it).second);
std::string name(obj->getVarNameCpp());
- (*ret)[i]=CORBA::string_dup(name.c_str());
+ (*ret)[(CORBA::ULong)i]=CORBA::string_dup(name.c_str()); //!< TODO: size_t to CORBA::ULong
}
return ret;
}
}
Py_ssize_t sz(PyList_Size(keys));
SALOME::SeqOfByteVec *ret(new SALOME::SeqOfByteVec);
- ret->length(sz);
+ ret->length((CORBA::ULong)sz); //!< TODO: convert Py_ssize_t in CORBA::ULong
for(Py_ssize_t i=0;i<sz;i++)
{
PyObject *item(PyList_GetItem(keys,i));
Py_XINCREF(item);
std::string pickel(varc->pickelize(item));//item consumed
- PickelizedPyObjServer::FromCppToByteSeq(pickel,(*ret)[i]);
+ PickelizedPyObjServer::FromCppToByteSeq(pickel,(*ret)[(CORBA::ULong)i]); //!< TODO: convert Py_ssize_t in CORBA::ULong
}
Py_XDECREF(keys);
return ret;
Transaction *elt(0);
try
{
- eltBase=_poa->reference_to_servant(transactions[i]);
+ eltBase=_poa->reference_to_servant(transactions[(CORBA::ULong)i]); //!< TODO: size_t to CORBA::ULong
elt=dynamic_cast<Transaction *>(eltBase);
}
catch(...)
std::vector<std::string> scopes(listOfScopesCpp());
SALOME::StringVec *ret(new SALOME::StringVec);
std::size_t sz(scopes.size());
- ret->length(sz);
+ ret->length((CORBA::ULong)sz); //!< TODO: size_t to CORBA::ULong
for(std::size_t i=0;i<sz;i++)
- (*ret)[i]=CORBA::string_dup(scopes[i].c_str());
+ (*ret)[(CORBA::ULong)i]=CORBA::string_dup(scopes[i].c_str()); //!< TODO: size_t to CORBA::ULong
return ret;
}
//
SALOME::StringVec *ret(new SALOME::StringVec);
sz=retCpp.size();
- ret->length(sz);
+ ret->length((CORBA::ULong)sz); //!< TODO: size_t to CORBA::ULong
for(std::size_t i=0;i<sz;i++)
- (*ret)[i]=CORBA::string_dup(retCpp[i].c_str());
+ (*ret)[(CORBA::ULong)i]=CORBA::string_dup(retCpp[i].c_str()); //!< TODO: size_t to CORBA::ULong
return ret;
}
{
}
-void PickelizedPyObjRdOnlyServer::addKeyValueErrorIfAlreadyExisting(PyObject *key, PyObject *value)
+void PickelizedPyObjRdOnlyServer::addKeyValueErrorIfAlreadyExisting(PyObject * /*key*/, PyObject * /*value*/)
{
throw Exception("PickelizedPyObjRdOnlyServer::addKeyValueErrorIfAlreadyExisting : incompatible with RdOnly !");
}
checkKeyPresence(key,true);
}
-void PickelizedPyObjServer::addKeyValueHard(PyObject *key, PyObject *value)
+void PickelizedPyObjServer::addKeyValueHard(PyObject * /*key*/, PyObject * /*value*/)
{
std::ostringstream oss; oss << "PickelizedPyObjServer::addKeyValueHard : var \"" << getVarNameCpp() << "\" is not permitted to alter its value !";
throw Exception(oss.str());
}
-void PickelizedPyObjServer::removeKeyInVarErrorIfNotAlreadyExisting(PyObject *key)
+void PickelizedPyObjServer::removeKeyInVarErrorIfNotAlreadyExisting(PyObject * /*key*/)
{
std::ostringstream oss; oss << "PickelizedPyObjServer::removeKeyInVarErrorIfNotAlreadyExisting : var \"" << getVarNameCpp() << "\" is not permitted to alter its value !";
throw Exception(oss.str());
ret.resize(sz,' ');
char *buf(const_cast<char *>(ret.c_str()));
for(std::size_t i=0;i<sz;i++)
- buf[i]=bsToBeConv[i];
+ buf[i]=bsToBeConv[(CORBA::ULong)i]; //!< TODO: size_t to CORBA::ULong
}
void PickelizedPyObjServer::FromCppToByteSeq(const std::string& strToBeConv, SALOME::ByteVec& ret)
{
const char *buf(strToBeConv.c_str());
std::size_t sz(strToBeConv.size());
- ret.length(sz);
+ ret.length((CORBA::ULong)sz); //!< TODO: size_t to CORBA::ULong
for(std::size_t i=0;i<sz;i++)
- ret[i]=buf[i];
+ ret[(CORBA::ULong)i]=buf[i]; //!< TODO: size_t to CORBA::ULong
}
SALOME::ByteVec *PickelizedPyObjServer::FromCppToByteSeq(const std::string& strToBeConv)
{
}
-RefCountServ::RefCountServ(const RefCountServ& other):_cnt(1)
+RefCountServ::RefCountServ(const RefCountServ& other):omniServant(other),PortableServer::ServantBase(other),_cnt(1)
{
}
#include <sstream>
-void SALOMESDS::Sha1Keeper::checkSame(const std::string& varName,const std::string& compareFuncContent, PyObject *oldObj, PyObject *newObj)
+void SALOMESDS::Sha1Keeper::checkSame(const std::string& /*varName*/,const std::string& compareFuncContent, PyObject *oldObj, PyObject *newObj)
{
if(compareFuncContent!=_cmp_func_content)
{
ret.resize(sz);
unsigned char *buf(const_cast<unsigned char *>(&ret[0]));
for(std::size_t i=0;i<sz;i++)
- buf[i]=bsToBeConv[i];
+ buf[i]=bsToBeConv[(CORBA::ULong)i]; //!< TODO: size_t to CORBA::ULong
}
void Transaction::FromVBToByteSeq(const std::vector<unsigned char>& bsToBeConv, SALOME::ByteVec& ret)
{
std::size_t sz(bsToBeConv.size());
- ret.length(sz);
+ ret.length((CORBA::ULong)sz); //!< TODO: size_t to CORBA::ULong
for(std::size_t i=0;i<sz;i++)
- ret[i]=bsToBeConv[i];
+ ret[(CORBA::ULong)i]=bsToBeConv[i]; //!< TODO: size_t to CORBA::ULong
}
Transaction::~Transaction()
_dsct->createRdExtVarInternal(_var_name,data2);
}
-TransactionRdExtVarFreeStyleCreate::TransactionRdExtVarFreeStyleCreate(DataScopeServerTransaction *dsct, const std::string& varName, const SALOME::ByteVec& constValue, const char *compareFuncContent):_cmp_func_content(compareFuncContent),_cmp_func(nullptr),TransactionRdExtVarCreate(dsct,varName,constValue)
+TransactionRdExtVarFreeStyleCreate::TransactionRdExtVarFreeStyleCreate(DataScopeServerTransaction *dsct, const std::string& varName, const SALOME::ByteVec& constValue, const char *compareFuncContent):TransactionRdExtVarCreate(dsct,varName,constValue),_cmp_func_content(compareFuncContent),_cmp_func(nullptr)
{
constexpr char EXPECTED_COMPARE_FUNC_NAME[]="comptchev";
SALOME::AutoPyRef context(PyDict_New());
{
if (_singleton == 0) // no need of lock when singleton already exists
{
- int ret;
- ret = pthread_mutex_lock(&_singletonMutex); // acquire lock to be alone
+ pthread_mutex_lock(&_singletonMutex); // acquire lock to be alone
if (_singleton == 0) // another thread may have got
{ // the lock after the first test
BaseTraceCollector* myInstance = new SALOMETraceCollector();
sem_wait(&_sem);
_singleton = myInstance; // _singleton known only when init done
}
- ret = pthread_mutex_unlock(&_singletonMutex); // release lock
+ pthread_mutex_unlock(&_singletonMutex); // release lock
}
return _singleton;
}
*/
// ============================================================================
-void* SALOMETraceCollector::run(void *bid)
+void* SALOMETraceCollector::run(void* /*bid*/)
{
_threadId = new pthread_t;
*_threadId = pthread_self();
SALOMETraceCollector:: ~SALOMETraceCollector()
{
- int ret;
- ret = pthread_mutex_lock(&_singletonMutex); // acquire lock to be alone
+ pthread_mutex_lock(&_singletonMutex); // acquire lock to be alone
if (_singleton)
{
DEVTRACE("SALOMETraceCollector:: ~SALOMETraceCollector()");
if (_threadId)
{
int ret = pthread_join(*_threadId, NULL);
- if (ret) std::cerr << "error close SALOMETraceCollector : "<< ret << std::endl;
- else DEVTRACE("SALOMETraceCollector destruction OK");
+ if (ret) { std::cerr << "error close SALOMETraceCollector : "<< ret << std::endl; }
+ else { DEVTRACE("SALOMETraceCollector destruction OK") };
delete _threadId;
_threadId = 0;
_threadToClose = 0;
}
_singleton = 0;
}
- ret = pthread_mutex_unlock(&_singletonMutex); // release lock
+ pthread_mutex_unlock(&_singletonMutex); // release lock
}
// ============================================================================
void *PrintHello(void *threadid)
{
+ SALOME_UNUSED(threadid); // unused in release mode
#if defined(_DEBUG_) || defined(_DEBUG)
long id_thread = (long)threadid;
for (int i=0; i<NUM_MESSAGES;i++)
{
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 (int j = 0; j < strlen(aFileName); j++)
{
- if (aFileName[i] == ':')
- aFileName[i] = '_';
+ if (aFileName[j] == ':')
+ aFileName[j] = '_';
}
#endif
aCurrentPos += aFileNameSize;
if (thePath.empty()) return "";
std::string aPath = thePath;
bool isFound = false;
- int pos = aPath.rfind('/');
- if(pos > 0) {
+ size_t pos = aPath.rfind('/');
+ if(pos != std::string::npos) {
aPath = aPath.substr(pos+1, aPath.size());
isFound = true;
}
if(!isFound) {
pos = aPath.rfind('\\');
- if(pos > 0) {
+ if(pos != std::string::npos) {
aPath = aPath.substr(pos+1, aPath.size());
isFound = true;
}
}
if(!isFound) {
pos = aPath.rfind('|');
- if(pos > 0) aPath = aPath.substr(pos+1, aPath.size());
+ if(pos != std::string::npos) aPath = aPath.substr(pos+1, aPath.size());
}
pos = aPath.rfind('.');
- if(pos > 0) aPath = aPath.substr(0, pos); //Remove extension
+ if(pos != std::string::npos) aPath = aPath.substr(0, pos); //Remove extension
return aPath;
}
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) {
+ if(pos != std::string::npos) {
path = thePath.substr(0, pos+1);
}
if(path.empty()) {
pos = thePath.rfind('\\');
- if(pos > 0) path = thePath.substr(0, pos+1);
+ if(pos != std::string::npos) path = thePath.substr(0, pos+1);
}
if(path.empty()) {
pos = thePath.rfind('|');
- if(pos > 0) path = thePath.substr(0, pos+1);
+ if(pos != std::string::npos) path = thePath.substr(0, pos+1);
}
if(path.empty()) {
path = thePath+"/";
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;
}
// Purpose : Retrieve specified flaf from "AttributeFlags" attribute
//=======================================================================
bool SALOMEDS_Tool::GetFlag( const int theFlag,
- SALOMEDS::Study_var theStudy,
+ SALOMEDS::Study_var /*theStudy*/,
SALOMEDS::SObject_var theObj )
{
SALOMEDS::GenericAttribute_var anAttr;
#include "SALOME_NamingService.hxx"
#include "OpUtil.hxx"
-int main (int argc, char * argv[])
+int main ()
{
MESSAGE("It's OK");
return 0;
void TestMPIComponentEngine::SPCoucou(CORBA::Long L)
{
+ (void)L; // unused in release mode
BEGIN_OF("[" << _numproc << "] TestMPIComponentEngine::Coucou()");
MESSAGE("[" << _numproc << "] TestMPIComponentEngine : L = " << L);
END_OF("[" << _numproc << "] TestMPIComponentEngine::Coucou()");
int genExcept()
{
throw SALOME_Exception("a message");
-};
+}
// ============================================================================
/*!
}
-CommException::~CommException() throw ()
+CommException::~CommException() noexcept
{
}
CommException( void );
CommException( const char *texte );
CommException( const CommException &ex );
- ~CommException() throw ();
+ ~CommException() noexcept;
} ;
# endif /* # if ( !defined __Utils_CommException_H__ ) */
* Adds a destruction object to the list of actions to be performed at the end
* of the process
*/
-const int DESTRUCTEUR_GENERIQUE_::Ajout( DESTRUCTEUR_GENERIQUE_ &objet )
+int DESTRUCTEUR_GENERIQUE_::Ajout( DESTRUCTEUR_GENERIQUE_ &objet )
{
// N.B. : l'ordre de creation des SINGLETON etant important
// on n'utilise pas deux fois la meme position pour
//CCRT
assert(Destructeurs) ;
Destructeurs->push_back( &objet ) ;
- return Destructeurs->size() ;
+ return (int)Destructeurs->size() ; //TODO: return <const int> or <size_t>?
}
static std::list<DESTRUCTEUR_GENERIQUE_*> *Destructeurs;
virtual ~DESTRUCTEUR_GENERIQUE_() {}//!< virtual destructor
- static const int Ajout( DESTRUCTEUR_GENERIQUE_ &objet );//!< adds a destruction object to the list of destructions
+ static int Ajout( DESTRUCTEUR_GENERIQUE_ &objet );//!< adds a destruction object to the list of destructions
virtual void operator()( void )=0 ;//!< performs the destruction
};
const in_addr ip_addr=*(struct in_addr*)(pour_adip->h_addr) ;
return duplicate(inet_ntoa(ip_addr));
}
-const char* const get_pwname( void )
+const char* get_pwname( void )
{
struct passwd *papa = getpwuid(getuid());
return papa->pw_name ;
#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
Identity::Identity( const char *name ): _name(duplicate(name)),\
- _hostid(get_uname()),\
_adip(get_adip()),\
+ _hostid(get_uname()),\
+ _pid(getpid()) ,\
_uid(getuid()) ,\
_pwname(get_pwname()) ,\
_dir(getcwd(NULL,4096)),\
- _pid(getpid()) ,\
_start(time(NULL)),\
_cstart(ctime(&_start))
//CCRT
/* Accessors */
/*------------*/
-const char* const Identity::name (void) const
+const char* Identity::name (void) const
{
return _name ;
}
#ifndef WIN32
- const pid_t& Identity::pid(void) const
+const pid_t& Identity::pid(void) const
#else
- const DWORD& Identity::pid(void) const
+const DWORD& Identity::pid(void) const
#endif
{
return _pid ;
}
#ifndef WIN32
- const struct utsname &Identity::hostid(void) const
+const struct utsname &Identity::hostid(void) const
#else
- const char* const Identity::hostid(void) const
+const char* Identity::hostid(void) const
#endif
{
return _hostid ;
}
#ifndef WIN32
- const uid_t& Identity::uid(void) const
+const uid_t& Identity::uid(void) const
#else
- const PSID& Identity::uid(void) const
+const PSID& Identity::uid(void) const
#endif
{
return _uid ;
{
return _start ;
}
-const char* const Identity::rep (void) const
+const char* Identity::rep (void) const
{
return _dir ;
}
-const char* const Identity::pwname (void) const
+const char* Identity::pwname (void) const
{
return _pwname ;
}
-const char* const Identity::adip (void) const
+const char* Identity::adip (void) const
{
return _adip ;
}
const uid_t& uid(void) const;
#else
const DWORD& pid(void) const;
- const char* const hostid(void) const;
+ const char* hostid(void) const;
const PSID& uid(void) const;
#endif
- const char* const name( void ) const;
- const char* const adip(void) const;
- const char* const pwname(void) const;
+ const char* name( void ) const;
+ const char* adip(void) const;
+ const char* pwname(void) const;
const time_t& start(void) const;
- const char* const rep (void) const;
+ const char* rep (void) const;
const char* host_char(void ) const;
const char* start_char(void) const;
}
}
-CORBA::ORB_var &ORB_INIT::operator() ( int argc , char **argv ) throw( CommException )
+CORBA::ORB_var &ORB_INIT::operator() ( int argc , char **argv )
{
try {
if ( CORBA::is_nil( _orb ) )
#ifdef WIN32
#pragma warning(disable:4251) // Warning DLL Interface ...
-#pragma warning(disable:4290) // Warning Exception ...
+//#pragma warning(disable:4290) // Warning Exception ...
#endif
/*!
ORB_INIT( void );
virtual ~ORB_INIT();
void explicit_destroy();
- CORBA::ORB_var & operator() ( int argc , char **argv ) throw( CommException ) ;
+ CORBA::ORB_var & operator() ( int argc , char **argv );
inline CORBA::ORB_var &orb( void );
} ;
}
-SALOME_Exception::~SALOME_Exception() throw ()
+SALOME_Exception::~SALOME_Exception() noexcept
{
if ( _text )
{
-const char* SALOME_Exception::what( void ) const throw ()
+const char* SALOME_Exception::what( void ) const noexcept
{
return _text ;
}
public :
SALOME_Exception( const char *text, const char *fileName=0, const unsigned int lineNumber=0 );
SALOME_Exception( const SALOME_Exception &ex );
- virtual ~SALOME_Exception() throw ();
+ virtual ~SALOME_Exception() noexcept;
UTILS_EXPORT friend std::ostream & operator<<( std::ostream &os , const SALOME_Exception &ex );
- virtual const char *what( void ) const throw () ;
+ virtual const char *what( void ) const noexcept;
} ;