Liste

Commande de compilation

Commande d'enregistrement des objets Corba

${MICO_HOME}/bin/ird -ORBIIOPAddr inet:localhost:8888 --db ${MICO_HOME}/db/db-ird
${MICO_HOME}/bin/micod -ORBIIOPAddr inet:localhost:9999 --db ${MICO_HOME}/db/db-micod.txt --forward
upsvtm Corba=Charger

Commande d'exécution

${MICO_HOME}/bin/ird -ORBIIOPAddr inet:localhost:8888 --db ${MICO_HOME}/db/db-ird
${MICO_HOME}/bin/micod -ORBIIOPAddr inet:localhost:9999 --db ${MICO_HOME}/db/db-micod.txt --forward
liste -ORBIfaceRepoAddr inet:localhost:8888 -ORBImplRepoAddr inet:localhost:9999 -ORBBindAddr local:

Fichier source

#include <CORBA.h>
#include <mico/string.h>
#include <upskrn.hh>
#include <upscrbexception.h>

using namespace std;

static const CORBA::UShort CO_ClonageObjetSeul=1;
static const CORBA::UShort CO_ClonageObjetsDirects=2;
static const CORBA::UShort CO_ClonageRecursif=3;

static CORBA::ORB *pOrb;
static CORBA::BOA *pBoa;
static CORBA::Object *pObjet;
static IUpsKrn *pIUpsKrn;

/****************************************************************/
static void EcrireListe(IUpsKrnCaractere *M, IUpsKrnListe *L)
/****************************************************************/
{
IUpsKrnCaractere_var C;

try catch (UpsCrbException *E) catch (CORBA::Exception &e) }

/****************************************************************/
static void EcrireListeInverse(IUpsKrnCaractere *M, IUpsKrnListe *L)
/****************************************************************/
{
IUpsKrnCaractere_var C;
CORBA::Long I;

try catch (UpsCrbException *E) catch (CORBA::Exception &e) }

/****************************************************************/
int main(int argc, char *argv[])
/****************************************************************/
{
IUpsKrnListe_var L;
IUpsKrnListe_var L2;
IUpsKrnCaractere_var A;
IUpsKrnCaractere_var B;
IUpsKrnCaractere_var C;
IUpsKrnCaractere_var D;
IUpsKrnCaractere_var E;
IUpsKrnCaractere_var F;
IUpsKrnCaractere_var G;
IUpsKrnCaractere_var H;

pOrb=CORBA::ORB_init(argc,argv, "mico-local-orb");
if (!pOrb) pBoa=pOrb->BOA_init(argc, argv, "mico-local-boa");
if (!pBoa) pObjet=pOrb->bind("IDL:IUpsKrn:1.0");
if (!pObjet) pIUpsKrn=IUpsKrn::_narrow(pObjet);
if (!pIUpsKrn)
try catch (UpsCrbException *E) catch (CORBA::Exception &e)
L=NULL;
L2=NULL;
A=NULL;
B=NULL;
C=NULL;
D=NULL;
E=NULL;
F=NULL;
G=NULL;
H=NULL;
CORBA::release(pIUpsKrn);
pIUpsKrn=NULL;
delete pBoa;
delete pOrb;
return(0);
}