3#ifndef ICE_INITIALIZE_H
4#define ICE_INITIALIZE_H
6#include "BatchRequest.h"
7#include "CommunicatorF.h"
9#include "Ice/BuiltinSequences.h"
11#include "Instrumentation.h"
14#include "PluginFactory.h"
15#include "Properties.h"
16#include "SSL/ClientAuthenticationOptions.h"
17#include "SliceLoader.h"
18#include "StringUtil.h"
40# pragma clang diagnostic push
41# pragma clang diagnostic ignored "-Wdocumentation"
62# pragma clang diagnostic pop
99 auto properties = std::make_shared<Properties>(argc, argv);
100 if (properties->getProperty(
"Ice.ProgramName").empty() && argc > 0)
103 std::string programName = args[0];
106 std::replace(programName.begin(), programName.end(),
'\\',
'/');
107 properties->setProperty(
"Ice.ProgramName", std::move(programName));
Represents a batch request.
std::shared_ptr< CommunicatorObserver > CommunicatorObserverPtr
A shared pointer to a CommunicatorObserver.
void setProcessLogger(const LoggerPtr &logger)
Sets the per-process logger.
std::shared_ptr< Communicator > CommunicatorPtr
A shared pointer to a Communicator.
std::shared_ptr< Properties > PropertiesPtr
A shared pointer to a Properties.
std::string identityToString(const Identity &id, ToStringMode mode=ToStringMode::Unicode)
Converts an Identity into a string using the specified mode.
StringSeq argsToStringSeq(int argc, const char *const argv[])
Converts an argument vector into a string sequence.
LoggerPtr getProcessLogger()
Gets the per-process logger.
std::shared_ptr< SliceLoader > SliceLoaderPtr
A shared pointer to a SliceLoader.
ToStringMode
The output mode for xxxToString methods such as identityToString and proxyToString.
@ Unicode
Characters with ordinal values greater than 127 are kept as-is in the resulting string.
std::shared_ptr< Logger > LoggerPtr
A shared pointer to a Logger.
std::vector< std::string > StringSeq
A sequence of strings.
std::shared_ptr< Connection > ConnectionPtr
A shared pointer to a Connection.
CommunicatorPtr initialize(InitializationData initData={})
Creates a new communicator.
Identity stringToIdentity(std::string_view str)
Converts a stringified identity into an Identity.
Represents the identity of an Ice object.
Instrumentation::CommunicatorObserverPtr observer
The communicator observer used by the Ice runtime.
SliceLoaderPtr sliceLoader
The Slice loader, used to unmarshal Slice classes and exceptions.
std::function< void(std::function< void()> call, const Ice::ConnectionPtr &con)> executor
A function that the communicator calls to execute dispatches and async invocation callbacks.
std::function< void(const Ice::BatchRequest &req, int count, int size)> batchRequestInterceptor
The batch request interceptor, which is called by the Ice runtime to enqueue a batch request.
PropertiesPtr properties
The properties for the communicator.
LoggerPtr logger
The logger for the communicator.
std::function< void()> threadStop
A function that the communicator calls when it destroys a thread.
std::optional< SSL::ClientAuthenticationOptions > clientAuthenticationOptions
The authentication options for SSL client connections.
std::function< void()> threadStart
A function that the communicator calls when it starts a new thread.
std::vector< PluginFactory > pluginFactories
A list of plug-in factories.
Represents a set of options that you can specify when initializing a communicator.