// Recuperation de la reference de l'objet
CORBA::Object_var object = 0 ;
try
- {
- SCRUTE(registryName) ;
- object = naming.Resolve( registryName ) ;
- if(CORBA::is_nil(object)) throw CommException( "unable to find the RegistryService" ) ;
- }
- catch( const ServiceUnreachable &ex )
- {
- MESSAGE( ex.what() )
- exit( EXIT_FAILURE ) ;
- }
- catch( const CORBA::Exception &exx )
- {
- exit( EXIT_FAILURE ) ;
- }
-
+ {
+ SCRUTE(registryName) ;
+ object = naming.Resolve( registryName ) ;
+ if(CORBA::is_nil(object)) throw CommException( "unable to find the RegistryService" ) ;
+ }
+ catch( const ServiceUnreachable& )
+ {
+ MESSAGE( ex.what() )
+ exit( EXIT_FAILURE ) ;
+ }
+ catch( const CORBA::Exception& )
+ {
+ exit( EXIT_FAILURE ) ;
+ }
+
// Specialisation de l'objet generique
-
+
return Registry::Components::_narrow( object ) ;
}
// Try CSF_SaloameResources env.var directory ( or directory list )
cenv = getenv( "CSF_SalomeResources" );
if ( cenv ) {
- dir.sprintf( "%s", cenv );
- if ( !dir.isEmpty() ) {
- QStringList dirList = QStringList::split( SEPARATOR, dir, false ); // skip empty entries
- for ( int i = 0; i < dirList.count(); i++ ) {
- QFileInfo fileInfo( addSlash( dirList[ i ] ) + filename );
- if ( fileInfo.isFile() && fileInfo.exists() )
- return fileInfo.filePath();
+ dir.sprintf( "%s", cenv );
+ if ( !dir.isEmpty() )
+ {
+ QStringList dirList = QStringList::split( SEPARATOR, dir, false ); // skip empty entries
+ for ( int i = 0; i < (int)dirList.count(); i++ )
+ {
+ QFileInfo fileInfo( addSlash( dirList[ i ] ) + filename );
+ if ( fileInfo.isFile() && fileInfo.exists() )
+ return fileInfo.filePath();
}
}
}
return filename;
}
+
QString addSlash( const QString& path )
{
return Qtx::addSlash( path );
-// if (!path.isNull()) {
-//#ifdef WNT
-// QChar slash ('\\');
-//#else
-// QChar slash ('/');
-//#endif
-// if ( path.at(path.length()-1) != slash )
-// return path + slash;
-// }
-// return path;
}
// Module : SALOME
// $Header$
-# ifndef __REGWIDGET_H__
-# define __REGWIDGET_H__
-# include <qapplication.h>
-# include <qmainwindow.h>
+#ifndef __REGWIDGET_H__
+#define __REGWIDGET_H__
+#include <qapplication.h>
+#include <qmainwindow.h>
#include <SALOMEconfig.h>
#include CORBA_CLIENT_HEADER(SALOME_Registry)
class ToolsGUI_HelpWindow;
class ToolsGUI_IntervalWindow;
-class Standard_EXPORT ToolsGUI_InfoWindow : public QMainWindow {
+class Standard_EXPORT ToolsGUI_InfoWindow : public QMainWindow
+{
+ Q_OBJECT
+
public:
ToolsGUI_InfoWindow( QWidget* parent = 0, const char* name = 0);
QTextView* myTextView;
};
-class Standard_EXPORT ToolsGUI_RegWidget : public QMainWindow
+class Standard_EXPORT ToolsGUI_RegWidget : public QMainWindow
{
-
Q_OBJECT
public:
static ToolsGUI_RegWidget* myRegWidgetPtr;
};
-# endif /* # ifndef __REGWIDGET_H__ */
-
-
-
-
-
-
-
-
-
+#endif