rllib  1
Public Member Functions | Public Attributes | List of all members
rlCorbaClient< T, Tvar > Class Template Reference

#include <rlcorba.h>

Public Member Functions

 rlCorbaClient (int ac, char **av, const char *iname)
 
 ~rlCorbaClient ()
 

Public Attributes

char * idlname
 
char * adr
 
CORBA::ORB_var orb
 
CORBA::Object_var obj
 
Tvar client
 

Detailed Description

template<class T, class Tvar>
class rlCorbaClient< T, Tvar >

Definition at line 30 of file rlcorba.h.

Constructor & Destructor Documentation

◆ rlCorbaClient()

template<class T , class Tvar >
rlCorbaClient< T, Tvar >::rlCorbaClient ( int  ac,
char **  av,
const char *  iname 
)
inline

Definition at line 34 of file rlcorba.h.

35  {
36  idlname = adr = NULL;
37  if(iname == NULL) return;
38  idlname = new char[strlen(iname)+1];
39  strcpy(idlname,iname);
40  for(int i=0; i<ac; i++)
41  {
42  if(strncmp(av[i],"inet:",5) == 0)
43  {
44  if(adr != NULL) delete adr;
45  adr = new char[strlen(av[i])+1];
46  strcpy(adr,av[i]);
47  }
48  }
49  orb = CORBA::ORB_init(ac,av);
50  obj = orb->bind(idlname, adr);
51  if(CORBA::is_nil(obj))
52  {
53  cerr << "cannot bind to " << adr << endl;
54  delete adr;
55  adr = NULL;
56  return;
57  }
58  client = T::_narrow(obj);
59  if(CORBA::is_nil(client))
60  {
61  cerr << "Argument is not a " << idlname << " reference" << endl;
62  }
63  }
Tvar client
Definition: rlcorba.h:74
char * adr
Definition: rlcorba.h:71
CORBA::ORB_var orb
Definition: rlcorba.h:72
char * idlname
Definition: rlcorba.h:70
CORBA::Object_var obj
Definition: rlcorba.h:73

◆ ~rlCorbaClient()

template<class T , class Tvar >
rlCorbaClient< T, Tvar >::~rlCorbaClient ( )
inline

Definition at line 64 of file rlcorba.h.

65  {
66  if(idlname != NULL) delete idlname;
67  if(adr != NULL) delete adr;
68  }
char * adr
Definition: rlcorba.h:71
char * idlname
Definition: rlcorba.h:70

Member Data Documentation

◆ adr

template<class T , class Tvar >
char* rlCorbaClient< T, Tvar >::adr

Definition at line 71 of file rlcorba.h.

◆ client

template<class T , class Tvar >
Tvar rlCorbaClient< T, Tvar >::client

Definition at line 74 of file rlcorba.h.

◆ idlname

template<class T , class Tvar >
char* rlCorbaClient< T, Tvar >::idlname

Definition at line 70 of file rlcorba.h.

◆ obj

template<class T , class Tvar >
CORBA::Object_var rlCorbaClient< T, Tvar >::obj

Definition at line 73 of file rlcorba.h.

◆ orb

template<class T , class Tvar >
CORBA::ORB_var rlCorbaClient< T, Tvar >::orb

Definition at line 72 of file rlcorba.h.


The documentation for this class was generated from the following file: