-// Copyright (C) 2021 CEA/DEN, EDF R&D
+// Copyright (C) 2021-2024 CEA, EDF
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
std::vector< std::string > repr();
static std::string GetLogContainersFile();
static void FlushLogContainersFile();
+ void Destroy_Name(const char* Path);
+ void Destroy_FullDirectory(const char* Path);
%extend {
static void SetLogContainersFileInternal(const std::string& logFileName)
{
CORBA::Object_var obj = orb->string_to_object(ior);
self->Register(obj,Path);
}
+ std::string _Resolve_DirInternal(const char *Path)
+ {
+ CORBA::ORB_ptr orb = KERNEL::getORB();
+ CORBA::Object_var ret = self->Resolve(Path);
+ CORBA::String_var ior = orb->object_to_string(ret);
+ return std::string(ior.in());
+ }
static std::string IOROfNS()
{
CORBA::ORB_ptr orb = KERNEL::getORB();
import CORBA
orb=CORBA.ORB_init([''])
self._RegisterInternal( orb.object_to_string(obj) , Path)
+def NamingService_Resolve_Dir(self,Path):
+ ret = self._Resolve_DirInternal( Path )
+ import CORBA
+ orb=CORBA.ORB_init([''])
+ return orb.string_to_object(ret)
NamingService.Resolve = NamingService_Resolve
NamingService.Register = NamingService_Register
+NamingService.Resolve_Dir = NamingService_Resolve_Dir
def NamingService_SetLogContainersFile(cls,logFileName = None):
if logFileName is None:
import tempfile
orb=CORBA.ORB_init([''])
return orb.string_to_object(ret)
NamingService.RefOfNS = classmethod(NamingService_RefOfNS)
+def NamingService_DumpIORInFile(cls,iorFileName):
+ with open( iorFileName, "w" ) as f:
+ f.write( cls.IOROfNS() )
+NamingService.DumpIORInFile = classmethod(NamingService_DumpIORInFile)
+def NamingService_LoadIORInFile(cls,iorFileName):
+ import Engines
+ import CORBA
+ orb=CORBA.ORB_init([''])
+ with open( iorFileName ) as f:
+ ior = f.read()
+ ref = orb.string_to_object(ior)
+ return ref
+NamingService.LoadIORInFile = classmethod( NamingService_LoadIORInFile )
def NamingService_KillContainersInFile(cls,logFileName):
import Engines
import CORBA