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>
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.
◆ CommunicatorHolder() [1/5]
| Ice::CommunicatorHolder::CommunicatorHolder |
( |
| ) |
|
The holder's initial state is empty.
◆ CommunicatorHolder() [2/5]
template<class... T>
| Ice::CommunicatorHolder::CommunicatorHolder |
( |
T &&... | args | ) |
|
|
inlineexplicit |
Calls initialize to create a communicator with the provided arguments.
This constructor accepts all of the same overloaded argument styles as initialize.
◆ CommunicatorHolder() [3/5]
| Ice::CommunicatorHolder::CommunicatorHolder |
( |
std::shared_ptr< Communicator > | communicator | ) |
|
Adopts the given communicator.
- Parameters
-
| communicator | The new communicator instance to hold. |
◆ CommunicatorHolder() [4/5]
| Ice::CommunicatorHolder::CommunicatorHolder |
( |
const CommunicatorHolder & | | ) |
|
|
delete |
◆ CommunicatorHolder() [5/5]
| Ice::CommunicatorHolder::CommunicatorHolder |
( |
CommunicatorHolder && | | ) |
|
|
default |
◆ ~CommunicatorHolder()
| Ice::CommunicatorHolder::~CommunicatorHolder |
( |
| ) |
|
◆ 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 |
|
explicit |
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=() [1/2]
Adopts the communicator in the given holder.
If this holder currently holds a communicator, it will be destroyed.
- Parameters
-
| holder | The holder from which to adopt a communicator. |
◆ operator=() [2/2]
Adopts the given communicator.
If this holder currently holds a communicator, it will be destroyed.
- Parameters
-
| communicator | The 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: