Salome HOME
Fix for bug IPAL9558 : Maintainance Mandrake porting: black rectangle in table view.
[modules/superv.git] / src / GraphBase / SuperVisionBase_CheckOfUndefined.cxx
index 5050f6850ef1a47e9a963df5097b9930d7805138..e41144bf8ea4a66125c49e86d19c887a2fa9539e 100644 (file)
@@ -1,13 +1,73 @@
+//  SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes.
+//
+//  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 
+//
+//
+//
+//  File   : SuperVisionBase_CheckOfUndefined.cxx
+//  Module : SUPERV
+
 using namespace std;
 #include <iostream>
 #include <fstream>
 #include <unistd.h>
 
-#include "DataFlowBase_Base.hxx"
-#include "DataFlowBase_Graph.hxx"
+#include "Utils_ORB_INIT.hxx"
+#include "Utils_SINGLETON.hxx"
+
+#include "SALOME_NamingService.hxx"
+#include "SALOME_LifeCycleCORBA.hxx"
+
+int _ArgC ;
+char ** _ArgV ;
 
 int main(int argc, char **argv) {
-//  debugFile("TestSuperVision.log");
+
+  Engines::Component_var objComponent ;
+  CORBA::Any * anAny = new CORBA::Any() ;
+  CORBA::Object_ptr obj ;
+  char * IOR ;
+
+  ORB_INIT &init = *SINGLETON_<ORB_INIT>::Instance() ;
+  ASSERT(SINGLETON_<ORB_INIT>::IsAlreadyExisting()) ;
+  CORBA::ORB_var &orb = init( argc , argv ) ;
+
+  SALOME_NamingService * NamingService = new SALOME_NamingService( orb ) ;
+
+  SALOME_LifeCycleCORBA LCC( NamingService ) ;
+  objComponent = LCC.FindOrLoad_Component( "FactoryServer" , "AddComponent" );
+  if ( CORBA::is_nil( objComponent ) ) {
+    //cout << " LCC.FindOrLoad_Component( FactoryServer , AddComponent )" << endl;
+    return 0 ;
+  }
+
+  *anAny <<= objComponent ;
+  IOR = orb->object_to_string( objComponent );
+  //cout << "objComponent " << objComponent << " IOR " << IOR << " nil " << CORBA::is_nil( objComponent )
+  //       << endl ;
+
+  *anAny >>= obj ;
+  IOR = orb->object_to_string( obj );
+  //cout << "obj " << obj << " IOR " << IOR << " nil " << CORBA::is_nil( obj )
+  //       << endl ;
+
   return 0;
 }