1 // SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes.
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : SuperVisionBase_CheckOfUndefined.cxx
32 #include "Utils_ORB_INIT.hxx"
33 #include "Utils_SINGLETON.hxx"
35 #include "SALOME_NamingService.hxx"
36 #include "SALOME_LifeCycleCORBA.hxx"
41 int main(int argc, char **argv) {
43 Engines::Component_var objComponent ;
44 CORBA::Any * anAny = new CORBA::Any() ;
45 CORBA::Object_ptr obj ;
48 ORB_INIT &init = *SINGLETON_<ORB_INIT>::Instance() ;
49 ASSERT(SINGLETON_<ORB_INIT>::IsAlreadyExisting()) ;
50 CORBA::ORB_var &orb = init( argc , argv ) ;
52 SALOME_NamingService * NamingService = new SALOME_NamingService( orb ) ;
54 SALOME_LifeCycleCORBA LCC( NamingService ) ;
55 objComponent = LCC.FindOrLoad_Component( "FactoryServer" , "AddComponent" );
56 if ( CORBA::is_nil( objComponent ) ) {
57 //cout << " LCC.FindOrLoad_Component( FactoryServer , AddComponent )" << endl;
61 *anAny <<= objComponent ;
62 IOR = orb->object_to_string( objComponent );
63 //cout << "objComponent " << objComponent << " IOR " << IOR << " nil " << CORBA::is_nil( objComponent )
67 IOR = orb->object_to_string( obj );
68 //cout << "obj " << obj << " IOR " << IOR << " nil " << CORBA::is_nil( obj )