Ice 3.7 C++98 API Reference
Loading...
Searching...
No Matches
Ice::CommunicatorHolder Class Reference

A helper class that uses Resource Acquisition Is Initialization (RAII) to initialize and hold a communicator instance, and automatically destroy the communicator when the holder goes out of scope. More...

#include <Ice/Ice.h>

Public Member Functions

const CommunicatorPtrcommunicator () const
 Obtains the communicator instance.
 CommunicatorHolder ()
 The holder's initial state is empty.
 CommunicatorHolder (const char *configFile, int version=30711)
 Initializes a new communicator.
 CommunicatorHolder (const CommunicatorPtr &communicator)
 Adopts the given communicator.
 CommunicatorHolder (const InitializationData &initData, int version=30711)
 Initializes a new communicator.
 CommunicatorHolder (int &argc, char *argv[], const char *configFile, int version=30711)
 Initializes a new communicator.
 CommunicatorHolder (int &argc, char *argv[], const InitializationData &initData=InitializationData(), int version=30711)
 Initializes a new communicator.
 CommunicatorHolder (int &argc, const char *argv[], const char *configFile, int version=30711)
 Initializes a new communicator.
 CommunicatorHolder (int &argc, const char *argv[], const InitializationData &initData=InitializationData(), int version=30711)
 Initializes a new communicator.
 CommunicatorHolder (StringSeq &seq, const char *configFile, int version=30711)
 Initializes a new communicator.
 CommunicatorHolder (StringSeq &seq, const InitializationData &initData=InitializationData(), int version=30711)
 Initializes a new communicator.
 operator bool () const
 Determines whether the holder contains an instance.
const CommunicatorPtroperator-> () const
 Obtains the communicator instance.
CommunicatorHolderoperator= (const CommunicatorPtr &communicator)
 Adopts the given communicator.
CommunicatorPtr release ()
 Obtains the communicator instance and clears the reference held by the holder.
 ~CommunicatorHolder ()

Detailed Description

A helper class that uses Resource Acquisition Is Initialization (RAII) to initialize and hold a communicator instance, and automatically destroy the communicator when the holder goes out of scope.

Constructor & Destructor Documentation

◆ CommunicatorHolder() [1/10]

Ice::CommunicatorHolder::CommunicatorHolder ( )

The holder's initial state is empty.

◆ CommunicatorHolder() [2/10]

Ice::CommunicatorHolder::CommunicatorHolder ( int & argc,
const char * argv[],
const InitializationData & initData = InitializationData(),
int version = 30711 )

Initializes a new communicator.

Parameters
argcThe number of arguments in argv. Upon return, this argument is updated to reflect the arguments still remaining in argv.
argvCommand-line arguments, possibly containing options to set properties. If the arguments include a –Ice.Config option, the corresponding configuration files are parsed. If the same property is set in a configuration file and in the arguments, the arguments take precedence. Recognized options are removed from this vector upon return.
initDataConfiguration data for the new Communicator.
versionIndicates the Ice version with which the application is compatible. If not specified, the version of the Ice installation is used.

◆ CommunicatorHolder() [3/10]

Ice::CommunicatorHolder::CommunicatorHolder ( int & argc,
char * argv[],
const InitializationData & initData = InitializationData(),
int version = 30711 )

Initializes a new communicator.

Parameters
argcThe number of arguments in argv. Upon return, this argument is updated to reflect the arguments still remaining in argv.
argvCommand-line arguments, possibly containing options to set properties. If the arguments include a –Ice.Config option, the corresponding configuration files are parsed. If the same property is set in a configuration file and in the arguments, the arguments take precedence. Recognized options are removed from this vector upon return.
initDataConfiguration data for the new Communicator.
versionIndicates the Ice version with which the application is compatible. If not specified, the version of the Ice installation is used.

◆ CommunicatorHolder() [4/10]

Ice::CommunicatorHolder::CommunicatorHolder ( int & argc,
const char * argv[],
const char * configFile,
int version = 30711 )

Initializes a new communicator.

Parameters
argcThe number of arguments in argv. Upon return, this argument is updated to reflect the arguments still remaining in argv.
argvCommand-line arguments, possibly containing options to set properties. If the arguments include a –Ice.Config option, the corresponding configuration files are parsed. If the same property is set in a configuration file and in the arguments, the arguments take precedence. Recognized options are removed from this vector upon return.
configFileThe name of an Ice configuration file.
versionIndicates the Ice version with which the application is compatible. If not specified, the version of the Ice installation is used.

◆ CommunicatorHolder() [5/10]

Ice::CommunicatorHolder::CommunicatorHolder ( int & argc,
char * argv[],
const char * configFile,
int version = 30711 )

Initializes a new communicator.

Parameters
argcThe number of arguments in argv. Upon return, this argument is updated to reflect the arguments still remaining in argv.
argvCommand-line arguments, possibly containing options to set properties. If the arguments include a –Ice.Config option, the corresponding configuration files are parsed. If the same property is set in a configuration file and in the arguments, the arguments take precedence. Recognized options are removed from this vector upon return.
configFileThe name of an Ice configuration file.
versionIndicates the Ice version with which the application is compatible. If not specified, the version of the Ice installation is used.

◆ CommunicatorHolder() [6/10]

Ice::CommunicatorHolder::CommunicatorHolder ( StringSeq & seq,
const InitializationData & initData = InitializationData(),
int version = 30711 )
explicit

Initializes a new communicator.

Parameters
seqCommand-line arguments, possibly containing options to set properties. If the arguments include a –Ice.Config option, the corresponding configuration files are parsed. If the same property is set in a configuration file and in the arguments, the arguments take precedence. Recognized options are removed from this container upon return.
initDataConfiguration data for the new Communicator.
versionIndicates the Ice version with which the application is compatible. If not specified, the version of the Ice installation is used.

◆ CommunicatorHolder() [7/10]

Ice::CommunicatorHolder::CommunicatorHolder ( StringSeq & seq,
const char * configFile,
int version = 30711 )

Initializes a new communicator.

Parameters
seqCommand-line arguments, possibly containing options to set properties. If the arguments include a –Ice.Config option, the corresponding configuration files are parsed. If the same property is set in a configuration file and in the arguments, the arguments take precedence. Recognized options are removed from this container upon return.
configFileThe name of an Ice configuration file.
versionIndicates the Ice version with which the application is compatible. If not specified, the version of the Ice installation is used.

◆ CommunicatorHolder() [8/10]

Ice::CommunicatorHolder::CommunicatorHolder ( const InitializationData & initData,
int version = 30711 )
explicit

Initializes a new communicator.

Parameters
initDataConfiguration data for the new Communicator.
versionIndicates the Ice version with which the application is compatible. If not specified, the version of the Ice installation is used.

◆ CommunicatorHolder() [9/10]

Ice::CommunicatorHolder::CommunicatorHolder ( const char * configFile,
int version = 30711 )
explicit

Initializes a new communicator.

Parameters
configFileThe name of an Ice configuration file.
versionIndicates the Ice version with which the application is compatible. If not specified, the version of the Ice installation is used.

◆ CommunicatorHolder() [10/10]

Ice::CommunicatorHolder::CommunicatorHolder ( const CommunicatorPtr & communicator)

Adopts the given communicator.

Parameters
communicatorThe new communicator instance to hold.

◆ ~CommunicatorHolder()

Ice::CommunicatorHolder::~CommunicatorHolder ( )

Member Function Documentation

◆ communicator()

const CommunicatorPtr & Ice::CommunicatorHolder::communicator ( ) const

Obtains the communicator instance.

Returns
The communicator held by this holder, or nil if the holder is empty.

◆ operator bool()

Ice::CommunicatorHolder::operator bool ( ) const

Determines whether the holder contains an instance.

Returns
True if the holder currently holds an instance, false otherwise.

◆ operator->()

const CommunicatorPtr & Ice::CommunicatorHolder::operator-> ( ) const

Obtains the communicator instance.

Returns
The communicator held by this holder, or nil if the holder is empty.

◆ operator=()

CommunicatorHolder & Ice::CommunicatorHolder::operator= ( const CommunicatorPtr & communicator)

Adopts the given communicator.

If this holder currently holds a communicator, it will be destroyed.

Parameters
communicatorThe new communicator instance to hold.

◆ release()

CommunicatorPtr Ice::CommunicatorHolder::release ( )

Obtains the communicator instance and clears the reference held by the holder.

Returns
The communicator held by this holder, or nil if the holder is empty.

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