CARMA C++
Client.h
1 #ifndef CARMA_CORBA_CLIENT_H
2 #define CARMA_CORBA_CLIENT_H
3 
4 #include <memory>
5 #include <string>
6 
7 namespace CORBA {
8 
9 class ORB;
10 typedef ORB * ORB_ptr;
11 
12 } // namespace CORBA
13 
14 namespace carma {
15 namespace corba {
16 
17 class Server;
18 
26 class Client {
27 public:
28 
36  Client( int argc, char * argv[], int rrtt = 60 );
37 
44  ~Client( );
45 
54  template< typename T >
55  typename T::_var_type
56  resolveName( const ::std::string & name, bool initialRef = false );
57 
64  template< typename N >
65  bool sendNotification( const ::std::string & channelName,
66  const ::std::string & proxyName,
67  const N & notification );
68 
75  static void applyTimeoutPolicies( CORBA::ORB_ptr orb, int rrtt = 60 );
76 
77 private:
78 
79  friend class Server;
80  Client( CORBA::ORB_ptr orb, int rrtt );
81 
82  // No copy
83  Client( const Client & );
84  Client & operator=( const Client & );
85 
86  // Aggressively hide everything
87  struct Private;
88  mutable ::std::auto_ptr< Private > private_;
89 
90  class PrivateInline; // Visible to Inline
91  mutable ::std::auto_ptr< PrivateInline > privateInline_;
92 
93  class Naming;
94  mutable ::std::auto_ptr< Naming > naming_;
95 
96  class Notify;
97  mutable ::std::auto_ptr< Notify > notify_;
98 
99 }; // class Client
100 
101 }} // namespace carma::corba
102 
103 // Hide the templatized portion of the implementation
104 #include "carma/corba/Client.inl"
105 
106 #endif
~Client()
Destructor Note: doesn&#39;t cleanup remote resources allocated with this class.
T::_var_type resolveName(const ::std::string &name, bool initialRef=false)
Resolve specified name to a CORBA object of the templatized output type.
bool sendNotification(const ::std::string &channelName, const ::std::string &proxyName, const N &notification)
Send a notification of type N to specified notification server channel.
Class to encapsulate CORBA client functionality in CARMA.
Definition: Client.h:26
Client(int argc, char *argv[], int rrtt=60)
Initialize CORBA client runtime.
static void applyTimeoutPolicies(CORBA::ORB_ptr orb, int rrtt=60)
Apply client timeout policies.
Class for creating, managing and serving requests to CORBA servants.
Definition: Server.h:22