X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FTestContainer%2FSALOME_TestComponent_i.cxx;h=3382782d685f266a565b2411638511b7adbd3e68;hb=HEAD;hp=413fd2fa04bfecbc49d694c2d70ca6c6cdd66272;hpb=ca921d4a4fa66c9dfe515a6f31bee1817601dfb9;p=modules%2Fkernel.git diff --git a/src/TestContainer/SALOME_TestComponent_i.cxx b/src/TestContainer/SALOME_TestComponent_i.cxx index 413fd2fa0..3382782d6 100644 --- a/src/TestContainer/SALOME_TestComponent_i.cxx +++ b/src/TestContainer/SALOME_TestComponent_i.cxx @@ -1,49 +1,51 @@ -// SALOME TestContainer : test of container creation and its life cycle +// Copyright (C) 2007-2024 CEA, EDF, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// 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. // -// Copyright (C) 2003 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. -// -// 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org +// 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 TestContainer : test of container creation and its life cycle // File : SALOME_TestComponent_i.cxx // Author : Paul RASCLE, EDF - MARC TAJCHMAN, CEA // Module : SALOME // $Header$ +// #include "utilities.h" #include "SALOME_TestComponent_i.hxx" #include #include #include -using namespace std; Engines_TestComponent_i::Engines_TestComponent_i(CORBA::ORB_ptr orb, - PortableServer::POA_ptr poa, - PortableServer::ObjectId * contId, - const char *instanceName, - const char *interfaceName) : + PortableServer::POA_ptr poa, + PortableServer::ObjectId * contId, + const char *instanceName, + const char *interfaceName) : Engines_Component_i(orb, poa, contId, instanceName, interfaceName) { - MESSAGE("activate object") + MESSAGE("activate object"); _thisObj = this ; _id = _poa->activate_object(_thisObj); - //SCRUTE(this) + //does not work with 4.0.6 (too bad) + //SCRUTE(_pd_refCount); + //SCRUTE(_refcount_value()); } Engines_TestComponent_i::Engines_TestComponent_i() @@ -52,38 +54,42 @@ Engines_TestComponent_i::Engines_TestComponent_i() Engines_TestComponent_i::~Engines_TestComponent_i() { + MESSAGE("~Engines_TestComponent_i()"); } char* Engines_TestComponent_i::Coucou(CORBA::Long L) { char s[100]; sprintf(s, "TestComponent_i : L = %ld", (long) L); + //does not work with 4.0.6 (too bad) + //SCRUTE(_pd_refCount); + //SCRUTE(_refcount_value()); return CORBA::string_dup(s); } void Engines_TestComponent_i::Setenv() { - bool overwrite = true; - map::iterator it; + // bool overwrite = true; + std::map::iterator it; MESSAGE("set environment associated with keys in map _fieldsDict"); for (it = _fieldsDict.begin(); it != _fieldsDict.end(); it++) { std::string cle((*it).first); if ((*it).second.type()->kind() == CORBA::tk_string) - { - const char* value; - (*it).second >>= value; - //CCRT porting : setenv not defined in stdlib.h - std::string s(cle); - s+='='; - s+=value; - //char* cast because 1st arg of linux putenv function is not a const char* !!! - int ret=putenv((char *)s.c_str()); - //End of CCRT porting - //int ret = setenv(cle.c_str(), value, overwrite); - MESSAGE("--- setenv: "<>= value; + //CCRT porting : setenv not defined in stdlib.h + std::string s(cle); + s+='='; + s+=value; + //char* cast because 1st arg of linux putenv function is not a const char* !!! + putenv((char *)s.c_str()); + //End of CCRT porting + //int ret = setenv(cle.c_str(), value, overwrite); + MESSAGE("--- setenv: "<