-using namespace std;
-//=============================================================================
-// File : RegistryService.cxx
-// Created : Mon Nov 5 17:26:23 CET 2001
-// Author : Pascale NOYRET - Antoine YESSAYAN, EDF
-// Project : SALOME
-// Copyright : EDF 2001
-// $Header$
-//=============================================================================
+// SALOME Registry : Registry server implementation
+//
+// 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+//
+//
+// File : RegistryService.cxx
+// Author : Pascale NOYRET - Antoine YESSAYAN, EDF
+// Module : SALOME
+// $Header$
-using namespace std;
# include "RegistryService.hxx"
# include "OpUtil.hxx"
# include "utilities.h"
# include <time.h>
}
+#ifndef WNT
#include <unistd.h>
+#else
+#include <process.h>
+#endif
+using namespace std;
/* ------------------------------*/
/* Constructeurs et Destructeurs */
RegistryService::RegistryService( void ) : _SessionName(0), _Compteur(0)
{
MESSAGE("Passage dans RegistryService::RegistryService()") ;
-
+ _orb = CORBA::ORB::_nil();
}
_Compteur = -1 ;
if ( _SessionName )
{
+#ifndef WNT
delete [] _SessionName ;
+#else
+ delete [] (char*)_SessionName ;
+#endif
_SessionName = 0 ;
}
END_OF("RegistryService::~RegistryService()") ;
return (CORBA::ULong)_Compteur ;
}
-
+#ifndef WNT
void RegistryService::remove( const CORBA::ULong id)
+#else
+void RegistryService::remove( CORBA::ULong id)
+#endif
{
BEGIN_OF("RegistryService::remove") ;
SCRUTE(id) ;
}
-
+#ifndef WNT
void RegistryService::hello( const CORBA::ULong id )
+#else
+void RegistryService::hello( CORBA::ULong id )
+#endif
{
BEGIN_OF("RegistryService::hello") ;
SCRUTE(id) ;
}
void RegistryService::ping()
{
+#ifndef WNT
MESSAGE(" RegistryService::ping() pid "<< getpid());
+#else
+ MESSAGE(" RegistryService::ping() pid "<< _getpid());
+#endif
+}
+
+CORBA::Long RegistryService::getPID()
+{
+ return (CORBA::Long)getpid();
}