8.6.   297

//  8.3

1 #include <iostream>

2 ftinclude <?stream>

3 ftinclude "permutation_impl.h"

4 ftdefine MICO_CONF_IMR

5 ftinclude <CORBA-SMALL.h>

6 ftinclude <iostream.h>

7 #include <fstream.h>

8 ftinclude <unistd.h>

9 #include <mico/CosNaming.h>

10

11

12 int main(int argc, char *argv[])

13 {

14 CORBA::ORB_var Orb = CORBA::ORB_init

(argc,argv,"mico-local-orb") ;

15 CORBA::0bject_var PoaObj =

Orb->resolve_initial_references("RootPOA") ;

16 PortableServer::POA_var Poa =

PortableServer::POA::_narrow(PoaObj) ;

17 PortableServer::POAManager_var Mgr =

Poa->the_POAManager() ;

18 inversion Server;

19 PortableServer:;0bjectld_var Oid =

Poa->activate_object(&Server) ;

20 Mgr->activate();

21 perinutation_ptr ObjectReference = Server._this();

22 CORBA::0bject_var NameService =

Orb->resolve_initial_references ("NameService");

23 CosNaming::NamingContext_var NamingContext =

CosMaming::NamingContext::_narrow (NameService) ;

24 CosNaming::Name name;

25 name.length (1) ;

26 name[0].id = CORBA::string_dup ("Inflection");

27 name[0].kind = CORBA::string_dup ("") ;

28 NamingContext->bind (name, ObjectReference) ;

29 Orb->run();

30 Poa->destroy(TRUE,TRUE) ;

31 return(0) ;

32 }

33

34

1,8.1.|;&@ !.          :'   -:'"^^'^'..^^Afis&i

  (semantic network) -        
 .       -
    .  . 8.9  
 ,        
      .