Tableau

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
tableau -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 EcrireTableau(IUpsKrnCaractere *M, IUpsKrnTableau *T)
/****************************************************************/
{
CORBA::Long I;

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

/****************************************************************/
static void EcrireEntier(IUpsKrnCaractere *M, IUpsKrnEntier *E)
/****************************************************************/
{
try catch (UpsCrbException *E) catch (CORBA::Exception &e) }
/****************************************************************/
static IUpsKrnEntier *IncrementerElementTableau(IUpsKrnTableau *T, IUpsKrnEntier *Index, CORBA::Boolean Prefixe)
/****************************************************************/
{
IUpsKrnEntier_var E;

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

/****************************************************************/
static IUpsKrnEntier *DecrementerElementTableau(IUpsKrnTableau *T, IUpsKrnEntier *Index, CORBA::Boolean Prefixe)
/****************************************************************/
{
IUpsKrnEntier_var E;

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

/****************************************************************/
static void AdditionnerAffecterElementTableau(IUpsKrnTableau *T, IUpsKrnEntier *Index, IUpsKrnEntier *E)
/****************************************************************/
{
try catch (UpsCrbException *E) catch (CORBA::Exception &e) }

/****************************************************************/
int main(int argc, char *argv[])
/****************************************************************/
{
IUpsKrnTableau_var T;
IUpsKrnTableau_var T2;
IUpsKrnTableau_var T3;
IUpsKrnCaractere_var C;
IUpsKrnTableau_var T4;

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)
T=NULL;
T2=NULL;
T3=NULL;
C=NULL;
T4=NULL;
delete pBoa;
delete pOrb;
return(0);
}