// Module : SALOME
//
#include "Basics_DirUtils.hxx"
-
+#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
return p;
}
+ Localizer::Localizer()
+ {
+ myCurLocale = setlocale(LC_NUMERIC, 0);
+ setlocale(LC_NUMERIC, "C");
+ }
+
+ Localizer::~Localizer()
+ {
+ setlocale(LC_NUMERIC, myCurLocale.c_str());
+ }
}
namespace Kernel_Utils
{
BASICS_EXPORT std::string GetHostname();
+
+ class BASICS_EXPORT Localizer
+ {
+ public:
+ Localizer();
+ ~Localizer();
+ private:
+ std::string myCurLocale;
+ };
}
#endif //_Basics_UTILS_HXX_
print "============= Test Supervisor ============================="
print
import salome_version
-versions = salome_version.getVersions()
-if versions[0] < 5:
+version = salome_version.getVersions("GUI")[0]
+if not version: version = salome_version.getVersions("KERNEL")[0]
+if version < 5:
# SUPERV module is avaiable
comp = catalog.GetComponent("SUPERV")
if comp is None:
#include "SALOME_LifeCycleCORBA.hxx"
#include "utilities.h"
#include "Basics_Utils.hxx"
+#include <cstdio>
using namespace std;
{
// initialize the ORB
CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
- // LocalTraceCollector *myThreadTrace = SALOMETraceCollector::instance(orb);
try
{
CosNaming::NamingContext_var _rootContext, catalogContext;
Utils_Timer timer;
timer.Start();
timer.Stop();
- MESSAGE("SALOME_Registry_Server.cxx - orb->run()");
timer.ShowAbsolute();
#endif
orb->run();
- std::cerr << "server returned from orb->run()" << std::endl;
orb->destroy();
// mgr->deactivate(true,true);
}
END_OF( argv[0] );
- // delete myThreadTrace;
return 0;
}
//
#include "SALOME_ModuleCatalog_impl.hxx"
#include "SALOME_ModuleCatalog_Acomponent_impl.hxx"
+#include <libxml/parser.h>
#include <fstream>
#include <map>
#include "utilities.h"
SALOME_ModuleCatalogImpl::SALOME_ModuleCatalogImpl(int argc, char** argv, CORBA::ORB_ptr orb) : _orb(orb)
{
if(MYDEBUG) MESSAGE("Catalog creation");
+ /* Init libxml */
+ xmlInitParser();
// Conversion rules for component types
ComponentTypeConvert[GEOM]
MESSAGE("ModuleCatalog: could not parse file "<<file);
xmlFreeDoc(aDoc);
- xmlCleanupParser();
fclose(aFile);
}
else
#include <iostream>
#include <cstring>
#include <string>
+#include <cstdio>
using namespace std;
else
{
// Adding a machine
- _resources_list[_resource.HostName] = _resource;
- if(_resource.HostName == "localhost")
- {
- _resource.HostName = Kernel_Utils::GetHostname();
- _resource.DataForSort._hostName = Kernel_Utils::GetHostname();
- _resources_list[Kernel_Utils::GetHostname()] = _resource;
- }
+ if(_resource.HostName == "localhost")
+ {
+ _resource.HostName = Kernel_Utils::GetHostname();
+ _resource.DataForSort._hostName = Kernel_Utils::GetHostname();
+ _resources_list[Kernel_Utils::GetHostname()] = _resource;
+ }
+ else
+ _resources_list[_resource.HostName] = _resource;
}
}
else
xmlNodePtr aCurSubNode = machine_descr->xmlChildrenNode;
while(aCurSubNode != NULL)
{
+ // Process components
if ( !xmlStrcmp(aCurSubNode->name, (const xmlChar*)test_components) )
{
//If a component is given, it is in a module with the same name
}
}
// Process modules
- if ( !xmlStrcmp(aCurSubNode->name, (const xmlChar*)test_modules) )
+ else if ( !xmlStrcmp(aCurSubNode->name, (const xmlChar*)test_modules) )
{
+ // If a module is given, we create an entry in componentsList and modulesList
+ // with the same name (module == component)
if (xmlHasProp(aCurSubNode, (const xmlChar*)test_module_name))
{
- xmlChar* module_name = xmlGetProp(aCurSubNode, (const xmlChar*)test_module_name);
- std::string aModuleName = (const char*)module_name;
- resource.ModulesList.push_back(aModuleName);
- xmlFree(module_name);
+ xmlChar* component_name = xmlGetProp(aCurSubNode, (const xmlChar*)test_module_name);
+ std::string aComponentName = (const char*)component_name;
+ _resource.ComponentsList.push_back(aComponentName);
+ _resource.ModulesList.push_back(aComponentName);
+ xmlFree(component_name);
}
}
aCurSubNode = aCurSubNode->next;
## @package SALOME_DriverPy
# \brief python implementation of SALOMEDS::Driver interface
#
-#
+#
import SALOMEDS__POA
## Python implementation of generic SALOMEDS::Driver.
to provide persistence mechanism.
"""
def __init__ (self, componentDataType):
- print "SALOME_DriverPy.__init__: ",componentDataType
self._ComponentDataType = componentDataType
def IORToLocalPersistentID(self, theSObject, IORString, isMultiFile, isASCII):
using namespace std;
//to disable automatic genericobj management comment the following line
-#define WITHGENERICOBJ
+//#define WITHGENERICOBJ
#ifdef WITHGENERICOBJ
#include "SALOME_GenericObj_i.hh"
vector<string> lst = ip.getValues(v[i]);
dump += "# fill list "+v[i]+"\n";
for(int j = 0; j < lst.size(); j++) {
- printf("### %s \nFind : %i\n",lst[j].c_str(), lst[j].find('\"'));
if (lst[j].find('\"') == -1)
dump += "ipar.append(\""+v[i]+"\", \""+lst[j]+"\")\n";
else
#include "SALOMEDSImpl_GenericVariable.hxx"
#include <iostream>
#include <cstdlib>
+#include <cstdio>
using namespace std;
using namespace std;
+#include <Basics_Utils.hxx>
+
#include "DF_Application.hxx"
#include "DF_ChildIterator.hxx"
if(myNoteBookVars.empty())
return dump;
+
+ Kernel_Utils::Localizer loc;
dump += "####################################################\n";
dump += "## Begin of NoteBook variables section ##\n";
#include <limits.h>
#include <cassert>
#include <string.h>
+#include <cstdio>
#ifndef WIN32
#include <dlfcn.h>