8#ifndef INCLUDED_BALB_PIPECONTROLCHANNEL
9#define INCLUDED_BALB_PIPECONTROLCHANNEL
260#include <balscm_version.h>
270#include <bsl_functional.h>
271#include <bsl_string.h>
272#include <bsl_vector.h>
276#ifndef BDE_DONT_ALLOW_TRANSITIVE_INCLUDES
308 enum BackgroundThreadState {
338 void backgroundProcessor();
342 int createNamedPipe(
const char *
pipeName);
352 bool dispatchLeftoverMessage();
355 void destroyNamedPipe();
367 int sendEmptyMessage();
371 PipeControlChannel(
const PipeControlChannel&);
372 PipeControlChannel& operator=(
const PipeControlChannel&);
403 template <
class STRING_TYPE>
407 template <
class STRING_TYPE>
472 static const char *
flatten(
char *cString);
473 static const char *
flatten(
const char *cString);
476 static const char *
flatten(
const std::string&
string);
477#ifdef BSLS_LIBRARYFEATURES_HAS_CPP17_PMR_STRING
478 static const char *
flatten(
const std::pmr::string&
string);
488 template <
class TYPE>
489 static const char *
flatten(
const TYPE&);
501template <
class STRING_TYPE>
508template <
class STRING_TYPE>
551 return string.c_str();
557 return string.c_str();
560#ifdef BSLS_LIBRARYFEATURES_HAS_CPP17_PMR_STRING
563 const std::pmr::string&
string)
565 return string.c_str();
580 BSLMF_ASSERT((
"Unsupported parameter type." && !
sizeof(TYPE)));
Definition balb_pipecontrolchannel.h:295
int d_readFd
Definition balb_pipecontrolchannel.h:324
int d_writeFd
Definition balb_pipecontrolchannel.h:325
struct balb::PipeControlChannel::@0::@2 d_windows
PipeControlChannel(const ControlCallback &callback, bslma::Allocator *basicAllocator=0)
const bsl::string & pipeName() const
Return the fully qualified system name of the pipe.
Definition balb_pipecontrolchannel.h:518
int start(const char *pipeName)
int start(const char *pipeName, const bslmt::ThreadAttributes &attributes)
void * d_handle
Definition balb_pipecontrolchannel.h:329
bslma::Allocator * allocator() const
Definition balb_pipecontrolchannel.h:526
struct balb::PipeControlChannel::@0::@1 d_unix
bsl::function< void(const bslstl::StringRef &message)> ControlCallback
Definition balb_pipecontrolchannel.h:304
Definition bslstl_string.h:1281
allocator_type get_allocator() const BSLS_KEYWORD_NOEXCEPT
Return the allocator used by this string to supply memory.
Definition bslstl_string.h:6723
Forward declaration.
Definition bslstl_function.h:934
Definition bslstl_vector.h:1025
VALUE_TYPE * iterator
Definition bslstl_vector.h:1057
Definition bslma_allocator.h:457
Definition bslmt_threadattributes.h:356
Definition bsls_atomic.h:743
Definition bslstl_stringref.h:372
#define BSLMF_ASSERT(expr)
Definition bslmf_assert.h:229
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
Definition balb_controlmanager.h:133
Definition balb_pipecontrolchannel.h:467
static const char * flatten(char *cString)
Return the specified cString.
Definition balb_pipecontrolchannel.h:537
Imp::Handle Handle
Definition bslmt_threadutil.h:385