TwiceAsNice  2019-02-18
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Nice::Client Class Reference


Small client side wrapper class for the ICE middleware More...

#include <Client.h>

Inheritance diagram for Nice::Client:
Inheritance graph
Collaboration diagram for Nice::Client:
Collaboration graph

Public Member Functions

 Client ()
 Default constructor. More...
 
 Client (int &_argc, char *_argv[])
 Standard constructor. More...
 
 Client (const Ice::CommunicatorPtr &_communicator)
 Constructor for use with an existing Communicator. More...
 
 Client (const Ice::CommunicatorPtr &_communicator, const std::string &_con)
 
virtual ~Client ()
 Destructor unbelievable :) More...
 
const Ice::CommunicatorPtr & communicator ()
 Extended helper class,. More...
 

Protected Member Functions

void init (int &_argc, char *_argv[], Ice::InitializationData &_initData)
 

Protected Attributes

int status
 
Ice::CommunicatorPtr m_communicator
 
Ice::LoggerPtr m_logger
 
Nice::Mutex m_mutex
 

Detailed Description


Small client side wrapper class for the ICE middleware

Author
Florian Briegel
Version
08.02.22
Date
2008-02-22 15:00:11 Now for a small example:
    Nice::Client client (argc, argv);

    try
    {
        HelloPrx printer = client.resolveName < HelloPrx > ("Hello1", 4711);
        if (!printer)
            throw "Invalid proxy";

        printer->printString ("Hello World!");
    }

    catch (const Ice::Exception & ex)
    {
        E_LOG (ex);
        status = 1;
    }

    catch (const char *msg)
    {
        E_LOG (msg);
        status = 1;
    }
Better style to create the client is using an ICE smart pointer:
    Nice::ClientPtr client = new Client(argc, argv);
Todo:

Constructor & Destructor Documentation

◆ Client() [1/4]

Nice::Client::Client ( )

Default constructor.

◆ Client() [2/4]

Client::Client ( int &  _argc,
char *  _argv[] 
)

Standard constructor.

◆ Client() [3/4]

Client::Client ( const Ice::CommunicatorPtr &  _communicator)

Constructor for use with an existing Communicator.

◆ Client() [4/4]

Nice::Client::Client ( const Ice::CommunicatorPtr &  _communicator,
const std::string &  _con 
)

◆ ~Client()

virtual Nice::Client::~Client ( )
inlinevirtual

Destructor unbelievable :)

Member Function Documentation

◆ communicator()

const Ice::CommunicatorPtr& Nice::Client::communicator ( )
inline

Extended helper class,.

Parameters
nameOBJECTSTRING
hostHostname of the object
portPortname of the adapter the object is bound to
protoOptional parameter protocol lipclTCP, lipclSSH, lipclUDPExtended helper class,
namelipclOBJECTSTRING
portPortname of the adapter the object is bound to
protoOptional parameter protocol TCP, lipclSSH, UDPReturn the communicator that is used.

◆ init()

void Client::init ( int &  _argc,
char *  _argv[],
Ice::InitializationData &  _initData 
)
protected

Member Data Documentation

◆ m_communicator

Ice::CommunicatorPtr Nice::Client::m_communicator
protected

◆ m_logger

Ice::LoggerPtr Nice::Client::m_logger
protected

◆ m_mutex

Nice::Mutex Nice::Client::m_mutex
protected

◆ status

int Nice::Client::status
protected

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