Arbre

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
arbre -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_ComparaisonAvant=1;
static const CORBA::UShort CO_ComparaisonEgal=2;
static const CORBA::UShort CO_ComparaisonApres=3;
static const CORBA::UShort CO_ComparaisonNul=4;

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

/****************************************************************/
static CORBA::UShort F(IUpsKrnCaractere *O1, IUpsKrnCaractere *O2)
/****************************************************************/
{
try catch (UpsCrbException *E) catch (CORBA::Exception &e) return(0);
}

/****************************************************************/
static void EcrireArbre(IUpsKrnArbreBinaire *A)
/****************************************************************/
{
IUpsKrnCaractere_var C;

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

/****************************************************************/
static void EcrireArbre2(IUpsKrnArbreBinaire *A)
/****************************************************************/
{
IUpsKrnCaractere_var C;

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

/****************************************************************/
static void EcrireArbre3(IUpsKrnArbreBinaire *A)
/****************************************************************/
{
IUpsKrnCaractere_var C;

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

/****************************************************************/
static void EcrireArbre4(IUpsKrnArbreBinaire *A)
/****************************************************************/
{
IUpsKrnCaractere_var C;

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

/****************************************************************/
static void EcrireArbre5(IUpsKrnArbreBinaire *A)
/****************************************************************/
{
IUpsKrnCaractere_var C;

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

/****************************************************************/
int main(int argc, char *argv[])
/****************************************************************/
{
IUpsKrnArbreBinaire_var A1;
IUpsKrnArbreBinaire_var A2;
IUpsKrnArbreBinaire_var A3;
IUpsKrnCaractere_var Coucou;
IUpsKrnCaractere_var Bonjour;
IUpsKrnCaractere_var Salut;
IUpsKrnCaractere_var Schluss;
CORBA::Long I;
IUpsKrnCaractere_var LibelleA;
IUpsKrnCaractere_var LibelleB;
IUpsKrnCaractere_var LibelleC;
IUpsKrnCaractere_var LibelleD;
IUpsKrnCaractere_var LibelleE;
IUpsKrnCaractere_var LibelleF;

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)
A1=NULL;
A2=NULL;
A3=NULL;
Coucou=NULL;
Bonjour=NULL;
Salut=NULL;
Schluss=NULL;
LibelleA=NULL;
LibelleB=NULL;
LibelleC=NULL;
LibelleD=NULL;
LibelleE=NULL;
LibelleF=NULL;
CORBA::release(pIUpsKrn);
pIUpsKrn=NULL;
delete pBoa;
delete pOrb;
return(0);
}