diff --git a/src/groups/mqb/mqbcmd/mqbcmd.xsd b/src/groups/mqb/mqbcmd/mqbcmd.xsd
index 5043e9136..37653a682 100644
--- a/src/groups/mqb/mqbcmd/mqbcmd.xsd
+++ b/src/groups/mqb/mqbcmd/mqbcmd.xsd
@@ -28,7 +28,7 @@
-
+
@@ -306,6 +306,7 @@
+
diff --git a/src/groups/mqb/mqbcmd/mqbcmd_commandlist.cpp b/src/groups/mqb/mqbcmd/mqbcmd_commandlist.cpp
index ffcd352ad..1481292f6 100644
--- a/src/groups/mqb/mqbcmd/mqbcmd_commandlist.cpp
+++ b/src/groups/mqb/mqbcmd/mqbcmd_commandlist.cpp
@@ -45,6 +45,9 @@ struct CommandDefinition {
{"DOMAINS DOMAIN PURGE",
"Purge all queues in domain 'name'",
"Purge all queues in domain 'name'"},
+ {"DOMAINS DOMAIN REMOVE",
+ "Reject all incoming connections to all queues in domain 'name'",
+ "and purge them from the domain"},
{"DOMAINS DOMAIN INFOS",
"Show information about domain 'name' and its queues",
"Show information about domain 'name' and its queues"},
diff --git a/src/groups/mqb/mqbcmd/mqbcmd_messages.cpp b/src/groups/mqb/mqbcmd/mqbcmd_messages.cpp
index 3aa470d72..ad9dafc28 100644
--- a/src/groups/mqb/mqbcmd/mqbcmd_messages.cpp
+++ b/src/groups/mqb/mqbcmd/mqbcmd_messages.cpp
@@ -1,18 +1,3 @@
-// Copyright 2019-2024 Bloomberg Finance L.P.
-// SPDX-License-Identifier: Apache-2.0
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
// mqbcmd_messages.cpp *DO NOT EDIT* @generated -*-C++-*-
#include
@@ -30,9 +15,9 @@
#include
#include
#include
+#include
#include
#include
-#include
#include
#include
@@ -43,37 +28,44 @@
namespace BloombergLP {
namespace mqbcmd {
-// ---------------------
-// class AddReverseProxy
-// ---------------------
+ // ---------------------
+ // class AddReverseProxy
+ // ---------------------
// CONSTANTS
const char AddReverseProxy::CLASS_NAME[] = "AddReverseProxy";
const bdlat_AttributeInfo AddReverseProxy::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_CLUSTER_NAME,
- "clusterName",
- sizeof("clusterName") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_REMOTE_PEER,
- "remotePeer",
- sizeof("remotePeer") - 1,
- "",
- bdlat_FormattingMode::e_TEXT}};
+ {
+ ATTRIBUTE_ID_CLUSTER_NAME,
+ "clusterName",
+ sizeof("clusterName") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_REMOTE_PEER,
+ "remotePeer",
+ sizeof("remotePeer") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo*
-AddReverseProxy::lookupAttributeInfo(const char* name, int nameLength)
+const bdlat_AttributeInfo *AddReverseProxy::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 2; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- AddReverseProxy::ATTRIBUTE_INFO_ARRAY[i];
+ AddReverseProxy::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -81,42 +73,43 @@ AddReverseProxy::lookupAttributeInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_AttributeInfo* AddReverseProxy::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *AddReverseProxy::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_CLUSTER_NAME:
+ case ATTRIBUTE_ID_CLUSTER_NAME:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTER_NAME];
- case ATTRIBUTE_ID_REMOTE_PEER:
+ case ATTRIBUTE_ID_REMOTE_PEER:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_REMOTE_PEER];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-AddReverseProxy::AddReverseProxy(bslma::Allocator* basicAllocator)
+AddReverseProxy::AddReverseProxy(bslma::Allocator *basicAllocator)
: d_clusterName(basicAllocator)
, d_remotePeer(basicAllocator)
{
}
AddReverseProxy::AddReverseProxy(const AddReverseProxy& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_clusterName(original.d_clusterName, basicAllocator)
, d_remotePeer(original.d_remotePeer, basicAllocator)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
AddReverseProxy::AddReverseProxy(AddReverseProxy&& original) noexcept
-: d_clusterName(bsl::move(original.d_clusterName)),
- d_remotePeer(bsl::move(original.d_remotePeer))
+: d_clusterName(bsl::move(original.d_clusterName))
+, d_remotePeer(bsl::move(original.d_remotePeer))
{
}
AddReverseProxy::AddReverseProxy(AddReverseProxy&& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_clusterName(bsl::move(original.d_clusterName), basicAllocator)
, d_remotePeer(bsl::move(original.d_remotePeer), basicAllocator)
{
@@ -129,23 +122,25 @@ AddReverseProxy::~AddReverseProxy()
// MANIPULATORS
-AddReverseProxy& AddReverseProxy::operator=(const AddReverseProxy& rhs)
+AddReverseProxy&
+AddReverseProxy::operator=(const AddReverseProxy& rhs)
{
if (this != &rhs) {
d_clusterName = rhs.d_clusterName;
- d_remotePeer = rhs.d_remotePeer;
+ d_remotePeer = rhs.d_remotePeer;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-AddReverseProxy& AddReverseProxy::operator=(AddReverseProxy&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+AddReverseProxy&
+AddReverseProxy::operator=(AddReverseProxy&& rhs)
{
if (this != &rhs) {
d_clusterName = bsl::move(rhs.d_clusterName);
- d_remotePeer = bsl::move(rhs.d_remotePeer);
+ d_remotePeer = bsl::move(rhs.d_remotePeer);
}
return *this;
@@ -172,32 +167,39 @@ bsl::ostream& AddReverseProxy::print(bsl::ostream& stream,
return stream;
}
-// ------------------
-// class BrokerConfig
-// ------------------
+
+
+ // ------------------
+ // class BrokerConfig
+ // ------------------
// CONSTANTS
const char BrokerConfig::CLASS_NAME[] = "BrokerConfig";
const bdlat_AttributeInfo BrokerConfig::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_AS_J_S_O_N,
- "asJSON",
- sizeof("asJSON") - 1,
- "",
- bdlat_FormattingMode::e_TEXT}};
+ {
+ ATTRIBUTE_ID_AS_J_S_O_N,
+ "asJSON",
+ sizeof("asJSON") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* BrokerConfig::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *BrokerConfig::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 1; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- BrokerConfig::ATTRIBUTE_INFO_ARRAY[i];
+ BrokerConfig::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -205,37 +207,38 @@ const bdlat_AttributeInfo* BrokerConfig::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* BrokerConfig::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *BrokerConfig::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_AS_J_S_O_N:
+ case ATTRIBUTE_ID_AS_J_S_O_N:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_AS_J_S_O_N];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-BrokerConfig::BrokerConfig(bslma::Allocator* basicAllocator)
+BrokerConfig::BrokerConfig(bslma::Allocator *basicAllocator)
: d_asJSON(basicAllocator)
{
}
BrokerConfig::BrokerConfig(const BrokerConfig& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_asJSON(original.d_asJSON, basicAllocator)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
BrokerConfig::BrokerConfig(BrokerConfig&& original) noexcept
: d_asJSON(bsl::move(original.d_asJSON))
{
}
-BrokerConfig::BrokerConfig(BrokerConfig&& original,
- bslma::Allocator* basicAllocator)
+BrokerConfig::BrokerConfig(BrokerConfig&& original,
+ bslma::Allocator *basicAllocator)
: d_asJSON(bsl::move(original.d_asJSON), basicAllocator)
{
}
@@ -247,7 +250,8 @@ BrokerConfig::~BrokerConfig()
// MANIPULATORS
-BrokerConfig& BrokerConfig::operator=(const BrokerConfig& rhs)
+BrokerConfig&
+BrokerConfig::operator=(const BrokerConfig& rhs)
{
if (this != &rhs) {
d_asJSON = rhs.d_asJSON;
@@ -256,9 +260,10 @@ BrokerConfig& BrokerConfig::operator=(const BrokerConfig& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-BrokerConfig& BrokerConfig::operator=(BrokerConfig&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+BrokerConfig&
+BrokerConfig::operator=(BrokerConfig&& rhs)
{
if (this != &rhs) {
d_asJSON = bsl::move(rhs.d_asJSON);
@@ -275,8 +280,9 @@ void BrokerConfig::reset()
// ACCESSORS
-bsl::ostream&
-BrokerConfig::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& BrokerConfig::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
@@ -285,72 +291,95 @@ BrokerConfig::print(bsl::ostream& stream, int level, int spacesPerLevel) const
return stream;
}
-// -------------------
-// class CapacityMeter
-// -------------------
+
+
+ // -------------------
+ // class CapacityMeter
+ // -------------------
// CONSTANTS
const char CapacityMeter::CLASS_NAME[] = "CapacityMeter";
const bdlat_AttributeInfo CapacityMeter::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_NAME,
- "name",
- sizeof("name") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_IS_DISABLED,
- "isDisabled",
- sizeof("isDisabled") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_NUM_MESSAGES,
- "numMessages",
- sizeof("numMessages") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_MESSAGE_CAPACITY,
- "messageCapacity",
- sizeof("messageCapacity") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_NUM_MESSAGES_RESERVED,
- "numMessagesReserved",
- sizeof("numMessagesReserved") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_NUM_BYTES,
- "numBytes",
- sizeof("numBytes") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_BYTE_CAPACITY,
- "byteCapacity",
- sizeof("byteCapacity") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_NUM_BYTES_RESERVED,
- "numBytesReserved",
- sizeof("numBytesReserved") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_PARENT,
- "parent",
- sizeof("parent") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ ATTRIBUTE_ID_NAME,
+ "name",
+ sizeof("name") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_IS_DISABLED,
+ "isDisabled",
+ sizeof("isDisabled") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_NUM_MESSAGES,
+ "numMessages",
+ sizeof("numMessages") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_MESSAGE_CAPACITY,
+ "messageCapacity",
+ sizeof("messageCapacity") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_NUM_MESSAGES_RESERVED,
+ "numMessagesReserved",
+ sizeof("numMessagesReserved") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_NUM_BYTES,
+ "numBytes",
+ sizeof("numBytes") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_BYTE_CAPACITY,
+ "byteCapacity",
+ sizeof("byteCapacity") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_NUM_BYTES_RESERVED,
+ "numBytesReserved",
+ sizeof("numBytesReserved") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_PARENT,
+ "parent",
+ sizeof("parent") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* CapacityMeter::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *CapacityMeter::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 9; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- CapacityMeter::ATTRIBUTE_INFO_ARRAY[i];
+ CapacityMeter::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -358,33 +387,35 @@ const bdlat_AttributeInfo* CapacityMeter::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* CapacityMeter::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *CapacityMeter::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_NAME: return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME];
- case ATTRIBUTE_ID_IS_DISABLED:
+ case ATTRIBUTE_ID_NAME:
+ return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME];
+ case ATTRIBUTE_ID_IS_DISABLED:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_DISABLED];
- case ATTRIBUTE_ID_NUM_MESSAGES:
+ case ATTRIBUTE_ID_NUM_MESSAGES:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES];
- case ATTRIBUTE_ID_MESSAGE_CAPACITY:
+ case ATTRIBUTE_ID_MESSAGE_CAPACITY:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGE_CAPACITY];
- case ATTRIBUTE_ID_NUM_MESSAGES_RESERVED:
+ case ATTRIBUTE_ID_NUM_MESSAGES_RESERVED:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES_RESERVED];
- case ATTRIBUTE_ID_NUM_BYTES:
+ case ATTRIBUTE_ID_NUM_BYTES:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES];
- case ATTRIBUTE_ID_BYTE_CAPACITY:
+ case ATTRIBUTE_ID_BYTE_CAPACITY:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BYTE_CAPACITY];
- case ATTRIBUTE_ID_NUM_BYTES_RESERVED:
+ case ATTRIBUTE_ID_NUM_BYTES_RESERVED:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES_RESERVED];
- case ATTRIBUTE_ID_PARENT:
+ case ATTRIBUTE_ID_PARENT:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARENT];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-CapacityMeter::CapacityMeter(bslma::Allocator* basicAllocator)
+CapacityMeter::CapacityMeter(bslma::Allocator *basicAllocator)
: d_numMessages()
, d_messageCapacity()
, d_numMessagesReserved()
@@ -398,7 +429,7 @@ CapacityMeter::CapacityMeter(bslma::Allocator* basicAllocator)
}
CapacityMeter::CapacityMeter(const CapacityMeter& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_numMessages(original.d_numMessages)
, d_messageCapacity(original.d_messageCapacity)
, d_numMessagesReserved(original.d_numMessagesReserved)
@@ -411,23 +442,23 @@ CapacityMeter::CapacityMeter(const CapacityMeter& original,
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
CapacityMeter::CapacityMeter(CapacityMeter&& original) noexcept
-: d_numMessages(bsl::move(original.d_numMessages)),
- d_messageCapacity(bsl::move(original.d_messageCapacity)),
- d_numMessagesReserved(bsl::move(original.d_numMessagesReserved)),
- d_numBytes(bsl::move(original.d_numBytes)),
- d_byteCapacity(bsl::move(original.d_byteCapacity)),
- d_numBytesReserved(bsl::move(original.d_numBytesReserved)),
- d_name(bsl::move(original.d_name)),
- d_parent(bsl::move(original.d_parent)),
- d_isDisabled(bsl::move(original.d_isDisabled))
+: d_numMessages(bsl::move(original.d_numMessages))
+, d_messageCapacity(bsl::move(original.d_messageCapacity))
+, d_numMessagesReserved(bsl::move(original.d_numMessagesReserved))
+, d_numBytes(bsl::move(original.d_numBytes))
+, d_byteCapacity(bsl::move(original.d_byteCapacity))
+, d_numBytesReserved(bsl::move(original.d_numBytesReserved))
+, d_name(bsl::move(original.d_name))
+, d_parent(bsl::move(original.d_parent))
+, d_isDisabled(bsl::move(original.d_isDisabled))
{
}
-CapacityMeter::CapacityMeter(CapacityMeter&& original,
- bslma::Allocator* basicAllocator)
+CapacityMeter::CapacityMeter(CapacityMeter&& original,
+ bslma::Allocator *basicAllocator)
: d_numMessages(bsl::move(original.d_numMessages))
, d_messageCapacity(bsl::move(original.d_messageCapacity))
, d_numMessagesReserved(bsl::move(original.d_numMessagesReserved))
@@ -447,37 +478,39 @@ CapacityMeter::~CapacityMeter()
// MANIPULATORS
-CapacityMeter& CapacityMeter::operator=(const CapacityMeter& rhs)
+CapacityMeter&
+CapacityMeter::operator=(const CapacityMeter& rhs)
{
if (this != &rhs) {
- d_name = rhs.d_name;
- d_isDisabled = rhs.d_isDisabled;
- d_numMessages = rhs.d_numMessages;
- d_messageCapacity = rhs.d_messageCapacity;
+ d_name = rhs.d_name;
+ d_isDisabled = rhs.d_isDisabled;
+ d_numMessages = rhs.d_numMessages;
+ d_messageCapacity = rhs.d_messageCapacity;
d_numMessagesReserved = rhs.d_numMessagesReserved;
- d_numBytes = rhs.d_numBytes;
- d_byteCapacity = rhs.d_byteCapacity;
- d_numBytesReserved = rhs.d_numBytesReserved;
- d_parent = rhs.d_parent;
+ d_numBytes = rhs.d_numBytes;
+ d_byteCapacity = rhs.d_byteCapacity;
+ d_numBytesReserved = rhs.d_numBytesReserved;
+ d_parent = rhs.d_parent;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-CapacityMeter& CapacityMeter::operator=(CapacityMeter&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+CapacityMeter&
+CapacityMeter::operator=(CapacityMeter&& rhs)
{
if (this != &rhs) {
- d_name = bsl::move(rhs.d_name);
- d_isDisabled = bsl::move(rhs.d_isDisabled);
- d_numMessages = bsl::move(rhs.d_numMessages);
- d_messageCapacity = bsl::move(rhs.d_messageCapacity);
+ d_name = bsl::move(rhs.d_name);
+ d_isDisabled = bsl::move(rhs.d_isDisabled);
+ d_numMessages = bsl::move(rhs.d_numMessages);
+ d_messageCapacity = bsl::move(rhs.d_messageCapacity);
d_numMessagesReserved = bsl::move(rhs.d_numMessagesReserved);
- d_numBytes = bsl::move(rhs.d_numBytes);
- d_byteCapacity = bsl::move(rhs.d_byteCapacity);
- d_numBytesReserved = bsl::move(rhs.d_numBytesReserved);
- d_parent = bsl::move(rhs.d_parent);
+ d_numBytes = bsl::move(rhs.d_numBytes);
+ d_byteCapacity = bsl::move(rhs.d_byteCapacity);
+ d_numBytesReserved = bsl::move(rhs.d_numBytesReserved);
+ d_parent = bsl::move(rhs.d_parent);
}
return *this;
@@ -499,8 +532,9 @@ void CapacityMeter::reset()
// ACCESSORS
-bsl::ostream&
-CapacityMeter::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& CapacityMeter::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
@@ -517,37 +551,46 @@ CapacityMeter::print(bsl::ostream& stream, int level, int spacesPerLevel) const
return stream;
}
-// --------------------------
-// class ClientMsgGroupsCount
-// --------------------------
+
+
+ // --------------------------
+ // class ClientMsgGroupsCount
+ // --------------------------
// CONSTANTS
const char ClientMsgGroupsCount::CLASS_NAME[] = "ClientMsgGroupsCount";
const bdlat_AttributeInfo ClientMsgGroupsCount::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_CLIENT_DESCRIPTION,
- "clientDescription",
- sizeof("clientDescription") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_NUM_MSG_GROUP_IDS,
- "numMsgGroupIds",
- sizeof("numMsgGroupIds") - 1,
- "",
- bdlat_FormattingMode::e_DEC}};
+ {
+ ATTRIBUTE_ID_CLIENT_DESCRIPTION,
+ "clientDescription",
+ sizeof("clientDescription") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_NUM_MSG_GROUP_IDS,
+ "numMsgGroupIds",
+ sizeof("numMsgGroupIds") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo*
-ClientMsgGroupsCount::lookupAttributeInfo(const char* name, int nameLength)
+const bdlat_AttributeInfo *ClientMsgGroupsCount::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 2; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- ClientMsgGroupsCount::ATTRIBUTE_INFO_ARRAY[i];
+ ClientMsgGroupsCount::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -555,43 +598,43 @@ ClientMsgGroupsCount::lookupAttributeInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_AttributeInfo* ClientMsgGroupsCount::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *ClientMsgGroupsCount::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_CLIENT_DESCRIPTION:
+ case ATTRIBUTE_ID_CLIENT_DESCRIPTION:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLIENT_DESCRIPTION];
- case ATTRIBUTE_ID_NUM_MSG_GROUP_IDS:
+ case ATTRIBUTE_ID_NUM_MSG_GROUP_IDS:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MSG_GROUP_IDS];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-ClientMsgGroupsCount::ClientMsgGroupsCount(bslma::Allocator* basicAllocator)
+ClientMsgGroupsCount::ClientMsgGroupsCount(bslma::Allocator *basicAllocator)
: d_clientDescription(basicAllocator)
, d_numMsgGroupIds()
{
}
-ClientMsgGroupsCount::ClientMsgGroupsCount(
- const ClientMsgGroupsCount& original,
- bslma::Allocator* basicAllocator)
+ClientMsgGroupsCount::ClientMsgGroupsCount(const ClientMsgGroupsCount& original,
+ bslma::Allocator *basicAllocator)
: d_clientDescription(original.d_clientDescription, basicAllocator)
, d_numMsgGroupIds(original.d_numMsgGroupIds)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-ClientMsgGroupsCount::ClientMsgGroupsCount(ClientMsgGroupsCount&& original)
- noexcept : d_clientDescription(bsl::move(original.d_clientDescription)),
- d_numMsgGroupIds(bsl::move(original.d_numMsgGroupIds))
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ClientMsgGroupsCount::ClientMsgGroupsCount(ClientMsgGroupsCount&& original) noexcept
+: d_clientDescription(bsl::move(original.d_clientDescription))
+, d_numMsgGroupIds(bsl::move(original.d_numMsgGroupIds))
{
}
ClientMsgGroupsCount::ClientMsgGroupsCount(ClientMsgGroupsCount&& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_clientDescription(bsl::move(original.d_clientDescription), basicAllocator)
, d_numMsgGroupIds(bsl::move(original.d_numMsgGroupIds))
{
@@ -609,20 +652,20 @@ ClientMsgGroupsCount::operator=(const ClientMsgGroupsCount& rhs)
{
if (this != &rhs) {
d_clientDescription = rhs.d_clientDescription;
- d_numMsgGroupIds = rhs.d_numMsgGroupIds;
+ d_numMsgGroupIds = rhs.d_numMsgGroupIds;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ClientMsgGroupsCount&
ClientMsgGroupsCount::operator=(ClientMsgGroupsCount&& rhs)
{
if (this != &rhs) {
d_clientDescription = bsl::move(rhs.d_clientDescription);
- d_numMsgGroupIds = bsl::move(rhs.d_numMsgGroupIds);
+ d_numMsgGroupIds = bsl::move(rhs.d_numMsgGroupIds);
}
return *this;
@@ -649,42 +692,53 @@ bsl::ostream& ClientMsgGroupsCount::print(bsl::ostream& stream,
return stream;
}
-// -------------------
-// class ClusterDomain
-// -------------------
+
+
+ // -------------------
+ // class ClusterDomain
+ // -------------------
// CONSTANTS
const char ClusterDomain::CLASS_NAME[] = "ClusterDomain";
const bdlat_AttributeInfo ClusterDomain::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_NAME,
- "name",
- sizeof("name") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_NUM_ASSIGNED_QUEUES,
- "numAssignedQueues",
- sizeof("numAssignedQueues") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_LOADED,
- "loaded",
- sizeof("loaded") - 1,
- "",
- bdlat_FormattingMode::e_TEXT}};
+ {
+ ATTRIBUTE_ID_NAME,
+ "name",
+ sizeof("name") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_NUM_ASSIGNED_QUEUES,
+ "numAssignedQueues",
+ sizeof("numAssignedQueues") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_LOADED,
+ "loaded",
+ sizeof("loaded") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* ClusterDomain::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *ClusterDomain::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 3; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- ClusterDomain::ATTRIBUTE_INFO_ARRAY[i];
+ ClusterDomain::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -692,21 +746,23 @@ const bdlat_AttributeInfo* ClusterDomain::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* ClusterDomain::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *ClusterDomain::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_NAME: return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME];
- case ATTRIBUTE_ID_NUM_ASSIGNED_QUEUES:
+ case ATTRIBUTE_ID_NAME:
+ return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME];
+ case ATTRIBUTE_ID_NUM_ASSIGNED_QUEUES:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_ASSIGNED_QUEUES];
- case ATTRIBUTE_ID_LOADED:
+ case ATTRIBUTE_ID_LOADED:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LOADED];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-ClusterDomain::ClusterDomain(bslma::Allocator* basicAllocator)
+ClusterDomain::ClusterDomain(bslma::Allocator *basicAllocator)
: d_name(basicAllocator)
, d_numAssignedQueues()
, d_loaded()
@@ -714,24 +770,24 @@ ClusterDomain::ClusterDomain(bslma::Allocator* basicAllocator)
}
ClusterDomain::ClusterDomain(const ClusterDomain& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_name(original.d_name, basicAllocator)
, d_numAssignedQueues(original.d_numAssignedQueues)
, d_loaded(original.d_loaded)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ClusterDomain::ClusterDomain(ClusterDomain&& original) noexcept
-: d_name(bsl::move(original.d_name)),
- d_numAssignedQueues(bsl::move(original.d_numAssignedQueues)),
- d_loaded(bsl::move(original.d_loaded))
+: d_name(bsl::move(original.d_name))
+, d_numAssignedQueues(bsl::move(original.d_numAssignedQueues))
+, d_loaded(bsl::move(original.d_loaded))
{
}
-ClusterDomain::ClusterDomain(ClusterDomain&& original,
- bslma::Allocator* basicAllocator)
+ClusterDomain::ClusterDomain(ClusterDomain&& original,
+ bslma::Allocator *basicAllocator)
: d_name(bsl::move(original.d_name), basicAllocator)
, d_numAssignedQueues(bsl::move(original.d_numAssignedQueues))
, d_loaded(bsl::move(original.d_loaded))
@@ -745,25 +801,27 @@ ClusterDomain::~ClusterDomain()
// MANIPULATORS
-ClusterDomain& ClusterDomain::operator=(const ClusterDomain& rhs)
+ClusterDomain&
+ClusterDomain::operator=(const ClusterDomain& rhs)
{
if (this != &rhs) {
- d_name = rhs.d_name;
+ d_name = rhs.d_name;
d_numAssignedQueues = rhs.d_numAssignedQueues;
- d_loaded = rhs.d_loaded;
+ d_loaded = rhs.d_loaded;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-ClusterDomain& ClusterDomain::operator=(ClusterDomain&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ClusterDomain&
+ClusterDomain::operator=(ClusterDomain&& rhs)
{
if (this != &rhs) {
- d_name = bsl::move(rhs.d_name);
+ d_name = bsl::move(rhs.d_name);
d_numAssignedQueues = bsl::move(rhs.d_numAssignedQueues);
- d_loaded = bsl::move(rhs.d_loaded);
+ d_loaded = bsl::move(rhs.d_loaded);
}
return *this;
@@ -779,8 +837,9 @@ void ClusterDomain::reset()
// ACCESSORS
-bsl::ostream&
-ClusterDomain::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& ClusterDomain::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
@@ -791,42 +850,53 @@ ClusterDomain::print(bsl::ostream& stream, int level, int spacesPerLevel) const
return stream;
}
-// -----------------
-// class ClusterNode
-// -----------------
+
+
+ // -----------------
+ // class ClusterNode
+ // -----------------
// CONSTANTS
const char ClusterNode::CLASS_NAME[] = "ClusterNode";
const bdlat_AttributeInfo ClusterNode::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_HOST_NAME,
- "hostName",
- sizeof("hostName") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_NODE_ID,
- "nodeId",
- sizeof("nodeId") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_DATA_CENTER,
- "dataCenter",
- sizeof("dataCenter") - 1,
- "",
- bdlat_FormattingMode::e_TEXT}};
+ {
+ ATTRIBUTE_ID_HOST_NAME,
+ "hostName",
+ sizeof("hostName") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_NODE_ID,
+ "nodeId",
+ sizeof("nodeId") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_DATA_CENTER,
+ "dataCenter",
+ sizeof("dataCenter") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* ClusterNode::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *ClusterNode::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 3; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- ClusterNode::ATTRIBUTE_INFO_ARRAY[i];
+ ClusterNode::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -834,22 +904,23 @@ const bdlat_AttributeInfo* ClusterNode::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* ClusterNode::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *ClusterNode::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_HOST_NAME:
+ case ATTRIBUTE_ID_HOST_NAME:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_HOST_NAME];
- case ATTRIBUTE_ID_NODE_ID:
+ case ATTRIBUTE_ID_NODE_ID:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NODE_ID];
- case ATTRIBUTE_ID_DATA_CENTER:
+ case ATTRIBUTE_ID_DATA_CENTER:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DATA_CENTER];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-ClusterNode::ClusterNode(bslma::Allocator* basicAllocator)
+ClusterNode::ClusterNode(bslma::Allocator *basicAllocator)
: d_hostName(basicAllocator)
, d_dataCenter(basicAllocator)
, d_nodeId()
@@ -857,24 +928,24 @@ ClusterNode::ClusterNode(bslma::Allocator* basicAllocator)
}
ClusterNode::ClusterNode(const ClusterNode& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_hostName(original.d_hostName, basicAllocator)
, d_dataCenter(original.d_dataCenter, basicAllocator)
, d_nodeId(original.d_nodeId)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ClusterNode::ClusterNode(ClusterNode&& original) noexcept
-: d_hostName(bsl::move(original.d_hostName)),
- d_dataCenter(bsl::move(original.d_dataCenter)),
- d_nodeId(bsl::move(original.d_nodeId))
+: d_hostName(bsl::move(original.d_hostName))
+, d_dataCenter(bsl::move(original.d_dataCenter))
+, d_nodeId(bsl::move(original.d_nodeId))
{
}
-ClusterNode::ClusterNode(ClusterNode&& original,
- bslma::Allocator* basicAllocator)
+ClusterNode::ClusterNode(ClusterNode&& original,
+ bslma::Allocator *basicAllocator)
: d_hostName(bsl::move(original.d_hostName), basicAllocator)
, d_dataCenter(bsl::move(original.d_dataCenter), basicAllocator)
, d_nodeId(bsl::move(original.d_nodeId))
@@ -888,24 +959,26 @@ ClusterNode::~ClusterNode()
// MANIPULATORS
-ClusterNode& ClusterNode::operator=(const ClusterNode& rhs)
+ClusterNode&
+ClusterNode::operator=(const ClusterNode& rhs)
{
if (this != &rhs) {
- d_hostName = rhs.d_hostName;
- d_nodeId = rhs.d_nodeId;
+ d_hostName = rhs.d_hostName;
+ d_nodeId = rhs.d_nodeId;
d_dataCenter = rhs.d_dataCenter;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-ClusterNode& ClusterNode::operator=(ClusterNode&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ClusterNode&
+ClusterNode::operator=(ClusterNode&& rhs)
{
if (this != &rhs) {
- d_hostName = bsl::move(rhs.d_hostName);
- d_nodeId = bsl::move(rhs.d_nodeId);
+ d_hostName = bsl::move(rhs.d_hostName);
+ d_nodeId = bsl::move(rhs.d_nodeId);
d_dataCenter = bsl::move(rhs.d_dataCenter);
}
@@ -922,8 +995,9 @@ void ClusterNode::reset()
// ACCESSORS
-bsl::ostream&
-ClusterNode::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& ClusterNode::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
@@ -934,37 +1008,46 @@ ClusterNode::print(bsl::ostream& stream, int level, int spacesPerLevel) const
return stream;
}
-// -----------------
-// class CommandSpec
-// -----------------
+
+
+ // -----------------
+ // class CommandSpec
+ // -----------------
// CONSTANTS
const char CommandSpec::CLASS_NAME[] = "CommandSpec";
const bdlat_AttributeInfo CommandSpec::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_COMMAND,
- "command",
- sizeof("command") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_DESCRIPTION,
- "description",
- sizeof("description") - 1,
- "",
- bdlat_FormattingMode::e_TEXT}};
+ {
+ ATTRIBUTE_ID_COMMAND,
+ "command",
+ sizeof("command") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_DESCRIPTION,
+ "description",
+ sizeof("description") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* CommandSpec::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *CommandSpec::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 2; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- CommandSpec::ATTRIBUTE_INFO_ARRAY[i];
+ CommandSpec::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -972,42 +1055,43 @@ const bdlat_AttributeInfo* CommandSpec::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* CommandSpec::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *CommandSpec::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_COMMAND:
+ case ATTRIBUTE_ID_COMMAND:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND];
- case ATTRIBUTE_ID_DESCRIPTION:
+ case ATTRIBUTE_ID_DESCRIPTION:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DESCRIPTION];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-CommandSpec::CommandSpec(bslma::Allocator* basicAllocator)
+CommandSpec::CommandSpec(bslma::Allocator *basicAllocator)
: d_command(basicAllocator)
, d_description(basicAllocator)
{
}
CommandSpec::CommandSpec(const CommandSpec& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_command(original.d_command, basicAllocator)
, d_description(original.d_description, basicAllocator)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
CommandSpec::CommandSpec(CommandSpec&& original) noexcept
-: d_command(bsl::move(original.d_command)),
- d_description(bsl::move(original.d_description))
+: d_command(bsl::move(original.d_command))
+, d_description(bsl::move(original.d_description))
{
}
-CommandSpec::CommandSpec(CommandSpec&& original,
- bslma::Allocator* basicAllocator)
+CommandSpec::CommandSpec(CommandSpec&& original,
+ bslma::Allocator *basicAllocator)
: d_command(bsl::move(original.d_command), basicAllocator)
, d_description(bsl::move(original.d_description), basicAllocator)
{
@@ -1020,22 +1104,24 @@ CommandSpec::~CommandSpec()
// MANIPULATORS
-CommandSpec& CommandSpec::operator=(const CommandSpec& rhs)
+CommandSpec&
+CommandSpec::operator=(const CommandSpec& rhs)
{
if (this != &rhs) {
- d_command = rhs.d_command;
+ d_command = rhs.d_command;
d_description = rhs.d_description;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-CommandSpec& CommandSpec::operator=(CommandSpec&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+CommandSpec&
+CommandSpec::operator=(CommandSpec&& rhs)
{
if (this != &rhs) {
- d_command = bsl::move(rhs.d_command);
+ d_command = bsl::move(rhs.d_command);
d_description = bsl::move(rhs.d_description);
}
@@ -1051,8 +1137,9 @@ void CommandSpec::reset()
// ACCESSORS
-bsl::ostream&
-CommandSpec::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& CommandSpec::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
@@ -1062,47 +1149,60 @@ CommandSpec::print(bsl::ostream& stream, int level, int spacesPerLevel) const
return stream;
}
-// ------------------
-// class ConsumerInfo
-// ------------------
+
+
+ // ------------------
+ // class ConsumerInfo
+ // ------------------
// CONSTANTS
const char ConsumerInfo::CLASS_NAME[] = "ConsumerInfo";
const bdlat_AttributeInfo ConsumerInfo::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_MAX_UNCONFIRMED_MESSAGES,
- "maxUnconfirmedMessages",
- sizeof("maxUnconfirmedMessages") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_MAX_UNCONFIRMED_BYTES,
- "maxUnconfirmedBytes",
- sizeof("maxUnconfirmedBytes") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_CONSUMER_PRIORITY,
- "consumerPriority",
- sizeof("consumerPriority") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_CONSUMER_PRIORITY_COUNT,
- "consumerPriorityCount",
- sizeof("consumerPriorityCount") - 1,
- "",
- bdlat_FormattingMode::e_DEC}};
+ {
+ ATTRIBUTE_ID_MAX_UNCONFIRMED_MESSAGES,
+ "maxUnconfirmedMessages",
+ sizeof("maxUnconfirmedMessages") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_MAX_UNCONFIRMED_BYTES,
+ "maxUnconfirmedBytes",
+ sizeof("maxUnconfirmedBytes") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_CONSUMER_PRIORITY,
+ "consumerPriority",
+ sizeof("consumerPriority") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_CONSUMER_PRIORITY_COUNT,
+ "consumerPriorityCount",
+ sizeof("consumerPriorityCount") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* ConsumerInfo::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *ConsumerInfo::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 4; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- ConsumerInfo::ATTRIBUTE_INFO_ARRAY[i];
+ ConsumerInfo::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -1110,18 +1210,19 @@ const bdlat_AttributeInfo* ConsumerInfo::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* ConsumerInfo::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *ConsumerInfo::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_MAX_UNCONFIRMED_MESSAGES:
+ case ATTRIBUTE_ID_MAX_UNCONFIRMED_MESSAGES:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MAX_UNCONFIRMED_MESSAGES];
- case ATTRIBUTE_ID_MAX_UNCONFIRMED_BYTES:
+ case ATTRIBUTE_ID_MAX_UNCONFIRMED_BYTES:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MAX_UNCONFIRMED_BYTES];
- case ATTRIBUTE_ID_CONSUMER_PRIORITY:
+ case ATTRIBUTE_ID_CONSUMER_PRIORITY:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONSUMER_PRIORITY];
- case ATTRIBUTE_ID_CONSUMER_PRIORITY_COUNT:
+ case ATTRIBUTE_ID_CONSUMER_PRIORITY_COUNT:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONSUMER_PRIORITY_COUNT];
- default: return 0;
+ default:
+ return 0;
}
}
@@ -1147,63 +1248,79 @@ void ConsumerInfo::reset()
// ACCESSORS
-bsl::ostream&
-ConsumerInfo::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& ConsumerInfo::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
- printer.printAttribute("maxUnconfirmedMessages",
- this->maxUnconfirmedMessages());
+ printer.printAttribute("maxUnconfirmedMessages", this->maxUnconfirmedMessages());
printer.printAttribute("maxUnconfirmedBytes", this->maxUnconfirmedBytes());
printer.printAttribute("consumerPriority", this->consumerPriority());
- printer.printAttribute("consumerPriorityCount",
- this->consumerPriorityCount());
+ printer.printAttribute("consumerPriorityCount", this->consumerPriorityCount());
printer.end();
return stream;
}
-// --------------------
-// class ConsumerStatus
-// --------------------
+
+
+ // --------------------
+ // class ConsumerStatus
+ // --------------------
// CONSTANTS
const char ConsumerStatus::CLASS_NAME[] = "ConsumerStatus";
const bdlat_EnumeratorInfo ConsumerStatus::ENUMERATOR_INFO_ARRAY[] = {
- {ConsumerStatus::ALIVE, "alive", sizeof("alive") - 1, ""},
- {ConsumerStatus::REGISTERED, "registered", sizeof("registered") - 1, ""},
- {ConsumerStatus::UNAUTHORIZED,
- "unauthorized",
- sizeof("unauthorized") - 1,
- ""}};
+ {
+ ConsumerStatus::ALIVE,
+ "alive",
+ sizeof("alive") - 1,
+ ""
+ },
+ {
+ ConsumerStatus::REGISTERED,
+ "registered",
+ sizeof("registered") - 1,
+ ""
+ },
+ {
+ ConsumerStatus::UNAUTHORIZED,
+ "unauthorized",
+ sizeof("unauthorized") - 1,
+ ""
+ }
+};
// CLASS METHODS
-int ConsumerStatus::fromInt(ConsumerStatus::Value* result, int number)
+int ConsumerStatus::fromInt(ConsumerStatus::Value *result, int number)
{
switch (number) {
- case ConsumerStatus::ALIVE:
- case ConsumerStatus::REGISTERED:
- case ConsumerStatus::UNAUTHORIZED:
+ case ConsumerStatus::ALIVE:
+ case ConsumerStatus::REGISTERED:
+ case ConsumerStatus::UNAUTHORIZED:
*result = static_cast(number);
return 0;
- default: return -1;
+ default:
+ return -1;
}
}
-int ConsumerStatus::fromString(ConsumerStatus::Value* result,
- const char* string,
- int stringLength)
+int ConsumerStatus::fromString(
+ ConsumerStatus::Value *result,
+ const char *string,
+ int stringLength)
{
for (int i = 0; i < 3; ++i) {
const bdlat_EnumeratorInfo& enumeratorInfo =
- ConsumerStatus::ENUMERATOR_INFO_ARRAY[i];
+ ConsumerStatus::ENUMERATOR_INFO_ARRAY[i];
- if (stringLength == enumeratorInfo.d_nameLength &&
- 0 == bsl::memcmp(enumeratorInfo.d_name_p, string, stringLength)) {
- *result = static_cast(
- enumeratorInfo.d_value);
+ if (stringLength == enumeratorInfo.d_nameLength
+ && 0 == bsl::memcmp(enumeratorInfo.d_name_p, string, stringLength))
+ {
+ *result = static_cast(enumeratorInfo.d_value);
return 0;
}
}
@@ -1211,50 +1328,56 @@ int ConsumerStatus::fromString(ConsumerStatus::Value* result,
return -1;
}
-const char* ConsumerStatus::toString(ConsumerStatus::Value value)
+const char *ConsumerStatus::toString(ConsumerStatus::Value value)
{
switch (value) {
- case ALIVE: {
+ case ALIVE: {
return "alive";
- }
- case REGISTERED: {
+ }
+ case REGISTERED: {
return "registered";
- }
- case UNAUTHORIZED: {
+ }
+ case UNAUTHORIZED: {
return "unauthorized";
- }
+ }
}
BSLS_ASSERT(!"invalid enumerator");
return 0;
}
-// -------------
-// class Context
-// -------------
+
+ // -------------
+ // class Context
+ // -------------
// CONSTANTS
const char Context::CLASS_NAME[] = "Context";
const bdlat_AttributeInfo Context::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_QUEUE_HANDLE_PARAMETERS_JSON,
- "queueHandleParametersJson",
- sizeof("queueHandleParametersJson") - 1,
- "",
- bdlat_FormattingMode::e_TEXT}};
+ {
+ ATTRIBUTE_ID_QUEUE_HANDLE_PARAMETERS_JSON,
+ "queueHandleParametersJson",
+ sizeof("queueHandleParametersJson") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* Context::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *Context::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 1; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- Context::ATTRIBUTE_INFO_ARRAY[i];
+ Context::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -1262,39 +1385,39 @@ const bdlat_AttributeInfo* Context::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* Context::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *Context::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_QUEUE_HANDLE_PARAMETERS_JSON:
- return &ATTRIBUTE_INFO_ARRAY
- [ATTRIBUTE_INDEX_QUEUE_HANDLE_PARAMETERS_JSON];
- default: return 0;
+ case ATTRIBUTE_ID_QUEUE_HANDLE_PARAMETERS_JSON:
+ return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_HANDLE_PARAMETERS_JSON];
+ default:
+ return 0;
}
}
// CREATORS
-Context::Context(bslma::Allocator* basicAllocator)
+Context::Context(bslma::Allocator *basicAllocator)
: d_queueHandleParametersJson(basicAllocator)
{
}
-Context::Context(const Context& original, bslma::Allocator* basicAllocator)
-: d_queueHandleParametersJson(original.d_queueHandleParametersJson,
- basicAllocator)
+Context::Context(const Context& original,
+ bslma::Allocator *basicAllocator)
+: d_queueHandleParametersJson(original.d_queueHandleParametersJson, basicAllocator)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Context::Context(Context&& original) noexcept
: d_queueHandleParametersJson(bsl::move(original.d_queueHandleParametersJson))
{
}
-Context::Context(Context&& original, bslma::Allocator* basicAllocator)
-: d_queueHandleParametersJson(bsl::move(original.d_queueHandleParametersJson),
- basicAllocator)
+Context::Context(Context&& original,
+ bslma::Allocator *basicAllocator)
+: d_queueHandleParametersJson(bsl::move(original.d_queueHandleParametersJson), basicAllocator)
{
}
#endif
@@ -1305,7 +1428,8 @@ Context::~Context()
// MANIPULATORS
-Context& Context::operator=(const Context& rhs)
+Context&
+Context::operator=(const Context& rhs)
{
if (this != &rhs) {
d_queueHandleParametersJson = rhs.d_queueHandleParametersJson;
@@ -1314,13 +1438,13 @@ Context& Context::operator=(const Context& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-Context& Context::operator=(Context&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+Context&
+Context::operator=(Context&& rhs)
{
if (this != &rhs) {
- d_queueHandleParametersJson = bsl::move(
- rhs.d_queueHandleParametersJson);
+ d_queueHandleParametersJson = bsl::move(rhs.d_queueHandleParametersJson);
}
return *this;
@@ -1334,43 +1458,50 @@ void Context::reset()
// ACCESSORS
-bsl::ostream&
-Context::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& Context::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
- printer.printAttribute("queueHandleParametersJson",
- this->queueHandleParametersJson());
+ printer.printAttribute("queueHandleParametersJson", this->queueHandleParametersJson());
printer.end();
return stream;
}
-// -----------------------
-// class DomainReconfigure
-// -----------------------
+
+
+ // -----------------------
+ // class DomainReconfigure
+ // -----------------------
// CONSTANTS
const char DomainReconfigure::CLASS_NAME[] = "DomainReconfigure";
const bdlat_SelectionInfo DomainReconfigure::SELECTION_INFO_ARRAY[] = {
- {SELECTION_ID_DOMAIN,
- "domain",
- sizeof("domain") - 1,
- "",
- bdlat_FormattingMode::e_TEXT}};
+ {
+ SELECTION_ID_DOMAIN,
+ "domain",
+ sizeof("domain") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ }
+};
// CLASS METHODS
-const bdlat_SelectionInfo*
-DomainReconfigure::lookupSelectionInfo(const char* name, int nameLength)
+const bdlat_SelectionInfo *DomainReconfigure::lookupSelectionInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 1; ++i) {
const bdlat_SelectionInfo& selectionInfo =
- DomainReconfigure::SELECTION_INFO_ARRAY[i];
+ DomainReconfigure::SELECTION_INFO_ARRAY[i];
- if (nameLength == selectionInfo.d_nameLength &&
- 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength)) {
+ if (nameLength == selectionInfo.d_nameLength
+ && 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength))
+ {
return &selectionInfo;
}
}
@@ -1378,71 +1509,81 @@ DomainReconfigure::lookupSelectionInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_SelectionInfo* DomainReconfigure::lookupSelectionInfo(int id)
+const bdlat_SelectionInfo *DomainReconfigure::lookupSelectionInfo(int id)
{
switch (id) {
- case SELECTION_ID_DOMAIN:
+ case SELECTION_ID_DOMAIN:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAIN];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-DomainReconfigure::DomainReconfigure(const DomainReconfigure& original,
- bslma::Allocator* basicAllocator)
+DomainReconfigure::DomainReconfigure(
+ const DomainReconfigure& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_DOMAIN: {
+ case SELECTION_ID_DOMAIN: {
new (d_domain.buffer())
- bsl::string(original.d_domain.object(), d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ bsl::string(
+ original.d_domain.object(), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
DomainReconfigure::DomainReconfigure(DomainReconfigure&& original) noexcept
-: d_selectionId(original.d_selectionId),
- d_allocator_p(original.d_allocator_p)
+: d_selectionId(original.d_selectionId)
+, d_allocator_p(original.d_allocator_p)
{
switch (d_selectionId) {
- case SELECTION_ID_DOMAIN: {
+ case SELECTION_ID_DOMAIN: {
new (d_domain.buffer())
- bsl::string(bsl::move(original.d_domain.object()), d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ bsl::string(
+ bsl::move(original.d_domain.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-DomainReconfigure::DomainReconfigure(DomainReconfigure&& original,
- bslma::Allocator* basicAllocator)
+DomainReconfigure::DomainReconfigure(
+ DomainReconfigure&& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_DOMAIN: {
+ case SELECTION_ID_DOMAIN: {
new (d_domain.buffer())
- bsl::string(bsl::move(original.d_domain.object()), d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ bsl::string(
+ bsl::move(original.d_domain.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
#endif
// MANIPULATORS
-DomainReconfigure& DomainReconfigure::operator=(const DomainReconfigure& rhs)
+DomainReconfigure&
+DomainReconfigure::operator=(const DomainReconfigure& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_DOMAIN: {
+ case SELECTION_ID_DOMAIN: {
makeDomain(rhs.d_domain.object());
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -1451,16 +1592,17 @@ DomainReconfigure& DomainReconfigure::operator=(const DomainReconfigure& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-DomainReconfigure& DomainReconfigure::operator=(DomainReconfigure&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+DomainReconfigure&
+DomainReconfigure::operator=(DomainReconfigure&& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_DOMAIN: {
+ case SELECTION_ID_DOMAIN: {
makeDomain(bsl::move(rhs.d_domain.object()));
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -1473,11 +1615,12 @@ DomainReconfigure& DomainReconfigure::operator=(DomainReconfigure&& rhs)
void DomainReconfigure::reset()
{
switch (d_selectionId) {
- case SELECTION_ID_DOMAIN: {
+ case SELECTION_ID_DOMAIN: {
typedef bsl::string Type;
d_domain.object().~Type();
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
d_selectionId = SELECTION_ID_UNDEFINED;
@@ -1486,23 +1629,24 @@ void DomainReconfigure::reset()
int DomainReconfigure::makeSelection(int selectionId)
{
switch (selectionId) {
- case SELECTION_ID_DOMAIN: {
+ case SELECTION_ID_DOMAIN: {
makeDomain();
- } break;
- case SELECTION_ID_UNDEFINED: {
+ } break;
+ case SELECTION_ID_UNDEFINED: {
reset();
- } break;
- default: return -1;
+ } break;
+ default:
+ return -1;
}
return 0;
}
-int DomainReconfigure::makeSelection(const char* name, int nameLength)
+int DomainReconfigure::makeSelection(const char *name, int nameLength)
{
- const bdlat_SelectionInfo* selectionInfo = lookupSelectionInfo(name,
- nameLength);
+ const bdlat_SelectionInfo *selectionInfo =
+ lookupSelectionInfo(name, nameLength);
if (0 == selectionInfo) {
- return -1;
+ return -1;
}
return makeSelection(selectionInfo->d_id);
@@ -1515,7 +1659,8 @@ bsl::string& DomainReconfigure::makeDomain()
}
else {
reset();
- new (d_domain.buffer()) bsl::string(d_allocator_p);
+ new (d_domain.buffer())
+ bsl::string(d_allocator_p);
d_selectionId = SELECTION_ID_DOMAIN;
}
@@ -1529,15 +1674,16 @@ bsl::string& DomainReconfigure::makeDomain(const bsl::string& value)
}
else {
reset();
- new (d_domain.buffer()) bsl::string(value, d_allocator_p);
+ new (d_domain.buffer())
+ bsl::string(value, d_allocator_p);
d_selectionId = SELECTION_ID_DOMAIN;
}
return d_domain.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
bsl::string& DomainReconfigure::makeDomain(bsl::string&& value)
{
if (SELECTION_ID_DOMAIN == d_selectionId) {
@@ -1545,7 +1691,8 @@ bsl::string& DomainReconfigure::makeDomain(bsl::string&& value)
}
else {
reset();
- new (d_domain.buffer()) bsl::string(bsl::move(value), d_allocator_p);
+ new (d_domain.buffer())
+ bsl::string(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_DOMAIN;
}
@@ -1555,72 +1702,99 @@ bsl::string& DomainReconfigure::makeDomain(bsl::string&& value)
// ACCESSORS
-bsl::ostream& DomainReconfigure::print(bsl::ostream& stream,
- int level,
- int spacesPerLevel) const
+bsl::ostream& DomainReconfigure::print(
+ bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
switch (d_selectionId) {
- case SELECTION_ID_DOMAIN: {
+ case SELECTION_ID_DOMAIN: {
printer.printAttribute("domain", d_domain.object());
- } break;
- default: stream << "SELECTION UNDEFINED\n";
+ } break;
+ default:
+ stream << "SELECTION UNDEFINED\n";
}
printer.end();
return stream;
}
-const char* DomainReconfigure::selectionName() const
+
+const char *DomainReconfigure::selectionName() const
{
switch (d_selectionId) {
- case SELECTION_ID_DOMAIN:
+ case SELECTION_ID_DOMAIN:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAIN].name();
- default:
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
return "(* UNDEFINED *)";
}
}
-// ------------------
-// class ElectorState
-// ------------------
+ // ------------------
+ // class ElectorState
+ // ------------------
// CONSTANTS
const char ElectorState::CLASS_NAME[] = "ElectorState";
const bdlat_EnumeratorInfo ElectorState::ENUMERATOR_INFO_ARRAY[] = {
- {ElectorState::DORMANT, "DORMANT", sizeof("DORMANT") - 1, ""},
- {ElectorState::FOLLOWER, "FOLLOWER", sizeof("FOLLOWER") - 1, ""},
- {ElectorState::CANDIDATE, "CANDIDATE", sizeof("CANDIDATE") - 1, ""},
- {ElectorState::LEADER, "LEADER", sizeof("LEADER") - 1, ""}};
+ {
+ ElectorState::DORMANT,
+ "DORMANT",
+ sizeof("DORMANT") - 1,
+ ""
+ },
+ {
+ ElectorState::FOLLOWER,
+ "FOLLOWER",
+ sizeof("FOLLOWER") - 1,
+ ""
+ },
+ {
+ ElectorState::CANDIDATE,
+ "CANDIDATE",
+ sizeof("CANDIDATE") - 1,
+ ""
+ },
+ {
+ ElectorState::LEADER,
+ "LEADER",
+ sizeof("LEADER") - 1,
+ ""
+ }
+};
// CLASS METHODS
-int ElectorState::fromInt(ElectorState::Value* result, int number)
+int ElectorState::fromInt(ElectorState::Value *result, int number)
{
switch (number) {
- case ElectorState::DORMANT:
- case ElectorState::FOLLOWER:
- case ElectorState::CANDIDATE:
- case ElectorState::LEADER:
+ case ElectorState::DORMANT:
+ case ElectorState::FOLLOWER:
+ case ElectorState::CANDIDATE:
+ case ElectorState::LEADER:
*result = static_cast(number);
return 0;
- default: return -1;
+ default:
+ return -1;
}
}
-int ElectorState::fromString(ElectorState::Value* result,
- const char* string,
- int stringLength)
+int ElectorState::fromString(
+ ElectorState::Value *result,
+ const char *string,
+ int stringLength)
{
for (int i = 0; i < 4; ++i) {
const bdlat_EnumeratorInfo& enumeratorInfo =
- ElectorState::ENUMERATOR_INFO_ARRAY[i];
+ ElectorState::ENUMERATOR_INFO_ARRAY[i];
- if (stringLength == enumeratorInfo.d_nameLength &&
- 0 == bsl::memcmp(enumeratorInfo.d_name_p, string, stringLength)) {
+ if (stringLength == enumeratorInfo.d_nameLength
+ && 0 == bsl::memcmp(enumeratorInfo.d_name_p, string, stringLength))
+ {
*result = static_cast(enumeratorInfo.d_value);
return 0;
}
@@ -1629,72 +1803,85 @@ int ElectorState::fromString(ElectorState::Value* result,
return -1;
}
-const char* ElectorState::toString(ElectorState::Value value)
+const char *ElectorState::toString(ElectorState::Value value)
{
switch (value) {
- case DORMANT: {
+ case DORMANT: {
return "DORMANT";
- }
- case FOLLOWER: {
+ }
+ case FOLLOWER: {
return "FOLLOWER";
- }
- case CANDIDATE: {
+ }
+ case CANDIDATE: {
return "CANDIDATE";
- }
- case LEADER: {
+ }
+ case LEADER: {
return "LEADER";
- }
+ }
}
BSLS_ASSERT(!"invalid enumerator");
return 0;
}
-// --------------------
-// class EncodingFormat
-// --------------------
+
+ // --------------------
+ // class EncodingFormat
+ // --------------------
// CONSTANTS
const char EncodingFormat::CLASS_NAME[] = "EncodingFormat";
const bdlat_EnumeratorInfo EncodingFormat::ENUMERATOR_INFO_ARRAY[] = {
- {EncodingFormat::TEXT, "TEXT", sizeof("TEXT") - 1, ""},
- {EncodingFormat::JSON_COMPACT,
- "JSON_COMPACT",
- sizeof("JSON_COMPACT") - 1,
- ""},
- {EncodingFormat::JSON_PRETTY,
- "JSON_PRETTY",
- sizeof("JSON_PRETTY") - 1,
- ""}};
+ {
+ EncodingFormat::TEXT,
+ "TEXT",
+ sizeof("TEXT") - 1,
+ ""
+ },
+ {
+ EncodingFormat::JSON_COMPACT,
+ "JSON_COMPACT",
+ sizeof("JSON_COMPACT") - 1,
+ ""
+ },
+ {
+ EncodingFormat::JSON_PRETTY,
+ "JSON_PRETTY",
+ sizeof("JSON_PRETTY") - 1,
+ ""
+ }
+};
// CLASS METHODS
-int EncodingFormat::fromInt(EncodingFormat::Value* result, int number)
+int EncodingFormat::fromInt(EncodingFormat::Value *result, int number)
{
switch (number) {
- case EncodingFormat::TEXT:
- case EncodingFormat::JSON_COMPACT:
- case EncodingFormat::JSON_PRETTY:
+ case EncodingFormat::TEXT:
+ case EncodingFormat::JSON_COMPACT:
+ case EncodingFormat::JSON_PRETTY:
*result = static_cast(number);
return 0;
- default: return -1;
+ default:
+ return -1;
}
}
-int EncodingFormat::fromString(EncodingFormat::Value* result,
- const char* string,
- int stringLength)
+int EncodingFormat::fromString(
+ EncodingFormat::Value *result,
+ const char *string,
+ int stringLength)
{
for (int i = 0; i < 3; ++i) {
const bdlat_EnumeratorInfo& enumeratorInfo =
- EncodingFormat::ENUMERATOR_INFO_ARRAY[i];
+ EncodingFormat::ENUMERATOR_INFO_ARRAY[i];
- if (stringLength == enumeratorInfo.d_nameLength &&
- 0 == bsl::memcmp(enumeratorInfo.d_name_p, string, stringLength)) {
- *result = static_cast(
- enumeratorInfo.d_value);
+ if (stringLength == enumeratorInfo.d_nameLength
+ && 0 == bsl::memcmp(enumeratorInfo.d_name_p, string, stringLength))
+ {
+ *result = static_cast(enumeratorInfo.d_value);
return 0;
}
}
@@ -1702,50 +1889,56 @@ int EncodingFormat::fromString(EncodingFormat::Value* result,
return -1;
}
-const char* EncodingFormat::toString(EncodingFormat::Value value)
+const char *EncodingFormat::toString(EncodingFormat::Value value)
{
switch (value) {
- case TEXT: {
+ case TEXT: {
return "TEXT";
- }
- case JSON_COMPACT: {
+ }
+ case JSON_COMPACT: {
return "JSON_COMPACT";
- }
- case JSON_PRETTY: {
+ }
+ case JSON_PRETTY: {
return "JSON_PRETTY";
- }
+ }
}
BSLS_ASSERT(!"invalid enumerator");
return 0;
}
-// -----------
-// class Error
-// -----------
+
+ // -----------
+ // class Error
+ // -----------
// CONSTANTS
const char Error::CLASS_NAME[] = "Error";
const bdlat_AttributeInfo Error::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_MESSAGE,
- "message",
- sizeof("message") - 1,
- "",
- bdlat_FormattingMode::e_TEXT}};
+ {
+ ATTRIBUTE_ID_MESSAGE,
+ "message",
+ sizeof("message") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* Error::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *Error::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 1; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- Error::ATTRIBUTE_INFO_ARRAY[i];
+ Error::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -1753,35 +1946,38 @@ const bdlat_AttributeInfo* Error::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* Error::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *Error::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_MESSAGE:
+ case ATTRIBUTE_ID_MESSAGE:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGE];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-Error::Error(bslma::Allocator* basicAllocator)
+Error::Error(bslma::Allocator *basicAllocator)
: d_message(basicAllocator)
{
}
-Error::Error(const Error& original, bslma::Allocator* basicAllocator)
+Error::Error(const Error& original,
+ bslma::Allocator *basicAllocator)
: d_message(original.d_message, basicAllocator)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Error::Error(Error&& original) noexcept
: d_message(bsl::move(original.d_message))
{
}
-Error::Error(Error&& original, bslma::Allocator* basicAllocator)
+Error::Error(Error&& original,
+ bslma::Allocator *basicAllocator)
: d_message(bsl::move(original.d_message), basicAllocator)
{
}
@@ -1793,7 +1989,8 @@ Error::~Error()
// MANIPULATORS
-Error& Error::operator=(const Error& rhs)
+Error&
+Error::operator=(const Error& rhs)
{
if (this != &rhs) {
d_message = rhs.d_message;
@@ -1802,9 +1999,10 @@ Error& Error::operator=(const Error& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-Error& Error::operator=(Error&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+Error&
+Error::operator=(Error&& rhs)
{
if (this != &rhs) {
d_message = bsl::move(rhs.d_message);
@@ -1821,8 +2019,9 @@ void Error::reset()
// ACCESSORS
-bsl::ostream&
-Error::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& Error::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
@@ -1831,42 +2030,53 @@ Error::print(bsl::ostream& stream, int level, int spacesPerLevel) const
return stream;
}
-// --------------
-// class FileInfo
-// --------------
+
+
+ // --------------
+ // class FileInfo
+ // --------------
// CONSTANTS
const char FileInfo::CLASS_NAME[] = "FileInfo";
const bdlat_AttributeInfo FileInfo::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_POSITION_BYTES,
- "positionBytes",
- sizeof("positionBytes") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_SIZE_BYTES,
- "sizeBytes",
- sizeof("sizeBytes") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_OUTSTANDING_BYTES,
- "outstandingBytes",
- sizeof("outstandingBytes") - 1,
- "",
- bdlat_FormattingMode::e_DEC}};
+ {
+ ATTRIBUTE_ID_POSITION_BYTES,
+ "positionBytes",
+ sizeof("positionBytes") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_SIZE_BYTES,
+ "sizeBytes",
+ sizeof("sizeBytes") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_OUTSTANDING_BYTES,
+ "outstandingBytes",
+ sizeof("outstandingBytes") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* FileInfo::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *FileInfo::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 3; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- FileInfo::ATTRIBUTE_INFO_ARRAY[i];
+ FileInfo::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -1874,16 +2084,17 @@ const bdlat_AttributeInfo* FileInfo::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* FileInfo::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *FileInfo::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_POSITION_BYTES:
+ case ATTRIBUTE_ID_POSITION_BYTES:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_POSITION_BYTES];
- case ATTRIBUTE_ID_SIZE_BYTES:
+ case ATTRIBUTE_ID_SIZE_BYTES:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SIZE_BYTES];
- case ATTRIBUTE_ID_OUTSTANDING_BYTES:
+ case ATTRIBUTE_ID_OUTSTANDING_BYTES:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_OUTSTANDING_BYTES];
- default: return 0;
+ default:
+ return 0;
}
}
@@ -1907,8 +2118,9 @@ void FileInfo::reset()
// ACCESSORS
-bsl::ostream&
-FileInfo::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& FileInfo::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
@@ -1919,37 +2131,46 @@ FileInfo::print(bsl::ostream& stream, int level, int spacesPerLevel) const
return stream;
}
-// -------------
-// class FileSet
-// -------------
+
+
+ // -------------
+ // class FileSet
+ // -------------
// CONSTANTS
const char FileSet::CLASS_NAME[] = "FileSet";
const bdlat_AttributeInfo FileSet::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_DATA_FILE_NAME,
- "dataFileName",
- sizeof("dataFileName") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_ALIASED_BLOB_BUFFER_COUNT,
- "aliasedBlobBufferCount",
- sizeof("aliasedBlobBufferCount") - 1,
- "",
- bdlat_FormattingMode::e_DEC}};
+ {
+ ATTRIBUTE_ID_DATA_FILE_NAME,
+ "dataFileName",
+ sizeof("dataFileName") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_ALIASED_BLOB_BUFFER_COUNT,
+ "aliasedBlobBufferCount",
+ sizeof("aliasedBlobBufferCount") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* FileSet::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *FileSet::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 2; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- FileSet::ATTRIBUTE_INFO_ARRAY[i];
+ FileSet::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -1957,41 +2178,43 @@ const bdlat_AttributeInfo* FileSet::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* FileSet::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *FileSet::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_DATA_FILE_NAME:
+ case ATTRIBUTE_ID_DATA_FILE_NAME:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DATA_FILE_NAME];
- case ATTRIBUTE_ID_ALIASED_BLOB_BUFFER_COUNT:
- return &ATTRIBUTE_INFO_ARRAY
- [ATTRIBUTE_INDEX_ALIASED_BLOB_BUFFER_COUNT];
- default: return 0;
+ case ATTRIBUTE_ID_ALIASED_BLOB_BUFFER_COUNT:
+ return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ALIASED_BLOB_BUFFER_COUNT];
+ default:
+ return 0;
}
}
// CREATORS
-FileSet::FileSet(bslma::Allocator* basicAllocator)
+FileSet::FileSet(bslma::Allocator *basicAllocator)
: d_aliasedBlobBufferCount()
, d_dataFileName(basicAllocator)
{
}
-FileSet::FileSet(const FileSet& original, bslma::Allocator* basicAllocator)
+FileSet::FileSet(const FileSet& original,
+ bslma::Allocator *basicAllocator)
: d_aliasedBlobBufferCount(original.d_aliasedBlobBufferCount)
, d_dataFileName(original.d_dataFileName, basicAllocator)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
FileSet::FileSet(FileSet&& original) noexcept
-: d_aliasedBlobBufferCount(bsl::move(original.d_aliasedBlobBufferCount)),
- d_dataFileName(bsl::move(original.d_dataFileName))
+: d_aliasedBlobBufferCount(bsl::move(original.d_aliasedBlobBufferCount))
+, d_dataFileName(bsl::move(original.d_dataFileName))
{
}
-FileSet::FileSet(FileSet&& original, bslma::Allocator* basicAllocator)
+FileSet::FileSet(FileSet&& original,
+ bslma::Allocator *basicAllocator)
: d_aliasedBlobBufferCount(bsl::move(original.d_aliasedBlobBufferCount))
, d_dataFileName(bsl::move(original.d_dataFileName), basicAllocator)
{
@@ -2004,22 +2227,24 @@ FileSet::~FileSet()
// MANIPULATORS
-FileSet& FileSet::operator=(const FileSet& rhs)
+FileSet&
+FileSet::operator=(const FileSet& rhs)
{
if (this != &rhs) {
- d_dataFileName = rhs.d_dataFileName;
+ d_dataFileName = rhs.d_dataFileName;
d_aliasedBlobBufferCount = rhs.d_aliasedBlobBufferCount;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-FileSet& FileSet::operator=(FileSet&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+FileSet&
+FileSet::operator=(FileSet&& rhs)
{
if (this != &rhs) {
- d_dataFileName = bsl::move(rhs.d_dataFileName);
+ d_dataFileName = bsl::move(rhs.d_dataFileName);
d_aliasedBlobBufferCount = bsl::move(rhs.d_aliasedBlobBufferCount);
}
@@ -2035,57 +2260,77 @@ void FileSet::reset()
// ACCESSORS
-bsl::ostream&
-FileSet::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& FileSet::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
printer.printAttribute("dataFileName", this->dataFileName());
- printer.printAttribute("aliasedBlobBufferCount",
- this->aliasedBlobBufferCount());
+ printer.printAttribute("aliasedBlobBufferCount", this->aliasedBlobBufferCount());
printer.end();
return stream;
}
-// --------------------
-// class FileStoreState
-// --------------------
+
+
+ // --------------------
+ // class FileStoreState
+ // --------------------
// CONSTANTS
const char FileStoreState::CLASS_NAME[] = "FileStoreState";
const bdlat_EnumeratorInfo FileStoreState::ENUMERATOR_INFO_ARRAY[] = {
- {FileStoreState::OPEN, "open", sizeof("open") - 1, ""},
- {FileStoreState::CLOSED, "closed", sizeof("closed") - 1, ""},
- {FileStoreState::STOPPING, "stopping", sizeof("stopping") - 1, ""}};
+ {
+ FileStoreState::OPEN,
+ "open",
+ sizeof("open") - 1,
+ ""
+ },
+ {
+ FileStoreState::CLOSED,
+ "closed",
+ sizeof("closed") - 1,
+ ""
+ },
+ {
+ FileStoreState::STOPPING,
+ "stopping",
+ sizeof("stopping") - 1,
+ ""
+ }
+};
// CLASS METHODS
-int FileStoreState::fromInt(FileStoreState::Value* result, int number)
+int FileStoreState::fromInt(FileStoreState::Value *result, int number)
{
switch (number) {
- case FileStoreState::OPEN:
- case FileStoreState::CLOSED:
- case FileStoreState::STOPPING:
+ case FileStoreState::OPEN:
+ case FileStoreState::CLOSED:
+ case FileStoreState::STOPPING:
*result = static_cast(number);
return 0;
- default: return -1;
+ default:
+ return -1;
}
}
-int FileStoreState::fromString(FileStoreState::Value* result,
- const char* string,
- int stringLength)
+int FileStoreState::fromString(
+ FileStoreState::Value *result,
+ const char *string,
+ int stringLength)
{
for (int i = 0; i < 3; ++i) {
const bdlat_EnumeratorInfo& enumeratorInfo =
- FileStoreState::ENUMERATOR_INFO_ARRAY[i];
+ FileStoreState::ENUMERATOR_INFO_ARRAY[i];
- if (stringLength == enumeratorInfo.d_nameLength &&
- 0 == bsl::memcmp(enumeratorInfo.d_name_p, string, stringLength)) {
- *result = static_cast(
- enumeratorInfo.d_value);
+ if (stringLength == enumeratorInfo.d_nameLength
+ && 0 == bsl::memcmp(enumeratorInfo.d_name_p, string, stringLength))
+ {
+ *result = static_cast(enumeratorInfo.d_value);
return 0;
}
}
@@ -2093,27 +2338,28 @@ int FileStoreState::fromString(FileStoreState::Value* result,
return -1;
}
-const char* FileStoreState::toString(FileStoreState::Value value)
+const char *FileStoreState::toString(FileStoreState::Value value)
{
switch (value) {
- case OPEN: {
+ case OPEN: {
return "open";
- }
- case CLOSED: {
+ }
+ case CLOSED: {
return "closed";
- }
- case STOPPING: {
+ }
+ case STOPPING: {
return "stopping";
- }
+ }
}
BSLS_ASSERT(!"invalid enumerator");
return 0;
}
-// -----------------
-// class HelpCommand
-// -----------------
+
+ // -----------------
+ // class HelpCommand
+ // -----------------
// CONSTANTS
@@ -2122,23 +2368,28 @@ const char HelpCommand::CLASS_NAME[] = "HelpCommand";
const bool HelpCommand::DEFAULT_INITIALIZER_PLUMBING = false;
const bdlat_AttributeInfo HelpCommand::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_PLUMBING,
- "plumbing",
- sizeof("plumbing") - 1,
- "",
- bdlat_FormattingMode::e_TEXT}};
+ {
+ ATTRIBUTE_ID_PLUMBING,
+ "plumbing",
+ sizeof("plumbing") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* HelpCommand::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *HelpCommand::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 1; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- HelpCommand::ATTRIBUTE_INFO_ARRAY[i];
+ HelpCommand::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -2146,12 +2397,13 @@ const bdlat_AttributeInfo* HelpCommand::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* HelpCommand::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *HelpCommand::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_PLUMBING:
+ case ATTRIBUTE_ID_PLUMBING:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PLUMBING];
- default: return 0;
+ default:
+ return 0;
}
}
@@ -2171,8 +2423,9 @@ void HelpCommand::reset()
// ACCESSORS
-bsl::ostream&
-HelpCommand::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& HelpCommand::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
@@ -2181,37 +2434,46 @@ HelpCommand::print(bsl::ostream& stream, int level, int spacesPerLevel) const
return stream;
}
-// ---------------------------
-// class LeaderMessageSequence
-// ---------------------------
+
+
+ // ---------------------------
+ // class LeaderMessageSequence
+ // ---------------------------
// CONSTANTS
const char LeaderMessageSequence::CLASS_NAME[] = "LeaderMessageSequence";
const bdlat_AttributeInfo LeaderMessageSequence::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_ELECTOR_TERM,
- "electorTerm",
- sizeof("electorTerm") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_SEQUENCE_NUMBER,
- "sequenceNumber",
- sizeof("sequenceNumber") - 1,
- "",
- bdlat_FormattingMode::e_DEC}};
+ {
+ ATTRIBUTE_ID_ELECTOR_TERM,
+ "electorTerm",
+ sizeof("electorTerm") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_SEQUENCE_NUMBER,
+ "sequenceNumber",
+ sizeof("sequenceNumber") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo*
-LeaderMessageSequence::lookupAttributeInfo(const char* name, int nameLength)
+const bdlat_AttributeInfo *LeaderMessageSequence::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 2; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- LeaderMessageSequence::ATTRIBUTE_INFO_ARRAY[i];
+ LeaderMessageSequence::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -2219,14 +2481,15 @@ LeaderMessageSequence::lookupAttributeInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_AttributeInfo* LeaderMessageSequence::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *LeaderMessageSequence::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_ELECTOR_TERM:
+ case ATTRIBUTE_ID_ELECTOR_TERM:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ELECTOR_TERM];
- case ATTRIBUTE_ID_SEQUENCE_NUMBER:
+ case ATTRIBUTE_ID_SEQUENCE_NUMBER:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SEQUENCE_NUMBER];
- default: return 0;
+ default:
+ return 0;
}
}
@@ -2260,43 +2523,64 @@ bsl::ostream& LeaderMessageSequence::print(bsl::ostream& stream,
return stream;
}
-// ------------------
-// class LeaderStatus
-// ------------------
+
+
+ // ------------------
+ // class LeaderStatus
+ // ------------------
// CONSTANTS
const char LeaderStatus::CLASS_NAME[] = "LeaderStatus";
const bdlat_EnumeratorInfo LeaderStatus::ENUMERATOR_INFO_ARRAY[] = {
- {LeaderStatus::UNDEFINED, "UNDEFINED", sizeof("UNDEFINED") - 1, ""},
- {LeaderStatus::PASSIVE, "PASSIVE", sizeof("PASSIVE") - 1, ""},
- {LeaderStatus::ACTIVE, "ACTIVE", sizeof("ACTIVE") - 1, ""}};
+ {
+ LeaderStatus::UNDEFINED,
+ "UNDEFINED",
+ sizeof("UNDEFINED") - 1,
+ ""
+ },
+ {
+ LeaderStatus::PASSIVE,
+ "PASSIVE",
+ sizeof("PASSIVE") - 1,
+ ""
+ },
+ {
+ LeaderStatus::ACTIVE,
+ "ACTIVE",
+ sizeof("ACTIVE") - 1,
+ ""
+ }
+};
// CLASS METHODS
-int LeaderStatus::fromInt(LeaderStatus::Value* result, int number)
+int LeaderStatus::fromInt(LeaderStatus::Value *result, int number)
{
switch (number) {
- case LeaderStatus::UNDEFINED:
- case LeaderStatus::PASSIVE:
- case LeaderStatus::ACTIVE:
+ case LeaderStatus::UNDEFINED:
+ case LeaderStatus::PASSIVE:
+ case LeaderStatus::ACTIVE:
*result = static_cast(number);
return 0;
- default: return -1;
+ default:
+ return -1;
}
}
-int LeaderStatus::fromString(LeaderStatus::Value* result,
- const char* string,
- int stringLength)
+int LeaderStatus::fromString(
+ LeaderStatus::Value *result,
+ const char *string,
+ int stringLength)
{
for (int i = 0; i < 3; ++i) {
const bdlat_EnumeratorInfo& enumeratorInfo =
- LeaderStatus::ENUMERATOR_INFO_ARRAY[i];
+ LeaderStatus::ENUMERATOR_INFO_ARRAY[i];
- if (stringLength == enumeratorInfo.d_nameLength &&
- 0 == bsl::memcmp(enumeratorInfo.d_name_p, string, stringLength)) {
+ if (stringLength == enumeratorInfo.d_nameLength
+ && 0 == bsl::memcmp(enumeratorInfo.d_name_p, string, stringLength))
+ {
*result = static_cast(enumeratorInfo.d_value);
return 0;
}
@@ -2305,60 +2589,70 @@ int LeaderStatus::fromString(LeaderStatus::Value* result,
return -1;
}
-const char* LeaderStatus::toString(LeaderStatus::Value value)
+const char *LeaderStatus::toString(LeaderStatus::Value value)
{
switch (value) {
- case UNDEFINED: {
+ case UNDEFINED: {
return "UNDEFINED";
- }
- case PASSIVE: {
+ }
+ case PASSIVE: {
return "PASSIVE";
- }
- case ACTIVE: {
+ }
+ case ACTIVE: {
return "ACTIVE";
- }
+ }
}
BSLS_ASSERT(!"invalid enumerator");
return 0;
}
-// ------------------------------
-// class LeastRecentlyUsedGroupId
-// ------------------------------
+
+ // ------------------------------
+ // class LeastRecentlyUsedGroupId
+ // ------------------------------
// CONSTANTS
const char LeastRecentlyUsedGroupId::CLASS_NAME[] = "LeastRecentlyUsedGroupId";
const bdlat_AttributeInfo LeastRecentlyUsedGroupId::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_CLIENT_DESCRIPTION,
- "clientDescription",
- sizeof("clientDescription") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_MSG_GROUP_ID,
- "msgGroupId",
- sizeof("msgGroupId") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_LAST_SEEN_DELTA_NANOSECONDS,
- "lastSeenDeltaNanoseconds",
- sizeof("lastSeenDeltaNanoseconds") - 1,
- "",
- bdlat_FormattingMode::e_DEC}};
+ {
+ ATTRIBUTE_ID_CLIENT_DESCRIPTION,
+ "clientDescription",
+ sizeof("clientDescription") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_MSG_GROUP_ID,
+ "msgGroupId",
+ sizeof("msgGroupId") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_LAST_SEEN_DELTA_NANOSECONDS,
+ "lastSeenDeltaNanoseconds",
+ sizeof("lastSeenDeltaNanoseconds") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo*
-LeastRecentlyUsedGroupId::lookupAttributeInfo(const char* name, int nameLength)
+const bdlat_AttributeInfo *LeastRecentlyUsedGroupId::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 3; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- LeastRecentlyUsedGroupId::ATTRIBUTE_INFO_ARRAY[i];
+ LeastRecentlyUsedGroupId::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -2366,53 +2660,48 @@ LeastRecentlyUsedGroupId::lookupAttributeInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_AttributeInfo*
-LeastRecentlyUsedGroupId::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *LeastRecentlyUsedGroupId::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_CLIENT_DESCRIPTION:
+ case ATTRIBUTE_ID_CLIENT_DESCRIPTION:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLIENT_DESCRIPTION];
- case ATTRIBUTE_ID_MSG_GROUP_ID:
+ case ATTRIBUTE_ID_MSG_GROUP_ID:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MSG_GROUP_ID];
- case ATTRIBUTE_ID_LAST_SEEN_DELTA_NANOSECONDS:
- return &ATTRIBUTE_INFO_ARRAY
- [ATTRIBUTE_INDEX_LAST_SEEN_DELTA_NANOSECONDS];
- default: return 0;
+ case ATTRIBUTE_ID_LAST_SEEN_DELTA_NANOSECONDS:
+ return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LAST_SEEN_DELTA_NANOSECONDS];
+ default:
+ return 0;
}
}
// CREATORS
-LeastRecentlyUsedGroupId::LeastRecentlyUsedGroupId(
- bslma::Allocator* basicAllocator)
+LeastRecentlyUsedGroupId::LeastRecentlyUsedGroupId(bslma::Allocator *basicAllocator)
: d_lastSeenDeltaNanoseconds()
, d_clientDescription(basicAllocator)
, d_msgGroupId(basicAllocator)
{
}
-LeastRecentlyUsedGroupId::LeastRecentlyUsedGroupId(
- const LeastRecentlyUsedGroupId& original,
- bslma::Allocator* basicAllocator)
+LeastRecentlyUsedGroupId::LeastRecentlyUsedGroupId(const LeastRecentlyUsedGroupId& original,
+ bslma::Allocator *basicAllocator)
: d_lastSeenDeltaNanoseconds(original.d_lastSeenDeltaNanoseconds)
, d_clientDescription(original.d_clientDescription, basicAllocator)
, d_msgGroupId(original.d_msgGroupId, basicAllocator)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-LeastRecentlyUsedGroupId::LeastRecentlyUsedGroupId(
- LeastRecentlyUsedGroupId&& original) noexcept
-: d_lastSeenDeltaNanoseconds(bsl::move(original.d_lastSeenDeltaNanoseconds)),
- d_clientDescription(bsl::move(original.d_clientDescription)),
- d_msgGroupId(bsl::move(original.d_msgGroupId))
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+LeastRecentlyUsedGroupId::LeastRecentlyUsedGroupId(LeastRecentlyUsedGroupId&& original) noexcept
+: d_lastSeenDeltaNanoseconds(bsl::move(original.d_lastSeenDeltaNanoseconds))
+, d_clientDescription(bsl::move(original.d_clientDescription))
+, d_msgGroupId(bsl::move(original.d_msgGroupId))
{
}
-LeastRecentlyUsedGroupId::LeastRecentlyUsedGroupId(
- LeastRecentlyUsedGroupId&& original,
- bslma::Allocator* basicAllocator)
+LeastRecentlyUsedGroupId::LeastRecentlyUsedGroupId(LeastRecentlyUsedGroupId&& original,
+ bslma::Allocator *basicAllocator)
: d_lastSeenDeltaNanoseconds(bsl::move(original.d_lastSeenDeltaNanoseconds))
, d_clientDescription(bsl::move(original.d_clientDescription), basicAllocator)
, d_msgGroupId(bsl::move(original.d_msgGroupId), basicAllocator)
@@ -2430,22 +2719,22 @@ LeastRecentlyUsedGroupId&
LeastRecentlyUsedGroupId::operator=(const LeastRecentlyUsedGroupId& rhs)
{
if (this != &rhs) {
- d_clientDescription = rhs.d_clientDescription;
- d_msgGroupId = rhs.d_msgGroupId;
+ d_clientDescription = rhs.d_clientDescription;
+ d_msgGroupId = rhs.d_msgGroupId;
d_lastSeenDeltaNanoseconds = rhs.d_lastSeenDeltaNanoseconds;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
LeastRecentlyUsedGroupId&
LeastRecentlyUsedGroupId::operator=(LeastRecentlyUsedGroupId&& rhs)
{
if (this != &rhs) {
- d_clientDescription = bsl::move(rhs.d_clientDescription);
- d_msgGroupId = bsl::move(rhs.d_msgGroupId);
+ d_clientDescription = bsl::move(rhs.d_clientDescription);
+ d_msgGroupId = bsl::move(rhs.d_msgGroupId);
d_lastSeenDeltaNanoseconds = bsl::move(rhs.d_lastSeenDeltaNanoseconds);
}
@@ -2462,56 +2751,67 @@ void LeastRecentlyUsedGroupId::reset()
// ACCESSORS
-bsl::ostream& LeastRecentlyUsedGroupId::print(bsl::ostream& stream,
- int level,
- int spacesPerLevel) const
+bsl::ostream& LeastRecentlyUsedGroupId::print(
+ bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
printer.printAttribute("clientDescription", this->clientDescription());
printer.printAttribute("msgGroupId", this->msgGroupId());
- printer.printAttribute("lastSeenDeltaNanoseconds",
- this->lastSeenDeltaNanoseconds());
+ printer.printAttribute("lastSeenDeltaNanoseconds", this->lastSeenDeltaNanoseconds());
printer.end();
return stream;
}
-// ------------------
-// class ListMessages
-// ------------------
+
+
+ // ------------------
+ // class ListMessages
+ // ------------------
// CONSTANTS
const char ListMessages::CLASS_NAME[] = "ListMessages";
const bdlat_AttributeInfo ListMessages::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_APP_ID,
- "appId",
- sizeof("appId") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_OFFSET,
- "offset",
- sizeof("offset") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_COUNT,
- "count",
- sizeof("count") - 1,
- "",
- bdlat_FormattingMode::e_DEC}};
+ {
+ ATTRIBUTE_ID_APP_ID,
+ "appId",
+ sizeof("appId") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_OFFSET,
+ "offset",
+ sizeof("offset") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_COUNT,
+ "count",
+ sizeof("count") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* ListMessages::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *ListMessages::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 3; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- ListMessages::ATTRIBUTE_INFO_ARRAY[i];
+ ListMessages::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -2519,22 +2819,23 @@ const bdlat_AttributeInfo* ListMessages::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* ListMessages::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *ListMessages::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_APP_ID:
+ case ATTRIBUTE_ID_APP_ID:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_ID];
- case ATTRIBUTE_ID_OFFSET:
+ case ATTRIBUTE_ID_OFFSET:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_OFFSET];
- case ATTRIBUTE_ID_COUNT:
+ case ATTRIBUTE_ID_COUNT:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COUNT];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-ListMessages::ListMessages(bslma::Allocator* basicAllocator)
+ListMessages::ListMessages(bslma::Allocator *basicAllocator)
: d_appId(basicAllocator)
, d_offset()
, d_count()
@@ -2542,24 +2843,24 @@ ListMessages::ListMessages(bslma::Allocator* basicAllocator)
}
ListMessages::ListMessages(const ListMessages& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_appId(original.d_appId, basicAllocator)
, d_offset(original.d_offset)
, d_count(original.d_count)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ListMessages::ListMessages(ListMessages&& original) noexcept
-: d_appId(bsl::move(original.d_appId)),
- d_offset(bsl::move(original.d_offset)),
- d_count(bsl::move(original.d_count))
+: d_appId(bsl::move(original.d_appId))
+, d_offset(bsl::move(original.d_offset))
+, d_count(bsl::move(original.d_count))
{
}
-ListMessages::ListMessages(ListMessages&& original,
- bslma::Allocator* basicAllocator)
+ListMessages::ListMessages(ListMessages&& original,
+ bslma::Allocator *basicAllocator)
: d_appId(bsl::move(original.d_appId), basicAllocator)
, d_offset(bsl::move(original.d_offset))
, d_count(bsl::move(original.d_count))
@@ -2573,25 +2874,27 @@ ListMessages::~ListMessages()
// MANIPULATORS
-ListMessages& ListMessages::operator=(const ListMessages& rhs)
+ListMessages&
+ListMessages::operator=(const ListMessages& rhs)
{
if (this != &rhs) {
- d_appId = rhs.d_appId;
+ d_appId = rhs.d_appId;
d_offset = rhs.d_offset;
- d_count = rhs.d_count;
+ d_count = rhs.d_count;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-ListMessages& ListMessages::operator=(ListMessages&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ListMessages&
+ListMessages::operator=(ListMessages&& rhs)
{
if (this != &rhs) {
- d_appId = bsl::move(rhs.d_appId);
+ d_appId = bsl::move(rhs.d_appId);
d_offset = bsl::move(rhs.d_offset);
- d_count = bsl::move(rhs.d_count);
+ d_count = bsl::move(rhs.d_count);
}
return *this;
@@ -2607,8 +2910,9 @@ void ListMessages::reset()
// ACCESSORS
-bsl::ostream&
-ListMessages::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& ListMessages::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
@@ -2619,43 +2923,64 @@ ListMessages::print(bsl::ostream& stream, int level, int spacesPerLevel) const
return stream;
}
-// --------------
-// class Locality
-// --------------
+
+
+ // --------------
+ // class Locality
+ // --------------
// CONSTANTS
const char Locality::CLASS_NAME[] = "Locality";
const bdlat_EnumeratorInfo Locality::ENUMERATOR_INFO_ARRAY[] = {
- {Locality::REMOTE, "remote", sizeof("remote") - 1, ""},
- {Locality::LOCAL, "local", sizeof("local") - 1, ""},
- {Locality::MEMBER, "member", sizeof("member") - 1, ""}};
+ {
+ Locality::REMOTE,
+ "remote",
+ sizeof("remote") - 1,
+ ""
+ },
+ {
+ Locality::LOCAL,
+ "local",
+ sizeof("local") - 1,
+ ""
+ },
+ {
+ Locality::MEMBER,
+ "member",
+ sizeof("member") - 1,
+ ""
+ }
+};
// CLASS METHODS
-int Locality::fromInt(Locality::Value* result, int number)
+int Locality::fromInt(Locality::Value *result, int number)
{
switch (number) {
- case Locality::REMOTE:
- case Locality::LOCAL:
- case Locality::MEMBER:
+ case Locality::REMOTE:
+ case Locality::LOCAL:
+ case Locality::MEMBER:
*result = static_cast(number);
return 0;
- default: return -1;
+ default:
+ return -1;
}
}
-int Locality::fromString(Locality::Value* result,
- const char* string,
- int stringLength)
+int Locality::fromString(
+ Locality::Value *result,
+ const char *string,
+ int stringLength)
{
for (int i = 0; i < 3; ++i) {
const bdlat_EnumeratorInfo& enumeratorInfo =
- Locality::ENUMERATOR_INFO_ARRAY[i];
+ Locality::ENUMERATOR_INFO_ARRAY[i];
- if (stringLength == enumeratorInfo.d_nameLength &&
- 0 == bsl::memcmp(enumeratorInfo.d_name_p, string, stringLength)) {
+ if (stringLength == enumeratorInfo.d_nameLength
+ && 0 == bsl::memcmp(enumeratorInfo.d_name_p, string, stringLength))
+ {
*result = static_cast(enumeratorInfo.d_value);
return 0;
}
@@ -2664,60 +2989,70 @@ int Locality::fromString(Locality::Value* result,
return -1;
}
-const char* Locality::toString(Locality::Value value)
+const char *Locality::toString(Locality::Value value)
{
switch (value) {
- case REMOTE: {
+ case REMOTE: {
return "remote";
- }
- case LOCAL: {
+ }
+ case LOCAL: {
return "local";
- }
- case MEMBER: {
+ }
+ case MEMBER: {
return "member";
- }
+ }
}
BSLS_ASSERT(!"invalid enumerator");
return 0;
}
-// -------------
-// class Message
-// -------------
+
+ // -------------
+ // class Message
+ // -------------
// CONSTANTS
const char Message::CLASS_NAME[] = "Message";
const bdlat_AttributeInfo Message::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_GUID,
- "guid",
- sizeof("guid") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_SIZE_BYTES,
- "sizeBytes",
- sizeof("sizeBytes") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_ARRIVAL_TIMESTAMP,
- "arrivalTimestamp",
- sizeof("arrivalTimestamp") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ ATTRIBUTE_ID_GUID,
+ "guid",
+ sizeof("guid") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_SIZE_BYTES,
+ "sizeBytes",
+ sizeof("sizeBytes") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_ARRIVAL_TIMESTAMP,
+ "arrivalTimestamp",
+ sizeof("arrivalTimestamp") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* Message::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *Message::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 3; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- Message::ATTRIBUTE_INFO_ARRAY[i];
+ Message::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -2725,44 +3060,48 @@ const bdlat_AttributeInfo* Message::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* Message::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *Message::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_GUID: return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_GUID];
- case ATTRIBUTE_ID_SIZE_BYTES:
+ case ATTRIBUTE_ID_GUID:
+ return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_GUID];
+ case ATTRIBUTE_ID_SIZE_BYTES:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SIZE_BYTES];
- case ATTRIBUTE_ID_ARRIVAL_TIMESTAMP:
+ case ATTRIBUTE_ID_ARRIVAL_TIMESTAMP:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ARRIVAL_TIMESTAMP];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-Message::Message(bslma::Allocator* basicAllocator)
+Message::Message(bslma::Allocator *basicAllocator)
: d_sizeBytes()
, d_guid(basicAllocator)
, d_arrivalTimestamp()
{
}
-Message::Message(const Message& original, bslma::Allocator* basicAllocator)
+Message::Message(const Message& original,
+ bslma::Allocator *basicAllocator)
: d_sizeBytes(original.d_sizeBytes)
, d_guid(original.d_guid, basicAllocator)
, d_arrivalTimestamp(original.d_arrivalTimestamp)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Message::Message(Message&& original) noexcept
-: d_sizeBytes(bsl::move(original.d_sizeBytes)),
- d_guid(bsl::move(original.d_guid)),
- d_arrivalTimestamp(bsl::move(original.d_arrivalTimestamp))
+: d_sizeBytes(bsl::move(original.d_sizeBytes))
+, d_guid(bsl::move(original.d_guid))
+, d_arrivalTimestamp(bsl::move(original.d_arrivalTimestamp))
{
}
-Message::Message(Message&& original, bslma::Allocator* basicAllocator)
+Message::Message(Message&& original,
+ bslma::Allocator *basicAllocator)
: d_sizeBytes(bsl::move(original.d_sizeBytes))
, d_guid(bsl::move(original.d_guid), basicAllocator)
, d_arrivalTimestamp(bsl::move(original.d_arrivalTimestamp))
@@ -2776,24 +3115,26 @@ Message::~Message()
// MANIPULATORS
-Message& Message::operator=(const Message& rhs)
+Message&
+Message::operator=(const Message& rhs)
{
if (this != &rhs) {
- d_guid = rhs.d_guid;
- d_sizeBytes = rhs.d_sizeBytes;
+ d_guid = rhs.d_guid;
+ d_sizeBytes = rhs.d_sizeBytes;
d_arrivalTimestamp = rhs.d_arrivalTimestamp;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-Message& Message::operator=(Message&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+Message&
+Message::operator=(Message&& rhs)
{
if (this != &rhs) {
- d_guid = bsl::move(rhs.d_guid);
- d_sizeBytes = bsl::move(rhs.d_sizeBytes);
+ d_guid = bsl::move(rhs.d_guid);
+ d_sizeBytes = bsl::move(rhs.d_sizeBytes);
d_arrivalTimestamp = bsl::move(rhs.d_arrivalTimestamp);
}
@@ -2810,8 +3151,9 @@ void Message::reset()
// ACCESSORS
-bsl::ostream&
-Message::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& Message::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
@@ -2822,50 +3164,78 @@ Message::print(bsl::ostream& stream, int level, int spacesPerLevel) const
return stream;
}
-// ----------------
-// class NodeStatus
-// ----------------
+
+
+ // ----------------
+ // class NodeStatus
+ // ----------------
// CONSTANTS
const char NodeStatus::CLASS_NAME[] = "NodeStatus";
const bdlat_EnumeratorInfo NodeStatus::ENUMERATOR_INFO_ARRAY[] = {
- {NodeStatus::E_UNKNOWN, "E_UNKNOWN", sizeof("E_UNKNOWN") - 1, ""},
- {NodeStatus::E_STARTING, "E_STARTING", sizeof("E_STARTING") - 1, ""},
- {NodeStatus::E_AVAILABLE, "E_AVAILABLE", sizeof("E_AVAILABLE") - 1, ""},
- {NodeStatus::E_STOPPING, "E_STOPPING", sizeof("E_STOPPING") - 1, ""},
- {NodeStatus::E_UNAVAILABLE,
- "E_UNAVAILABLE",
- sizeof("E_UNAVAILABLE") - 1,
- ""}};
+ {
+ NodeStatus::E_UNKNOWN,
+ "E_UNKNOWN",
+ sizeof("E_UNKNOWN") - 1,
+ ""
+ },
+ {
+ NodeStatus::E_STARTING,
+ "E_STARTING",
+ sizeof("E_STARTING") - 1,
+ ""
+ },
+ {
+ NodeStatus::E_AVAILABLE,
+ "E_AVAILABLE",
+ sizeof("E_AVAILABLE") - 1,
+ ""
+ },
+ {
+ NodeStatus::E_STOPPING,
+ "E_STOPPING",
+ sizeof("E_STOPPING") - 1,
+ ""
+ },
+ {
+ NodeStatus::E_UNAVAILABLE,
+ "E_UNAVAILABLE",
+ sizeof("E_UNAVAILABLE") - 1,
+ ""
+ }
+};
// CLASS METHODS
-int NodeStatus::fromInt(NodeStatus::Value* result, int number)
+int NodeStatus::fromInt(NodeStatus::Value *result, int number)
{
switch (number) {
- case NodeStatus::E_UNKNOWN:
- case NodeStatus::E_STARTING:
- case NodeStatus::E_AVAILABLE:
- case NodeStatus::E_STOPPING:
- case NodeStatus::E_UNAVAILABLE:
+ case NodeStatus::E_UNKNOWN:
+ case NodeStatus::E_STARTING:
+ case NodeStatus::E_AVAILABLE:
+ case NodeStatus::E_STOPPING:
+ case NodeStatus::E_UNAVAILABLE:
*result = static_cast(number);
return 0;
- default: return -1;
+ default:
+ return -1;
}
}
-int NodeStatus::fromString(NodeStatus::Value* result,
- const char* string,
- int stringLength)
+int NodeStatus::fromString(
+ NodeStatus::Value *result,
+ const char *string,
+ int stringLength)
{
for (int i = 0; i < 5; ++i) {
const bdlat_EnumeratorInfo& enumeratorInfo =
- NodeStatus::ENUMERATOR_INFO_ARRAY[i];
+ NodeStatus::ENUMERATOR_INFO_ARRAY[i];
- if (stringLength == enumeratorInfo.d_nameLength &&
- 0 == bsl::memcmp(enumeratorInfo.d_name_p, string, stringLength)) {
+ if (stringLength == enumeratorInfo.d_nameLength
+ && 0 == bsl::memcmp(enumeratorInfo.d_name_p, string, stringLength))
+ {
*result = static_cast(enumeratorInfo.d_value);
return 0;
}
@@ -2874,69 +3244,88 @@ int NodeStatus::fromString(NodeStatus::Value* result,
return -1;
}
-const char* NodeStatus::toString(NodeStatus::Value value)
+const char *NodeStatus::toString(NodeStatus::Value value)
{
switch (value) {
- case E_UNKNOWN: {
+ case E_UNKNOWN: {
return "E_UNKNOWN";
- }
- case E_STARTING: {
+ }
+ case E_STARTING: {
return "E_STARTING";
- }
- case E_AVAILABLE: {
+ }
+ case E_AVAILABLE: {
return "E_AVAILABLE";
- }
- case E_STOPPING: {
+ }
+ case E_STOPPING: {
return "E_STOPPING";
- }
- case E_UNAVAILABLE: {
+ }
+ case E_UNAVAILABLE: {
return "E_UNAVAILABLE";
- }
+ }
}
BSLS_ASSERT(!"invalid enumerator");
return 0;
}
-// -------------------
-// class PrimaryStatus
-// -------------------
+
+ // -------------------
+ // class PrimaryStatus
+ // -------------------
// CONSTANTS
const char PrimaryStatus::CLASS_NAME[] = "PrimaryStatus";
const bdlat_EnumeratorInfo PrimaryStatus::ENUMERATOR_INFO_ARRAY[] = {
- {PrimaryStatus::UNDEFINED, "UNDEFINED", sizeof("UNDEFINED") - 1, ""},
- {PrimaryStatus::PASSIVE, "PASSIVE", sizeof("PASSIVE") - 1, ""},
- {PrimaryStatus::ACTIVE, "ACTIVE", sizeof("ACTIVE") - 1, ""}};
+ {
+ PrimaryStatus::UNDEFINED,
+ "UNDEFINED",
+ sizeof("UNDEFINED") - 1,
+ ""
+ },
+ {
+ PrimaryStatus::PASSIVE,
+ "PASSIVE",
+ sizeof("PASSIVE") - 1,
+ ""
+ },
+ {
+ PrimaryStatus::ACTIVE,
+ "ACTIVE",
+ sizeof("ACTIVE") - 1,
+ ""
+ }
+};
// CLASS METHODS
-int PrimaryStatus::fromInt(PrimaryStatus::Value* result, int number)
+int PrimaryStatus::fromInt(PrimaryStatus::Value *result, int number)
{
switch (number) {
- case PrimaryStatus::UNDEFINED:
- case PrimaryStatus::PASSIVE:
- case PrimaryStatus::ACTIVE:
+ case PrimaryStatus::UNDEFINED:
+ case PrimaryStatus::PASSIVE:
+ case PrimaryStatus::ACTIVE:
*result = static_cast(number);
return 0;
- default: return -1;
+ default:
+ return -1;
}
}
-int PrimaryStatus::fromString(PrimaryStatus::Value* result,
- const char* string,
- int stringLength)
+int PrimaryStatus::fromString(
+ PrimaryStatus::Value *result,
+ const char *string,
+ int stringLength)
{
for (int i = 0; i < 3; ++i) {
const bdlat_EnumeratorInfo& enumeratorInfo =
- PrimaryStatus::ENUMERATOR_INFO_ARRAY[i];
+ PrimaryStatus::ENUMERATOR_INFO_ARRAY[i];
- if (stringLength == enumeratorInfo.d_nameLength &&
- 0 == bsl::memcmp(enumeratorInfo.d_name_p, string, stringLength)) {
- *result = static_cast(
- enumeratorInfo.d_value);
+ if (stringLength == enumeratorInfo.d_nameLength
+ && 0 == bsl::memcmp(enumeratorInfo.d_name_p, string, stringLength))
+ {
+ *result = static_cast(enumeratorInfo.d_value);
return 0;
}
}
@@ -2944,70 +3333,84 @@ int PrimaryStatus::fromString(PrimaryStatus::Value* result,
return -1;
}
-const char* PrimaryStatus::toString(PrimaryStatus::Value value)
+const char *PrimaryStatus::toString(PrimaryStatus::Value value)
{
switch (value) {
- case UNDEFINED: {
+ case UNDEFINED: {
return "UNDEFINED";
- }
- case PASSIVE: {
+ }
+ case PASSIVE: {
return "PASSIVE";
- }
- case ACTIVE: {
+ }
+ case ACTIVE: {
return "ACTIVE";
- }
+ }
}
BSLS_ASSERT(!"invalid enumerator");
return 0;
}
-// ------------------------
-// class PurgedQueueDetails
-// ------------------------
+
+ // ------------------------
+ // class PurgedQueueDetails
+ // ------------------------
// CONSTANTS
const char PurgedQueueDetails::CLASS_NAME[] = "PurgedQueueDetails";
const bdlat_AttributeInfo PurgedQueueDetails::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_QUEUE_URI,
- "queueUri",
- sizeof("queueUri") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_APP_ID,
- "appId",
- sizeof("appId") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_APP_KEY,
- "appKey",
- sizeof("appKey") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_NUM_MESSAGES_PURGED,
- "numMessagesPurged",
- sizeof("numMessagesPurged") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_NUM_BYTES_PURGED,
- "numBytesPurged",
- sizeof("numBytesPurged") - 1,
- "",
- bdlat_FormattingMode::e_DEC}};
+ {
+ ATTRIBUTE_ID_QUEUE_URI,
+ "queueUri",
+ sizeof("queueUri") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_APP_ID,
+ "appId",
+ sizeof("appId") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_APP_KEY,
+ "appKey",
+ sizeof("appKey") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_NUM_MESSAGES_PURGED,
+ "numMessagesPurged",
+ sizeof("numMessagesPurged") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_NUM_BYTES_PURGED,
+ "numBytesPurged",
+ sizeof("numBytesPurged") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo*
-PurgedQueueDetails::lookupAttributeInfo(const char* name, int nameLength)
+const bdlat_AttributeInfo *PurgedQueueDetails::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 5; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- PurgedQueueDetails::ATTRIBUTE_INFO_ARRAY[i];
+ PurgedQueueDetails::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -3015,26 +3418,27 @@ PurgedQueueDetails::lookupAttributeInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_AttributeInfo* PurgedQueueDetails::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *PurgedQueueDetails::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_QUEUE_URI:
+ case ATTRIBUTE_ID_QUEUE_URI:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_URI];
- case ATTRIBUTE_ID_APP_ID:
+ case ATTRIBUTE_ID_APP_ID:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_ID];
- case ATTRIBUTE_ID_APP_KEY:
+ case ATTRIBUTE_ID_APP_KEY:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_KEY];
- case ATTRIBUTE_ID_NUM_MESSAGES_PURGED:
+ case ATTRIBUTE_ID_NUM_MESSAGES_PURGED:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES_PURGED];
- case ATTRIBUTE_ID_NUM_BYTES_PURGED:
+ case ATTRIBUTE_ID_NUM_BYTES_PURGED:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES_PURGED];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-PurgedQueueDetails::PurgedQueueDetails(bslma::Allocator* basicAllocator)
+PurgedQueueDetails::PurgedQueueDetails(bslma::Allocator *basicAllocator)
: d_numMessagesPurged()
, d_numBytesPurged()
, d_queueUri(basicAllocator)
@@ -3044,7 +3448,7 @@ PurgedQueueDetails::PurgedQueueDetails(bslma::Allocator* basicAllocator)
}
PurgedQueueDetails::PurgedQueueDetails(const PurgedQueueDetails& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_numMessagesPurged(original.d_numMessagesPurged)
, d_numBytesPurged(original.d_numBytesPurged)
, d_queueUri(original.d_queueUri, basicAllocator)
@@ -3053,19 +3457,19 @@ PurgedQueueDetails::PurgedQueueDetails(const PurgedQueueDetails& original,
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
PurgedQueueDetails::PurgedQueueDetails(PurgedQueueDetails&& original) noexcept
-: d_numMessagesPurged(bsl::move(original.d_numMessagesPurged)),
- d_numBytesPurged(bsl::move(original.d_numBytesPurged)),
- d_queueUri(bsl::move(original.d_queueUri)),
- d_appId(bsl::move(original.d_appId)),
- d_appKey(bsl::move(original.d_appKey))
+: d_numMessagesPurged(bsl::move(original.d_numMessagesPurged))
+, d_numBytesPurged(bsl::move(original.d_numBytesPurged))
+, d_queueUri(bsl::move(original.d_queueUri))
+, d_appId(bsl::move(original.d_appId))
+, d_appKey(bsl::move(original.d_appKey))
{
}
PurgedQueueDetails::PurgedQueueDetails(PurgedQueueDetails&& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_numMessagesPurged(bsl::move(original.d_numMessagesPurged))
, d_numBytesPurged(bsl::move(original.d_numBytesPurged))
, d_queueUri(bsl::move(original.d_queueUri), basicAllocator)
@@ -3085,26 +3489,27 @@ PurgedQueueDetails&
PurgedQueueDetails::operator=(const PurgedQueueDetails& rhs)
{
if (this != &rhs) {
- d_queueUri = rhs.d_queueUri;
- d_appId = rhs.d_appId;
- d_appKey = rhs.d_appKey;
+ d_queueUri = rhs.d_queueUri;
+ d_appId = rhs.d_appId;
+ d_appKey = rhs.d_appKey;
d_numMessagesPurged = rhs.d_numMessagesPurged;
- d_numBytesPurged = rhs.d_numBytesPurged;
+ d_numBytesPurged = rhs.d_numBytesPurged;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-PurgedQueueDetails& PurgedQueueDetails::operator=(PurgedQueueDetails&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+PurgedQueueDetails&
+PurgedQueueDetails::operator=(PurgedQueueDetails&& rhs)
{
if (this != &rhs) {
- d_queueUri = bsl::move(rhs.d_queueUri);
- d_appId = bsl::move(rhs.d_appId);
- d_appKey = bsl::move(rhs.d_appKey);
+ d_queueUri = bsl::move(rhs.d_queueUri);
+ d_appId = bsl::move(rhs.d_appId);
+ d_appKey = bsl::move(rhs.d_appKey);
d_numMessagesPurged = bsl::move(rhs.d_numMessagesPurged);
- d_numBytesPurged = bsl::move(rhs.d_numBytesPurged);
+ d_numBytesPurged = bsl::move(rhs.d_numBytesPurged);
}
return *this;
@@ -3137,44 +3542,53 @@ bsl::ostream& PurgedQueueDetails::print(bsl::ostream& stream,
return stream;
}
-// -------------------------------
-// class RelayQueueEngineSubStream
-// -------------------------------
+
+
+ // -------------------------------
+ // class RelayQueueEngineSubStream
+ // -------------------------------
// CONSTANTS
-const char RelayQueueEngineSubStream::CLASS_NAME[] =
- "RelayQueueEngineSubStream";
+const char RelayQueueEngineSubStream::CLASS_NAME[] = "RelayQueueEngineSubStream";
const bdlat_AttributeInfo RelayQueueEngineSubStream::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_APP_ID,
- "appId",
- sizeof("appId") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_APP_KEY,
- "appKey",
- sizeof("appKey") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_NUM_MESSAGES,
- "numMessages",
- sizeof("numMessages") - 1,
- "",
- bdlat_FormattingMode::e_DEC}};
+ {
+ ATTRIBUTE_ID_APP_ID,
+ "appId",
+ sizeof("appId") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_APP_KEY,
+ "appKey",
+ sizeof("appKey") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_NUM_MESSAGES,
+ "numMessages",
+ sizeof("numMessages") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo*
-RelayQueueEngineSubStream::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *RelayQueueEngineSubStream::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 3; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- RelayQueueEngineSubStream::ATTRIBUTE_INFO_ARRAY[i];
+ RelayQueueEngineSubStream::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -3182,52 +3596,48 @@ RelayQueueEngineSubStream::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo*
-RelayQueueEngineSubStream::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *RelayQueueEngineSubStream::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_APP_ID:
+ case ATTRIBUTE_ID_APP_ID:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_ID];
- case ATTRIBUTE_ID_APP_KEY:
+ case ATTRIBUTE_ID_APP_KEY:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_KEY];
- case ATTRIBUTE_ID_NUM_MESSAGES:
+ case ATTRIBUTE_ID_NUM_MESSAGES:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-RelayQueueEngineSubStream::RelayQueueEngineSubStream(
- bslma::Allocator* basicAllocator)
+RelayQueueEngineSubStream::RelayQueueEngineSubStream(bslma::Allocator *basicAllocator)
: d_appId(basicAllocator)
, d_appKey(basicAllocator)
, d_numMessages()
{
}
-RelayQueueEngineSubStream::RelayQueueEngineSubStream(
- const RelayQueueEngineSubStream& original,
- bslma::Allocator* basicAllocator)
+RelayQueueEngineSubStream::RelayQueueEngineSubStream(const RelayQueueEngineSubStream& original,
+ bslma::Allocator *basicAllocator)
: d_appId(original.d_appId, basicAllocator)
, d_appKey(original.d_appKey, basicAllocator)
, d_numMessages(original.d_numMessages)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-RelayQueueEngineSubStream::RelayQueueEngineSubStream(
- RelayQueueEngineSubStream&& original) noexcept
-: d_appId(bsl::move(original.d_appId)),
- d_appKey(bsl::move(original.d_appKey)),
- d_numMessages(bsl::move(original.d_numMessages))
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+RelayQueueEngineSubStream::RelayQueueEngineSubStream(RelayQueueEngineSubStream&& original) noexcept
+: d_appId(bsl::move(original.d_appId))
+, d_appKey(bsl::move(original.d_appKey))
+, d_numMessages(bsl::move(original.d_numMessages))
{
}
-RelayQueueEngineSubStream::RelayQueueEngineSubStream(
- RelayQueueEngineSubStream&& original,
- bslma::Allocator* basicAllocator)
+RelayQueueEngineSubStream::RelayQueueEngineSubStream(RelayQueueEngineSubStream&& original,
+ bslma::Allocator *basicAllocator)
: d_appId(bsl::move(original.d_appId), basicAllocator)
, d_appKey(bsl::move(original.d_appKey), basicAllocator)
, d_numMessages(bsl::move(original.d_numMessages))
@@ -3245,22 +3655,22 @@ RelayQueueEngineSubStream&
RelayQueueEngineSubStream::operator=(const RelayQueueEngineSubStream& rhs)
{
if (this != &rhs) {
- d_appId = rhs.d_appId;
- d_appKey = rhs.d_appKey;
+ d_appId = rhs.d_appId;
+ d_appKey = rhs.d_appKey;
d_numMessages = rhs.d_numMessages;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
RelayQueueEngineSubStream&
RelayQueueEngineSubStream::operator=(RelayQueueEngineSubStream&& rhs)
{
if (this != &rhs) {
- d_appId = bsl::move(rhs.d_appId);
- d_appKey = bsl::move(rhs.d_appKey);
+ d_appId = bsl::move(rhs.d_appId);
+ d_appKey = bsl::move(rhs.d_appKey);
d_numMessages = bsl::move(rhs.d_numMessages);
}
@@ -3277,9 +3687,10 @@ void RelayQueueEngineSubStream::reset()
// ACCESSORS
-bsl::ostream& RelayQueueEngineSubStream::print(bsl::ostream& stream,
- int level,
- int spacesPerLevel) const
+bsl::ostream& RelayQueueEngineSubStream::print(
+ bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
@@ -3290,38 +3701,53 @@ bsl::ostream& RelayQueueEngineSubStream::print(bsl::ostream& stream,
return stream;
}
-// ----------------------
-// class RemoteStreamInfo
-// ----------------------
+
+
+ // ----------------------
+ // class RemoteStreamInfo
+ // ----------------------
// CONSTANTS
const char RemoteStreamInfo::CLASS_NAME[] = "RemoteStreamInfo";
const bdlat_AttributeInfo RemoteStreamInfo::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_ID, "id", sizeof("id") - 1, "", bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_STATE,
- "state",
- sizeof("state") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_GEN_COUNT,
- "genCount",
- sizeof("genCount") - 1,
- "",
- bdlat_FormattingMode::e_DEC}};
+ {
+ ATTRIBUTE_ID_ID,
+ "id",
+ sizeof("id") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_STATE,
+ "state",
+ sizeof("state") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_GEN_COUNT,
+ "genCount",
+ sizeof("genCount") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo*
-RemoteStreamInfo::lookupAttributeInfo(const char* name, int nameLength)
+const bdlat_AttributeInfo *RemoteStreamInfo::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 3; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- RemoteStreamInfo::ATTRIBUTE_INFO_ARRAY[i];
+ RemoteStreamInfo::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -3329,21 +3755,23 @@ RemoteStreamInfo::lookupAttributeInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_AttributeInfo* RemoteStreamInfo::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *RemoteStreamInfo::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_ID: return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ID];
- case ATTRIBUTE_ID_STATE:
+ case ATTRIBUTE_ID_ID:
+ return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ID];
+ case ATTRIBUTE_ID_STATE:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STATE];
- case ATTRIBUTE_ID_GEN_COUNT:
+ case ATTRIBUTE_ID_GEN_COUNT:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_GEN_COUNT];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-RemoteStreamInfo::RemoteStreamInfo(bslma::Allocator* basicAllocator)
+RemoteStreamInfo::RemoteStreamInfo(bslma::Allocator *basicAllocator)
: d_genCount()
, d_state(basicAllocator)
, d_id()
@@ -3351,24 +3779,24 @@ RemoteStreamInfo::RemoteStreamInfo(bslma::Allocator* basicAllocator)
}
RemoteStreamInfo::RemoteStreamInfo(const RemoteStreamInfo& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_genCount(original.d_genCount)
, d_state(original.d_state, basicAllocator)
, d_id(original.d_id)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
RemoteStreamInfo::RemoteStreamInfo(RemoteStreamInfo&& original) noexcept
-: d_genCount(bsl::move(original.d_genCount)),
- d_state(bsl::move(original.d_state)),
- d_id(bsl::move(original.d_id))
+: d_genCount(bsl::move(original.d_genCount))
+, d_state(bsl::move(original.d_state))
+, d_id(bsl::move(original.d_id))
{
}
RemoteStreamInfo::RemoteStreamInfo(RemoteStreamInfo&& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_genCount(bsl::move(original.d_genCount))
, d_state(bsl::move(original.d_state), basicAllocator)
, d_id(bsl::move(original.d_id))
@@ -3382,24 +3810,26 @@ RemoteStreamInfo::~RemoteStreamInfo()
// MANIPULATORS
-RemoteStreamInfo& RemoteStreamInfo::operator=(const RemoteStreamInfo& rhs)
+RemoteStreamInfo&
+RemoteStreamInfo::operator=(const RemoteStreamInfo& rhs)
{
if (this != &rhs) {
- d_id = rhs.d_id;
- d_state = rhs.d_state;
+ d_id = rhs.d_id;
+ d_state = rhs.d_state;
d_genCount = rhs.d_genCount;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-RemoteStreamInfo& RemoteStreamInfo::operator=(RemoteStreamInfo&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+RemoteStreamInfo&
+RemoteStreamInfo::operator=(RemoteStreamInfo&& rhs)
{
if (this != &rhs) {
- d_id = bsl::move(rhs.d_id);
- d_state = bsl::move(rhs.d_state);
+ d_id = bsl::move(rhs.d_id);
+ d_state = bsl::move(rhs.d_state);
d_genCount = bsl::move(rhs.d_genCount);
}
@@ -3429,58 +3859,65 @@ bsl::ostream& RemoteStreamInfo::print(bsl::ostream& stream,
return stream;
}
-// -------------------------------
-// class ResourceUsageMonitorState
-// -------------------------------
+
+
+ // -------------------------------
+ // class ResourceUsageMonitorState
+ // -------------------------------
// CONSTANTS
-const char ResourceUsageMonitorState::CLASS_NAME[] =
- "ResourceUsageMonitorState";
-
-const bdlat_EnumeratorInfo ResourceUsageMonitorState::ENUMERATOR_INFO_ARRAY[] =
- {{ResourceUsageMonitorState::STATE_NORMAL,
- "STATE_NORMAL",
- sizeof("STATE_NORMAL") - 1,
- ""},
- {ResourceUsageMonitorState::STATE_HIGH_WATERMARK,
- "STATE_HIGH_WATERMARK",
- sizeof("STATE_HIGH_WATERMARK") - 1,
- ""},
- {ResourceUsageMonitorState::STATE_FULL,
- "STATE_FULL",
- sizeof("STATE_FULL") - 1,
- ""}};
+const char ResourceUsageMonitorState::CLASS_NAME[] = "ResourceUsageMonitorState";
+
+const bdlat_EnumeratorInfo ResourceUsageMonitorState::ENUMERATOR_INFO_ARRAY[] = {
+ {
+ ResourceUsageMonitorState::STATE_NORMAL,
+ "STATE_NORMAL",
+ sizeof("STATE_NORMAL") - 1,
+ ""
+ },
+ {
+ ResourceUsageMonitorState::STATE_HIGH_WATERMARK,
+ "STATE_HIGH_WATERMARK",
+ sizeof("STATE_HIGH_WATERMARK") - 1,
+ ""
+ },
+ {
+ ResourceUsageMonitorState::STATE_FULL,
+ "STATE_FULL",
+ sizeof("STATE_FULL") - 1,
+ ""
+ }
+};
// CLASS METHODS
-int ResourceUsageMonitorState::fromInt(
- ResourceUsageMonitorState::Value* result,
- int number)
+int ResourceUsageMonitorState::fromInt(ResourceUsageMonitorState::Value *result, int number)
{
switch (number) {
- case ResourceUsageMonitorState::STATE_NORMAL:
- case ResourceUsageMonitorState::STATE_HIGH_WATERMARK:
- case ResourceUsageMonitorState::STATE_FULL:
+ case ResourceUsageMonitorState::STATE_NORMAL:
+ case ResourceUsageMonitorState::STATE_HIGH_WATERMARK:
+ case ResourceUsageMonitorState::STATE_FULL:
*result = static_cast(number);
return 0;
- default: return -1;
+ default:
+ return -1;
}
}
int ResourceUsageMonitorState::fromString(
- ResourceUsageMonitorState::Value* result,
- const char* string,
- int stringLength)
+ ResourceUsageMonitorState::Value *result,
+ const char *string,
+ int stringLength)
{
for (int i = 0; i < 3; ++i) {
const bdlat_EnumeratorInfo& enumeratorInfo =
- ResourceUsageMonitorState::ENUMERATOR_INFO_ARRAY[i];
+ ResourceUsageMonitorState::ENUMERATOR_INFO_ARRAY[i];
- if (stringLength == enumeratorInfo.d_nameLength &&
- 0 == bsl::memcmp(enumeratorInfo.d_name_p, string, stringLength)) {
- *result = static_cast(
- enumeratorInfo.d_value);
+ if (stringLength == enumeratorInfo.d_nameLength
+ && 0 == bsl::memcmp(enumeratorInfo.d_name_p, string, stringLength))
+ {
+ *result = static_cast(enumeratorInfo.d_value);
return 0;
}
}
@@ -3488,56 +3925,63 @@ int ResourceUsageMonitorState::fromString(
return -1;
}
-const char*
-ResourceUsageMonitorState::toString(ResourceUsageMonitorState::Value value)
+const char *ResourceUsageMonitorState::toString(ResourceUsageMonitorState::Value value)
{
switch (value) {
- case STATE_NORMAL: {
+ case STATE_NORMAL: {
return "STATE_NORMAL";
- }
- case STATE_HIGH_WATERMARK: {
+ }
+ case STATE_HIGH_WATERMARK: {
return "STATE_HIGH_WATERMARK";
- }
- case STATE_FULL: {
+ }
+ case STATE_FULL: {
return "STATE_FULL";
- }
+ }
}
BSLS_ASSERT(!"invalid enumerator");
return 0;
}
-// -------------------
-// class RouteResponse
-// -------------------
+
+ // -------------------
+ // class RouteResponse
+ // -------------------
// CONSTANTS
const char RouteResponse::CLASS_NAME[] = "RouteResponse";
const bdlat_AttributeInfo RouteResponse::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_SOURCE_NODE_DESCRIPTION,
- "sourceNodeDescription",
- sizeof("sourceNodeDescription") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_RESPONSE,
- "response",
- sizeof("response") - 1,
- "",
- bdlat_FormattingMode::e_TEXT}};
+ {
+ ATTRIBUTE_ID_SOURCE_NODE_DESCRIPTION,
+ "sourceNodeDescription",
+ sizeof("sourceNodeDescription") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_RESPONSE,
+ "response",
+ sizeof("response") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* RouteResponse::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *RouteResponse::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 2; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- RouteResponse::ATTRIBUTE_INFO_ARRAY[i];
+ RouteResponse::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -3545,44 +3989,44 @@ const bdlat_AttributeInfo* RouteResponse::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* RouteResponse::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *RouteResponse::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_SOURCE_NODE_DESCRIPTION:
+ case ATTRIBUTE_ID_SOURCE_NODE_DESCRIPTION:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SOURCE_NODE_DESCRIPTION];
- case ATTRIBUTE_ID_RESPONSE:
+ case ATTRIBUTE_ID_RESPONSE:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_RESPONSE];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-RouteResponse::RouteResponse(bslma::Allocator* basicAllocator)
+RouteResponse::RouteResponse(bslma::Allocator *basicAllocator)
: d_sourceNodeDescription(basicAllocator)
, d_response(basicAllocator)
{
}
RouteResponse::RouteResponse(const RouteResponse& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_sourceNodeDescription(original.d_sourceNodeDescription, basicAllocator)
, d_response(original.d_response, basicAllocator)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
RouteResponse::RouteResponse(RouteResponse&& original) noexcept
-: d_sourceNodeDescription(bsl::move(original.d_sourceNodeDescription)),
- d_response(bsl::move(original.d_response))
+: d_sourceNodeDescription(bsl::move(original.d_sourceNodeDescription))
+, d_response(bsl::move(original.d_response))
{
}
-RouteResponse::RouteResponse(RouteResponse&& original,
- bslma::Allocator* basicAllocator)
-: d_sourceNodeDescription(bsl::move(original.d_sourceNodeDescription),
- basicAllocator)
+RouteResponse::RouteResponse(RouteResponse&& original,
+ bslma::Allocator *basicAllocator)
+: d_sourceNodeDescription(bsl::move(original.d_sourceNodeDescription), basicAllocator)
, d_response(bsl::move(original.d_response), basicAllocator)
{
}
@@ -3594,23 +4038,25 @@ RouteResponse::~RouteResponse()
// MANIPULATORS
-RouteResponse& RouteResponse::operator=(const RouteResponse& rhs)
+RouteResponse&
+RouteResponse::operator=(const RouteResponse& rhs)
{
if (this != &rhs) {
d_sourceNodeDescription = rhs.d_sourceNodeDescription;
- d_response = rhs.d_response;
+ d_response = rhs.d_response;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-RouteResponse& RouteResponse::operator=(RouteResponse&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+RouteResponse&
+RouteResponse::operator=(RouteResponse&& rhs)
{
if (this != &rhs) {
d_sourceNodeDescription = bsl::move(rhs.d_sourceNodeDescription);
- d_response = bsl::move(rhs.d_response);
+ d_response = bsl::move(rhs.d_response);
}
return *this;
@@ -3625,44 +4071,51 @@ void RouteResponse::reset()
// ACCESSORS
-bsl::ostream&
-RouteResponse::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& RouteResponse::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
- printer.printAttribute("sourceNodeDescription",
- this->sourceNodeDescription());
+ printer.printAttribute("sourceNodeDescription", this->sourceNodeDescription());
printer.printAttribute("response", this->response());
printer.end();
return stream;
}
-// -------------------------
-// class StorageQueueCommand
-// -------------------------
+
+
+ // -------------------------
+ // class StorageQueueCommand
+ // -------------------------
// CONSTANTS
const char StorageQueueCommand::CLASS_NAME[] = "StorageQueueCommand";
const bdlat_SelectionInfo StorageQueueCommand::SELECTION_INFO_ARRAY[] = {
- {SELECTION_ID_PURGE_APP_ID,
- "purgeAppId",
- sizeof("purgeAppId") - 1,
- "",
- bdlat_FormattingMode::e_TEXT}};
+ {
+ SELECTION_ID_PURGE_APP_ID,
+ "purgeAppId",
+ sizeof("purgeAppId") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ }
+};
// CLASS METHODS
-const bdlat_SelectionInfo*
-StorageQueueCommand::lookupSelectionInfo(const char* name, int nameLength)
+const bdlat_SelectionInfo *StorageQueueCommand::lookupSelectionInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 1; ++i) {
const bdlat_SelectionInfo& selectionInfo =
- StorageQueueCommand::SELECTION_INFO_ARRAY[i];
+ StorageQueueCommand::SELECTION_INFO_ARRAY[i];
- if (nameLength == selectionInfo.d_nameLength &&
- 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength)) {
+ if (nameLength == selectionInfo.d_nameLength
+ && 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength))
+ {
return &selectionInfo;
}
}
@@ -3670,59 +4123,66 @@ StorageQueueCommand::lookupSelectionInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_SelectionInfo* StorageQueueCommand::lookupSelectionInfo(int id)
+const bdlat_SelectionInfo *StorageQueueCommand::lookupSelectionInfo(int id)
{
switch (id) {
- case SELECTION_ID_PURGE_APP_ID:
+ case SELECTION_ID_PURGE_APP_ID:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_PURGE_APP_ID];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-StorageQueueCommand::StorageQueueCommand(const StorageQueueCommand& original,
- bslma::Allocator* basicAllocator)
+StorageQueueCommand::StorageQueueCommand(
+ const StorageQueueCommand& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_PURGE_APP_ID: {
+ case SELECTION_ID_PURGE_APP_ID: {
new (d_purgeAppId.buffer())
- bsl::string(original.d_purgeAppId.object(), d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ bsl::string(
+ original.d_purgeAppId.object(), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-StorageQueueCommand::StorageQueueCommand(StorageQueueCommand&& original)
- noexcept : d_selectionId(original.d_selectionId),
- d_allocator_p(original.d_allocator_p)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+StorageQueueCommand::StorageQueueCommand(StorageQueueCommand&& original) noexcept
+: d_selectionId(original.d_selectionId)
+, d_allocator_p(original.d_allocator_p)
{
switch (d_selectionId) {
- case SELECTION_ID_PURGE_APP_ID: {
+ case SELECTION_ID_PURGE_APP_ID: {
new (d_purgeAppId.buffer())
- bsl::string(bsl::move(original.d_purgeAppId.object()),
- d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ bsl::string(
+ bsl::move(original.d_purgeAppId.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-StorageQueueCommand::StorageQueueCommand(StorageQueueCommand&& original,
- bslma::Allocator* basicAllocator)
+StorageQueueCommand::StorageQueueCommand(
+ StorageQueueCommand&& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_PURGE_APP_ID: {
+ case SELECTION_ID_PURGE_APP_ID: {
new (d_purgeAppId.buffer())
- bsl::string(bsl::move(original.d_purgeAppId.object()),
- d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ bsl::string(
+ bsl::move(original.d_purgeAppId.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
#endif
@@ -3734,10 +4194,10 @@ StorageQueueCommand::operator=(const StorageQueueCommand& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_PURGE_APP_ID: {
+ case SELECTION_ID_PURGE_APP_ID: {
makePurgeAppId(rhs.d_purgeAppId.object());
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -3746,16 +4206,17 @@ StorageQueueCommand::operator=(const StorageQueueCommand& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-StorageQueueCommand& StorageQueueCommand::operator=(StorageQueueCommand&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+StorageQueueCommand&
+StorageQueueCommand::operator=(StorageQueueCommand&& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_PURGE_APP_ID: {
+ case SELECTION_ID_PURGE_APP_ID: {
makePurgeAppId(bsl::move(rhs.d_purgeAppId.object()));
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -3768,11 +4229,12 @@ StorageQueueCommand& StorageQueueCommand::operator=(StorageQueueCommand&& rhs)
void StorageQueueCommand::reset()
{
switch (d_selectionId) {
- case SELECTION_ID_PURGE_APP_ID: {
+ case SELECTION_ID_PURGE_APP_ID: {
typedef bsl::string Type;
d_purgeAppId.object().~Type();
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
d_selectionId = SELECTION_ID_UNDEFINED;
@@ -3781,23 +4243,24 @@ void StorageQueueCommand::reset()
int StorageQueueCommand::makeSelection(int selectionId)
{
switch (selectionId) {
- case SELECTION_ID_PURGE_APP_ID: {
+ case SELECTION_ID_PURGE_APP_ID: {
makePurgeAppId();
- } break;
- case SELECTION_ID_UNDEFINED: {
+ } break;
+ case SELECTION_ID_UNDEFINED: {
reset();
- } break;
- default: return -1;
+ } break;
+ default:
+ return -1;
}
return 0;
}
-int StorageQueueCommand::makeSelection(const char* name, int nameLength)
+int StorageQueueCommand::makeSelection(const char *name, int nameLength)
{
- const bdlat_SelectionInfo* selectionInfo = lookupSelectionInfo(name,
- nameLength);
+ const bdlat_SelectionInfo *selectionInfo =
+ lookupSelectionInfo(name, nameLength);
if (0 == selectionInfo) {
- return -1;
+ return -1;
}
return makeSelection(selectionInfo->d_id);
@@ -3810,7 +4273,8 @@ bsl::string& StorageQueueCommand::makePurgeAppId()
}
else {
reset();
- new (d_purgeAppId.buffer()) bsl::string(d_allocator_p);
+ new (d_purgeAppId.buffer())
+ bsl::string(d_allocator_p);
d_selectionId = SELECTION_ID_PURGE_APP_ID;
}
@@ -3824,15 +4288,16 @@ bsl::string& StorageQueueCommand::makePurgeAppId(const bsl::string& value)
}
else {
reset();
- new (d_purgeAppId.buffer()) bsl::string(value, d_allocator_p);
+ new (d_purgeAppId.buffer())
+ bsl::string(value, d_allocator_p);
d_selectionId = SELECTION_ID_PURGE_APP_ID;
}
return d_purgeAppId.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
bsl::string& StorageQueueCommand::makePurgeAppId(bsl::string&& value)
{
if (SELECTION_ID_PURGE_APP_ID == d_selectionId) {
@@ -3841,7 +4306,7 @@ bsl::string& StorageQueueCommand::makePurgeAppId(bsl::string&& value)
else {
reset();
new (d_purgeAppId.buffer())
- bsl::string(bsl::move(value), d_allocator_p);
+ bsl::string(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_PURGE_APP_ID;
}
@@ -3851,89 +4316,109 @@ bsl::string& StorageQueueCommand::makePurgeAppId(bsl::string&& value)
// ACCESSORS
-bsl::ostream& StorageQueueCommand::print(bsl::ostream& stream,
- int level,
- int spacesPerLevel) const
+bsl::ostream& StorageQueueCommand::print(
+ bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
switch (d_selectionId) {
- case SELECTION_ID_PURGE_APP_ID: {
+ case SELECTION_ID_PURGE_APP_ID: {
printer.printAttribute("purgeAppId", d_purgeAppId.object());
- } break;
- default: stream << "SELECTION UNDEFINED\n";
+ } break;
+ default:
+ stream << "SELECTION UNDEFINED\n";
}
printer.end();
return stream;
}
-const char* StorageQueueCommand::selectionName() const
+
+const char *StorageQueueCommand::selectionName() const
{
switch (d_selectionId) {
- case SELECTION_ID_PURGE_APP_ID:
+ case SELECTION_ID_PURGE_APP_ID:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_PURGE_APP_ID].name();
- default:
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
return "(* UNDEFINED *)";
}
}
-// ----------------------
-// class StorageQueueInfo
-// ----------------------
+ // ----------------------
+ // class StorageQueueInfo
+ // ----------------------
// CONSTANTS
const char StorageQueueInfo::CLASS_NAME[] = "StorageQueueInfo";
const bdlat_AttributeInfo StorageQueueInfo::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_QUEUE_URI,
- "queueUri",
- sizeof("queueUri") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_QUEUE_KEY,
- "queueKey",
- sizeof("queueKey") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_PARTITION_ID,
- "partitionId",
- sizeof("partitionId") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_NUM_MESSAGES,
- "numMessages",
- sizeof("numMessages") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_NUM_BYTES,
- "numBytes",
- sizeof("numBytes") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_IS_PERSISTENT,
- "isPersistent",
- sizeof("isPersistent") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_INTERNAL_QUEUE_ID,
- "internalQueueId",
- sizeof("internalQueueId") - 1,
- "",
- bdlat_FormattingMode::e_DEC}};
+ {
+ ATTRIBUTE_ID_QUEUE_URI,
+ "queueUri",
+ sizeof("queueUri") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_QUEUE_KEY,
+ "queueKey",
+ sizeof("queueKey") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_PARTITION_ID,
+ "partitionId",
+ sizeof("partitionId") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_NUM_MESSAGES,
+ "numMessages",
+ sizeof("numMessages") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_NUM_BYTES,
+ "numBytes",
+ sizeof("numBytes") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_IS_PERSISTENT,
+ "isPersistent",
+ sizeof("isPersistent") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_INTERNAL_QUEUE_ID,
+ "internalQueueId",
+ sizeof("internalQueueId") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo*
-StorageQueueInfo::lookupAttributeInfo(const char* name, int nameLength)
+const bdlat_AttributeInfo *StorageQueueInfo::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 7; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- StorageQueueInfo::ATTRIBUTE_INFO_ARRAY[i];
+ StorageQueueInfo::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -3941,30 +4426,31 @@ StorageQueueInfo::lookupAttributeInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_AttributeInfo* StorageQueueInfo::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *StorageQueueInfo::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_QUEUE_URI:
+ case ATTRIBUTE_ID_QUEUE_URI:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_URI];
- case ATTRIBUTE_ID_QUEUE_KEY:
+ case ATTRIBUTE_ID_QUEUE_KEY:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_KEY];
- case ATTRIBUTE_ID_PARTITION_ID:
+ case ATTRIBUTE_ID_PARTITION_ID:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITION_ID];
- case ATTRIBUTE_ID_NUM_MESSAGES:
+ case ATTRIBUTE_ID_NUM_MESSAGES:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES];
- case ATTRIBUTE_ID_NUM_BYTES:
+ case ATTRIBUTE_ID_NUM_BYTES:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES];
- case ATTRIBUTE_ID_IS_PERSISTENT:
+ case ATTRIBUTE_ID_IS_PERSISTENT:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_PERSISTENT];
- case ATTRIBUTE_ID_INTERNAL_QUEUE_ID:
+ case ATTRIBUTE_ID_INTERNAL_QUEUE_ID:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_INTERNAL_QUEUE_ID];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-StorageQueueInfo::StorageQueueInfo(bslma::Allocator* basicAllocator)
+StorageQueueInfo::StorageQueueInfo(bslma::Allocator *basicAllocator)
: d_numMessages()
, d_numBytes()
, d_queueUri(basicAllocator)
@@ -3976,7 +4462,7 @@ StorageQueueInfo::StorageQueueInfo(bslma::Allocator* basicAllocator)
}
StorageQueueInfo::StorageQueueInfo(const StorageQueueInfo& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_numMessages(original.d_numMessages)
, d_numBytes(original.d_numBytes)
, d_queueUri(original.d_queueUri, basicAllocator)
@@ -3987,21 +4473,21 @@ StorageQueueInfo::StorageQueueInfo(const StorageQueueInfo& original,
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
StorageQueueInfo::StorageQueueInfo(StorageQueueInfo&& original) noexcept
-: d_numMessages(bsl::move(original.d_numMessages)),
- d_numBytes(bsl::move(original.d_numBytes)),
- d_queueUri(bsl::move(original.d_queueUri)),
- d_queueKey(bsl::move(original.d_queueKey)),
- d_internalQueueId(bsl::move(original.d_internalQueueId)),
- d_partitionId(bsl::move(original.d_partitionId)),
- d_isPersistent(bsl::move(original.d_isPersistent))
+: d_numMessages(bsl::move(original.d_numMessages))
+, d_numBytes(bsl::move(original.d_numBytes))
+, d_queueUri(bsl::move(original.d_queueUri))
+, d_queueKey(bsl::move(original.d_queueKey))
+, d_internalQueueId(bsl::move(original.d_internalQueueId))
+, d_partitionId(bsl::move(original.d_partitionId))
+, d_isPersistent(bsl::move(original.d_isPersistent))
{
}
StorageQueueInfo::StorageQueueInfo(StorageQueueInfo&& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_numMessages(bsl::move(original.d_numMessages))
, d_numBytes(bsl::move(original.d_numBytes))
, d_queueUri(bsl::move(original.d_queueUri), basicAllocator)
@@ -4019,32 +4505,34 @@ StorageQueueInfo::~StorageQueueInfo()
// MANIPULATORS
-StorageQueueInfo& StorageQueueInfo::operator=(const StorageQueueInfo& rhs)
+StorageQueueInfo&
+StorageQueueInfo::operator=(const StorageQueueInfo& rhs)
{
if (this != &rhs) {
- d_queueUri = rhs.d_queueUri;
- d_queueKey = rhs.d_queueKey;
- d_partitionId = rhs.d_partitionId;
- d_numMessages = rhs.d_numMessages;
- d_numBytes = rhs.d_numBytes;
- d_isPersistent = rhs.d_isPersistent;
+ d_queueUri = rhs.d_queueUri;
+ d_queueKey = rhs.d_queueKey;
+ d_partitionId = rhs.d_partitionId;
+ d_numMessages = rhs.d_numMessages;
+ d_numBytes = rhs.d_numBytes;
+ d_isPersistent = rhs.d_isPersistent;
d_internalQueueId = rhs.d_internalQueueId;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-StorageQueueInfo& StorageQueueInfo::operator=(StorageQueueInfo&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+StorageQueueInfo&
+StorageQueueInfo::operator=(StorageQueueInfo&& rhs)
{
if (this != &rhs) {
- d_queueUri = bsl::move(rhs.d_queueUri);
- d_queueKey = bsl::move(rhs.d_queueKey);
- d_partitionId = bsl::move(rhs.d_partitionId);
- d_numMessages = bsl::move(rhs.d_numMessages);
- d_numBytes = bsl::move(rhs.d_numBytes);
- d_isPersistent = bsl::move(rhs.d_isPersistent);
+ d_queueUri = bsl::move(rhs.d_queueUri);
+ d_queueKey = bsl::move(rhs.d_queueKey);
+ d_partitionId = bsl::move(rhs.d_partitionId);
+ d_numMessages = bsl::move(rhs.d_numMessages);
+ d_numBytes = bsl::move(rhs.d_numBytes);
+ d_isPersistent = bsl::move(rhs.d_isPersistent);
d_internalQueueId = bsl::move(rhs.d_internalQueueId);
}
@@ -4082,37 +4570,46 @@ bsl::ostream& StorageQueueInfo::print(bsl::ostream& stream,
return stream;
}
-// -----------
-// class SubId
-// -----------
+
+
+ // -----------
+ // class SubId
+ // -----------
// CONSTANTS
const char SubId::CLASS_NAME[] = "SubId";
const bdlat_AttributeInfo SubId::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_SUB_ID,
- "subId",
- sizeof("subId") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_APP_ID,
- "appId",
- sizeof("appId") - 1,
- "",
- bdlat_FormattingMode::e_TEXT}};
+ {
+ ATTRIBUTE_ID_SUB_ID,
+ "subId",
+ sizeof("subId") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_APP_ID,
+ "appId",
+ sizeof("appId") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* SubId::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *SubId::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 2; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- SubId::ATTRIBUTE_INFO_ARRAY[i];
+ SubId::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -4120,39 +4617,43 @@ const bdlat_AttributeInfo* SubId::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* SubId::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *SubId::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_SUB_ID:
+ case ATTRIBUTE_ID_SUB_ID:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUB_ID];
- case ATTRIBUTE_ID_APP_ID:
+ case ATTRIBUTE_ID_APP_ID:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_ID];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-SubId::SubId(bslma::Allocator* basicAllocator)
+SubId::SubId(bslma::Allocator *basicAllocator)
: d_appId(basicAllocator)
, d_subId()
{
}
-SubId::SubId(const SubId& original, bslma::Allocator* basicAllocator)
+SubId::SubId(const SubId& original,
+ bslma::Allocator *basicAllocator)
: d_appId(original.d_appId, basicAllocator)
, d_subId(original.d_subId)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-SubId::SubId(SubId&& original) noexcept : d_appId(bsl::move(original.d_appId)),
- d_subId(bsl::move(original.d_subId))
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+SubId::SubId(SubId&& original) noexcept
+: d_appId(bsl::move(original.d_appId))
+, d_subId(bsl::move(original.d_subId))
{
}
-SubId::SubId(SubId&& original, bslma::Allocator* basicAllocator)
+SubId::SubId(SubId&& original,
+ bslma::Allocator *basicAllocator)
: d_appId(bsl::move(original.d_appId), basicAllocator)
, d_subId(bsl::move(original.d_subId))
{
@@ -4165,7 +4666,8 @@ SubId::~SubId()
// MANIPULATORS
-SubId& SubId::operator=(const SubId& rhs)
+SubId&
+SubId::operator=(const SubId& rhs)
{
if (this != &rhs) {
d_subId = rhs.d_subId;
@@ -4175,9 +4677,10 @@ SubId& SubId::operator=(const SubId& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-SubId& SubId::operator=(SubId&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+SubId&
+SubId::operator=(SubId&& rhs)
{
if (this != &rhs) {
d_subId = bsl::move(rhs.d_subId);
@@ -4196,8 +4699,9 @@ void SubId::reset()
// ACCESSORS
-bsl::ostream&
-SubId::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& SubId::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
@@ -4207,32 +4711,39 @@ SubId::print(bsl::ostream& stream, int level, int spacesPerLevel) const
return stream;
}
-// ----------------
-// class Subscriber
-// ----------------
+
+
+ // ----------------
+ // class Subscriber
+ // ----------------
// CONSTANTS
const char Subscriber::CLASS_NAME[] = "Subscriber";
const bdlat_AttributeInfo Subscriber::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_DOWNSTREAM_SUB_QUEUE_ID,
- "downstreamSubQueueId",
- sizeof("downstreamSubQueueId") - 1,
- "",
- bdlat_FormattingMode::e_DEC}};
+ {
+ ATTRIBUTE_ID_DOWNSTREAM_SUB_QUEUE_ID,
+ "downstreamSubQueueId",
+ sizeof("downstreamSubQueueId") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* Subscriber::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *Subscriber::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 1; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- Subscriber::ATTRIBUTE_INFO_ARRAY[i];
+ Subscriber::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -4240,12 +4751,13 @@ const bdlat_AttributeInfo* Subscriber::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* Subscriber::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *Subscriber::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_DOWNSTREAM_SUB_QUEUE_ID:
+ case ATTRIBUTE_ID_DOWNSTREAM_SUB_QUEUE_ID:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DOWNSTREAM_SUB_QUEUE_ID];
- default: return 0;
+ default:
+ return 0;
}
}
@@ -4265,39 +4777,44 @@ void Subscriber::reset()
// ACCESSORS
-bsl::ostream&
-Subscriber::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& Subscriber::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
- printer.printAttribute("downstreamSubQueueId",
- this->downstreamSubQueueId());
+ printer.printAttribute("downstreamSubQueueId", this->downstreamSubQueueId());
printer.end();
return stream;
}
-// ------------------------
-// class UninitializedQueue
-// ------------------------
+
+
+ // ------------------------
+ // class UninitializedQueue
+ // ------------------------
// CONSTANTS
const char UninitializedQueue::CLASS_NAME[] = "UninitializedQueue";
+
// CLASS METHODS
-const bdlat_AttributeInfo*
-UninitializedQueue::lookupAttributeInfo(const char* name, int nameLength)
+const bdlat_AttributeInfo *UninitializedQueue::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
(void)name;
(void)nameLength;
return 0;
}
-const bdlat_AttributeInfo* UninitializedQueue::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *UninitializedQueue::lookupAttributeInfo(int id)
{
switch (id) {
- default: return 0;
+ default:
+ return 0;
}
}
@@ -4316,42 +4833,53 @@ bsl::ostream& UninitializedQueue::print(bsl::ostream& stream, int, int) const
return stream;
}
-// --------------------
-// class VirtualStorage
-// --------------------
+
+
+ // --------------------
+ // class VirtualStorage
+ // --------------------
// CONSTANTS
const char VirtualStorage::CLASS_NAME[] = "VirtualStorage";
const bdlat_AttributeInfo VirtualStorage::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_APP_ID,
- "appId",
- sizeof("appId") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_APP_KEY,
- "appKey",
- sizeof("appKey") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_NUM_MESSAGES,
- "numMessages",
- sizeof("numMessages") - 1,
- "",
- bdlat_FormattingMode::e_DEC}};
+ {
+ ATTRIBUTE_ID_APP_ID,
+ "appId",
+ sizeof("appId") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_APP_KEY,
+ "appKey",
+ sizeof("appKey") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_NUM_MESSAGES,
+ "numMessages",
+ sizeof("numMessages") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo*
-VirtualStorage::lookupAttributeInfo(const char* name, int nameLength)
+const bdlat_AttributeInfo *VirtualStorage::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 3; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- VirtualStorage::ATTRIBUTE_INFO_ARRAY[i];
+ VirtualStorage::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -4359,22 +4887,23 @@ VirtualStorage::lookupAttributeInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_AttributeInfo* VirtualStorage::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *VirtualStorage::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_APP_ID:
+ case ATTRIBUTE_ID_APP_ID:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_ID];
- case ATTRIBUTE_ID_APP_KEY:
+ case ATTRIBUTE_ID_APP_KEY:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_KEY];
- case ATTRIBUTE_ID_NUM_MESSAGES:
+ case ATTRIBUTE_ID_NUM_MESSAGES:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-VirtualStorage::VirtualStorage(bslma::Allocator* basicAllocator)
+VirtualStorage::VirtualStorage(bslma::Allocator *basicAllocator)
: d_appId(basicAllocator)
, d_appKey(basicAllocator)
, d_numMessages()
@@ -4382,24 +4911,24 @@ VirtualStorage::VirtualStorage(bslma::Allocator* basicAllocator)
}
VirtualStorage::VirtualStorage(const VirtualStorage& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_appId(original.d_appId, basicAllocator)
, d_appKey(original.d_appKey, basicAllocator)
, d_numMessages(original.d_numMessages)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
VirtualStorage::VirtualStorage(VirtualStorage&& original) noexcept
-: d_appId(bsl::move(original.d_appId)),
- d_appKey(bsl::move(original.d_appKey)),
- d_numMessages(bsl::move(original.d_numMessages))
+: d_appId(bsl::move(original.d_appId))
+, d_appKey(bsl::move(original.d_appKey))
+, d_numMessages(bsl::move(original.d_numMessages))
{
}
-VirtualStorage::VirtualStorage(VirtualStorage&& original,
- bslma::Allocator* basicAllocator)
+VirtualStorage::VirtualStorage(VirtualStorage&& original,
+ bslma::Allocator *basicAllocator)
: d_appId(bsl::move(original.d_appId), basicAllocator)
, d_appKey(bsl::move(original.d_appKey), basicAllocator)
, d_numMessages(bsl::move(original.d_numMessages))
@@ -4413,24 +4942,26 @@ VirtualStorage::~VirtualStorage()
// MANIPULATORS
-VirtualStorage& VirtualStorage::operator=(const VirtualStorage& rhs)
+VirtualStorage&
+VirtualStorage::operator=(const VirtualStorage& rhs)
{
if (this != &rhs) {
- d_appId = rhs.d_appId;
- d_appKey = rhs.d_appKey;
+ d_appId = rhs.d_appId;
+ d_appKey = rhs.d_appKey;
d_numMessages = rhs.d_numMessages;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-VirtualStorage& VirtualStorage::operator=(VirtualStorage&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+VirtualStorage&
+VirtualStorage::operator=(VirtualStorage&& rhs)
{
if (this != &rhs) {
- d_appId = bsl::move(rhs.d_appId);
- d_appKey = bsl::move(rhs.d_appKey);
+ d_appId = bsl::move(rhs.d_appId);
+ d_appKey = bsl::move(rhs.d_appKey);
d_numMessages = bsl::move(rhs.d_numMessages);
}
@@ -4460,28 +4991,33 @@ bsl::ostream& VirtualStorage::print(bsl::ostream& stream,
return stream;
}
-// ----------
-// class Void
-// ----------
+
+
+ // ----------
+ // class Void
+ // ----------
// CONSTANTS
const char Void::CLASS_NAME[] = "Void";
+
// CLASS METHODS
-const bdlat_AttributeInfo* Void::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *Void::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
(void)name;
(void)nameLength;
return 0;
}
-const bdlat_AttributeInfo* Void::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *Void::lookupAttributeInfo(int id)
{
switch (id) {
- default: return 0;
+ default:
+ return 0;
}
}
@@ -4500,42 +5036,53 @@ bsl::ostream& Void::print(bsl::ostream& stream, int, int) const
return stream;
}
-// -------------------
-// class ActiveFileSet
-// -------------------
+
+
+ // -------------------
+ // class ActiveFileSet
+ // -------------------
// CONSTANTS
const char ActiveFileSet::CLASS_NAME[] = "ActiveFileSet";
const bdlat_AttributeInfo ActiveFileSet::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_DATA_FILE,
- "dataFile",
- sizeof("dataFile") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {ATTRIBUTE_ID_JOURNAL_FILE,
- "journalFile",
- sizeof("journalFile") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {ATTRIBUTE_ID_QLIST_FILE,
- "qlistFile",
- sizeof("qlistFile") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ ATTRIBUTE_ID_DATA_FILE,
+ "dataFile",
+ sizeof("dataFile") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ ATTRIBUTE_ID_JOURNAL_FILE,
+ "journalFile",
+ sizeof("journalFile") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ ATTRIBUTE_ID_QLIST_FILE,
+ "qlistFile",
+ sizeof("qlistFile") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* ActiveFileSet::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *ActiveFileSet::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 3; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- ActiveFileSet::ATTRIBUTE_INFO_ARRAY[i];
+ ActiveFileSet::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -4543,16 +5090,17 @@ const bdlat_AttributeInfo* ActiveFileSet::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* ActiveFileSet::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *ActiveFileSet::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_DATA_FILE:
+ case ATTRIBUTE_ID_DATA_FILE:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DATA_FILE];
- case ATTRIBUTE_ID_JOURNAL_FILE:
+ case ATTRIBUTE_ID_JOURNAL_FILE:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_JOURNAL_FILE];
- case ATTRIBUTE_ID_QLIST_FILE:
+ case ATTRIBUTE_ID_QLIST_FILE:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QLIST_FILE];
- default: return 0;
+ default:
+ return 0;
}
}
@@ -4576,8 +5124,9 @@ void ActiveFileSet::reset()
// ACCESSORS
-bsl::ostream&
-ActiveFileSet::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& ActiveFileSet::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
@@ -4588,32 +5137,39 @@ ActiveFileSet::print(bsl::ostream& stream, int level, int spacesPerLevel) const
return stream;
}
-// -------------------------
-// class BrokerConfigCommand
-// -------------------------
+
+
+ // -------------------------
+ // class BrokerConfigCommand
+ // -------------------------
// CONSTANTS
const char BrokerConfigCommand::CLASS_NAME[] = "BrokerConfigCommand";
const bdlat_SelectionInfo BrokerConfigCommand::SELECTION_INFO_ARRAY[] = {
- {SELECTION_ID_DUMP,
- "dump",
- sizeof("dump") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ SELECTION_ID_DUMP,
+ "dump",
+ sizeof("dump") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_SelectionInfo*
-BrokerConfigCommand::lookupSelectionInfo(const char* name, int nameLength)
+const bdlat_SelectionInfo *BrokerConfigCommand::lookupSelectionInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 1; ++i) {
const bdlat_SelectionInfo& selectionInfo =
- BrokerConfigCommand::SELECTION_INFO_ARRAY[i];
+ BrokerConfigCommand::SELECTION_INFO_ARRAY[i];
- if (nameLength == selectionInfo.d_nameLength &&
- 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength)) {
+ if (nameLength == selectionInfo.d_nameLength
+ && 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength))
+ {
return &selectionInfo;
}
}
@@ -4621,11 +5177,13 @@ BrokerConfigCommand::lookupSelectionInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_SelectionInfo* BrokerConfigCommand::lookupSelectionInfo(int id)
+const bdlat_SelectionInfo *BrokerConfigCommand::lookupSelectionInfo(int id)
{
switch (id) {
- case SELECTION_ID_DUMP: return &SELECTION_INFO_ARRAY[SELECTION_INDEX_DUMP];
- default: return 0;
+ case SELECTION_ID_DUMP:
+ return &SELECTION_INFO_ARRAY[SELECTION_INDEX_DUMP];
+ default:
+ return 0;
}
}
@@ -4635,23 +5193,27 @@ BrokerConfigCommand::BrokerConfigCommand(const BrokerConfigCommand& original)
: d_selectionId(original.d_selectionId)
{
switch (d_selectionId) {
- case SELECTION_ID_DUMP: {
- new (d_dump.buffer()) Void(original.d_dump.object());
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ case SELECTION_ID_DUMP: {
+ new (d_dump.buffer())
+ Void(original.d_dump.object());
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-BrokerConfigCommand::BrokerConfigCommand(BrokerConfigCommand&& original)
- noexcept : d_selectionId(original.d_selectionId)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+BrokerConfigCommand::BrokerConfigCommand(BrokerConfigCommand&& original) noexcept
+: d_selectionId(original.d_selectionId)
{
switch (d_selectionId) {
- case SELECTION_ID_DUMP: {
- new (d_dump.buffer()) Void(bsl::move(original.d_dump.object()));
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ case SELECTION_ID_DUMP: {
+ new (d_dump.buffer())
+ Void(bsl::move(original.d_dump.object()));
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
#endif
@@ -4663,10 +5225,10 @@ BrokerConfigCommand::operator=(const BrokerConfigCommand& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_DUMP: {
+ case SELECTION_ID_DUMP: {
makeDump(rhs.d_dump.object());
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -4675,16 +5237,17 @@ BrokerConfigCommand::operator=(const BrokerConfigCommand& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-BrokerConfigCommand& BrokerConfigCommand::operator=(BrokerConfigCommand&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+BrokerConfigCommand&
+BrokerConfigCommand::operator=(BrokerConfigCommand&& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_DUMP: {
+ case SELECTION_ID_DUMP: {
makeDump(bsl::move(rhs.d_dump.object()));
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -4697,10 +5260,11 @@ BrokerConfigCommand& BrokerConfigCommand::operator=(BrokerConfigCommand&& rhs)
void BrokerConfigCommand::reset()
{
switch (d_selectionId) {
- case SELECTION_ID_DUMP: {
+ case SELECTION_ID_DUMP: {
d_dump.object().~Void();
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
d_selectionId = SELECTION_ID_UNDEFINED;
@@ -4709,23 +5273,24 @@ void BrokerConfigCommand::reset()
int BrokerConfigCommand::makeSelection(int selectionId)
{
switch (selectionId) {
- case SELECTION_ID_DUMP: {
+ case SELECTION_ID_DUMP: {
makeDump();
- } break;
- case SELECTION_ID_UNDEFINED: {
+ } break;
+ case SELECTION_ID_UNDEFINED: {
reset();
- } break;
- default: return -1;
+ } break;
+ default:
+ return -1;
}
return 0;
}
-int BrokerConfigCommand::makeSelection(const char* name, int nameLength)
+int BrokerConfigCommand::makeSelection(const char *name, int nameLength)
{
- const bdlat_SelectionInfo* selectionInfo = lookupSelectionInfo(name,
- nameLength);
+ const bdlat_SelectionInfo *selectionInfo =
+ lookupSelectionInfo(name, nameLength);
if (0 == selectionInfo) {
- return -1;
+ return -1;
}
return makeSelection(selectionInfo->d_id);
@@ -4738,7 +5303,8 @@ Void& BrokerConfigCommand::makeDump()
}
else {
reset();
- new (d_dump.buffer()) Void();
+ new (d_dump.buffer())
+ Void();
d_selectionId = SELECTION_ID_DUMP;
}
@@ -4752,15 +5318,16 @@ Void& BrokerConfigCommand::makeDump(const Void& value)
}
else {
reset();
- new (d_dump.buffer()) Void(value);
+ new (d_dump.buffer())
+ Void(value);
d_selectionId = SELECTION_ID_DUMP;
}
return d_dump.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Void& BrokerConfigCommand::makeDump(Void&& value)
{
if (SELECTION_ID_DUMP == d_selectionId) {
@@ -4768,7 +5335,8 @@ Void& BrokerConfigCommand::makeDump(Void&& value)
}
else {
reset();
- new (d_dump.buffer()) Void(bsl::move(value));
+ new (d_dump.buffer())
+ Void(bsl::move(value));
d_selectionId = SELECTION_ID_DUMP;
}
@@ -4778,64 +5346,74 @@ Void& BrokerConfigCommand::makeDump(Void&& value)
// ACCESSORS
-bsl::ostream& BrokerConfigCommand::print(bsl::ostream& stream,
- int level,
- int spacesPerLevel) const
+bsl::ostream& BrokerConfigCommand::print(
+ bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
switch (d_selectionId) {
- case SELECTION_ID_DUMP: {
+ case SELECTION_ID_DUMP: {
printer.printAttribute("dump", d_dump.object());
- } break;
- default: stream << "SELECTION UNDEFINED\n";
+ } break;
+ default:
+ stream << "SELECTION UNDEFINED\n";
}
printer.end();
return stream;
}
-const char* BrokerConfigCommand::selectionName() const
+
+const char *BrokerConfigCommand::selectionName() const
{
switch (d_selectionId) {
- case SELECTION_ID_DUMP:
+ case SELECTION_ID_DUMP:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_DUMP].name();
- default:
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
return "(* UNDEFINED *)";
}
}
-// ----------------
-// class ClearCache
-// ----------------
+ // ----------------
+ // class ClearCache
+ // ----------------
// CONSTANTS
const char ClearCache::CLASS_NAME[] = "ClearCache";
const bdlat_SelectionInfo ClearCache::SELECTION_INFO_ARRAY[] = {
- {SELECTION_ID_DOMAIN,
- "domain",
- sizeof("domain") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {SELECTION_ID_ALL,
- "all",
- sizeof("all") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ SELECTION_ID_DOMAIN,
+ "domain",
+ sizeof("domain") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ SELECTION_ID_ALL,
+ "all",
+ sizeof("all") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_SelectionInfo* ClearCache::lookupSelectionInfo(const char* name,
- int nameLength)
+const bdlat_SelectionInfo *ClearCache::lookupSelectionInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 2; ++i) {
const bdlat_SelectionInfo& selectionInfo =
- ClearCache::SELECTION_INFO_ARRAY[i];
+ ClearCache::SELECTION_INFO_ARRAY[i];
- if (nameLength == selectionInfo.d_nameLength &&
- 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength)) {
+ if (nameLength == selectionInfo.d_nameLength
+ && 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength))
+ {
return &selectionInfo;
}
}
@@ -4843,83 +5421,98 @@ const bdlat_SelectionInfo* ClearCache::lookupSelectionInfo(const char* name,
return 0;
}
-const bdlat_SelectionInfo* ClearCache::lookupSelectionInfo(int id)
+const bdlat_SelectionInfo *ClearCache::lookupSelectionInfo(int id)
{
switch (id) {
- case SELECTION_ID_DOMAIN:
+ case SELECTION_ID_DOMAIN:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAIN];
- case SELECTION_ID_ALL: return &SELECTION_INFO_ARRAY[SELECTION_INDEX_ALL];
- default: return 0;
+ case SELECTION_ID_ALL:
+ return &SELECTION_INFO_ARRAY[SELECTION_INDEX_ALL];
+ default:
+ return 0;
}
}
// CREATORS
-ClearCache::ClearCache(const ClearCache& original,
- bslma::Allocator* basicAllocator)
+ClearCache::ClearCache(
+ const ClearCache& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_DOMAIN: {
+ case SELECTION_ID_DOMAIN: {
new (d_domain.buffer())
- bsl::string(original.d_domain.object(), d_allocator_p);
- } break;
- case SELECTION_ID_ALL: {
- new (d_all.buffer()) Void(original.d_all.object());
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ bsl::string(
+ original.d_domain.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_ALL: {
+ new (d_all.buffer())
+ Void(original.d_all.object());
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ClearCache::ClearCache(ClearCache&& original) noexcept
-: d_selectionId(original.d_selectionId),
- d_allocator_p(original.d_allocator_p)
+: d_selectionId(original.d_selectionId)
+, d_allocator_p(original.d_allocator_p)
{
switch (d_selectionId) {
- case SELECTION_ID_DOMAIN: {
+ case SELECTION_ID_DOMAIN: {
new (d_domain.buffer())
- bsl::string(bsl::move(original.d_domain.object()), d_allocator_p);
- } break;
- case SELECTION_ID_ALL: {
- new (d_all.buffer()) Void(bsl::move(original.d_all.object()));
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ bsl::string(
+ bsl::move(original.d_domain.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_ALL: {
+ new (d_all.buffer())
+ Void(bsl::move(original.d_all.object()));
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-ClearCache::ClearCache(ClearCache&& original, bslma::Allocator* basicAllocator)
+ClearCache::ClearCache(
+ ClearCache&& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_DOMAIN: {
+ case SELECTION_ID_DOMAIN: {
new (d_domain.buffer())
- bsl::string(bsl::move(original.d_domain.object()), d_allocator_p);
- } break;
- case SELECTION_ID_ALL: {
- new (d_all.buffer()) Void(bsl::move(original.d_all.object()));
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ bsl::string(
+ bsl::move(original.d_domain.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_ALL: {
+ new (d_all.buffer())
+ Void(bsl::move(original.d_all.object()));
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
#endif
// MANIPULATORS
-ClearCache& ClearCache::operator=(const ClearCache& rhs)
+ClearCache&
+ClearCache::operator=(const ClearCache& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_DOMAIN: {
+ case SELECTION_ID_DOMAIN: {
makeDomain(rhs.d_domain.object());
- } break;
- case SELECTION_ID_ALL: {
+ } break;
+ case SELECTION_ID_ALL: {
makeAll(rhs.d_all.object());
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -4928,19 +5521,20 @@ ClearCache& ClearCache::operator=(const ClearCache& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-ClearCache& ClearCache::operator=(ClearCache&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ClearCache&
+ClearCache::operator=(ClearCache&& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_DOMAIN: {
+ case SELECTION_ID_DOMAIN: {
makeDomain(bsl::move(rhs.d_domain.object()));
- } break;
- case SELECTION_ID_ALL: {
+ } break;
+ case SELECTION_ID_ALL: {
makeAll(bsl::move(rhs.d_all.object()));
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -4953,14 +5547,15 @@ ClearCache& ClearCache::operator=(ClearCache&& rhs)
void ClearCache::reset()
{
switch (d_selectionId) {
- case SELECTION_ID_DOMAIN: {
+ case SELECTION_ID_DOMAIN: {
typedef bsl::string Type;
d_domain.object().~Type();
- } break;
- case SELECTION_ID_ALL: {
+ } break;
+ case SELECTION_ID_ALL: {
d_all.object().~Void();
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
d_selectionId = SELECTION_ID_UNDEFINED;
@@ -4969,26 +5564,27 @@ void ClearCache::reset()
int ClearCache::makeSelection(int selectionId)
{
switch (selectionId) {
- case SELECTION_ID_DOMAIN: {
+ case SELECTION_ID_DOMAIN: {
makeDomain();
- } break;
- case SELECTION_ID_ALL: {
+ } break;
+ case SELECTION_ID_ALL: {
makeAll();
- } break;
- case SELECTION_ID_UNDEFINED: {
+ } break;
+ case SELECTION_ID_UNDEFINED: {
reset();
- } break;
- default: return -1;
+ } break;
+ default:
+ return -1;
}
return 0;
}
-int ClearCache::makeSelection(const char* name, int nameLength)
+int ClearCache::makeSelection(const char *name, int nameLength)
{
- const bdlat_SelectionInfo* selectionInfo = lookupSelectionInfo(name,
- nameLength);
+ const bdlat_SelectionInfo *selectionInfo =
+ lookupSelectionInfo(name, nameLength);
if (0 == selectionInfo) {
- return -1;
+ return -1;
}
return makeSelection(selectionInfo->d_id);
@@ -5001,7 +5597,8 @@ bsl::string& ClearCache::makeDomain()
}
else {
reset();
- new (d_domain.buffer()) bsl::string(d_allocator_p);
+ new (d_domain.buffer())
+ bsl::string(d_allocator_p);
d_selectionId = SELECTION_ID_DOMAIN;
}
@@ -5015,15 +5612,16 @@ bsl::string& ClearCache::makeDomain(const bsl::string& value)
}
else {
reset();
- new (d_domain.buffer()) bsl::string(value, d_allocator_p);
+ new (d_domain.buffer())
+ bsl::string(value, d_allocator_p);
d_selectionId = SELECTION_ID_DOMAIN;
}
return d_domain.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
bsl::string& ClearCache::makeDomain(bsl::string&& value)
{
if (SELECTION_ID_DOMAIN == d_selectionId) {
@@ -5031,7 +5629,8 @@ bsl::string& ClearCache::makeDomain(bsl::string&& value)
}
else {
reset();
- new (d_domain.buffer()) bsl::string(bsl::move(value), d_allocator_p);
+ new (d_domain.buffer())
+ bsl::string(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_DOMAIN;
}
@@ -5046,7 +5645,8 @@ Void& ClearCache::makeAll()
}
else {
reset();
- new (d_all.buffer()) Void();
+ new (d_all.buffer())
+ Void();
d_selectionId = SELECTION_ID_ALL;
}
@@ -5060,15 +5660,16 @@ Void& ClearCache::makeAll(const Void& value)
}
else {
reset();
- new (d_all.buffer()) Void(value);
+ new (d_all.buffer())
+ Void(value);
d_selectionId = SELECTION_ID_ALL;
}
return d_all.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Void& ClearCache::makeAll(Void&& value)
{
if (SELECTION_ID_ALL == d_selectionId) {
@@ -5076,7 +5677,8 @@ Void& ClearCache::makeAll(Void&& value)
}
else {
reset();
- new (d_all.buffer()) Void(bsl::move(value));
+ new (d_all.buffer())
+ Void(bsl::move(value));
d_selectionId = SELECTION_ID_ALL;
}
@@ -5086,73 +5688,86 @@ Void& ClearCache::makeAll(Void&& value)
// ACCESSORS
-bsl::ostream&
-ClearCache::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& ClearCache::print(
+ bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
switch (d_selectionId) {
- case SELECTION_ID_DOMAIN: {
+ case SELECTION_ID_DOMAIN: {
printer.printAttribute("domain", d_domain.object());
- } break;
- case SELECTION_ID_ALL: {
+ } break;
+ case SELECTION_ID_ALL: {
printer.printAttribute("all", d_all.object());
- } break;
- default: stream << "SELECTION UNDEFINED\n";
+ } break;
+ default:
+ stream << "SELECTION UNDEFINED\n";
}
printer.end();
return stream;
}
-const char* ClearCache::selectionName() const
+
+const char *ClearCache::selectionName() const
{
switch (d_selectionId) {
- case SELECTION_ID_DOMAIN:
+ case SELECTION_ID_DOMAIN:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAIN].name();
- case SELECTION_ID_ALL:
+ case SELECTION_ID_ALL:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_ALL].name();
- default:
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
return "(* UNDEFINED *)";
}
}
-// -----------------
-// class ClusterInfo
-// -----------------
+ // -----------------
+ // class ClusterInfo
+ // -----------------
// CONSTANTS
const char ClusterInfo::CLASS_NAME[] = "ClusterInfo";
const bdlat_AttributeInfo ClusterInfo::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_LOCALITY,
- "locality",
- sizeof("locality") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {ATTRIBUTE_ID_NAME,
- "name",
- sizeof("name") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_NODES,
- "nodes",
- sizeof("nodes") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ ATTRIBUTE_ID_LOCALITY,
+ "locality",
+ sizeof("locality") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ ATTRIBUTE_ID_NAME,
+ "name",
+ sizeof("name") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_NODES,
+ "nodes",
+ sizeof("nodes") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* ClusterInfo::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *ClusterInfo::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 3; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- ClusterInfo::ATTRIBUTE_INFO_ARRAY[i];
+ ClusterInfo::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -5160,21 +5775,23 @@ const bdlat_AttributeInfo* ClusterInfo::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* ClusterInfo::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *ClusterInfo::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_LOCALITY:
+ case ATTRIBUTE_ID_LOCALITY:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LOCALITY];
- case ATTRIBUTE_ID_NAME: return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME];
- case ATTRIBUTE_ID_NODES:
+ case ATTRIBUTE_ID_NAME:
+ return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME];
+ case ATTRIBUTE_ID_NODES:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NODES];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-ClusterInfo::ClusterInfo(bslma::Allocator* basicAllocator)
+ClusterInfo::ClusterInfo(bslma::Allocator *basicAllocator)
: d_nodes(basicAllocator)
, d_name(basicAllocator)
, d_locality(static_cast(0))
@@ -5182,24 +5799,24 @@ ClusterInfo::ClusterInfo(bslma::Allocator* basicAllocator)
}
ClusterInfo::ClusterInfo(const ClusterInfo& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_nodes(original.d_nodes, basicAllocator)
, d_name(original.d_name, basicAllocator)
, d_locality(original.d_locality)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ClusterInfo::ClusterInfo(ClusterInfo&& original) noexcept
-: d_nodes(bsl::move(original.d_nodes)),
- d_name(bsl::move(original.d_name)),
- d_locality(bsl::move(original.d_locality))
+: d_nodes(bsl::move(original.d_nodes))
+, d_name(bsl::move(original.d_name))
+, d_locality(bsl::move(original.d_locality))
{
}
-ClusterInfo::ClusterInfo(ClusterInfo&& original,
- bslma::Allocator* basicAllocator)
+ClusterInfo::ClusterInfo(ClusterInfo&& original,
+ bslma::Allocator *basicAllocator)
: d_nodes(bsl::move(original.d_nodes), basicAllocator)
, d_name(bsl::move(original.d_name), basicAllocator)
, d_locality(bsl::move(original.d_locality))
@@ -5213,25 +5830,27 @@ ClusterInfo::~ClusterInfo()
// MANIPULATORS
-ClusterInfo& ClusterInfo::operator=(const ClusterInfo& rhs)
+ClusterInfo&
+ClusterInfo::operator=(const ClusterInfo& rhs)
{
if (this != &rhs) {
d_locality = rhs.d_locality;
- d_name = rhs.d_name;
- d_nodes = rhs.d_nodes;
+ d_name = rhs.d_name;
+ d_nodes = rhs.d_nodes;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-ClusterInfo& ClusterInfo::operator=(ClusterInfo&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ClusterInfo&
+ClusterInfo::operator=(ClusterInfo&& rhs)
{
if (this != &rhs) {
d_locality = bsl::move(rhs.d_locality);
- d_name = bsl::move(rhs.d_name);
- d_nodes = bsl::move(rhs.d_nodes);
+ d_name = bsl::move(rhs.d_name);
+ d_nodes = bsl::move(rhs.d_nodes);
}
return *this;
@@ -5247,8 +5866,9 @@ void ClusterInfo::reset()
// ACCESSORS
-bsl::ostream&
-ClusterInfo::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& ClusterInfo::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
@@ -5259,47 +5879,60 @@ ClusterInfo::print(bsl::ostream& stream, int level, int spacesPerLevel) const
return stream;
}
-// ---------------------
-// class ClusterNodeInfo
-// ---------------------
+
+
+ // ---------------------
+ // class ClusterNodeInfo
+ // ---------------------
// CONSTANTS
const char ClusterNodeInfo::CLASS_NAME[] = "ClusterNodeInfo";
const bdlat_AttributeInfo ClusterNodeInfo::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_DESCRIPTION,
- "description",
- sizeof("description") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_IS_AVAILABLE,
- "isAvailable",
- sizeof("isAvailable") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_STATUS,
- "status",
- sizeof("status") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {ATTRIBUTE_ID_PRIMARY_FOR_PARTITION_IDS,
- "primaryForPartitionIds",
- sizeof("primaryForPartitionIds") - 1,
- "",
- bdlat_FormattingMode::e_DEC}};
+ {
+ ATTRIBUTE_ID_DESCRIPTION,
+ "description",
+ sizeof("description") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_IS_AVAILABLE,
+ "isAvailable",
+ sizeof("isAvailable") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_STATUS,
+ "status",
+ sizeof("status") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ ATTRIBUTE_ID_PRIMARY_FOR_PARTITION_IDS,
+ "primaryForPartitionIds",
+ sizeof("primaryForPartitionIds") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo*
-ClusterNodeInfo::lookupAttributeInfo(const char* name, int nameLength)
+const bdlat_AttributeInfo *ClusterNodeInfo::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 4; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- ClusterNodeInfo::ATTRIBUTE_INFO_ARRAY[i];
+ ClusterNodeInfo::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -5307,25 +5940,25 @@ ClusterNodeInfo::lookupAttributeInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_AttributeInfo* ClusterNodeInfo::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *ClusterNodeInfo::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_DESCRIPTION:
+ case ATTRIBUTE_ID_DESCRIPTION:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DESCRIPTION];
- case ATTRIBUTE_ID_IS_AVAILABLE:
+ case ATTRIBUTE_ID_IS_AVAILABLE:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_AVAILABLE];
- case ATTRIBUTE_ID_STATUS:
+ case ATTRIBUTE_ID_STATUS:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STATUS];
- case ATTRIBUTE_ID_PRIMARY_FOR_PARTITION_IDS:
- return &ATTRIBUTE_INFO_ARRAY
- [ATTRIBUTE_INDEX_PRIMARY_FOR_PARTITION_IDS];
- default: return 0;
+ case ATTRIBUTE_ID_PRIMARY_FOR_PARTITION_IDS:
+ return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_FOR_PARTITION_IDS];
+ default:
+ return 0;
}
}
// CREATORS
-ClusterNodeInfo::ClusterNodeInfo(bslma::Allocator* basicAllocator)
+ClusterNodeInfo::ClusterNodeInfo(bslma::Allocator *basicAllocator)
: d_primaryForPartitionIds(basicAllocator)
, d_description(basicAllocator)
, d_status(static_cast(0))
@@ -5334,7 +5967,7 @@ ClusterNodeInfo::ClusterNodeInfo(bslma::Allocator* basicAllocator)
}
ClusterNodeInfo::ClusterNodeInfo(const ClusterNodeInfo& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_primaryForPartitionIds(original.d_primaryForPartitionIds, basicAllocator)
, d_description(original.d_description, basicAllocator)
, d_status(original.d_status)
@@ -5342,20 +5975,19 @@ ClusterNodeInfo::ClusterNodeInfo(const ClusterNodeInfo& original,
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ClusterNodeInfo::ClusterNodeInfo(ClusterNodeInfo&& original) noexcept
-: d_primaryForPartitionIds(bsl::move(original.d_primaryForPartitionIds)),
- d_description(bsl::move(original.d_description)),
- d_status(bsl::move(original.d_status)),
- d_isAvailable(bsl::move(original.d_isAvailable))
+: d_primaryForPartitionIds(bsl::move(original.d_primaryForPartitionIds))
+, d_description(bsl::move(original.d_description))
+, d_status(bsl::move(original.d_status))
+, d_isAvailable(bsl::move(original.d_isAvailable))
{
}
ClusterNodeInfo::ClusterNodeInfo(ClusterNodeInfo&& original,
- bslma::Allocator* basicAllocator)
-: d_primaryForPartitionIds(bsl::move(original.d_primaryForPartitionIds),
- basicAllocator)
+ bslma::Allocator *basicAllocator)
+: d_primaryForPartitionIds(bsl::move(original.d_primaryForPartitionIds), basicAllocator)
, d_description(bsl::move(original.d_description), basicAllocator)
, d_status(bsl::move(original.d_status))
, d_isAvailable(bsl::move(original.d_isAvailable))
@@ -5369,26 +6001,28 @@ ClusterNodeInfo::~ClusterNodeInfo()
// MANIPULATORS
-ClusterNodeInfo& ClusterNodeInfo::operator=(const ClusterNodeInfo& rhs)
+ClusterNodeInfo&
+ClusterNodeInfo::operator=(const ClusterNodeInfo& rhs)
{
if (this != &rhs) {
- d_description = rhs.d_description;
- d_isAvailable = rhs.d_isAvailable;
- d_status = rhs.d_status;
+ d_description = rhs.d_description;
+ d_isAvailable = rhs.d_isAvailable;
+ d_status = rhs.d_status;
d_primaryForPartitionIds = rhs.d_primaryForPartitionIds;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-ClusterNodeInfo& ClusterNodeInfo::operator=(ClusterNodeInfo&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ClusterNodeInfo&
+ClusterNodeInfo::operator=(ClusterNodeInfo&& rhs)
{
if (this != &rhs) {
- d_description = bsl::move(rhs.d_description);
- d_isAvailable = bsl::move(rhs.d_isAvailable);
- d_status = bsl::move(rhs.d_status);
+ d_description = bsl::move(rhs.d_description);
+ d_isAvailable = bsl::move(rhs.d_isAvailable);
+ d_status = bsl::move(rhs.d_status);
d_primaryForPartitionIds = bsl::move(rhs.d_primaryForPartitionIds);
}
@@ -5415,84 +6049,114 @@ bsl::ostream& ClusterNodeInfo::print(bsl::ostream& stream,
printer.printAttribute("description", this->description());
printer.printAttribute("isAvailable", this->isAvailable());
printer.printAttribute("status", this->status());
- printer.printAttribute("primaryForPartitionIds",
- this->primaryForPartitionIds());
+ printer.printAttribute("primaryForPartitionIds", this->primaryForPartitionIds());
printer.end();
return stream;
}
-// ------------------
-// class ClusterQueue
-// ------------------
+
+
+ // ------------------
+ // class ClusterQueue
+ // ------------------
// CONSTANTS
const char ClusterQueue::CLASS_NAME[] = "ClusterQueue";
const bdlat_AttributeInfo ClusterQueue::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_URI,
- "uri",
- sizeof("uri") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_NUM_IN_FLIGHT_CONTEXTS,
- "numInFlightContexts",
- sizeof("numInFlightContexts") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_IS_ASSIGNED,
- "isAssigned",
- sizeof("isAssigned") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_IS_PRIMARY_AVAILABLE,
- "isPrimaryAvailable",
- sizeof("isPrimaryAvailable") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_ID, "id", sizeof("id") - 1, "", bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_SUB_IDS,
- "subIds",
- sizeof("subIds") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {ATTRIBUTE_ID_PARTITION_ID,
- "partitionId",
- sizeof("partitionId") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_PRIMARY_NODE_DESCRIPTION,
- "primaryNodeDescription",
- sizeof("primaryNodeDescription") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_KEY,
- "key",
- sizeof("key") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_IS_CREATED,
- "isCreated",
- sizeof("isCreated") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_CONTEXTS,
- "contexts",
- sizeof("contexts") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ ATTRIBUTE_ID_URI,
+ "uri",
+ sizeof("uri") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_NUM_IN_FLIGHT_CONTEXTS,
+ "numInFlightContexts",
+ sizeof("numInFlightContexts") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_IS_ASSIGNED,
+ "isAssigned",
+ sizeof("isAssigned") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_IS_PRIMARY_AVAILABLE,
+ "isPrimaryAvailable",
+ sizeof("isPrimaryAvailable") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_ID,
+ "id",
+ sizeof("id") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_SUB_IDS,
+ "subIds",
+ sizeof("subIds") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ ATTRIBUTE_ID_PARTITION_ID,
+ "partitionId",
+ sizeof("partitionId") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_PRIMARY_NODE_DESCRIPTION,
+ "primaryNodeDescription",
+ sizeof("primaryNodeDescription") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_KEY,
+ "key",
+ sizeof("key") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_IS_CREATED,
+ "isCreated",
+ sizeof("isCreated") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_CONTEXTS,
+ "contexts",
+ sizeof("contexts") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* ClusterQueue::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *ClusterQueue::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 11; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- ClusterQueue::ATTRIBUTE_INFO_ARRAY[i];
+ ClusterQueue::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -5500,35 +6164,39 @@ const bdlat_AttributeInfo* ClusterQueue::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* ClusterQueue::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *ClusterQueue::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_URI: return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_URI];
- case ATTRIBUTE_ID_NUM_IN_FLIGHT_CONTEXTS:
+ case ATTRIBUTE_ID_URI:
+ return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_URI];
+ case ATTRIBUTE_ID_NUM_IN_FLIGHT_CONTEXTS:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_IN_FLIGHT_CONTEXTS];
- case ATTRIBUTE_ID_IS_ASSIGNED:
+ case ATTRIBUTE_ID_IS_ASSIGNED:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_ASSIGNED];
- case ATTRIBUTE_ID_IS_PRIMARY_AVAILABLE:
+ case ATTRIBUTE_ID_IS_PRIMARY_AVAILABLE:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_PRIMARY_AVAILABLE];
- case ATTRIBUTE_ID_ID: return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ID];
- case ATTRIBUTE_ID_SUB_IDS:
+ case ATTRIBUTE_ID_ID:
+ return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ID];
+ case ATTRIBUTE_ID_SUB_IDS:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUB_IDS];
- case ATTRIBUTE_ID_PARTITION_ID:
+ case ATTRIBUTE_ID_PARTITION_ID:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITION_ID];
- case ATTRIBUTE_ID_PRIMARY_NODE_DESCRIPTION:
+ case ATTRIBUTE_ID_PRIMARY_NODE_DESCRIPTION:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_NODE_DESCRIPTION];
- case ATTRIBUTE_ID_KEY: return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_KEY];
- case ATTRIBUTE_ID_IS_CREATED:
+ case ATTRIBUTE_ID_KEY:
+ return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_KEY];
+ case ATTRIBUTE_ID_IS_CREATED:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_CREATED];
- case ATTRIBUTE_ID_CONTEXTS:
+ case ATTRIBUTE_ID_CONTEXTS:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONTEXTS];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-ClusterQueue::ClusterQueue(bslma::Allocator* basicAllocator)
+ClusterQueue::ClusterQueue(bslma::Allocator *basicAllocator)
: d_subIds(basicAllocator)
, d_contexts(basicAllocator)
, d_uri(basicAllocator)
@@ -5544,7 +6212,7 @@ ClusterQueue::ClusterQueue(bslma::Allocator* basicAllocator)
}
ClusterQueue::ClusterQueue(const ClusterQueue& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_subIds(original.d_subIds, basicAllocator)
, d_contexts(original.d_contexts, basicAllocator)
, d_uri(original.d_uri, basicAllocator)
@@ -5559,31 +6227,30 @@ ClusterQueue::ClusterQueue(const ClusterQueue& original,
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ClusterQueue::ClusterQueue(ClusterQueue&& original) noexcept
-: d_subIds(bsl::move(original.d_subIds)),
- d_contexts(bsl::move(original.d_contexts)),
- d_uri(bsl::move(original.d_uri)),
- d_key(bsl::move(original.d_key)),
- d_primaryNodeDescription(bsl::move(original.d_primaryNodeDescription)),
- d_numInFlightContexts(bsl::move(original.d_numInFlightContexts)),
- d_id(bsl::move(original.d_id)),
- d_partitionId(bsl::move(original.d_partitionId)),
- d_isAssigned(bsl::move(original.d_isAssigned)),
- d_isPrimaryAvailable(bsl::move(original.d_isPrimaryAvailable)),
- d_isCreated(bsl::move(original.d_isCreated))
-{
-}
-
-ClusterQueue::ClusterQueue(ClusterQueue&& original,
- bslma::Allocator* basicAllocator)
+: d_subIds(bsl::move(original.d_subIds))
+, d_contexts(bsl::move(original.d_contexts))
+, d_uri(bsl::move(original.d_uri))
+, d_key(bsl::move(original.d_key))
+, d_primaryNodeDescription(bsl::move(original.d_primaryNodeDescription))
+, d_numInFlightContexts(bsl::move(original.d_numInFlightContexts))
+, d_id(bsl::move(original.d_id))
+, d_partitionId(bsl::move(original.d_partitionId))
+, d_isAssigned(bsl::move(original.d_isAssigned))
+, d_isPrimaryAvailable(bsl::move(original.d_isPrimaryAvailable))
+, d_isCreated(bsl::move(original.d_isCreated))
+{
+}
+
+ClusterQueue::ClusterQueue(ClusterQueue&& original,
+ bslma::Allocator *basicAllocator)
: d_subIds(bsl::move(original.d_subIds), basicAllocator)
, d_contexts(bsl::move(original.d_contexts), basicAllocator)
, d_uri(bsl::move(original.d_uri), basicAllocator)
, d_key(bsl::move(original.d_key), basicAllocator)
-, d_primaryNodeDescription(bsl::move(original.d_primaryNodeDescription),
- basicAllocator)
+, d_primaryNodeDescription(bsl::move(original.d_primaryNodeDescription), basicAllocator)
, d_numInFlightContexts(bsl::move(original.d_numInFlightContexts))
, d_id(bsl::move(original.d_id))
, d_partitionId(bsl::move(original.d_partitionId))
@@ -5600,41 +6267,43 @@ ClusterQueue::~ClusterQueue()
// MANIPULATORS
-ClusterQueue& ClusterQueue::operator=(const ClusterQueue& rhs)
+ClusterQueue&
+ClusterQueue::operator=(const ClusterQueue& rhs)
{
if (this != &rhs) {
- d_uri = rhs.d_uri;
- d_numInFlightContexts = rhs.d_numInFlightContexts;
- d_isAssigned = rhs.d_isAssigned;
- d_isPrimaryAvailable = rhs.d_isPrimaryAvailable;
- d_id = rhs.d_id;
- d_subIds = rhs.d_subIds;
- d_partitionId = rhs.d_partitionId;
+ d_uri = rhs.d_uri;
+ d_numInFlightContexts = rhs.d_numInFlightContexts;
+ d_isAssigned = rhs.d_isAssigned;
+ d_isPrimaryAvailable = rhs.d_isPrimaryAvailable;
+ d_id = rhs.d_id;
+ d_subIds = rhs.d_subIds;
+ d_partitionId = rhs.d_partitionId;
d_primaryNodeDescription = rhs.d_primaryNodeDescription;
- d_key = rhs.d_key;
- d_isCreated = rhs.d_isCreated;
- d_contexts = rhs.d_contexts;
+ d_key = rhs.d_key;
+ d_isCreated = rhs.d_isCreated;
+ d_contexts = rhs.d_contexts;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-ClusterQueue& ClusterQueue::operator=(ClusterQueue&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ClusterQueue&
+ClusterQueue::operator=(ClusterQueue&& rhs)
{
if (this != &rhs) {
- d_uri = bsl::move(rhs.d_uri);
- d_numInFlightContexts = bsl::move(rhs.d_numInFlightContexts);
- d_isAssigned = bsl::move(rhs.d_isAssigned);
- d_isPrimaryAvailable = bsl::move(rhs.d_isPrimaryAvailable);
- d_id = bsl::move(rhs.d_id);
- d_subIds = bsl::move(rhs.d_subIds);
- d_partitionId = bsl::move(rhs.d_partitionId);
+ d_uri = bsl::move(rhs.d_uri);
+ d_numInFlightContexts = bsl::move(rhs.d_numInFlightContexts);
+ d_isAssigned = bsl::move(rhs.d_isAssigned);
+ d_isPrimaryAvailable = bsl::move(rhs.d_isPrimaryAvailable);
+ d_id = bsl::move(rhs.d_id);
+ d_subIds = bsl::move(rhs.d_subIds);
+ d_partitionId = bsl::move(rhs.d_partitionId);
d_primaryNodeDescription = bsl::move(rhs.d_primaryNodeDescription);
- d_key = bsl::move(rhs.d_key);
- d_isCreated = bsl::move(rhs.d_isCreated);
- d_contexts = bsl::move(rhs.d_contexts);
+ d_key = bsl::move(rhs.d_key);
+ d_isCreated = bsl::move(rhs.d_isCreated);
+ d_contexts = bsl::move(rhs.d_contexts);
}
return *this;
@@ -5658,8 +6327,9 @@ void ClusterQueue::reset()
// ACCESSORS
-bsl::ostream&
-ClusterQueue::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& ClusterQueue::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
@@ -5670,8 +6340,7 @@ ClusterQueue::print(bsl::ostream& stream, int level, int spacesPerLevel) const
printer.printAttribute("id", this->id());
printer.printAttribute("subIds", this->subIds());
printer.printAttribute("partitionId", this->partitionId());
- printer.printAttribute("primaryNodeDescription",
- this->primaryNodeDescription());
+ printer.printAttribute("primaryNodeDescription", this->primaryNodeDescription());
printer.printAttribute("key", this->key());
printer.printAttribute("isCreated", this->isCreated());
printer.printAttribute("contexts", this->contexts());
@@ -5679,37 +6348,46 @@ ClusterQueue::print(bsl::ostream& stream, int level, int spacesPerLevel) const
return stream;
}
-// -------------------
-// class DangerCommand
-// -------------------
+
+
+ // -------------------
+ // class DangerCommand
+ // -------------------
// CONSTANTS
const char DangerCommand::CLASS_NAME[] = "DangerCommand";
const bdlat_SelectionInfo DangerCommand::SELECTION_INFO_ARRAY[] = {
- {SELECTION_ID_SHUTDOWN,
- "shutdown",
- sizeof("shutdown") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_TERMINATE,
- "terminate",
- sizeof("terminate") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ SELECTION_ID_SHUTDOWN,
+ "shutdown",
+ sizeof("shutdown") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_TERMINATE,
+ "terminate",
+ sizeof("terminate") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_SelectionInfo* DangerCommand::lookupSelectionInfo(const char* name,
- int nameLength)
+const bdlat_SelectionInfo *DangerCommand::lookupSelectionInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 2; ++i) {
const bdlat_SelectionInfo& selectionInfo =
- DangerCommand::SELECTION_INFO_ARRAY[i];
+ DangerCommand::SELECTION_INFO_ARRAY[i];
- if (nameLength == selectionInfo.d_nameLength &&
- 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength)) {
+ if (nameLength == selectionInfo.d_nameLength
+ && 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength))
+ {
return &selectionInfo;
}
}
@@ -5717,14 +6395,15 @@ const bdlat_SelectionInfo* DangerCommand::lookupSelectionInfo(const char* name,
return 0;
}
-const bdlat_SelectionInfo* DangerCommand::lookupSelectionInfo(int id)
+const bdlat_SelectionInfo *DangerCommand::lookupSelectionInfo(int id)
{
switch (id) {
- case SELECTION_ID_SHUTDOWN:
+ case SELECTION_ID_SHUTDOWN:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_SHUTDOWN];
- case SELECTION_ID_TERMINATE:
+ case SELECTION_ID_TERMINATE:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_TERMINATE];
- default: return 0;
+ default:
+ return 0;
}
}
@@ -5734,48 +6413,53 @@ DangerCommand::DangerCommand(const DangerCommand& original)
: d_selectionId(original.d_selectionId)
{
switch (d_selectionId) {
- case SELECTION_ID_SHUTDOWN: {
- new (d_shutdown.buffer()) Void(original.d_shutdown.object());
- } break;
- case SELECTION_ID_TERMINATE: {
- new (d_terminate.buffer()) Void(original.d_terminate.object());
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ case SELECTION_ID_SHUTDOWN: {
+ new (d_shutdown.buffer())
+ Void(original.d_shutdown.object());
+ } break;
+ case SELECTION_ID_TERMINATE: {
+ new (d_terminate.buffer())
+ Void(original.d_terminate.object());
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
DangerCommand::DangerCommand(DangerCommand&& original) noexcept
: d_selectionId(original.d_selectionId)
{
switch (d_selectionId) {
- case SELECTION_ID_SHUTDOWN: {
+ case SELECTION_ID_SHUTDOWN: {
new (d_shutdown.buffer())
Void(bsl::move(original.d_shutdown.object()));
- } break;
- case SELECTION_ID_TERMINATE: {
+ } break;
+ case SELECTION_ID_TERMINATE: {
new (d_terminate.buffer())
Void(bsl::move(original.d_terminate.object()));
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
#endif
// MANIPULATORS
-DangerCommand& DangerCommand::operator=(const DangerCommand& rhs)
+DangerCommand&
+DangerCommand::operator=(const DangerCommand& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_SHUTDOWN: {
+ case SELECTION_ID_SHUTDOWN: {
makeShutdown(rhs.d_shutdown.object());
- } break;
- case SELECTION_ID_TERMINATE: {
+ } break;
+ case SELECTION_ID_TERMINATE: {
makeTerminate(rhs.d_terminate.object());
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -5784,19 +6468,20 @@ DangerCommand& DangerCommand::operator=(const DangerCommand& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-DangerCommand& DangerCommand::operator=(DangerCommand&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+DangerCommand&
+DangerCommand::operator=(DangerCommand&& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_SHUTDOWN: {
+ case SELECTION_ID_SHUTDOWN: {
makeShutdown(bsl::move(rhs.d_shutdown.object()));
- } break;
- case SELECTION_ID_TERMINATE: {
+ } break;
+ case SELECTION_ID_TERMINATE: {
makeTerminate(bsl::move(rhs.d_terminate.object()));
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -5809,13 +6494,14 @@ DangerCommand& DangerCommand::operator=(DangerCommand&& rhs)
void DangerCommand::reset()
{
switch (d_selectionId) {
- case SELECTION_ID_SHUTDOWN: {
+ case SELECTION_ID_SHUTDOWN: {
d_shutdown.object().~Void();
- } break;
- case SELECTION_ID_TERMINATE: {
+ } break;
+ case SELECTION_ID_TERMINATE: {
d_terminate.object().~Void();
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
d_selectionId = SELECTION_ID_UNDEFINED;
@@ -5824,26 +6510,27 @@ void DangerCommand::reset()
int DangerCommand::makeSelection(int selectionId)
{
switch (selectionId) {
- case SELECTION_ID_SHUTDOWN: {
+ case SELECTION_ID_SHUTDOWN: {
makeShutdown();
- } break;
- case SELECTION_ID_TERMINATE: {
+ } break;
+ case SELECTION_ID_TERMINATE: {
makeTerminate();
- } break;
- case SELECTION_ID_UNDEFINED: {
+ } break;
+ case SELECTION_ID_UNDEFINED: {
reset();
- } break;
- default: return -1;
+ } break;
+ default:
+ return -1;
}
return 0;
}
-int DangerCommand::makeSelection(const char* name, int nameLength)
+int DangerCommand::makeSelection(const char *name, int nameLength)
{
- const bdlat_SelectionInfo* selectionInfo = lookupSelectionInfo(name,
- nameLength);
+ const bdlat_SelectionInfo *selectionInfo =
+ lookupSelectionInfo(name, nameLength);
if (0 == selectionInfo) {
- return -1;
+ return -1;
}
return makeSelection(selectionInfo->d_id);
@@ -5856,7 +6543,8 @@ Void& DangerCommand::makeShutdown()
}
else {
reset();
- new (d_shutdown.buffer()) Void();
+ new (d_shutdown.buffer())
+ Void();
d_selectionId = SELECTION_ID_SHUTDOWN;
}
@@ -5870,15 +6558,16 @@ Void& DangerCommand::makeShutdown(const Void& value)
}
else {
reset();
- new (d_shutdown.buffer()) Void(value);
+ new (d_shutdown.buffer())
+ Void(value);
d_selectionId = SELECTION_ID_SHUTDOWN;
}
return d_shutdown.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Void& DangerCommand::makeShutdown(Void&& value)
{
if (SELECTION_ID_SHUTDOWN == d_selectionId) {
@@ -5886,7 +6575,8 @@ Void& DangerCommand::makeShutdown(Void&& value)
}
else {
reset();
- new (d_shutdown.buffer()) Void(bsl::move(value));
+ new (d_shutdown.buffer())
+ Void(bsl::move(value));
d_selectionId = SELECTION_ID_SHUTDOWN;
}
@@ -5901,7 +6591,8 @@ Void& DangerCommand::makeTerminate()
}
else {
reset();
- new (d_terminate.buffer()) Void();
+ new (d_terminate.buffer())
+ Void();
d_selectionId = SELECTION_ID_TERMINATE;
}
@@ -5915,15 +6606,16 @@ Void& DangerCommand::makeTerminate(const Void& value)
}
else {
reset();
- new (d_terminate.buffer()) Void(value);
+ new (d_terminate.buffer())
+ Void(value);
d_selectionId = SELECTION_ID_TERMINATE;
}
return d_terminate.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Void& DangerCommand::makeTerminate(Void&& value)
{
if (SELECTION_ID_TERMINATE == d_selectionId) {
@@ -5931,7 +6623,8 @@ Void& DangerCommand::makeTerminate(Void&& value)
}
else {
reset();
- new (d_terminate.buffer()) Void(bsl::move(value));
+ new (d_terminate.buffer())
+ Void(bsl::move(value));
d_selectionId = SELECTION_ID_TERMINATE;
}
@@ -5941,78 +6634,93 @@ Void& DangerCommand::makeTerminate(Void&& value)
// ACCESSORS
-bsl::ostream&
-DangerCommand::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& DangerCommand::print(
+ bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
switch (d_selectionId) {
- case SELECTION_ID_SHUTDOWN: {
+ case SELECTION_ID_SHUTDOWN: {
printer.printAttribute("shutdown", d_shutdown.object());
- } break;
- case SELECTION_ID_TERMINATE: {
+ } break;
+ case SELECTION_ID_TERMINATE: {
printer.printAttribute("terminate", d_terminate.object());
- } break;
- default: stream << "SELECTION UNDEFINED\n";
+ } break;
+ default:
+ stream << "SELECTION UNDEFINED\n";
}
printer.end();
return stream;
}
-const char* DangerCommand::selectionName() const
+
+const char *DangerCommand::selectionName() const
{
switch (d_selectionId) {
- case SELECTION_ID_SHUTDOWN:
+ case SELECTION_ID_SHUTDOWN:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_SHUTDOWN].name();
- case SELECTION_ID_TERMINATE:
+ case SELECTION_ID_TERMINATE:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_TERMINATE].name();
- default:
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
return "(* UNDEFINED *)";
}
}
-// -----------------
-// class ElectorInfo
-// -----------------
+ // -----------------
+ // class ElectorInfo
+ // -----------------
// CONSTANTS
const char ElectorInfo::CLASS_NAME[] = "ElectorInfo";
const bdlat_AttributeInfo ElectorInfo::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_ELECTOR_STATE,
- "electorState",
- sizeof("electorState") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {ATTRIBUTE_ID_LEADER_NODE,
- "leaderNode",
- sizeof("leaderNode") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_LEADER_MESSAGE_SEQUENCE,
- "leaderMessageSequence",
- sizeof("leaderMessageSequence") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {ATTRIBUTE_ID_LEADER_STATUS,
- "leaderStatus",
- sizeof("leaderStatus") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ ATTRIBUTE_ID_ELECTOR_STATE,
+ "electorState",
+ sizeof("electorState") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ ATTRIBUTE_ID_LEADER_NODE,
+ "leaderNode",
+ sizeof("leaderNode") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_LEADER_MESSAGE_SEQUENCE,
+ "leaderMessageSequence",
+ sizeof("leaderMessageSequence") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ ATTRIBUTE_ID_LEADER_STATUS,
+ "leaderStatus",
+ sizeof("leaderStatus") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* ElectorInfo::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *ElectorInfo::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 4; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- ElectorInfo::ATTRIBUTE_INFO_ARRAY[i];
+ ElectorInfo::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -6020,24 +6728,25 @@ const bdlat_AttributeInfo* ElectorInfo::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* ElectorInfo::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *ElectorInfo::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_ELECTOR_STATE:
+ case ATTRIBUTE_ID_ELECTOR_STATE:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ELECTOR_STATE];
- case ATTRIBUTE_ID_LEADER_NODE:
+ case ATTRIBUTE_ID_LEADER_NODE:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LEADER_NODE];
- case ATTRIBUTE_ID_LEADER_MESSAGE_SEQUENCE:
+ case ATTRIBUTE_ID_LEADER_MESSAGE_SEQUENCE:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LEADER_MESSAGE_SEQUENCE];
- case ATTRIBUTE_ID_LEADER_STATUS:
+ case ATTRIBUTE_ID_LEADER_STATUS:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LEADER_STATUS];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-ElectorInfo::ElectorInfo(bslma::Allocator* basicAllocator)
+ElectorInfo::ElectorInfo(bslma::Allocator *basicAllocator)
: d_leaderNode(basicAllocator)
, d_leaderMessageSequence()
, d_leaderStatus(static_cast(0))
@@ -6046,7 +6755,7 @@ ElectorInfo::ElectorInfo(bslma::Allocator* basicAllocator)
}
ElectorInfo::ElectorInfo(const ElectorInfo& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_leaderNode(original.d_leaderNode, basicAllocator)
, d_leaderMessageSequence(original.d_leaderMessageSequence)
, d_leaderStatus(original.d_leaderStatus)
@@ -6054,18 +6763,18 @@ ElectorInfo::ElectorInfo(const ElectorInfo& original,
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ElectorInfo::ElectorInfo(ElectorInfo&& original) noexcept
-: d_leaderNode(bsl::move(original.d_leaderNode)),
- d_leaderMessageSequence(bsl::move(original.d_leaderMessageSequence)),
- d_leaderStatus(bsl::move(original.d_leaderStatus)),
- d_electorState(bsl::move(original.d_electorState))
+: d_leaderNode(bsl::move(original.d_leaderNode))
+, d_leaderMessageSequence(bsl::move(original.d_leaderMessageSequence))
+, d_leaderStatus(bsl::move(original.d_leaderStatus))
+, d_electorState(bsl::move(original.d_electorState))
{
}
-ElectorInfo::ElectorInfo(ElectorInfo&& original,
- bslma::Allocator* basicAllocator)
+ElectorInfo::ElectorInfo(ElectorInfo&& original,
+ bslma::Allocator *basicAllocator)
: d_leaderNode(bsl::move(original.d_leaderNode), basicAllocator)
, d_leaderMessageSequence(bsl::move(original.d_leaderMessageSequence))
, d_leaderStatus(bsl::move(original.d_leaderStatus))
@@ -6080,27 +6789,29 @@ ElectorInfo::~ElectorInfo()
// MANIPULATORS
-ElectorInfo& ElectorInfo::operator=(const ElectorInfo& rhs)
+ElectorInfo&
+ElectorInfo::operator=(const ElectorInfo& rhs)
{
if (this != &rhs) {
- d_electorState = rhs.d_electorState;
- d_leaderNode = rhs.d_leaderNode;
+ d_electorState = rhs.d_electorState;
+ d_leaderNode = rhs.d_leaderNode;
d_leaderMessageSequence = rhs.d_leaderMessageSequence;
- d_leaderStatus = rhs.d_leaderStatus;
+ d_leaderStatus = rhs.d_leaderStatus;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-ElectorInfo& ElectorInfo::operator=(ElectorInfo&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ElectorInfo&
+ElectorInfo::operator=(ElectorInfo&& rhs)
{
if (this != &rhs) {
- d_electorState = bsl::move(rhs.d_electorState);
- d_leaderNode = bsl::move(rhs.d_leaderNode);
+ d_electorState = bsl::move(rhs.d_electorState);
+ d_leaderNode = bsl::move(rhs.d_leaderNode);
d_leaderMessageSequence = bsl::move(rhs.d_leaderMessageSequence);
- d_leaderStatus = bsl::move(rhs.d_leaderStatus);
+ d_leaderStatus = bsl::move(rhs.d_leaderStatus);
}
return *this;
@@ -6117,51 +6828,60 @@ void ElectorInfo::reset()
// ACCESSORS
-bsl::ostream&
-ElectorInfo::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& ElectorInfo::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
printer.printAttribute("electorState", this->electorState());
printer.printAttribute("leaderNode", this->leaderNode());
- printer.printAttribute("leaderMessageSequence",
- this->leaderMessageSequence());
+ printer.printAttribute("leaderMessageSequence", this->leaderMessageSequence());
printer.printAttribute("leaderStatus", this->leaderStatus());
printer.end();
return stream;
}
-// ----------------------
-// class GetTunableChoice
-// ----------------------
+
+
+ // ----------------------
+ // class GetTunableChoice
+ // ----------------------
// CONSTANTS
const char GetTunableChoice::CLASS_NAME[] = "GetTunableChoice";
const bdlat_SelectionInfo GetTunableChoice::SELECTION_INFO_ARRAY[] = {
- {SELECTION_ID_ALL,
- "all",
- sizeof("all") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_SELF,
- "self",
- sizeof("self") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ SELECTION_ID_ALL,
+ "all",
+ sizeof("all") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_SELF,
+ "self",
+ sizeof("self") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_SelectionInfo*
-GetTunableChoice::lookupSelectionInfo(const char* name, int nameLength)
+const bdlat_SelectionInfo *GetTunableChoice::lookupSelectionInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 2; ++i) {
const bdlat_SelectionInfo& selectionInfo =
- GetTunableChoice::SELECTION_INFO_ARRAY[i];
+ GetTunableChoice::SELECTION_INFO_ARRAY[i];
- if (nameLength == selectionInfo.d_nameLength &&
- 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength)) {
+ if (nameLength == selectionInfo.d_nameLength
+ && 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength))
+ {
return &selectionInfo;
}
}
@@ -6169,12 +6889,15 @@ GetTunableChoice::lookupSelectionInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_SelectionInfo* GetTunableChoice::lookupSelectionInfo(int id)
+const bdlat_SelectionInfo *GetTunableChoice::lookupSelectionInfo(int id)
{
switch (id) {
- case SELECTION_ID_ALL: return &SELECTION_INFO_ARRAY[SELECTION_INDEX_ALL];
- case SELECTION_ID_SELF: return &SELECTION_INFO_ARRAY[SELECTION_INDEX_SELF];
- default: return 0;
+ case SELECTION_ID_ALL:
+ return &SELECTION_INFO_ARRAY[SELECTION_INDEX_ALL];
+ case SELECTION_ID_SELF:
+ return &SELECTION_INFO_ARRAY[SELECTION_INDEX_SELF];
+ default:
+ return 0;
}
}
@@ -6184,46 +6907,53 @@ GetTunableChoice::GetTunableChoice(const GetTunableChoice& original)
: d_selectionId(original.d_selectionId)
{
switch (d_selectionId) {
- case SELECTION_ID_ALL: {
- new (d_all.buffer()) Void(original.d_all.object());
- } break;
- case SELECTION_ID_SELF: {
- new (d_self.buffer()) Void(original.d_self.object());
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ case SELECTION_ID_ALL: {
+ new (d_all.buffer())
+ Void(original.d_all.object());
+ } break;
+ case SELECTION_ID_SELF: {
+ new (d_self.buffer())
+ Void(original.d_self.object());
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
GetTunableChoice::GetTunableChoice(GetTunableChoice&& original) noexcept
: d_selectionId(original.d_selectionId)
{
switch (d_selectionId) {
- case SELECTION_ID_ALL: {
- new (d_all.buffer()) Void(bsl::move(original.d_all.object()));
- } break;
- case SELECTION_ID_SELF: {
- new (d_self.buffer()) Void(bsl::move(original.d_self.object()));
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ case SELECTION_ID_ALL: {
+ new (d_all.buffer())
+ Void(bsl::move(original.d_all.object()));
+ } break;
+ case SELECTION_ID_SELF: {
+ new (d_self.buffer())
+ Void(bsl::move(original.d_self.object()));
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
#endif
// MANIPULATORS
-GetTunableChoice& GetTunableChoice::operator=(const GetTunableChoice& rhs)
+GetTunableChoice&
+GetTunableChoice::operator=(const GetTunableChoice& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_ALL: {
+ case SELECTION_ID_ALL: {
makeAll(rhs.d_all.object());
- } break;
- case SELECTION_ID_SELF: {
+ } break;
+ case SELECTION_ID_SELF: {
makeSelf(rhs.d_self.object());
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -6232,19 +6962,20 @@ GetTunableChoice& GetTunableChoice::operator=(const GetTunableChoice& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-GetTunableChoice& GetTunableChoice::operator=(GetTunableChoice&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+GetTunableChoice&
+GetTunableChoice::operator=(GetTunableChoice&& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_ALL: {
+ case SELECTION_ID_ALL: {
makeAll(bsl::move(rhs.d_all.object()));
- } break;
- case SELECTION_ID_SELF: {
+ } break;
+ case SELECTION_ID_SELF: {
makeSelf(bsl::move(rhs.d_self.object()));
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -6257,13 +6988,14 @@ GetTunableChoice& GetTunableChoice::operator=(GetTunableChoice&& rhs)
void GetTunableChoice::reset()
{
switch (d_selectionId) {
- case SELECTION_ID_ALL: {
+ case SELECTION_ID_ALL: {
d_all.object().~Void();
- } break;
- case SELECTION_ID_SELF: {
+ } break;
+ case SELECTION_ID_SELF: {
d_self.object().~Void();
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
d_selectionId = SELECTION_ID_UNDEFINED;
@@ -6272,26 +7004,27 @@ void GetTunableChoice::reset()
int GetTunableChoice::makeSelection(int selectionId)
{
switch (selectionId) {
- case SELECTION_ID_ALL: {
+ case SELECTION_ID_ALL: {
makeAll();
- } break;
- case SELECTION_ID_SELF: {
+ } break;
+ case SELECTION_ID_SELF: {
makeSelf();
- } break;
- case SELECTION_ID_UNDEFINED: {
+ } break;
+ case SELECTION_ID_UNDEFINED: {
reset();
- } break;
- default: return -1;
+ } break;
+ default:
+ return -1;
}
return 0;
}
-int GetTunableChoice::makeSelection(const char* name, int nameLength)
+int GetTunableChoice::makeSelection(const char *name, int nameLength)
{
- const bdlat_SelectionInfo* selectionInfo = lookupSelectionInfo(name,
- nameLength);
+ const bdlat_SelectionInfo *selectionInfo =
+ lookupSelectionInfo(name, nameLength);
if (0 == selectionInfo) {
- return -1;
+ return -1;
}
return makeSelection(selectionInfo->d_id);
@@ -6304,7 +7037,8 @@ Void& GetTunableChoice::makeAll()
}
else {
reset();
- new (d_all.buffer()) Void();
+ new (d_all.buffer())
+ Void();
d_selectionId = SELECTION_ID_ALL;
}
@@ -6318,15 +7052,16 @@ Void& GetTunableChoice::makeAll(const Void& value)
}
else {
reset();
- new (d_all.buffer()) Void(value);
+ new (d_all.buffer())
+ Void(value);
d_selectionId = SELECTION_ID_ALL;
}
return d_all.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Void& GetTunableChoice::makeAll(Void&& value)
{
if (SELECTION_ID_ALL == d_selectionId) {
@@ -6334,7 +7069,8 @@ Void& GetTunableChoice::makeAll(Void&& value)
}
else {
reset();
- new (d_all.buffer()) Void(bsl::move(value));
+ new (d_all.buffer())
+ Void(bsl::move(value));
d_selectionId = SELECTION_ID_ALL;
}
@@ -6349,7 +7085,8 @@ Void& GetTunableChoice::makeSelf()
}
else {
reset();
- new (d_self.buffer()) Void();
+ new (d_self.buffer())
+ Void();
d_selectionId = SELECTION_ID_SELF;
}
@@ -6363,15 +7100,16 @@ Void& GetTunableChoice::makeSelf(const Void& value)
}
else {
reset();
- new (d_self.buffer()) Void(value);
+ new (d_self.buffer())
+ Void(value);
d_selectionId = SELECTION_ID_SELF;
}
return d_self.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Void& GetTunableChoice::makeSelf(Void&& value)
{
if (SELECTION_ID_SELF == d_selectionId) {
@@ -6379,7 +7117,8 @@ Void& GetTunableChoice::makeSelf(Void&& value)
}
else {
reset();
- new (d_self.buffer()) Void(bsl::move(value));
+ new (d_self.buffer())
+ Void(bsl::move(value));
d_selectionId = SELECTION_ID_SELF;
}
@@ -6389,69 +7128,79 @@ Void& GetTunableChoice::makeSelf(Void&& value)
// ACCESSORS
-bsl::ostream& GetTunableChoice::print(bsl::ostream& stream,
- int level,
- int spacesPerLevel) const
+bsl::ostream& GetTunableChoice::print(
+ bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
switch (d_selectionId) {
- case SELECTION_ID_ALL: {
+ case SELECTION_ID_ALL: {
printer.printAttribute("all", d_all.object());
- } break;
- case SELECTION_ID_SELF: {
+ } break;
+ case SELECTION_ID_SELF: {
printer.printAttribute("self", d_self.object());
- } break;
- default: stream << "SELECTION UNDEFINED\n";
+ } break;
+ default:
+ stream << "SELECTION UNDEFINED\n";
}
printer.end();
return stream;
}
-const char* GetTunableChoice::selectionName() const
+
+const char *GetTunableChoice::selectionName() const
{
switch (d_selectionId) {
- case SELECTION_ID_ALL:
+ case SELECTION_ID_ALL:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_ALL].name();
- case SELECTION_ID_SELF:
+ case SELECTION_ID_SELF:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_SELF].name();
- default:
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
return "(* UNDEFINED *)";
}
}
-// ----------
-// class Help
-// ----------
+ // ----------
+ // class Help
+ // ----------
// CONSTANTS
const char Help::CLASS_NAME[] = "Help";
const bdlat_AttributeInfo Help::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_COMMANDS,
- "commands",
- sizeof("commands") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {ATTRIBUTE_ID_IS_PLUMBING,
- "isPlumbing",
- sizeof("isPlumbing") - 1,
- "",
- bdlat_FormattingMode::e_TEXT}};
+ {
+ ATTRIBUTE_ID_COMMANDS,
+ "commands",
+ sizeof("commands") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ ATTRIBUTE_ID_IS_PLUMBING,
+ "isPlumbing",
+ sizeof("isPlumbing") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* Help::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *Help::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 2; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- Help::ATTRIBUTE_INFO_ARRAY[i];
+ Help::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -6459,40 +7208,43 @@ const bdlat_AttributeInfo* Help::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* Help::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *Help::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_COMMANDS:
+ case ATTRIBUTE_ID_COMMANDS:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMANDS];
- case ATTRIBUTE_ID_IS_PLUMBING:
+ case ATTRIBUTE_ID_IS_PLUMBING:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_PLUMBING];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-Help::Help(bslma::Allocator* basicAllocator)
+Help::Help(bslma::Allocator *basicAllocator)
: d_commands(basicAllocator)
, d_isPlumbing()
{
}
-Help::Help(const Help& original, bslma::Allocator* basicAllocator)
+Help::Help(const Help& original,
+ bslma::Allocator *basicAllocator)
: d_commands(original.d_commands, basicAllocator)
, d_isPlumbing(original.d_isPlumbing)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Help::Help(Help&& original) noexcept
-: d_commands(bsl::move(original.d_commands)),
- d_isPlumbing(bsl::move(original.d_isPlumbing))
+: d_commands(bsl::move(original.d_commands))
+, d_isPlumbing(bsl::move(original.d_isPlumbing))
{
}
-Help::Help(Help&& original, bslma::Allocator* basicAllocator)
+Help::Help(Help&& original,
+ bslma::Allocator *basicAllocator)
: d_commands(bsl::move(original.d_commands), basicAllocator)
, d_isPlumbing(bsl::move(original.d_isPlumbing))
{
@@ -6505,22 +7257,24 @@ Help::~Help()
// MANIPULATORS
-Help& Help::operator=(const Help& rhs)
+Help&
+Help::operator=(const Help& rhs)
{
if (this != &rhs) {
- d_commands = rhs.d_commands;
+ d_commands = rhs.d_commands;
d_isPlumbing = rhs.d_isPlumbing;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-Help& Help::operator=(Help&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+Help&
+Help::operator=(Help&& rhs)
{
if (this != &rhs) {
- d_commands = bsl::move(rhs.d_commands);
+ d_commands = bsl::move(rhs.d_commands);
d_isPlumbing = bsl::move(rhs.d_isPlumbing);
}
@@ -6536,8 +7290,9 @@ void Help::reset()
// ACCESSORS
-bsl::ostream&
-Help::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& Help::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
@@ -6547,39 +7302,46 @@ Help::print(bsl::ostream& stream, int level, int spacesPerLevel) const
return stream;
}
-// --------------------------------
-// class MessageGroupIdManagerIndex
-// --------------------------------
+
+
+ // --------------------------------
+ // class MessageGroupIdManagerIndex
+ // --------------------------------
// CONSTANTS
-const char MessageGroupIdManagerIndex::CLASS_NAME[] =
- "MessageGroupIdManagerIndex";
-
-const bdlat_AttributeInfo MessageGroupIdManagerIndex::ATTRIBUTE_INFO_ARRAY[] =
- {{ATTRIBUTE_ID_LEAST_RECENTLY_USED_GROUP_IDS,
- "leastRecentlyUsedGroupIds",
- sizeof("leastRecentlyUsedGroupIds") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {ATTRIBUTE_ID_NUM_MSG_GROUPS_PER_CLIENT,
- "numMsgGroupsPerClient",
- sizeof("numMsgGroupsPerClient") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+const char MessageGroupIdManagerIndex::CLASS_NAME[] = "MessageGroupIdManagerIndex";
+
+const bdlat_AttributeInfo MessageGroupIdManagerIndex::ATTRIBUTE_INFO_ARRAY[] = {
+ {
+ ATTRIBUTE_ID_LEAST_RECENTLY_USED_GROUP_IDS,
+ "leastRecentlyUsedGroupIds",
+ sizeof("leastRecentlyUsedGroupIds") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ ATTRIBUTE_ID_NUM_MSG_GROUPS_PER_CLIENT,
+ "numMsgGroupsPerClient",
+ sizeof("numMsgGroupsPerClient") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo*
-MessageGroupIdManagerIndex::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *MessageGroupIdManagerIndex::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 2; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- MessageGroupIdManagerIndex::ATTRIBUTE_INFO_ARRAY[i];
+ MessageGroupIdManagerIndex::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -6587,54 +7349,45 @@ MessageGroupIdManagerIndex::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo*
-MessageGroupIdManagerIndex::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *MessageGroupIdManagerIndex::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_LEAST_RECENTLY_USED_GROUP_IDS:
- return &ATTRIBUTE_INFO_ARRAY
- [ATTRIBUTE_INDEX_LEAST_RECENTLY_USED_GROUP_IDS];
- case ATTRIBUTE_ID_NUM_MSG_GROUPS_PER_CLIENT:
- return &ATTRIBUTE_INFO_ARRAY
- [ATTRIBUTE_INDEX_NUM_MSG_GROUPS_PER_CLIENT];
- default: return 0;
+ case ATTRIBUTE_ID_LEAST_RECENTLY_USED_GROUP_IDS:
+ return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LEAST_RECENTLY_USED_GROUP_IDS];
+ case ATTRIBUTE_ID_NUM_MSG_GROUPS_PER_CLIENT:
+ return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MSG_GROUPS_PER_CLIENT];
+ default:
+ return 0;
}
}
// CREATORS
-MessageGroupIdManagerIndex::MessageGroupIdManagerIndex(
- bslma::Allocator* basicAllocator)
+MessageGroupIdManagerIndex::MessageGroupIdManagerIndex(bslma::Allocator *basicAllocator)
: d_leastRecentlyUsedGroupIds(basicAllocator)
, d_numMsgGroupsPerClient(basicAllocator)
{
}
-MessageGroupIdManagerIndex::MessageGroupIdManagerIndex(
- const MessageGroupIdManagerIndex& original,
- bslma::Allocator* basicAllocator)
-: d_leastRecentlyUsedGroupIds(original.d_leastRecentlyUsedGroupIds,
- basicAllocator)
+MessageGroupIdManagerIndex::MessageGroupIdManagerIndex(const MessageGroupIdManagerIndex& original,
+ bslma::Allocator *basicAllocator)
+: d_leastRecentlyUsedGroupIds(original.d_leastRecentlyUsedGroupIds, basicAllocator)
, d_numMsgGroupsPerClient(original.d_numMsgGroupsPerClient, basicAllocator)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-MessageGroupIdManagerIndex::MessageGroupIdManagerIndex(
- MessageGroupIdManagerIndex&& original) noexcept
-: d_leastRecentlyUsedGroupIds(bsl::move(original.d_leastRecentlyUsedGroupIds)),
- d_numMsgGroupsPerClient(bsl::move(original.d_numMsgGroupsPerClient))
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+MessageGroupIdManagerIndex::MessageGroupIdManagerIndex(MessageGroupIdManagerIndex&& original) noexcept
+: d_leastRecentlyUsedGroupIds(bsl::move(original.d_leastRecentlyUsedGroupIds))
+, d_numMsgGroupsPerClient(bsl::move(original.d_numMsgGroupsPerClient))
{
}
-MessageGroupIdManagerIndex::MessageGroupIdManagerIndex(
- MessageGroupIdManagerIndex&& original,
- bslma::Allocator* basicAllocator)
-: d_leastRecentlyUsedGroupIds(bsl::move(original.d_leastRecentlyUsedGroupIds),
- basicAllocator)
-, d_numMsgGroupsPerClient(bsl::move(original.d_numMsgGroupsPerClient),
- basicAllocator)
+MessageGroupIdManagerIndex::MessageGroupIdManagerIndex(MessageGroupIdManagerIndex&& original,
+ bslma::Allocator *basicAllocator)
+: d_leastRecentlyUsedGroupIds(bsl::move(original.d_leastRecentlyUsedGroupIds), basicAllocator)
+, d_numMsgGroupsPerClient(bsl::move(original.d_numMsgGroupsPerClient), basicAllocator)
{
}
#endif
@@ -6650,20 +7403,19 @@ MessageGroupIdManagerIndex::operator=(const MessageGroupIdManagerIndex& rhs)
{
if (this != &rhs) {
d_leastRecentlyUsedGroupIds = rhs.d_leastRecentlyUsedGroupIds;
- d_numMsgGroupsPerClient = rhs.d_numMsgGroupsPerClient;
+ d_numMsgGroupsPerClient = rhs.d_numMsgGroupsPerClient;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
MessageGroupIdManagerIndex&
MessageGroupIdManagerIndex::operator=(MessageGroupIdManagerIndex&& rhs)
{
if (this != &rhs) {
- d_leastRecentlyUsedGroupIds = bsl::move(
- rhs.d_leastRecentlyUsedGroupIds);
+ d_leastRecentlyUsedGroupIds = bsl::move(rhs.d_leastRecentlyUsedGroupIds);
d_numMsgGroupsPerClient = bsl::move(rhs.d_numMsgGroupsPerClient);
}
@@ -6679,66 +7431,80 @@ void MessageGroupIdManagerIndex::reset()
// ACCESSORS
-bsl::ostream& MessageGroupIdManagerIndex::print(bsl::ostream& stream,
- int level,
- int spacesPerLevel) const
+bsl::ostream& MessageGroupIdManagerIndex::print(
+ bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
- printer.printAttribute("leastRecentlyUsedGroupIds",
- this->leastRecentlyUsedGroupIds());
- printer.printAttribute("numMsgGroupsPerClient",
- this->numMsgGroupsPerClient());
+ printer.printAttribute("leastRecentlyUsedGroupIds", this->leastRecentlyUsedGroupIds());
+ printer.printAttribute("numMsgGroupsPerClient", this->numMsgGroupsPerClient());
printer.end();
return stream;
}
-// -------------------
-// class PartitionInfo
-// -------------------
+
+
+ // -------------------
+ // class PartitionInfo
+ // -------------------
// CONSTANTS
const char PartitionInfo::CLASS_NAME[] = "PartitionInfo";
const bdlat_AttributeInfo PartitionInfo::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_NUM_QUEUES_MAPPED,
- "numQueuesMapped",
- sizeof("numQueuesMapped") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_NUM_ACTIVE_QUEUES,
- "numActiveQueues",
- sizeof("numActiveQueues") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_PRIMARY_NODE,
- "primaryNode",
- sizeof("primaryNode") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_PRIMARY_LEASE_ID,
- "primaryLeaseId",
- sizeof("primaryLeaseId") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_PRIMARY_STATUS,
- "primaryStatus",
- sizeof("primaryStatus") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ ATTRIBUTE_ID_NUM_QUEUES_MAPPED,
+ "numQueuesMapped",
+ sizeof("numQueuesMapped") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_NUM_ACTIVE_QUEUES,
+ "numActiveQueues",
+ sizeof("numActiveQueues") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_PRIMARY_NODE,
+ "primaryNode",
+ sizeof("primaryNode") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_PRIMARY_LEASE_ID,
+ "primaryLeaseId",
+ sizeof("primaryLeaseId") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_PRIMARY_STATUS,
+ "primaryStatus",
+ sizeof("primaryStatus") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* PartitionInfo::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *PartitionInfo::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 5; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- PartitionInfo::ATTRIBUTE_INFO_ARRAY[i];
+ PartitionInfo::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -6746,26 +7512,27 @@ const bdlat_AttributeInfo* PartitionInfo::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* PartitionInfo::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *PartitionInfo::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_NUM_QUEUES_MAPPED:
+ case ATTRIBUTE_ID_NUM_QUEUES_MAPPED:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_QUEUES_MAPPED];
- case ATTRIBUTE_ID_NUM_ACTIVE_QUEUES:
+ case ATTRIBUTE_ID_NUM_ACTIVE_QUEUES:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_ACTIVE_QUEUES];
- case ATTRIBUTE_ID_PRIMARY_NODE:
+ case ATTRIBUTE_ID_PRIMARY_NODE:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_NODE];
- case ATTRIBUTE_ID_PRIMARY_LEASE_ID:
+ case ATTRIBUTE_ID_PRIMARY_LEASE_ID:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_LEASE_ID];
- case ATTRIBUTE_ID_PRIMARY_STATUS:
+ case ATTRIBUTE_ID_PRIMARY_STATUS:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_STATUS];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-PartitionInfo::PartitionInfo(bslma::Allocator* basicAllocator)
+PartitionInfo::PartitionInfo(bslma::Allocator *basicAllocator)
: d_primaryNode(basicAllocator)
, d_primaryLeaseId()
, d_numQueuesMapped()
@@ -6775,7 +7542,7 @@ PartitionInfo::PartitionInfo(bslma::Allocator* basicAllocator)
}
PartitionInfo::PartitionInfo(const PartitionInfo& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_primaryNode(original.d_primaryNode, basicAllocator)
, d_primaryLeaseId(original.d_primaryLeaseId)
, d_numQueuesMapped(original.d_numQueuesMapped)
@@ -6784,19 +7551,19 @@ PartitionInfo::PartitionInfo(const PartitionInfo& original,
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
PartitionInfo::PartitionInfo(PartitionInfo&& original) noexcept
-: d_primaryNode(bsl::move(original.d_primaryNode)),
- d_primaryLeaseId(bsl::move(original.d_primaryLeaseId)),
- d_numQueuesMapped(bsl::move(original.d_numQueuesMapped)),
- d_numActiveQueues(bsl::move(original.d_numActiveQueues)),
- d_primaryStatus(bsl::move(original.d_primaryStatus))
+: d_primaryNode(bsl::move(original.d_primaryNode))
+, d_primaryLeaseId(bsl::move(original.d_primaryLeaseId))
+, d_numQueuesMapped(bsl::move(original.d_numQueuesMapped))
+, d_numActiveQueues(bsl::move(original.d_numActiveQueues))
+, d_primaryStatus(bsl::move(original.d_primaryStatus))
{
}
-PartitionInfo::PartitionInfo(PartitionInfo&& original,
- bslma::Allocator* basicAllocator)
+PartitionInfo::PartitionInfo(PartitionInfo&& original,
+ bslma::Allocator *basicAllocator)
: d_primaryNode(bsl::move(original.d_primaryNode), basicAllocator)
, d_primaryLeaseId(bsl::move(original.d_primaryLeaseId))
, d_numQueuesMapped(bsl::move(original.d_numQueuesMapped))
@@ -6812,29 +7579,31 @@ PartitionInfo::~PartitionInfo()
// MANIPULATORS
-PartitionInfo& PartitionInfo::operator=(const PartitionInfo& rhs)
+PartitionInfo&
+PartitionInfo::operator=(const PartitionInfo& rhs)
{
if (this != &rhs) {
d_numQueuesMapped = rhs.d_numQueuesMapped;
d_numActiveQueues = rhs.d_numActiveQueues;
- d_primaryNode = rhs.d_primaryNode;
- d_primaryLeaseId = rhs.d_primaryLeaseId;
- d_primaryStatus = rhs.d_primaryStatus;
+ d_primaryNode = rhs.d_primaryNode;
+ d_primaryLeaseId = rhs.d_primaryLeaseId;
+ d_primaryStatus = rhs.d_primaryStatus;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-PartitionInfo& PartitionInfo::operator=(PartitionInfo&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+PartitionInfo&
+PartitionInfo::operator=(PartitionInfo&& rhs)
{
if (this != &rhs) {
d_numQueuesMapped = bsl::move(rhs.d_numQueuesMapped);
d_numActiveQueues = bsl::move(rhs.d_numActiveQueues);
- d_primaryNode = bsl::move(rhs.d_primaryNode);
- d_primaryLeaseId = bsl::move(rhs.d_primaryLeaseId);
- d_primaryStatus = bsl::move(rhs.d_primaryStatus);
+ d_primaryNode = bsl::move(rhs.d_primaryNode);
+ d_primaryLeaseId = bsl::move(rhs.d_primaryLeaseId);
+ d_primaryStatus = bsl::move(rhs.d_primaryStatus);
}
return *this;
@@ -6852,8 +7621,9 @@ void PartitionInfo::reset()
// ACCESSORS
-bsl::ostream&
-PartitionInfo::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& PartitionInfo::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
@@ -6866,37 +7636,46 @@ PartitionInfo::print(bsl::ostream& stream, int level, int spacesPerLevel) const
return stream;
}
-// ----------------------
-// class PurgeQueueResult
-// ----------------------
+
+
+ // ----------------------
+ // class PurgeQueueResult
+ // ----------------------
// CONSTANTS
const char PurgeQueueResult::CLASS_NAME[] = "PurgeQueueResult";
const bdlat_SelectionInfo PurgeQueueResult::SELECTION_INFO_ARRAY[] = {
- {SELECTION_ID_ERROR,
- "error",
- sizeof("error") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_QUEUE,
- "queue",
- sizeof("queue") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ SELECTION_ID_ERROR,
+ "error",
+ sizeof("error") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_QUEUE,
+ "queue",
+ sizeof("queue") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_SelectionInfo*
-PurgeQueueResult::lookupSelectionInfo(const char* name, int nameLength)
+const bdlat_SelectionInfo *PurgeQueueResult::lookupSelectionInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 2; ++i) {
const bdlat_SelectionInfo& selectionInfo =
- PurgeQueueResult::SELECTION_INFO_ARRAY[i];
+ PurgeQueueResult::SELECTION_INFO_ARRAY[i];
- if (nameLength == selectionInfo.d_nameLength &&
- 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength)) {
+ if (nameLength == selectionInfo.d_nameLength
+ && 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength))
+ {
return &selectionInfo;
}
}
@@ -6904,89 +7683,101 @@ PurgeQueueResult::lookupSelectionInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_SelectionInfo* PurgeQueueResult::lookupSelectionInfo(int id)
+const bdlat_SelectionInfo *PurgeQueueResult::lookupSelectionInfo(int id)
{
switch (id) {
- case SELECTION_ID_ERROR:
+ case SELECTION_ID_ERROR:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR];
- case SELECTION_ID_QUEUE:
+ case SELECTION_ID_QUEUE:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-PurgeQueueResult::PurgeQueueResult(const PurgeQueueResult& original,
- bslma::Allocator* basicAllocator)
+PurgeQueueResult::PurgeQueueResult(
+ const PurgeQueueResult& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_ERROR: {
- new (d_error.buffer()) Error(original.d_error.object(), d_allocator_p);
- } break;
- case SELECTION_ID_QUEUE: {
+ case SELECTION_ID_ERROR: {
+ new (d_error.buffer())
+ Error(
+ original.d_error.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_QUEUE: {
new (d_queue.buffer())
- PurgedQueueDetails(original.d_queue.object(), d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ PurgedQueueDetails(
+ original.d_queue.object(), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
PurgeQueueResult::PurgeQueueResult(PurgeQueueResult&& original) noexcept
-: d_selectionId(original.d_selectionId),
- d_allocator_p(original.d_allocator_p)
+: d_selectionId(original.d_selectionId)
+, d_allocator_p(original.d_allocator_p)
{
switch (d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
new (d_error.buffer())
- Error(bsl::move(original.d_error.object()), d_allocator_p);
- } break;
- case SELECTION_ID_QUEUE: {
+ Error(
+ bsl::move(original.d_error.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_QUEUE: {
new (d_queue.buffer())
- PurgedQueueDetails(bsl::move(original.d_queue.object()),
- d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ PurgedQueueDetails(
+ bsl::move(original.d_queue.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-PurgeQueueResult::PurgeQueueResult(PurgeQueueResult&& original,
- bslma::Allocator* basicAllocator)
+PurgeQueueResult::PurgeQueueResult(
+ PurgeQueueResult&& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
new (d_error.buffer())
- Error(bsl::move(original.d_error.object()), d_allocator_p);
- } break;
- case SELECTION_ID_QUEUE: {
+ Error(
+ bsl::move(original.d_error.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_QUEUE: {
new (d_queue.buffer())
- PurgedQueueDetails(bsl::move(original.d_queue.object()),
- d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ PurgedQueueDetails(
+ bsl::move(original.d_queue.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
#endif
// MANIPULATORS
-PurgeQueueResult& PurgeQueueResult::operator=(const PurgeQueueResult& rhs)
+PurgeQueueResult&
+PurgeQueueResult::operator=(const PurgeQueueResult& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
makeError(rhs.d_error.object());
- } break;
- case SELECTION_ID_QUEUE: {
+ } break;
+ case SELECTION_ID_QUEUE: {
makeQueue(rhs.d_queue.object());
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -6995,19 +7786,20 @@ PurgeQueueResult& PurgeQueueResult::operator=(const PurgeQueueResult& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-PurgeQueueResult& PurgeQueueResult::operator=(PurgeQueueResult&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+PurgeQueueResult&
+PurgeQueueResult::operator=(PurgeQueueResult&& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
makeError(bsl::move(rhs.d_error.object()));
- } break;
- case SELECTION_ID_QUEUE: {
+ } break;
+ case SELECTION_ID_QUEUE: {
makeQueue(bsl::move(rhs.d_queue.object()));
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -7020,13 +7812,14 @@ PurgeQueueResult& PurgeQueueResult::operator=(PurgeQueueResult&& rhs)
void PurgeQueueResult::reset()
{
switch (d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
d_error.object().~Error();
- } break;
- case SELECTION_ID_QUEUE: {
+ } break;
+ case SELECTION_ID_QUEUE: {
d_queue.object().~PurgedQueueDetails();
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
d_selectionId = SELECTION_ID_UNDEFINED;
@@ -7035,26 +7828,27 @@ void PurgeQueueResult::reset()
int PurgeQueueResult::makeSelection(int selectionId)
{
switch (selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
makeError();
- } break;
- case SELECTION_ID_QUEUE: {
+ } break;
+ case SELECTION_ID_QUEUE: {
makeQueue();
- } break;
- case SELECTION_ID_UNDEFINED: {
+ } break;
+ case SELECTION_ID_UNDEFINED: {
reset();
- } break;
- default: return -1;
+ } break;
+ default:
+ return -1;
}
return 0;
}
-int PurgeQueueResult::makeSelection(const char* name, int nameLength)
+int PurgeQueueResult::makeSelection(const char *name, int nameLength)
{
- const bdlat_SelectionInfo* selectionInfo = lookupSelectionInfo(name,
- nameLength);
+ const bdlat_SelectionInfo *selectionInfo =
+ lookupSelectionInfo(name, nameLength);
if (0 == selectionInfo) {
- return -1;
+ return -1;
}
return makeSelection(selectionInfo->d_id);
@@ -7067,7 +7861,8 @@ Error& PurgeQueueResult::makeError()
}
else {
reset();
- new (d_error.buffer()) Error(d_allocator_p);
+ new (d_error.buffer())
+ Error(d_allocator_p);
d_selectionId = SELECTION_ID_ERROR;
}
@@ -7081,15 +7876,16 @@ Error& PurgeQueueResult::makeError(const Error& value)
}
else {
reset();
- new (d_error.buffer()) Error(value, d_allocator_p);
+ new (d_error.buffer())
+ Error(value, d_allocator_p);
d_selectionId = SELECTION_ID_ERROR;
}
return d_error.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Error& PurgeQueueResult::makeError(Error&& value)
{
if (SELECTION_ID_ERROR == d_selectionId) {
@@ -7097,7 +7893,8 @@ Error& PurgeQueueResult::makeError(Error&& value)
}
else {
reset();
- new (d_error.buffer()) Error(bsl::move(value), d_allocator_p);
+ new (d_error.buffer())
+ Error(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_ERROR;
}
@@ -7112,30 +7909,31 @@ PurgedQueueDetails& PurgeQueueResult::makeQueue()
}
else {
reset();
- new (d_queue.buffer()) PurgedQueueDetails(d_allocator_p);
+ new (d_queue.buffer())
+ PurgedQueueDetails(d_allocator_p);
d_selectionId = SELECTION_ID_QUEUE;
}
return d_queue.object();
}
-PurgedQueueDetails&
-PurgeQueueResult::makeQueue(const PurgedQueueDetails& value)
+PurgedQueueDetails& PurgeQueueResult::makeQueue(const PurgedQueueDetails& value)
{
if (SELECTION_ID_QUEUE == d_selectionId) {
d_queue.object() = value;
}
else {
reset();
- new (d_queue.buffer()) PurgedQueueDetails(value, d_allocator_p);
+ new (d_queue.buffer())
+ PurgedQueueDetails(value, d_allocator_p);
d_selectionId = SELECTION_ID_QUEUE;
}
return d_queue.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
PurgedQueueDetails& PurgeQueueResult::makeQueue(PurgedQueueDetails&& value)
{
if (SELECTION_ID_QUEUE == d_selectionId) {
@@ -7144,7 +7942,7 @@ PurgedQueueDetails& PurgeQueueResult::makeQueue(PurgedQueueDetails&& value)
else {
reset();
new (d_queue.buffer())
- PurgedQueueDetails(bsl::move(value), d_allocator_p);
+ PurgedQueueDetails(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_QUEUE;
}
@@ -7154,74 +7952,86 @@ PurgedQueueDetails& PurgeQueueResult::makeQueue(PurgedQueueDetails&& value)
// ACCESSORS
-bsl::ostream& PurgeQueueResult::print(bsl::ostream& stream,
- int level,
- int spacesPerLevel) const
+bsl::ostream& PurgeQueueResult::print(
+ bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
switch (d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
printer.printAttribute("error", d_error.object());
- } break;
- case SELECTION_ID_QUEUE: {
+ } break;
+ case SELECTION_ID_QUEUE: {
printer.printAttribute("queue", d_queue.object());
- } break;
- default: stream << "SELECTION UNDEFINED\n";
+ } break;
+ default:
+ stream << "SELECTION UNDEFINED\n";
}
printer.end();
return stream;
}
-const char* PurgeQueueResult::selectionName() const
+
+const char *PurgeQueueResult::selectionName() const
{
switch (d_selectionId) {
- case SELECTION_ID_ERROR:
+ case SELECTION_ID_ERROR:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR].name();
- case SELECTION_ID_QUEUE:
+ case SELECTION_ID_QUEUE:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE].name();
- default:
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
return "(* UNDEFINED *)";
}
}
-// ------------------
-// class QueueCommand
-// ------------------
+ // ------------------
+ // class QueueCommand
+ // ------------------
// CONSTANTS
const char QueueCommand::CLASS_NAME[] = "QueueCommand";
const bdlat_SelectionInfo QueueCommand::SELECTION_INFO_ARRAY[] = {
- {SELECTION_ID_PURGE_APP_ID,
- "purgeAppId",
- sizeof("purgeAppId") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {SELECTION_ID_INTERNALS,
- "internals",
- sizeof("internals") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_MESSAGES,
- "messages",
- sizeof("messages") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ SELECTION_ID_PURGE_APP_ID,
+ "purgeAppId",
+ sizeof("purgeAppId") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ SELECTION_ID_INTERNALS,
+ "internals",
+ sizeof("internals") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_MESSAGES,
+ "messages",
+ sizeof("messages") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_SelectionInfo* QueueCommand::lookupSelectionInfo(const char* name,
- int nameLength)
+const bdlat_SelectionInfo *QueueCommand::lookupSelectionInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 3; ++i) {
const bdlat_SelectionInfo& selectionInfo =
- QueueCommand::SELECTION_INFO_ARRAY[i];
+ QueueCommand::SELECTION_INFO_ARRAY[i];
- if (nameLength == selectionInfo.d_nameLength &&
- 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength)) {
+ if (nameLength == selectionInfo.d_nameLength
+ && 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength))
+ {
return &selectionInfo;
}
}
@@ -7229,108 +8039,118 @@ const bdlat_SelectionInfo* QueueCommand::lookupSelectionInfo(const char* name,
return 0;
}
-const bdlat_SelectionInfo* QueueCommand::lookupSelectionInfo(int id)
+const bdlat_SelectionInfo *QueueCommand::lookupSelectionInfo(int id)
{
switch (id) {
- case SELECTION_ID_PURGE_APP_ID:
+ case SELECTION_ID_PURGE_APP_ID:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_PURGE_APP_ID];
- case SELECTION_ID_INTERNALS:
+ case SELECTION_ID_INTERNALS:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_INTERNALS];
- case SELECTION_ID_MESSAGES:
+ case SELECTION_ID_MESSAGES:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_MESSAGES];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-QueueCommand::QueueCommand(const QueueCommand& original,
- bslma::Allocator* basicAllocator)
+QueueCommand::QueueCommand(
+ const QueueCommand& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_PURGE_APP_ID: {
+ case SELECTION_ID_PURGE_APP_ID: {
new (d_purgeAppId.buffer())
- bsl::string(original.d_purgeAppId.object(), d_allocator_p);
- } break;
- case SELECTION_ID_INTERNALS: {
- new (d_internals.buffer()) Void(original.d_internals.object());
- } break;
- case SELECTION_ID_MESSAGES: {
+ bsl::string(
+ original.d_purgeAppId.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_INTERNALS: {
+ new (d_internals.buffer())
+ Void(original.d_internals.object());
+ } break;
+ case SELECTION_ID_MESSAGES: {
new (d_messages.buffer())
- ListMessages(original.d_messages.object(), d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ ListMessages(
+ original.d_messages.object(), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
QueueCommand::QueueCommand(QueueCommand&& original) noexcept
-: d_selectionId(original.d_selectionId),
- d_allocator_p(original.d_allocator_p)
+: d_selectionId(original.d_selectionId)
+, d_allocator_p(original.d_allocator_p)
{
switch (d_selectionId) {
- case SELECTION_ID_PURGE_APP_ID: {
+ case SELECTION_ID_PURGE_APP_ID: {
new (d_purgeAppId.buffer())
- bsl::string(bsl::move(original.d_purgeAppId.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_INTERNALS: {
+ bsl::string(
+ bsl::move(original.d_purgeAppId.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_INTERNALS: {
new (d_internals.buffer())
Void(bsl::move(original.d_internals.object()));
- } break;
- case SELECTION_ID_MESSAGES: {
+ } break;
+ case SELECTION_ID_MESSAGES: {
new (d_messages.buffer())
- ListMessages(bsl::move(original.d_messages.object()),
- d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ ListMessages(
+ bsl::move(original.d_messages.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-QueueCommand::QueueCommand(QueueCommand&& original,
- bslma::Allocator* basicAllocator)
+QueueCommand::QueueCommand(
+ QueueCommand&& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_PURGE_APP_ID: {
+ case SELECTION_ID_PURGE_APP_ID: {
new (d_purgeAppId.buffer())
- bsl::string(bsl::move(original.d_purgeAppId.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_INTERNALS: {
+ bsl::string(
+ bsl::move(original.d_purgeAppId.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_INTERNALS: {
new (d_internals.buffer())
Void(bsl::move(original.d_internals.object()));
- } break;
- case SELECTION_ID_MESSAGES: {
+ } break;
+ case SELECTION_ID_MESSAGES: {
new (d_messages.buffer())
- ListMessages(bsl::move(original.d_messages.object()),
- d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ ListMessages(
+ bsl::move(original.d_messages.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
#endif
// MANIPULATORS
-QueueCommand& QueueCommand::operator=(const QueueCommand& rhs)
+QueueCommand&
+QueueCommand::operator=(const QueueCommand& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_PURGE_APP_ID: {
+ case SELECTION_ID_PURGE_APP_ID: {
makePurgeAppId(rhs.d_purgeAppId.object());
- } break;
- case SELECTION_ID_INTERNALS: {
+ } break;
+ case SELECTION_ID_INTERNALS: {
makeInternals(rhs.d_internals.object());
- } break;
- case SELECTION_ID_MESSAGES: {
+ } break;
+ case SELECTION_ID_MESSAGES: {
makeMessages(rhs.d_messages.object());
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -7339,22 +8159,23 @@ QueueCommand& QueueCommand::operator=(const QueueCommand& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-QueueCommand& QueueCommand::operator=(QueueCommand&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+QueueCommand&
+QueueCommand::operator=(QueueCommand&& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_PURGE_APP_ID: {
+ case SELECTION_ID_PURGE_APP_ID: {
makePurgeAppId(bsl::move(rhs.d_purgeAppId.object()));
- } break;
- case SELECTION_ID_INTERNALS: {
+ } break;
+ case SELECTION_ID_INTERNALS: {
makeInternals(bsl::move(rhs.d_internals.object()));
- } break;
- case SELECTION_ID_MESSAGES: {
+ } break;
+ case SELECTION_ID_MESSAGES: {
makeMessages(bsl::move(rhs.d_messages.object()));
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -7367,17 +8188,18 @@ QueueCommand& QueueCommand::operator=(QueueCommand&& rhs)
void QueueCommand::reset()
{
switch (d_selectionId) {
- case SELECTION_ID_PURGE_APP_ID: {
+ case SELECTION_ID_PURGE_APP_ID: {
typedef bsl::string Type;
d_purgeAppId.object().~Type();
- } break;
- case SELECTION_ID_INTERNALS: {
+ } break;
+ case SELECTION_ID_INTERNALS: {
d_internals.object().~Void();
- } break;
- case SELECTION_ID_MESSAGES: {
+ } break;
+ case SELECTION_ID_MESSAGES: {
d_messages.object().~ListMessages();
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
d_selectionId = SELECTION_ID_UNDEFINED;
@@ -7386,29 +8208,30 @@ void QueueCommand::reset()
int QueueCommand::makeSelection(int selectionId)
{
switch (selectionId) {
- case SELECTION_ID_PURGE_APP_ID: {
+ case SELECTION_ID_PURGE_APP_ID: {
makePurgeAppId();
- } break;
- case SELECTION_ID_INTERNALS: {
+ } break;
+ case SELECTION_ID_INTERNALS: {
makeInternals();
- } break;
- case SELECTION_ID_MESSAGES: {
+ } break;
+ case SELECTION_ID_MESSAGES: {
makeMessages();
- } break;
- case SELECTION_ID_UNDEFINED: {
+ } break;
+ case SELECTION_ID_UNDEFINED: {
reset();
- } break;
- default: return -1;
+ } break;
+ default:
+ return -1;
}
return 0;
}
-int QueueCommand::makeSelection(const char* name, int nameLength)
+int QueueCommand::makeSelection(const char *name, int nameLength)
{
- const bdlat_SelectionInfo* selectionInfo = lookupSelectionInfo(name,
- nameLength);
+ const bdlat_SelectionInfo *selectionInfo =
+ lookupSelectionInfo(name, nameLength);
if (0 == selectionInfo) {
- return -1;
+ return -1;
}
return makeSelection(selectionInfo->d_id);
@@ -7421,7 +8244,8 @@ bsl::string& QueueCommand::makePurgeAppId()
}
else {
reset();
- new (d_purgeAppId.buffer()) bsl::string(d_allocator_p);
+ new (d_purgeAppId.buffer())
+ bsl::string(d_allocator_p);
d_selectionId = SELECTION_ID_PURGE_APP_ID;
}
@@ -7435,15 +8259,16 @@ bsl::string& QueueCommand::makePurgeAppId(const bsl::string& value)
}
else {
reset();
- new (d_purgeAppId.buffer()) bsl::string(value, d_allocator_p);
+ new (d_purgeAppId.buffer())
+ bsl::string(value, d_allocator_p);
d_selectionId = SELECTION_ID_PURGE_APP_ID;
}
return d_purgeAppId.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
bsl::string& QueueCommand::makePurgeAppId(bsl::string&& value)
{
if (SELECTION_ID_PURGE_APP_ID == d_selectionId) {
@@ -7452,7 +8277,7 @@ bsl::string& QueueCommand::makePurgeAppId(bsl::string&& value)
else {
reset();
new (d_purgeAppId.buffer())
- bsl::string(bsl::move(value), d_allocator_p);
+ bsl::string(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_PURGE_APP_ID;
}
@@ -7467,7 +8292,8 @@ Void& QueueCommand::makeInternals()
}
else {
reset();
- new (d_internals.buffer()) Void();
+ new (d_internals.buffer())
+ Void();
d_selectionId = SELECTION_ID_INTERNALS;
}
@@ -7481,15 +8307,16 @@ Void& QueueCommand::makeInternals(const Void& value)
}
else {
reset();
- new (d_internals.buffer()) Void(value);
+ new (d_internals.buffer())
+ Void(value);
d_selectionId = SELECTION_ID_INTERNALS;
}
return d_internals.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Void& QueueCommand::makeInternals(Void&& value)
{
if (SELECTION_ID_INTERNALS == d_selectionId) {
@@ -7497,7 +8324,8 @@ Void& QueueCommand::makeInternals(Void&& value)
}
else {
reset();
- new (d_internals.buffer()) Void(bsl::move(value));
+ new (d_internals.buffer())
+ Void(bsl::move(value));
d_selectionId = SELECTION_ID_INTERNALS;
}
@@ -7512,7 +8340,8 @@ ListMessages& QueueCommand::makeMessages()
}
else {
reset();
- new (d_messages.buffer()) ListMessages(d_allocator_p);
+ new (d_messages.buffer())
+ ListMessages(d_allocator_p);
d_selectionId = SELECTION_ID_MESSAGES;
}
@@ -7526,15 +8355,16 @@ ListMessages& QueueCommand::makeMessages(const ListMessages& value)
}
else {
reset();
- new (d_messages.buffer()) ListMessages(value, d_allocator_p);
+ new (d_messages.buffer())
+ ListMessages(value, d_allocator_p);
d_selectionId = SELECTION_ID_MESSAGES;
}
return d_messages.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ListMessages& QueueCommand::makeMessages(ListMessages&& value)
{
if (SELECTION_ID_MESSAGES == d_selectionId) {
@@ -7543,7 +8373,7 @@ ListMessages& QueueCommand::makeMessages(ListMessages&& value)
else {
reset();
new (d_messages.buffer())
- ListMessages(bsl::move(value), d_allocator_p);
+ ListMessages(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_MESSAGES;
}
@@ -7553,78 +8383,91 @@ ListMessages& QueueCommand::makeMessages(ListMessages&& value)
// ACCESSORS
-bsl::ostream&
-QueueCommand::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& QueueCommand::print(
+ bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
switch (d_selectionId) {
- case SELECTION_ID_PURGE_APP_ID: {
+ case SELECTION_ID_PURGE_APP_ID: {
printer.printAttribute("purgeAppId", d_purgeAppId.object());
- } break;
- case SELECTION_ID_INTERNALS: {
+ } break;
+ case SELECTION_ID_INTERNALS: {
printer.printAttribute("internals", d_internals.object());
- } break;
- case SELECTION_ID_MESSAGES: {
+ } break;
+ case SELECTION_ID_MESSAGES: {
printer.printAttribute("messages", d_messages.object());
- } break;
- default: stream << "SELECTION UNDEFINED\n";
+ } break;
+ default:
+ stream << "SELECTION UNDEFINED\n";
}
printer.end();
return stream;
}
-const char* QueueCommand::selectionName() const
+
+const char *QueueCommand::selectionName() const
{
switch (d_selectionId) {
- case SELECTION_ID_PURGE_APP_ID:
+ case SELECTION_ID_PURGE_APP_ID:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_PURGE_APP_ID].name();
- case SELECTION_ID_INTERNALS:
+ case SELECTION_ID_INTERNALS:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_INTERNALS].name();
- case SELECTION_ID_MESSAGES:
+ case SELECTION_ID_MESSAGES:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_MESSAGES].name();
- default:
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
return "(* UNDEFINED *)";
}
}
-// -------------------
-// class QueueContents
-// -------------------
+ // -------------------
+ // class QueueContents
+ // -------------------
// CONSTANTS
const char QueueContents::CLASS_NAME[] = "QueueContents";
const bdlat_AttributeInfo QueueContents::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_MESSAGES,
- "messages",
- sizeof("messages") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {ATTRIBUTE_ID_OFFSET,
- "offset",
- sizeof("offset") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_TOTAL_QUEUE_MESSAGES,
- "totalQueueMessages",
- sizeof("totalQueueMessages") - 1,
- "",
- bdlat_FormattingMode::e_DEC}};
+ {
+ ATTRIBUTE_ID_MESSAGES,
+ "messages",
+ sizeof("messages") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ ATTRIBUTE_ID_OFFSET,
+ "offset",
+ sizeof("offset") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_TOTAL_QUEUE_MESSAGES,
+ "totalQueueMessages",
+ sizeof("totalQueueMessages") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* QueueContents::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *QueueContents::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 3; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- QueueContents::ATTRIBUTE_INFO_ARRAY[i];
+ QueueContents::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -7632,22 +8475,23 @@ const bdlat_AttributeInfo* QueueContents::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* QueueContents::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *QueueContents::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_MESSAGES:
+ case ATTRIBUTE_ID_MESSAGES:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGES];
- case ATTRIBUTE_ID_OFFSET:
+ case ATTRIBUTE_ID_OFFSET:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_OFFSET];
- case ATTRIBUTE_ID_TOTAL_QUEUE_MESSAGES:
+ case ATTRIBUTE_ID_TOTAL_QUEUE_MESSAGES:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_TOTAL_QUEUE_MESSAGES];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-QueueContents::QueueContents(bslma::Allocator* basicAllocator)
+QueueContents::QueueContents(bslma::Allocator *basicAllocator)
: d_offset()
, d_totalQueueMessages()
, d_messages(basicAllocator)
@@ -7655,24 +8499,24 @@ QueueContents::QueueContents(bslma::Allocator* basicAllocator)
}
QueueContents::QueueContents(const QueueContents& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_offset(original.d_offset)
, d_totalQueueMessages(original.d_totalQueueMessages)
, d_messages(original.d_messages, basicAllocator)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
QueueContents::QueueContents(QueueContents&& original) noexcept
-: d_offset(bsl::move(original.d_offset)),
- d_totalQueueMessages(bsl::move(original.d_totalQueueMessages)),
- d_messages(bsl::move(original.d_messages))
+: d_offset(bsl::move(original.d_offset))
+, d_totalQueueMessages(bsl::move(original.d_totalQueueMessages))
+, d_messages(bsl::move(original.d_messages))
{
}
-QueueContents::QueueContents(QueueContents&& original,
- bslma::Allocator* basicAllocator)
+QueueContents::QueueContents(QueueContents&& original,
+ bslma::Allocator *basicAllocator)
: d_offset(bsl::move(original.d_offset))
, d_totalQueueMessages(bsl::move(original.d_totalQueueMessages))
, d_messages(bsl::move(original.d_messages), basicAllocator)
@@ -7686,24 +8530,26 @@ QueueContents::~QueueContents()
// MANIPULATORS
-QueueContents& QueueContents::operator=(const QueueContents& rhs)
+QueueContents&
+QueueContents::operator=(const QueueContents& rhs)
{
if (this != &rhs) {
- d_messages = rhs.d_messages;
- d_offset = rhs.d_offset;
+ d_messages = rhs.d_messages;
+ d_offset = rhs.d_offset;
d_totalQueueMessages = rhs.d_totalQueueMessages;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-QueueContents& QueueContents::operator=(QueueContents&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+QueueContents&
+QueueContents::operator=(QueueContents&& rhs)
{
if (this != &rhs) {
- d_messages = bsl::move(rhs.d_messages);
- d_offset = bsl::move(rhs.d_offset);
+ d_messages = bsl::move(rhs.d_messages);
+ d_offset = bsl::move(rhs.d_offset);
d_totalQueueMessages = bsl::move(rhs.d_totalQueueMessages);
}
@@ -7720,8 +8566,9 @@ void QueueContents::reset()
// ACCESSORS
-bsl::ostream&
-QueueContents::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& QueueContents::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
@@ -7732,42 +8579,53 @@ QueueContents::print(bsl::ostream& stream, int level, int spacesPerLevel) const
return stream;
}
-// ------------------
-// class QueueStorage
-// ------------------
+
+
+ // ------------------
+ // class QueueStorage
+ // ------------------
// CONSTANTS
const char QueueStorage::CLASS_NAME[] = "QueueStorage";
const bdlat_AttributeInfo QueueStorage::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_NUM_MESSAGES,
- "numMessages",
- sizeof("numMessages") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_NUM_BYTES,
- "numBytes",
- sizeof("numBytes") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_VIRTUAL_STORAGES,
- "virtualStorages",
- sizeof("virtualStorages") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ ATTRIBUTE_ID_NUM_MESSAGES,
+ "numMessages",
+ sizeof("numMessages") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_NUM_BYTES,
+ "numBytes",
+ sizeof("numBytes") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_VIRTUAL_STORAGES,
+ "virtualStorages",
+ sizeof("virtualStorages") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* QueueStorage::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *QueueStorage::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 3; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- QueueStorage::ATTRIBUTE_INFO_ARRAY[i];
+ QueueStorage::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -7775,22 +8633,23 @@ const bdlat_AttributeInfo* QueueStorage::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* QueueStorage::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *QueueStorage::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_NUM_MESSAGES:
+ case ATTRIBUTE_ID_NUM_MESSAGES:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES];
- case ATTRIBUTE_ID_NUM_BYTES:
+ case ATTRIBUTE_ID_NUM_BYTES:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES];
- case ATTRIBUTE_ID_VIRTUAL_STORAGES:
+ case ATTRIBUTE_ID_VIRTUAL_STORAGES:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_VIRTUAL_STORAGES];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-QueueStorage::QueueStorage(bslma::Allocator* basicAllocator)
+QueueStorage::QueueStorage(bslma::Allocator *basicAllocator)
: d_virtualStorages(basicAllocator)
, d_numMessages()
, d_numBytes()
@@ -7798,24 +8657,24 @@ QueueStorage::QueueStorage(bslma::Allocator* basicAllocator)
}
QueueStorage::QueueStorage(const QueueStorage& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_virtualStorages(original.d_virtualStorages, basicAllocator)
, d_numMessages(original.d_numMessages)
, d_numBytes(original.d_numBytes)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
QueueStorage::QueueStorage(QueueStorage&& original) noexcept
-: d_virtualStorages(bsl::move(original.d_virtualStorages)),
- d_numMessages(bsl::move(original.d_numMessages)),
- d_numBytes(bsl::move(original.d_numBytes))
+: d_virtualStorages(bsl::move(original.d_virtualStorages))
+, d_numMessages(bsl::move(original.d_numMessages))
+, d_numBytes(bsl::move(original.d_numBytes))
{
}
-QueueStorage::QueueStorage(QueueStorage&& original,
- bslma::Allocator* basicAllocator)
+QueueStorage::QueueStorage(QueueStorage&& original,
+ bslma::Allocator *basicAllocator)
: d_virtualStorages(bsl::move(original.d_virtualStorages), basicAllocator)
, d_numMessages(bsl::move(original.d_numMessages))
, d_numBytes(bsl::move(original.d_numBytes))
@@ -7829,24 +8688,26 @@ QueueStorage::~QueueStorage()
// MANIPULATORS
-QueueStorage& QueueStorage::operator=(const QueueStorage& rhs)
+QueueStorage&
+QueueStorage::operator=(const QueueStorage& rhs)
{
if (this != &rhs) {
- d_numMessages = rhs.d_numMessages;
- d_numBytes = rhs.d_numBytes;
+ d_numMessages = rhs.d_numMessages;
+ d_numBytes = rhs.d_numBytes;
d_virtualStorages = rhs.d_virtualStorages;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-QueueStorage& QueueStorage::operator=(QueueStorage&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+QueueStorage&
+QueueStorage::operator=(QueueStorage&& rhs)
{
if (this != &rhs) {
- d_numMessages = bsl::move(rhs.d_numMessages);
- d_numBytes = bsl::move(rhs.d_numBytes);
+ d_numMessages = bsl::move(rhs.d_numMessages);
+ d_numBytes = bsl::move(rhs.d_numBytes);
d_virtualStorages = bsl::move(rhs.d_virtualStorages);
}
@@ -7863,8 +8724,9 @@ void QueueStorage::reset()
// ACCESSORS
-bsl::ostream&
-QueueStorage::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& QueueStorage::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
@@ -7875,82 +8737,109 @@ QueueStorage::print(bsl::ostream& stream, int level, int spacesPerLevel) const
return stream;
}
-// --------------------------
-// class ResourceUsageMonitor
-// --------------------------
+
+
+ // --------------------------
+ // class ResourceUsageMonitor
+ // --------------------------
// CONSTANTS
const char ResourceUsageMonitor::CLASS_NAME[] = "ResourceUsageMonitor";
const bdlat_AttributeInfo ResourceUsageMonitor::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_STATE,
- "state",
- sizeof("state") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {ATTRIBUTE_ID_MESSAGES_STATE,
- "messagesState",
- sizeof("messagesState") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {ATTRIBUTE_ID_NUM_MESSAGES,
- "numMessages",
- sizeof("numMessages") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_MESSAGES_LOW_WATERMARK_RATIO,
- "messagesLowWatermarkRatio",
- sizeof("messagesLowWatermarkRatio") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_MESSAGES_HIGH_WATERMARK_RATIO,
- "messagesHighWatermarkRatio",
- sizeof("messagesHighWatermarkRatio") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_MESSAGES_CAPACITY,
- "messagesCapacity",
- sizeof("messagesCapacity") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_BYTES_STATE,
- "bytesState",
- sizeof("bytesState") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {ATTRIBUTE_ID_NUM_BYTES,
- "numBytes",
- sizeof("numBytes") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_BYTES_LOW_WATERMARK_RATIO,
- "bytesLowWatermarkRatio",
- sizeof("bytesLowWatermarkRatio") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_BYTES_HIGH_WATERMARK_RATIO,
- "bytesHighWatermarkRatio",
- sizeof("bytesHighWatermarkRatio") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_BYTES_CAPACITY,
- "bytesCapacity",
- sizeof("bytesCapacity") - 1,
- "",
- bdlat_FormattingMode::e_DEC}};
+ {
+ ATTRIBUTE_ID_STATE,
+ "state",
+ sizeof("state") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ ATTRIBUTE_ID_MESSAGES_STATE,
+ "messagesState",
+ sizeof("messagesState") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ ATTRIBUTE_ID_NUM_MESSAGES,
+ "numMessages",
+ sizeof("numMessages") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_MESSAGES_LOW_WATERMARK_RATIO,
+ "messagesLowWatermarkRatio",
+ sizeof("messagesLowWatermarkRatio") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_MESSAGES_HIGH_WATERMARK_RATIO,
+ "messagesHighWatermarkRatio",
+ sizeof("messagesHighWatermarkRatio") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_MESSAGES_CAPACITY,
+ "messagesCapacity",
+ sizeof("messagesCapacity") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_BYTES_STATE,
+ "bytesState",
+ sizeof("bytesState") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ ATTRIBUTE_ID_NUM_BYTES,
+ "numBytes",
+ sizeof("numBytes") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_BYTES_LOW_WATERMARK_RATIO,
+ "bytesLowWatermarkRatio",
+ sizeof("bytesLowWatermarkRatio") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_BYTES_HIGH_WATERMARK_RATIO,
+ "bytesHighWatermarkRatio",
+ sizeof("bytesHighWatermarkRatio") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_BYTES_CAPACITY,
+ "bytesCapacity",
+ sizeof("bytesCapacity") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo*
-ResourceUsageMonitor::lookupAttributeInfo(const char* name, int nameLength)
+const bdlat_AttributeInfo *ResourceUsageMonitor::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 11; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- ResourceUsageMonitor::ATTRIBUTE_INFO_ARRAY[i];
+ ResourceUsageMonitor::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -7958,36 +8847,33 @@ ResourceUsageMonitor::lookupAttributeInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_AttributeInfo* ResourceUsageMonitor::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *ResourceUsageMonitor::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_STATE:
+ case ATTRIBUTE_ID_STATE:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STATE];
- case ATTRIBUTE_ID_MESSAGES_STATE:
+ case ATTRIBUTE_ID_MESSAGES_STATE:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGES_STATE];
- case ATTRIBUTE_ID_NUM_MESSAGES:
+ case ATTRIBUTE_ID_NUM_MESSAGES:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES];
- case ATTRIBUTE_ID_MESSAGES_LOW_WATERMARK_RATIO:
- return &ATTRIBUTE_INFO_ARRAY
- [ATTRIBUTE_INDEX_MESSAGES_LOW_WATERMARK_RATIO];
- case ATTRIBUTE_ID_MESSAGES_HIGH_WATERMARK_RATIO:
- return &ATTRIBUTE_INFO_ARRAY
- [ATTRIBUTE_INDEX_MESSAGES_HIGH_WATERMARK_RATIO];
- case ATTRIBUTE_ID_MESSAGES_CAPACITY:
+ case ATTRIBUTE_ID_MESSAGES_LOW_WATERMARK_RATIO:
+ return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGES_LOW_WATERMARK_RATIO];
+ case ATTRIBUTE_ID_MESSAGES_HIGH_WATERMARK_RATIO:
+ return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGES_HIGH_WATERMARK_RATIO];
+ case ATTRIBUTE_ID_MESSAGES_CAPACITY:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGES_CAPACITY];
- case ATTRIBUTE_ID_BYTES_STATE:
+ case ATTRIBUTE_ID_BYTES_STATE:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BYTES_STATE];
- case ATTRIBUTE_ID_NUM_BYTES:
+ case ATTRIBUTE_ID_NUM_BYTES:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES];
- case ATTRIBUTE_ID_BYTES_LOW_WATERMARK_RATIO:
- return &ATTRIBUTE_INFO_ARRAY
- [ATTRIBUTE_INDEX_BYTES_LOW_WATERMARK_RATIO];
- case ATTRIBUTE_ID_BYTES_HIGH_WATERMARK_RATIO:
- return &ATTRIBUTE_INFO_ARRAY
- [ATTRIBUTE_INDEX_BYTES_HIGH_WATERMARK_RATIO];
- case ATTRIBUTE_ID_BYTES_CAPACITY:
+ case ATTRIBUTE_ID_BYTES_LOW_WATERMARK_RATIO:
+ return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BYTES_LOW_WATERMARK_RATIO];
+ case ATTRIBUTE_ID_BYTES_HIGH_WATERMARK_RATIO:
+ return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BYTES_HIGH_WATERMARK_RATIO];
+ case ATTRIBUTE_ID_BYTES_CAPACITY:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BYTES_CAPACITY];
- default: return 0;
+ default:
+ return 0;
}
}
@@ -8036,48 +8922,51 @@ bsl::ostream& ResourceUsageMonitor::print(bsl::ostream& stream,
printer.printAttribute("state", this->state());
printer.printAttribute("messagesState", this->messagesState());
printer.printAttribute("numMessages", this->numMessages());
- printer.printAttribute("messagesLowWatermarkRatio",
- this->messagesLowWatermarkRatio());
- printer.printAttribute("messagesHighWatermarkRatio",
- this->messagesHighWatermarkRatio());
+ printer.printAttribute("messagesLowWatermarkRatio", this->messagesLowWatermarkRatio());
+ printer.printAttribute("messagesHighWatermarkRatio", this->messagesHighWatermarkRatio());
printer.printAttribute("messagesCapacity", this->messagesCapacity());
printer.printAttribute("bytesState", this->bytesState());
printer.printAttribute("numBytes", this->numBytes());
- printer.printAttribute("bytesLowWatermarkRatio",
- this->bytesLowWatermarkRatio());
- printer.printAttribute("bytesHighWatermarkRatio",
- this->bytesHighWatermarkRatio());
+ printer.printAttribute("bytesLowWatermarkRatio", this->bytesLowWatermarkRatio());
+ printer.printAttribute("bytesHighWatermarkRatio", this->bytesHighWatermarkRatio());
printer.printAttribute("bytesCapacity", this->bytesCapacity());
printer.end();
return stream;
}
-// -----------------------
-// class RouteResponseList
-// -----------------------
+
+
+ // -----------------------
+ // class RouteResponseList
+ // -----------------------
// CONSTANTS
const char RouteResponseList::CLASS_NAME[] = "RouteResponseList";
const bdlat_AttributeInfo RouteResponseList::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_RESPONSES,
- "responses",
- sizeof("responses") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ ATTRIBUTE_ID_RESPONSES,
+ "responses",
+ sizeof("responses") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo*
-RouteResponseList::lookupAttributeInfo(const char* name, int nameLength)
+const bdlat_AttributeInfo *RouteResponseList::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 1; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- RouteResponseList::ATTRIBUTE_INFO_ARRAY[i];
+ RouteResponseList::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -8085,37 +8974,38 @@ RouteResponseList::lookupAttributeInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_AttributeInfo* RouteResponseList::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *RouteResponseList::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_RESPONSES:
+ case ATTRIBUTE_ID_RESPONSES:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_RESPONSES];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-RouteResponseList::RouteResponseList(bslma::Allocator* basicAllocator)
+RouteResponseList::RouteResponseList(bslma::Allocator *basicAllocator)
: d_responses(basicAllocator)
{
}
RouteResponseList::RouteResponseList(const RouteResponseList& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_responses(original.d_responses, basicAllocator)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
RouteResponseList::RouteResponseList(RouteResponseList&& original) noexcept
: d_responses(bsl::move(original.d_responses))
{
}
RouteResponseList::RouteResponseList(RouteResponseList&& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_responses(bsl::move(original.d_responses), basicAllocator)
{
}
@@ -8127,7 +9017,8 @@ RouteResponseList::~RouteResponseList()
// MANIPULATORS
-RouteResponseList& RouteResponseList::operator=(const RouteResponseList& rhs)
+RouteResponseList&
+RouteResponseList::operator=(const RouteResponseList& rhs)
{
if (this != &rhs) {
d_responses = rhs.d_responses;
@@ -8136,9 +9027,10 @@ RouteResponseList& RouteResponseList::operator=(const RouteResponseList& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-RouteResponseList& RouteResponseList::operator=(RouteResponseList&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+RouteResponseList&
+RouteResponseList::operator=(RouteResponseList&& rhs)
{
if (this != &rhs) {
d_responses = bsl::move(rhs.d_responses);
@@ -8166,37 +9058,46 @@ bsl::ostream& RouteResponseList::print(bsl::ostream& stream,
return stream;
}
-// ----------------------
-// class SetTunableChoice
-// ----------------------
+
+
+ // ----------------------
+ // class SetTunableChoice
+ // ----------------------
// CONSTANTS
const char SetTunableChoice::CLASS_NAME[] = "SetTunableChoice";
const bdlat_SelectionInfo SetTunableChoice::SELECTION_INFO_ARRAY[] = {
- {SELECTION_ID_ALL,
- "all",
- sizeof("all") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_SELF,
- "self",
- sizeof("self") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ SELECTION_ID_ALL,
+ "all",
+ sizeof("all") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_SELF,
+ "self",
+ sizeof("self") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_SelectionInfo*
-SetTunableChoice::lookupSelectionInfo(const char* name, int nameLength)
+const bdlat_SelectionInfo *SetTunableChoice::lookupSelectionInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 2; ++i) {
const bdlat_SelectionInfo& selectionInfo =
- SetTunableChoice::SELECTION_INFO_ARRAY[i];
+ SetTunableChoice::SELECTION_INFO_ARRAY[i];
- if (nameLength == selectionInfo.d_nameLength &&
- 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength)) {
+ if (nameLength == selectionInfo.d_nameLength
+ && 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength))
+ {
return &selectionInfo;
}
}
@@ -8204,12 +9105,15 @@ SetTunableChoice::lookupSelectionInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_SelectionInfo* SetTunableChoice::lookupSelectionInfo(int id)
+const bdlat_SelectionInfo *SetTunableChoice::lookupSelectionInfo(int id)
{
switch (id) {
- case SELECTION_ID_ALL: return &SELECTION_INFO_ARRAY[SELECTION_INDEX_ALL];
- case SELECTION_ID_SELF: return &SELECTION_INFO_ARRAY[SELECTION_INDEX_SELF];
- default: return 0;
+ case SELECTION_ID_ALL:
+ return &SELECTION_INFO_ARRAY[SELECTION_INDEX_ALL];
+ case SELECTION_ID_SELF:
+ return &SELECTION_INFO_ARRAY[SELECTION_INDEX_SELF];
+ default:
+ return 0;
}
}
@@ -8219,46 +9123,53 @@ SetTunableChoice::SetTunableChoice(const SetTunableChoice& original)
: d_selectionId(original.d_selectionId)
{
switch (d_selectionId) {
- case SELECTION_ID_ALL: {
- new (d_all.buffer()) Void(original.d_all.object());
- } break;
- case SELECTION_ID_SELF: {
- new (d_self.buffer()) Void(original.d_self.object());
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ case SELECTION_ID_ALL: {
+ new (d_all.buffer())
+ Void(original.d_all.object());
+ } break;
+ case SELECTION_ID_SELF: {
+ new (d_self.buffer())
+ Void(original.d_self.object());
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
SetTunableChoice::SetTunableChoice(SetTunableChoice&& original) noexcept
: d_selectionId(original.d_selectionId)
{
switch (d_selectionId) {
- case SELECTION_ID_ALL: {
- new (d_all.buffer()) Void(bsl::move(original.d_all.object()));
- } break;
- case SELECTION_ID_SELF: {
- new (d_self.buffer()) Void(bsl::move(original.d_self.object()));
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ case SELECTION_ID_ALL: {
+ new (d_all.buffer())
+ Void(bsl::move(original.d_all.object()));
+ } break;
+ case SELECTION_ID_SELF: {
+ new (d_self.buffer())
+ Void(bsl::move(original.d_self.object()));
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
#endif
// MANIPULATORS
-SetTunableChoice& SetTunableChoice::operator=(const SetTunableChoice& rhs)
+SetTunableChoice&
+SetTunableChoice::operator=(const SetTunableChoice& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_ALL: {
+ case SELECTION_ID_ALL: {
makeAll(rhs.d_all.object());
- } break;
- case SELECTION_ID_SELF: {
+ } break;
+ case SELECTION_ID_SELF: {
makeSelf(rhs.d_self.object());
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -8267,19 +9178,20 @@ SetTunableChoice& SetTunableChoice::operator=(const SetTunableChoice& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-SetTunableChoice& SetTunableChoice::operator=(SetTunableChoice&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+SetTunableChoice&
+SetTunableChoice::operator=(SetTunableChoice&& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_ALL: {
+ case SELECTION_ID_ALL: {
makeAll(bsl::move(rhs.d_all.object()));
- } break;
- case SELECTION_ID_SELF: {
+ } break;
+ case SELECTION_ID_SELF: {
makeSelf(bsl::move(rhs.d_self.object()));
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -8292,13 +9204,14 @@ SetTunableChoice& SetTunableChoice::operator=(SetTunableChoice&& rhs)
void SetTunableChoice::reset()
{
switch (d_selectionId) {
- case SELECTION_ID_ALL: {
+ case SELECTION_ID_ALL: {
d_all.object().~Void();
- } break;
- case SELECTION_ID_SELF: {
+ } break;
+ case SELECTION_ID_SELF: {
d_self.object().~Void();
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
d_selectionId = SELECTION_ID_UNDEFINED;
@@ -8307,26 +9220,27 @@ void SetTunableChoice::reset()
int SetTunableChoice::makeSelection(int selectionId)
{
switch (selectionId) {
- case SELECTION_ID_ALL: {
+ case SELECTION_ID_ALL: {
makeAll();
- } break;
- case SELECTION_ID_SELF: {
+ } break;
+ case SELECTION_ID_SELF: {
makeSelf();
- } break;
- case SELECTION_ID_UNDEFINED: {
+ } break;
+ case SELECTION_ID_UNDEFINED: {
reset();
- } break;
- default: return -1;
+ } break;
+ default:
+ return -1;
}
return 0;
}
-int SetTunableChoice::makeSelection(const char* name, int nameLength)
+int SetTunableChoice::makeSelection(const char *name, int nameLength)
{
- const bdlat_SelectionInfo* selectionInfo = lookupSelectionInfo(name,
- nameLength);
+ const bdlat_SelectionInfo *selectionInfo =
+ lookupSelectionInfo(name, nameLength);
if (0 == selectionInfo) {
- return -1;
+ return -1;
}
return makeSelection(selectionInfo->d_id);
@@ -8339,7 +9253,8 @@ Void& SetTunableChoice::makeAll()
}
else {
reset();
- new (d_all.buffer()) Void();
+ new (d_all.buffer())
+ Void();
d_selectionId = SELECTION_ID_ALL;
}
@@ -8353,15 +9268,16 @@ Void& SetTunableChoice::makeAll(const Void& value)
}
else {
reset();
- new (d_all.buffer()) Void(value);
+ new (d_all.buffer())
+ Void(value);
d_selectionId = SELECTION_ID_ALL;
}
return d_all.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Void& SetTunableChoice::makeAll(Void&& value)
{
if (SELECTION_ID_ALL == d_selectionId) {
@@ -8369,7 +9285,8 @@ Void& SetTunableChoice::makeAll(Void&& value)
}
else {
reset();
- new (d_all.buffer()) Void(bsl::move(value));
+ new (d_all.buffer())
+ Void(bsl::move(value));
d_selectionId = SELECTION_ID_ALL;
}
@@ -8384,7 +9301,8 @@ Void& SetTunableChoice::makeSelf()
}
else {
reset();
- new (d_self.buffer()) Void();
+ new (d_self.buffer())
+ Void();
d_selectionId = SELECTION_ID_SELF;
}
@@ -8398,15 +9316,16 @@ Void& SetTunableChoice::makeSelf(const Void& value)
}
else {
reset();
- new (d_self.buffer()) Void(value);
+ new (d_self.buffer())
+ Void(value);
d_selectionId = SELECTION_ID_SELF;
}
return d_self.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Void& SetTunableChoice::makeSelf(Void&& value)
{
if (SELECTION_ID_SELF == d_selectionId) {
@@ -8414,7 +9333,8 @@ Void& SetTunableChoice::makeSelf(Void&& value)
}
else {
reset();
- new (d_self.buffer()) Void(bsl::move(value));
+ new (d_self.buffer())
+ Void(bsl::move(value));
d_selectionId = SELECTION_ID_SELF;
}
@@ -8424,64 +9344,72 @@ Void& SetTunableChoice::makeSelf(Void&& value)
// ACCESSORS
-bsl::ostream& SetTunableChoice::print(bsl::ostream& stream,
- int level,
- int spacesPerLevel) const
+bsl::ostream& SetTunableChoice::print(
+ bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
switch (d_selectionId) {
- case SELECTION_ID_ALL: {
+ case SELECTION_ID_ALL: {
printer.printAttribute("all", d_all.object());
- } break;
- case SELECTION_ID_SELF: {
+ } break;
+ case SELECTION_ID_SELF: {
printer.printAttribute("self", d_self.object());
- } break;
- default: stream << "SELECTION UNDEFINED\n";
+ } break;
+ default:
+ stream << "SELECTION UNDEFINED\n";
}
printer.end();
return stream;
}
-const char* SetTunableChoice::selectionName() const
+
+const char *SetTunableChoice::selectionName() const
{
switch (d_selectionId) {
- case SELECTION_ID_ALL:
+ case SELECTION_ID_ALL:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_ALL].name();
- case SELECTION_ID_SELF:
+ case SELECTION_ID_SELF:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_SELF].name();
- default:
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
return "(* UNDEFINED *)";
}
}
-// --------------------
-// class StorageContent
-// --------------------
+ // --------------------
+ // class StorageContent
+ // --------------------
// CONSTANTS
const char StorageContent::CLASS_NAME[] = "StorageContent";
const bdlat_AttributeInfo StorageContent::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_STORAGES,
- "storages",
- sizeof("storages") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ ATTRIBUTE_ID_STORAGES,
+ "storages",
+ sizeof("storages") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo*
-StorageContent::lookupAttributeInfo(const char* name, int nameLength)
+const bdlat_AttributeInfo *StorageContent::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 1; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- StorageContent::ATTRIBUTE_INFO_ARRAY[i];
+ StorageContent::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -8489,37 +9417,38 @@ StorageContent::lookupAttributeInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_AttributeInfo* StorageContent::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *StorageContent::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_STORAGES:
+ case ATTRIBUTE_ID_STORAGES:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STORAGES];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-StorageContent::StorageContent(bslma::Allocator* basicAllocator)
+StorageContent::StorageContent(bslma::Allocator *basicAllocator)
: d_storages(basicAllocator)
{
}
StorageContent::StorageContent(const StorageContent& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_storages(original.d_storages, basicAllocator)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
StorageContent::StorageContent(StorageContent&& original) noexcept
: d_storages(bsl::move(original.d_storages))
{
}
-StorageContent::StorageContent(StorageContent&& original,
- bslma::Allocator* basicAllocator)
+StorageContent::StorageContent(StorageContent&& original,
+ bslma::Allocator *basicAllocator)
: d_storages(bsl::move(original.d_storages), basicAllocator)
{
}
@@ -8531,7 +9460,8 @@ StorageContent::~StorageContent()
// MANIPULATORS
-StorageContent& StorageContent::operator=(const StorageContent& rhs)
+StorageContent&
+StorageContent::operator=(const StorageContent& rhs)
{
if (this != &rhs) {
d_storages = rhs.d_storages;
@@ -8540,9 +9470,10 @@ StorageContent& StorageContent::operator=(const StorageContent& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-StorageContent& StorageContent::operator=(StorageContent&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+StorageContent&
+StorageContent::operator=(StorageContent&& rhs)
{
if (this != &rhs) {
d_storages = bsl::move(rhs.d_storages);
@@ -8570,37 +9501,46 @@ bsl::ostream& StorageContent::print(bsl::ostream& stream,
return stream;
}
-// --------------------------
-// class StorageDomainCommand
-// --------------------------
+
+
+ // --------------------------
+ // class StorageDomainCommand
+ // --------------------------
// CONSTANTS
const char StorageDomainCommand::CLASS_NAME[] = "StorageDomainCommand";
const bdlat_SelectionInfo StorageDomainCommand::SELECTION_INFO_ARRAY[] = {
- {SELECTION_ID_QUEUE_STATUS,
- "queueStatus",
- sizeof("queueStatus") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_PURGE,
- "purge",
- sizeof("purge") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ SELECTION_ID_QUEUE_STATUS,
+ "queueStatus",
+ sizeof("queueStatus") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_PURGE,
+ "purge",
+ sizeof("purge") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_SelectionInfo*
-StorageDomainCommand::lookupSelectionInfo(const char* name, int nameLength)
+const bdlat_SelectionInfo *StorageDomainCommand::lookupSelectionInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 2; ++i) {
const bdlat_SelectionInfo& selectionInfo =
- StorageDomainCommand::SELECTION_INFO_ARRAY[i];
+ StorageDomainCommand::SELECTION_INFO_ARRAY[i];
- if (nameLength == selectionInfo.d_nameLength &&
- 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength)) {
+ if (nameLength == selectionInfo.d_nameLength
+ && 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength))
+ {
return &selectionInfo;
}
}
@@ -8608,48 +9548,53 @@ StorageDomainCommand::lookupSelectionInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_SelectionInfo* StorageDomainCommand::lookupSelectionInfo(int id)
+const bdlat_SelectionInfo *StorageDomainCommand::lookupSelectionInfo(int id)
{
switch (id) {
- case SELECTION_ID_QUEUE_STATUS:
+ case SELECTION_ID_QUEUE_STATUS:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE_STATUS];
- case SELECTION_ID_PURGE:
+ case SELECTION_ID_PURGE:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_PURGE];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-StorageDomainCommand::StorageDomainCommand(
- const StorageDomainCommand& original)
+StorageDomainCommand::StorageDomainCommand(const StorageDomainCommand& original)
: d_selectionId(original.d_selectionId)
{
switch (d_selectionId) {
- case SELECTION_ID_QUEUE_STATUS: {
- new (d_queueStatus.buffer()) Void(original.d_queueStatus.object());
- } break;
- case SELECTION_ID_PURGE: {
- new (d_purge.buffer()) Void(original.d_purge.object());
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ case SELECTION_ID_QUEUE_STATUS: {
+ new (d_queueStatus.buffer())
+ Void(original.d_queueStatus.object());
+ } break;
+ case SELECTION_ID_PURGE: {
+ new (d_purge.buffer())
+ Void(original.d_purge.object());
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-StorageDomainCommand::StorageDomainCommand(StorageDomainCommand&& original)
- noexcept : d_selectionId(original.d_selectionId)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+StorageDomainCommand::StorageDomainCommand(StorageDomainCommand&& original) noexcept
+: d_selectionId(original.d_selectionId)
{
switch (d_selectionId) {
- case SELECTION_ID_QUEUE_STATUS: {
+ case SELECTION_ID_QUEUE_STATUS: {
new (d_queueStatus.buffer())
Void(bsl::move(original.d_queueStatus.object()));
- } break;
- case SELECTION_ID_PURGE: {
- new (d_purge.buffer()) Void(bsl::move(original.d_purge.object()));
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ case SELECTION_ID_PURGE: {
+ new (d_purge.buffer())
+ Void(bsl::move(original.d_purge.object()));
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
#endif
@@ -8661,13 +9606,13 @@ StorageDomainCommand::operator=(const StorageDomainCommand& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_QUEUE_STATUS: {
+ case SELECTION_ID_QUEUE_STATUS: {
makeQueueStatus(rhs.d_queueStatus.object());
- } break;
- case SELECTION_ID_PURGE: {
+ } break;
+ case SELECTION_ID_PURGE: {
makePurge(rhs.d_purge.object());
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -8676,20 +9621,20 @@ StorageDomainCommand::operator=(const StorageDomainCommand& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
StorageDomainCommand&
StorageDomainCommand::operator=(StorageDomainCommand&& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_QUEUE_STATUS: {
+ case SELECTION_ID_QUEUE_STATUS: {
makeQueueStatus(bsl::move(rhs.d_queueStatus.object()));
- } break;
- case SELECTION_ID_PURGE: {
+ } break;
+ case SELECTION_ID_PURGE: {
makePurge(bsl::move(rhs.d_purge.object()));
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -8702,13 +9647,14 @@ StorageDomainCommand::operator=(StorageDomainCommand&& rhs)
void StorageDomainCommand::reset()
{
switch (d_selectionId) {
- case SELECTION_ID_QUEUE_STATUS: {
+ case SELECTION_ID_QUEUE_STATUS: {
d_queueStatus.object().~Void();
- } break;
- case SELECTION_ID_PURGE: {
+ } break;
+ case SELECTION_ID_PURGE: {
d_purge.object().~Void();
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
d_selectionId = SELECTION_ID_UNDEFINED;
@@ -8717,26 +9663,27 @@ void StorageDomainCommand::reset()
int StorageDomainCommand::makeSelection(int selectionId)
{
switch (selectionId) {
- case SELECTION_ID_QUEUE_STATUS: {
+ case SELECTION_ID_QUEUE_STATUS: {
makeQueueStatus();
- } break;
- case SELECTION_ID_PURGE: {
+ } break;
+ case SELECTION_ID_PURGE: {
makePurge();
- } break;
- case SELECTION_ID_UNDEFINED: {
+ } break;
+ case SELECTION_ID_UNDEFINED: {
reset();
- } break;
- default: return -1;
+ } break;
+ default:
+ return -1;
}
return 0;
}
-int StorageDomainCommand::makeSelection(const char* name, int nameLength)
+int StorageDomainCommand::makeSelection(const char *name, int nameLength)
{
- const bdlat_SelectionInfo* selectionInfo = lookupSelectionInfo(name,
- nameLength);
+ const bdlat_SelectionInfo *selectionInfo =
+ lookupSelectionInfo(name, nameLength);
if (0 == selectionInfo) {
- return -1;
+ return -1;
}
return makeSelection(selectionInfo->d_id);
@@ -8749,7 +9696,8 @@ Void& StorageDomainCommand::makeQueueStatus()
}
else {
reset();
- new (d_queueStatus.buffer()) Void();
+ new (d_queueStatus.buffer())
+ Void();
d_selectionId = SELECTION_ID_QUEUE_STATUS;
}
@@ -8763,15 +9711,16 @@ Void& StorageDomainCommand::makeQueueStatus(const Void& value)
}
else {
reset();
- new (d_queueStatus.buffer()) Void(value);
+ new (d_queueStatus.buffer())
+ Void(value);
d_selectionId = SELECTION_ID_QUEUE_STATUS;
}
return d_queueStatus.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Void& StorageDomainCommand::makeQueueStatus(Void&& value)
{
if (SELECTION_ID_QUEUE_STATUS == d_selectionId) {
@@ -8779,7 +9728,8 @@ Void& StorageDomainCommand::makeQueueStatus(Void&& value)
}
else {
reset();
- new (d_queueStatus.buffer()) Void(bsl::move(value));
+ new (d_queueStatus.buffer())
+ Void(bsl::move(value));
d_selectionId = SELECTION_ID_QUEUE_STATUS;
}
@@ -8794,7 +9744,8 @@ Void& StorageDomainCommand::makePurge()
}
else {
reset();
- new (d_purge.buffer()) Void();
+ new (d_purge.buffer())
+ Void();
d_selectionId = SELECTION_ID_PURGE;
}
@@ -8808,15 +9759,16 @@ Void& StorageDomainCommand::makePurge(const Void& value)
}
else {
reset();
- new (d_purge.buffer()) Void(value);
+ new (d_purge.buffer())
+ Void(value);
d_selectionId = SELECTION_ID_PURGE;
}
return d_purge.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Void& StorageDomainCommand::makePurge(Void&& value)
{
if (SELECTION_ID_PURGE == d_selectionId) {
@@ -8824,7 +9776,8 @@ Void& StorageDomainCommand::makePurge(Void&& value)
}
else {
reset();
- new (d_purge.buffer()) Void(bsl::move(value));
+ new (d_purge.buffer())
+ Void(bsl::move(value));
d_selectionId = SELECTION_ID_PURGE;
}
@@ -8834,74 +9787,86 @@ Void& StorageDomainCommand::makePurge(Void&& value)
// ACCESSORS
-bsl::ostream& StorageDomainCommand::print(bsl::ostream& stream,
- int level,
- int spacesPerLevel) const
+bsl::ostream& StorageDomainCommand::print(
+ bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
switch (d_selectionId) {
- case SELECTION_ID_QUEUE_STATUS: {
+ case SELECTION_ID_QUEUE_STATUS: {
printer.printAttribute("queueStatus", d_queueStatus.object());
- } break;
- case SELECTION_ID_PURGE: {
+ } break;
+ case SELECTION_ID_PURGE: {
printer.printAttribute("purge", d_purge.object());
- } break;
- default: stream << "SELECTION UNDEFINED\n";
+ } break;
+ default:
+ stream << "SELECTION UNDEFINED\n";
}
printer.end();
return stream;
}
-const char* StorageDomainCommand::selectionName() const
+
+const char *StorageDomainCommand::selectionName() const
{
switch (d_selectionId) {
- case SELECTION_ID_QUEUE_STATUS:
+ case SELECTION_ID_QUEUE_STATUS:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE_STATUS].name();
- case SELECTION_ID_PURGE:
+ case SELECTION_ID_PURGE:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_PURGE].name();
- default:
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
return "(* UNDEFINED *)";
}
}
-// -----------------------------
-// class StoragePartitionCommand
-// -----------------------------
+ // -----------------------------
+ // class StoragePartitionCommand
+ // -----------------------------
// CONSTANTS
const char StoragePartitionCommand::CLASS_NAME[] = "StoragePartitionCommand";
const bdlat_SelectionInfo StoragePartitionCommand::SELECTION_INFO_ARRAY[] = {
- {SELECTION_ID_ENABLE,
- "enable",
- sizeof("enable") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_DISABLE,
- "disable",
- sizeof("disable") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_SUMMARY,
- "summary",
- sizeof("summary") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ SELECTION_ID_ENABLE,
+ "enable",
+ sizeof("enable") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_DISABLE,
+ "disable",
+ sizeof("disable") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_SUMMARY,
+ "summary",
+ sizeof("summary") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_SelectionInfo*
-StoragePartitionCommand::lookupSelectionInfo(const char* name, int nameLength)
+const bdlat_SelectionInfo *StoragePartitionCommand::lookupSelectionInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 3; ++i) {
const bdlat_SelectionInfo& selectionInfo =
- StoragePartitionCommand::SELECTION_INFO_ARRAY[i];
+ StoragePartitionCommand::SELECTION_INFO_ARRAY[i];
- if (nameLength == selectionInfo.d_nameLength &&
- 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength)) {
+ if (nameLength == selectionInfo.d_nameLength
+ && 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength))
+ {
return &selectionInfo;
}
}
@@ -8909,56 +9874,63 @@ StoragePartitionCommand::lookupSelectionInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_SelectionInfo* StoragePartitionCommand::lookupSelectionInfo(int id)
+const bdlat_SelectionInfo *StoragePartitionCommand::lookupSelectionInfo(int id)
{
switch (id) {
- case SELECTION_ID_ENABLE:
+ case SELECTION_ID_ENABLE:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_ENABLE];
- case SELECTION_ID_DISABLE:
+ case SELECTION_ID_DISABLE:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_DISABLE];
- case SELECTION_ID_SUMMARY:
+ case SELECTION_ID_SUMMARY:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_SUMMARY];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-StoragePartitionCommand::StoragePartitionCommand(
- const StoragePartitionCommand& original)
+StoragePartitionCommand::StoragePartitionCommand(const StoragePartitionCommand& original)
: d_selectionId(original.d_selectionId)
{
switch (d_selectionId) {
- case SELECTION_ID_ENABLE: {
- new (d_enable.buffer()) Void(original.d_enable.object());
- } break;
- case SELECTION_ID_DISABLE: {
- new (d_disable.buffer()) Void(original.d_disable.object());
- } break;
- case SELECTION_ID_SUMMARY: {
- new (d_summary.buffer()) Void(original.d_summary.object());
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
- }
-}
-
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-StoragePartitionCommand::StoragePartitionCommand(
- StoragePartitionCommand&& original) noexcept
+ case SELECTION_ID_ENABLE: {
+ new (d_enable.buffer())
+ Void(original.d_enable.object());
+ } break;
+ case SELECTION_ID_DISABLE: {
+ new (d_disable.buffer())
+ Void(original.d_disable.object());
+ } break;
+ case SELECTION_ID_SUMMARY: {
+ new (d_summary.buffer())
+ Void(original.d_summary.object());
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ }
+}
+
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+StoragePartitionCommand::StoragePartitionCommand(StoragePartitionCommand&& original) noexcept
: d_selectionId(original.d_selectionId)
{
switch (d_selectionId) {
- case SELECTION_ID_ENABLE: {
- new (d_enable.buffer()) Void(bsl::move(original.d_enable.object()));
- } break;
- case SELECTION_ID_DISABLE: {
- new (d_disable.buffer()) Void(bsl::move(original.d_disable.object()));
- } break;
- case SELECTION_ID_SUMMARY: {
- new (d_summary.buffer()) Void(bsl::move(original.d_summary.object()));
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ case SELECTION_ID_ENABLE: {
+ new (d_enable.buffer())
+ Void(bsl::move(original.d_enable.object()));
+ } break;
+ case SELECTION_ID_DISABLE: {
+ new (d_disable.buffer())
+ Void(bsl::move(original.d_disable.object()));
+ } break;
+ case SELECTION_ID_SUMMARY: {
+ new (d_summary.buffer())
+ Void(bsl::move(original.d_summary.object()));
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
#endif
@@ -8970,16 +9942,16 @@ StoragePartitionCommand::operator=(const StoragePartitionCommand& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_ENABLE: {
+ case SELECTION_ID_ENABLE: {
makeEnable(rhs.d_enable.object());
- } break;
- case SELECTION_ID_DISABLE: {
+ } break;
+ case SELECTION_ID_DISABLE: {
makeDisable(rhs.d_disable.object());
- } break;
- case SELECTION_ID_SUMMARY: {
+ } break;
+ case SELECTION_ID_SUMMARY: {
makeSummary(rhs.d_summary.object());
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -8988,23 +9960,23 @@ StoragePartitionCommand::operator=(const StoragePartitionCommand& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
StoragePartitionCommand&
StoragePartitionCommand::operator=(StoragePartitionCommand&& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_ENABLE: {
+ case SELECTION_ID_ENABLE: {
makeEnable(bsl::move(rhs.d_enable.object()));
- } break;
- case SELECTION_ID_DISABLE: {
+ } break;
+ case SELECTION_ID_DISABLE: {
makeDisable(bsl::move(rhs.d_disable.object()));
- } break;
- case SELECTION_ID_SUMMARY: {
+ } break;
+ case SELECTION_ID_SUMMARY: {
makeSummary(bsl::move(rhs.d_summary.object()));
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -9017,16 +9989,17 @@ StoragePartitionCommand::operator=(StoragePartitionCommand&& rhs)
void StoragePartitionCommand::reset()
{
switch (d_selectionId) {
- case SELECTION_ID_ENABLE: {
+ case SELECTION_ID_ENABLE: {
d_enable.object().~Void();
- } break;
- case SELECTION_ID_DISABLE: {
+ } break;
+ case SELECTION_ID_DISABLE: {
d_disable.object().~Void();
- } break;
- case SELECTION_ID_SUMMARY: {
+ } break;
+ case SELECTION_ID_SUMMARY: {
d_summary.object().~Void();
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
d_selectionId = SELECTION_ID_UNDEFINED;
@@ -9035,29 +10008,30 @@ void StoragePartitionCommand::reset()
int StoragePartitionCommand::makeSelection(int selectionId)
{
switch (selectionId) {
- case SELECTION_ID_ENABLE: {
+ case SELECTION_ID_ENABLE: {
makeEnable();
- } break;
- case SELECTION_ID_DISABLE: {
+ } break;
+ case SELECTION_ID_DISABLE: {
makeDisable();
- } break;
- case SELECTION_ID_SUMMARY: {
+ } break;
+ case SELECTION_ID_SUMMARY: {
makeSummary();
- } break;
- case SELECTION_ID_UNDEFINED: {
+ } break;
+ case SELECTION_ID_UNDEFINED: {
reset();
- } break;
- default: return -1;
+ } break;
+ default:
+ return -1;
}
return 0;
}
-int StoragePartitionCommand::makeSelection(const char* name, int nameLength)
+int StoragePartitionCommand::makeSelection(const char *name, int nameLength)
{
- const bdlat_SelectionInfo* selectionInfo = lookupSelectionInfo(name,
- nameLength);
+ const bdlat_SelectionInfo *selectionInfo =
+ lookupSelectionInfo(name, nameLength);
if (0 == selectionInfo) {
- return -1;
+ return -1;
}
return makeSelection(selectionInfo->d_id);
@@ -9070,7 +10044,8 @@ Void& StoragePartitionCommand::makeEnable()
}
else {
reset();
- new (d_enable.buffer()) Void();
+ new (d_enable.buffer())
+ Void();
d_selectionId = SELECTION_ID_ENABLE;
}
@@ -9084,15 +10059,16 @@ Void& StoragePartitionCommand::makeEnable(const Void& value)
}
else {
reset();
- new (d_enable.buffer()) Void(value);
+ new (d_enable.buffer())
+ Void(value);
d_selectionId = SELECTION_ID_ENABLE;
}
return d_enable.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Void& StoragePartitionCommand::makeEnable(Void&& value)
{
if (SELECTION_ID_ENABLE == d_selectionId) {
@@ -9100,7 +10076,8 @@ Void& StoragePartitionCommand::makeEnable(Void&& value)
}
else {
reset();
- new (d_enable.buffer()) Void(bsl::move(value));
+ new (d_enable.buffer())
+ Void(bsl::move(value));
d_selectionId = SELECTION_ID_ENABLE;
}
@@ -9115,7 +10092,8 @@ Void& StoragePartitionCommand::makeDisable()
}
else {
reset();
- new (d_disable.buffer()) Void();
+ new (d_disable.buffer())
+ Void();
d_selectionId = SELECTION_ID_DISABLE;
}
@@ -9129,15 +10107,16 @@ Void& StoragePartitionCommand::makeDisable(const Void& value)
}
else {
reset();
- new (d_disable.buffer()) Void(value);
+ new (d_disable.buffer())
+ Void(value);
d_selectionId = SELECTION_ID_DISABLE;
}
return d_disable.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Void& StoragePartitionCommand::makeDisable(Void&& value)
{
if (SELECTION_ID_DISABLE == d_selectionId) {
@@ -9145,7 +10124,8 @@ Void& StoragePartitionCommand::makeDisable(Void&& value)
}
else {
reset();
- new (d_disable.buffer()) Void(bsl::move(value));
+ new (d_disable.buffer())
+ Void(bsl::move(value));
d_selectionId = SELECTION_ID_DISABLE;
}
@@ -9160,7 +10140,8 @@ Void& StoragePartitionCommand::makeSummary()
}
else {
reset();
- new (d_summary.buffer()) Void();
+ new (d_summary.buffer())
+ Void();
d_selectionId = SELECTION_ID_SUMMARY;
}
@@ -9174,15 +10155,16 @@ Void& StoragePartitionCommand::makeSummary(const Void& value)
}
else {
reset();
- new (d_summary.buffer()) Void(value);
+ new (d_summary.buffer())
+ Void(value);
d_selectionId = SELECTION_ID_SUMMARY;
}
return d_summary.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Void& StoragePartitionCommand::makeSummary(Void&& value)
{
if (SELECTION_ID_SUMMARY == d_selectionId) {
@@ -9190,7 +10172,8 @@ Void& StoragePartitionCommand::makeSummary(Void&& value)
}
else {
reset();
- new (d_summary.buffer()) Void(bsl::move(value));
+ new (d_summary.buffer())
+ Void(bsl::move(value));
d_selectionId = SELECTION_ID_SUMMARY;
}
@@ -9200,74 +10183,84 @@ Void& StoragePartitionCommand::makeSummary(Void&& value)
// ACCESSORS
-bsl::ostream& StoragePartitionCommand::print(bsl::ostream& stream,
- int level,
- int spacesPerLevel) const
+bsl::ostream& StoragePartitionCommand::print(
+ bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
switch (d_selectionId) {
- case SELECTION_ID_ENABLE: {
+ case SELECTION_ID_ENABLE: {
printer.printAttribute("enable", d_enable.object());
- } break;
- case SELECTION_ID_DISABLE: {
+ } break;
+ case SELECTION_ID_DISABLE: {
printer.printAttribute("disable", d_disable.object());
- } break;
- case SELECTION_ID_SUMMARY: {
+ } break;
+ case SELECTION_ID_SUMMARY: {
printer.printAttribute("summary", d_summary.object());
- } break;
- default: stream << "SELECTION UNDEFINED\n";
+ } break;
+ default:
+ stream << "SELECTION UNDEFINED\n";
}
printer.end();
return stream;
}
-const char* StoragePartitionCommand::selectionName() const
+
+const char *StoragePartitionCommand::selectionName() const
{
switch (d_selectionId) {
- case SELECTION_ID_ENABLE:
+ case SELECTION_ID_ENABLE:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_ENABLE].name();
- case SELECTION_ID_DISABLE:
+ case SELECTION_ID_DISABLE:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_DISABLE].name();
- case SELECTION_ID_SUMMARY:
+ case SELECTION_ID_SUMMARY:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_SUMMARY].name();
- default:
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
return "(* UNDEFINED *)";
}
}
-// ------------------
-// class StorageQueue
-// ------------------
+ // ------------------
+ // class StorageQueue
+ // ------------------
// CONSTANTS
const char StorageQueue::CLASS_NAME[] = "StorageQueue";
const bdlat_AttributeInfo StorageQueue::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_CANONICAL_URI,
- "canonicalUri",
- sizeof("canonicalUri") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_COMMAND,
- "command",
- sizeof("command") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ ATTRIBUTE_ID_CANONICAL_URI,
+ "canonicalUri",
+ sizeof("canonicalUri") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_COMMAND,
+ "command",
+ sizeof("command") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* StorageQueue::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *StorageQueue::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 2; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- StorageQueue::ATTRIBUTE_INFO_ARRAY[i];
+ StorageQueue::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -9275,42 +10268,43 @@ const bdlat_AttributeInfo* StorageQueue::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* StorageQueue::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *StorageQueue::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_CANONICAL_URI:
+ case ATTRIBUTE_ID_CANONICAL_URI:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CANONICAL_URI];
- case ATTRIBUTE_ID_COMMAND:
+ case ATTRIBUTE_ID_COMMAND:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-StorageQueue::StorageQueue(bslma::Allocator* basicAllocator)
+StorageQueue::StorageQueue(bslma::Allocator *basicAllocator)
: d_canonicalUri(basicAllocator)
, d_command(basicAllocator)
{
}
StorageQueue::StorageQueue(const StorageQueue& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_canonicalUri(original.d_canonicalUri, basicAllocator)
, d_command(original.d_command, basicAllocator)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
StorageQueue::StorageQueue(StorageQueue&& original) noexcept
-: d_canonicalUri(bsl::move(original.d_canonicalUri)),
- d_command(bsl::move(original.d_command))
+: d_canonicalUri(bsl::move(original.d_canonicalUri))
+, d_command(bsl::move(original.d_command))
{
}
-StorageQueue::StorageQueue(StorageQueue&& original,
- bslma::Allocator* basicAllocator)
+StorageQueue::StorageQueue(StorageQueue&& original,
+ bslma::Allocator *basicAllocator)
: d_canonicalUri(bsl::move(original.d_canonicalUri), basicAllocator)
, d_command(bsl::move(original.d_command), basicAllocator)
{
@@ -9323,23 +10317,25 @@ StorageQueue::~StorageQueue()
// MANIPULATORS
-StorageQueue& StorageQueue::operator=(const StorageQueue& rhs)
+StorageQueue&
+StorageQueue::operator=(const StorageQueue& rhs)
{
if (this != &rhs) {
d_canonicalUri = rhs.d_canonicalUri;
- d_command = rhs.d_command;
+ d_command = rhs.d_command;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-StorageQueue& StorageQueue::operator=(StorageQueue&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+StorageQueue&
+StorageQueue::operator=(StorageQueue&& rhs)
{
if (this != &rhs) {
d_canonicalUri = bsl::move(rhs.d_canonicalUri);
- d_command = bsl::move(rhs.d_command);
+ d_command = bsl::move(rhs.d_command);
}
return *this;
@@ -9354,8 +10350,9 @@ void StorageQueue::reset()
// ACCESSORS
-bsl::ostream&
-StorageQueue::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& StorageQueue::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
@@ -9365,42 +10362,53 @@ StorageQueue::print(bsl::ostream& stream, int level, int spacesPerLevel) const
return stream;
}
-// ------------------
-// class Subscription
-// ------------------
+
+
+ // ------------------
+ // class Subscription
+ // ------------------
// CONSTANTS
const char Subscription::CLASS_NAME[] = "Subscription";
const bdlat_AttributeInfo Subscription::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_DOWNSTREAM_SUBSCRIPTION_ID,
- "downstreamSubscriptionId",
- sizeof("downstreamSubscriptionId") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_CONSUMER,
- "consumer",
- sizeof("consumer") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {ATTRIBUTE_ID_SUBSCRIBER,
- "subscriber",
- sizeof("subscriber") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ ATTRIBUTE_ID_DOWNSTREAM_SUBSCRIPTION_ID,
+ "downstreamSubscriptionId",
+ sizeof("downstreamSubscriptionId") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_CONSUMER,
+ "consumer",
+ sizeof("consumer") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ ATTRIBUTE_ID_SUBSCRIBER,
+ "subscriber",
+ sizeof("subscriber") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* Subscription::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *Subscription::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 3; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- Subscription::ATTRIBUTE_INFO_ARRAY[i];
+ Subscription::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -9408,17 +10416,17 @@ const bdlat_AttributeInfo* Subscription::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* Subscription::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *Subscription::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_DOWNSTREAM_SUBSCRIPTION_ID:
- return &ATTRIBUTE_INFO_ARRAY
- [ATTRIBUTE_INDEX_DOWNSTREAM_SUBSCRIPTION_ID];
- case ATTRIBUTE_ID_CONSUMER:
+ case ATTRIBUTE_ID_DOWNSTREAM_SUBSCRIPTION_ID:
+ return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DOWNSTREAM_SUBSCRIPTION_ID];
+ case ATTRIBUTE_ID_CONSUMER:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONSUMER];
- case ATTRIBUTE_ID_SUBSCRIBER:
+ case ATTRIBUTE_ID_SUBSCRIBER:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUBSCRIBER];
- default: return 0;
+ default:
+ return 0;
}
}
@@ -9442,80 +10450,101 @@ void Subscription::reset()
// ACCESSORS
-bsl::ostream&
-Subscription::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& Subscription::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
- printer.printAttribute("downstreamSubscriptionId",
- this->downstreamSubscriptionId());
+ printer.printAttribute("downstreamSubscriptionId", this->downstreamSubscriptionId());
printer.printAttribute("consumer", this->consumer());
printer.printAttribute("subscriber", this->subscriber());
printer.end();
return stream;
}
-// -----------
-// class Value
-// -----------
+
+
+ // -----------
+ // class Value
+ // -----------
// CONSTANTS
const char Value::CLASS_NAME[] = "Value";
const bdlat_SelectionInfo Value::SELECTION_INFO_ARRAY[] = {
- {SELECTION_ID_THE_NULL,
- "theNull",
- sizeof("theNull") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_THE_BOOL,
- "theBool",
- sizeof("theBool") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {SELECTION_ID_THE_INTEGER,
- "theInteger",
- sizeof("theInteger") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {SELECTION_ID_THE_DOUBLE,
- "theDouble",
- sizeof("theDouble") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_THE_DATE,
- "theDate",
- sizeof("theDate") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_THE_TIME,
- "theTime",
- sizeof("theTime") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_THE_DATETIME,
- "theDatetime",
- sizeof("theDatetime") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_THE_STRING,
- "theString",
- sizeof("theString") - 1,
- "",
- bdlat_FormattingMode::e_TEXT}};
+ {
+ SELECTION_ID_THE_NULL,
+ "theNull",
+ sizeof("theNull") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_THE_BOOL,
+ "theBool",
+ sizeof("theBool") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ SELECTION_ID_THE_INTEGER,
+ "theInteger",
+ sizeof("theInteger") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ SELECTION_ID_THE_DOUBLE,
+ "theDouble",
+ sizeof("theDouble") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_THE_DATE,
+ "theDate",
+ sizeof("theDate") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_THE_TIME,
+ "theTime",
+ sizeof("theTime") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_THE_DATETIME,
+ "theDatetime",
+ sizeof("theDatetime") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_THE_STRING,
+ "theString",
+ sizeof("theString") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ }
+};
// CLASS METHODS
-const bdlat_SelectionInfo* Value::lookupSelectionInfo(const char* name,
- int nameLength)
+const bdlat_SelectionInfo *Value::lookupSelectionInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 8; ++i) {
const bdlat_SelectionInfo& selectionInfo =
- Value::SELECTION_INFO_ARRAY[i];
+ Value::SELECTION_INFO_ARRAY[i];
- if (nameLength == selectionInfo.d_nameLength &&
- 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength)) {
+ if (nameLength == selectionInfo.d_nameLength
+ && 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength))
+ {
return &selectionInfo;
}
}
@@ -9523,181 +10552,200 @@ const bdlat_SelectionInfo* Value::lookupSelectionInfo(const char* name,
return 0;
}
-const bdlat_SelectionInfo* Value::lookupSelectionInfo(int id)
+const bdlat_SelectionInfo *Value::lookupSelectionInfo(int id)
{
switch (id) {
- case SELECTION_ID_THE_NULL:
+ case SELECTION_ID_THE_NULL:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_THE_NULL];
- case SELECTION_ID_THE_BOOL:
+ case SELECTION_ID_THE_BOOL:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_THE_BOOL];
- case SELECTION_ID_THE_INTEGER:
+ case SELECTION_ID_THE_INTEGER:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_THE_INTEGER];
- case SELECTION_ID_THE_DOUBLE:
+ case SELECTION_ID_THE_DOUBLE:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_THE_DOUBLE];
- case SELECTION_ID_THE_DATE:
+ case SELECTION_ID_THE_DATE:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_THE_DATE];
- case SELECTION_ID_THE_TIME:
+ case SELECTION_ID_THE_TIME:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_THE_TIME];
- case SELECTION_ID_THE_DATETIME:
+ case SELECTION_ID_THE_DATETIME:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_THE_DATETIME];
- case SELECTION_ID_THE_STRING:
+ case SELECTION_ID_THE_STRING:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_THE_STRING];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-Value::Value(const Value& original, bslma::Allocator* basicAllocator)
+Value::Value(
+ const Value& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_THE_NULL: {
- new (d_theNull.buffer()) Void(original.d_theNull.object());
- } break;
- case SELECTION_ID_THE_BOOL: {
- new (d_theBool.buffer()) bool(original.d_theBool.object());
- } break;
- case SELECTION_ID_THE_INTEGER: {
+ case SELECTION_ID_THE_NULL: {
+ new (d_theNull.buffer())
+ Void(original.d_theNull.object());
+ } break;
+ case SELECTION_ID_THE_BOOL: {
+ new (d_theBool.buffer())
+ bool(original.d_theBool.object());
+ } break;
+ case SELECTION_ID_THE_INTEGER: {
new (d_theInteger.buffer())
bsls::Types::Int64(original.d_theInteger.object());
- } break;
- case SELECTION_ID_THE_DOUBLE: {
- new (d_theDouble.buffer()) double(original.d_theDouble.object());
- } break;
- case SELECTION_ID_THE_DATE: {
- new (d_theDate.buffer()) bdlt::DateTz(original.d_theDate.object());
- } break;
- case SELECTION_ID_THE_TIME: {
- new (d_theTime.buffer()) bdlt::TimeTz(original.d_theTime.object());
- } break;
- case SELECTION_ID_THE_DATETIME: {
+ } break;
+ case SELECTION_ID_THE_DOUBLE: {
+ new (d_theDouble.buffer())
+ double(original.d_theDouble.object());
+ } break;
+ case SELECTION_ID_THE_DATE: {
+ new (d_theDate.buffer())
+ bdlt::DateTz(original.d_theDate.object());
+ } break;
+ case SELECTION_ID_THE_TIME: {
+ new (d_theTime.buffer())
+ bdlt::TimeTz(original.d_theTime.object());
+ } break;
+ case SELECTION_ID_THE_DATETIME: {
new (d_theDatetime.buffer())
bdlt::DatetimeTz(original.d_theDatetime.object());
- } break;
- case SELECTION_ID_THE_STRING: {
+ } break;
+ case SELECTION_ID_THE_STRING: {
new (d_theString.buffer())
- bsl::string(original.d_theString.object(), d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ bsl::string(
+ original.d_theString.object(), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Value::Value(Value&& original) noexcept
-: d_selectionId(original.d_selectionId),
- d_allocator_p(original.d_allocator_p)
+: d_selectionId(original.d_selectionId)
+, d_allocator_p(original.d_allocator_p)
{
switch (d_selectionId) {
- case SELECTION_ID_THE_NULL: {
- new (d_theNull.buffer()) Void(bsl::move(original.d_theNull.object()));
- } break;
- case SELECTION_ID_THE_BOOL: {
- new (d_theBool.buffer()) bool(bsl::move(original.d_theBool.object()));
- } break;
- case SELECTION_ID_THE_INTEGER: {
+ case SELECTION_ID_THE_NULL: {
+ new (d_theNull.buffer())
+ Void(bsl::move(original.d_theNull.object()));
+ } break;
+ case SELECTION_ID_THE_BOOL: {
+ new (d_theBool.buffer())
+ bool(bsl::move(original.d_theBool.object()));
+ } break;
+ case SELECTION_ID_THE_INTEGER: {
new (d_theInteger.buffer())
bsls::Types::Int64(bsl::move(original.d_theInteger.object()));
- } break;
- case SELECTION_ID_THE_DOUBLE: {
- new (d_theDouble.buffer()) double(
- bsl::move(original.d_theDouble.object()));
- } break;
- case SELECTION_ID_THE_DATE: {
+ } break;
+ case SELECTION_ID_THE_DOUBLE: {
+ new (d_theDouble.buffer())
+ double(bsl::move(original.d_theDouble.object()));
+ } break;
+ case SELECTION_ID_THE_DATE: {
new (d_theDate.buffer())
bdlt::DateTz(bsl::move(original.d_theDate.object()));
- } break;
- case SELECTION_ID_THE_TIME: {
+ } break;
+ case SELECTION_ID_THE_TIME: {
new (d_theTime.buffer())
bdlt::TimeTz(bsl::move(original.d_theTime.object()));
- } break;
- case SELECTION_ID_THE_DATETIME: {
+ } break;
+ case SELECTION_ID_THE_DATETIME: {
new (d_theDatetime.buffer())
bdlt::DatetimeTz(bsl::move(original.d_theDatetime.object()));
- } break;
- case SELECTION_ID_THE_STRING: {
+ } break;
+ case SELECTION_ID_THE_STRING: {
new (d_theString.buffer())
- bsl::string(bsl::move(original.d_theString.object()),
- d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ bsl::string(
+ bsl::move(original.d_theString.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-Value::Value(Value&& original, bslma::Allocator* basicAllocator)
+Value::Value(
+ Value&& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_THE_NULL: {
- new (d_theNull.buffer()) Void(bsl::move(original.d_theNull.object()));
- } break;
- case SELECTION_ID_THE_BOOL: {
- new (d_theBool.buffer()) bool(bsl::move(original.d_theBool.object()));
- } break;
- case SELECTION_ID_THE_INTEGER: {
+ case SELECTION_ID_THE_NULL: {
+ new (d_theNull.buffer())
+ Void(bsl::move(original.d_theNull.object()));
+ } break;
+ case SELECTION_ID_THE_BOOL: {
+ new (d_theBool.buffer())
+ bool(bsl::move(original.d_theBool.object()));
+ } break;
+ case SELECTION_ID_THE_INTEGER: {
new (d_theInteger.buffer())
bsls::Types::Int64(bsl::move(original.d_theInteger.object()));
- } break;
- case SELECTION_ID_THE_DOUBLE: {
- new (d_theDouble.buffer()) double(
- bsl::move(original.d_theDouble.object()));
- } break;
- case SELECTION_ID_THE_DATE: {
+ } break;
+ case SELECTION_ID_THE_DOUBLE: {
+ new (d_theDouble.buffer())
+ double(bsl::move(original.d_theDouble.object()));
+ } break;
+ case SELECTION_ID_THE_DATE: {
new (d_theDate.buffer())
bdlt::DateTz(bsl::move(original.d_theDate.object()));
- } break;
- case SELECTION_ID_THE_TIME: {
+ } break;
+ case SELECTION_ID_THE_TIME: {
new (d_theTime.buffer())
bdlt::TimeTz(bsl::move(original.d_theTime.object()));
- } break;
- case SELECTION_ID_THE_DATETIME: {
+ } break;
+ case SELECTION_ID_THE_DATETIME: {
new (d_theDatetime.buffer())
bdlt::DatetimeTz(bsl::move(original.d_theDatetime.object()));
- } break;
- case SELECTION_ID_THE_STRING: {
+ } break;
+ case SELECTION_ID_THE_STRING: {
new (d_theString.buffer())
- bsl::string(bsl::move(original.d_theString.object()),
- d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ bsl::string(
+ bsl::move(original.d_theString.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
#endif
// MANIPULATORS
-Value& Value::operator=(const Value& rhs)
+Value&
+Value::operator=(const Value& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_THE_NULL: {
+ case SELECTION_ID_THE_NULL: {
makeTheNull(rhs.d_theNull.object());
- } break;
- case SELECTION_ID_THE_BOOL: {
+ } break;
+ case SELECTION_ID_THE_BOOL: {
makeTheBool(rhs.d_theBool.object());
- } break;
- case SELECTION_ID_THE_INTEGER: {
+ } break;
+ case SELECTION_ID_THE_INTEGER: {
makeTheInteger(rhs.d_theInteger.object());
- } break;
- case SELECTION_ID_THE_DOUBLE: {
+ } break;
+ case SELECTION_ID_THE_DOUBLE: {
makeTheDouble(rhs.d_theDouble.object());
- } break;
- case SELECTION_ID_THE_DATE: {
+ } break;
+ case SELECTION_ID_THE_DATE: {
makeTheDate(rhs.d_theDate.object());
- } break;
- case SELECTION_ID_THE_TIME: {
+ } break;
+ case SELECTION_ID_THE_TIME: {
makeTheTime(rhs.d_theTime.object());
- } break;
- case SELECTION_ID_THE_DATETIME: {
+ } break;
+ case SELECTION_ID_THE_DATETIME: {
makeTheDatetime(rhs.d_theDatetime.object());
- } break;
- case SELECTION_ID_THE_STRING: {
+ } break;
+ case SELECTION_ID_THE_STRING: {
makeTheString(rhs.d_theString.object());
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -9706,37 +10754,38 @@ Value& Value::operator=(const Value& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-Value& Value::operator=(Value&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+Value&
+Value::operator=(Value&& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_THE_NULL: {
+ case SELECTION_ID_THE_NULL: {
makeTheNull(bsl::move(rhs.d_theNull.object()));
- } break;
- case SELECTION_ID_THE_BOOL: {
+ } break;
+ case SELECTION_ID_THE_BOOL: {
makeTheBool(bsl::move(rhs.d_theBool.object()));
- } break;
- case SELECTION_ID_THE_INTEGER: {
+ } break;
+ case SELECTION_ID_THE_INTEGER: {
makeTheInteger(bsl::move(rhs.d_theInteger.object()));
- } break;
- case SELECTION_ID_THE_DOUBLE: {
+ } break;
+ case SELECTION_ID_THE_DOUBLE: {
makeTheDouble(bsl::move(rhs.d_theDouble.object()));
- } break;
- case SELECTION_ID_THE_DATE: {
+ } break;
+ case SELECTION_ID_THE_DATE: {
makeTheDate(bsl::move(rhs.d_theDate.object()));
- } break;
- case SELECTION_ID_THE_TIME: {
+ } break;
+ case SELECTION_ID_THE_TIME: {
makeTheTime(bsl::move(rhs.d_theTime.object()));
- } break;
- case SELECTION_ID_THE_DATETIME: {
+ } break;
+ case SELECTION_ID_THE_DATETIME: {
makeTheDatetime(bsl::move(rhs.d_theDatetime.object()));
- } break;
- case SELECTION_ID_THE_STRING: {
+ } break;
+ case SELECTION_ID_THE_STRING: {
makeTheString(bsl::move(rhs.d_theString.object()));
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -9749,32 +10798,33 @@ Value& Value::operator=(Value&& rhs)
void Value::reset()
{
switch (d_selectionId) {
- case SELECTION_ID_THE_NULL: {
+ case SELECTION_ID_THE_NULL: {
d_theNull.object().~Void();
- } break;
- case SELECTION_ID_THE_BOOL: {
+ } break;
+ case SELECTION_ID_THE_BOOL: {
// no destruction required
- } break;
- case SELECTION_ID_THE_INTEGER: {
+ } break;
+ case SELECTION_ID_THE_INTEGER: {
// no destruction required
- } break;
- case SELECTION_ID_THE_DOUBLE: {
+ } break;
+ case SELECTION_ID_THE_DOUBLE: {
// no destruction required
- } break;
- case SELECTION_ID_THE_DATE: {
+ } break;
+ case SELECTION_ID_THE_DATE: {
// no destruction required
- } break;
- case SELECTION_ID_THE_TIME: {
+ } break;
+ case SELECTION_ID_THE_TIME: {
// no destruction required
- } break;
- case SELECTION_ID_THE_DATETIME: {
+ } break;
+ case SELECTION_ID_THE_DATETIME: {
// no destruction required
- } break;
- case SELECTION_ID_THE_STRING: {
+ } break;
+ case SELECTION_ID_THE_STRING: {
typedef bsl::string Type;
d_theString.object().~Type();
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
d_selectionId = SELECTION_ID_UNDEFINED;
@@ -9783,44 +10833,45 @@ void Value::reset()
int Value::makeSelection(int selectionId)
{
switch (selectionId) {
- case SELECTION_ID_THE_NULL: {
+ case SELECTION_ID_THE_NULL: {
makeTheNull();
- } break;
- case SELECTION_ID_THE_BOOL: {
+ } break;
+ case SELECTION_ID_THE_BOOL: {
makeTheBool();
- } break;
- case SELECTION_ID_THE_INTEGER: {
+ } break;
+ case SELECTION_ID_THE_INTEGER: {
makeTheInteger();
- } break;
- case SELECTION_ID_THE_DOUBLE: {
+ } break;
+ case SELECTION_ID_THE_DOUBLE: {
makeTheDouble();
- } break;
- case SELECTION_ID_THE_DATE: {
+ } break;
+ case SELECTION_ID_THE_DATE: {
makeTheDate();
- } break;
- case SELECTION_ID_THE_TIME: {
+ } break;
+ case SELECTION_ID_THE_TIME: {
makeTheTime();
- } break;
- case SELECTION_ID_THE_DATETIME: {
+ } break;
+ case SELECTION_ID_THE_DATETIME: {
makeTheDatetime();
- } break;
- case SELECTION_ID_THE_STRING: {
+ } break;
+ case SELECTION_ID_THE_STRING: {
makeTheString();
- } break;
- case SELECTION_ID_UNDEFINED: {
+ } break;
+ case SELECTION_ID_UNDEFINED: {
reset();
- } break;
- default: return -1;
+ } break;
+ default:
+ return -1;
}
return 0;
}
-int Value::makeSelection(const char* name, int nameLength)
+int Value::makeSelection(const char *name, int nameLength)
{
- const bdlat_SelectionInfo* selectionInfo = lookupSelectionInfo(name,
- nameLength);
+ const bdlat_SelectionInfo *selectionInfo =
+ lookupSelectionInfo(name, nameLength);
if (0 == selectionInfo) {
- return -1;
+ return -1;
}
return makeSelection(selectionInfo->d_id);
@@ -9833,7 +10884,8 @@ Void& Value::makeTheNull()
}
else {
reset();
- new (d_theNull.buffer()) Void();
+ new (d_theNull.buffer())
+ Void();
d_selectionId = SELECTION_ID_THE_NULL;
}
@@ -9847,15 +10899,16 @@ Void& Value::makeTheNull(const Void& value)
}
else {
reset();
- new (d_theNull.buffer()) Void(value);
+ new (d_theNull.buffer())
+ Void(value);
d_selectionId = SELECTION_ID_THE_NULL;
}
return d_theNull.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Void& Value::makeTheNull(Void&& value)
{
if (SELECTION_ID_THE_NULL == d_selectionId) {
@@ -9863,7 +10916,8 @@ Void& Value::makeTheNull(Void&& value)
}
else {
reset();
- new (d_theNull.buffer()) Void(bsl::move(value));
+ new (d_theNull.buffer())
+ Void(bsl::move(value));
d_selectionId = SELECTION_ID_THE_NULL;
}
@@ -9878,7 +10932,8 @@ bool& Value::makeTheBool()
}
else {
reset();
- new (d_theBool.buffer()) bool();
+ new (d_theBool.buffer())
+ bool();
d_selectionId = SELECTION_ID_THE_BOOL;
}
@@ -9892,7 +10947,8 @@ bool& Value::makeTheBool(bool value)
}
else {
reset();
- new (d_theBool.buffer()) bool(value);
+ new (d_theBool.buffer())
+ bool(value);
d_selectionId = SELECTION_ID_THE_BOOL;
}
@@ -9906,7 +10962,8 @@ bsls::Types::Int64& Value::makeTheInteger()
}
else {
reset();
- new (d_theInteger.buffer()) bsls::Types::Int64();
+ new (d_theInteger.buffer())
+ bsls::Types::Int64();
d_selectionId = SELECTION_ID_THE_INTEGER;
}
@@ -9920,7 +10977,8 @@ bsls::Types::Int64& Value::makeTheInteger(bsls::Types::Int64 value)
}
else {
reset();
- new (d_theInteger.buffer()) bsls::Types::Int64(value);
+ new (d_theInteger.buffer())
+ bsls::Types::Int64(value);
d_selectionId = SELECTION_ID_THE_INTEGER;
}
@@ -9934,7 +10992,8 @@ double& Value::makeTheDouble()
}
else {
reset();
- new (d_theDouble.buffer()) double();
+ new (d_theDouble.buffer())
+ double();
d_selectionId = SELECTION_ID_THE_DOUBLE;
}
@@ -9948,7 +11007,8 @@ double& Value::makeTheDouble(double value)
}
else {
reset();
- new (d_theDouble.buffer()) double(value);
+ new (d_theDouble.buffer())
+ double(value);
d_selectionId = SELECTION_ID_THE_DOUBLE;
}
@@ -9962,7 +11022,8 @@ bdlt::DateTz& Value::makeTheDate()
}
else {
reset();
- new (d_theDate.buffer()) bdlt::DateTz();
+ new (d_theDate.buffer())
+ bdlt::DateTz();
d_selectionId = SELECTION_ID_THE_DATE;
}
@@ -9976,15 +11037,16 @@ bdlt::DateTz& Value::makeTheDate(const bdlt::DateTz& value)
}
else {
reset();
- new (d_theDate.buffer()) bdlt::DateTz(value);
+ new (d_theDate.buffer())
+ bdlt::DateTz(value);
d_selectionId = SELECTION_ID_THE_DATE;
}
return d_theDate.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
bdlt::DateTz& Value::makeTheDate(bdlt::DateTz&& value)
{
if (SELECTION_ID_THE_DATE == d_selectionId) {
@@ -9992,7 +11054,8 @@ bdlt::DateTz& Value::makeTheDate(bdlt::DateTz&& value)
}
else {
reset();
- new (d_theDate.buffer()) bdlt::DateTz(bsl::move(value));
+ new (d_theDate.buffer())
+ bdlt::DateTz(bsl::move(value));
d_selectionId = SELECTION_ID_THE_DATE;
}
@@ -10007,7 +11070,8 @@ bdlt::TimeTz& Value::makeTheTime()
}
else {
reset();
- new (d_theTime.buffer()) bdlt::TimeTz();
+ new (d_theTime.buffer())
+ bdlt::TimeTz();
d_selectionId = SELECTION_ID_THE_TIME;
}
@@ -10021,15 +11085,16 @@ bdlt::TimeTz& Value::makeTheTime(const bdlt::TimeTz& value)
}
else {
reset();
- new (d_theTime.buffer()) bdlt::TimeTz(value);
+ new (d_theTime.buffer())
+ bdlt::TimeTz(value);
d_selectionId = SELECTION_ID_THE_TIME;
}
return d_theTime.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
bdlt::TimeTz& Value::makeTheTime(bdlt::TimeTz&& value)
{
if (SELECTION_ID_THE_TIME == d_selectionId) {
@@ -10037,7 +11102,8 @@ bdlt::TimeTz& Value::makeTheTime(bdlt::TimeTz&& value)
}
else {
reset();
- new (d_theTime.buffer()) bdlt::TimeTz(bsl::move(value));
+ new (d_theTime.buffer())
+ bdlt::TimeTz(bsl::move(value));
d_selectionId = SELECTION_ID_THE_TIME;
}
@@ -10052,7 +11118,8 @@ bdlt::DatetimeTz& Value::makeTheDatetime()
}
else {
reset();
- new (d_theDatetime.buffer()) bdlt::DatetimeTz();
+ new (d_theDatetime.buffer())
+ bdlt::DatetimeTz();
d_selectionId = SELECTION_ID_THE_DATETIME;
}
@@ -10066,15 +11133,16 @@ bdlt::DatetimeTz& Value::makeTheDatetime(const bdlt::DatetimeTz& value)
}
else {
reset();
- new (d_theDatetime.buffer()) bdlt::DatetimeTz(value);
+ new (d_theDatetime.buffer())
+ bdlt::DatetimeTz(value);
d_selectionId = SELECTION_ID_THE_DATETIME;
}
return d_theDatetime.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
bdlt::DatetimeTz& Value::makeTheDatetime(bdlt::DatetimeTz&& value)
{
if (SELECTION_ID_THE_DATETIME == d_selectionId) {
@@ -10082,7 +11150,8 @@ bdlt::DatetimeTz& Value::makeTheDatetime(bdlt::DatetimeTz&& value)
}
else {
reset();
- new (d_theDatetime.buffer()) bdlt::DatetimeTz(bsl::move(value));
+ new (d_theDatetime.buffer())
+ bdlt::DatetimeTz(bsl::move(value));
d_selectionId = SELECTION_ID_THE_DATETIME;
}
@@ -10097,7 +11166,8 @@ bsl::string& Value::makeTheString()
}
else {
reset();
- new (d_theString.buffer()) bsl::string(d_allocator_p);
+ new (d_theString.buffer())
+ bsl::string(d_allocator_p);
d_selectionId = SELECTION_ID_THE_STRING;
}
@@ -10111,15 +11181,16 @@ bsl::string& Value::makeTheString(const bsl::string& value)
}
else {
reset();
- new (d_theString.buffer()) bsl::string(value, d_allocator_p);
+ new (d_theString.buffer())
+ bsl::string(value, d_allocator_p);
d_selectionId = SELECTION_ID_THE_STRING;
}
return d_theString.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
bsl::string& Value::makeTheString(bsl::string&& value)
{
if (SELECTION_ID_THE_STRING == d_selectionId) {
@@ -10128,7 +11199,7 @@ bsl::string& Value::makeTheString(bsl::string&& value)
else {
reset();
new (d_theString.buffer())
- bsl::string(bsl::move(value), d_allocator_p);
+ bsl::string(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_THE_STRING;
}
@@ -10138,93 +11209,102 @@ bsl::string& Value::makeTheString(bsl::string&& value)
// ACCESSORS
-bsl::ostream&
-Value::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& Value::print(
+ bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
switch (d_selectionId) {
- case SELECTION_ID_THE_NULL: {
+ case SELECTION_ID_THE_NULL: {
printer.printAttribute("theNull", d_theNull.object());
- } break;
- case SELECTION_ID_THE_BOOL: {
+ } break;
+ case SELECTION_ID_THE_BOOL: {
printer.printAttribute("theBool", d_theBool.object());
- } break;
- case SELECTION_ID_THE_INTEGER: {
+ } break;
+ case SELECTION_ID_THE_INTEGER: {
printer.printAttribute("theInteger", d_theInteger.object());
- } break;
- case SELECTION_ID_THE_DOUBLE: {
+ } break;
+ case SELECTION_ID_THE_DOUBLE: {
printer.printAttribute("theDouble", d_theDouble.object());
- } break;
- case SELECTION_ID_THE_DATE: {
+ } break;
+ case SELECTION_ID_THE_DATE: {
printer.printAttribute("theDate", d_theDate.object());
- } break;
- case SELECTION_ID_THE_TIME: {
+ } break;
+ case SELECTION_ID_THE_TIME: {
printer.printAttribute("theTime", d_theTime.object());
- } break;
- case SELECTION_ID_THE_DATETIME: {
+ } break;
+ case SELECTION_ID_THE_DATETIME: {
printer.printAttribute("theDatetime", d_theDatetime.object());
- } break;
- case SELECTION_ID_THE_STRING: {
+ } break;
+ case SELECTION_ID_THE_STRING: {
printer.printAttribute("theString", d_theString.object());
- } break;
- default: stream << "SELECTION UNDEFINED\n";
+ } break;
+ default:
+ stream << "SELECTION UNDEFINED\n";
}
printer.end();
return stream;
}
-const char* Value::selectionName() const
+
+const char *Value::selectionName() const
{
switch (d_selectionId) {
- case SELECTION_ID_THE_NULL:
+ case SELECTION_ID_THE_NULL:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_THE_NULL].name();
- case SELECTION_ID_THE_BOOL:
+ case SELECTION_ID_THE_BOOL:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_THE_BOOL].name();
- case SELECTION_ID_THE_INTEGER:
+ case SELECTION_ID_THE_INTEGER:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_THE_INTEGER].name();
- case SELECTION_ID_THE_DOUBLE:
+ case SELECTION_ID_THE_DOUBLE:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_THE_DOUBLE].name();
- case SELECTION_ID_THE_DATE:
+ case SELECTION_ID_THE_DATE:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_THE_DATE].name();
- case SELECTION_ID_THE_TIME:
+ case SELECTION_ID_THE_TIME:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_THE_TIME].name();
- case SELECTION_ID_THE_DATETIME:
+ case SELECTION_ID_THE_DATETIME:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_THE_DATETIME].name();
- case SELECTION_ID_THE_STRING:
+ case SELECTION_ID_THE_STRING:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_THE_STRING].name();
- default:
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
return "(* UNDEFINED *)";
}
}
-// -----------------
-// class ClusterList
-// -----------------
+ // -----------------
+ // class ClusterList
+ // -----------------
// CONSTANTS
const char ClusterList::CLASS_NAME[] = "ClusterList";
const bdlat_AttributeInfo ClusterList::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_CLUSTERS,
- "clusters",
- sizeof("clusters") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ ATTRIBUTE_ID_CLUSTERS,
+ "clusters",
+ sizeof("clusters") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* ClusterList::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *ClusterList::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 1; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- ClusterList::ATTRIBUTE_INFO_ARRAY[i];
+ ClusterList::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -10232,37 +11312,38 @@ const bdlat_AttributeInfo* ClusterList::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* ClusterList::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *ClusterList::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_CLUSTERS:
+ case ATTRIBUTE_ID_CLUSTERS:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTERS];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-ClusterList::ClusterList(bslma::Allocator* basicAllocator)
+ClusterList::ClusterList(bslma::Allocator *basicAllocator)
: d_clusters(basicAllocator)
{
}
ClusterList::ClusterList(const ClusterList& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_clusters(original.d_clusters, basicAllocator)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ClusterList::ClusterList(ClusterList&& original) noexcept
: d_clusters(bsl::move(original.d_clusters))
{
}
-ClusterList::ClusterList(ClusterList&& original,
- bslma::Allocator* basicAllocator)
+ClusterList::ClusterList(ClusterList&& original,
+ bslma::Allocator *basicAllocator)
: d_clusters(bsl::move(original.d_clusters), basicAllocator)
{
}
@@ -10274,7 +11355,8 @@ ClusterList::~ClusterList()
// MANIPULATORS
-ClusterList& ClusterList::operator=(const ClusterList& rhs)
+ClusterList&
+ClusterList::operator=(const ClusterList& rhs)
{
if (this != &rhs) {
d_clusters = rhs.d_clusters;
@@ -10283,9 +11365,10 @@ ClusterList& ClusterList::operator=(const ClusterList& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-ClusterList& ClusterList::operator=(ClusterList&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ClusterList&
+ClusterList::operator=(ClusterList&& rhs)
{
if (this != &rhs) {
d_clusters = bsl::move(rhs.d_clusters);
@@ -10302,8 +11385,9 @@ void ClusterList::reset()
// ACCESSORS
-bsl::ostream&
-ClusterList::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& ClusterList::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
@@ -10312,62 +11396,81 @@ ClusterList::print(bsl::ostream& stream, int level, int spacesPerLevel) const
return stream;
}
-// ------------------------
-// class ClusterQueueHelper
-// ------------------------
+
+
+ // ------------------------
+ // class ClusterQueueHelper
+ // ------------------------
// CONSTANTS
const char ClusterQueueHelper::CLASS_NAME[] = "ClusterQueueHelper";
const bdlat_AttributeInfo ClusterQueueHelper::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_CLUSTER_NAME,
- "clusterName",
- sizeof("clusterName") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_LOCALITY,
- "locality",
- sizeof("locality") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {ATTRIBUTE_ID_NUM_QUEUES,
- "numQueues",
- sizeof("numQueues") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_NUM_QUEUE_KEYS,
- "numQueueKeys",
- sizeof("numQueueKeys") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_NUM_PENDING_REOPEN_QUEUE_REQUESTS,
- "numPendingReopenQueueRequests",
- sizeof("numPendingReopenQueueRequests") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_DOMAINS,
- "domains",
- sizeof("domains") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {ATTRIBUTE_ID_QUEUES,
- "queues",
- sizeof("queues") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ ATTRIBUTE_ID_CLUSTER_NAME,
+ "clusterName",
+ sizeof("clusterName") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_LOCALITY,
+ "locality",
+ sizeof("locality") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ ATTRIBUTE_ID_NUM_QUEUES,
+ "numQueues",
+ sizeof("numQueues") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_NUM_QUEUE_KEYS,
+ "numQueueKeys",
+ sizeof("numQueueKeys") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_NUM_PENDING_REOPEN_QUEUE_REQUESTS,
+ "numPendingReopenQueueRequests",
+ sizeof("numPendingReopenQueueRequests") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_DOMAINS,
+ "domains",
+ sizeof("domains") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ ATTRIBUTE_ID_QUEUES,
+ "queues",
+ sizeof("queues") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo*
-ClusterQueueHelper::lookupAttributeInfo(const char* name, int nameLength)
+const bdlat_AttributeInfo *ClusterQueueHelper::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 7; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- ClusterQueueHelper::ATTRIBUTE_INFO_ARRAY[i];
+ ClusterQueueHelper::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -10375,31 +11478,31 @@ ClusterQueueHelper::lookupAttributeInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_AttributeInfo* ClusterQueueHelper::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *ClusterQueueHelper::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_CLUSTER_NAME:
+ case ATTRIBUTE_ID_CLUSTER_NAME:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTER_NAME];
- case ATTRIBUTE_ID_LOCALITY:
+ case ATTRIBUTE_ID_LOCALITY:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LOCALITY];
- case ATTRIBUTE_ID_NUM_QUEUES:
+ case ATTRIBUTE_ID_NUM_QUEUES:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_QUEUES];
- case ATTRIBUTE_ID_NUM_QUEUE_KEYS:
+ case ATTRIBUTE_ID_NUM_QUEUE_KEYS:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_QUEUE_KEYS];
- case ATTRIBUTE_ID_NUM_PENDING_REOPEN_QUEUE_REQUESTS:
- return &ATTRIBUTE_INFO_ARRAY
- [ATTRIBUTE_INDEX_NUM_PENDING_REOPEN_QUEUE_REQUESTS];
- case ATTRIBUTE_ID_DOMAINS:
+ case ATTRIBUTE_ID_NUM_PENDING_REOPEN_QUEUE_REQUESTS:
+ return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_PENDING_REOPEN_QUEUE_REQUESTS];
+ case ATTRIBUTE_ID_DOMAINS:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DOMAINS];
- case ATTRIBUTE_ID_QUEUES:
+ case ATTRIBUTE_ID_QUEUES:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUES];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-ClusterQueueHelper::ClusterQueueHelper(bslma::Allocator* basicAllocator)
+ClusterQueueHelper::ClusterQueueHelper(bslma::Allocator *basicAllocator)
: d_queues(basicAllocator)
, d_domains(basicAllocator)
, d_clusterName(basicAllocator)
@@ -10411,7 +11514,7 @@ ClusterQueueHelper::ClusterQueueHelper(bslma::Allocator* basicAllocator)
}
ClusterQueueHelper::ClusterQueueHelper(const ClusterQueueHelper& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_queues(original.d_queues, basicAllocator)
, d_domains(original.d_domains, basicAllocator)
, d_clusterName(original.d_clusterName, basicAllocator)
@@ -10422,29 +11525,27 @@ ClusterQueueHelper::ClusterQueueHelper(const ClusterQueueHelper& original,
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ClusterQueueHelper::ClusterQueueHelper(ClusterQueueHelper&& original) noexcept
-: d_queues(bsl::move(original.d_queues)),
- d_domains(bsl::move(original.d_domains)),
- d_clusterName(bsl::move(original.d_clusterName)),
- d_numQueues(bsl::move(original.d_numQueues)),
- d_numQueueKeys(bsl::move(original.d_numQueueKeys)),
- d_numPendingReopenQueueRequests(
- bsl::move(original.d_numPendingReopenQueueRequests)),
- d_locality(bsl::move(original.d_locality))
+: d_queues(bsl::move(original.d_queues))
+, d_domains(bsl::move(original.d_domains))
+, d_clusterName(bsl::move(original.d_clusterName))
+, d_numQueues(bsl::move(original.d_numQueues))
+, d_numQueueKeys(bsl::move(original.d_numQueueKeys))
+, d_numPendingReopenQueueRequests(bsl::move(original.d_numPendingReopenQueueRequests))
+, d_locality(bsl::move(original.d_locality))
{
}
ClusterQueueHelper::ClusterQueueHelper(ClusterQueueHelper&& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_queues(bsl::move(original.d_queues), basicAllocator)
, d_domains(bsl::move(original.d_domains), basicAllocator)
, d_clusterName(bsl::move(original.d_clusterName), basicAllocator)
, d_numQueues(bsl::move(original.d_numQueues))
, d_numQueueKeys(bsl::move(original.d_numQueueKeys))
-, d_numPendingReopenQueueRequests(
- bsl::move(original.d_numPendingReopenQueueRequests))
+, d_numPendingReopenQueueRequests(bsl::move(original.d_numPendingReopenQueueRequests))
, d_locality(bsl::move(original.d_locality))
{
}
@@ -10460,31 +11561,31 @@ ClusterQueueHelper&
ClusterQueueHelper::operator=(const ClusterQueueHelper& rhs)
{
if (this != &rhs) {
- d_clusterName = rhs.d_clusterName;
- d_locality = rhs.d_locality;
- d_numQueues = rhs.d_numQueues;
- d_numQueueKeys = rhs.d_numQueueKeys;
+ d_clusterName = rhs.d_clusterName;
+ d_locality = rhs.d_locality;
+ d_numQueues = rhs.d_numQueues;
+ d_numQueueKeys = rhs.d_numQueueKeys;
d_numPendingReopenQueueRequests = rhs.d_numPendingReopenQueueRequests;
- d_domains = rhs.d_domains;
- d_queues = rhs.d_queues;
+ d_domains = rhs.d_domains;
+ d_queues = rhs.d_queues;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-ClusterQueueHelper& ClusterQueueHelper::operator=(ClusterQueueHelper&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ClusterQueueHelper&
+ClusterQueueHelper::operator=(ClusterQueueHelper&& rhs)
{
if (this != &rhs) {
- d_clusterName = bsl::move(rhs.d_clusterName);
- d_locality = bsl::move(rhs.d_locality);
- d_numQueues = bsl::move(rhs.d_numQueues);
- d_numQueueKeys = bsl::move(rhs.d_numQueueKeys);
- d_numPendingReopenQueueRequests = bsl::move(
- rhs.d_numPendingReopenQueueRequests);
+ d_clusterName = bsl::move(rhs.d_clusterName);
+ d_locality = bsl::move(rhs.d_locality);
+ d_numQueues = bsl::move(rhs.d_numQueues);
+ d_numQueueKeys = bsl::move(rhs.d_numQueueKeys);
+ d_numPendingReopenQueueRequests = bsl::move(rhs.d_numPendingReopenQueueRequests);
d_domains = bsl::move(rhs.d_domains);
- d_queues = bsl::move(rhs.d_queues);
+ d_queues = bsl::move(rhs.d_queues);
}
return *this;
@@ -10514,40 +11615,46 @@ bsl::ostream& ClusterQueueHelper::print(bsl::ostream& stream,
printer.printAttribute("locality", this->locality());
printer.printAttribute("numQueues", this->numQueues());
printer.printAttribute("numQueueKeys", this->numQueueKeys());
- printer.printAttribute("numPendingReopenQueueRequests",
- this->numPendingReopenQueueRequests());
+ printer.printAttribute("numPendingReopenQueueRequests", this->numPendingReopenQueueRequests());
printer.printAttribute("domains", this->domains());
printer.printAttribute("queues", this->queues());
printer.end();
return stream;
}
-// ---------------------------
-// class ConfigProviderCommand
-// ---------------------------
+
+
+ // ---------------------------
+ // class ConfigProviderCommand
+ // ---------------------------
// CONSTANTS
const char ConfigProviderCommand::CLASS_NAME[] = "ConfigProviderCommand";
const bdlat_SelectionInfo ConfigProviderCommand::SELECTION_INFO_ARRAY[] = {
- {SELECTION_ID_CLEAR_CACHE,
- "clearCache",
- sizeof("clearCache") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ SELECTION_ID_CLEAR_CACHE,
+ "clearCache",
+ sizeof("clearCache") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_SelectionInfo*
-ConfigProviderCommand::lookupSelectionInfo(const char* name, int nameLength)
+const bdlat_SelectionInfo *ConfigProviderCommand::lookupSelectionInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 1; ++i) {
const bdlat_SelectionInfo& selectionInfo =
- ConfigProviderCommand::SELECTION_INFO_ARRAY[i];
+ ConfigProviderCommand::SELECTION_INFO_ARRAY[i];
- if (nameLength == selectionInfo.d_nameLength &&
- 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength)) {
+ if (nameLength == selectionInfo.d_nameLength
+ && 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength))
+ {
return &selectionInfo;
}
}
@@ -10555,12 +11662,13 @@ ConfigProviderCommand::lookupSelectionInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_SelectionInfo* ConfigProviderCommand::lookupSelectionInfo(int id)
+const bdlat_SelectionInfo *ConfigProviderCommand::lookupSelectionInfo(int id)
{
switch (id) {
- case SELECTION_ID_CLEAR_CACHE:
+ case SELECTION_ID_CLEAR_CACHE:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_CLEAR_CACHE];
- default: return 0;
+ default:
+ return 0;
}
}
@@ -10568,47 +11676,52 @@ const bdlat_SelectionInfo* ConfigProviderCommand::lookupSelectionInfo(int id)
ConfigProviderCommand::ConfigProviderCommand(
const ConfigProviderCommand& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_CLEAR_CACHE: {
+ case SELECTION_ID_CLEAR_CACHE: {
new (d_clearCache.buffer())
- ClearCache(original.d_clearCache.object(), d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ ClearCache(
+ original.d_clearCache.object(), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-ConfigProviderCommand::ConfigProviderCommand(ConfigProviderCommand&& original)
- noexcept : d_selectionId(original.d_selectionId),
- d_allocator_p(original.d_allocator_p)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ConfigProviderCommand::ConfigProviderCommand(ConfigProviderCommand&& original) noexcept
+: d_selectionId(original.d_selectionId)
+, d_allocator_p(original.d_allocator_p)
{
switch (d_selectionId) {
- case SELECTION_ID_CLEAR_CACHE: {
+ case SELECTION_ID_CLEAR_CACHE: {
new (d_clearCache.buffer())
- ClearCache(bsl::move(original.d_clearCache.object()),
- d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ ClearCache(
+ bsl::move(original.d_clearCache.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-ConfigProviderCommand::ConfigProviderCommand(ConfigProviderCommand&& original,
- bslma::Allocator* basicAllocator)
+ConfigProviderCommand::ConfigProviderCommand(
+ ConfigProviderCommand&& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_CLEAR_CACHE: {
+ case SELECTION_ID_CLEAR_CACHE: {
new (d_clearCache.buffer())
- ClearCache(bsl::move(original.d_clearCache.object()),
- d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ ClearCache(
+ bsl::move(original.d_clearCache.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
#endif
@@ -10620,10 +11733,10 @@ ConfigProviderCommand::operator=(const ConfigProviderCommand& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_CLEAR_CACHE: {
+ case SELECTION_ID_CLEAR_CACHE: {
makeClearCache(rhs.d_clearCache.object());
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -10632,17 +11745,17 @@ ConfigProviderCommand::operator=(const ConfigProviderCommand& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ConfigProviderCommand&
ConfigProviderCommand::operator=(ConfigProviderCommand&& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_CLEAR_CACHE: {
+ case SELECTION_ID_CLEAR_CACHE: {
makeClearCache(bsl::move(rhs.d_clearCache.object()));
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -10655,10 +11768,11 @@ ConfigProviderCommand::operator=(ConfigProviderCommand&& rhs)
void ConfigProviderCommand::reset()
{
switch (d_selectionId) {
- case SELECTION_ID_CLEAR_CACHE: {
+ case SELECTION_ID_CLEAR_CACHE: {
d_clearCache.object().~ClearCache();
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
d_selectionId = SELECTION_ID_UNDEFINED;
@@ -10667,23 +11781,24 @@ void ConfigProviderCommand::reset()
int ConfigProviderCommand::makeSelection(int selectionId)
{
switch (selectionId) {
- case SELECTION_ID_CLEAR_CACHE: {
+ case SELECTION_ID_CLEAR_CACHE: {
makeClearCache();
- } break;
- case SELECTION_ID_UNDEFINED: {
+ } break;
+ case SELECTION_ID_UNDEFINED: {
reset();
- } break;
- default: return -1;
+ } break;
+ default:
+ return -1;
}
return 0;
}
-int ConfigProviderCommand::makeSelection(const char* name, int nameLength)
+int ConfigProviderCommand::makeSelection(const char *name, int nameLength)
{
- const bdlat_SelectionInfo* selectionInfo = lookupSelectionInfo(name,
- nameLength);
+ const bdlat_SelectionInfo *selectionInfo =
+ lookupSelectionInfo(name, nameLength);
if (0 == selectionInfo) {
- return -1;
+ return -1;
}
return makeSelection(selectionInfo->d_id);
@@ -10696,7 +11811,8 @@ ClearCache& ConfigProviderCommand::makeClearCache()
}
else {
reset();
- new (d_clearCache.buffer()) ClearCache(d_allocator_p);
+ new (d_clearCache.buffer())
+ ClearCache(d_allocator_p);
d_selectionId = SELECTION_ID_CLEAR_CACHE;
}
@@ -10710,15 +11826,16 @@ ClearCache& ConfigProviderCommand::makeClearCache(const ClearCache& value)
}
else {
reset();
- new (d_clearCache.buffer()) ClearCache(value, d_allocator_p);
+ new (d_clearCache.buffer())
+ ClearCache(value, d_allocator_p);
d_selectionId = SELECTION_ID_CLEAR_CACHE;
}
return d_clearCache.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ClearCache& ConfigProviderCommand::makeClearCache(ClearCache&& value)
{
if (SELECTION_ID_CLEAR_CACHE == d_selectionId) {
@@ -10727,7 +11844,7 @@ ClearCache& ConfigProviderCommand::makeClearCache(ClearCache&& value)
else {
reset();
new (d_clearCache.buffer())
- ClearCache(bsl::move(value), d_allocator_p);
+ ClearCache(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_CLEAR_CACHE;
}
@@ -10737,84 +11854,102 @@ ClearCache& ConfigProviderCommand::makeClearCache(ClearCache&& value)
// ACCESSORS
-bsl::ostream& ConfigProviderCommand::print(bsl::ostream& stream,
- int level,
- int spacesPerLevel) const
+bsl::ostream& ConfigProviderCommand::print(
+ bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
switch (d_selectionId) {
- case SELECTION_ID_CLEAR_CACHE: {
+ case SELECTION_ID_CLEAR_CACHE: {
printer.printAttribute("clearCache", d_clearCache.object());
- } break;
- default: stream << "SELECTION UNDEFINED\n";
+ } break;
+ default:
+ stream << "SELECTION UNDEFINED\n";
}
printer.end();
return stream;
}
-const char* ConfigProviderCommand::selectionName() const
+
+const char *ConfigProviderCommand::selectionName() const
{
switch (d_selectionId) {
- case SELECTION_ID_CLEAR_CACHE:
+ case SELECTION_ID_CLEAR_CACHE:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_CLEAR_CACHE].name();
- default:
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
return "(* UNDEFINED *)";
}
}
-// ----------------
-// class DomainInfo
-// ----------------
+ // ----------------
+ // class DomainInfo
+ // ----------------
// CONSTANTS
const char DomainInfo::CLASS_NAME[] = "DomainInfo";
const bdlat_AttributeInfo DomainInfo::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_NAME,
- "name",
- sizeof("name") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_CONFIG_JSON,
- "configJson",
- sizeof("configJson") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_CLUSTER_NAME,
- "clusterName",
- sizeof("clusterName") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_CAPACITY_METER,
- "capacityMeter",
- sizeof("capacityMeter") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {ATTRIBUTE_ID_QUEUE_URIS,
- "queueUris",
- sizeof("queueUris") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_STORAGE_CONTENT,
- "storageContent",
- sizeof("storageContent") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ ATTRIBUTE_ID_NAME,
+ "name",
+ sizeof("name") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_CONFIG_JSON,
+ "configJson",
+ sizeof("configJson") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_CLUSTER_NAME,
+ "clusterName",
+ sizeof("clusterName") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_CAPACITY_METER,
+ "capacityMeter",
+ sizeof("capacityMeter") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ ATTRIBUTE_ID_QUEUE_URIS,
+ "queueUris",
+ sizeof("queueUris") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_STORAGE_CONTENT,
+ "storageContent",
+ sizeof("storageContent") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* DomainInfo::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *DomainInfo::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 6; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- DomainInfo::ATTRIBUTE_INFO_ARRAY[i];
+ DomainInfo::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -10822,27 +11957,29 @@ const bdlat_AttributeInfo* DomainInfo::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* DomainInfo::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *DomainInfo::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_NAME: return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME];
- case ATTRIBUTE_ID_CONFIG_JSON:
+ case ATTRIBUTE_ID_NAME:
+ return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME];
+ case ATTRIBUTE_ID_CONFIG_JSON:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONFIG_JSON];
- case ATTRIBUTE_ID_CLUSTER_NAME:
+ case ATTRIBUTE_ID_CLUSTER_NAME:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTER_NAME];
- case ATTRIBUTE_ID_CAPACITY_METER:
+ case ATTRIBUTE_ID_CAPACITY_METER:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CAPACITY_METER];
- case ATTRIBUTE_ID_QUEUE_URIS:
+ case ATTRIBUTE_ID_QUEUE_URIS:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_URIS];
- case ATTRIBUTE_ID_STORAGE_CONTENT:
+ case ATTRIBUTE_ID_STORAGE_CONTENT:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STORAGE_CONTENT];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-DomainInfo::DomainInfo(bslma::Allocator* basicAllocator)
+DomainInfo::DomainInfo(bslma::Allocator *basicAllocator)
: d_allocator_p(bslma::Default::allocator(basicAllocator))
, d_queueUris(basicAllocator)
, d_name(basicAllocator)
@@ -10850,11 +11987,12 @@ DomainInfo::DomainInfo(bslma::Allocator* basicAllocator)
, d_clusterName(basicAllocator)
, d_storageContent(basicAllocator)
{
- d_capacityMeter = new (*d_allocator_p) CapacityMeter(d_allocator_p);
+ d_capacityMeter = new (*d_allocator_p)
+ CapacityMeter(d_allocator_p);
}
DomainInfo::DomainInfo(const DomainInfo& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_allocator_p(bslma::Default::allocator(basicAllocator))
, d_queueUris(original.d_queueUris, basicAllocator)
, d_name(original.d_name, basicAllocator)
@@ -10863,24 +12001,25 @@ DomainInfo::DomainInfo(const DomainInfo& original,
, d_storageContent(original.d_storageContent, basicAllocator)
{
d_capacityMeter = new (*d_allocator_p)
- CapacityMeter(*original.d_capacityMeter, d_allocator_p);
+ CapacityMeter(*original.d_capacityMeter, d_allocator_p);
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
DomainInfo::DomainInfo(DomainInfo&& original) noexcept
-: d_allocator_p(original.d_allocator_p),
- d_queueUris(bsl::move(original.d_queueUris)),
- d_name(bsl::move(original.d_name)),
- d_configJson(bsl::move(original.d_configJson)),
- d_clusterName(bsl::move(original.d_clusterName)),
- d_storageContent(bsl::move(original.d_storageContent))
-{
- d_capacityMeter = original.d_capacityMeter;
+: d_allocator_p(original.d_allocator_p)
+, d_queueUris(bsl::move(original.d_queueUris))
+, d_name(bsl::move(original.d_name))
+, d_configJson(bsl::move(original.d_configJson))
+, d_clusterName(bsl::move(original.d_clusterName))
+, d_storageContent(bsl::move(original.d_storageContent))
+{
+ d_capacityMeter = original.d_capacityMeter;
original.d_capacityMeter = 0;
}
-DomainInfo::DomainInfo(DomainInfo&& original, bslma::Allocator* basicAllocator)
+DomainInfo::DomainInfo(DomainInfo&& original,
+ bslma::Allocator *basicAllocator)
: d_allocator_p(bslma::Default::allocator(basicAllocator))
, d_queueUris(bsl::move(original.d_queueUris), basicAllocator)
, d_name(bsl::move(original.d_name), basicAllocator)
@@ -10889,12 +12028,12 @@ DomainInfo::DomainInfo(DomainInfo&& original, bslma::Allocator* basicAllocator)
, d_storageContent(bsl::move(original.d_storageContent), basicAllocator)
{
if (d_allocator_p == original.d_allocator_p) {
- d_capacityMeter = original.d_capacityMeter;
+ d_capacityMeter = original.d_capacityMeter;
original.d_capacityMeter = 0;
}
else {
d_capacityMeter = new (*d_allocator_p)
- CapacityMeter(bsl::move(*original.d_capacityMeter), d_allocator_p);
+ CapacityMeter(bsl::move(*original.d_capacityMeter), d_allocator_p);
}
}
#endif
@@ -10906,11 +12045,12 @@ DomainInfo::~DomainInfo()
// MANIPULATORS
-DomainInfo& DomainInfo::operator=(const DomainInfo& rhs)
+DomainInfo&
+DomainInfo::operator=(const DomainInfo& rhs)
{
if (this != &rhs) {
- d_name = rhs.d_name;
- d_configJson = rhs.d_configJson;
+ d_name = rhs.d_name;
+ d_configJson = rhs.d_configJson;
d_clusterName = rhs.d_clusterName;
if (d_capacityMeter) {
*d_capacityMeter = *rhs.d_capacityMeter;
@@ -10919,24 +12059,25 @@ DomainInfo& DomainInfo::operator=(const DomainInfo& rhs)
d_capacityMeter = new (*d_allocator_p)
CapacityMeter(*rhs.d_capacityMeter, d_allocator_p);
}
- d_queueUris = rhs.d_queueUris;
+ d_queueUris = rhs.d_queueUris;
d_storageContent = rhs.d_storageContent;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-DomainInfo& DomainInfo::operator=(DomainInfo&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+DomainInfo&
+DomainInfo::operator=(DomainInfo&& rhs)
{
if (this != &rhs) {
- d_name = bsl::move(rhs.d_name);
- d_configJson = bsl::move(rhs.d_configJson);
+ d_name = bsl::move(rhs.d_name);
+ d_configJson = bsl::move(rhs.d_configJson);
d_clusterName = bsl::move(rhs.d_clusterName);
if (d_allocator_p == rhs.d_allocator_p) {
d_allocator_p->deleteObject(d_capacityMeter);
- d_capacityMeter = rhs.d_capacityMeter;
+ d_capacityMeter = rhs.d_capacityMeter;
rhs.d_capacityMeter = 0;
}
else if (d_capacityMeter) {
@@ -10946,7 +12087,7 @@ DomainInfo& DomainInfo::operator=(DomainInfo&& rhs)
d_capacityMeter = new (*d_allocator_p)
CapacityMeter(bsl::move(*rhs.d_capacityMeter), d_allocator_p);
}
- d_queueUris = bsl::move(rhs.d_queueUris);
+ d_queueUris = bsl::move(rhs.d_queueUris);
d_storageContent = bsl::move(rhs.d_storageContent);
}
@@ -10967,8 +12108,9 @@ void DomainInfo::reset()
// ACCESSORS
-bsl::ostream&
-DomainInfo::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& DomainInfo::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
@@ -10982,37 +12124,46 @@ DomainInfo::print(bsl::ostream& stream, int level, int spacesPerLevel) const
return stream;
}
-// -----------------
-// class DomainQueue
-// -----------------
+
+
+ // -----------------
+ // class DomainQueue
+ // -----------------
// CONSTANTS
const char DomainQueue::CLASS_NAME[] = "DomainQueue";
const bdlat_AttributeInfo DomainQueue::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_NAME,
- "name",
- sizeof("name") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_COMMAND,
- "command",
- sizeof("command") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ ATTRIBUTE_ID_NAME,
+ "name",
+ sizeof("name") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_COMMAND,
+ "command",
+ sizeof("command") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* DomainQueue::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *DomainQueue::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 2; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- DomainQueue::ATTRIBUTE_INFO_ARRAY[i];
+ DomainQueue::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -11020,41 +12171,43 @@ const bdlat_AttributeInfo* DomainQueue::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* DomainQueue::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *DomainQueue::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_NAME: return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME];
- case ATTRIBUTE_ID_COMMAND:
+ case ATTRIBUTE_ID_NAME:
+ return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME];
+ case ATTRIBUTE_ID_COMMAND:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-DomainQueue::DomainQueue(bslma::Allocator* basicAllocator)
+DomainQueue::DomainQueue(bslma::Allocator *basicAllocator)
: d_name(basicAllocator)
, d_command(basicAllocator)
{
}
DomainQueue::DomainQueue(const DomainQueue& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_name(original.d_name, basicAllocator)
, d_command(original.d_command, basicAllocator)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
DomainQueue::DomainQueue(DomainQueue&& original) noexcept
-: d_name(bsl::move(original.d_name)),
- d_command(bsl::move(original.d_command))
+: d_name(bsl::move(original.d_name))
+, d_command(bsl::move(original.d_command))
{
}
-DomainQueue::DomainQueue(DomainQueue&& original,
- bslma::Allocator* basicAllocator)
+DomainQueue::DomainQueue(DomainQueue&& original,
+ bslma::Allocator *basicAllocator)
: d_name(bsl::move(original.d_name), basicAllocator)
, d_command(bsl::move(original.d_command), basicAllocator)
{
@@ -11067,22 +12220,24 @@ DomainQueue::~DomainQueue()
// MANIPULATORS
-DomainQueue& DomainQueue::operator=(const DomainQueue& rhs)
+DomainQueue&
+DomainQueue::operator=(const DomainQueue& rhs)
{
if (this != &rhs) {
- d_name = rhs.d_name;
+ d_name = rhs.d_name;
d_command = rhs.d_command;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-DomainQueue& DomainQueue::operator=(DomainQueue&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+DomainQueue&
+DomainQueue::operator=(DomainQueue&& rhs)
{
if (this != &rhs) {
- d_name = bsl::move(rhs.d_name);
+ d_name = bsl::move(rhs.d_name);
d_command = bsl::move(rhs.d_command);
}
@@ -11098,8 +12253,9 @@ void DomainQueue::reset()
// ACCESSORS
-bsl::ostream&
-DomainQueue::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& DomainQueue::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
@@ -11109,32 +12265,39 @@ DomainQueue::print(bsl::ostream& stream, int level, int spacesPerLevel) const
return stream;
}
-// ---------------------------
-// class DomainResolverCommand
-// ---------------------------
+
+
+ // ---------------------------
+ // class DomainResolverCommand
+ // ---------------------------
// CONSTANTS
const char DomainResolverCommand::CLASS_NAME[] = "DomainResolverCommand";
const bdlat_SelectionInfo DomainResolverCommand::SELECTION_INFO_ARRAY[] = {
- {SELECTION_ID_CLEAR_CACHE,
- "clearCache",
- sizeof("clearCache") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ SELECTION_ID_CLEAR_CACHE,
+ "clearCache",
+ sizeof("clearCache") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_SelectionInfo*
-DomainResolverCommand::lookupSelectionInfo(const char* name, int nameLength)
+const bdlat_SelectionInfo *DomainResolverCommand::lookupSelectionInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 1; ++i) {
const bdlat_SelectionInfo& selectionInfo =
- DomainResolverCommand::SELECTION_INFO_ARRAY[i];
+ DomainResolverCommand::SELECTION_INFO_ARRAY[i];
- if (nameLength == selectionInfo.d_nameLength &&
- 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength)) {
+ if (nameLength == selectionInfo.d_nameLength
+ && 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength))
+ {
return &selectionInfo;
}
}
@@ -11142,12 +12305,13 @@ DomainResolverCommand::lookupSelectionInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_SelectionInfo* DomainResolverCommand::lookupSelectionInfo(int id)
+const bdlat_SelectionInfo *DomainResolverCommand::lookupSelectionInfo(int id)
{
switch (id) {
- case SELECTION_ID_CLEAR_CACHE:
+ case SELECTION_ID_CLEAR_CACHE:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_CLEAR_CACHE];
- default: return 0;
+ default:
+ return 0;
}
}
@@ -11155,47 +12319,52 @@ const bdlat_SelectionInfo* DomainResolverCommand::lookupSelectionInfo(int id)
DomainResolverCommand::DomainResolverCommand(
const DomainResolverCommand& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_CLEAR_CACHE: {
+ case SELECTION_ID_CLEAR_CACHE: {
new (d_clearCache.buffer())
- ClearCache(original.d_clearCache.object(), d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ ClearCache(
+ original.d_clearCache.object(), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-DomainResolverCommand::DomainResolverCommand(DomainResolverCommand&& original)
- noexcept : d_selectionId(original.d_selectionId),
- d_allocator_p(original.d_allocator_p)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+DomainResolverCommand::DomainResolverCommand(DomainResolverCommand&& original) noexcept
+: d_selectionId(original.d_selectionId)
+, d_allocator_p(original.d_allocator_p)
{
switch (d_selectionId) {
- case SELECTION_ID_CLEAR_CACHE: {
+ case SELECTION_ID_CLEAR_CACHE: {
new (d_clearCache.buffer())
- ClearCache(bsl::move(original.d_clearCache.object()),
- d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ ClearCache(
+ bsl::move(original.d_clearCache.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-DomainResolverCommand::DomainResolverCommand(DomainResolverCommand&& original,
- bslma::Allocator* basicAllocator)
+DomainResolverCommand::DomainResolverCommand(
+ DomainResolverCommand&& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_CLEAR_CACHE: {
+ case SELECTION_ID_CLEAR_CACHE: {
new (d_clearCache.buffer())
- ClearCache(bsl::move(original.d_clearCache.object()),
- d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ ClearCache(
+ bsl::move(original.d_clearCache.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
#endif
@@ -11207,10 +12376,10 @@ DomainResolverCommand::operator=(const DomainResolverCommand& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_CLEAR_CACHE: {
+ case SELECTION_ID_CLEAR_CACHE: {
makeClearCache(rhs.d_clearCache.object());
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -11219,17 +12388,17 @@ DomainResolverCommand::operator=(const DomainResolverCommand& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
DomainResolverCommand&
DomainResolverCommand::operator=(DomainResolverCommand&& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_CLEAR_CACHE: {
+ case SELECTION_ID_CLEAR_CACHE: {
makeClearCache(bsl::move(rhs.d_clearCache.object()));
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -11242,10 +12411,11 @@ DomainResolverCommand::operator=(DomainResolverCommand&& rhs)
void DomainResolverCommand::reset()
{
switch (d_selectionId) {
- case SELECTION_ID_CLEAR_CACHE: {
+ case SELECTION_ID_CLEAR_CACHE: {
d_clearCache.object().~ClearCache();
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
d_selectionId = SELECTION_ID_UNDEFINED;
@@ -11254,23 +12424,24 @@ void DomainResolverCommand::reset()
int DomainResolverCommand::makeSelection(int selectionId)
{
switch (selectionId) {
- case SELECTION_ID_CLEAR_CACHE: {
+ case SELECTION_ID_CLEAR_CACHE: {
makeClearCache();
- } break;
- case SELECTION_ID_UNDEFINED: {
+ } break;
+ case SELECTION_ID_UNDEFINED: {
reset();
- } break;
- default: return -1;
+ } break;
+ default:
+ return -1;
}
return 0;
}
-int DomainResolverCommand::makeSelection(const char* name, int nameLength)
+int DomainResolverCommand::makeSelection(const char *name, int nameLength)
{
- const bdlat_SelectionInfo* selectionInfo = lookupSelectionInfo(name,
- nameLength);
+ const bdlat_SelectionInfo *selectionInfo =
+ lookupSelectionInfo(name, nameLength);
if (0 == selectionInfo) {
- return -1;
+ return -1;
}
return makeSelection(selectionInfo->d_id);
@@ -11283,7 +12454,8 @@ ClearCache& DomainResolverCommand::makeClearCache()
}
else {
reset();
- new (d_clearCache.buffer()) ClearCache(d_allocator_p);
+ new (d_clearCache.buffer())
+ ClearCache(d_allocator_p);
d_selectionId = SELECTION_ID_CLEAR_CACHE;
}
@@ -11297,15 +12469,16 @@ ClearCache& DomainResolverCommand::makeClearCache(const ClearCache& value)
}
else {
reset();
- new (d_clearCache.buffer()) ClearCache(value, d_allocator_p);
+ new (d_clearCache.buffer())
+ ClearCache(value, d_allocator_p);
d_selectionId = SELECTION_ID_CLEAR_CACHE;
}
return d_clearCache.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ClearCache& DomainResolverCommand::makeClearCache(ClearCache&& value)
{
if (SELECTION_ID_CLEAR_CACHE == d_selectionId) {
@@ -11314,7 +12487,7 @@ ClearCache& DomainResolverCommand::makeClearCache(ClearCache&& value)
else {
reset();
new (d_clearCache.buffer())
- ClearCache(bsl::move(value), d_allocator_p);
+ ClearCache(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_CLEAR_CACHE;
}
@@ -11324,109 +12497,137 @@ ClearCache& DomainResolverCommand::makeClearCache(ClearCache&& value)
// ACCESSORS
-bsl::ostream& DomainResolverCommand::print(bsl::ostream& stream,
- int level,
- int spacesPerLevel) const
+bsl::ostream& DomainResolverCommand::print(
+ bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
switch (d_selectionId) {
- case SELECTION_ID_CLEAR_CACHE: {
+ case SELECTION_ID_CLEAR_CACHE: {
printer.printAttribute("clearCache", d_clearCache.object());
- } break;
- default: stream << "SELECTION UNDEFINED\n";
+ } break;
+ default:
+ stream << "SELECTION UNDEFINED\n";
}
printer.end();
return stream;
}
-const char* DomainResolverCommand::selectionName() const
+
+const char *DomainResolverCommand::selectionName() const
{
switch (d_selectionId) {
- case SELECTION_ID_CLEAR_CACHE:
+ case SELECTION_ID_CLEAR_CACHE:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_CLEAR_CACHE].name();
- default:
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
return "(* UNDEFINED *)";
}
}
-// ----------------------
-// class FileStoreSummary
-// ----------------------
+ // ----------------------
+ // class FileStoreSummary
+ // ----------------------
// CONSTANTS
const char FileStoreSummary::CLASS_NAME[] = "FileStoreSummary";
const bdlat_AttributeInfo FileStoreSummary::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_PRIMARY_NODE_DESCRIPTION,
- "primaryNodeDescription",
- sizeof("primaryNodeDescription") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_PRIMARY_LEASE_ID,
- "primaryLeaseId",
- sizeof("primaryLeaseId") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_SEQUENCE_NUM,
- "sequenceNum",
- sizeof("sequenceNum") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_IS_AVAILABLE,
- "isAvailable",
- sizeof("isAvailable") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_FILE_SETS,
- "fileSets",
- sizeof("fileSets") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {ATTRIBUTE_ID_ACTIVE_FILE_SET,
- "activeFileSet",
- sizeof("activeFileSet") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {ATTRIBUTE_ID_TOTAL_MAPPED_BYTES,
- "totalMappedBytes",
- sizeof("totalMappedBytes") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_NUM_OUTSTANDING_RECORDS,
- "numOutstandingRecords",
- sizeof("numOutstandingRecords") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_NUM_UNRECEIPTED_MESSAGES,
- "numUnreceiptedMessages",
- sizeof("numUnreceiptedMessages") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_NAGLE_PACKET_COUNT,
- "naglePacketCount",
- sizeof("naglePacketCount") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_STORAGE_CONTENT,
- "storageContent",
- sizeof("storageContent") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ ATTRIBUTE_ID_PRIMARY_NODE_DESCRIPTION,
+ "primaryNodeDescription",
+ sizeof("primaryNodeDescription") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_PRIMARY_LEASE_ID,
+ "primaryLeaseId",
+ sizeof("primaryLeaseId") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_SEQUENCE_NUM,
+ "sequenceNum",
+ sizeof("sequenceNum") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_IS_AVAILABLE,
+ "isAvailable",
+ sizeof("isAvailable") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_FILE_SETS,
+ "fileSets",
+ sizeof("fileSets") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ ATTRIBUTE_ID_ACTIVE_FILE_SET,
+ "activeFileSet",
+ sizeof("activeFileSet") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ ATTRIBUTE_ID_TOTAL_MAPPED_BYTES,
+ "totalMappedBytes",
+ sizeof("totalMappedBytes") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_NUM_OUTSTANDING_RECORDS,
+ "numOutstandingRecords",
+ sizeof("numOutstandingRecords") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_NUM_UNRECEIPTED_MESSAGES,
+ "numUnreceiptedMessages",
+ sizeof("numUnreceiptedMessages") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_NAGLE_PACKET_COUNT,
+ "naglePacketCount",
+ sizeof("naglePacketCount") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_STORAGE_CONTENT,
+ "storageContent",
+ sizeof("storageContent") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo*
-FileStoreSummary::lookupAttributeInfo(const char* name, int nameLength)
+const bdlat_AttributeInfo *FileStoreSummary::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 11; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- FileStoreSummary::ATTRIBUTE_INFO_ARRAY[i];
+ FileStoreSummary::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -11434,38 +12635,39 @@ FileStoreSummary::lookupAttributeInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_AttributeInfo* FileStoreSummary::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *FileStoreSummary::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_PRIMARY_NODE_DESCRIPTION:
+ case ATTRIBUTE_ID_PRIMARY_NODE_DESCRIPTION:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_NODE_DESCRIPTION];
- case ATTRIBUTE_ID_PRIMARY_LEASE_ID:
+ case ATTRIBUTE_ID_PRIMARY_LEASE_ID:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_LEASE_ID];
- case ATTRIBUTE_ID_SEQUENCE_NUM:
+ case ATTRIBUTE_ID_SEQUENCE_NUM:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SEQUENCE_NUM];
- case ATTRIBUTE_ID_IS_AVAILABLE:
+ case ATTRIBUTE_ID_IS_AVAILABLE:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_AVAILABLE];
- case ATTRIBUTE_ID_FILE_SETS:
+ case ATTRIBUTE_ID_FILE_SETS:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_FILE_SETS];
- case ATTRIBUTE_ID_ACTIVE_FILE_SET:
+ case ATTRIBUTE_ID_ACTIVE_FILE_SET:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ACTIVE_FILE_SET];
- case ATTRIBUTE_ID_TOTAL_MAPPED_BYTES:
+ case ATTRIBUTE_ID_TOTAL_MAPPED_BYTES:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_TOTAL_MAPPED_BYTES];
- case ATTRIBUTE_ID_NUM_OUTSTANDING_RECORDS:
+ case ATTRIBUTE_ID_NUM_OUTSTANDING_RECORDS:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_OUTSTANDING_RECORDS];
- case ATTRIBUTE_ID_NUM_UNRECEIPTED_MESSAGES:
+ case ATTRIBUTE_ID_NUM_UNRECEIPTED_MESSAGES:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_UNRECEIPTED_MESSAGES];
- case ATTRIBUTE_ID_NAGLE_PACKET_COUNT:
+ case ATTRIBUTE_ID_NAGLE_PACKET_COUNT:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAGLE_PACKET_COUNT];
- case ATTRIBUTE_ID_STORAGE_CONTENT:
+ case ATTRIBUTE_ID_STORAGE_CONTENT:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STORAGE_CONTENT];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-FileStoreSummary::FileStoreSummary(bslma::Allocator* basicAllocator)
+FileStoreSummary::FileStoreSummary(bslma::Allocator *basicAllocator)
: d_sequenceNum()
, d_totalMappedBytes()
, d_fileSets(basicAllocator)
@@ -11481,7 +12683,7 @@ FileStoreSummary::FileStoreSummary(bslma::Allocator* basicAllocator)
}
FileStoreSummary::FileStoreSummary(const FileStoreSummary& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_sequenceNum(original.d_sequenceNum)
, d_totalMappedBytes(original.d_totalMappedBytes)
, d_fileSets(original.d_fileSets, basicAllocator)
@@ -11496,30 +12698,29 @@ FileStoreSummary::FileStoreSummary(const FileStoreSummary& original,
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
FileStoreSummary::FileStoreSummary(FileStoreSummary&& original) noexcept
-: d_sequenceNum(bsl::move(original.d_sequenceNum)),
- d_totalMappedBytes(bsl::move(original.d_totalMappedBytes)),
- d_fileSets(bsl::move(original.d_fileSets)),
- d_primaryNodeDescription(bsl::move(original.d_primaryNodeDescription)),
- d_storageContent(bsl::move(original.d_storageContent)),
- d_activeFileSet(bsl::move(original.d_activeFileSet)),
- d_primaryLeaseId(bsl::move(original.d_primaryLeaseId)),
- d_numOutstandingRecords(bsl::move(original.d_numOutstandingRecords)),
- d_numUnreceiptedMessages(bsl::move(original.d_numUnreceiptedMessages)),
- d_naglePacketCount(bsl::move(original.d_naglePacketCount)),
- d_isAvailable(bsl::move(original.d_isAvailable))
+: d_sequenceNum(bsl::move(original.d_sequenceNum))
+, d_totalMappedBytes(bsl::move(original.d_totalMappedBytes))
+, d_fileSets(bsl::move(original.d_fileSets))
+, d_primaryNodeDescription(bsl::move(original.d_primaryNodeDescription))
+, d_storageContent(bsl::move(original.d_storageContent))
+, d_activeFileSet(bsl::move(original.d_activeFileSet))
+, d_primaryLeaseId(bsl::move(original.d_primaryLeaseId))
+, d_numOutstandingRecords(bsl::move(original.d_numOutstandingRecords))
+, d_numUnreceiptedMessages(bsl::move(original.d_numUnreceiptedMessages))
+, d_naglePacketCount(bsl::move(original.d_naglePacketCount))
+, d_isAvailable(bsl::move(original.d_isAvailable))
{
}
FileStoreSummary::FileStoreSummary(FileStoreSummary&& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_sequenceNum(bsl::move(original.d_sequenceNum))
, d_totalMappedBytes(bsl::move(original.d_totalMappedBytes))
, d_fileSets(bsl::move(original.d_fileSets), basicAllocator)
-, d_primaryNodeDescription(bsl::move(original.d_primaryNodeDescription),
- basicAllocator)
+, d_primaryNodeDescription(bsl::move(original.d_primaryNodeDescription), basicAllocator)
, d_storageContent(bsl::move(original.d_storageContent), basicAllocator)
, d_activeFileSet(bsl::move(original.d_activeFileSet))
, d_primaryLeaseId(bsl::move(original.d_primaryLeaseId))
@@ -11537,41 +12738,43 @@ FileStoreSummary::~FileStoreSummary()
// MANIPULATORS
-FileStoreSummary& FileStoreSummary::operator=(const FileStoreSummary& rhs)
+FileStoreSummary&
+FileStoreSummary::operator=(const FileStoreSummary& rhs)
{
if (this != &rhs) {
d_primaryNodeDescription = rhs.d_primaryNodeDescription;
- d_primaryLeaseId = rhs.d_primaryLeaseId;
- d_sequenceNum = rhs.d_sequenceNum;
- d_isAvailable = rhs.d_isAvailable;
- d_fileSets = rhs.d_fileSets;
- d_activeFileSet = rhs.d_activeFileSet;
- d_totalMappedBytes = rhs.d_totalMappedBytes;
- d_numOutstandingRecords = rhs.d_numOutstandingRecords;
+ d_primaryLeaseId = rhs.d_primaryLeaseId;
+ d_sequenceNum = rhs.d_sequenceNum;
+ d_isAvailable = rhs.d_isAvailable;
+ d_fileSets = rhs.d_fileSets;
+ d_activeFileSet = rhs.d_activeFileSet;
+ d_totalMappedBytes = rhs.d_totalMappedBytes;
+ d_numOutstandingRecords = rhs.d_numOutstandingRecords;
d_numUnreceiptedMessages = rhs.d_numUnreceiptedMessages;
- d_naglePacketCount = rhs.d_naglePacketCount;
- d_storageContent = rhs.d_storageContent;
+ d_naglePacketCount = rhs.d_naglePacketCount;
+ d_storageContent = rhs.d_storageContent;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-FileStoreSummary& FileStoreSummary::operator=(FileStoreSummary&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+FileStoreSummary&
+FileStoreSummary::operator=(FileStoreSummary&& rhs)
{
if (this != &rhs) {
d_primaryNodeDescription = bsl::move(rhs.d_primaryNodeDescription);
- d_primaryLeaseId = bsl::move(rhs.d_primaryLeaseId);
- d_sequenceNum = bsl::move(rhs.d_sequenceNum);
- d_isAvailable = bsl::move(rhs.d_isAvailable);
- d_fileSets = bsl::move(rhs.d_fileSets);
- d_activeFileSet = bsl::move(rhs.d_activeFileSet);
- d_totalMappedBytes = bsl::move(rhs.d_totalMappedBytes);
- d_numOutstandingRecords = bsl::move(rhs.d_numOutstandingRecords);
+ d_primaryLeaseId = bsl::move(rhs.d_primaryLeaseId);
+ d_sequenceNum = bsl::move(rhs.d_sequenceNum);
+ d_isAvailable = bsl::move(rhs.d_isAvailable);
+ d_fileSets = bsl::move(rhs.d_fileSets);
+ d_activeFileSet = bsl::move(rhs.d_activeFileSet);
+ d_totalMappedBytes = bsl::move(rhs.d_totalMappedBytes);
+ d_numOutstandingRecords = bsl::move(rhs.d_numOutstandingRecords);
d_numUnreceiptedMessages = bsl::move(rhs.d_numUnreceiptedMessages);
- d_naglePacketCount = bsl::move(rhs.d_naglePacketCount);
- d_storageContent = bsl::move(rhs.d_storageContent);
+ d_naglePacketCount = bsl::move(rhs.d_naglePacketCount);
+ d_storageContent = bsl::move(rhs.d_storageContent);
}
return *this;
@@ -11601,48 +12804,54 @@ bsl::ostream& FileStoreSummary::print(bsl::ostream& stream,
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
- printer.printAttribute("primaryNodeDescription",
- this->primaryNodeDescription());
+ printer.printAttribute("primaryNodeDescription", this->primaryNodeDescription());
printer.printAttribute("primaryLeaseId", this->primaryLeaseId());
printer.printAttribute("sequenceNum", this->sequenceNum());
printer.printAttribute("isAvailable", this->isAvailable());
printer.printAttribute("fileSets", this->fileSets());
printer.printAttribute("activeFileSet", this->activeFileSet());
printer.printAttribute("totalMappedBytes", this->totalMappedBytes());
- printer.printAttribute("numOutstandingRecords",
- this->numOutstandingRecords());
- printer.printAttribute("numUnreceiptedMessages",
- this->numUnreceiptedMessages());
+ printer.printAttribute("numOutstandingRecords", this->numOutstandingRecords());
+ printer.printAttribute("numUnreceiptedMessages", this->numUnreceiptedMessages());
printer.printAttribute("naglePacketCount", this->naglePacketCount());
printer.printAttribute("storageContent", this->storageContent());
printer.end();
return stream;
}
-// ----------------
-// class GetTunable
-// ----------------
+
+
+ // ----------------
+ // class GetTunable
+ // ----------------
// CONSTANTS
const char GetTunable::CLASS_NAME[] = "GetTunable";
const bdlat_AttributeInfo GetTunable::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_NAME,
- "name",
- sizeof("name") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_CHOICE,
- "Choice",
- sizeof("Choice") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT | bdlat_FormattingMode::e_UNTAGGED}};
+ {
+ ATTRIBUTE_ID_NAME,
+ "name",
+ sizeof("name") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_CHOICE,
+ "Choice",
+ sizeof("Choice") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ | bdlat_FormattingMode::e_UNTAGGED
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* GetTunable::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *GetTunable::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
if (bdlb::String::areEqualCaseless("all", name, nameLength)) {
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE];
@@ -11654,10 +12863,11 @@ const bdlat_AttributeInfo* GetTunable::lookupAttributeInfo(const char* name,
for (int i = 0; i < 2; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- GetTunable::ATTRIBUTE_INFO_ARRAY[i];
+ GetTunable::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -11665,40 +12875,43 @@ const bdlat_AttributeInfo* GetTunable::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* GetTunable::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *GetTunable::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_NAME: return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME];
- case ATTRIBUTE_ID_CHOICE:
+ case ATTRIBUTE_ID_NAME:
+ return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME];
+ case ATTRIBUTE_ID_CHOICE:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-GetTunable::GetTunable(bslma::Allocator* basicAllocator)
+GetTunable::GetTunable(bslma::Allocator *basicAllocator)
: d_name(basicAllocator)
, d_choice()
{
}
GetTunable::GetTunable(const GetTunable& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_name(original.d_name, basicAllocator)
, d_choice(original.d_choice)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
GetTunable::GetTunable(GetTunable&& original) noexcept
-: d_name(bsl::move(original.d_name)),
- d_choice(bsl::move(original.d_choice))
+: d_name(bsl::move(original.d_name))
+, d_choice(bsl::move(original.d_choice))
{
}
-GetTunable::GetTunable(GetTunable&& original, bslma::Allocator* basicAllocator)
+GetTunable::GetTunable(GetTunable&& original,
+ bslma::Allocator *basicAllocator)
: d_name(bsl::move(original.d_name), basicAllocator)
, d_choice(bsl::move(original.d_choice))
{
@@ -11711,22 +12924,24 @@ GetTunable::~GetTunable()
// MANIPULATORS
-GetTunable& GetTunable::operator=(const GetTunable& rhs)
+GetTunable&
+GetTunable::operator=(const GetTunable& rhs)
{
if (this != &rhs) {
- d_name = rhs.d_name;
+ d_name = rhs.d_name;
d_choice = rhs.d_choice;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-GetTunable& GetTunable::operator=(GetTunable&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+GetTunable&
+GetTunable::operator=(GetTunable&& rhs)
{
if (this != &rhs) {
- d_name = bsl::move(rhs.d_name);
+ d_name = bsl::move(rhs.d_name);
d_choice = bsl::move(rhs.d_choice);
}
@@ -11742,8 +12957,9 @@ void GetTunable::reset()
// ACCESSORS
-bsl::ostream&
-GetTunable::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& GetTunable::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
@@ -11753,47 +12969,60 @@ GetTunable::print(bsl::ostream& stream, int level, int spacesPerLevel) const
return stream;
}
-// --------------------------
-// class MessageGroupIdHelper
-// --------------------------
+
+
+ // --------------------------
+ // class MessageGroupIdHelper
+ // --------------------------
// CONSTANTS
const char MessageGroupIdHelper::CLASS_NAME[] = "MessageGroupIdHelper";
const bdlat_AttributeInfo MessageGroupIdHelper::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_TIMEOUT_NANOSECONDS,
- "timeoutNanoseconds",
- sizeof("timeoutNanoseconds") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_MAX_MSG_GROUP_IDS,
- "maxMsgGroupIds",
- sizeof("maxMsgGroupIds") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_IS_REBALANCE_ON,
- "isRebalanceOn",
- sizeof("isRebalanceOn") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_STATUS,
- "status",
- sizeof("status") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ ATTRIBUTE_ID_TIMEOUT_NANOSECONDS,
+ "timeoutNanoseconds",
+ sizeof("timeoutNanoseconds") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_MAX_MSG_GROUP_IDS,
+ "maxMsgGroupIds",
+ sizeof("maxMsgGroupIds") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_IS_REBALANCE_ON,
+ "isRebalanceOn",
+ sizeof("isRebalanceOn") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_STATUS,
+ "status",
+ sizeof("status") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo*
-MessageGroupIdHelper::lookupAttributeInfo(const char* name, int nameLength)
+const bdlat_AttributeInfo *MessageGroupIdHelper::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 4; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- MessageGroupIdHelper::ATTRIBUTE_INFO_ARRAY[i];
+ MessageGroupIdHelper::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -11801,24 +13030,25 @@ MessageGroupIdHelper::lookupAttributeInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_AttributeInfo* MessageGroupIdHelper::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *MessageGroupIdHelper::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_TIMEOUT_NANOSECONDS:
+ case ATTRIBUTE_ID_TIMEOUT_NANOSECONDS:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_TIMEOUT_NANOSECONDS];
- case ATTRIBUTE_ID_MAX_MSG_GROUP_IDS:
+ case ATTRIBUTE_ID_MAX_MSG_GROUP_IDS:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MAX_MSG_GROUP_IDS];
- case ATTRIBUTE_ID_IS_REBALANCE_ON:
+ case ATTRIBUTE_ID_IS_REBALANCE_ON:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_REBALANCE_ON];
- case ATTRIBUTE_ID_STATUS:
+ case ATTRIBUTE_ID_STATUS:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STATUS];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-MessageGroupIdHelper::MessageGroupIdHelper(bslma::Allocator* basicAllocator)
+MessageGroupIdHelper::MessageGroupIdHelper(bslma::Allocator *basicAllocator)
: d_timeoutNanoseconds()
, d_status(basicAllocator)
, d_maxMsgGroupIds()
@@ -11826,9 +13056,8 @@ MessageGroupIdHelper::MessageGroupIdHelper(bslma::Allocator* basicAllocator)
{
}
-MessageGroupIdHelper::MessageGroupIdHelper(
- const MessageGroupIdHelper& original,
- bslma::Allocator* basicAllocator)
+MessageGroupIdHelper::MessageGroupIdHelper(const MessageGroupIdHelper& original,
+ bslma::Allocator *basicAllocator)
: d_timeoutNanoseconds(original.d_timeoutNanoseconds)
, d_status(original.d_status, basicAllocator)
, d_maxMsgGroupIds(original.d_maxMsgGroupIds)
@@ -11836,18 +13065,18 @@ MessageGroupIdHelper::MessageGroupIdHelper(
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-MessageGroupIdHelper::MessageGroupIdHelper(MessageGroupIdHelper&& original)
- noexcept : d_timeoutNanoseconds(bsl::move(original.d_timeoutNanoseconds)),
- d_status(bsl::move(original.d_status)),
- d_maxMsgGroupIds(bsl::move(original.d_maxMsgGroupIds)),
- d_isRebalanceOn(bsl::move(original.d_isRebalanceOn))
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+MessageGroupIdHelper::MessageGroupIdHelper(MessageGroupIdHelper&& original) noexcept
+: d_timeoutNanoseconds(bsl::move(original.d_timeoutNanoseconds))
+, d_status(bsl::move(original.d_status))
+, d_maxMsgGroupIds(bsl::move(original.d_maxMsgGroupIds))
+, d_isRebalanceOn(bsl::move(original.d_isRebalanceOn))
{
}
MessageGroupIdHelper::MessageGroupIdHelper(MessageGroupIdHelper&& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_timeoutNanoseconds(bsl::move(original.d_timeoutNanoseconds))
, d_status(bsl::move(original.d_status), basicAllocator)
, d_maxMsgGroupIds(bsl::move(original.d_maxMsgGroupIds))
@@ -11867,24 +13096,24 @@ MessageGroupIdHelper::operator=(const MessageGroupIdHelper& rhs)
{
if (this != &rhs) {
d_timeoutNanoseconds = rhs.d_timeoutNanoseconds;
- d_maxMsgGroupIds = rhs.d_maxMsgGroupIds;
- d_isRebalanceOn = rhs.d_isRebalanceOn;
- d_status = rhs.d_status;
+ d_maxMsgGroupIds = rhs.d_maxMsgGroupIds;
+ d_isRebalanceOn = rhs.d_isRebalanceOn;
+ d_status = rhs.d_status;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
MessageGroupIdHelper&
MessageGroupIdHelper::operator=(MessageGroupIdHelper&& rhs)
{
if (this != &rhs) {
d_timeoutNanoseconds = bsl::move(rhs.d_timeoutNanoseconds);
- d_maxMsgGroupIds = bsl::move(rhs.d_maxMsgGroupIds);
- d_isRebalanceOn = bsl::move(rhs.d_isRebalanceOn);
- d_status = bsl::move(rhs.d_status);
+ d_maxMsgGroupIds = bsl::move(rhs.d_maxMsgGroupIds);
+ d_isRebalanceOn = bsl::move(rhs.d_isRebalanceOn);
+ d_status = bsl::move(rhs.d_status);
}
return *this;
@@ -11915,32 +13144,39 @@ bsl::ostream& MessageGroupIdHelper::print(bsl::ostream& stream,
return stream;
}
-// ------------------
-// class NodeStatuses
-// ------------------
+
+
+ // ------------------
+ // class NodeStatuses
+ // ------------------
// CONSTANTS
const char NodeStatuses::CLASS_NAME[] = "NodeStatuses";
const bdlat_AttributeInfo NodeStatuses::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_NODES,
- "nodes",
- sizeof("nodes") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ ATTRIBUTE_ID_NODES,
+ "nodes",
+ sizeof("nodes") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* NodeStatuses::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *NodeStatuses::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 1; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- NodeStatuses::ATTRIBUTE_INFO_ARRAY[i];
+ NodeStatuses::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -11948,37 +13184,38 @@ const bdlat_AttributeInfo* NodeStatuses::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* NodeStatuses::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *NodeStatuses::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_NODES:
+ case ATTRIBUTE_ID_NODES:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NODES];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-NodeStatuses::NodeStatuses(bslma::Allocator* basicAllocator)
+NodeStatuses::NodeStatuses(bslma::Allocator *basicAllocator)
: d_nodes(basicAllocator)
{
}
NodeStatuses::NodeStatuses(const NodeStatuses& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_nodes(original.d_nodes, basicAllocator)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
NodeStatuses::NodeStatuses(NodeStatuses&& original) noexcept
: d_nodes(bsl::move(original.d_nodes))
{
}
-NodeStatuses::NodeStatuses(NodeStatuses&& original,
- bslma::Allocator* basicAllocator)
+NodeStatuses::NodeStatuses(NodeStatuses&& original,
+ bslma::Allocator *basicAllocator)
: d_nodes(bsl::move(original.d_nodes), basicAllocator)
{
}
@@ -11990,7 +13227,8 @@ NodeStatuses::~NodeStatuses()
// MANIPULATORS
-NodeStatuses& NodeStatuses::operator=(const NodeStatuses& rhs)
+NodeStatuses&
+NodeStatuses::operator=(const NodeStatuses& rhs)
{
if (this != &rhs) {
d_nodes = rhs.d_nodes;
@@ -11999,9 +13237,10 @@ NodeStatuses& NodeStatuses::operator=(const NodeStatuses& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-NodeStatuses& NodeStatuses::operator=(NodeStatuses&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+NodeStatuses&
+NodeStatuses::operator=(NodeStatuses&& rhs)
{
if (this != &rhs) {
d_nodes = bsl::move(rhs.d_nodes);
@@ -12018,8 +13257,9 @@ void NodeStatuses::reset()
// ACCESSORS
-bsl::ostream&
-NodeStatuses::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& NodeStatuses::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
@@ -12028,32 +13268,39 @@ NodeStatuses::print(bsl::ostream& stream, int level, int spacesPerLevel) const
return stream;
}
-// --------------------
-// class PartitionsInfo
-// --------------------
+
+
+ // --------------------
+ // class PartitionsInfo
+ // --------------------
// CONSTANTS
const char PartitionsInfo::CLASS_NAME[] = "PartitionsInfo";
const bdlat_AttributeInfo PartitionsInfo::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_PARTITIONS,
- "partitions",
- sizeof("partitions") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ ATTRIBUTE_ID_PARTITIONS,
+ "partitions",
+ sizeof("partitions") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo*
-PartitionsInfo::lookupAttributeInfo(const char* name, int nameLength)
+const bdlat_AttributeInfo *PartitionsInfo::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 1; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- PartitionsInfo::ATTRIBUTE_INFO_ARRAY[i];
+ PartitionsInfo::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -12061,37 +13308,38 @@ PartitionsInfo::lookupAttributeInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_AttributeInfo* PartitionsInfo::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *PartitionsInfo::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_PARTITIONS:
+ case ATTRIBUTE_ID_PARTITIONS:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITIONS];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-PartitionsInfo::PartitionsInfo(bslma::Allocator* basicAllocator)
+PartitionsInfo::PartitionsInfo(bslma::Allocator *basicAllocator)
: d_partitions(basicAllocator)
{
}
PartitionsInfo::PartitionsInfo(const PartitionsInfo& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_partitions(original.d_partitions, basicAllocator)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
PartitionsInfo::PartitionsInfo(PartitionsInfo&& original) noexcept
: d_partitions(bsl::move(original.d_partitions))
{
}
-PartitionsInfo::PartitionsInfo(PartitionsInfo&& original,
- bslma::Allocator* basicAllocator)
+PartitionsInfo::PartitionsInfo(PartitionsInfo&& original,
+ bslma::Allocator *basicAllocator)
: d_partitions(bsl::move(original.d_partitions), basicAllocator)
{
}
@@ -12103,7 +13351,8 @@ PartitionsInfo::~PartitionsInfo()
// MANIPULATORS
-PartitionsInfo& PartitionsInfo::operator=(const PartitionsInfo& rhs)
+PartitionsInfo&
+PartitionsInfo::operator=(const PartitionsInfo& rhs)
{
if (this != &rhs) {
d_partitions = rhs.d_partitions;
@@ -12112,9 +13361,10 @@ PartitionsInfo& PartitionsInfo::operator=(const PartitionsInfo& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-PartitionsInfo& PartitionsInfo::operator=(PartitionsInfo&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+PartitionsInfo&
+PartitionsInfo::operator=(PartitionsInfo&& rhs)
{
if (this != &rhs) {
d_partitions = bsl::move(rhs.d_partitions);
@@ -12142,33 +13392,46 @@ bsl::ostream& PartitionsInfo::print(bsl::ostream& stream,
return stream;
}
-// -------------------
-// class PriorityGroup
-// -------------------
+
+
+ // -------------------
+ // class PriorityGroup
+ // -------------------
// CONSTANTS
const char PriorityGroup::CLASS_NAME[] = "PriorityGroup";
const bdlat_AttributeInfo PriorityGroup::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_ID, "id", sizeof("id") - 1, "", bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_HIGHEST_SUBSCRIPTIONS,
- "highestSubscriptions",
- sizeof("highestSubscriptions") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ ATTRIBUTE_ID_ID,
+ "id",
+ sizeof("id") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_HIGHEST_SUBSCRIPTIONS,
+ "highestSubscriptions",
+ sizeof("highestSubscriptions") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* PriorityGroup::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *PriorityGroup::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 2; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- PriorityGroup::ATTRIBUTE_INFO_ARRAY[i];
+ PriorityGroup::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -12176,43 +13439,44 @@ const bdlat_AttributeInfo* PriorityGroup::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* PriorityGroup::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *PriorityGroup::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_ID: return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ID];
- case ATTRIBUTE_ID_HIGHEST_SUBSCRIPTIONS:
+ case ATTRIBUTE_ID_ID:
+ return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ID];
+ case ATTRIBUTE_ID_HIGHEST_SUBSCRIPTIONS:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_HIGHEST_SUBSCRIPTIONS];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-PriorityGroup::PriorityGroup(bslma::Allocator* basicAllocator)
+PriorityGroup::PriorityGroup(bslma::Allocator *basicAllocator)
: d_highestSubscriptions(basicAllocator)
, d_id()
{
}
PriorityGroup::PriorityGroup(const PriorityGroup& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_highestSubscriptions(original.d_highestSubscriptions, basicAllocator)
, d_id(original.d_id)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
PriorityGroup::PriorityGroup(PriorityGroup&& original) noexcept
-: d_highestSubscriptions(bsl::move(original.d_highestSubscriptions)),
- d_id(bsl::move(original.d_id))
+: d_highestSubscriptions(bsl::move(original.d_highestSubscriptions))
+, d_id(bsl::move(original.d_id))
{
}
-PriorityGroup::PriorityGroup(PriorityGroup&& original,
- bslma::Allocator* basicAllocator)
-: d_highestSubscriptions(bsl::move(original.d_highestSubscriptions),
- basicAllocator)
+PriorityGroup::PriorityGroup(PriorityGroup&& original,
+ bslma::Allocator *basicAllocator)
+: d_highestSubscriptions(bsl::move(original.d_highestSubscriptions), basicAllocator)
, d_id(bsl::move(original.d_id))
{
}
@@ -12224,22 +13488,24 @@ PriorityGroup::~PriorityGroup()
// MANIPULATORS
-PriorityGroup& PriorityGroup::operator=(const PriorityGroup& rhs)
+PriorityGroup&
+PriorityGroup::operator=(const PriorityGroup& rhs)
{
if (this != &rhs) {
- d_id = rhs.d_id;
+ d_id = rhs.d_id;
d_highestSubscriptions = rhs.d_highestSubscriptions;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-PriorityGroup& PriorityGroup::operator=(PriorityGroup&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+PriorityGroup&
+PriorityGroup::operator=(PriorityGroup&& rhs)
{
if (this != &rhs) {
- d_id = bsl::move(rhs.d_id);
+ d_id = bsl::move(rhs.d_id);
d_highestSubscriptions = bsl::move(rhs.d_highestSubscriptions);
}
@@ -12255,44 +13521,51 @@ void PriorityGroup::reset()
// ACCESSORS
-bsl::ostream&
-PriorityGroup::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& PriorityGroup::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
printer.printAttribute("id", this->id());
- printer.printAttribute("highestSubscriptions",
- this->highestSubscriptions());
+ printer.printAttribute("highestSubscriptions", this->highestSubscriptions());
printer.end();
return stream;
}
-// ------------------
-// class PurgedQueues
-// ------------------
+
+
+ // ------------------
+ // class PurgedQueues
+ // ------------------
// CONSTANTS
const char PurgedQueues::CLASS_NAME[] = "PurgedQueues";
const bdlat_AttributeInfo PurgedQueues::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_QUEUES,
- "queues",
- sizeof("queues") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ ATTRIBUTE_ID_QUEUES,
+ "queues",
+ sizeof("queues") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* PurgedQueues::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *PurgedQueues::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 1; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- PurgedQueues::ATTRIBUTE_INFO_ARRAY[i];
+ PurgedQueues::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -12300,37 +13573,38 @@ const bdlat_AttributeInfo* PurgedQueues::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* PurgedQueues::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *PurgedQueues::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_QUEUES:
+ case ATTRIBUTE_ID_QUEUES:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUES];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-PurgedQueues::PurgedQueues(bslma::Allocator* basicAllocator)
+PurgedQueues::PurgedQueues(bslma::Allocator *basicAllocator)
: d_queues(basicAllocator)
{
}
PurgedQueues::PurgedQueues(const PurgedQueues& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_queues(original.d_queues, basicAllocator)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
PurgedQueues::PurgedQueues(PurgedQueues&& original) noexcept
: d_queues(bsl::move(original.d_queues))
{
}
-PurgedQueues::PurgedQueues(PurgedQueues&& original,
- bslma::Allocator* basicAllocator)
+PurgedQueues::PurgedQueues(PurgedQueues&& original,
+ bslma::Allocator *basicAllocator)
: d_queues(bsl::move(original.d_queues), basicAllocator)
{
}
@@ -12342,7 +13616,8 @@ PurgedQueues::~PurgedQueues()
// MANIPULATORS
-PurgedQueues& PurgedQueues::operator=(const PurgedQueues& rhs)
+PurgedQueues&
+PurgedQueues::operator=(const PurgedQueues& rhs)
{
if (this != &rhs) {
d_queues = rhs.d_queues;
@@ -12351,9 +13626,10 @@ PurgedQueues& PurgedQueues::operator=(const PurgedQueues& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-PurgedQueues& PurgedQueues::operator=(PurgedQueues&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+PurgedQueues&
+PurgedQueues::operator=(PurgedQueues&& rhs)
{
if (this != &rhs) {
d_queues = bsl::move(rhs.d_queues);
@@ -12370,8 +13646,9 @@ void PurgedQueues::reset()
// ACCESSORS
-bsl::ostream&
-PurgedQueues::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& PurgedQueues::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
@@ -12380,52 +13657,67 @@ PurgedQueues::print(bsl::ostream& stream, int level, int spacesPerLevel) const
return stream;
}
-// --------------------------
-// class QueueHandleSubStream
-// --------------------------
+
+
+ // --------------------------
+ // class QueueHandleSubStream
+ // --------------------------
// CONSTANTS
const char QueueHandleSubStream::CLASS_NAME[] = "QueueHandleSubStream";
const bdlat_AttributeInfo QueueHandleSubStream::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_SUB_ID,
- "subId",
- sizeof("subId") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_APP_ID,
- "appId",
- sizeof("appId") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_PARAMETERS_JSON,
- "parametersJson",
- sizeof("parametersJson") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_UNCONFIRMED_MONITORS,
- "unconfirmedMonitors",
- sizeof("unconfirmedMonitors") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {ATTRIBUTE_ID_NUM_UNCONFIRMED_MESSAGES,
- "numUnconfirmedMessages",
- sizeof("numUnconfirmedMessages") - 1,
- "",
- bdlat_FormattingMode::e_DEC}};
+ {
+ ATTRIBUTE_ID_SUB_ID,
+ "subId",
+ sizeof("subId") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_APP_ID,
+ "appId",
+ sizeof("appId") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_PARAMETERS_JSON,
+ "parametersJson",
+ sizeof("parametersJson") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_UNCONFIRMED_MONITORS,
+ "unconfirmedMonitors",
+ sizeof("unconfirmedMonitors") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ ATTRIBUTE_ID_NUM_UNCONFIRMED_MESSAGES,
+ "numUnconfirmedMessages",
+ sizeof("numUnconfirmedMessages") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo*
-QueueHandleSubStream::lookupAttributeInfo(const char* name, int nameLength)
+const bdlat_AttributeInfo *QueueHandleSubStream::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 5; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- QueueHandleSubStream::ATTRIBUTE_INFO_ARRAY[i];
+ QueueHandleSubStream::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -12433,26 +13725,27 @@ QueueHandleSubStream::lookupAttributeInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_AttributeInfo* QueueHandleSubStream::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *QueueHandleSubStream::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_SUB_ID:
+ case ATTRIBUTE_ID_SUB_ID:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUB_ID];
- case ATTRIBUTE_ID_APP_ID:
+ case ATTRIBUTE_ID_APP_ID:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_ID];
- case ATTRIBUTE_ID_PARAMETERS_JSON:
+ case ATTRIBUTE_ID_PARAMETERS_JSON:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARAMETERS_JSON];
- case ATTRIBUTE_ID_UNCONFIRMED_MONITORS:
+ case ATTRIBUTE_ID_UNCONFIRMED_MONITORS:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_UNCONFIRMED_MONITORS];
- case ATTRIBUTE_ID_NUM_UNCONFIRMED_MESSAGES:
+ case ATTRIBUTE_ID_NUM_UNCONFIRMED_MESSAGES:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_UNCONFIRMED_MESSAGES];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-QueueHandleSubStream::QueueHandleSubStream(bslma::Allocator* basicAllocator)
+QueueHandleSubStream::QueueHandleSubStream(bslma::Allocator *basicAllocator)
: d_unconfirmedMonitors(basicAllocator)
, d_parametersJson(basicAllocator)
, d_numUnconfirmedMessages()
@@ -12461,9 +13754,8 @@ QueueHandleSubStream::QueueHandleSubStream(bslma::Allocator* basicAllocator)
{
}
-QueueHandleSubStream::QueueHandleSubStream(
- const QueueHandleSubStream& original,
- bslma::Allocator* basicAllocator)
+QueueHandleSubStream::QueueHandleSubStream(const QueueHandleSubStream& original,
+ bslma::Allocator *basicAllocator)
: d_unconfirmedMonitors(original.d_unconfirmedMonitors, basicAllocator)
, d_parametersJson(original.d_parametersJson, basicAllocator)
, d_numUnconfirmedMessages(original.d_numUnconfirmedMessages)
@@ -12472,22 +13764,20 @@ QueueHandleSubStream::QueueHandleSubStream(
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-QueueHandleSubStream::QueueHandleSubStream(
- QueueHandleSubStream&& original) noexcept
-: d_unconfirmedMonitors(bsl::move(original.d_unconfirmedMonitors)),
- d_parametersJson(bsl::move(original.d_parametersJson)),
- d_numUnconfirmedMessages(bsl::move(original.d_numUnconfirmedMessages)),
- d_appId(bsl::move(original.d_appId)),
- d_subId(bsl::move(original.d_subId))
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+QueueHandleSubStream::QueueHandleSubStream(QueueHandleSubStream&& original) noexcept
+: d_unconfirmedMonitors(bsl::move(original.d_unconfirmedMonitors))
+, d_parametersJson(bsl::move(original.d_parametersJson))
+, d_numUnconfirmedMessages(bsl::move(original.d_numUnconfirmedMessages))
+, d_appId(bsl::move(original.d_appId))
+, d_subId(bsl::move(original.d_subId))
{
}
QueueHandleSubStream::QueueHandleSubStream(QueueHandleSubStream&& original,
- bslma::Allocator* basicAllocator)
-: d_unconfirmedMonitors(bsl::move(original.d_unconfirmedMonitors),
- basicAllocator)
+ bslma::Allocator *basicAllocator)
+: d_unconfirmedMonitors(bsl::move(original.d_unconfirmedMonitors), basicAllocator)
, d_parametersJson(bsl::move(original.d_parametersJson), basicAllocator)
, d_numUnconfirmedMessages(bsl::move(original.d_numUnconfirmedMessages))
, d_appId(bsl::move(original.d_appId), basicAllocator)
@@ -12506,26 +13796,26 @@ QueueHandleSubStream&
QueueHandleSubStream::operator=(const QueueHandleSubStream& rhs)
{
if (this != &rhs) {
- d_subId = rhs.d_subId;
- d_appId = rhs.d_appId;
- d_parametersJson = rhs.d_parametersJson;
- d_unconfirmedMonitors = rhs.d_unconfirmedMonitors;
+ d_subId = rhs.d_subId;
+ d_appId = rhs.d_appId;
+ d_parametersJson = rhs.d_parametersJson;
+ d_unconfirmedMonitors = rhs.d_unconfirmedMonitors;
d_numUnconfirmedMessages = rhs.d_numUnconfirmedMessages;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
QueueHandleSubStream&
QueueHandleSubStream::operator=(QueueHandleSubStream&& rhs)
{
if (this != &rhs) {
- d_subId = bsl::move(rhs.d_subId);
- d_appId = bsl::move(rhs.d_appId);
- d_parametersJson = bsl::move(rhs.d_parametersJson);
- d_unconfirmedMonitors = bsl::move(rhs.d_unconfirmedMonitors);
+ d_subId = bsl::move(rhs.d_subId);
+ d_appId = bsl::move(rhs.d_appId);
+ d_parametersJson = bsl::move(rhs.d_parametersJson);
+ d_unconfirmedMonitors = bsl::move(rhs.d_unconfirmedMonitors);
d_numUnconfirmedMessages = bsl::move(rhs.d_numUnconfirmedMessages);
}
@@ -12554,38 +13844,44 @@ bsl::ostream& QueueHandleSubStream::print(bsl::ostream& stream,
printer.printAttribute("appId", this->appId());
printer.printAttribute("parametersJson", this->parametersJson());
printer.printAttribute("unconfirmedMonitors", this->unconfirmedMonitors());
- printer.printAttribute("numUnconfirmedMessages",
- this->numUnconfirmedMessages());
+ printer.printAttribute("numUnconfirmedMessages", this->numUnconfirmedMessages());
printer.end();
return stream;
}
-// -------------------
-// class QueueStatuses
-// -------------------
+
+
+ // -------------------
+ // class QueueStatuses
+ // -------------------
// CONSTANTS
const char QueueStatuses::CLASS_NAME[] = "QueueStatuses";
const bdlat_AttributeInfo QueueStatuses::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_QUEUE_STATUSES,
- "queueStatuses",
- sizeof("queueStatuses") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ ATTRIBUTE_ID_QUEUE_STATUSES,
+ "queueStatuses",
+ sizeof("queueStatuses") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* QueueStatuses::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *QueueStatuses::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 1; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- QueueStatuses::ATTRIBUTE_INFO_ARRAY[i];
+ QueueStatuses::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -12593,37 +13889,38 @@ const bdlat_AttributeInfo* QueueStatuses::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* QueueStatuses::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *QueueStatuses::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_QUEUE_STATUSES:
+ case ATTRIBUTE_ID_QUEUE_STATUSES:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_STATUSES];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-QueueStatuses::QueueStatuses(bslma::Allocator* basicAllocator)
+QueueStatuses::QueueStatuses(bslma::Allocator *basicAllocator)
: d_queueStatuses(basicAllocator)
{
}
QueueStatuses::QueueStatuses(const QueueStatuses& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_queueStatuses(original.d_queueStatuses, basicAllocator)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
QueueStatuses::QueueStatuses(QueueStatuses&& original) noexcept
: d_queueStatuses(bsl::move(original.d_queueStatuses))
{
}
-QueueStatuses::QueueStatuses(QueueStatuses&& original,
- bslma::Allocator* basicAllocator)
+QueueStatuses::QueueStatuses(QueueStatuses&& original,
+ bslma::Allocator *basicAllocator)
: d_queueStatuses(bsl::move(original.d_queueStatuses), basicAllocator)
{
}
@@ -12635,7 +13932,8 @@ QueueStatuses::~QueueStatuses()
// MANIPULATORS
-QueueStatuses& QueueStatuses::operator=(const QueueStatuses& rhs)
+QueueStatuses&
+QueueStatuses::operator=(const QueueStatuses& rhs)
{
if (this != &rhs) {
d_queueStatuses = rhs.d_queueStatuses;
@@ -12644,9 +13942,10 @@ QueueStatuses& QueueStatuses::operator=(const QueueStatuses& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-QueueStatuses& QueueStatuses::operator=(QueueStatuses&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+QueueStatuses&
+QueueStatuses::operator=(QueueStatuses&& rhs)
{
if (this != &rhs) {
d_queueStatuses = bsl::move(rhs.d_queueStatuses);
@@ -12663,8 +13962,9 @@ void QueueStatuses::reset()
// ACCESSORS
-bsl::ostream&
-QueueStatuses::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& QueueStatuses::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
@@ -12673,35 +13973,46 @@ QueueStatuses::print(bsl::ostream& stream, int level, int spacesPerLevel) const
return stream;
}
-// ----------------
-// class SetTunable
-// ----------------
+
+
+ // ----------------
+ // class SetTunable
+ // ----------------
// CONSTANTS
const char SetTunable::CLASS_NAME[] = "SetTunable";
const bdlat_AttributeInfo SetTunable::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_NAME,
- "name",
- sizeof("name") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_VALUE,
- "value",
- sizeof("value") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {ATTRIBUTE_ID_CHOICE,
- "Choice",
- sizeof("Choice") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT | bdlat_FormattingMode::e_UNTAGGED}};
+ {
+ ATTRIBUTE_ID_NAME,
+ "name",
+ sizeof("name") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_VALUE,
+ "value",
+ sizeof("value") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ ATTRIBUTE_ID_CHOICE,
+ "Choice",
+ sizeof("Choice") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ | bdlat_FormattingMode::e_UNTAGGED
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* SetTunable::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *SetTunable::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
if (bdlb::String::areEqualCaseless("all", name, nameLength)) {
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE];
@@ -12713,10 +14024,11 @@ const bdlat_AttributeInfo* SetTunable::lookupAttributeInfo(const char* name,
for (int i = 0; i < 3; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- SetTunable::ATTRIBUTE_INFO_ARRAY[i];
+ SetTunable::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -12724,21 +14036,23 @@ const bdlat_AttributeInfo* SetTunable::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* SetTunable::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *SetTunable::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_NAME: return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME];
- case ATTRIBUTE_ID_VALUE:
+ case ATTRIBUTE_ID_NAME:
+ return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME];
+ case ATTRIBUTE_ID_VALUE:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_VALUE];
- case ATTRIBUTE_ID_CHOICE:
+ case ATTRIBUTE_ID_CHOICE:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-SetTunable::SetTunable(bslma::Allocator* basicAllocator)
+SetTunable::SetTunable(bslma::Allocator *basicAllocator)
: d_name(basicAllocator)
, d_value(basicAllocator)
, d_choice()
@@ -12746,23 +14060,24 @@ SetTunable::SetTunable(bslma::Allocator* basicAllocator)
}
SetTunable::SetTunable(const SetTunable& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_name(original.d_name, basicAllocator)
, d_value(original.d_value, basicAllocator)
, d_choice(original.d_choice)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
SetTunable::SetTunable(SetTunable&& original) noexcept
-: d_name(bsl::move(original.d_name)),
- d_value(bsl::move(original.d_value)),
- d_choice(bsl::move(original.d_choice))
+: d_name(bsl::move(original.d_name))
+, d_value(bsl::move(original.d_value))
+, d_choice(bsl::move(original.d_choice))
{
}
-SetTunable::SetTunable(SetTunable&& original, bslma::Allocator* basicAllocator)
+SetTunable::SetTunable(SetTunable&& original,
+ bslma::Allocator *basicAllocator)
: d_name(bsl::move(original.d_name), basicAllocator)
, d_value(bsl::move(original.d_value), basicAllocator)
, d_choice(bsl::move(original.d_choice))
@@ -12776,24 +14091,26 @@ SetTunable::~SetTunable()
// MANIPULATORS
-SetTunable& SetTunable::operator=(const SetTunable& rhs)
+SetTunable&
+SetTunable::operator=(const SetTunable& rhs)
{
if (this != &rhs) {
- d_name = rhs.d_name;
- d_value = rhs.d_value;
+ d_name = rhs.d_name;
+ d_value = rhs.d_value;
d_choice = rhs.d_choice;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-SetTunable& SetTunable::operator=(SetTunable&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+SetTunable&
+SetTunable::operator=(SetTunable&& rhs)
{
if (this != &rhs) {
- d_name = bsl::move(rhs.d_name);
- d_value = bsl::move(rhs.d_value);
+ d_name = bsl::move(rhs.d_name);
+ d_value = bsl::move(rhs.d_value);
d_choice = bsl::move(rhs.d_choice);
}
@@ -12810,8 +14127,9 @@ void SetTunable::reset()
// ACCESSORS
-bsl::ostream&
-SetTunable::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& SetTunable::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
@@ -12822,37 +14140,46 @@ SetTunable::print(bsl::ostream& stream, int level, int spacesPerLevel) const
return stream;
}
-// -------------------
-// class StorageDomain
-// -------------------
+
+
+ // -------------------
+ // class StorageDomain
+ // -------------------
// CONSTANTS
const char StorageDomain::CLASS_NAME[] = "StorageDomain";
const bdlat_AttributeInfo StorageDomain::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_NAME,
- "name",
- sizeof("name") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_COMMAND,
- "command",
- sizeof("command") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ ATTRIBUTE_ID_NAME,
+ "name",
+ sizeof("name") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_COMMAND,
+ "command",
+ sizeof("command") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* StorageDomain::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *StorageDomain::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 2; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- StorageDomain::ATTRIBUTE_INFO_ARRAY[i];
+ StorageDomain::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -12860,41 +14187,43 @@ const bdlat_AttributeInfo* StorageDomain::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* StorageDomain::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *StorageDomain::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_NAME: return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME];
- case ATTRIBUTE_ID_COMMAND:
+ case ATTRIBUTE_ID_NAME:
+ return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME];
+ case ATTRIBUTE_ID_COMMAND:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-StorageDomain::StorageDomain(bslma::Allocator* basicAllocator)
+StorageDomain::StorageDomain(bslma::Allocator *basicAllocator)
: d_name(basicAllocator)
, d_command()
{
}
StorageDomain::StorageDomain(const StorageDomain& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_name(original.d_name, basicAllocator)
, d_command(original.d_command)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
StorageDomain::StorageDomain(StorageDomain&& original) noexcept
-: d_name(bsl::move(original.d_name)),
- d_command(bsl::move(original.d_command))
+: d_name(bsl::move(original.d_name))
+, d_command(bsl::move(original.d_command))
{
}
-StorageDomain::StorageDomain(StorageDomain&& original,
- bslma::Allocator* basicAllocator)
+StorageDomain::StorageDomain(StorageDomain&& original,
+ bslma::Allocator *basicAllocator)
: d_name(bsl::move(original.d_name), basicAllocator)
, d_command(bsl::move(original.d_command))
{
@@ -12907,22 +14236,24 @@ StorageDomain::~StorageDomain()
// MANIPULATORS
-StorageDomain& StorageDomain::operator=(const StorageDomain& rhs)
+StorageDomain&
+StorageDomain::operator=(const StorageDomain& rhs)
{
if (this != &rhs) {
- d_name = rhs.d_name;
+ d_name = rhs.d_name;
d_command = rhs.d_command;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-StorageDomain& StorageDomain::operator=(StorageDomain&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+StorageDomain&
+StorageDomain::operator=(StorageDomain&& rhs)
{
if (this != &rhs) {
- d_name = bsl::move(rhs.d_name);
+ d_name = bsl::move(rhs.d_name);
d_command = bsl::move(rhs.d_command);
}
@@ -12938,8 +14269,9 @@ void StorageDomain::reset()
// ACCESSORS
-bsl::ostream&
-StorageDomain::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& StorageDomain::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
@@ -12949,37 +14281,46 @@ StorageDomain::print(bsl::ostream& stream, int level, int spacesPerLevel) const
return stream;
}
-// ----------------------
-// class StoragePartition
-// ----------------------
+
+
+ // ----------------------
+ // class StoragePartition
+ // ----------------------
// CONSTANTS
const char StoragePartition::CLASS_NAME[] = "StoragePartition";
const bdlat_AttributeInfo StoragePartition::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_PARTITION_ID,
- "partitionId",
- sizeof("partitionId") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_COMMAND,
- "command",
- sizeof("command") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ ATTRIBUTE_ID_PARTITION_ID,
+ "partitionId",
+ sizeof("partitionId") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_COMMAND,
+ "command",
+ sizeof("command") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo*
-StoragePartition::lookupAttributeInfo(const char* name, int nameLength)
+const bdlat_AttributeInfo *StoragePartition::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 2; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- StoragePartition::ATTRIBUTE_INFO_ARRAY[i];
+ StoragePartition::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -12987,14 +14328,15 @@ StoragePartition::lookupAttributeInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_AttributeInfo* StoragePartition::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *StoragePartition::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_PARTITION_ID:
+ case ATTRIBUTE_ID_PARTITION_ID:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITION_ID];
- case ATTRIBUTE_ID_COMMAND:
+ case ATTRIBUTE_ID_COMMAND:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND];
- default: return 0;
+ default:
+ return 0;
}
}
@@ -13028,42 +14370,53 @@ bsl::ostream& StoragePartition::print(bsl::ostream& stream,
return stream;
}
-// -------------
-// class Tunable
-// -------------
+
+
+ // -------------
+ // class Tunable
+ // -------------
// CONSTANTS
const char Tunable::CLASS_NAME[] = "Tunable";
const bdlat_AttributeInfo Tunable::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_NAME,
- "name",
- sizeof("name") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_VALUE,
- "value",
- sizeof("value") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {ATTRIBUTE_ID_DESCRIPTION,
- "description",
- sizeof("description") - 1,
- "",
- bdlat_FormattingMode::e_TEXT}};
+ {
+ ATTRIBUTE_ID_NAME,
+ "name",
+ sizeof("name") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_VALUE,
+ "value",
+ sizeof("value") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ ATTRIBUTE_ID_DESCRIPTION,
+ "description",
+ sizeof("description") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* Tunable::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *Tunable::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 3; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- Tunable::ATTRIBUTE_INFO_ARRAY[i];
+ Tunable::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -13071,44 +14424,48 @@ const bdlat_AttributeInfo* Tunable::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* Tunable::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *Tunable::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_NAME: return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME];
- case ATTRIBUTE_ID_VALUE:
+ case ATTRIBUTE_ID_NAME:
+ return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME];
+ case ATTRIBUTE_ID_VALUE:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_VALUE];
- case ATTRIBUTE_ID_DESCRIPTION:
+ case ATTRIBUTE_ID_DESCRIPTION:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DESCRIPTION];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-Tunable::Tunable(bslma::Allocator* basicAllocator)
+Tunable::Tunable(bslma::Allocator *basicAllocator)
: d_name(basicAllocator)
, d_description(basicAllocator)
, d_value(basicAllocator)
{
}
-Tunable::Tunable(const Tunable& original, bslma::Allocator* basicAllocator)
+Tunable::Tunable(const Tunable& original,
+ bslma::Allocator *basicAllocator)
: d_name(original.d_name, basicAllocator)
, d_description(original.d_description, basicAllocator)
, d_value(original.d_value, basicAllocator)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Tunable::Tunable(Tunable&& original) noexcept
-: d_name(bsl::move(original.d_name)),
- d_description(bsl::move(original.d_description)),
- d_value(bsl::move(original.d_value))
+: d_name(bsl::move(original.d_name))
+, d_description(bsl::move(original.d_description))
+, d_value(bsl::move(original.d_value))
{
}
-Tunable::Tunable(Tunable&& original, bslma::Allocator* basicAllocator)
+Tunable::Tunable(Tunable&& original,
+ bslma::Allocator *basicAllocator)
: d_name(bsl::move(original.d_name), basicAllocator)
, d_description(bsl::move(original.d_description), basicAllocator)
, d_value(bsl::move(original.d_value), basicAllocator)
@@ -13122,24 +14479,26 @@ Tunable::~Tunable()
// MANIPULATORS
-Tunable& Tunable::operator=(const Tunable& rhs)
+Tunable&
+Tunable::operator=(const Tunable& rhs)
{
if (this != &rhs) {
- d_name = rhs.d_name;
- d_value = rhs.d_value;
+ d_name = rhs.d_name;
+ d_value = rhs.d_value;
d_description = rhs.d_description;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-Tunable& Tunable::operator=(Tunable&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+Tunable&
+Tunable::operator=(Tunable&& rhs)
{
if (this != &rhs) {
- d_name = bsl::move(rhs.d_name);
- d_value = bsl::move(rhs.d_value);
+ d_name = bsl::move(rhs.d_name);
+ d_value = bsl::move(rhs.d_value);
d_description = bsl::move(rhs.d_description);
}
@@ -13156,8 +14515,9 @@ void Tunable::reset()
// ACCESSORS
-bsl::ostream&
-Tunable::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& Tunable::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
@@ -13168,42 +14528,53 @@ Tunable::print(bsl::ostream& stream, int level, int spacesPerLevel) const
return stream;
}
-// -------------------------
-// class TunableConfirmation
-// -------------------------
+
+
+ // -------------------------
+ // class TunableConfirmation
+ // -------------------------
// CONSTANTS
const char TunableConfirmation::CLASS_NAME[] = "TunableConfirmation";
const bdlat_AttributeInfo TunableConfirmation::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_NAME,
- "name",
- sizeof("name") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_OLD_VALUE,
- "oldValue",
- sizeof("oldValue") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {ATTRIBUTE_ID_NEW_VALUE,
- "newValue",
- sizeof("newValue") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ ATTRIBUTE_ID_NAME,
+ "name",
+ sizeof("name") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_OLD_VALUE,
+ "oldValue",
+ sizeof("oldValue") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ ATTRIBUTE_ID_NEW_VALUE,
+ "newValue",
+ sizeof("newValue") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo*
-TunableConfirmation::lookupAttributeInfo(const char* name, int nameLength)
+const bdlat_AttributeInfo *TunableConfirmation::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 3; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- TunableConfirmation::ATTRIBUTE_INFO_ARRAY[i];
+ TunableConfirmation::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -13211,21 +14582,23 @@ TunableConfirmation::lookupAttributeInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_AttributeInfo* TunableConfirmation::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *TunableConfirmation::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_NAME: return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME];
- case ATTRIBUTE_ID_OLD_VALUE:
+ case ATTRIBUTE_ID_NAME:
+ return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME];
+ case ATTRIBUTE_ID_OLD_VALUE:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_OLD_VALUE];
- case ATTRIBUTE_ID_NEW_VALUE:
+ case ATTRIBUTE_ID_NEW_VALUE:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NEW_VALUE];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-TunableConfirmation::TunableConfirmation(bslma::Allocator* basicAllocator)
+TunableConfirmation::TunableConfirmation(bslma::Allocator *basicAllocator)
: d_name(basicAllocator)
, d_oldValue(basicAllocator)
, d_newValue(basicAllocator)
@@ -13233,24 +14606,24 @@ TunableConfirmation::TunableConfirmation(bslma::Allocator* basicAllocator)
}
TunableConfirmation::TunableConfirmation(const TunableConfirmation& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_name(original.d_name, basicAllocator)
, d_oldValue(original.d_oldValue, basicAllocator)
, d_newValue(original.d_newValue, basicAllocator)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-TunableConfirmation::TunableConfirmation(TunableConfirmation&& original)
- noexcept : d_name(bsl::move(original.d_name)),
- d_oldValue(bsl::move(original.d_oldValue)),
- d_newValue(bsl::move(original.d_newValue))
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+TunableConfirmation::TunableConfirmation(TunableConfirmation&& original) noexcept
+: d_name(bsl::move(original.d_name))
+, d_oldValue(bsl::move(original.d_oldValue))
+, d_newValue(bsl::move(original.d_newValue))
{
}
TunableConfirmation::TunableConfirmation(TunableConfirmation&& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_name(bsl::move(original.d_name), basicAllocator)
, d_oldValue(bsl::move(original.d_oldValue), basicAllocator)
, d_newValue(bsl::move(original.d_newValue), basicAllocator)
@@ -13268,7 +14641,7 @@ TunableConfirmation&
TunableConfirmation::operator=(const TunableConfirmation& rhs)
{
if (this != &rhs) {
- d_name = rhs.d_name;
+ d_name = rhs.d_name;
d_oldValue = rhs.d_oldValue;
d_newValue = rhs.d_newValue;
}
@@ -13276,12 +14649,13 @@ TunableConfirmation::operator=(const TunableConfirmation& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-TunableConfirmation& TunableConfirmation::operator=(TunableConfirmation&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+TunableConfirmation&
+TunableConfirmation::operator=(TunableConfirmation&& rhs)
{
if (this != &rhs) {
- d_name = bsl::move(rhs.d_name);
+ d_name = bsl::move(rhs.d_name);
d_oldValue = bsl::move(rhs.d_oldValue);
d_newValue = bsl::move(rhs.d_newValue);
}
@@ -13312,34 +14686,39 @@ bsl::ostream& TunableConfirmation::print(bsl::ostream& stream,
return stream;
}
-// --------------------------------
-// class ClusterDomainQueueStatuses
-// --------------------------------
+
+
+ // --------------------------------
+ // class ClusterDomainQueueStatuses
+ // --------------------------------
// CONSTANTS
-const char ClusterDomainQueueStatuses::CLASS_NAME[] =
- "ClusterDomainQueueStatuses";
+const char ClusterDomainQueueStatuses::CLASS_NAME[] = "ClusterDomainQueueStatuses";
-const bdlat_AttributeInfo ClusterDomainQueueStatuses::ATTRIBUTE_INFO_ARRAY[] =
- {{ATTRIBUTE_ID_STATUSES,
- "statuses",
- sizeof("statuses") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+const bdlat_AttributeInfo ClusterDomainQueueStatuses::ATTRIBUTE_INFO_ARRAY[] = {
+ {
+ ATTRIBUTE_ID_STATUSES,
+ "statuses",
+ sizeof("statuses") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo*
-ClusterDomainQueueStatuses::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *ClusterDomainQueueStatuses::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 1; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- ClusterDomainQueueStatuses::ATTRIBUTE_INFO_ARRAY[i];
+ ClusterDomainQueueStatuses::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -13347,42 +14726,38 @@ ClusterDomainQueueStatuses::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo*
-ClusterDomainQueueStatuses::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *ClusterDomainQueueStatuses::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_STATUSES:
+ case ATTRIBUTE_ID_STATUSES:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STATUSES];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-ClusterDomainQueueStatuses::ClusterDomainQueueStatuses(
- bslma::Allocator* basicAllocator)
+ClusterDomainQueueStatuses::ClusterDomainQueueStatuses(bslma::Allocator *basicAllocator)
: d_statuses(basicAllocator)
{
}
-ClusterDomainQueueStatuses::ClusterDomainQueueStatuses(
- const ClusterDomainQueueStatuses& original,
- bslma::Allocator* basicAllocator)
+ClusterDomainQueueStatuses::ClusterDomainQueueStatuses(const ClusterDomainQueueStatuses& original,
+ bslma::Allocator *basicAllocator)
: d_statuses(original.d_statuses, basicAllocator)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-ClusterDomainQueueStatuses::ClusterDomainQueueStatuses(
- ClusterDomainQueueStatuses&& original) noexcept
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ClusterDomainQueueStatuses::ClusterDomainQueueStatuses(ClusterDomainQueueStatuses&& original) noexcept
: d_statuses(bsl::move(original.d_statuses))
{
}
-ClusterDomainQueueStatuses::ClusterDomainQueueStatuses(
- ClusterDomainQueueStatuses&& original,
- bslma::Allocator* basicAllocator)
+ClusterDomainQueueStatuses::ClusterDomainQueueStatuses(ClusterDomainQueueStatuses&& original,
+ bslma::Allocator *basicAllocator)
: d_statuses(bsl::move(original.d_statuses), basicAllocator)
{
}
@@ -13404,8 +14779,8 @@ ClusterDomainQueueStatuses::operator=(const ClusterDomainQueueStatuses& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ClusterDomainQueueStatuses&
ClusterDomainQueueStatuses::operator=(ClusterDomainQueueStatuses&& rhs)
{
@@ -13424,9 +14799,10 @@ void ClusterDomainQueueStatuses::reset()
// ACCESSORS
-bsl::ostream& ClusterDomainQueueStatuses::print(bsl::ostream& stream,
- int level,
- int spacesPerLevel) const
+bsl::ostream& ClusterDomainQueueStatuses::print(
+ bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
@@ -13435,52 +14811,67 @@ bsl::ostream& ClusterDomainQueueStatuses::print(bsl::ostream& stream,
return stream;
}
-// ------------------------
-// class ClusterProxyStatus
-// ------------------------
+
+
+ // ------------------------
+ // class ClusterProxyStatus
+ // ------------------------
// CONSTANTS
const char ClusterProxyStatus::CLASS_NAME[] = "ClusterProxyStatus";
const bdlat_AttributeInfo ClusterProxyStatus::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_DESCRIPTION,
- "description",
- sizeof("description") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_ACTIVE_NODE_DESCRIPTION,
- "activeNodeDescription",
- sizeof("activeNodeDescription") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_IS_HEALTHY,
- "isHealthy",
- sizeof("isHealthy") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_NODE_STATUSES,
- "nodeStatuses",
- sizeof("nodeStatuses") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {ATTRIBUTE_ID_QUEUES_INFO,
- "queuesInfo",
- sizeof("queuesInfo") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ ATTRIBUTE_ID_DESCRIPTION,
+ "description",
+ sizeof("description") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_ACTIVE_NODE_DESCRIPTION,
+ "activeNodeDescription",
+ sizeof("activeNodeDescription") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_IS_HEALTHY,
+ "isHealthy",
+ sizeof("isHealthy") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_NODE_STATUSES,
+ "nodeStatuses",
+ sizeof("nodeStatuses") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ ATTRIBUTE_ID_QUEUES_INFO,
+ "queuesInfo",
+ sizeof("queuesInfo") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo*
-ClusterProxyStatus::lookupAttributeInfo(const char* name, int nameLength)
+const bdlat_AttributeInfo *ClusterProxyStatus::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 5; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- ClusterProxyStatus::ATTRIBUTE_INFO_ARRAY[i];
+ ClusterProxyStatus::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -13488,26 +14879,27 @@ ClusterProxyStatus::lookupAttributeInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_AttributeInfo* ClusterProxyStatus::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *ClusterProxyStatus::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_DESCRIPTION:
+ case ATTRIBUTE_ID_DESCRIPTION:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DESCRIPTION];
- case ATTRIBUTE_ID_ACTIVE_NODE_DESCRIPTION:
+ case ATTRIBUTE_ID_ACTIVE_NODE_DESCRIPTION:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ACTIVE_NODE_DESCRIPTION];
- case ATTRIBUTE_ID_IS_HEALTHY:
+ case ATTRIBUTE_ID_IS_HEALTHY:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_HEALTHY];
- case ATTRIBUTE_ID_NODE_STATUSES:
+ case ATTRIBUTE_ID_NODE_STATUSES:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NODE_STATUSES];
- case ATTRIBUTE_ID_QUEUES_INFO:
+ case ATTRIBUTE_ID_QUEUES_INFO:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUES_INFO];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-ClusterProxyStatus::ClusterProxyStatus(bslma::Allocator* basicAllocator)
+ClusterProxyStatus::ClusterProxyStatus(bslma::Allocator *basicAllocator)
: d_description(basicAllocator)
, d_activeNodeDescription(basicAllocator)
, d_queuesInfo(basicAllocator)
@@ -13517,7 +14909,7 @@ ClusterProxyStatus::ClusterProxyStatus(bslma::Allocator* basicAllocator)
}
ClusterProxyStatus::ClusterProxyStatus(const ClusterProxyStatus& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_description(original.d_description, basicAllocator)
, d_activeNodeDescription(original.d_activeNodeDescription, basicAllocator)
, d_queuesInfo(original.d_queuesInfo, basicAllocator)
@@ -13526,22 +14918,21 @@ ClusterProxyStatus::ClusterProxyStatus(const ClusterProxyStatus& original,
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ClusterProxyStatus::ClusterProxyStatus(ClusterProxyStatus&& original) noexcept
-: d_description(bsl::move(original.d_description)),
- d_activeNodeDescription(bsl::move(original.d_activeNodeDescription)),
- d_queuesInfo(bsl::move(original.d_queuesInfo)),
- d_nodeStatuses(bsl::move(original.d_nodeStatuses)),
- d_isHealthy(bsl::move(original.d_isHealthy))
+: d_description(bsl::move(original.d_description))
+, d_activeNodeDescription(bsl::move(original.d_activeNodeDescription))
+, d_queuesInfo(bsl::move(original.d_queuesInfo))
+, d_nodeStatuses(bsl::move(original.d_nodeStatuses))
+, d_isHealthy(bsl::move(original.d_isHealthy))
{
}
ClusterProxyStatus::ClusterProxyStatus(ClusterProxyStatus&& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_description(bsl::move(original.d_description), basicAllocator)
-, d_activeNodeDescription(bsl::move(original.d_activeNodeDescription),
- basicAllocator)
+, d_activeNodeDescription(bsl::move(original.d_activeNodeDescription), basicAllocator)
, d_queuesInfo(bsl::move(original.d_queuesInfo), basicAllocator)
, d_nodeStatuses(bsl::move(original.d_nodeStatuses), basicAllocator)
, d_isHealthy(bsl::move(original.d_isHealthy))
@@ -13559,26 +14950,27 @@ ClusterProxyStatus&
ClusterProxyStatus::operator=(const ClusterProxyStatus& rhs)
{
if (this != &rhs) {
- d_description = rhs.d_description;
+ d_description = rhs.d_description;
d_activeNodeDescription = rhs.d_activeNodeDescription;
- d_isHealthy = rhs.d_isHealthy;
- d_nodeStatuses = rhs.d_nodeStatuses;
- d_queuesInfo = rhs.d_queuesInfo;
+ d_isHealthy = rhs.d_isHealthy;
+ d_nodeStatuses = rhs.d_nodeStatuses;
+ d_queuesInfo = rhs.d_queuesInfo;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-ClusterProxyStatus& ClusterProxyStatus::operator=(ClusterProxyStatus&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ClusterProxyStatus&
+ClusterProxyStatus::operator=(ClusterProxyStatus&& rhs)
{
if (this != &rhs) {
- d_description = bsl::move(rhs.d_description);
+ d_description = bsl::move(rhs.d_description);
d_activeNodeDescription = bsl::move(rhs.d_activeNodeDescription);
- d_isHealthy = bsl::move(rhs.d_isHealthy);
- d_nodeStatuses = bsl::move(rhs.d_nodeStatuses);
- d_queuesInfo = bsl::move(rhs.d_queuesInfo);
+ d_isHealthy = bsl::move(rhs.d_isHealthy);
+ d_nodeStatuses = bsl::move(rhs.d_nodeStatuses);
+ d_queuesInfo = bsl::move(rhs.d_queuesInfo);
}
return *this;
@@ -13603,8 +14995,7 @@ bsl::ostream& ClusterProxyStatus::print(bsl::ostream& stream,
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
printer.printAttribute("description", this->description());
- printer.printAttribute("activeNodeDescription",
- this->activeNodeDescription());
+ printer.printAttribute("activeNodeDescription", this->activeNodeDescription());
printer.printAttribute("isHealthy", this->isHealthy());
printer.printAttribute("nodeStatuses", this->nodeStatuses());
printer.printAttribute("queuesInfo", this->queuesInfo());
@@ -13612,42 +15003,60 @@ bsl::ostream& ClusterProxyStatus::print(bsl::ostream& stream,
return stream;
}
-// -------------------
-// class DomainCommand
-// -------------------
+
+
+ // -------------------
+ // class DomainCommand
+ // -------------------
// CONSTANTS
const char DomainCommand::CLASS_NAME[] = "DomainCommand";
const bdlat_SelectionInfo DomainCommand::SELECTION_INFO_ARRAY[] = {
- {SELECTION_ID_PURGE,
- "purge",
- sizeof("purge") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_INFO,
- "info",
- sizeof("info") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_QUEUE,
- "queue",
- sizeof("queue") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ SELECTION_ID_PURGE,
+ "purge",
+ sizeof("purge") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_REMOVE,
+ "remove",
+ sizeof("remove") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_INFO,
+ "info",
+ sizeof("info") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_QUEUE,
+ "queue",
+ sizeof("queue") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_SelectionInfo* DomainCommand::lookupSelectionInfo(const char* name,
- int nameLength)
+const bdlat_SelectionInfo *DomainCommand::lookupSelectionInfo(
+ const char *name,
+ int nameLength)
{
- for (int i = 0; i < 3; ++i) {
+ for (int i = 0; i < 4; ++i) {
const bdlat_SelectionInfo& selectionInfo =
- DomainCommand::SELECTION_INFO_ARRAY[i];
+ DomainCommand::SELECTION_INFO_ARRAY[i];
- if (nameLength == selectionInfo.d_nameLength &&
- 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength)) {
+ if (nameLength == selectionInfo.d_nameLength
+ && 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength))
+ {
return &selectionInfo;
}
}
@@ -13655,98 +15064,132 @@ const bdlat_SelectionInfo* DomainCommand::lookupSelectionInfo(const char* name,
return 0;
}
-const bdlat_SelectionInfo* DomainCommand::lookupSelectionInfo(int id)
+const bdlat_SelectionInfo *DomainCommand::lookupSelectionInfo(int id)
{
switch (id) {
- case SELECTION_ID_PURGE:
+ case SELECTION_ID_PURGE:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_PURGE];
- case SELECTION_ID_INFO: return &SELECTION_INFO_ARRAY[SELECTION_INDEX_INFO];
- case SELECTION_ID_QUEUE:
+ case SELECTION_ID_REMOVE:
+ return &SELECTION_INFO_ARRAY[SELECTION_INDEX_REMOVE];
+ case SELECTION_ID_INFO:
+ return &SELECTION_INFO_ARRAY[SELECTION_INDEX_INFO];
+ case SELECTION_ID_QUEUE:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-DomainCommand::DomainCommand(const DomainCommand& original,
- bslma::Allocator* basicAllocator)
+DomainCommand::DomainCommand(
+ const DomainCommand& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_PURGE: {
- new (d_purge.buffer()) Void(original.d_purge.object());
- } break;
- case SELECTION_ID_INFO: {
- new (d_info.buffer()) Void(original.d_info.object());
- } break;
- case SELECTION_ID_QUEUE: {
+ case SELECTION_ID_PURGE: {
+ new (d_purge.buffer())
+ Void(original.d_purge.object());
+ } break;
+ case SELECTION_ID_REMOVE: {
+ new (d_remove.buffer())
+ Void(original.d_remove.object());
+ } break;
+ case SELECTION_ID_INFO: {
+ new (d_info.buffer())
+ Void(original.d_info.object());
+ } break;
+ case SELECTION_ID_QUEUE: {
new (d_queue.buffer())
- DomainQueue(original.d_queue.object(), d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ DomainQueue(
+ original.d_queue.object(), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
DomainCommand::DomainCommand(DomainCommand&& original) noexcept
-: d_selectionId(original.d_selectionId),
- d_allocator_p(original.d_allocator_p)
+: d_selectionId(original.d_selectionId)
+, d_allocator_p(original.d_allocator_p)
{
switch (d_selectionId) {
- case SELECTION_ID_PURGE: {
- new (d_purge.buffer()) Void(bsl::move(original.d_purge.object()));
- } break;
- case SELECTION_ID_INFO: {
- new (d_info.buffer()) Void(bsl::move(original.d_info.object()));
- } break;
- case SELECTION_ID_QUEUE: {
+ case SELECTION_ID_PURGE: {
+ new (d_purge.buffer())
+ Void(bsl::move(original.d_purge.object()));
+ } break;
+ case SELECTION_ID_REMOVE: {
+ new (d_remove.buffer())
+ Void(bsl::move(original.d_remove.object()));
+ } break;
+ case SELECTION_ID_INFO: {
+ new (d_info.buffer())
+ Void(bsl::move(original.d_info.object()));
+ } break;
+ case SELECTION_ID_QUEUE: {
new (d_queue.buffer())
- DomainQueue(bsl::move(original.d_queue.object()), d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ DomainQueue(
+ bsl::move(original.d_queue.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-DomainCommand::DomainCommand(DomainCommand&& original,
- bslma::Allocator* basicAllocator)
+DomainCommand::DomainCommand(
+ DomainCommand&& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_PURGE: {
- new (d_purge.buffer()) Void(bsl::move(original.d_purge.object()));
- } break;
- case SELECTION_ID_INFO: {
- new (d_info.buffer()) Void(bsl::move(original.d_info.object()));
- } break;
- case SELECTION_ID_QUEUE: {
+ case SELECTION_ID_PURGE: {
+ new (d_purge.buffer())
+ Void(bsl::move(original.d_purge.object()));
+ } break;
+ case SELECTION_ID_REMOVE: {
+ new (d_remove.buffer())
+ Void(bsl::move(original.d_remove.object()));
+ } break;
+ case SELECTION_ID_INFO: {
+ new (d_info.buffer())
+ Void(bsl::move(original.d_info.object()));
+ } break;
+ case SELECTION_ID_QUEUE: {
new (d_queue.buffer())
- DomainQueue(bsl::move(original.d_queue.object()), d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ DomainQueue(
+ bsl::move(original.d_queue.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
#endif
// MANIPULATORS
-DomainCommand& DomainCommand::operator=(const DomainCommand& rhs)
+DomainCommand&
+DomainCommand::operator=(const DomainCommand& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_PURGE: {
+ case SELECTION_ID_PURGE: {
makePurge(rhs.d_purge.object());
- } break;
- case SELECTION_ID_INFO: {
+ } break;
+ case SELECTION_ID_REMOVE: {
+ makeRemove(rhs.d_remove.object());
+ } break;
+ case SELECTION_ID_INFO: {
makeInfo(rhs.d_info.object());
- } break;
- case SELECTION_ID_QUEUE: {
+ } break;
+ case SELECTION_ID_QUEUE: {
makeQueue(rhs.d_queue.object());
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -13755,22 +15198,26 @@ DomainCommand& DomainCommand::operator=(const DomainCommand& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-DomainCommand& DomainCommand::operator=(DomainCommand&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+DomainCommand&
+DomainCommand::operator=(DomainCommand&& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_PURGE: {
+ case SELECTION_ID_PURGE: {
makePurge(bsl::move(rhs.d_purge.object()));
- } break;
- case SELECTION_ID_INFO: {
+ } break;
+ case SELECTION_ID_REMOVE: {
+ makeRemove(bsl::move(rhs.d_remove.object()));
+ } break;
+ case SELECTION_ID_INFO: {
makeInfo(bsl::move(rhs.d_info.object()));
- } break;
- case SELECTION_ID_QUEUE: {
+ } break;
+ case SELECTION_ID_QUEUE: {
makeQueue(bsl::move(rhs.d_queue.object()));
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -13783,16 +15230,20 @@ DomainCommand& DomainCommand::operator=(DomainCommand&& rhs)
void DomainCommand::reset()
{
switch (d_selectionId) {
- case SELECTION_ID_PURGE: {
+ case SELECTION_ID_PURGE: {
d_purge.object().~Void();
- } break;
- case SELECTION_ID_INFO: {
+ } break;
+ case SELECTION_ID_REMOVE: {
+ d_remove.object().~Void();
+ } break;
+ case SELECTION_ID_INFO: {
d_info.object().~Void();
- } break;
- case SELECTION_ID_QUEUE: {
+ } break;
+ case SELECTION_ID_QUEUE: {
d_queue.object().~DomainQueue();
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
d_selectionId = SELECTION_ID_UNDEFINED;
@@ -13801,29 +15252,33 @@ void DomainCommand::reset()
int DomainCommand::makeSelection(int selectionId)
{
switch (selectionId) {
- case SELECTION_ID_PURGE: {
+ case SELECTION_ID_PURGE: {
makePurge();
- } break;
- case SELECTION_ID_INFO: {
+ } break;
+ case SELECTION_ID_REMOVE: {
+ makeRemove();
+ } break;
+ case SELECTION_ID_INFO: {
makeInfo();
- } break;
- case SELECTION_ID_QUEUE: {
+ } break;
+ case SELECTION_ID_QUEUE: {
makeQueue();
- } break;
- case SELECTION_ID_UNDEFINED: {
+ } break;
+ case SELECTION_ID_UNDEFINED: {
reset();
- } break;
- default: return -1;
+ } break;
+ default:
+ return -1;
}
return 0;
}
-int DomainCommand::makeSelection(const char* name, int nameLength)
+int DomainCommand::makeSelection(const char *name, int nameLength)
{
- const bdlat_SelectionInfo* selectionInfo = lookupSelectionInfo(name,
- nameLength);
+ const bdlat_SelectionInfo *selectionInfo =
+ lookupSelectionInfo(name, nameLength);
if (0 == selectionInfo) {
- return -1;
+ return -1;
}
return makeSelection(selectionInfo->d_id);
@@ -13836,7 +15291,8 @@ Void& DomainCommand::makePurge()
}
else {
reset();
- new (d_purge.buffer()) Void();
+ new (d_purge.buffer())
+ Void();
d_selectionId = SELECTION_ID_PURGE;
}
@@ -13850,15 +15306,16 @@ Void& DomainCommand::makePurge(const Void& value)
}
else {
reset();
- new (d_purge.buffer()) Void(value);
+ new (d_purge.buffer())
+ Void(value);
d_selectionId = SELECTION_ID_PURGE;
}
return d_purge.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Void& DomainCommand::makePurge(Void&& value)
{
if (SELECTION_ID_PURGE == d_selectionId) {
@@ -13866,7 +15323,8 @@ Void& DomainCommand::makePurge(Void&& value)
}
else {
reset();
- new (d_purge.buffer()) Void(bsl::move(value));
+ new (d_purge.buffer())
+ Void(bsl::move(value));
d_selectionId = SELECTION_ID_PURGE;
}
@@ -13874,6 +15332,54 @@ Void& DomainCommand::makePurge(Void&& value)
}
#endif
+Void& DomainCommand::makeRemove()
+{
+ if (SELECTION_ID_REMOVE == d_selectionId) {
+ bdlat_ValueTypeFunctions::reset(&d_remove.object());
+ }
+ else {
+ reset();
+ new (d_remove.buffer())
+ Void();
+ d_selectionId = SELECTION_ID_REMOVE;
+ }
+
+ return d_remove.object();
+}
+
+Void& DomainCommand::makeRemove(const Void& value)
+{
+ if (SELECTION_ID_REMOVE == d_selectionId) {
+ d_remove.object() = value;
+ }
+ else {
+ reset();
+ new (d_remove.buffer())
+ Void(value);
+ d_selectionId = SELECTION_ID_REMOVE;
+ }
+
+ return d_remove.object();
+}
+
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+Void& DomainCommand::makeRemove(Void&& value)
+{
+ if (SELECTION_ID_REMOVE == d_selectionId) {
+ d_remove.object() = bsl::move(value);
+ }
+ else {
+ reset();
+ new (d_remove.buffer())
+ Void(bsl::move(value));
+ d_selectionId = SELECTION_ID_REMOVE;
+ }
+
+ return d_remove.object();
+}
+#endif
+
Void& DomainCommand::makeInfo()
{
if (SELECTION_ID_INFO == d_selectionId) {
@@ -13881,7 +15387,8 @@ Void& DomainCommand::makeInfo()
}
else {
reset();
- new (d_info.buffer()) Void();
+ new (d_info.buffer())
+ Void();
d_selectionId = SELECTION_ID_INFO;
}
@@ -13895,15 +15402,16 @@ Void& DomainCommand::makeInfo(const Void& value)
}
else {
reset();
- new (d_info.buffer()) Void(value);
+ new (d_info.buffer())
+ Void(value);
d_selectionId = SELECTION_ID_INFO;
}
return d_info.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Void& DomainCommand::makeInfo(Void&& value)
{
if (SELECTION_ID_INFO == d_selectionId) {
@@ -13911,7 +15419,8 @@ Void& DomainCommand::makeInfo(Void&& value)
}
else {
reset();
- new (d_info.buffer()) Void(bsl::move(value));
+ new (d_info.buffer())
+ Void(bsl::move(value));
d_selectionId = SELECTION_ID_INFO;
}
@@ -13926,7 +15435,8 @@ DomainQueue& DomainCommand::makeQueue()
}
else {
reset();
- new (d_queue.buffer()) DomainQueue(d_allocator_p);
+ new (d_queue.buffer())
+ DomainQueue(d_allocator_p);
d_selectionId = SELECTION_ID_QUEUE;
}
@@ -13940,15 +15450,16 @@ DomainQueue& DomainCommand::makeQueue(const DomainQueue& value)
}
else {
reset();
- new (d_queue.buffer()) DomainQueue(value, d_allocator_p);
+ new (d_queue.buffer())
+ DomainQueue(value, d_allocator_p);
d_selectionId = SELECTION_ID_QUEUE;
}
return d_queue.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
DomainQueue& DomainCommand::makeQueue(DomainQueue&& value)
{
if (SELECTION_ID_QUEUE == d_selectionId) {
@@ -13956,7 +15467,8 @@ DomainQueue& DomainCommand::makeQueue(DomainQueue&& value)
}
else {
reset();
- new (d_queue.buffer()) DomainQueue(bsl::move(value), d_allocator_p);
+ new (d_queue.buffer())
+ DomainQueue(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_QUEUE;
}
@@ -13966,78 +15478,96 @@ DomainQueue& DomainCommand::makeQueue(DomainQueue&& value)
// ACCESSORS
-bsl::ostream&
-DomainCommand::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& DomainCommand::print(
+ bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
switch (d_selectionId) {
- case SELECTION_ID_PURGE: {
+ case SELECTION_ID_PURGE: {
printer.printAttribute("purge", d_purge.object());
- } break;
- case SELECTION_ID_INFO: {
+ } break;
+ case SELECTION_ID_REMOVE: {
+ printer.printAttribute("remove", d_remove.object());
+ } break;
+ case SELECTION_ID_INFO: {
printer.printAttribute("info", d_info.object());
- } break;
- case SELECTION_ID_QUEUE: {
+ } break;
+ case SELECTION_ID_QUEUE: {
printer.printAttribute("queue", d_queue.object());
- } break;
- default: stream << "SELECTION UNDEFINED\n";
+ } break;
+ default:
+ stream << "SELECTION UNDEFINED\n";
}
printer.end();
return stream;
}
-const char* DomainCommand::selectionName() const
+
+const char *DomainCommand::selectionName() const
{
switch (d_selectionId) {
- case SELECTION_ID_PURGE:
+ case SELECTION_ID_PURGE:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_PURGE].name();
- case SELECTION_ID_INFO:
+ case SELECTION_ID_REMOVE:
+ return SELECTION_INFO_ARRAY[SELECTION_INDEX_REMOVE].name();
+ case SELECTION_ID_INFO:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_INFO].name();
- case SELECTION_ID_QUEUE:
+ case SELECTION_ID_QUEUE:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE].name();
- default:
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
return "(* UNDEFINED *)";
}
}
-// --------------------
-// class ElectorCommand
-// --------------------
+ // --------------------
+ // class ElectorCommand
+ // --------------------
// CONSTANTS
const char ElectorCommand::CLASS_NAME[] = "ElectorCommand";
const bdlat_SelectionInfo ElectorCommand::SELECTION_INFO_ARRAY[] = {
- {SELECTION_ID_SET_TUNABLE,
- "setTunable",
- sizeof("setTunable") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_GET_TUNABLE,
- "getTunable",
- sizeof("getTunable") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_LIST_TUNABLES,
- "listTunables",
- sizeof("listTunables") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ SELECTION_ID_SET_TUNABLE,
+ "setTunable",
+ sizeof("setTunable") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_GET_TUNABLE,
+ "getTunable",
+ sizeof("getTunable") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_LIST_TUNABLES,
+ "listTunables",
+ sizeof("listTunables") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_SelectionInfo*
-ElectorCommand::lookupSelectionInfo(const char* name, int nameLength)
+const bdlat_SelectionInfo *ElectorCommand::lookupSelectionInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 3; ++i) {
const bdlat_SelectionInfo& selectionInfo =
- ElectorCommand::SELECTION_INFO_ARRAY[i];
+ ElectorCommand::SELECTION_INFO_ARRAY[i];
- if (nameLength == selectionInfo.d_nameLength &&
- 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength)) {
+ if (nameLength == selectionInfo.d_nameLength
+ && 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength))
+ {
return &selectionInfo;
}
}
@@ -14045,108 +15575,118 @@ ElectorCommand::lookupSelectionInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_SelectionInfo* ElectorCommand::lookupSelectionInfo(int id)
+const bdlat_SelectionInfo *ElectorCommand::lookupSelectionInfo(int id)
{
switch (id) {
- case SELECTION_ID_SET_TUNABLE:
+ case SELECTION_ID_SET_TUNABLE:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_SET_TUNABLE];
- case SELECTION_ID_GET_TUNABLE:
+ case SELECTION_ID_GET_TUNABLE:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_GET_TUNABLE];
- case SELECTION_ID_LIST_TUNABLES:
+ case SELECTION_ID_LIST_TUNABLES:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_LIST_TUNABLES];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-ElectorCommand::ElectorCommand(const ElectorCommand& original,
- bslma::Allocator* basicAllocator)
+ElectorCommand::ElectorCommand(
+ const ElectorCommand& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_SET_TUNABLE: {
+ case SELECTION_ID_SET_TUNABLE: {
new (d_setTunable.buffer())
- SetTunable(original.d_setTunable.object(), d_allocator_p);
- } break;
- case SELECTION_ID_GET_TUNABLE: {
+ SetTunable(
+ original.d_setTunable.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_GET_TUNABLE: {
new (d_getTunable.buffer())
- GetTunable(original.d_getTunable.object(), d_allocator_p);
- } break;
- case SELECTION_ID_LIST_TUNABLES: {
- new (d_listTunables.buffer()) Void(original.d_listTunables.object());
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ GetTunable(
+ original.d_getTunable.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_LIST_TUNABLES: {
+ new (d_listTunables.buffer())
+ Void(original.d_listTunables.object());
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ElectorCommand::ElectorCommand(ElectorCommand&& original) noexcept
-: d_selectionId(original.d_selectionId),
- d_allocator_p(original.d_allocator_p)
+: d_selectionId(original.d_selectionId)
+, d_allocator_p(original.d_allocator_p)
{
switch (d_selectionId) {
- case SELECTION_ID_SET_TUNABLE: {
+ case SELECTION_ID_SET_TUNABLE: {
new (d_setTunable.buffer())
- SetTunable(bsl::move(original.d_setTunable.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_GET_TUNABLE: {
+ SetTunable(
+ bsl::move(original.d_setTunable.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_GET_TUNABLE: {
new (d_getTunable.buffer())
- GetTunable(bsl::move(original.d_getTunable.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_LIST_TUNABLES: {
+ GetTunable(
+ bsl::move(original.d_getTunable.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_LIST_TUNABLES: {
new (d_listTunables.buffer())
Void(bsl::move(original.d_listTunables.object()));
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-ElectorCommand::ElectorCommand(ElectorCommand&& original,
- bslma::Allocator* basicAllocator)
+ElectorCommand::ElectorCommand(
+ ElectorCommand&& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_SET_TUNABLE: {
+ case SELECTION_ID_SET_TUNABLE: {
new (d_setTunable.buffer())
- SetTunable(bsl::move(original.d_setTunable.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_GET_TUNABLE: {
+ SetTunable(
+ bsl::move(original.d_setTunable.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_GET_TUNABLE: {
new (d_getTunable.buffer())
- GetTunable(bsl::move(original.d_getTunable.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_LIST_TUNABLES: {
+ GetTunable(
+ bsl::move(original.d_getTunable.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_LIST_TUNABLES: {
new (d_listTunables.buffer())
Void(bsl::move(original.d_listTunables.object()));
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
#endif
// MANIPULATORS
-ElectorCommand& ElectorCommand::operator=(const ElectorCommand& rhs)
+ElectorCommand&
+ElectorCommand::operator=(const ElectorCommand& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_SET_TUNABLE: {
+ case SELECTION_ID_SET_TUNABLE: {
makeSetTunable(rhs.d_setTunable.object());
- } break;
- case SELECTION_ID_GET_TUNABLE: {
+ } break;
+ case SELECTION_ID_GET_TUNABLE: {
makeGetTunable(rhs.d_getTunable.object());
- } break;
- case SELECTION_ID_LIST_TUNABLES: {
+ } break;
+ case SELECTION_ID_LIST_TUNABLES: {
makeListTunables(rhs.d_listTunables.object());
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -14155,22 +15695,23 @@ ElectorCommand& ElectorCommand::operator=(const ElectorCommand& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-ElectorCommand& ElectorCommand::operator=(ElectorCommand&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ElectorCommand&
+ElectorCommand::operator=(ElectorCommand&& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_SET_TUNABLE: {
+ case SELECTION_ID_SET_TUNABLE: {
makeSetTunable(bsl::move(rhs.d_setTunable.object()));
- } break;
- case SELECTION_ID_GET_TUNABLE: {
+ } break;
+ case SELECTION_ID_GET_TUNABLE: {
makeGetTunable(bsl::move(rhs.d_getTunable.object()));
- } break;
- case SELECTION_ID_LIST_TUNABLES: {
+ } break;
+ case SELECTION_ID_LIST_TUNABLES: {
makeListTunables(bsl::move(rhs.d_listTunables.object()));
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -14183,16 +15724,17 @@ ElectorCommand& ElectorCommand::operator=(ElectorCommand&& rhs)
void ElectorCommand::reset()
{
switch (d_selectionId) {
- case SELECTION_ID_SET_TUNABLE: {
+ case SELECTION_ID_SET_TUNABLE: {
d_setTunable.object().~SetTunable();
- } break;
- case SELECTION_ID_GET_TUNABLE: {
+ } break;
+ case SELECTION_ID_GET_TUNABLE: {
d_getTunable.object().~GetTunable();
- } break;
- case SELECTION_ID_LIST_TUNABLES: {
+ } break;
+ case SELECTION_ID_LIST_TUNABLES: {
d_listTunables.object().~Void();
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
d_selectionId = SELECTION_ID_UNDEFINED;
@@ -14201,29 +15743,30 @@ void ElectorCommand::reset()
int ElectorCommand::makeSelection(int selectionId)
{
switch (selectionId) {
- case SELECTION_ID_SET_TUNABLE: {
+ case SELECTION_ID_SET_TUNABLE: {
makeSetTunable();
- } break;
- case SELECTION_ID_GET_TUNABLE: {
+ } break;
+ case SELECTION_ID_GET_TUNABLE: {
makeGetTunable();
- } break;
- case SELECTION_ID_LIST_TUNABLES: {
+ } break;
+ case SELECTION_ID_LIST_TUNABLES: {
makeListTunables();
- } break;
- case SELECTION_ID_UNDEFINED: {
+ } break;
+ case SELECTION_ID_UNDEFINED: {
reset();
- } break;
- default: return -1;
+ } break;
+ default:
+ return -1;
}
return 0;
}
-int ElectorCommand::makeSelection(const char* name, int nameLength)
+int ElectorCommand::makeSelection(const char *name, int nameLength)
{
- const bdlat_SelectionInfo* selectionInfo = lookupSelectionInfo(name,
- nameLength);
+ const bdlat_SelectionInfo *selectionInfo =
+ lookupSelectionInfo(name, nameLength);
if (0 == selectionInfo) {
- return -1;
+ return -1;
}
return makeSelection(selectionInfo->d_id);
@@ -14236,7 +15779,8 @@ SetTunable& ElectorCommand::makeSetTunable()
}
else {
reset();
- new (d_setTunable.buffer()) SetTunable(d_allocator_p);
+ new (d_setTunable.buffer())
+ SetTunable(d_allocator_p);
d_selectionId = SELECTION_ID_SET_TUNABLE;
}
@@ -14250,15 +15794,16 @@ SetTunable& ElectorCommand::makeSetTunable(const SetTunable& value)
}
else {
reset();
- new (d_setTunable.buffer()) SetTunable(value, d_allocator_p);
+ new (d_setTunable.buffer())
+ SetTunable(value, d_allocator_p);
d_selectionId = SELECTION_ID_SET_TUNABLE;
}
return d_setTunable.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
SetTunable& ElectorCommand::makeSetTunable(SetTunable&& value)
{
if (SELECTION_ID_SET_TUNABLE == d_selectionId) {
@@ -14267,7 +15812,7 @@ SetTunable& ElectorCommand::makeSetTunable(SetTunable&& value)
else {
reset();
new (d_setTunable.buffer())
- SetTunable(bsl::move(value), d_allocator_p);
+ SetTunable(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_SET_TUNABLE;
}
@@ -14282,7 +15827,8 @@ GetTunable& ElectorCommand::makeGetTunable()
}
else {
reset();
- new (d_getTunable.buffer()) GetTunable(d_allocator_p);
+ new (d_getTunable.buffer())
+ GetTunable(d_allocator_p);
d_selectionId = SELECTION_ID_GET_TUNABLE;
}
@@ -14296,15 +15842,16 @@ GetTunable& ElectorCommand::makeGetTunable(const GetTunable& value)
}
else {
reset();
- new (d_getTunable.buffer()) GetTunable(value, d_allocator_p);
+ new (d_getTunable.buffer())
+ GetTunable(value, d_allocator_p);
d_selectionId = SELECTION_ID_GET_TUNABLE;
}
return d_getTunable.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
GetTunable& ElectorCommand::makeGetTunable(GetTunable&& value)
{
if (SELECTION_ID_GET_TUNABLE == d_selectionId) {
@@ -14313,7 +15860,7 @@ GetTunable& ElectorCommand::makeGetTunable(GetTunable&& value)
else {
reset();
new (d_getTunable.buffer())
- GetTunable(bsl::move(value), d_allocator_p);
+ GetTunable(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_GET_TUNABLE;
}
@@ -14328,7 +15875,8 @@ Void& ElectorCommand::makeListTunables()
}
else {
reset();
- new (d_listTunables.buffer()) Void();
+ new (d_listTunables.buffer())
+ Void();
d_selectionId = SELECTION_ID_LIST_TUNABLES;
}
@@ -14342,15 +15890,16 @@ Void& ElectorCommand::makeListTunables(const Void& value)
}
else {
reset();
- new (d_listTunables.buffer()) Void(value);
+ new (d_listTunables.buffer())
+ Void(value);
d_selectionId = SELECTION_ID_LIST_TUNABLES;
}
return d_listTunables.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Void& ElectorCommand::makeListTunables(Void&& value)
{
if (SELECTION_ID_LIST_TUNABLES == d_selectionId) {
@@ -14358,7 +15907,8 @@ Void& ElectorCommand::makeListTunables(Void&& value)
}
else {
reset();
- new (d_listTunables.buffer()) Void(bsl::move(value));
+ new (d_listTunables.buffer())
+ Void(bsl::move(value));
d_selectionId = SELECTION_ID_LIST_TUNABLES;
}
@@ -14368,79 +15918,91 @@ Void& ElectorCommand::makeListTunables(Void&& value)
// ACCESSORS
-bsl::ostream& ElectorCommand::print(bsl::ostream& stream,
- int level,
- int spacesPerLevel) const
+bsl::ostream& ElectorCommand::print(
+ bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
switch (d_selectionId) {
- case SELECTION_ID_SET_TUNABLE: {
+ case SELECTION_ID_SET_TUNABLE: {
printer.printAttribute("setTunable", d_setTunable.object());
- } break;
- case SELECTION_ID_GET_TUNABLE: {
+ } break;
+ case SELECTION_ID_GET_TUNABLE: {
printer.printAttribute("getTunable", d_getTunable.object());
- } break;
- case SELECTION_ID_LIST_TUNABLES: {
+ } break;
+ case SELECTION_ID_LIST_TUNABLES: {
printer.printAttribute("listTunables", d_listTunables.object());
- } break;
- default: stream << "SELECTION UNDEFINED\n";
+ } break;
+ default:
+ stream << "SELECTION UNDEFINED\n";
}
printer.end();
return stream;
}
-const char* ElectorCommand::selectionName() const
+
+const char *ElectorCommand::selectionName() const
{
switch (d_selectionId) {
- case SELECTION_ID_SET_TUNABLE:
+ case SELECTION_ID_SET_TUNABLE:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_SET_TUNABLE].name();
- case SELECTION_ID_GET_TUNABLE:
+ case SELECTION_ID_GET_TUNABLE:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_GET_TUNABLE].name();
- case SELECTION_ID_LIST_TUNABLES:
+ case SELECTION_ID_LIST_TUNABLES:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_LIST_TUNABLES].name();
- default:
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
return "(* UNDEFINED *)";
}
}
-// ---------------
-// class FileStore
-// ---------------
+ // ---------------
+ // class FileStore
+ // ---------------
// CONSTANTS
const char FileStore::CLASS_NAME[] = "FileStore";
const bdlat_AttributeInfo FileStore::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_PARTITION_ID,
- "partitionId",
- sizeof("partitionId") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_STATE,
- "state",
- sizeof("state") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {ATTRIBUTE_ID_SUMMARY,
- "summary",
- sizeof("summary") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ ATTRIBUTE_ID_PARTITION_ID,
+ "partitionId",
+ sizeof("partitionId") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_STATE,
+ "state",
+ sizeof("state") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ ATTRIBUTE_ID_SUMMARY,
+ "summary",
+ sizeof("summary") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* FileStore::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *FileStore::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 3; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- FileStore::ATTRIBUTE_INFO_ARRAY[i];
+ FileStore::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -14448,46 +16010,48 @@ const bdlat_AttributeInfo* FileStore::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* FileStore::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *FileStore::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_PARTITION_ID:
+ case ATTRIBUTE_ID_PARTITION_ID:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITION_ID];
- case ATTRIBUTE_ID_STATE:
+ case ATTRIBUTE_ID_STATE:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STATE];
- case ATTRIBUTE_ID_SUMMARY:
+ case ATTRIBUTE_ID_SUMMARY:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUMMARY];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-FileStore::FileStore(bslma::Allocator* basicAllocator)
+FileStore::FileStore(bslma::Allocator *basicAllocator)
: d_summary(basicAllocator)
, d_partitionId()
, d_state(static_cast(0))
{
}
-FileStore::FileStore(const FileStore& original,
- bslma::Allocator* basicAllocator)
+FileStore::FileStore(const FileStore& original,
+ bslma::Allocator *basicAllocator)
: d_summary(original.d_summary, basicAllocator)
, d_partitionId(original.d_partitionId)
, d_state(original.d_state)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
FileStore::FileStore(FileStore&& original) noexcept
-: d_summary(bsl::move(original.d_summary)),
- d_partitionId(bsl::move(original.d_partitionId)),
- d_state(bsl::move(original.d_state))
+: d_summary(bsl::move(original.d_summary))
+, d_partitionId(bsl::move(original.d_partitionId))
+, d_state(bsl::move(original.d_state))
{
}
-FileStore::FileStore(FileStore&& original, bslma::Allocator* basicAllocator)
+FileStore::FileStore(FileStore&& original,
+ bslma::Allocator *basicAllocator)
: d_summary(bsl::move(original.d_summary), basicAllocator)
, d_partitionId(bsl::move(original.d_partitionId))
, d_state(bsl::move(original.d_state))
@@ -14501,25 +16065,27 @@ FileStore::~FileStore()
// MANIPULATORS
-FileStore& FileStore::operator=(const FileStore& rhs)
+FileStore&
+FileStore::operator=(const FileStore& rhs)
{
if (this != &rhs) {
d_partitionId = rhs.d_partitionId;
- d_state = rhs.d_state;
- d_summary = rhs.d_summary;
+ d_state = rhs.d_state;
+ d_summary = rhs.d_summary;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-FileStore& FileStore::operator=(FileStore&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+FileStore&
+FileStore::operator=(FileStore&& rhs)
{
if (this != &rhs) {
d_partitionId = bsl::move(rhs.d_partitionId);
- d_state = bsl::move(rhs.d_state);
- d_summary = bsl::move(rhs.d_summary);
+ d_state = bsl::move(rhs.d_state);
+ d_summary = bsl::move(rhs.d_summary);
}
return *this;
@@ -14535,8 +16101,9 @@ void FileStore::reset()
// ACCESSORS
-bsl::ostream&
-FileStore::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& FileStore::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
@@ -14547,47 +16114,60 @@ FileStore::print(bsl::ostream& stream, int level, int spacesPerLevel) const
return stream;
}
-// -----------------
-// class QueueHandle
-// -----------------
+
+
+ // -----------------
+ // class QueueHandle
+ // -----------------
// CONSTANTS
const char QueueHandle::CLASS_NAME[] = "QueueHandle";
const bdlat_AttributeInfo QueueHandle::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_CLIENT_DESCRIPTION,
- "clientDescription",
- sizeof("clientDescription") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_PARAMETERS_JSON,
- "parametersJson",
- sizeof("parametersJson") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_IS_CLIENT_CLUSTER_MEMBER,
- "isClientClusterMember",
- sizeof("isClientClusterMember") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_SUB_STREAMS,
- "subStreams",
- sizeof("subStreams") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ ATTRIBUTE_ID_CLIENT_DESCRIPTION,
+ "clientDescription",
+ sizeof("clientDescription") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_PARAMETERS_JSON,
+ "parametersJson",
+ sizeof("parametersJson") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_IS_CLIENT_CLUSTER_MEMBER,
+ "isClientClusterMember",
+ sizeof("isClientClusterMember") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_SUB_STREAMS,
+ "subStreams",
+ sizeof("subStreams") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* QueueHandle::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *QueueHandle::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 4; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- QueueHandle::ATTRIBUTE_INFO_ARRAY[i];
+ QueueHandle::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -14595,24 +16175,25 @@ const bdlat_AttributeInfo* QueueHandle::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* QueueHandle::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *QueueHandle::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_CLIENT_DESCRIPTION:
+ case ATTRIBUTE_ID_CLIENT_DESCRIPTION:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLIENT_DESCRIPTION];
- case ATTRIBUTE_ID_PARAMETERS_JSON:
+ case ATTRIBUTE_ID_PARAMETERS_JSON:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARAMETERS_JSON];
- case ATTRIBUTE_ID_IS_CLIENT_CLUSTER_MEMBER:
+ case ATTRIBUTE_ID_IS_CLIENT_CLUSTER_MEMBER:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_CLIENT_CLUSTER_MEMBER];
- case ATTRIBUTE_ID_SUB_STREAMS:
+ case ATTRIBUTE_ID_SUB_STREAMS:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUB_STREAMS];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-QueueHandle::QueueHandle(bslma::Allocator* basicAllocator)
+QueueHandle::QueueHandle(bslma::Allocator *basicAllocator)
: d_subStreams(basicAllocator)
, d_clientDescription(basicAllocator)
, d_parametersJson(basicAllocator)
@@ -14621,7 +16202,7 @@ QueueHandle::QueueHandle(bslma::Allocator* basicAllocator)
}
QueueHandle::QueueHandle(const QueueHandle& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_subStreams(original.d_subStreams, basicAllocator)
, d_clientDescription(original.d_clientDescription, basicAllocator)
, d_parametersJson(original.d_parametersJson, basicAllocator)
@@ -14629,18 +16210,18 @@ QueueHandle::QueueHandle(const QueueHandle& original,
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
QueueHandle::QueueHandle(QueueHandle&& original) noexcept
-: d_subStreams(bsl::move(original.d_subStreams)),
- d_clientDescription(bsl::move(original.d_clientDescription)),
- d_parametersJson(bsl::move(original.d_parametersJson)),
- d_isClientClusterMember(bsl::move(original.d_isClientClusterMember))
+: d_subStreams(bsl::move(original.d_subStreams))
+, d_clientDescription(bsl::move(original.d_clientDescription))
+, d_parametersJson(bsl::move(original.d_parametersJson))
+, d_isClientClusterMember(bsl::move(original.d_isClientClusterMember))
{
}
-QueueHandle::QueueHandle(QueueHandle&& original,
- bslma::Allocator* basicAllocator)
+QueueHandle::QueueHandle(QueueHandle&& original,
+ bslma::Allocator *basicAllocator)
: d_subStreams(bsl::move(original.d_subStreams), basicAllocator)
, d_clientDescription(bsl::move(original.d_clientDescription), basicAllocator)
, d_parametersJson(bsl::move(original.d_parametersJson), basicAllocator)
@@ -14655,27 +16236,29 @@ QueueHandle::~QueueHandle()
// MANIPULATORS
-QueueHandle& QueueHandle::operator=(const QueueHandle& rhs)
+QueueHandle&
+QueueHandle::operator=(const QueueHandle& rhs)
{
if (this != &rhs) {
- d_clientDescription = rhs.d_clientDescription;
- d_parametersJson = rhs.d_parametersJson;
+ d_clientDescription = rhs.d_clientDescription;
+ d_parametersJson = rhs.d_parametersJson;
d_isClientClusterMember = rhs.d_isClientClusterMember;
- d_subStreams = rhs.d_subStreams;
+ d_subStreams = rhs.d_subStreams;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-QueueHandle& QueueHandle::operator=(QueueHandle&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+QueueHandle&
+QueueHandle::operator=(QueueHandle&& rhs)
{
if (this != &rhs) {
- d_clientDescription = bsl::move(rhs.d_clientDescription);
- d_parametersJson = bsl::move(rhs.d_parametersJson);
+ d_clientDescription = bsl::move(rhs.d_clientDescription);
+ d_parametersJson = bsl::move(rhs.d_parametersJson);
d_isClientClusterMember = bsl::move(rhs.d_isClientClusterMember);
- d_subStreams = bsl::move(rhs.d_subStreams);
+ d_subStreams = bsl::move(rhs.d_subStreams);
}
return *this;
@@ -14692,56 +16275,67 @@ void QueueHandle::reset()
// ACCESSORS
-bsl::ostream&
-QueueHandle::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& QueueHandle::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
printer.printAttribute("clientDescription", this->clientDescription());
printer.printAttribute("parametersJson", this->parametersJson());
- printer.printAttribute("isClientClusterMember",
- this->isClientClusterMember());
+ printer.printAttribute("isClientClusterMember", this->isClientClusterMember());
printer.printAttribute("subStreams", this->subStreams());
printer.end();
return stream;
}
-// ------------------------
-// class ReplicationCommand
-// ------------------------
+
+
+ // ------------------------
+ // class ReplicationCommand
+ // ------------------------
// CONSTANTS
const char ReplicationCommand::CLASS_NAME[] = "ReplicationCommand";
const bdlat_SelectionInfo ReplicationCommand::SELECTION_INFO_ARRAY[] = {
- {SELECTION_ID_SET_TUNABLE,
- "setTunable",
- sizeof("setTunable") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_GET_TUNABLE,
- "getTunable",
- sizeof("getTunable") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_LIST_TUNABLES,
- "listTunables",
- sizeof("listTunables") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ SELECTION_ID_SET_TUNABLE,
+ "setTunable",
+ sizeof("setTunable") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_GET_TUNABLE,
+ "getTunable",
+ sizeof("getTunable") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_LIST_TUNABLES,
+ "listTunables",
+ sizeof("listTunables") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_SelectionInfo*
-ReplicationCommand::lookupSelectionInfo(const char* name, int nameLength)
+const bdlat_SelectionInfo *ReplicationCommand::lookupSelectionInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 3; ++i) {
const bdlat_SelectionInfo& selectionInfo =
- ReplicationCommand::SELECTION_INFO_ARRAY[i];
+ ReplicationCommand::SELECTION_INFO_ARRAY[i];
- if (nameLength == selectionInfo.d_nameLength &&
- 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength)) {
+ if (nameLength == selectionInfo.d_nameLength
+ && 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength))
+ {
return &selectionInfo;
}
}
@@ -14749,88 +16343,97 @@ ReplicationCommand::lookupSelectionInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_SelectionInfo* ReplicationCommand::lookupSelectionInfo(int id)
+const bdlat_SelectionInfo *ReplicationCommand::lookupSelectionInfo(int id)
{
switch (id) {
- case SELECTION_ID_SET_TUNABLE:
+ case SELECTION_ID_SET_TUNABLE:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_SET_TUNABLE];
- case SELECTION_ID_GET_TUNABLE:
+ case SELECTION_ID_GET_TUNABLE:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_GET_TUNABLE];
- case SELECTION_ID_LIST_TUNABLES:
+ case SELECTION_ID_LIST_TUNABLES:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_LIST_TUNABLES];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-ReplicationCommand::ReplicationCommand(const ReplicationCommand& original,
- bslma::Allocator* basicAllocator)
+ReplicationCommand::ReplicationCommand(
+ const ReplicationCommand& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_SET_TUNABLE: {
+ case SELECTION_ID_SET_TUNABLE: {
new (d_setTunable.buffer())
- SetTunable(original.d_setTunable.object(), d_allocator_p);
- } break;
- case SELECTION_ID_GET_TUNABLE: {
+ SetTunable(
+ original.d_setTunable.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_GET_TUNABLE: {
new (d_getTunable.buffer())
- GetTunable(original.d_getTunable.object(), d_allocator_p);
- } break;
- case SELECTION_ID_LIST_TUNABLES: {
- new (d_listTunables.buffer()) Void(original.d_listTunables.object());
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ GetTunable(
+ original.d_getTunable.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_LIST_TUNABLES: {
+ new (d_listTunables.buffer())
+ Void(original.d_listTunables.object());
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ReplicationCommand::ReplicationCommand(ReplicationCommand&& original) noexcept
-: d_selectionId(original.d_selectionId),
- d_allocator_p(original.d_allocator_p)
+: d_selectionId(original.d_selectionId)
+, d_allocator_p(original.d_allocator_p)
{
switch (d_selectionId) {
- case SELECTION_ID_SET_TUNABLE: {
+ case SELECTION_ID_SET_TUNABLE: {
new (d_setTunable.buffer())
- SetTunable(bsl::move(original.d_setTunable.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_GET_TUNABLE: {
+ SetTunable(
+ bsl::move(original.d_setTunable.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_GET_TUNABLE: {
new (d_getTunable.buffer())
- GetTunable(bsl::move(original.d_getTunable.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_LIST_TUNABLES: {
+ GetTunable(
+ bsl::move(original.d_getTunable.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_LIST_TUNABLES: {
new (d_listTunables.buffer())
Void(bsl::move(original.d_listTunables.object()));
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-ReplicationCommand::ReplicationCommand(ReplicationCommand&& original,
- bslma::Allocator* basicAllocator)
+ReplicationCommand::ReplicationCommand(
+ ReplicationCommand&& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_SET_TUNABLE: {
+ case SELECTION_ID_SET_TUNABLE: {
new (d_setTunable.buffer())
- SetTunable(bsl::move(original.d_setTunable.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_GET_TUNABLE: {
+ SetTunable(
+ bsl::move(original.d_setTunable.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_GET_TUNABLE: {
new (d_getTunable.buffer())
- GetTunable(bsl::move(original.d_getTunable.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_LIST_TUNABLES: {
+ GetTunable(
+ bsl::move(original.d_getTunable.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_LIST_TUNABLES: {
new (d_listTunables.buffer())
Void(bsl::move(original.d_listTunables.object()));
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
#endif
@@ -14842,16 +16445,16 @@ ReplicationCommand::operator=(const ReplicationCommand& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_SET_TUNABLE: {
+ case SELECTION_ID_SET_TUNABLE: {
makeSetTunable(rhs.d_setTunable.object());
- } break;
- case SELECTION_ID_GET_TUNABLE: {
+ } break;
+ case SELECTION_ID_GET_TUNABLE: {
makeGetTunable(rhs.d_getTunable.object());
- } break;
- case SELECTION_ID_LIST_TUNABLES: {
+ } break;
+ case SELECTION_ID_LIST_TUNABLES: {
makeListTunables(rhs.d_listTunables.object());
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -14860,22 +16463,23 @@ ReplicationCommand::operator=(const ReplicationCommand& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-ReplicationCommand& ReplicationCommand::operator=(ReplicationCommand&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ReplicationCommand&
+ReplicationCommand::operator=(ReplicationCommand&& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_SET_TUNABLE: {
+ case SELECTION_ID_SET_TUNABLE: {
makeSetTunable(bsl::move(rhs.d_setTunable.object()));
- } break;
- case SELECTION_ID_GET_TUNABLE: {
+ } break;
+ case SELECTION_ID_GET_TUNABLE: {
makeGetTunable(bsl::move(rhs.d_getTunable.object()));
- } break;
- case SELECTION_ID_LIST_TUNABLES: {
+ } break;
+ case SELECTION_ID_LIST_TUNABLES: {
makeListTunables(bsl::move(rhs.d_listTunables.object()));
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -14888,16 +16492,17 @@ ReplicationCommand& ReplicationCommand::operator=(ReplicationCommand&& rhs)
void ReplicationCommand::reset()
{
switch (d_selectionId) {
- case SELECTION_ID_SET_TUNABLE: {
+ case SELECTION_ID_SET_TUNABLE: {
d_setTunable.object().~SetTunable();
- } break;
- case SELECTION_ID_GET_TUNABLE: {
+ } break;
+ case SELECTION_ID_GET_TUNABLE: {
d_getTunable.object().~GetTunable();
- } break;
- case SELECTION_ID_LIST_TUNABLES: {
+ } break;
+ case SELECTION_ID_LIST_TUNABLES: {
d_listTunables.object().~Void();
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
d_selectionId = SELECTION_ID_UNDEFINED;
@@ -14906,29 +16511,30 @@ void ReplicationCommand::reset()
int ReplicationCommand::makeSelection(int selectionId)
{
switch (selectionId) {
- case SELECTION_ID_SET_TUNABLE: {
+ case SELECTION_ID_SET_TUNABLE: {
makeSetTunable();
- } break;
- case SELECTION_ID_GET_TUNABLE: {
+ } break;
+ case SELECTION_ID_GET_TUNABLE: {
makeGetTunable();
- } break;
- case SELECTION_ID_LIST_TUNABLES: {
+ } break;
+ case SELECTION_ID_LIST_TUNABLES: {
makeListTunables();
- } break;
- case SELECTION_ID_UNDEFINED: {
+ } break;
+ case SELECTION_ID_UNDEFINED: {
reset();
- } break;
- default: return -1;
+ } break;
+ default:
+ return -1;
}
return 0;
}
-int ReplicationCommand::makeSelection(const char* name, int nameLength)
+int ReplicationCommand::makeSelection(const char *name, int nameLength)
{
- const bdlat_SelectionInfo* selectionInfo = lookupSelectionInfo(name,
- nameLength);
+ const bdlat_SelectionInfo *selectionInfo =
+ lookupSelectionInfo(name, nameLength);
if (0 == selectionInfo) {
- return -1;
+ return -1;
}
return makeSelection(selectionInfo->d_id);
@@ -14941,7 +16547,8 @@ SetTunable& ReplicationCommand::makeSetTunable()
}
else {
reset();
- new (d_setTunable.buffer()) SetTunable(d_allocator_p);
+ new (d_setTunable.buffer())
+ SetTunable(d_allocator_p);
d_selectionId = SELECTION_ID_SET_TUNABLE;
}
@@ -14955,15 +16562,16 @@ SetTunable& ReplicationCommand::makeSetTunable(const SetTunable& value)
}
else {
reset();
- new (d_setTunable.buffer()) SetTunable(value, d_allocator_p);
+ new (d_setTunable.buffer())
+ SetTunable(value, d_allocator_p);
d_selectionId = SELECTION_ID_SET_TUNABLE;
}
return d_setTunable.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
SetTunable& ReplicationCommand::makeSetTunable(SetTunable&& value)
{
if (SELECTION_ID_SET_TUNABLE == d_selectionId) {
@@ -14972,7 +16580,7 @@ SetTunable& ReplicationCommand::makeSetTunable(SetTunable&& value)
else {
reset();
new (d_setTunable.buffer())
- SetTunable(bsl::move(value), d_allocator_p);
+ SetTunable(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_SET_TUNABLE;
}
@@ -14987,7 +16595,8 @@ GetTunable& ReplicationCommand::makeGetTunable()
}
else {
reset();
- new (d_getTunable.buffer()) GetTunable(d_allocator_p);
+ new (d_getTunable.buffer())
+ GetTunable(d_allocator_p);
d_selectionId = SELECTION_ID_GET_TUNABLE;
}
@@ -15001,15 +16610,16 @@ GetTunable& ReplicationCommand::makeGetTunable(const GetTunable& value)
}
else {
reset();
- new (d_getTunable.buffer()) GetTunable(value, d_allocator_p);
+ new (d_getTunable.buffer())
+ GetTunable(value, d_allocator_p);
d_selectionId = SELECTION_ID_GET_TUNABLE;
}
return d_getTunable.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
GetTunable& ReplicationCommand::makeGetTunable(GetTunable&& value)
{
if (SELECTION_ID_GET_TUNABLE == d_selectionId) {
@@ -15018,7 +16628,7 @@ GetTunable& ReplicationCommand::makeGetTunable(GetTunable&& value)
else {
reset();
new (d_getTunable.buffer())
- GetTunable(bsl::move(value), d_allocator_p);
+ GetTunable(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_GET_TUNABLE;
}
@@ -15033,7 +16643,8 @@ Void& ReplicationCommand::makeListTunables()
}
else {
reset();
- new (d_listTunables.buffer()) Void();
+ new (d_listTunables.buffer())
+ Void();
d_selectionId = SELECTION_ID_LIST_TUNABLES;
}
@@ -15047,15 +16658,16 @@ Void& ReplicationCommand::makeListTunables(const Void& value)
}
else {
reset();
- new (d_listTunables.buffer()) Void(value);
+ new (d_listTunables.buffer())
+ Void(value);
d_selectionId = SELECTION_ID_LIST_TUNABLES;
}
return d_listTunables.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Void& ReplicationCommand::makeListTunables(Void&& value)
{
if (SELECTION_ID_LIST_TUNABLES == d_selectionId) {
@@ -15063,7 +16675,8 @@ Void& ReplicationCommand::makeListTunables(Void&& value)
}
else {
reset();
- new (d_listTunables.buffer()) Void(bsl::move(value));
+ new (d_listTunables.buffer())
+ Void(bsl::move(value));
d_selectionId = SELECTION_ID_LIST_TUNABLES;
}
@@ -15073,84 +16686,98 @@ Void& ReplicationCommand::makeListTunables(Void&& value)
// ACCESSORS
-bsl::ostream& ReplicationCommand::print(bsl::ostream& stream,
- int level,
- int spacesPerLevel) const
+bsl::ostream& ReplicationCommand::print(
+ bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
switch (d_selectionId) {
- case SELECTION_ID_SET_TUNABLE: {
+ case SELECTION_ID_SET_TUNABLE: {
printer.printAttribute("setTunable", d_setTunable.object());
- } break;
- case SELECTION_ID_GET_TUNABLE: {
+ } break;
+ case SELECTION_ID_GET_TUNABLE: {
printer.printAttribute("getTunable", d_getTunable.object());
- } break;
- case SELECTION_ID_LIST_TUNABLES: {
+ } break;
+ case SELECTION_ID_LIST_TUNABLES: {
printer.printAttribute("listTunables", d_listTunables.object());
- } break;
- default: stream << "SELECTION UNDEFINED\n";
+ } break;
+ default:
+ stream << "SELECTION UNDEFINED\n";
}
printer.end();
return stream;
}
-const char* ReplicationCommand::selectionName() const
+
+const char *ReplicationCommand::selectionName() const
{
switch (d_selectionId) {
- case SELECTION_ID_SET_TUNABLE:
+ case SELECTION_ID_SET_TUNABLE:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_SET_TUNABLE].name();
- case SELECTION_ID_GET_TUNABLE:
+ case SELECTION_ID_GET_TUNABLE:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_GET_TUNABLE].name();
- case SELECTION_ID_LIST_TUNABLES:
+ case SELECTION_ID_LIST_TUNABLES:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_LIST_TUNABLES].name();
- default:
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
return "(* UNDEFINED *)";
}
}
-// -----------------
-// class StatCommand
-// -----------------
+ // -----------------
+ // class StatCommand
+ // -----------------
// CONSTANTS
const char StatCommand::CLASS_NAME[] = "StatCommand";
const bdlat_SelectionInfo StatCommand::SELECTION_INFO_ARRAY[] = {
- {SELECTION_ID_SHOW,
- "show",
- sizeof("show") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_SET_TUNABLE,
- "setTunable",
- sizeof("setTunable") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_GET_TUNABLE,
- "getTunable",
- sizeof("getTunable") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {SELECTION_ID_LIST_TUNABLES,
- "listTunables",
- sizeof("listTunables") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ SELECTION_ID_SHOW,
+ "show",
+ sizeof("show") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_SET_TUNABLE,
+ "setTunable",
+ sizeof("setTunable") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_GET_TUNABLE,
+ "getTunable",
+ sizeof("getTunable") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ SELECTION_ID_LIST_TUNABLES,
+ "listTunables",
+ sizeof("listTunables") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_SelectionInfo* StatCommand::lookupSelectionInfo(const char* name,
- int nameLength)
+const bdlat_SelectionInfo *StatCommand::lookupSelectionInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 4; ++i) {
const bdlat_SelectionInfo& selectionInfo =
- StatCommand::SELECTION_INFO_ARRAY[i];
+ StatCommand::SELECTION_INFO_ARRAY[i];
- if (nameLength == selectionInfo.d_nameLength &&
- 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength)) {
+ if (nameLength == selectionInfo.d_nameLength
+ && 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength))
+ {
return &selectionInfo;
}
}
@@ -15158,121 +16785,135 @@ const bdlat_SelectionInfo* StatCommand::lookupSelectionInfo(const char* name,
return 0;
}
-const bdlat_SelectionInfo* StatCommand::lookupSelectionInfo(int id)
+const bdlat_SelectionInfo *StatCommand::lookupSelectionInfo(int id)
{
switch (id) {
- case SELECTION_ID_SHOW: return &SELECTION_INFO_ARRAY[SELECTION_INDEX_SHOW];
- case SELECTION_ID_SET_TUNABLE:
+ case SELECTION_ID_SHOW:
+ return &SELECTION_INFO_ARRAY[SELECTION_INDEX_SHOW];
+ case SELECTION_ID_SET_TUNABLE:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_SET_TUNABLE];
- case SELECTION_ID_GET_TUNABLE:
+ case SELECTION_ID_GET_TUNABLE:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_GET_TUNABLE];
- case SELECTION_ID_LIST_TUNABLES:
+ case SELECTION_ID_LIST_TUNABLES:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_LIST_TUNABLES];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-StatCommand::StatCommand(const StatCommand& original,
- bslma::Allocator* basicAllocator)
+StatCommand::StatCommand(
+ const StatCommand& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_SHOW: {
- new (d_show.buffer()) Void(original.d_show.object());
- } break;
- case SELECTION_ID_SET_TUNABLE: {
+ case SELECTION_ID_SHOW: {
+ new (d_show.buffer())
+ Void(original.d_show.object());
+ } break;
+ case SELECTION_ID_SET_TUNABLE: {
new (d_setTunable.buffer())
- SetTunable(original.d_setTunable.object(), d_allocator_p);
- } break;
- case SELECTION_ID_GET_TUNABLE: {
+ SetTunable(
+ original.d_setTunable.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_GET_TUNABLE: {
new (d_getTunable.buffer())
- bsl::string(original.d_getTunable.object(), d_allocator_p);
- } break;
- case SELECTION_ID_LIST_TUNABLES: {
- new (d_listTunables.buffer()) Void(original.d_listTunables.object());
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ bsl::string(
+ original.d_getTunable.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_LIST_TUNABLES: {
+ new (d_listTunables.buffer())
+ Void(original.d_listTunables.object());
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
StatCommand::StatCommand(StatCommand&& original) noexcept
-: d_selectionId(original.d_selectionId),
- d_allocator_p(original.d_allocator_p)
+: d_selectionId(original.d_selectionId)
+, d_allocator_p(original.d_allocator_p)
{
switch (d_selectionId) {
- case SELECTION_ID_SHOW: {
- new (d_show.buffer()) Void(bsl::move(original.d_show.object()));
- } break;
- case SELECTION_ID_SET_TUNABLE: {
+ case SELECTION_ID_SHOW: {
+ new (d_show.buffer())
+ Void(bsl::move(original.d_show.object()));
+ } break;
+ case SELECTION_ID_SET_TUNABLE: {
new (d_setTunable.buffer())
- SetTunable(bsl::move(original.d_setTunable.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_GET_TUNABLE: {
+ SetTunable(
+ bsl::move(original.d_setTunable.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_GET_TUNABLE: {
new (d_getTunable.buffer())
- bsl::string(bsl::move(original.d_getTunable.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_LIST_TUNABLES: {
+ bsl::string(
+ bsl::move(original.d_getTunable.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_LIST_TUNABLES: {
new (d_listTunables.buffer())
Void(bsl::move(original.d_listTunables.object()));
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-StatCommand::StatCommand(StatCommand&& original,
- bslma::Allocator* basicAllocator)
+StatCommand::StatCommand(
+ StatCommand&& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_SHOW: {
- new (d_show.buffer()) Void(bsl::move(original.d_show.object()));
- } break;
- case SELECTION_ID_SET_TUNABLE: {
+ case SELECTION_ID_SHOW: {
+ new (d_show.buffer())
+ Void(bsl::move(original.d_show.object()));
+ } break;
+ case SELECTION_ID_SET_TUNABLE: {
new (d_setTunable.buffer())
- SetTunable(bsl::move(original.d_setTunable.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_GET_TUNABLE: {
+ SetTunable(
+ bsl::move(original.d_setTunable.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_GET_TUNABLE: {
new (d_getTunable.buffer())
- bsl::string(bsl::move(original.d_getTunable.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_LIST_TUNABLES: {
+ bsl::string(
+ bsl::move(original.d_getTunable.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_LIST_TUNABLES: {
new (d_listTunables.buffer())
Void(bsl::move(original.d_listTunables.object()));
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
#endif
// MANIPULATORS
-StatCommand& StatCommand::operator=(const StatCommand& rhs)
+StatCommand&
+StatCommand::operator=(const StatCommand& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_SHOW: {
+ case SELECTION_ID_SHOW: {
makeShow(rhs.d_show.object());
- } break;
- case SELECTION_ID_SET_TUNABLE: {
+ } break;
+ case SELECTION_ID_SET_TUNABLE: {
makeSetTunable(rhs.d_setTunable.object());
- } break;
- case SELECTION_ID_GET_TUNABLE: {
+ } break;
+ case SELECTION_ID_GET_TUNABLE: {
makeGetTunable(rhs.d_getTunable.object());
- } break;
- case SELECTION_ID_LIST_TUNABLES: {
+ } break;
+ case SELECTION_ID_LIST_TUNABLES: {
makeListTunables(rhs.d_listTunables.object());
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -15281,25 +16922,26 @@ StatCommand& StatCommand::operator=(const StatCommand& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-StatCommand& StatCommand::operator=(StatCommand&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+StatCommand&
+StatCommand::operator=(StatCommand&& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_SHOW: {
+ case SELECTION_ID_SHOW: {
makeShow(bsl::move(rhs.d_show.object()));
- } break;
- case SELECTION_ID_SET_TUNABLE: {
+ } break;
+ case SELECTION_ID_SET_TUNABLE: {
makeSetTunable(bsl::move(rhs.d_setTunable.object()));
- } break;
- case SELECTION_ID_GET_TUNABLE: {
+ } break;
+ case SELECTION_ID_GET_TUNABLE: {
makeGetTunable(bsl::move(rhs.d_getTunable.object()));
- } break;
- case SELECTION_ID_LIST_TUNABLES: {
+ } break;
+ case SELECTION_ID_LIST_TUNABLES: {
makeListTunables(bsl::move(rhs.d_listTunables.object()));
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -15312,20 +16954,21 @@ StatCommand& StatCommand::operator=(StatCommand&& rhs)
void StatCommand::reset()
{
switch (d_selectionId) {
- case SELECTION_ID_SHOW: {
+ case SELECTION_ID_SHOW: {
d_show.object().~Void();
- } break;
- case SELECTION_ID_SET_TUNABLE: {
+ } break;
+ case SELECTION_ID_SET_TUNABLE: {
d_setTunable.object().~SetTunable();
- } break;
- case SELECTION_ID_GET_TUNABLE: {
+ } break;
+ case SELECTION_ID_GET_TUNABLE: {
typedef bsl::string Type;
d_getTunable.object().~Type();
- } break;
- case SELECTION_ID_LIST_TUNABLES: {
+ } break;
+ case SELECTION_ID_LIST_TUNABLES: {
d_listTunables.object().~Void();
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
d_selectionId = SELECTION_ID_UNDEFINED;
@@ -15334,32 +16977,33 @@ void StatCommand::reset()
int StatCommand::makeSelection(int selectionId)
{
switch (selectionId) {
- case SELECTION_ID_SHOW: {
+ case SELECTION_ID_SHOW: {
makeShow();
- } break;
- case SELECTION_ID_SET_TUNABLE: {
+ } break;
+ case SELECTION_ID_SET_TUNABLE: {
makeSetTunable();
- } break;
- case SELECTION_ID_GET_TUNABLE: {
+ } break;
+ case SELECTION_ID_GET_TUNABLE: {
makeGetTunable();
- } break;
- case SELECTION_ID_LIST_TUNABLES: {
+ } break;
+ case SELECTION_ID_LIST_TUNABLES: {
makeListTunables();
- } break;
- case SELECTION_ID_UNDEFINED: {
+ } break;
+ case SELECTION_ID_UNDEFINED: {
reset();
- } break;
- default: return -1;
+ } break;
+ default:
+ return -1;
}
return 0;
}
-int StatCommand::makeSelection(const char* name, int nameLength)
+int StatCommand::makeSelection(const char *name, int nameLength)
{
- const bdlat_SelectionInfo* selectionInfo = lookupSelectionInfo(name,
- nameLength);
+ const bdlat_SelectionInfo *selectionInfo =
+ lookupSelectionInfo(name, nameLength);
if (0 == selectionInfo) {
- return -1;
+ return -1;
}
return makeSelection(selectionInfo->d_id);
@@ -15372,7 +17016,8 @@ Void& StatCommand::makeShow()
}
else {
reset();
- new (d_show.buffer()) Void();
+ new (d_show.buffer())
+ Void();
d_selectionId = SELECTION_ID_SHOW;
}
@@ -15386,15 +17031,16 @@ Void& StatCommand::makeShow(const Void& value)
}
else {
reset();
- new (d_show.buffer()) Void(value);
+ new (d_show.buffer())
+ Void(value);
d_selectionId = SELECTION_ID_SHOW;
}
return d_show.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Void& StatCommand::makeShow(Void&& value)
{
if (SELECTION_ID_SHOW == d_selectionId) {
@@ -15402,7 +17048,8 @@ Void& StatCommand::makeShow(Void&& value)
}
else {
reset();
- new (d_show.buffer()) Void(bsl::move(value));
+ new (d_show.buffer())
+ Void(bsl::move(value));
d_selectionId = SELECTION_ID_SHOW;
}
@@ -15417,7 +17064,8 @@ SetTunable& StatCommand::makeSetTunable()
}
else {
reset();
- new (d_setTunable.buffer()) SetTunable(d_allocator_p);
+ new (d_setTunable.buffer())
+ SetTunable(d_allocator_p);
d_selectionId = SELECTION_ID_SET_TUNABLE;
}
@@ -15431,15 +17079,16 @@ SetTunable& StatCommand::makeSetTunable(const SetTunable& value)
}
else {
reset();
- new (d_setTunable.buffer()) SetTunable(value, d_allocator_p);
+ new (d_setTunable.buffer())
+ SetTunable(value, d_allocator_p);
d_selectionId = SELECTION_ID_SET_TUNABLE;
}
return d_setTunable.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
SetTunable& StatCommand::makeSetTunable(SetTunable&& value)
{
if (SELECTION_ID_SET_TUNABLE == d_selectionId) {
@@ -15448,7 +17097,7 @@ SetTunable& StatCommand::makeSetTunable(SetTunable&& value)
else {
reset();
new (d_setTunable.buffer())
- SetTunable(bsl::move(value), d_allocator_p);
+ SetTunable(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_SET_TUNABLE;
}
@@ -15463,7 +17112,8 @@ bsl::string& StatCommand::makeGetTunable()
}
else {
reset();
- new (d_getTunable.buffer()) bsl::string(d_allocator_p);
+ new (d_getTunable.buffer())
+ bsl::string(d_allocator_p);
d_selectionId = SELECTION_ID_GET_TUNABLE;
}
@@ -15477,15 +17127,16 @@ bsl::string& StatCommand::makeGetTunable(const bsl::string& value)
}
else {
reset();
- new (d_getTunable.buffer()) bsl::string(value, d_allocator_p);
+ new (d_getTunable.buffer())
+ bsl::string(value, d_allocator_p);
d_selectionId = SELECTION_ID_GET_TUNABLE;
}
return d_getTunable.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
bsl::string& StatCommand::makeGetTunable(bsl::string&& value)
{
if (SELECTION_ID_GET_TUNABLE == d_selectionId) {
@@ -15494,7 +17145,7 @@ bsl::string& StatCommand::makeGetTunable(bsl::string&& value)
else {
reset();
new (d_getTunable.buffer())
- bsl::string(bsl::move(value), d_allocator_p);
+ bsl::string(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_GET_TUNABLE;
}
@@ -15509,7 +17160,8 @@ Void& StatCommand::makeListTunables()
}
else {
reset();
- new (d_listTunables.buffer()) Void();
+ new (d_listTunables.buffer())
+ Void();
d_selectionId = SELECTION_ID_LIST_TUNABLES;
}
@@ -15523,15 +17175,16 @@ Void& StatCommand::makeListTunables(const Void& value)
}
else {
reset();
- new (d_listTunables.buffer()) Void(value);
+ new (d_listTunables.buffer())
+ Void(value);
d_selectionId = SELECTION_ID_LIST_TUNABLES;
}
return d_listTunables.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Void& StatCommand::makeListTunables(Void&& value)
{
if (SELECTION_ID_LIST_TUNABLES == d_selectionId) {
@@ -15539,7 +17192,8 @@ Void& StatCommand::makeListTunables(Void&& value)
}
else {
reset();
- new (d_listTunables.buffer()) Void(bsl::move(value));
+ new (d_listTunables.buffer())
+ Void(bsl::move(value));
d_selectionId = SELECTION_ID_LIST_TUNABLES;
}
@@ -15549,84 +17203,103 @@ Void& StatCommand::makeListTunables(Void&& value)
// ACCESSORS
-bsl::ostream&
-StatCommand::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& StatCommand::print(
+ bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
switch (d_selectionId) {
- case SELECTION_ID_SHOW: {
+ case SELECTION_ID_SHOW: {
printer.printAttribute("show", d_show.object());
- } break;
- case SELECTION_ID_SET_TUNABLE: {
+ } break;
+ case SELECTION_ID_SET_TUNABLE: {
printer.printAttribute("setTunable", d_setTunable.object());
- } break;
- case SELECTION_ID_GET_TUNABLE: {
+ } break;
+ case SELECTION_ID_GET_TUNABLE: {
printer.printAttribute("getTunable", d_getTunable.object());
- } break;
- case SELECTION_ID_LIST_TUNABLES: {
+ } break;
+ case SELECTION_ID_LIST_TUNABLES: {
printer.printAttribute("listTunables", d_listTunables.object());
- } break;
- default: stream << "SELECTION UNDEFINED\n";
+ } break;
+ default:
+ stream << "SELECTION UNDEFINED\n";
}
printer.end();
return stream;
}
-const char* StatCommand::selectionName() const
+
+const char *StatCommand::selectionName() const
{
switch (d_selectionId) {
- case SELECTION_ID_SHOW:
+ case SELECTION_ID_SHOW:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_SHOW].name();
- case SELECTION_ID_SET_TUNABLE:
+ case SELECTION_ID_SET_TUNABLE:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_SET_TUNABLE].name();
- case SELECTION_ID_GET_TUNABLE:
+ case SELECTION_ID_GET_TUNABLE:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_GET_TUNABLE].name();
- case SELECTION_ID_LIST_TUNABLES:
+ case SELECTION_ID_LIST_TUNABLES:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_LIST_TUNABLES].name();
- default:
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
return "(* UNDEFINED *)";
}
}
-// -----------------------
-// class SubscriptionGroup
-// -----------------------
+ // -----------------------
+ // class SubscriptionGroup
+ // -----------------------
// CONSTANTS
const char SubscriptionGroup::CLASS_NAME[] = "SubscriptionGroup";
const bdlat_AttributeInfo SubscriptionGroup::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_ID, "id", sizeof("id") - 1, "", bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_EXPRESSION,
- "expression",
- sizeof("expression") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_UPSTREAM_SUB_QUEUE_ID,
- "upstreamSubQueueId",
- sizeof("upstreamSubQueueId") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_PRIORITY_GROUP,
- "priorityGroup",
- sizeof("priorityGroup") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ ATTRIBUTE_ID_ID,
+ "id",
+ sizeof("id") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_EXPRESSION,
+ "expression",
+ sizeof("expression") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_UPSTREAM_SUB_QUEUE_ID,
+ "upstreamSubQueueId",
+ sizeof("upstreamSubQueueId") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_PRIORITY_GROUP,
+ "priorityGroup",
+ sizeof("priorityGroup") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo*
-SubscriptionGroup::lookupAttributeInfo(const char* name, int nameLength)
+const bdlat_AttributeInfo *SubscriptionGroup::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 4; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- SubscriptionGroup::ATTRIBUTE_INFO_ARRAY[i];
+ SubscriptionGroup::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -15634,23 +17307,25 @@ SubscriptionGroup::lookupAttributeInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_AttributeInfo* SubscriptionGroup::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *SubscriptionGroup::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_ID: return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ID];
- case ATTRIBUTE_ID_EXPRESSION:
+ case ATTRIBUTE_ID_ID:
+ return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ID];
+ case ATTRIBUTE_ID_EXPRESSION:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_EXPRESSION];
- case ATTRIBUTE_ID_UPSTREAM_SUB_QUEUE_ID:
+ case ATTRIBUTE_ID_UPSTREAM_SUB_QUEUE_ID:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_UPSTREAM_SUB_QUEUE_ID];
- case ATTRIBUTE_ID_PRIORITY_GROUP:
+ case ATTRIBUTE_ID_PRIORITY_GROUP:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIORITY_GROUP];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-SubscriptionGroup::SubscriptionGroup(bslma::Allocator* basicAllocator)
+SubscriptionGroup::SubscriptionGroup(bslma::Allocator *basicAllocator)
: d_expression(basicAllocator)
, d_priorityGroup(basicAllocator)
, d_id()
@@ -15659,7 +17334,7 @@ SubscriptionGroup::SubscriptionGroup(bslma::Allocator* basicAllocator)
}
SubscriptionGroup::SubscriptionGroup(const SubscriptionGroup& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_expression(original.d_expression, basicAllocator)
, d_priorityGroup(original.d_priorityGroup, basicAllocator)
, d_id(original.d_id)
@@ -15667,18 +17342,18 @@ SubscriptionGroup::SubscriptionGroup(const SubscriptionGroup& original,
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
SubscriptionGroup::SubscriptionGroup(SubscriptionGroup&& original) noexcept
-: d_expression(bsl::move(original.d_expression)),
- d_priorityGroup(bsl::move(original.d_priorityGroup)),
- d_id(bsl::move(original.d_id)),
- d_upstreamSubQueueId(bsl::move(original.d_upstreamSubQueueId))
+: d_expression(bsl::move(original.d_expression))
+, d_priorityGroup(bsl::move(original.d_priorityGroup))
+, d_id(bsl::move(original.d_id))
+, d_upstreamSubQueueId(bsl::move(original.d_upstreamSubQueueId))
{
}
SubscriptionGroup::SubscriptionGroup(SubscriptionGroup&& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_expression(bsl::move(original.d_expression), basicAllocator)
, d_priorityGroup(bsl::move(original.d_priorityGroup), basicAllocator)
, d_id(bsl::move(original.d_id))
@@ -15693,27 +17368,29 @@ SubscriptionGroup::~SubscriptionGroup()
// MANIPULATORS
-SubscriptionGroup& SubscriptionGroup::operator=(const SubscriptionGroup& rhs)
+SubscriptionGroup&
+SubscriptionGroup::operator=(const SubscriptionGroup& rhs)
{
if (this != &rhs) {
- d_id = rhs.d_id;
- d_expression = rhs.d_expression;
+ d_id = rhs.d_id;
+ d_expression = rhs.d_expression;
d_upstreamSubQueueId = rhs.d_upstreamSubQueueId;
- d_priorityGroup = rhs.d_priorityGroup;
+ d_priorityGroup = rhs.d_priorityGroup;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-SubscriptionGroup& SubscriptionGroup::operator=(SubscriptionGroup&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+SubscriptionGroup&
+SubscriptionGroup::operator=(SubscriptionGroup&& rhs)
{
if (this != &rhs) {
- d_id = bsl::move(rhs.d_id);
- d_expression = bsl::move(rhs.d_expression);
+ d_id = bsl::move(rhs.d_id);
+ d_expression = bsl::move(rhs.d_expression);
d_upstreamSubQueueId = bsl::move(rhs.d_upstreamSubQueueId);
- d_priorityGroup = bsl::move(rhs.d_priorityGroup);
+ d_priorityGroup = bsl::move(rhs.d_priorityGroup);
}
return *this;
@@ -15744,32 +17421,39 @@ bsl::ostream& SubscriptionGroup::print(bsl::ostream& stream,
return stream;
}
-// --------------
-// class Tunables
-// --------------
+
+
+ // --------------
+ // class Tunables
+ // --------------
// CONSTANTS
const char Tunables::CLASS_NAME[] = "Tunables";
const bdlat_AttributeInfo Tunables::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_TUNABLES,
- "tunables",
- sizeof("tunables") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ ATTRIBUTE_ID_TUNABLES,
+ "tunables",
+ sizeof("tunables") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* Tunables::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *Tunables::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 1; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- Tunables::ATTRIBUTE_INFO_ARRAY[i];
+ Tunables::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -15777,35 +17461,38 @@ const bdlat_AttributeInfo* Tunables::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* Tunables::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *Tunables::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_TUNABLES:
+ case ATTRIBUTE_ID_TUNABLES:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_TUNABLES];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-Tunables::Tunables(bslma::Allocator* basicAllocator)
+Tunables::Tunables(bslma::Allocator *basicAllocator)
: d_tunables(basicAllocator)
{
}
-Tunables::Tunables(const Tunables& original, bslma::Allocator* basicAllocator)
+Tunables::Tunables(const Tunables& original,
+ bslma::Allocator *basicAllocator)
: d_tunables(original.d_tunables, basicAllocator)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Tunables::Tunables(Tunables&& original) noexcept
: d_tunables(bsl::move(original.d_tunables))
{
}
-Tunables::Tunables(Tunables&& original, bslma::Allocator* basicAllocator)
+Tunables::Tunables(Tunables&& original,
+ bslma::Allocator *basicAllocator)
: d_tunables(bsl::move(original.d_tunables), basicAllocator)
{
}
@@ -15817,7 +17504,8 @@ Tunables::~Tunables()
// MANIPULATORS
-Tunables& Tunables::operator=(const Tunables& rhs)
+Tunables&
+Tunables::operator=(const Tunables& rhs)
{
if (this != &rhs) {
d_tunables = rhs.d_tunables;
@@ -15826,9 +17514,10 @@ Tunables& Tunables::operator=(const Tunables& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-Tunables& Tunables::operator=(Tunables&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+Tunables&
+Tunables::operator=(Tunables&& rhs)
{
if (this != &rhs) {
d_tunables = bsl::move(rhs.d_tunables);
@@ -15845,8 +17534,9 @@ void Tunables::reset()
// ACCESSORS
-bsl::ostream&
-Tunables::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& Tunables::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
@@ -15855,32 +17545,39 @@ Tunables::print(bsl::ostream& stream, int level, int spacesPerLevel) const
return stream;
}
-// -------------------------
-// class ClusterStateCommand
-// -------------------------
+
+
+ // -------------------------
+ // class ClusterStateCommand
+ // -------------------------
// CONSTANTS
const char ClusterStateCommand::CLASS_NAME[] = "ClusterStateCommand";
const bdlat_SelectionInfo ClusterStateCommand::SELECTION_INFO_ARRAY[] = {
- {SELECTION_ID_ELECTOR,
- "elector",
- sizeof("elector") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ SELECTION_ID_ELECTOR,
+ "elector",
+ sizeof("elector") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_SelectionInfo*
-ClusterStateCommand::lookupSelectionInfo(const char* name, int nameLength)
+const bdlat_SelectionInfo *ClusterStateCommand::lookupSelectionInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 1; ++i) {
const bdlat_SelectionInfo& selectionInfo =
- ClusterStateCommand::SELECTION_INFO_ARRAY[i];
+ ClusterStateCommand::SELECTION_INFO_ARRAY[i];
- if (nameLength == selectionInfo.d_nameLength &&
- 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength)) {
+ if (nameLength == selectionInfo.d_nameLength
+ && 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength))
+ {
return &selectionInfo;
}
}
@@ -15888,59 +17585,66 @@ ClusterStateCommand::lookupSelectionInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_SelectionInfo* ClusterStateCommand::lookupSelectionInfo(int id)
+const bdlat_SelectionInfo *ClusterStateCommand::lookupSelectionInfo(int id)
{
switch (id) {
- case SELECTION_ID_ELECTOR:
+ case SELECTION_ID_ELECTOR:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_ELECTOR];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-ClusterStateCommand::ClusterStateCommand(const ClusterStateCommand& original,
- bslma::Allocator* basicAllocator)
+ClusterStateCommand::ClusterStateCommand(
+ const ClusterStateCommand& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_ELECTOR: {
+ case SELECTION_ID_ELECTOR: {
new (d_elector.buffer())
- ElectorCommand(original.d_elector.object(), d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ ElectorCommand(
+ original.d_elector.object(), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-ClusterStateCommand::ClusterStateCommand(ClusterStateCommand&& original)
- noexcept : d_selectionId(original.d_selectionId),
- d_allocator_p(original.d_allocator_p)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ClusterStateCommand::ClusterStateCommand(ClusterStateCommand&& original) noexcept
+: d_selectionId(original.d_selectionId)
+, d_allocator_p(original.d_allocator_p)
{
switch (d_selectionId) {
- case SELECTION_ID_ELECTOR: {
+ case SELECTION_ID_ELECTOR: {
new (d_elector.buffer())
- ElectorCommand(bsl::move(original.d_elector.object()),
- d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ ElectorCommand(
+ bsl::move(original.d_elector.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-ClusterStateCommand::ClusterStateCommand(ClusterStateCommand&& original,
- bslma::Allocator* basicAllocator)
+ClusterStateCommand::ClusterStateCommand(
+ ClusterStateCommand&& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_ELECTOR: {
+ case SELECTION_ID_ELECTOR: {
new (d_elector.buffer())
- ElectorCommand(bsl::move(original.d_elector.object()),
- d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ ElectorCommand(
+ bsl::move(original.d_elector.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
#endif
@@ -15952,10 +17656,10 @@ ClusterStateCommand::operator=(const ClusterStateCommand& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_ELECTOR: {
+ case SELECTION_ID_ELECTOR: {
makeElector(rhs.d_elector.object());
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -15964,16 +17668,17 @@ ClusterStateCommand::operator=(const ClusterStateCommand& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-ClusterStateCommand& ClusterStateCommand::operator=(ClusterStateCommand&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ClusterStateCommand&
+ClusterStateCommand::operator=(ClusterStateCommand&& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_ELECTOR: {
+ case SELECTION_ID_ELECTOR: {
makeElector(bsl::move(rhs.d_elector.object()));
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -15986,10 +17691,11 @@ ClusterStateCommand& ClusterStateCommand::operator=(ClusterStateCommand&& rhs)
void ClusterStateCommand::reset()
{
switch (d_selectionId) {
- case SELECTION_ID_ELECTOR: {
+ case SELECTION_ID_ELECTOR: {
d_elector.object().~ElectorCommand();
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
d_selectionId = SELECTION_ID_UNDEFINED;
@@ -15998,23 +17704,24 @@ void ClusterStateCommand::reset()
int ClusterStateCommand::makeSelection(int selectionId)
{
switch (selectionId) {
- case SELECTION_ID_ELECTOR: {
+ case SELECTION_ID_ELECTOR: {
makeElector();
- } break;
- case SELECTION_ID_UNDEFINED: {
+ } break;
+ case SELECTION_ID_UNDEFINED: {
reset();
- } break;
- default: return -1;
+ } break;
+ default:
+ return -1;
}
return 0;
}
-int ClusterStateCommand::makeSelection(const char* name, int nameLength)
+int ClusterStateCommand::makeSelection(const char *name, int nameLength)
{
- const bdlat_SelectionInfo* selectionInfo = lookupSelectionInfo(name,
- nameLength);
+ const bdlat_SelectionInfo *selectionInfo =
+ lookupSelectionInfo(name, nameLength);
if (0 == selectionInfo) {
- return -1;
+ return -1;
}
return makeSelection(selectionInfo->d_id);
@@ -16027,7 +17734,8 @@ ElectorCommand& ClusterStateCommand::makeElector()
}
else {
reset();
- new (d_elector.buffer()) ElectorCommand(d_allocator_p);
+ new (d_elector.buffer())
+ ElectorCommand(d_allocator_p);
d_selectionId = SELECTION_ID_ELECTOR;
}
@@ -16041,15 +17749,16 @@ ElectorCommand& ClusterStateCommand::makeElector(const ElectorCommand& value)
}
else {
reset();
- new (d_elector.buffer()) ElectorCommand(value, d_allocator_p);
+ new (d_elector.buffer())
+ ElectorCommand(value, d_allocator_p);
d_selectionId = SELECTION_ID_ELECTOR;
}
return d_elector.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ElectorCommand& ClusterStateCommand::makeElector(ElectorCommand&& value)
{
if (SELECTION_ID_ELECTOR == d_selectionId) {
@@ -16058,7 +17767,7 @@ ElectorCommand& ClusterStateCommand::makeElector(ElectorCommand&& value)
else {
reset();
new (d_elector.buffer())
- ElectorCommand(bsl::move(value), d_allocator_p);
+ ElectorCommand(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_ELECTOR;
}
@@ -16068,64 +17777,74 @@ ElectorCommand& ClusterStateCommand::makeElector(ElectorCommand&& value)
// ACCESSORS
-bsl::ostream& ClusterStateCommand::print(bsl::ostream& stream,
- int level,
- int spacesPerLevel) const
+bsl::ostream& ClusterStateCommand::print(
+ bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
switch (d_selectionId) {
- case SELECTION_ID_ELECTOR: {
+ case SELECTION_ID_ELECTOR: {
printer.printAttribute("elector", d_elector.object());
- } break;
- default: stream << "SELECTION UNDEFINED\n";
+ } break;
+ default:
+ stream << "SELECTION UNDEFINED\n";
}
printer.end();
return stream;
}
-const char* ClusterStateCommand::selectionName() const
+
+const char *ClusterStateCommand::selectionName() const
{
switch (d_selectionId) {
- case SELECTION_ID_ELECTOR:
+ case SELECTION_ID_ELECTOR:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_ELECTOR].name();
- default:
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
return "(* UNDEFINED *)";
}
}
-// ---------------------------
-// class ClusterStorageSummary
-// ---------------------------
+ // ---------------------------
+ // class ClusterStorageSummary
+ // ---------------------------
// CONSTANTS
const char ClusterStorageSummary::CLASS_NAME[] = "ClusterStorageSummary";
const bdlat_AttributeInfo ClusterStorageSummary::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_CLUSTER_FILE_STORE_LOCATION,
- "clusterFileStoreLocation",
- sizeof("clusterFileStoreLocation") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_FILE_STORES,
- "fileStores",
- sizeof("fileStores") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ ATTRIBUTE_ID_CLUSTER_FILE_STORE_LOCATION,
+ "clusterFileStoreLocation",
+ sizeof("clusterFileStoreLocation") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_FILE_STORES,
+ "fileStores",
+ sizeof("fileStores") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo*
-ClusterStorageSummary::lookupAttributeInfo(const char* name, int nameLength)
+const bdlat_AttributeInfo *ClusterStorageSummary::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 2; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- ClusterStorageSummary::ATTRIBUTE_INFO_ARRAY[i];
+ ClusterStorageSummary::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -16133,49 +17852,45 @@ ClusterStorageSummary::lookupAttributeInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_AttributeInfo* ClusterStorageSummary::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *ClusterStorageSummary::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_CLUSTER_FILE_STORE_LOCATION:
- return &ATTRIBUTE_INFO_ARRAY
- [ATTRIBUTE_INDEX_CLUSTER_FILE_STORE_LOCATION];
- case ATTRIBUTE_ID_FILE_STORES:
+ case ATTRIBUTE_ID_CLUSTER_FILE_STORE_LOCATION:
+ return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTER_FILE_STORE_LOCATION];
+ case ATTRIBUTE_ID_FILE_STORES:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_FILE_STORES];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-ClusterStorageSummary::ClusterStorageSummary(bslma::Allocator* basicAllocator)
+ClusterStorageSummary::ClusterStorageSummary(bslma::Allocator *basicAllocator)
: d_fileStores(basicAllocator)
, d_clusterFileStoreLocation(basicAllocator)
{
}
-ClusterStorageSummary::ClusterStorageSummary(
- const ClusterStorageSummary& original,
- bslma::Allocator* basicAllocator)
+ClusterStorageSummary::ClusterStorageSummary(const ClusterStorageSummary& original,
+ bslma::Allocator *basicAllocator)
: d_fileStores(original.d_fileStores, basicAllocator)
-, d_clusterFileStoreLocation(original.d_clusterFileStoreLocation,
- basicAllocator)
+, d_clusterFileStoreLocation(original.d_clusterFileStoreLocation, basicAllocator)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-ClusterStorageSummary::ClusterStorageSummary(
- ClusterStorageSummary&& original) noexcept
-: d_fileStores(bsl::move(original.d_fileStores)),
- d_clusterFileStoreLocation(bsl::move(original.d_clusterFileStoreLocation))
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ClusterStorageSummary::ClusterStorageSummary(ClusterStorageSummary&& original) noexcept
+: d_fileStores(bsl::move(original.d_fileStores))
+, d_clusterFileStoreLocation(bsl::move(original.d_clusterFileStoreLocation))
{
}
ClusterStorageSummary::ClusterStorageSummary(ClusterStorageSummary&& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_fileStores(bsl::move(original.d_fileStores), basicAllocator)
-, d_clusterFileStoreLocation(bsl::move(original.d_clusterFileStoreLocation),
- basicAllocator)
+, d_clusterFileStoreLocation(bsl::move(original.d_clusterFileStoreLocation), basicAllocator)
{
}
#endif
@@ -16191,20 +17906,20 @@ ClusterStorageSummary::operator=(const ClusterStorageSummary& rhs)
{
if (this != &rhs) {
d_clusterFileStoreLocation = rhs.d_clusterFileStoreLocation;
- d_fileStores = rhs.d_fileStores;
+ d_fileStores = rhs.d_fileStores;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ClusterStorageSummary&
ClusterStorageSummary::operator=(ClusterStorageSummary&& rhs)
{
if (this != &rhs) {
d_clusterFileStoreLocation = bsl::move(rhs.d_clusterFileStoreLocation);
- d_fileStores = bsl::move(rhs.d_fileStores);
+ d_fileStores = bsl::move(rhs.d_fileStores);
}
return *this;
@@ -16225,44 +17940,52 @@ bsl::ostream& ClusterStorageSummary::print(bsl::ostream& stream,
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
- printer.printAttribute("clusterFileStoreLocation",
- this->clusterFileStoreLocation());
+ printer.printAttribute("clusterFileStoreLocation", this->clusterFileStoreLocation());
printer.printAttribute("fileStores", this->fileStores());
printer.end();
return stream;
}
-// ------------
-// class Domain
-// ------------
+
+
+ // ------------
+ // class Domain
+ // ------------
// CONSTANTS
const char Domain::CLASS_NAME[] = "Domain";
const bdlat_AttributeInfo Domain::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_NAME,
- "name",
- sizeof("name") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_COMMAND,
- "command",
- sizeof("command") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ ATTRIBUTE_ID_NAME,
+ "name",
+ sizeof("name") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_COMMAND,
+ "command",
+ sizeof("command") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* Domain::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *Domain::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 2; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- Domain::ATTRIBUTE_INFO_ARRAY[i];
+ Domain::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -16270,39 +17993,43 @@ const bdlat_AttributeInfo* Domain::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* Domain::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *Domain::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_NAME: return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME];
- case ATTRIBUTE_ID_COMMAND:
+ case ATTRIBUTE_ID_NAME:
+ return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME];
+ case ATTRIBUTE_ID_COMMAND:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-Domain::Domain(bslma::Allocator* basicAllocator)
+Domain::Domain(bslma::Allocator *basicAllocator)
: d_name(basicAllocator)
, d_command(basicAllocator)
{
}
-Domain::Domain(const Domain& original, bslma::Allocator* basicAllocator)
+Domain::Domain(const Domain& original,
+ bslma::Allocator *basicAllocator)
: d_name(original.d_name, basicAllocator)
, d_command(original.d_command, basicAllocator)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Domain::Domain(Domain&& original) noexcept
-: d_name(bsl::move(original.d_name)),
- d_command(bsl::move(original.d_command))
+: d_name(bsl::move(original.d_name))
+, d_command(bsl::move(original.d_command))
{
}
-Domain::Domain(Domain&& original, bslma::Allocator* basicAllocator)
+Domain::Domain(Domain&& original,
+ bslma::Allocator *basicAllocator)
: d_name(bsl::move(original.d_name), basicAllocator)
, d_command(bsl::move(original.d_command), basicAllocator)
{
@@ -16315,22 +18042,24 @@ Domain::~Domain()
// MANIPULATORS
-Domain& Domain::operator=(const Domain& rhs)
+Domain&
+Domain::operator=(const Domain& rhs)
{
if (this != &rhs) {
- d_name = rhs.d_name;
+ d_name = rhs.d_name;
d_command = rhs.d_command;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-Domain& Domain::operator=(Domain&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+Domain&
+Domain::operator=(Domain&& rhs)
{
if (this != &rhs) {
- d_name = bsl::move(rhs.d_name);
+ d_name = bsl::move(rhs.d_name);
d_command = bsl::move(rhs.d_command);
}
@@ -16346,8 +18075,9 @@ void Domain::reset()
// ACCESSORS
-bsl::ostream&
-Domain::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& Domain::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
@@ -16357,47 +18087,60 @@ Domain::print(bsl::ostream& stream, int level, int spacesPerLevel) const
return stream;
}
-// -------------------
-// class ElectorResult
-// -------------------
+
+
+ // -------------------
+ // class ElectorResult
+ // -------------------
// CONSTANTS
const char ElectorResult::CLASS_NAME[] = "ElectorResult";
const bdlat_SelectionInfo ElectorResult::SELECTION_INFO_ARRAY[] = {
- {SELECTION_ID_ERROR,
- "error",
- sizeof("error") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_TUNABLE,
- "tunable",
- sizeof("tunable") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_TUNABLES,
- "tunables",
- sizeof("tunables") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_TUNABLE_CONFIRMATION,
- "tunableConfirmation",
- sizeof("tunableConfirmation") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ SELECTION_ID_ERROR,
+ "error",
+ sizeof("error") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_TUNABLE,
+ "tunable",
+ sizeof("tunable") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_TUNABLES,
+ "tunables",
+ sizeof("tunables") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_TUNABLE_CONFIRMATION,
+ "tunableConfirmation",
+ sizeof("tunableConfirmation") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_SelectionInfo* ElectorResult::lookupSelectionInfo(const char* name,
- int nameLength)
+const bdlat_SelectionInfo *ElectorResult::lookupSelectionInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 4; ++i) {
const bdlat_SelectionInfo& selectionInfo =
- ElectorResult::SELECTION_INFO_ARRAY[i];
+ ElectorResult::SELECTION_INFO_ARRAY[i];
- if (nameLength == selectionInfo.d_nameLength &&
- 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength)) {
+ if (nameLength == selectionInfo.d_nameLength
+ && 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength))
+ {
return &selectionInfo;
}
}
@@ -16405,124 +18148,141 @@ const bdlat_SelectionInfo* ElectorResult::lookupSelectionInfo(const char* name,
return 0;
}
-const bdlat_SelectionInfo* ElectorResult::lookupSelectionInfo(int id)
+const bdlat_SelectionInfo *ElectorResult::lookupSelectionInfo(int id)
{
switch (id) {
- case SELECTION_ID_ERROR:
+ case SELECTION_ID_ERROR:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR];
- case SELECTION_ID_TUNABLE:
+ case SELECTION_ID_TUNABLE:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE];
- case SELECTION_ID_TUNABLES:
+ case SELECTION_ID_TUNABLES:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLES];
- case SELECTION_ID_TUNABLE_CONFIRMATION:
+ case SELECTION_ID_TUNABLE_CONFIRMATION:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE_CONFIRMATION];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-ElectorResult::ElectorResult(const ElectorResult& original,
- bslma::Allocator* basicAllocator)
+ElectorResult::ElectorResult(
+ const ElectorResult& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_ERROR: {
- new (d_error.buffer()) Error(original.d_error.object(), d_allocator_p);
- } break;
- case SELECTION_ID_TUNABLE: {
+ case SELECTION_ID_ERROR: {
+ new (d_error.buffer())
+ Error(
+ original.d_error.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_TUNABLE: {
new (d_tunable.buffer())
- Tunable(original.d_tunable.object(), d_allocator_p);
- } break;
- case SELECTION_ID_TUNABLES: {
+ Tunable(
+ original.d_tunable.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_TUNABLES: {
new (d_tunables.buffer())
- Tunables(original.d_tunables.object(), d_allocator_p);
- } break;
- case SELECTION_ID_TUNABLE_CONFIRMATION: {
+ Tunables(
+ original.d_tunables.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_TUNABLE_CONFIRMATION: {
new (d_tunableConfirmation.buffer())
- TunableConfirmation(original.d_tunableConfirmation.object(),
- d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ TunableConfirmation(
+ original.d_tunableConfirmation.object(), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ElectorResult::ElectorResult(ElectorResult&& original) noexcept
-: d_selectionId(original.d_selectionId),
- d_allocator_p(original.d_allocator_p)
+: d_selectionId(original.d_selectionId)
+, d_allocator_p(original.d_allocator_p)
{
switch (d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
new (d_error.buffer())
- Error(bsl::move(original.d_error.object()), d_allocator_p);
- } break;
- case SELECTION_ID_TUNABLE: {
+ Error(
+ bsl::move(original.d_error.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_TUNABLE: {
new (d_tunable.buffer())
- Tunable(bsl::move(original.d_tunable.object()), d_allocator_p);
- } break;
- case SELECTION_ID_TUNABLES: {
+ Tunable(
+ bsl::move(original.d_tunable.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_TUNABLES: {
new (d_tunables.buffer())
- Tunables(bsl::move(original.d_tunables.object()), d_allocator_p);
- } break;
- case SELECTION_ID_TUNABLE_CONFIRMATION: {
- new (d_tunableConfirmation.buffer()) TunableConfirmation(
- bsl::move(original.d_tunableConfirmation.object()),
- d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ Tunables(
+ bsl::move(original.d_tunables.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_TUNABLE_CONFIRMATION: {
+ new (d_tunableConfirmation.buffer())
+ TunableConfirmation(
+ bsl::move(original.d_tunableConfirmation.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-ElectorResult::ElectorResult(ElectorResult&& original,
- bslma::Allocator* basicAllocator)
+ElectorResult::ElectorResult(
+ ElectorResult&& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
new (d_error.buffer())
- Error(bsl::move(original.d_error.object()), d_allocator_p);
- } break;
- case SELECTION_ID_TUNABLE: {
+ Error(
+ bsl::move(original.d_error.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_TUNABLE: {
new (d_tunable.buffer())
- Tunable(bsl::move(original.d_tunable.object()), d_allocator_p);
- } break;
- case SELECTION_ID_TUNABLES: {
+ Tunable(
+ bsl::move(original.d_tunable.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_TUNABLES: {
new (d_tunables.buffer())
- Tunables(bsl::move(original.d_tunables.object()), d_allocator_p);
- } break;
- case SELECTION_ID_TUNABLE_CONFIRMATION: {
- new (d_tunableConfirmation.buffer()) TunableConfirmation(
- bsl::move(original.d_tunableConfirmation.object()),
- d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ Tunables(
+ bsl::move(original.d_tunables.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_TUNABLE_CONFIRMATION: {
+ new (d_tunableConfirmation.buffer())
+ TunableConfirmation(
+ bsl::move(original.d_tunableConfirmation.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
#endif
// MANIPULATORS
-ElectorResult& ElectorResult::operator=(const ElectorResult& rhs)
+ElectorResult&
+ElectorResult::operator=(const ElectorResult& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
makeError(rhs.d_error.object());
- } break;
- case SELECTION_ID_TUNABLE: {
+ } break;
+ case SELECTION_ID_TUNABLE: {
makeTunable(rhs.d_tunable.object());
- } break;
- case SELECTION_ID_TUNABLES: {
+ } break;
+ case SELECTION_ID_TUNABLES: {
makeTunables(rhs.d_tunables.object());
- } break;
- case SELECTION_ID_TUNABLE_CONFIRMATION: {
+ } break;
+ case SELECTION_ID_TUNABLE_CONFIRMATION: {
makeTunableConfirmation(rhs.d_tunableConfirmation.object());
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -16531,26 +18291,26 @@ ElectorResult& ElectorResult::operator=(const ElectorResult& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-ElectorResult& ElectorResult::operator=(ElectorResult&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ElectorResult&
+ElectorResult::operator=(ElectorResult&& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
makeError(bsl::move(rhs.d_error.object()));
- } break;
- case SELECTION_ID_TUNABLE: {
+ } break;
+ case SELECTION_ID_TUNABLE: {
makeTunable(bsl::move(rhs.d_tunable.object()));
- } break;
- case SELECTION_ID_TUNABLES: {
+ } break;
+ case SELECTION_ID_TUNABLES: {
makeTunables(bsl::move(rhs.d_tunables.object()));
- } break;
- case SELECTION_ID_TUNABLE_CONFIRMATION: {
- makeTunableConfirmation(
- bsl::move(rhs.d_tunableConfirmation.object()));
- } break;
- default:
+ } break;
+ case SELECTION_ID_TUNABLE_CONFIRMATION: {
+ makeTunableConfirmation(bsl::move(rhs.d_tunableConfirmation.object()));
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -16563,19 +18323,20 @@ ElectorResult& ElectorResult::operator=(ElectorResult&& rhs)
void ElectorResult::reset()
{
switch (d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
d_error.object().~Error();
- } break;
- case SELECTION_ID_TUNABLE: {
+ } break;
+ case SELECTION_ID_TUNABLE: {
d_tunable.object().~Tunable();
- } break;
- case SELECTION_ID_TUNABLES: {
+ } break;
+ case SELECTION_ID_TUNABLES: {
d_tunables.object().~Tunables();
- } break;
- case SELECTION_ID_TUNABLE_CONFIRMATION: {
+ } break;
+ case SELECTION_ID_TUNABLE_CONFIRMATION: {
d_tunableConfirmation.object().~TunableConfirmation();
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
d_selectionId = SELECTION_ID_UNDEFINED;
@@ -16584,32 +18345,33 @@ void ElectorResult::reset()
int ElectorResult::makeSelection(int selectionId)
{
switch (selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
makeError();
- } break;
- case SELECTION_ID_TUNABLE: {
+ } break;
+ case SELECTION_ID_TUNABLE: {
makeTunable();
- } break;
- case SELECTION_ID_TUNABLES: {
+ } break;
+ case SELECTION_ID_TUNABLES: {
makeTunables();
- } break;
- case SELECTION_ID_TUNABLE_CONFIRMATION: {
+ } break;
+ case SELECTION_ID_TUNABLE_CONFIRMATION: {
makeTunableConfirmation();
- } break;
- case SELECTION_ID_UNDEFINED: {
+ } break;
+ case SELECTION_ID_UNDEFINED: {
reset();
- } break;
- default: return -1;
+ } break;
+ default:
+ return -1;
}
return 0;
}
-int ElectorResult::makeSelection(const char* name, int nameLength)
+int ElectorResult::makeSelection(const char *name, int nameLength)
{
- const bdlat_SelectionInfo* selectionInfo = lookupSelectionInfo(name,
- nameLength);
+ const bdlat_SelectionInfo *selectionInfo =
+ lookupSelectionInfo(name, nameLength);
if (0 == selectionInfo) {
- return -1;
+ return -1;
}
return makeSelection(selectionInfo->d_id);
@@ -16622,7 +18384,8 @@ Error& ElectorResult::makeError()
}
else {
reset();
- new (d_error.buffer()) Error(d_allocator_p);
+ new (d_error.buffer())
+ Error(d_allocator_p);
d_selectionId = SELECTION_ID_ERROR;
}
@@ -16636,15 +18399,16 @@ Error& ElectorResult::makeError(const Error& value)
}
else {
reset();
- new (d_error.buffer()) Error(value, d_allocator_p);
+ new (d_error.buffer())
+ Error(value, d_allocator_p);
d_selectionId = SELECTION_ID_ERROR;
}
return d_error.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Error& ElectorResult::makeError(Error&& value)
{
if (SELECTION_ID_ERROR == d_selectionId) {
@@ -16652,7 +18416,8 @@ Error& ElectorResult::makeError(Error&& value)
}
else {
reset();
- new (d_error.buffer()) Error(bsl::move(value), d_allocator_p);
+ new (d_error.buffer())
+ Error(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_ERROR;
}
@@ -16667,7 +18432,8 @@ Tunable& ElectorResult::makeTunable()
}
else {
reset();
- new (d_tunable.buffer()) Tunable(d_allocator_p);
+ new (d_tunable.buffer())
+ Tunable(d_allocator_p);
d_selectionId = SELECTION_ID_TUNABLE;
}
@@ -16681,15 +18447,16 @@ Tunable& ElectorResult::makeTunable(const Tunable& value)
}
else {
reset();
- new (d_tunable.buffer()) Tunable(value, d_allocator_p);
+ new (d_tunable.buffer())
+ Tunable(value, d_allocator_p);
d_selectionId = SELECTION_ID_TUNABLE;
}
return d_tunable.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Tunable& ElectorResult::makeTunable(Tunable&& value)
{
if (SELECTION_ID_TUNABLE == d_selectionId) {
@@ -16697,7 +18464,8 @@ Tunable& ElectorResult::makeTunable(Tunable&& value)
}
else {
reset();
- new (d_tunable.buffer()) Tunable(bsl::move(value), d_allocator_p);
+ new (d_tunable.buffer())
+ Tunable(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_TUNABLE;
}
@@ -16712,7 +18480,8 @@ Tunables& ElectorResult::makeTunables()
}
else {
reset();
- new (d_tunables.buffer()) Tunables(d_allocator_p);
+ new (d_tunables.buffer())
+ Tunables(d_allocator_p);
d_selectionId = SELECTION_ID_TUNABLES;
}
@@ -16726,15 +18495,16 @@ Tunables& ElectorResult::makeTunables(const Tunables& value)
}
else {
reset();
- new (d_tunables.buffer()) Tunables(value, d_allocator_p);
+ new (d_tunables.buffer())
+ Tunables(value, d_allocator_p);
d_selectionId = SELECTION_ID_TUNABLES;
}
return d_tunables.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Tunables& ElectorResult::makeTunables(Tunables&& value)
{
if (SELECTION_ID_TUNABLES == d_selectionId) {
@@ -16742,7 +18512,8 @@ Tunables& ElectorResult::makeTunables(Tunables&& value)
}
else {
reset();
- new (d_tunables.buffer()) Tunables(bsl::move(value), d_allocator_p);
+ new (d_tunables.buffer())
+ Tunables(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_TUNABLES;
}
@@ -16758,15 +18529,14 @@ TunableConfirmation& ElectorResult::makeTunableConfirmation()
else {
reset();
new (d_tunableConfirmation.buffer())
- TunableConfirmation(d_allocator_p);
+ TunableConfirmation(d_allocator_p);
d_selectionId = SELECTION_ID_TUNABLE_CONFIRMATION;
}
return d_tunableConfirmation.object();
}
-TunableConfirmation&
-ElectorResult::makeTunableConfirmation(const TunableConfirmation& value)
+TunableConfirmation& ElectorResult::makeTunableConfirmation(const TunableConfirmation& value)
{
if (SELECTION_ID_TUNABLE_CONFIRMATION == d_selectionId) {
d_tunableConfirmation.object() = value;
@@ -16774,17 +18544,16 @@ ElectorResult::makeTunableConfirmation(const TunableConfirmation& value)
else {
reset();
new (d_tunableConfirmation.buffer())
- TunableConfirmation(value, d_allocator_p);
+ TunableConfirmation(value, d_allocator_p);
d_selectionId = SELECTION_ID_TUNABLE_CONFIRMATION;
}
return d_tunableConfirmation.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-TunableConfirmation&
-ElectorResult::makeTunableConfirmation(TunableConfirmation&& value)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+TunableConfirmation& ElectorResult::makeTunableConfirmation(TunableConfirmation&& value)
{
if (SELECTION_ID_TUNABLE_CONFIRMATION == d_selectionId) {
d_tunableConfirmation.object() = bsl::move(value);
@@ -16792,7 +18561,7 @@ ElectorResult::makeTunableConfirmation(TunableConfirmation&& value)
else {
reset();
new (d_tunableConfirmation.buffer())
- TunableConfirmation(bsl::move(value), d_allocator_p);
+ TunableConfirmation(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_TUNABLE_CONFIRMATION;
}
@@ -16802,111 +18571,138 @@ ElectorResult::makeTunableConfirmation(TunableConfirmation&& value)
// ACCESSORS
-bsl::ostream&
-ElectorResult::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& ElectorResult::print(
+ bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
switch (d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
printer.printAttribute("error", d_error.object());
- } break;
- case SELECTION_ID_TUNABLE: {
+ } break;
+ case SELECTION_ID_TUNABLE: {
printer.printAttribute("tunable", d_tunable.object());
- } break;
- case SELECTION_ID_TUNABLES: {
+ } break;
+ case SELECTION_ID_TUNABLES: {
printer.printAttribute("tunables", d_tunables.object());
- } break;
- case SELECTION_ID_TUNABLE_CONFIRMATION: {
- printer.printAttribute("tunableConfirmation",
- d_tunableConfirmation.object());
- } break;
- default: stream << "SELECTION UNDEFINED\n";
+ } break;
+ case SELECTION_ID_TUNABLE_CONFIRMATION: {
+ printer.printAttribute("tunableConfirmation", d_tunableConfirmation.object());
+ } break;
+ default:
+ stream << "SELECTION UNDEFINED\n";
}
printer.end();
return stream;
}
-const char* ElectorResult::selectionName() const
+
+const char *ElectorResult::selectionName() const
{
switch (d_selectionId) {
- case SELECTION_ID_ERROR:
+ case SELECTION_ID_ERROR:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR].name();
- case SELECTION_ID_TUNABLE:
+ case SELECTION_ID_TUNABLE:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE].name();
- case SELECTION_ID_TUNABLES:
+ case SELECTION_ID_TUNABLES:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLES].name();
- case SELECTION_ID_TUNABLE_CONFIRMATION:
- return SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE_CONFIRMATION]
- .name();
- default:
+ case SELECTION_ID_TUNABLE_CONFIRMATION:
+ return SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE_CONFIRMATION].name();
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
return "(* UNDEFINED *)";
}
}
-// ----------------
-// class QueueState
-// ----------------
+ // ----------------
+ // class QueueState
+ // ----------------
// CONSTANTS
const char QueueState::CLASS_NAME[] = "QueueState";
const bdlat_AttributeInfo QueueState::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_URI,
- "uri",
- sizeof("uri") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_HANDLE_PARAMETERS_JSON,
- "handleParametersJson",
- sizeof("handleParametersJson") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_STREAM_PARAMETERS_JSON,
- "streamParametersJson",
- sizeof("streamParametersJson") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_ID, "id", sizeof("id") - 1, "", bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_KEY,
- "key",
- sizeof("key") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_PARTITION_ID,
- "partitionId",
- sizeof("partitionId") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_STORAGE,
- "storage",
- sizeof("storage") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {ATTRIBUTE_ID_CAPACITY_METER,
- "capacityMeter",
- sizeof("capacityMeter") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {ATTRIBUTE_ID_HANDLES,
- "handles",
- sizeof("handles") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ ATTRIBUTE_ID_URI,
+ "uri",
+ sizeof("uri") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_HANDLE_PARAMETERS_JSON,
+ "handleParametersJson",
+ sizeof("handleParametersJson") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_STREAM_PARAMETERS_JSON,
+ "streamParametersJson",
+ sizeof("streamParametersJson") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_ID,
+ "id",
+ sizeof("id") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_KEY,
+ "key",
+ sizeof("key") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_PARTITION_ID,
+ "partitionId",
+ sizeof("partitionId") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_STORAGE,
+ "storage",
+ sizeof("storage") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ ATTRIBUTE_ID_CAPACITY_METER,
+ "capacityMeter",
+ sizeof("capacityMeter") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ ATTRIBUTE_ID_HANDLES,
+ "handles",
+ sizeof("handles") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* QueueState::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *QueueState::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 9; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- QueueState::ATTRIBUTE_INFO_ARRAY[i];
+ QueueState::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -16914,31 +18710,35 @@ const bdlat_AttributeInfo* QueueState::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* QueueState::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *QueueState::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_URI: return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_URI];
- case ATTRIBUTE_ID_HANDLE_PARAMETERS_JSON:
+ case ATTRIBUTE_ID_URI:
+ return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_URI];
+ case ATTRIBUTE_ID_HANDLE_PARAMETERS_JSON:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_HANDLE_PARAMETERS_JSON];
- case ATTRIBUTE_ID_STREAM_PARAMETERS_JSON:
+ case ATTRIBUTE_ID_STREAM_PARAMETERS_JSON:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STREAM_PARAMETERS_JSON];
- case ATTRIBUTE_ID_ID: return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ID];
- case ATTRIBUTE_ID_KEY: return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_KEY];
- case ATTRIBUTE_ID_PARTITION_ID:
+ case ATTRIBUTE_ID_ID:
+ return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ID];
+ case ATTRIBUTE_ID_KEY:
+ return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_KEY];
+ case ATTRIBUTE_ID_PARTITION_ID:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITION_ID];
- case ATTRIBUTE_ID_STORAGE:
+ case ATTRIBUTE_ID_STORAGE:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STORAGE];
- case ATTRIBUTE_ID_CAPACITY_METER:
+ case ATTRIBUTE_ID_CAPACITY_METER:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CAPACITY_METER];
- case ATTRIBUTE_ID_HANDLES:
+ case ATTRIBUTE_ID_HANDLES:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_HANDLES];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-QueueState::QueueState(bslma::Allocator* basicAllocator)
+QueueState::QueueState(bslma::Allocator *basicAllocator)
: d_handles(basicAllocator)
, d_uri(basicAllocator)
, d_handleParametersJson(basicAllocator)
@@ -16952,7 +18752,7 @@ QueueState::QueueState(bslma::Allocator* basicAllocator)
}
QueueState::QueueState(const QueueState& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_handles(original.d_handles, basicAllocator)
, d_uri(original.d_uri, basicAllocator)
, d_handleParametersJson(original.d_handleParametersJson, basicAllocator)
@@ -16965,28 +18765,27 @@ QueueState::QueueState(const QueueState& original,
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
QueueState::QueueState(QueueState&& original) noexcept
-: d_handles(bsl::move(original.d_handles)),
- d_uri(bsl::move(original.d_uri)),
- d_handleParametersJson(bsl::move(original.d_handleParametersJson)),
- d_streamParametersJson(bsl::move(original.d_streamParametersJson)),
- d_key(bsl::move(original.d_key)),
- d_storage(bsl::move(original.d_storage)),
- d_capacityMeter(bsl::move(original.d_capacityMeter)),
- d_id(bsl::move(original.d_id)),
- d_partitionId(bsl::move(original.d_partitionId))
+: d_handles(bsl::move(original.d_handles))
+, d_uri(bsl::move(original.d_uri))
+, d_handleParametersJson(bsl::move(original.d_handleParametersJson))
+, d_streamParametersJson(bsl::move(original.d_streamParametersJson))
+, d_key(bsl::move(original.d_key))
+, d_storage(bsl::move(original.d_storage))
+, d_capacityMeter(bsl::move(original.d_capacityMeter))
+, d_id(bsl::move(original.d_id))
+, d_partitionId(bsl::move(original.d_partitionId))
{
}
-QueueState::QueueState(QueueState&& original, bslma::Allocator* basicAllocator)
+QueueState::QueueState(QueueState&& original,
+ bslma::Allocator *basicAllocator)
: d_handles(bsl::move(original.d_handles), basicAllocator)
, d_uri(bsl::move(original.d_uri), basicAllocator)
-, d_handleParametersJson(bsl::move(original.d_handleParametersJson),
- basicAllocator)
-, d_streamParametersJson(bsl::move(original.d_streamParametersJson),
- basicAllocator)
+, d_handleParametersJson(bsl::move(original.d_handleParametersJson), basicAllocator)
+, d_streamParametersJson(bsl::move(original.d_streamParametersJson), basicAllocator)
, d_key(bsl::move(original.d_key), basicAllocator)
, d_storage(bsl::move(original.d_storage), basicAllocator)
, d_capacityMeter(bsl::move(original.d_capacityMeter), basicAllocator)
@@ -17002,37 +18801,39 @@ QueueState::~QueueState()
// MANIPULATORS
-QueueState& QueueState::operator=(const QueueState& rhs)
+QueueState&
+QueueState::operator=(const QueueState& rhs)
{
if (this != &rhs) {
- d_uri = rhs.d_uri;
+ d_uri = rhs.d_uri;
d_handleParametersJson = rhs.d_handleParametersJson;
d_streamParametersJson = rhs.d_streamParametersJson;
- d_id = rhs.d_id;
- d_key = rhs.d_key;
- d_partitionId = rhs.d_partitionId;
- d_storage = rhs.d_storage;
- d_capacityMeter = rhs.d_capacityMeter;
- d_handles = rhs.d_handles;
+ d_id = rhs.d_id;
+ d_key = rhs.d_key;
+ d_partitionId = rhs.d_partitionId;
+ d_storage = rhs.d_storage;
+ d_capacityMeter = rhs.d_capacityMeter;
+ d_handles = rhs.d_handles;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-QueueState& QueueState::operator=(QueueState&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+QueueState&
+QueueState::operator=(QueueState&& rhs)
{
if (this != &rhs) {
- d_uri = bsl::move(rhs.d_uri);
+ d_uri = bsl::move(rhs.d_uri);
d_handleParametersJson = bsl::move(rhs.d_handleParametersJson);
d_streamParametersJson = bsl::move(rhs.d_streamParametersJson);
- d_id = bsl::move(rhs.d_id);
- d_key = bsl::move(rhs.d_key);
- d_partitionId = bsl::move(rhs.d_partitionId);
- d_storage = bsl::move(rhs.d_storage);
- d_capacityMeter = bsl::move(rhs.d_capacityMeter);
- d_handles = bsl::move(rhs.d_handles);
+ d_id = bsl::move(rhs.d_id);
+ d_key = bsl::move(rhs.d_key);
+ d_partitionId = bsl::move(rhs.d_partitionId);
+ d_storage = bsl::move(rhs.d_storage);
+ d_capacityMeter = bsl::move(rhs.d_capacityMeter);
+ d_handles = bsl::move(rhs.d_handles);
}
return *this;
@@ -17054,16 +18855,15 @@ void QueueState::reset()
// ACCESSORS
-bsl::ostream&
-QueueState::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& QueueState::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
printer.printAttribute("uri", this->uri());
- printer.printAttribute("handleParametersJson",
- this->handleParametersJson());
- printer.printAttribute("streamParametersJson",
- this->streamParametersJson());
+ printer.printAttribute("handleParametersJson", this->handleParametersJson());
+ printer.printAttribute("streamParametersJson", this->streamParametersJson());
printer.printAttribute("id", this->id());
printer.printAttribute("key", this->key());
printer.printAttribute("partitionId", this->partitionId());
@@ -17074,47 +18874,60 @@ QueueState::print(bsl::ostream& stream, int level, int spacesPerLevel) const
return stream;
}
-// -----------------------
-// class ReplicationResult
-// -----------------------
+
+
+ // -----------------------
+ // class ReplicationResult
+ // -----------------------
// CONSTANTS
const char ReplicationResult::CLASS_NAME[] = "ReplicationResult";
const bdlat_SelectionInfo ReplicationResult::SELECTION_INFO_ARRAY[] = {
- {SELECTION_ID_ERROR,
- "error",
- sizeof("error") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_TUNABLE,
- "tunable",
- sizeof("tunable") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_TUNABLES,
- "tunables",
- sizeof("tunables") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_TUNABLE_CONFIRMATION,
- "tunableConfirmation",
- sizeof("tunableConfirmation") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ SELECTION_ID_ERROR,
+ "error",
+ sizeof("error") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_TUNABLE,
+ "tunable",
+ sizeof("tunable") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_TUNABLES,
+ "tunables",
+ sizeof("tunables") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_TUNABLE_CONFIRMATION,
+ "tunableConfirmation",
+ sizeof("tunableConfirmation") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_SelectionInfo*
-ReplicationResult::lookupSelectionInfo(const char* name, int nameLength)
+const bdlat_SelectionInfo *ReplicationResult::lookupSelectionInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 4; ++i) {
const bdlat_SelectionInfo& selectionInfo =
- ReplicationResult::SELECTION_INFO_ARRAY[i];
+ ReplicationResult::SELECTION_INFO_ARRAY[i];
- if (nameLength == selectionInfo.d_nameLength &&
- 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength)) {
+ if (nameLength == selectionInfo.d_nameLength
+ && 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength))
+ {
return &selectionInfo;
}
}
@@ -17122,124 +18935,141 @@ ReplicationResult::lookupSelectionInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_SelectionInfo* ReplicationResult::lookupSelectionInfo(int id)
+const bdlat_SelectionInfo *ReplicationResult::lookupSelectionInfo(int id)
{
switch (id) {
- case SELECTION_ID_ERROR:
+ case SELECTION_ID_ERROR:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR];
- case SELECTION_ID_TUNABLE:
+ case SELECTION_ID_TUNABLE:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE];
- case SELECTION_ID_TUNABLES:
+ case SELECTION_ID_TUNABLES:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLES];
- case SELECTION_ID_TUNABLE_CONFIRMATION:
+ case SELECTION_ID_TUNABLE_CONFIRMATION:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE_CONFIRMATION];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-ReplicationResult::ReplicationResult(const ReplicationResult& original,
- bslma::Allocator* basicAllocator)
+ReplicationResult::ReplicationResult(
+ const ReplicationResult& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_ERROR: {
- new (d_error.buffer()) Error(original.d_error.object(), d_allocator_p);
- } break;
- case SELECTION_ID_TUNABLE: {
+ case SELECTION_ID_ERROR: {
+ new (d_error.buffer())
+ Error(
+ original.d_error.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_TUNABLE: {
new (d_tunable.buffer())
- Tunable(original.d_tunable.object(), d_allocator_p);
- } break;
- case SELECTION_ID_TUNABLES: {
+ Tunable(
+ original.d_tunable.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_TUNABLES: {
new (d_tunables.buffer())
- Tunables(original.d_tunables.object(), d_allocator_p);
- } break;
- case SELECTION_ID_TUNABLE_CONFIRMATION: {
+ Tunables(
+ original.d_tunables.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_TUNABLE_CONFIRMATION: {
new (d_tunableConfirmation.buffer())
- TunableConfirmation(original.d_tunableConfirmation.object(),
- d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ TunableConfirmation(
+ original.d_tunableConfirmation.object(), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ReplicationResult::ReplicationResult(ReplicationResult&& original) noexcept
-: d_selectionId(original.d_selectionId),
- d_allocator_p(original.d_allocator_p)
+: d_selectionId(original.d_selectionId)
+, d_allocator_p(original.d_allocator_p)
{
switch (d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
new (d_error.buffer())
- Error(bsl::move(original.d_error.object()), d_allocator_p);
- } break;
- case SELECTION_ID_TUNABLE: {
+ Error(
+ bsl::move(original.d_error.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_TUNABLE: {
new (d_tunable.buffer())
- Tunable(bsl::move(original.d_tunable.object()), d_allocator_p);
- } break;
- case SELECTION_ID_TUNABLES: {
+ Tunable(
+ bsl::move(original.d_tunable.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_TUNABLES: {
new (d_tunables.buffer())
- Tunables(bsl::move(original.d_tunables.object()), d_allocator_p);
- } break;
- case SELECTION_ID_TUNABLE_CONFIRMATION: {
- new (d_tunableConfirmation.buffer()) TunableConfirmation(
- bsl::move(original.d_tunableConfirmation.object()),
- d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ Tunables(
+ bsl::move(original.d_tunables.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_TUNABLE_CONFIRMATION: {
+ new (d_tunableConfirmation.buffer())
+ TunableConfirmation(
+ bsl::move(original.d_tunableConfirmation.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-ReplicationResult::ReplicationResult(ReplicationResult&& original,
- bslma::Allocator* basicAllocator)
+ReplicationResult::ReplicationResult(
+ ReplicationResult&& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
new (d_error.buffer())
- Error(bsl::move(original.d_error.object()), d_allocator_p);
- } break;
- case SELECTION_ID_TUNABLE: {
+ Error(
+ bsl::move(original.d_error.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_TUNABLE: {
new (d_tunable.buffer())
- Tunable(bsl::move(original.d_tunable.object()), d_allocator_p);
- } break;
- case SELECTION_ID_TUNABLES: {
+ Tunable(
+ bsl::move(original.d_tunable.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_TUNABLES: {
new (d_tunables.buffer())
- Tunables(bsl::move(original.d_tunables.object()), d_allocator_p);
- } break;
- case SELECTION_ID_TUNABLE_CONFIRMATION: {
- new (d_tunableConfirmation.buffer()) TunableConfirmation(
- bsl::move(original.d_tunableConfirmation.object()),
- d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ Tunables(
+ bsl::move(original.d_tunables.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_TUNABLE_CONFIRMATION: {
+ new (d_tunableConfirmation.buffer())
+ TunableConfirmation(
+ bsl::move(original.d_tunableConfirmation.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
#endif
// MANIPULATORS
-ReplicationResult& ReplicationResult::operator=(const ReplicationResult& rhs)
+ReplicationResult&
+ReplicationResult::operator=(const ReplicationResult& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
makeError(rhs.d_error.object());
- } break;
- case SELECTION_ID_TUNABLE: {
+ } break;
+ case SELECTION_ID_TUNABLE: {
makeTunable(rhs.d_tunable.object());
- } break;
- case SELECTION_ID_TUNABLES: {
+ } break;
+ case SELECTION_ID_TUNABLES: {
makeTunables(rhs.d_tunables.object());
- } break;
- case SELECTION_ID_TUNABLE_CONFIRMATION: {
+ } break;
+ case SELECTION_ID_TUNABLE_CONFIRMATION: {
makeTunableConfirmation(rhs.d_tunableConfirmation.object());
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -17248,26 +19078,26 @@ ReplicationResult& ReplicationResult::operator=(const ReplicationResult& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-ReplicationResult& ReplicationResult::operator=(ReplicationResult&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ReplicationResult&
+ReplicationResult::operator=(ReplicationResult&& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
makeError(bsl::move(rhs.d_error.object()));
- } break;
- case SELECTION_ID_TUNABLE: {
+ } break;
+ case SELECTION_ID_TUNABLE: {
makeTunable(bsl::move(rhs.d_tunable.object()));
- } break;
- case SELECTION_ID_TUNABLES: {
+ } break;
+ case SELECTION_ID_TUNABLES: {
makeTunables(bsl::move(rhs.d_tunables.object()));
- } break;
- case SELECTION_ID_TUNABLE_CONFIRMATION: {
- makeTunableConfirmation(
- bsl::move(rhs.d_tunableConfirmation.object()));
- } break;
- default:
+ } break;
+ case SELECTION_ID_TUNABLE_CONFIRMATION: {
+ makeTunableConfirmation(bsl::move(rhs.d_tunableConfirmation.object()));
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -17280,19 +19110,20 @@ ReplicationResult& ReplicationResult::operator=(ReplicationResult&& rhs)
void ReplicationResult::reset()
{
switch (d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
d_error.object().~Error();
- } break;
- case SELECTION_ID_TUNABLE: {
+ } break;
+ case SELECTION_ID_TUNABLE: {
d_tunable.object().~Tunable();
- } break;
- case SELECTION_ID_TUNABLES: {
+ } break;
+ case SELECTION_ID_TUNABLES: {
d_tunables.object().~Tunables();
- } break;
- case SELECTION_ID_TUNABLE_CONFIRMATION: {
+ } break;
+ case SELECTION_ID_TUNABLE_CONFIRMATION: {
d_tunableConfirmation.object().~TunableConfirmation();
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
d_selectionId = SELECTION_ID_UNDEFINED;
@@ -17301,32 +19132,33 @@ void ReplicationResult::reset()
int ReplicationResult::makeSelection(int selectionId)
{
switch (selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
makeError();
- } break;
- case SELECTION_ID_TUNABLE: {
+ } break;
+ case SELECTION_ID_TUNABLE: {
makeTunable();
- } break;
- case SELECTION_ID_TUNABLES: {
+ } break;
+ case SELECTION_ID_TUNABLES: {
makeTunables();
- } break;
- case SELECTION_ID_TUNABLE_CONFIRMATION: {
+ } break;
+ case SELECTION_ID_TUNABLE_CONFIRMATION: {
makeTunableConfirmation();
- } break;
- case SELECTION_ID_UNDEFINED: {
+ } break;
+ case SELECTION_ID_UNDEFINED: {
reset();
- } break;
- default: return -1;
+ } break;
+ default:
+ return -1;
}
return 0;
}
-int ReplicationResult::makeSelection(const char* name, int nameLength)
+int ReplicationResult::makeSelection(const char *name, int nameLength)
{
- const bdlat_SelectionInfo* selectionInfo = lookupSelectionInfo(name,
- nameLength);
+ const bdlat_SelectionInfo *selectionInfo =
+ lookupSelectionInfo(name, nameLength);
if (0 == selectionInfo) {
- return -1;
+ return -1;
}
return makeSelection(selectionInfo->d_id);
@@ -17339,7 +19171,8 @@ Error& ReplicationResult::makeError()
}
else {
reset();
- new (d_error.buffer()) Error(d_allocator_p);
+ new (d_error.buffer())
+ Error(d_allocator_p);
d_selectionId = SELECTION_ID_ERROR;
}
@@ -17353,15 +19186,16 @@ Error& ReplicationResult::makeError(const Error& value)
}
else {
reset();
- new (d_error.buffer()) Error(value, d_allocator_p);
+ new (d_error.buffer())
+ Error(value, d_allocator_p);
d_selectionId = SELECTION_ID_ERROR;
}
return d_error.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Error& ReplicationResult::makeError(Error&& value)
{
if (SELECTION_ID_ERROR == d_selectionId) {
@@ -17369,7 +19203,8 @@ Error& ReplicationResult::makeError(Error&& value)
}
else {
reset();
- new (d_error.buffer()) Error(bsl::move(value), d_allocator_p);
+ new (d_error.buffer())
+ Error(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_ERROR;
}
@@ -17384,7 +19219,8 @@ Tunable& ReplicationResult::makeTunable()
}
else {
reset();
- new (d_tunable.buffer()) Tunable(d_allocator_p);
+ new (d_tunable.buffer())
+ Tunable(d_allocator_p);
d_selectionId = SELECTION_ID_TUNABLE;
}
@@ -17398,15 +19234,16 @@ Tunable& ReplicationResult::makeTunable(const Tunable& value)
}
else {
reset();
- new (d_tunable.buffer()) Tunable(value, d_allocator_p);
+ new (d_tunable.buffer())
+ Tunable(value, d_allocator_p);
d_selectionId = SELECTION_ID_TUNABLE;
}
return d_tunable.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Tunable& ReplicationResult::makeTunable(Tunable&& value)
{
if (SELECTION_ID_TUNABLE == d_selectionId) {
@@ -17414,7 +19251,8 @@ Tunable& ReplicationResult::makeTunable(Tunable&& value)
}
else {
reset();
- new (d_tunable.buffer()) Tunable(bsl::move(value), d_allocator_p);
+ new (d_tunable.buffer())
+ Tunable(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_TUNABLE;
}
@@ -17429,7 +19267,8 @@ Tunables& ReplicationResult::makeTunables()
}
else {
reset();
- new (d_tunables.buffer()) Tunables(d_allocator_p);
+ new (d_tunables.buffer())
+ Tunables(d_allocator_p);
d_selectionId = SELECTION_ID_TUNABLES;
}
@@ -17443,15 +19282,16 @@ Tunables& ReplicationResult::makeTunables(const Tunables& value)
}
else {
reset();
- new (d_tunables.buffer()) Tunables(value, d_allocator_p);
+ new (d_tunables.buffer())
+ Tunables(value, d_allocator_p);
d_selectionId = SELECTION_ID_TUNABLES;
}
return d_tunables.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Tunables& ReplicationResult::makeTunables(Tunables&& value)
{
if (SELECTION_ID_TUNABLES == d_selectionId) {
@@ -17459,7 +19299,8 @@ Tunables& ReplicationResult::makeTunables(Tunables&& value)
}
else {
reset();
- new (d_tunables.buffer()) Tunables(bsl::move(value), d_allocator_p);
+ new (d_tunables.buffer())
+ Tunables(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_TUNABLES;
}
@@ -17475,15 +19316,14 @@ TunableConfirmation& ReplicationResult::makeTunableConfirmation()
else {
reset();
new (d_tunableConfirmation.buffer())
- TunableConfirmation(d_allocator_p);
+ TunableConfirmation(d_allocator_p);
d_selectionId = SELECTION_ID_TUNABLE_CONFIRMATION;
}
return d_tunableConfirmation.object();
}
-TunableConfirmation&
-ReplicationResult::makeTunableConfirmation(const TunableConfirmation& value)
+TunableConfirmation& ReplicationResult::makeTunableConfirmation(const TunableConfirmation& value)
{
if (SELECTION_ID_TUNABLE_CONFIRMATION == d_selectionId) {
d_tunableConfirmation.object() = value;
@@ -17491,17 +19331,16 @@ ReplicationResult::makeTunableConfirmation(const TunableConfirmation& value)
else {
reset();
new (d_tunableConfirmation.buffer())
- TunableConfirmation(value, d_allocator_p);
+ TunableConfirmation(value, d_allocator_p);
d_selectionId = SELECTION_ID_TUNABLE_CONFIRMATION;
}
return d_tunableConfirmation.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-TunableConfirmation&
-ReplicationResult::makeTunableConfirmation(TunableConfirmation&& value)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+TunableConfirmation& ReplicationResult::makeTunableConfirmation(TunableConfirmation&& value)
{
if (SELECTION_ID_TUNABLE_CONFIRMATION == d_selectionId) {
d_tunableConfirmation.object() = bsl::move(value);
@@ -17509,7 +19348,7 @@ ReplicationResult::makeTunableConfirmation(TunableConfirmation&& value)
else {
reset();
new (d_tunableConfirmation.buffer())
- TunableConfirmation(bsl::move(value), d_allocator_p);
+ TunableConfirmation(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_TUNABLE_CONFIRMATION;
}
@@ -17519,91 +19358,103 @@ ReplicationResult::makeTunableConfirmation(TunableConfirmation&& value)
// ACCESSORS
-bsl::ostream& ReplicationResult::print(bsl::ostream& stream,
- int level,
- int spacesPerLevel) const
+bsl::ostream& ReplicationResult::print(
+ bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
switch (d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
printer.printAttribute("error", d_error.object());
- } break;
- case SELECTION_ID_TUNABLE: {
+ } break;
+ case SELECTION_ID_TUNABLE: {
printer.printAttribute("tunable", d_tunable.object());
- } break;
- case SELECTION_ID_TUNABLES: {
+ } break;
+ case SELECTION_ID_TUNABLES: {
printer.printAttribute("tunables", d_tunables.object());
- } break;
- case SELECTION_ID_TUNABLE_CONFIRMATION: {
- printer.printAttribute("tunableConfirmation",
- d_tunableConfirmation.object());
- } break;
- default: stream << "SELECTION UNDEFINED\n";
+ } break;
+ case SELECTION_ID_TUNABLE_CONFIRMATION: {
+ printer.printAttribute("tunableConfirmation", d_tunableConfirmation.object());
+ } break;
+ default:
+ stream << "SELECTION UNDEFINED\n";
}
printer.end();
return stream;
}
-const char* ReplicationResult::selectionName() const
+
+const char *ReplicationResult::selectionName() const
{
switch (d_selectionId) {
- case SELECTION_ID_ERROR:
+ case SELECTION_ID_ERROR:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR].name();
- case SELECTION_ID_TUNABLE:
+ case SELECTION_ID_TUNABLE:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE].name();
- case SELECTION_ID_TUNABLES:
+ case SELECTION_ID_TUNABLES:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLES].name();
- case SELECTION_ID_TUNABLE_CONFIRMATION:
- return SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE_CONFIRMATION]
- .name();
- default:
+ case SELECTION_ID_TUNABLE_CONFIRMATION:
+ return SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE_CONFIRMATION].name();
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
return "(* UNDEFINED *)";
}
}
-// --------------------
-// class RouterConsumer
-// --------------------
+ // --------------------
+ // class RouterConsumer
+ // --------------------
// CONSTANTS
const char RouterConsumer::CLASS_NAME[] = "RouterConsumer";
const bdlat_AttributeInfo RouterConsumer::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_PRIORITY,
- "priority",
- sizeof("priority") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_QUEUE_HANDLE,
- "queueHandle",
- sizeof("queueHandle") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {ATTRIBUTE_ID_COUNT,
- "count",
- sizeof("count") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_EXPRESSION,
- "expression",
- sizeof("expression") - 1,
- "",
- bdlat_FormattingMode::e_TEXT}};
+ {
+ ATTRIBUTE_ID_PRIORITY,
+ "priority",
+ sizeof("priority") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_QUEUE_HANDLE,
+ "queueHandle",
+ sizeof("queueHandle") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ ATTRIBUTE_ID_COUNT,
+ "count",
+ sizeof("count") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_EXPRESSION,
+ "expression",
+ sizeof("expression") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo*
-RouterConsumer::lookupAttributeInfo(const char* name, int nameLength)
+const bdlat_AttributeInfo *RouterConsumer::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 4; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- RouterConsumer::ATTRIBUTE_INFO_ARRAY[i];
+ RouterConsumer::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -17611,24 +19462,25 @@ RouterConsumer::lookupAttributeInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_AttributeInfo* RouterConsumer::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *RouterConsumer::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_PRIORITY:
+ case ATTRIBUTE_ID_PRIORITY:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIORITY];
- case ATTRIBUTE_ID_QUEUE_HANDLE:
+ case ATTRIBUTE_ID_QUEUE_HANDLE:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_HANDLE];
- case ATTRIBUTE_ID_COUNT:
+ case ATTRIBUTE_ID_COUNT:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COUNT];
- case ATTRIBUTE_ID_EXPRESSION:
+ case ATTRIBUTE_ID_EXPRESSION:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_EXPRESSION];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-RouterConsumer::RouterConsumer(bslma::Allocator* basicAllocator)
+RouterConsumer::RouterConsumer(bslma::Allocator *basicAllocator)
: d_expression(basicAllocator)
, d_queueHandle(basicAllocator)
, d_count()
@@ -17637,7 +19489,7 @@ RouterConsumer::RouterConsumer(bslma::Allocator* basicAllocator)
}
RouterConsumer::RouterConsumer(const RouterConsumer& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_expression(original.d_expression, basicAllocator)
, d_queueHandle(original.d_queueHandle, basicAllocator)
, d_count(original.d_count)
@@ -17645,18 +19497,18 @@ RouterConsumer::RouterConsumer(const RouterConsumer& original,
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
RouterConsumer::RouterConsumer(RouterConsumer&& original) noexcept
-: d_expression(bsl::move(original.d_expression)),
- d_queueHandle(bsl::move(original.d_queueHandle)),
- d_count(bsl::move(original.d_count)),
- d_priority(bsl::move(original.d_priority))
+: d_expression(bsl::move(original.d_expression))
+, d_queueHandle(bsl::move(original.d_queueHandle))
+, d_count(bsl::move(original.d_count))
+, d_priority(bsl::move(original.d_priority))
{
}
-RouterConsumer::RouterConsumer(RouterConsumer&& original,
- bslma::Allocator* basicAllocator)
+RouterConsumer::RouterConsumer(RouterConsumer&& original,
+ bslma::Allocator *basicAllocator)
: d_expression(bsl::move(original.d_expression), basicAllocator)
, d_queueHandle(bsl::move(original.d_queueHandle), basicAllocator)
, d_count(bsl::move(original.d_count))
@@ -17671,27 +19523,29 @@ RouterConsumer::~RouterConsumer()
// MANIPULATORS
-RouterConsumer& RouterConsumer::operator=(const RouterConsumer& rhs)
+RouterConsumer&
+RouterConsumer::operator=(const RouterConsumer& rhs)
{
if (this != &rhs) {
- d_priority = rhs.d_priority;
+ d_priority = rhs.d_priority;
d_queueHandle = rhs.d_queueHandle;
- d_count = rhs.d_count;
- d_expression = rhs.d_expression;
+ d_count = rhs.d_count;
+ d_expression = rhs.d_expression;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-RouterConsumer& RouterConsumer::operator=(RouterConsumer&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+RouterConsumer&
+RouterConsumer::operator=(RouterConsumer&& rhs)
{
if (this != &rhs) {
- d_priority = bsl::move(rhs.d_priority);
+ d_priority = bsl::move(rhs.d_priority);
d_queueHandle = bsl::move(rhs.d_queueHandle);
- d_count = bsl::move(rhs.d_count);
- d_expression = bsl::move(rhs.d_expression);
+ d_count = bsl::move(rhs.d_count);
+ d_expression = bsl::move(rhs.d_expression);
}
return *this;
@@ -17722,32 +19576,39 @@ bsl::ostream& RouterConsumer::print(bsl::ostream& stream,
return stream;
}
-// -------------
-// class Routing
-// -------------
+
+
+ // -------------
+ // class Routing
+ // -------------
// CONSTANTS
const char Routing::CLASS_NAME[] = "Routing";
const bdlat_AttributeInfo Routing::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_SUBSCRIPTION_GROUPS,
- "subscriptionGroups",
- sizeof("subscriptionGroups") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ ATTRIBUTE_ID_SUBSCRIPTION_GROUPS,
+ "subscriptionGroups",
+ sizeof("subscriptionGroups") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* Routing::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *Routing::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 1; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- Routing::ATTRIBUTE_INFO_ARRAY[i];
+ Routing::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -17755,37 +19616,39 @@ const bdlat_AttributeInfo* Routing::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* Routing::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *Routing::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_SUBSCRIPTION_GROUPS:
+ case ATTRIBUTE_ID_SUBSCRIPTION_GROUPS:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUBSCRIPTION_GROUPS];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-Routing::Routing(bslma::Allocator* basicAllocator)
+Routing::Routing(bslma::Allocator *basicAllocator)
: d_subscriptionGroups(basicAllocator)
{
}
-Routing::Routing(const Routing& original, bslma::Allocator* basicAllocator)
+Routing::Routing(const Routing& original,
+ bslma::Allocator *basicAllocator)
: d_subscriptionGroups(original.d_subscriptionGroups, basicAllocator)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Routing::Routing(Routing&& original) noexcept
: d_subscriptionGroups(bsl::move(original.d_subscriptionGroups))
{
}
-Routing::Routing(Routing&& original, bslma::Allocator* basicAllocator)
-: d_subscriptionGroups(bsl::move(original.d_subscriptionGroups),
- basicAllocator)
+Routing::Routing(Routing&& original,
+ bslma::Allocator *basicAllocator)
+: d_subscriptionGroups(bsl::move(original.d_subscriptionGroups), basicAllocator)
{
}
#endif
@@ -17796,7 +19659,8 @@ Routing::~Routing()
// MANIPULATORS
-Routing& Routing::operator=(const Routing& rhs)
+Routing&
+Routing::operator=(const Routing& rhs)
{
if (this != &rhs) {
d_subscriptionGroups = rhs.d_subscriptionGroups;
@@ -17805,9 +19669,10 @@ Routing& Routing::operator=(const Routing& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-Routing& Routing::operator=(Routing&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+Routing&
+Routing::operator=(Routing&& rhs)
{
if (this != &rhs) {
d_subscriptionGroups = bsl::move(rhs.d_subscriptionGroups);
@@ -17824,8 +19689,9 @@ void Routing::reset()
// ACCESSORS
-bsl::ostream&
-Routing::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& Routing::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
@@ -17834,52 +19700,67 @@ Routing::print(bsl::ostream& stream, int level, int spacesPerLevel) const
return stream;
}
-// ----------------
-// class StatResult
-// ----------------
+
+
+ // ----------------
+ // class StatResult
+ // ----------------
// CONSTANTS
const char StatResult::CLASS_NAME[] = "StatResult";
const bdlat_SelectionInfo StatResult::SELECTION_INFO_ARRAY[] = {
- {SELECTION_ID_ERROR,
- "error",
- sizeof("error") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_STATS,
- "stats",
- sizeof("stats") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {SELECTION_ID_TUNABLE,
- "tunable",
- sizeof("tunable") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_TUNABLES,
- "tunables",
- sizeof("tunables") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_TUNABLE_CONFIRMATION,
- "tunableConfirmation",
- sizeof("tunableConfirmation") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ SELECTION_ID_ERROR,
+ "error",
+ sizeof("error") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_STATS,
+ "stats",
+ sizeof("stats") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ SELECTION_ID_TUNABLE,
+ "tunable",
+ sizeof("tunable") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_TUNABLES,
+ "tunables",
+ sizeof("tunables") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_TUNABLE_CONFIRMATION,
+ "tunableConfirmation",
+ sizeof("tunableConfirmation") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_SelectionInfo* StatResult::lookupSelectionInfo(const char* name,
- int nameLength)
+const bdlat_SelectionInfo *StatResult::lookupSelectionInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 5; ++i) {
const bdlat_SelectionInfo& selectionInfo =
- StatResult::SELECTION_INFO_ARRAY[i];
+ StatResult::SELECTION_INFO_ARRAY[i];
- if (nameLength == selectionInfo.d_nameLength &&
- 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength)) {
+ if (nameLength == selectionInfo.d_nameLength
+ && 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength))
+ {
return &selectionInfo;
}
}
@@ -17887,140 +19768,161 @@ const bdlat_SelectionInfo* StatResult::lookupSelectionInfo(const char* name,
return 0;
}
-const bdlat_SelectionInfo* StatResult::lookupSelectionInfo(int id)
+const bdlat_SelectionInfo *StatResult::lookupSelectionInfo(int id)
{
switch (id) {
- case SELECTION_ID_ERROR:
+ case SELECTION_ID_ERROR:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR];
- case SELECTION_ID_STATS:
+ case SELECTION_ID_STATS:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_STATS];
- case SELECTION_ID_TUNABLE:
+ case SELECTION_ID_TUNABLE:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE];
- case SELECTION_ID_TUNABLES:
+ case SELECTION_ID_TUNABLES:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLES];
- case SELECTION_ID_TUNABLE_CONFIRMATION:
+ case SELECTION_ID_TUNABLE_CONFIRMATION:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE_CONFIRMATION];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-StatResult::StatResult(const StatResult& original,
- bslma::Allocator* basicAllocator)
+StatResult::StatResult(
+ const StatResult& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_ERROR: {
- new (d_error.buffer()) Error(original.d_error.object(), d_allocator_p);
- } break;
- case SELECTION_ID_STATS: {
+ case SELECTION_ID_ERROR: {
+ new (d_error.buffer())
+ Error(
+ original.d_error.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_STATS: {
new (d_stats.buffer())
- bsl::string(original.d_stats.object(), d_allocator_p);
- } break;
- case SELECTION_ID_TUNABLE: {
+ bsl::string(
+ original.d_stats.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_TUNABLE: {
new (d_tunable.buffer())
- Tunable(original.d_tunable.object(), d_allocator_p);
- } break;
- case SELECTION_ID_TUNABLES: {
+ Tunable(
+ original.d_tunable.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_TUNABLES: {
new (d_tunables.buffer())
- Tunables(original.d_tunables.object(), d_allocator_p);
- } break;
- case SELECTION_ID_TUNABLE_CONFIRMATION: {
+ Tunables(
+ original.d_tunables.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_TUNABLE_CONFIRMATION: {
new (d_tunableConfirmation.buffer())
- TunableConfirmation(original.d_tunableConfirmation.object(),
- d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ TunableConfirmation(
+ original.d_tunableConfirmation.object(), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
StatResult::StatResult(StatResult&& original) noexcept
-: d_selectionId(original.d_selectionId),
- d_allocator_p(original.d_allocator_p)
+: d_selectionId(original.d_selectionId)
+, d_allocator_p(original.d_allocator_p)
{
switch (d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
new (d_error.buffer())
- Error(bsl::move(original.d_error.object()), d_allocator_p);
- } break;
- case SELECTION_ID_STATS: {
+ Error(
+ bsl::move(original.d_error.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_STATS: {
new (d_stats.buffer())
- bsl::string(bsl::move(original.d_stats.object()), d_allocator_p);
- } break;
- case SELECTION_ID_TUNABLE: {
+ bsl::string(
+ bsl::move(original.d_stats.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_TUNABLE: {
new (d_tunable.buffer())
- Tunable(bsl::move(original.d_tunable.object()), d_allocator_p);
- } break;
- case SELECTION_ID_TUNABLES: {
+ Tunable(
+ bsl::move(original.d_tunable.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_TUNABLES: {
new (d_tunables.buffer())
- Tunables(bsl::move(original.d_tunables.object()), d_allocator_p);
- } break;
- case SELECTION_ID_TUNABLE_CONFIRMATION: {
- new (d_tunableConfirmation.buffer()) TunableConfirmation(
- bsl::move(original.d_tunableConfirmation.object()),
- d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ Tunables(
+ bsl::move(original.d_tunables.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_TUNABLE_CONFIRMATION: {
+ new (d_tunableConfirmation.buffer())
+ TunableConfirmation(
+ bsl::move(original.d_tunableConfirmation.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-StatResult::StatResult(StatResult&& original, bslma::Allocator* basicAllocator)
+StatResult::StatResult(
+ StatResult&& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
new (d_error.buffer())
- Error(bsl::move(original.d_error.object()), d_allocator_p);
- } break;
- case SELECTION_ID_STATS: {
+ Error(
+ bsl::move(original.d_error.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_STATS: {
new (d_stats.buffer())
- bsl::string(bsl::move(original.d_stats.object()), d_allocator_p);
- } break;
- case SELECTION_ID_TUNABLE: {
+ bsl::string(
+ bsl::move(original.d_stats.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_TUNABLE: {
new (d_tunable.buffer())
- Tunable(bsl::move(original.d_tunable.object()), d_allocator_p);
- } break;
- case SELECTION_ID_TUNABLES: {
+ Tunable(
+ bsl::move(original.d_tunable.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_TUNABLES: {
new (d_tunables.buffer())
- Tunables(bsl::move(original.d_tunables.object()), d_allocator_p);
- } break;
- case SELECTION_ID_TUNABLE_CONFIRMATION: {
- new (d_tunableConfirmation.buffer()) TunableConfirmation(
- bsl::move(original.d_tunableConfirmation.object()),
- d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ Tunables(
+ bsl::move(original.d_tunables.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_TUNABLE_CONFIRMATION: {
+ new (d_tunableConfirmation.buffer())
+ TunableConfirmation(
+ bsl::move(original.d_tunableConfirmation.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
#endif
// MANIPULATORS
-StatResult& StatResult::operator=(const StatResult& rhs)
+StatResult&
+StatResult::operator=(const StatResult& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
makeError(rhs.d_error.object());
- } break;
- case SELECTION_ID_STATS: {
+ } break;
+ case SELECTION_ID_STATS: {
makeStats(rhs.d_stats.object());
- } break;
- case SELECTION_ID_TUNABLE: {
+ } break;
+ case SELECTION_ID_TUNABLE: {
makeTunable(rhs.d_tunable.object());
- } break;
- case SELECTION_ID_TUNABLES: {
+ } break;
+ case SELECTION_ID_TUNABLES: {
makeTunables(rhs.d_tunables.object());
- } break;
- case SELECTION_ID_TUNABLE_CONFIRMATION: {
+ } break;
+ case SELECTION_ID_TUNABLE_CONFIRMATION: {
makeTunableConfirmation(rhs.d_tunableConfirmation.object());
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -18029,29 +19931,29 @@ StatResult& StatResult::operator=(const StatResult& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-StatResult& StatResult::operator=(StatResult&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+StatResult&
+StatResult::operator=(StatResult&& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
makeError(bsl::move(rhs.d_error.object()));
- } break;
- case SELECTION_ID_STATS: {
+ } break;
+ case SELECTION_ID_STATS: {
makeStats(bsl::move(rhs.d_stats.object()));
- } break;
- case SELECTION_ID_TUNABLE: {
+ } break;
+ case SELECTION_ID_TUNABLE: {
makeTunable(bsl::move(rhs.d_tunable.object()));
- } break;
- case SELECTION_ID_TUNABLES: {
+ } break;
+ case SELECTION_ID_TUNABLES: {
makeTunables(bsl::move(rhs.d_tunables.object()));
- } break;
- case SELECTION_ID_TUNABLE_CONFIRMATION: {
- makeTunableConfirmation(
- bsl::move(rhs.d_tunableConfirmation.object()));
- } break;
- default:
+ } break;
+ case SELECTION_ID_TUNABLE_CONFIRMATION: {
+ makeTunableConfirmation(bsl::move(rhs.d_tunableConfirmation.object()));
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -18064,23 +19966,24 @@ StatResult& StatResult::operator=(StatResult&& rhs)
void StatResult::reset()
{
switch (d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
d_error.object().~Error();
- } break;
- case SELECTION_ID_STATS: {
+ } break;
+ case SELECTION_ID_STATS: {
typedef bsl::string Type;
d_stats.object().~Type();
- } break;
- case SELECTION_ID_TUNABLE: {
+ } break;
+ case SELECTION_ID_TUNABLE: {
d_tunable.object().~Tunable();
- } break;
- case SELECTION_ID_TUNABLES: {
+ } break;
+ case SELECTION_ID_TUNABLES: {
d_tunables.object().~Tunables();
- } break;
- case SELECTION_ID_TUNABLE_CONFIRMATION: {
+ } break;
+ case SELECTION_ID_TUNABLE_CONFIRMATION: {
d_tunableConfirmation.object().~TunableConfirmation();
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
d_selectionId = SELECTION_ID_UNDEFINED;
@@ -18089,35 +19992,36 @@ void StatResult::reset()
int StatResult::makeSelection(int selectionId)
{
switch (selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
makeError();
- } break;
- case SELECTION_ID_STATS: {
+ } break;
+ case SELECTION_ID_STATS: {
makeStats();
- } break;
- case SELECTION_ID_TUNABLE: {
+ } break;
+ case SELECTION_ID_TUNABLE: {
makeTunable();
- } break;
- case SELECTION_ID_TUNABLES: {
+ } break;
+ case SELECTION_ID_TUNABLES: {
makeTunables();
- } break;
- case SELECTION_ID_TUNABLE_CONFIRMATION: {
+ } break;
+ case SELECTION_ID_TUNABLE_CONFIRMATION: {
makeTunableConfirmation();
- } break;
- case SELECTION_ID_UNDEFINED: {
+ } break;
+ case SELECTION_ID_UNDEFINED: {
reset();
- } break;
- default: return -1;
+ } break;
+ default:
+ return -1;
}
return 0;
}
-int StatResult::makeSelection(const char* name, int nameLength)
+int StatResult::makeSelection(const char *name, int nameLength)
{
- const bdlat_SelectionInfo* selectionInfo = lookupSelectionInfo(name,
- nameLength);
+ const bdlat_SelectionInfo *selectionInfo =
+ lookupSelectionInfo(name, nameLength);
if (0 == selectionInfo) {
- return -1;
+ return -1;
}
return makeSelection(selectionInfo->d_id);
@@ -18130,7 +20034,8 @@ Error& StatResult::makeError()
}
else {
reset();
- new (d_error.buffer()) Error(d_allocator_p);
+ new (d_error.buffer())
+ Error(d_allocator_p);
d_selectionId = SELECTION_ID_ERROR;
}
@@ -18144,15 +20049,16 @@ Error& StatResult::makeError(const Error& value)
}
else {
reset();
- new (d_error.buffer()) Error(value, d_allocator_p);
+ new (d_error.buffer())
+ Error(value, d_allocator_p);
d_selectionId = SELECTION_ID_ERROR;
}
return d_error.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Error& StatResult::makeError(Error&& value)
{
if (SELECTION_ID_ERROR == d_selectionId) {
@@ -18160,7 +20066,8 @@ Error& StatResult::makeError(Error&& value)
}
else {
reset();
- new (d_error.buffer()) Error(bsl::move(value), d_allocator_p);
+ new (d_error.buffer())
+ Error(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_ERROR;
}
@@ -18175,7 +20082,8 @@ bsl::string& StatResult::makeStats()
}
else {
reset();
- new (d_stats.buffer()) bsl::string(d_allocator_p);
+ new (d_stats.buffer())
+ bsl::string(d_allocator_p);
d_selectionId = SELECTION_ID_STATS;
}
@@ -18189,15 +20097,16 @@ bsl::string& StatResult::makeStats(const bsl::string& value)
}
else {
reset();
- new (d_stats.buffer()) bsl::string(value, d_allocator_p);
+ new (d_stats.buffer())
+ bsl::string(value, d_allocator_p);
d_selectionId = SELECTION_ID_STATS;
}
return d_stats.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
bsl::string& StatResult::makeStats(bsl::string&& value)
{
if (SELECTION_ID_STATS == d_selectionId) {
@@ -18205,7 +20114,8 @@ bsl::string& StatResult::makeStats(bsl::string&& value)
}
else {
reset();
- new (d_stats.buffer()) bsl::string(bsl::move(value), d_allocator_p);
+ new (d_stats.buffer())
+ bsl::string(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_STATS;
}
@@ -18220,7 +20130,8 @@ Tunable& StatResult::makeTunable()
}
else {
reset();
- new (d_tunable.buffer()) Tunable(d_allocator_p);
+ new (d_tunable.buffer())
+ Tunable(d_allocator_p);
d_selectionId = SELECTION_ID_TUNABLE;
}
@@ -18234,15 +20145,16 @@ Tunable& StatResult::makeTunable(const Tunable& value)
}
else {
reset();
- new (d_tunable.buffer()) Tunable(value, d_allocator_p);
+ new (d_tunable.buffer())
+ Tunable(value, d_allocator_p);
d_selectionId = SELECTION_ID_TUNABLE;
}
return d_tunable.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Tunable& StatResult::makeTunable(Tunable&& value)
{
if (SELECTION_ID_TUNABLE == d_selectionId) {
@@ -18250,7 +20162,8 @@ Tunable& StatResult::makeTunable(Tunable&& value)
}
else {
reset();
- new (d_tunable.buffer()) Tunable(bsl::move(value), d_allocator_p);
+ new (d_tunable.buffer())
+ Tunable(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_TUNABLE;
}
@@ -18265,7 +20178,8 @@ Tunables& StatResult::makeTunables()
}
else {
reset();
- new (d_tunables.buffer()) Tunables(d_allocator_p);
+ new (d_tunables.buffer())
+ Tunables(d_allocator_p);
d_selectionId = SELECTION_ID_TUNABLES;
}
@@ -18279,15 +20193,16 @@ Tunables& StatResult::makeTunables(const Tunables& value)
}
else {
reset();
- new (d_tunables.buffer()) Tunables(value, d_allocator_p);
+ new (d_tunables.buffer())
+ Tunables(value, d_allocator_p);
d_selectionId = SELECTION_ID_TUNABLES;
}
return d_tunables.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Tunables& StatResult::makeTunables(Tunables&& value)
{
if (SELECTION_ID_TUNABLES == d_selectionId) {
@@ -18295,7 +20210,8 @@ Tunables& StatResult::makeTunables(Tunables&& value)
}
else {
reset();
- new (d_tunables.buffer()) Tunables(bsl::move(value), d_allocator_p);
+ new (d_tunables.buffer())
+ Tunables(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_TUNABLES;
}
@@ -18311,15 +20227,14 @@ TunableConfirmation& StatResult::makeTunableConfirmation()
else {
reset();
new (d_tunableConfirmation.buffer())
- TunableConfirmation(d_allocator_p);
+ TunableConfirmation(d_allocator_p);
d_selectionId = SELECTION_ID_TUNABLE_CONFIRMATION;
}
return d_tunableConfirmation.object();
}
-TunableConfirmation&
-StatResult::makeTunableConfirmation(const TunableConfirmation& value)
+TunableConfirmation& StatResult::makeTunableConfirmation(const TunableConfirmation& value)
{
if (SELECTION_ID_TUNABLE_CONFIRMATION == d_selectionId) {
d_tunableConfirmation.object() = value;
@@ -18327,17 +20242,16 @@ StatResult::makeTunableConfirmation(const TunableConfirmation& value)
else {
reset();
new (d_tunableConfirmation.buffer())
- TunableConfirmation(value, d_allocator_p);
+ TunableConfirmation(value, d_allocator_p);
d_selectionId = SELECTION_ID_TUNABLE_CONFIRMATION;
}
return d_tunableConfirmation.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-TunableConfirmation&
-StatResult::makeTunableConfirmation(TunableConfirmation&& value)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+TunableConfirmation& StatResult::makeTunableConfirmation(TunableConfirmation&& value)
{
if (SELECTION_ID_TUNABLE_CONFIRMATION == d_selectionId) {
d_tunableConfirmation.object() = bsl::move(value);
@@ -18345,7 +20259,7 @@ StatResult::makeTunableConfirmation(TunableConfirmation&& value)
else {
reset();
new (d_tunableConfirmation.buffer())
- TunableConfirmation(bsl::move(value), d_allocator_p);
+ TunableConfirmation(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_TUNABLE_CONFIRMATION;
}
@@ -18355,100 +20269,115 @@ StatResult::makeTunableConfirmation(TunableConfirmation&& value)
// ACCESSORS
-bsl::ostream&
-StatResult::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& StatResult::print(
+ bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
switch (d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
printer.printAttribute("error", d_error.object());
- } break;
- case SELECTION_ID_STATS: {
+ } break;
+ case SELECTION_ID_STATS: {
printer.printAttribute("stats", d_stats.object());
- } break;
- case SELECTION_ID_TUNABLE: {
+ } break;
+ case SELECTION_ID_TUNABLE: {
printer.printAttribute("tunable", d_tunable.object());
- } break;
- case SELECTION_ID_TUNABLES: {
+ } break;
+ case SELECTION_ID_TUNABLES: {
printer.printAttribute("tunables", d_tunables.object());
- } break;
- case SELECTION_ID_TUNABLE_CONFIRMATION: {
- printer.printAttribute("tunableConfirmation",
- d_tunableConfirmation.object());
- } break;
- default: stream << "SELECTION UNDEFINED\n";
+ } break;
+ case SELECTION_ID_TUNABLE_CONFIRMATION: {
+ printer.printAttribute("tunableConfirmation", d_tunableConfirmation.object());
+ } break;
+ default:
+ stream << "SELECTION UNDEFINED\n";
}
printer.end();
return stream;
}
-const char* StatResult::selectionName() const
+
+const char *StatResult::selectionName() const
{
switch (d_selectionId) {
- case SELECTION_ID_ERROR:
+ case SELECTION_ID_ERROR:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR].name();
- case SELECTION_ID_STATS:
+ case SELECTION_ID_STATS:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_STATS].name();
- case SELECTION_ID_TUNABLE:
+ case SELECTION_ID_TUNABLE:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE].name();
- case SELECTION_ID_TUNABLES:
+ case SELECTION_ID_TUNABLES:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLES].name();
- case SELECTION_ID_TUNABLE_CONFIRMATION:
- return SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE_CONFIRMATION]
- .name();
- default:
+ case SELECTION_ID_TUNABLE_CONFIRMATION:
+ return SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE_CONFIRMATION].name();
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
return "(* UNDEFINED *)";
}
}
-// --------------------
-// class StorageCommand
-// --------------------
+ // --------------------
+ // class StorageCommand
+ // --------------------
// CONSTANTS
const char StorageCommand::CLASS_NAME[] = "StorageCommand";
const bdlat_SelectionInfo StorageCommand::SELECTION_INFO_ARRAY[] = {
- {SELECTION_ID_SUMMARY,
- "summary",
- sizeof("summary") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_PARTITION,
- "partition",
- sizeof("partition") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_DOMAIN,
- "domain",
- sizeof("domain") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_QUEUE,
- "queue",
- sizeof("queue") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_REPLICATION,
- "replication",
- sizeof("replication") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ SELECTION_ID_SUMMARY,
+ "summary",
+ sizeof("summary") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_PARTITION,
+ "partition",
+ sizeof("partition") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_DOMAIN,
+ "domain",
+ sizeof("domain") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_QUEUE,
+ "queue",
+ sizeof("queue") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_REPLICATION,
+ "replication",
+ sizeof("replication") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_SelectionInfo*
-StorageCommand::lookupSelectionInfo(const char* name, int nameLength)
+const bdlat_SelectionInfo *StorageCommand::lookupSelectionInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 5; ++i) {
const bdlat_SelectionInfo& selectionInfo =
- StorageCommand::SELECTION_INFO_ARRAY[i];
+ StorageCommand::SELECTION_INFO_ARRAY[i];
- if (nameLength == selectionInfo.d_nameLength &&
- 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength)) {
+ if (nameLength == selectionInfo.d_nameLength
+ && 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength))
+ {
return &selectionInfo;
}
}
@@ -18456,140 +20385,155 @@ StorageCommand::lookupSelectionInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_SelectionInfo* StorageCommand::lookupSelectionInfo(int id)
+const bdlat_SelectionInfo *StorageCommand::lookupSelectionInfo(int id)
{
switch (id) {
- case SELECTION_ID_SUMMARY:
+ case SELECTION_ID_SUMMARY:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_SUMMARY];
- case SELECTION_ID_PARTITION:
+ case SELECTION_ID_PARTITION:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_PARTITION];
- case SELECTION_ID_DOMAIN:
+ case SELECTION_ID_DOMAIN:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAIN];
- case SELECTION_ID_QUEUE:
+ case SELECTION_ID_QUEUE:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE];
- case SELECTION_ID_REPLICATION:
+ case SELECTION_ID_REPLICATION:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_REPLICATION];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-StorageCommand::StorageCommand(const StorageCommand& original,
- bslma::Allocator* basicAllocator)
+StorageCommand::StorageCommand(
+ const StorageCommand& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_SUMMARY: {
- new (d_summary.buffer()) Void(original.d_summary.object());
- } break;
- case SELECTION_ID_PARTITION: {
+ case SELECTION_ID_SUMMARY: {
+ new (d_summary.buffer())
+ Void(original.d_summary.object());
+ } break;
+ case SELECTION_ID_PARTITION: {
new (d_partition.buffer())
StoragePartition(original.d_partition.object());
- } break;
- case SELECTION_ID_DOMAIN: {
+ } break;
+ case SELECTION_ID_DOMAIN: {
new (d_domain.buffer())
- StorageDomain(original.d_domain.object(), d_allocator_p);
- } break;
- case SELECTION_ID_QUEUE: {
+ StorageDomain(
+ original.d_domain.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_QUEUE: {
new (d_queue.buffer())
- StorageQueue(original.d_queue.object(), d_allocator_p);
- } break;
- case SELECTION_ID_REPLICATION: {
+ StorageQueue(
+ original.d_queue.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_REPLICATION: {
new (d_replication.buffer())
- ReplicationCommand(original.d_replication.object(), d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ ReplicationCommand(
+ original.d_replication.object(), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
StorageCommand::StorageCommand(StorageCommand&& original) noexcept
-: d_selectionId(original.d_selectionId),
- d_allocator_p(original.d_allocator_p)
+: d_selectionId(original.d_selectionId)
+, d_allocator_p(original.d_allocator_p)
{
switch (d_selectionId) {
- case SELECTION_ID_SUMMARY: {
- new (d_summary.buffer()) Void(bsl::move(original.d_summary.object()));
- } break;
- case SELECTION_ID_PARTITION: {
+ case SELECTION_ID_SUMMARY: {
+ new (d_summary.buffer())
+ Void(bsl::move(original.d_summary.object()));
+ } break;
+ case SELECTION_ID_PARTITION: {
new (d_partition.buffer())
StoragePartition(bsl::move(original.d_partition.object()));
- } break;
- case SELECTION_ID_DOMAIN: {
+ } break;
+ case SELECTION_ID_DOMAIN: {
new (d_domain.buffer())
- StorageDomain(bsl::move(original.d_domain.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_QUEUE: {
+ StorageDomain(
+ bsl::move(original.d_domain.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_QUEUE: {
new (d_queue.buffer())
- StorageQueue(bsl::move(original.d_queue.object()), d_allocator_p);
- } break;
- case SELECTION_ID_REPLICATION: {
+ StorageQueue(
+ bsl::move(original.d_queue.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_REPLICATION: {
new (d_replication.buffer())
- ReplicationCommand(bsl::move(original.d_replication.object()),
- d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ ReplicationCommand(
+ bsl::move(original.d_replication.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-StorageCommand::StorageCommand(StorageCommand&& original,
- bslma::Allocator* basicAllocator)
+StorageCommand::StorageCommand(
+ StorageCommand&& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_SUMMARY: {
- new (d_summary.buffer()) Void(bsl::move(original.d_summary.object()));
- } break;
- case SELECTION_ID_PARTITION: {
+ case SELECTION_ID_SUMMARY: {
+ new (d_summary.buffer())
+ Void(bsl::move(original.d_summary.object()));
+ } break;
+ case SELECTION_ID_PARTITION: {
new (d_partition.buffer())
StoragePartition(bsl::move(original.d_partition.object()));
- } break;
- case SELECTION_ID_DOMAIN: {
+ } break;
+ case SELECTION_ID_DOMAIN: {
new (d_domain.buffer())
- StorageDomain(bsl::move(original.d_domain.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_QUEUE: {
+ StorageDomain(
+ bsl::move(original.d_domain.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_QUEUE: {
new (d_queue.buffer())
- StorageQueue(bsl::move(original.d_queue.object()), d_allocator_p);
- } break;
- case SELECTION_ID_REPLICATION: {
+ StorageQueue(
+ bsl::move(original.d_queue.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_REPLICATION: {
new (d_replication.buffer())
- ReplicationCommand(bsl::move(original.d_replication.object()),
- d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ ReplicationCommand(
+ bsl::move(original.d_replication.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
#endif
// MANIPULATORS
-StorageCommand& StorageCommand::operator=(const StorageCommand& rhs)
+StorageCommand&
+StorageCommand::operator=(const StorageCommand& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_SUMMARY: {
+ case SELECTION_ID_SUMMARY: {
makeSummary(rhs.d_summary.object());
- } break;
- case SELECTION_ID_PARTITION: {
+ } break;
+ case SELECTION_ID_PARTITION: {
makePartition(rhs.d_partition.object());
- } break;
- case SELECTION_ID_DOMAIN: {
+ } break;
+ case SELECTION_ID_DOMAIN: {
makeDomain(rhs.d_domain.object());
- } break;
- case SELECTION_ID_QUEUE: {
+ } break;
+ case SELECTION_ID_QUEUE: {
makeQueue(rhs.d_queue.object());
- } break;
- case SELECTION_ID_REPLICATION: {
+ } break;
+ case SELECTION_ID_REPLICATION: {
makeReplication(rhs.d_replication.object());
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -18598,28 +20542,29 @@ StorageCommand& StorageCommand::operator=(const StorageCommand& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-StorageCommand& StorageCommand::operator=(StorageCommand&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+StorageCommand&
+StorageCommand::operator=(StorageCommand&& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_SUMMARY: {
+ case SELECTION_ID_SUMMARY: {
makeSummary(bsl::move(rhs.d_summary.object()));
- } break;
- case SELECTION_ID_PARTITION: {
+ } break;
+ case SELECTION_ID_PARTITION: {
makePartition(bsl::move(rhs.d_partition.object()));
- } break;
- case SELECTION_ID_DOMAIN: {
+ } break;
+ case SELECTION_ID_DOMAIN: {
makeDomain(bsl::move(rhs.d_domain.object()));
- } break;
- case SELECTION_ID_QUEUE: {
+ } break;
+ case SELECTION_ID_QUEUE: {
makeQueue(bsl::move(rhs.d_queue.object()));
- } break;
- case SELECTION_ID_REPLICATION: {
+ } break;
+ case SELECTION_ID_REPLICATION: {
makeReplication(bsl::move(rhs.d_replication.object()));
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -18632,22 +20577,23 @@ StorageCommand& StorageCommand::operator=(StorageCommand&& rhs)
void StorageCommand::reset()
{
switch (d_selectionId) {
- case SELECTION_ID_SUMMARY: {
+ case SELECTION_ID_SUMMARY: {
d_summary.object().~Void();
- } break;
- case SELECTION_ID_PARTITION: {
+ } break;
+ case SELECTION_ID_PARTITION: {
d_partition.object().~StoragePartition();
- } break;
- case SELECTION_ID_DOMAIN: {
+ } break;
+ case SELECTION_ID_DOMAIN: {
d_domain.object().~StorageDomain();
- } break;
- case SELECTION_ID_QUEUE: {
+ } break;
+ case SELECTION_ID_QUEUE: {
d_queue.object().~StorageQueue();
- } break;
- case SELECTION_ID_REPLICATION: {
+ } break;
+ case SELECTION_ID_REPLICATION: {
d_replication.object().~ReplicationCommand();
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
d_selectionId = SELECTION_ID_UNDEFINED;
@@ -18656,35 +20602,36 @@ void StorageCommand::reset()
int StorageCommand::makeSelection(int selectionId)
{
switch (selectionId) {
- case SELECTION_ID_SUMMARY: {
+ case SELECTION_ID_SUMMARY: {
makeSummary();
- } break;
- case SELECTION_ID_PARTITION: {
+ } break;
+ case SELECTION_ID_PARTITION: {
makePartition();
- } break;
- case SELECTION_ID_DOMAIN: {
+ } break;
+ case SELECTION_ID_DOMAIN: {
makeDomain();
- } break;
- case SELECTION_ID_QUEUE: {
+ } break;
+ case SELECTION_ID_QUEUE: {
makeQueue();
- } break;
- case SELECTION_ID_REPLICATION: {
+ } break;
+ case SELECTION_ID_REPLICATION: {
makeReplication();
- } break;
- case SELECTION_ID_UNDEFINED: {
+ } break;
+ case SELECTION_ID_UNDEFINED: {
reset();
- } break;
- default: return -1;
+ } break;
+ default:
+ return -1;
}
return 0;
}
-int StorageCommand::makeSelection(const char* name, int nameLength)
+int StorageCommand::makeSelection(const char *name, int nameLength)
{
- const bdlat_SelectionInfo* selectionInfo = lookupSelectionInfo(name,
- nameLength);
+ const bdlat_SelectionInfo *selectionInfo =
+ lookupSelectionInfo(name, nameLength);
if (0 == selectionInfo) {
- return -1;
+ return -1;
}
return makeSelection(selectionInfo->d_id);
@@ -18697,7 +20644,8 @@ Void& StorageCommand::makeSummary()
}
else {
reset();
- new (d_summary.buffer()) Void();
+ new (d_summary.buffer())
+ Void();
d_selectionId = SELECTION_ID_SUMMARY;
}
@@ -18711,15 +20659,16 @@ Void& StorageCommand::makeSummary(const Void& value)
}
else {
reset();
- new (d_summary.buffer()) Void(value);
+ new (d_summary.buffer())
+ Void(value);
d_selectionId = SELECTION_ID_SUMMARY;
}
return d_summary.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Void& StorageCommand::makeSummary(Void&& value)
{
if (SELECTION_ID_SUMMARY == d_selectionId) {
@@ -18727,7 +20676,8 @@ Void& StorageCommand::makeSummary(Void&& value)
}
else {
reset();
- new (d_summary.buffer()) Void(bsl::move(value));
+ new (d_summary.buffer())
+ Void(bsl::move(value));
d_selectionId = SELECTION_ID_SUMMARY;
}
@@ -18742,7 +20692,8 @@ StoragePartition& StorageCommand::makePartition()
}
else {
reset();
- new (d_partition.buffer()) StoragePartition();
+ new (d_partition.buffer())
+ StoragePartition();
d_selectionId = SELECTION_ID_PARTITION;
}
@@ -18756,15 +20707,16 @@ StoragePartition& StorageCommand::makePartition(const StoragePartition& value)
}
else {
reset();
- new (d_partition.buffer()) StoragePartition(value);
+ new (d_partition.buffer())
+ StoragePartition(value);
d_selectionId = SELECTION_ID_PARTITION;
}
return d_partition.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
StoragePartition& StorageCommand::makePartition(StoragePartition&& value)
{
if (SELECTION_ID_PARTITION == d_selectionId) {
@@ -18772,7 +20724,8 @@ StoragePartition& StorageCommand::makePartition(StoragePartition&& value)
}
else {
reset();
- new (d_partition.buffer()) StoragePartition(bsl::move(value));
+ new (d_partition.buffer())
+ StoragePartition(bsl::move(value));
d_selectionId = SELECTION_ID_PARTITION;
}
@@ -18787,7 +20740,8 @@ StorageDomain& StorageCommand::makeDomain()
}
else {
reset();
- new (d_domain.buffer()) StorageDomain(d_allocator_p);
+ new (d_domain.buffer())
+ StorageDomain(d_allocator_p);
d_selectionId = SELECTION_ID_DOMAIN;
}
@@ -18801,15 +20755,16 @@ StorageDomain& StorageCommand::makeDomain(const StorageDomain& value)
}
else {
reset();
- new (d_domain.buffer()) StorageDomain(value, d_allocator_p);
+ new (d_domain.buffer())
+ StorageDomain(value, d_allocator_p);
d_selectionId = SELECTION_ID_DOMAIN;
}
return d_domain.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
StorageDomain& StorageCommand::makeDomain(StorageDomain&& value)
{
if (SELECTION_ID_DOMAIN == d_selectionId) {
@@ -18817,7 +20772,8 @@ StorageDomain& StorageCommand::makeDomain(StorageDomain&& value)
}
else {
reset();
- new (d_domain.buffer()) StorageDomain(bsl::move(value), d_allocator_p);
+ new (d_domain.buffer())
+ StorageDomain(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_DOMAIN;
}
@@ -18832,7 +20788,8 @@ StorageQueue& StorageCommand::makeQueue()
}
else {
reset();
- new (d_queue.buffer()) StorageQueue(d_allocator_p);
+ new (d_queue.buffer())
+ StorageQueue(d_allocator_p);
d_selectionId = SELECTION_ID_QUEUE;
}
@@ -18846,15 +20803,16 @@ StorageQueue& StorageCommand::makeQueue(const StorageQueue& value)
}
else {
reset();
- new (d_queue.buffer()) StorageQueue(value, d_allocator_p);
+ new (d_queue.buffer())
+ StorageQueue(value, d_allocator_p);
d_selectionId = SELECTION_ID_QUEUE;
}
return d_queue.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
StorageQueue& StorageCommand::makeQueue(StorageQueue&& value)
{
if (SELECTION_ID_QUEUE == d_selectionId) {
@@ -18862,7 +20820,8 @@ StorageQueue& StorageCommand::makeQueue(StorageQueue&& value)
}
else {
reset();
- new (d_queue.buffer()) StorageQueue(bsl::move(value), d_allocator_p);
+ new (d_queue.buffer())
+ StorageQueue(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_QUEUE;
}
@@ -18877,30 +20836,31 @@ ReplicationCommand& StorageCommand::makeReplication()
}
else {
reset();
- new (d_replication.buffer()) ReplicationCommand(d_allocator_p);
+ new (d_replication.buffer())
+ ReplicationCommand(d_allocator_p);
d_selectionId = SELECTION_ID_REPLICATION;
}
return d_replication.object();
}
-ReplicationCommand&
-StorageCommand::makeReplication(const ReplicationCommand& value)
+ReplicationCommand& StorageCommand::makeReplication(const ReplicationCommand& value)
{
if (SELECTION_ID_REPLICATION == d_selectionId) {
d_replication.object() = value;
}
else {
reset();
- new (d_replication.buffer()) ReplicationCommand(value, d_allocator_p);
+ new (d_replication.buffer())
+ ReplicationCommand(value, d_allocator_p);
d_selectionId = SELECTION_ID_REPLICATION;
}
return d_replication.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ReplicationCommand& StorageCommand::makeReplication(ReplicationCommand&& value)
{
if (SELECTION_ID_REPLICATION == d_selectionId) {
@@ -18909,7 +20869,7 @@ ReplicationCommand& StorageCommand::makeReplication(ReplicationCommand&& value)
else {
reset();
new (d_replication.buffer())
- ReplicationCommand(bsl::move(value), d_allocator_p);
+ ReplicationCommand(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_REPLICATION;
}
@@ -18919,99 +20879,115 @@ ReplicationCommand& StorageCommand::makeReplication(ReplicationCommand&& value)
// ACCESSORS
-bsl::ostream& StorageCommand::print(bsl::ostream& stream,
- int level,
- int spacesPerLevel) const
+bsl::ostream& StorageCommand::print(
+ bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
switch (d_selectionId) {
- case SELECTION_ID_SUMMARY: {
+ case SELECTION_ID_SUMMARY: {
printer.printAttribute("summary", d_summary.object());
- } break;
- case SELECTION_ID_PARTITION: {
+ } break;
+ case SELECTION_ID_PARTITION: {
printer.printAttribute("partition", d_partition.object());
- } break;
- case SELECTION_ID_DOMAIN: {
+ } break;
+ case SELECTION_ID_DOMAIN: {
printer.printAttribute("domain", d_domain.object());
- } break;
- case SELECTION_ID_QUEUE: {
+ } break;
+ case SELECTION_ID_QUEUE: {
printer.printAttribute("queue", d_queue.object());
- } break;
- case SELECTION_ID_REPLICATION: {
+ } break;
+ case SELECTION_ID_REPLICATION: {
printer.printAttribute("replication", d_replication.object());
- } break;
- default: stream << "SELECTION UNDEFINED\n";
+ } break;
+ default:
+ stream << "SELECTION UNDEFINED\n";
}
printer.end();
return stream;
}
-const char* StorageCommand::selectionName() const
+
+const char *StorageCommand::selectionName() const
{
switch (d_selectionId) {
- case SELECTION_ID_SUMMARY:
+ case SELECTION_ID_SUMMARY:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_SUMMARY].name();
- case SELECTION_ID_PARTITION:
+ case SELECTION_ID_PARTITION:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_PARTITION].name();
- case SELECTION_ID_DOMAIN:
+ case SELECTION_ID_DOMAIN:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAIN].name();
- case SELECTION_ID_QUEUE:
+ case SELECTION_ID_QUEUE:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE].name();
- case SELECTION_ID_REPLICATION:
+ case SELECTION_ID_REPLICATION:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_REPLICATION].name();
- default:
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
return "(* UNDEFINED *)";
}
}
-// --------------------
-// class ClusterCommand
-// --------------------
+ // --------------------
+ // class ClusterCommand
+ // --------------------
// CONSTANTS
const char ClusterCommand::CLASS_NAME[] = "ClusterCommand";
const bdlat_SelectionInfo ClusterCommand::SELECTION_INFO_ARRAY[] = {
- {SELECTION_ID_STATUS,
- "status",
- sizeof("status") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_QUEUE_HELPER,
- "queueHelper",
- sizeof("queueHelper") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_FORCE_GC_QUEUES,
- "forceGcQueues",
- sizeof("forceGcQueues") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_STORAGE,
- "storage",
- sizeof("storage") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_STATE,
- "state",
- sizeof("state") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ SELECTION_ID_STATUS,
+ "status",
+ sizeof("status") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_QUEUE_HELPER,
+ "queueHelper",
+ sizeof("queueHelper") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_FORCE_GC_QUEUES,
+ "forceGcQueues",
+ sizeof("forceGcQueues") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_STORAGE,
+ "storage",
+ sizeof("storage") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_STATE,
+ "state",
+ sizeof("state") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_SelectionInfo*
-ClusterCommand::lookupSelectionInfo(const char* name, int nameLength)
+const bdlat_SelectionInfo *ClusterCommand::lookupSelectionInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 5; ++i) {
const bdlat_SelectionInfo& selectionInfo =
- ClusterCommand::SELECTION_INFO_ARRAY[i];
+ ClusterCommand::SELECTION_INFO_ARRAY[i];
- if (nameLength == selectionInfo.d_nameLength &&
- 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength)) {
+ if (nameLength == selectionInfo.d_nameLength
+ && 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength))
+ {
return &selectionInfo;
}
}
@@ -19019,138 +20995,152 @@ ClusterCommand::lookupSelectionInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_SelectionInfo* ClusterCommand::lookupSelectionInfo(int id)
+const bdlat_SelectionInfo *ClusterCommand::lookupSelectionInfo(int id)
{
switch (id) {
- case SELECTION_ID_STATUS:
+ case SELECTION_ID_STATUS:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_STATUS];
- case SELECTION_ID_QUEUE_HELPER:
+ case SELECTION_ID_QUEUE_HELPER:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE_HELPER];
- case SELECTION_ID_FORCE_GC_QUEUES:
+ case SELECTION_ID_FORCE_GC_QUEUES:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_FORCE_GC_QUEUES];
- case SELECTION_ID_STORAGE:
+ case SELECTION_ID_STORAGE:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_STORAGE];
- case SELECTION_ID_STATE:
+ case SELECTION_ID_STATE:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_STATE];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-ClusterCommand::ClusterCommand(const ClusterCommand& original,
- bslma::Allocator* basicAllocator)
+ClusterCommand::ClusterCommand(
+ const ClusterCommand& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_STATUS: {
- new (d_status.buffer()) Void(original.d_status.object());
- } break;
- case SELECTION_ID_QUEUE_HELPER: {
- new (d_queueHelper.buffer()) Void(original.d_queueHelper.object());
- } break;
- case SELECTION_ID_FORCE_GC_QUEUES: {
- new (d_forceGcQueues.buffer()) Void(original.d_forceGcQueues.object());
- } break;
- case SELECTION_ID_STORAGE: {
+ case SELECTION_ID_STATUS: {
+ new (d_status.buffer())
+ Void(original.d_status.object());
+ } break;
+ case SELECTION_ID_QUEUE_HELPER: {
+ new (d_queueHelper.buffer())
+ Void(original.d_queueHelper.object());
+ } break;
+ case SELECTION_ID_FORCE_GC_QUEUES: {
+ new (d_forceGcQueues.buffer())
+ Void(original.d_forceGcQueues.object());
+ } break;
+ case SELECTION_ID_STORAGE: {
new (d_storage.buffer())
- StorageCommand(original.d_storage.object(), d_allocator_p);
- } break;
- case SELECTION_ID_STATE: {
+ StorageCommand(
+ original.d_storage.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_STATE: {
new (d_state.buffer())
- ClusterStateCommand(original.d_state.object(), d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ ClusterStateCommand(
+ original.d_state.object(), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ClusterCommand::ClusterCommand(ClusterCommand&& original) noexcept
-: d_selectionId(original.d_selectionId),
- d_allocator_p(original.d_allocator_p)
+: d_selectionId(original.d_selectionId)
+, d_allocator_p(original.d_allocator_p)
{
switch (d_selectionId) {
- case SELECTION_ID_STATUS: {
- new (d_status.buffer()) Void(bsl::move(original.d_status.object()));
- } break;
- case SELECTION_ID_QUEUE_HELPER: {
+ case SELECTION_ID_STATUS: {
+ new (d_status.buffer())
+ Void(bsl::move(original.d_status.object()));
+ } break;
+ case SELECTION_ID_QUEUE_HELPER: {
new (d_queueHelper.buffer())
Void(bsl::move(original.d_queueHelper.object()));
- } break;
- case SELECTION_ID_FORCE_GC_QUEUES: {
+ } break;
+ case SELECTION_ID_FORCE_GC_QUEUES: {
new (d_forceGcQueues.buffer())
Void(bsl::move(original.d_forceGcQueues.object()));
- } break;
- case SELECTION_ID_STORAGE: {
+ } break;
+ case SELECTION_ID_STORAGE: {
new (d_storage.buffer())
- StorageCommand(bsl::move(original.d_storage.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_STATE: {
+ StorageCommand(
+ bsl::move(original.d_storage.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_STATE: {
new (d_state.buffer())
- ClusterStateCommand(bsl::move(original.d_state.object()),
- d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ ClusterStateCommand(
+ bsl::move(original.d_state.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-ClusterCommand::ClusterCommand(ClusterCommand&& original,
- bslma::Allocator* basicAllocator)
+ClusterCommand::ClusterCommand(
+ ClusterCommand&& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_STATUS: {
- new (d_status.buffer()) Void(bsl::move(original.d_status.object()));
- } break;
- case SELECTION_ID_QUEUE_HELPER: {
+ case SELECTION_ID_STATUS: {
+ new (d_status.buffer())
+ Void(bsl::move(original.d_status.object()));
+ } break;
+ case SELECTION_ID_QUEUE_HELPER: {
new (d_queueHelper.buffer())
Void(bsl::move(original.d_queueHelper.object()));
- } break;
- case SELECTION_ID_FORCE_GC_QUEUES: {
+ } break;
+ case SELECTION_ID_FORCE_GC_QUEUES: {
new (d_forceGcQueues.buffer())
Void(bsl::move(original.d_forceGcQueues.object()));
- } break;
- case SELECTION_ID_STORAGE: {
+ } break;
+ case SELECTION_ID_STORAGE: {
new (d_storage.buffer())
- StorageCommand(bsl::move(original.d_storage.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_STATE: {
+ StorageCommand(
+ bsl::move(original.d_storage.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_STATE: {
new (d_state.buffer())
- ClusterStateCommand(bsl::move(original.d_state.object()),
- d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ ClusterStateCommand(
+ bsl::move(original.d_state.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
#endif
// MANIPULATORS
-ClusterCommand& ClusterCommand::operator=(const ClusterCommand& rhs)
+ClusterCommand&
+ClusterCommand::operator=(const ClusterCommand& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_STATUS: {
+ case SELECTION_ID_STATUS: {
makeStatus(rhs.d_status.object());
- } break;
- case SELECTION_ID_QUEUE_HELPER: {
+ } break;
+ case SELECTION_ID_QUEUE_HELPER: {
makeQueueHelper(rhs.d_queueHelper.object());
- } break;
- case SELECTION_ID_FORCE_GC_QUEUES: {
+ } break;
+ case SELECTION_ID_FORCE_GC_QUEUES: {
makeForceGcQueues(rhs.d_forceGcQueues.object());
- } break;
- case SELECTION_ID_STORAGE: {
+ } break;
+ case SELECTION_ID_STORAGE: {
makeStorage(rhs.d_storage.object());
- } break;
- case SELECTION_ID_STATE: {
+ } break;
+ case SELECTION_ID_STATE: {
makeState(rhs.d_state.object());
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -19159,28 +21149,29 @@ ClusterCommand& ClusterCommand::operator=(const ClusterCommand& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-ClusterCommand& ClusterCommand::operator=(ClusterCommand&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ClusterCommand&
+ClusterCommand::operator=(ClusterCommand&& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_STATUS: {
+ case SELECTION_ID_STATUS: {
makeStatus(bsl::move(rhs.d_status.object()));
- } break;
- case SELECTION_ID_QUEUE_HELPER: {
+ } break;
+ case SELECTION_ID_QUEUE_HELPER: {
makeQueueHelper(bsl::move(rhs.d_queueHelper.object()));
- } break;
- case SELECTION_ID_FORCE_GC_QUEUES: {
+ } break;
+ case SELECTION_ID_FORCE_GC_QUEUES: {
makeForceGcQueues(bsl::move(rhs.d_forceGcQueues.object()));
- } break;
- case SELECTION_ID_STORAGE: {
+ } break;
+ case SELECTION_ID_STORAGE: {
makeStorage(bsl::move(rhs.d_storage.object()));
- } break;
- case SELECTION_ID_STATE: {
+ } break;
+ case SELECTION_ID_STATE: {
makeState(bsl::move(rhs.d_state.object()));
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -19193,22 +21184,23 @@ ClusterCommand& ClusterCommand::operator=(ClusterCommand&& rhs)
void ClusterCommand::reset()
{
switch (d_selectionId) {
- case SELECTION_ID_STATUS: {
+ case SELECTION_ID_STATUS: {
d_status.object().~Void();
- } break;
- case SELECTION_ID_QUEUE_HELPER: {
+ } break;
+ case SELECTION_ID_QUEUE_HELPER: {
d_queueHelper.object().~Void();
- } break;
- case SELECTION_ID_FORCE_GC_QUEUES: {
+ } break;
+ case SELECTION_ID_FORCE_GC_QUEUES: {
d_forceGcQueues.object().~Void();
- } break;
- case SELECTION_ID_STORAGE: {
+ } break;
+ case SELECTION_ID_STORAGE: {
d_storage.object().~StorageCommand();
- } break;
- case SELECTION_ID_STATE: {
+ } break;
+ case SELECTION_ID_STATE: {
d_state.object().~ClusterStateCommand();
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
d_selectionId = SELECTION_ID_UNDEFINED;
@@ -19217,35 +21209,36 @@ void ClusterCommand::reset()
int ClusterCommand::makeSelection(int selectionId)
{
switch (selectionId) {
- case SELECTION_ID_STATUS: {
+ case SELECTION_ID_STATUS: {
makeStatus();
- } break;
- case SELECTION_ID_QUEUE_HELPER: {
+ } break;
+ case SELECTION_ID_QUEUE_HELPER: {
makeQueueHelper();
- } break;
- case SELECTION_ID_FORCE_GC_QUEUES: {
+ } break;
+ case SELECTION_ID_FORCE_GC_QUEUES: {
makeForceGcQueues();
- } break;
- case SELECTION_ID_STORAGE: {
+ } break;
+ case SELECTION_ID_STORAGE: {
makeStorage();
- } break;
- case SELECTION_ID_STATE: {
+ } break;
+ case SELECTION_ID_STATE: {
makeState();
- } break;
- case SELECTION_ID_UNDEFINED: {
+ } break;
+ case SELECTION_ID_UNDEFINED: {
reset();
- } break;
- default: return -1;
+ } break;
+ default:
+ return -1;
}
return 0;
}
-int ClusterCommand::makeSelection(const char* name, int nameLength)
+int ClusterCommand::makeSelection(const char *name, int nameLength)
{
- const bdlat_SelectionInfo* selectionInfo = lookupSelectionInfo(name,
- nameLength);
+ const bdlat_SelectionInfo *selectionInfo =
+ lookupSelectionInfo(name, nameLength);
if (0 == selectionInfo) {
- return -1;
+ return -1;
}
return makeSelection(selectionInfo->d_id);
@@ -19258,7 +21251,8 @@ Void& ClusterCommand::makeStatus()
}
else {
reset();
- new (d_status.buffer()) Void();
+ new (d_status.buffer())
+ Void();
d_selectionId = SELECTION_ID_STATUS;
}
@@ -19272,15 +21266,16 @@ Void& ClusterCommand::makeStatus(const Void& value)
}
else {
reset();
- new (d_status.buffer()) Void(value);
+ new (d_status.buffer())
+ Void(value);
d_selectionId = SELECTION_ID_STATUS;
}
return d_status.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Void& ClusterCommand::makeStatus(Void&& value)
{
if (SELECTION_ID_STATUS == d_selectionId) {
@@ -19288,7 +21283,8 @@ Void& ClusterCommand::makeStatus(Void&& value)
}
else {
reset();
- new (d_status.buffer()) Void(bsl::move(value));
+ new (d_status.buffer())
+ Void(bsl::move(value));
d_selectionId = SELECTION_ID_STATUS;
}
@@ -19303,7 +21299,8 @@ Void& ClusterCommand::makeQueueHelper()
}
else {
reset();
- new (d_queueHelper.buffer()) Void();
+ new (d_queueHelper.buffer())
+ Void();
d_selectionId = SELECTION_ID_QUEUE_HELPER;
}
@@ -19317,15 +21314,16 @@ Void& ClusterCommand::makeQueueHelper(const Void& value)
}
else {
reset();
- new (d_queueHelper.buffer()) Void(value);
+ new (d_queueHelper.buffer())
+ Void(value);
d_selectionId = SELECTION_ID_QUEUE_HELPER;
}
return d_queueHelper.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Void& ClusterCommand::makeQueueHelper(Void&& value)
{
if (SELECTION_ID_QUEUE_HELPER == d_selectionId) {
@@ -19333,7 +21331,8 @@ Void& ClusterCommand::makeQueueHelper(Void&& value)
}
else {
reset();
- new (d_queueHelper.buffer()) Void(bsl::move(value));
+ new (d_queueHelper.buffer())
+ Void(bsl::move(value));
d_selectionId = SELECTION_ID_QUEUE_HELPER;
}
@@ -19348,7 +21347,8 @@ Void& ClusterCommand::makeForceGcQueues()
}
else {
reset();
- new (d_forceGcQueues.buffer()) Void();
+ new (d_forceGcQueues.buffer())
+ Void();
d_selectionId = SELECTION_ID_FORCE_GC_QUEUES;
}
@@ -19362,15 +21362,16 @@ Void& ClusterCommand::makeForceGcQueues(const Void& value)
}
else {
reset();
- new (d_forceGcQueues.buffer()) Void(value);
+ new (d_forceGcQueues.buffer())
+ Void(value);
d_selectionId = SELECTION_ID_FORCE_GC_QUEUES;
}
return d_forceGcQueues.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Void& ClusterCommand::makeForceGcQueues(Void&& value)
{
if (SELECTION_ID_FORCE_GC_QUEUES == d_selectionId) {
@@ -19378,7 +21379,8 @@ Void& ClusterCommand::makeForceGcQueues(Void&& value)
}
else {
reset();
- new (d_forceGcQueues.buffer()) Void(bsl::move(value));
+ new (d_forceGcQueues.buffer())
+ Void(bsl::move(value));
d_selectionId = SELECTION_ID_FORCE_GC_QUEUES;
}
@@ -19393,7 +21395,8 @@ StorageCommand& ClusterCommand::makeStorage()
}
else {
reset();
- new (d_storage.buffer()) StorageCommand(d_allocator_p);
+ new (d_storage.buffer())
+ StorageCommand(d_allocator_p);
d_selectionId = SELECTION_ID_STORAGE;
}
@@ -19407,15 +21410,16 @@ StorageCommand& ClusterCommand::makeStorage(const StorageCommand& value)
}
else {
reset();
- new (d_storage.buffer()) StorageCommand(value, d_allocator_p);
+ new (d_storage.buffer())
+ StorageCommand(value, d_allocator_p);
d_selectionId = SELECTION_ID_STORAGE;
}
return d_storage.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
StorageCommand& ClusterCommand::makeStorage(StorageCommand&& value)
{
if (SELECTION_ID_STORAGE == d_selectionId) {
@@ -19424,7 +21428,7 @@ StorageCommand& ClusterCommand::makeStorage(StorageCommand&& value)
else {
reset();
new (d_storage.buffer())
- StorageCommand(bsl::move(value), d_allocator_p);
+ StorageCommand(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_STORAGE;
}
@@ -19439,30 +21443,31 @@ ClusterStateCommand& ClusterCommand::makeState()
}
else {
reset();
- new (d_state.buffer()) ClusterStateCommand(d_allocator_p);
+ new (d_state.buffer())
+ ClusterStateCommand(d_allocator_p);
d_selectionId = SELECTION_ID_STATE;
}
return d_state.object();
}
-ClusterStateCommand&
-ClusterCommand::makeState(const ClusterStateCommand& value)
+ClusterStateCommand& ClusterCommand::makeState(const ClusterStateCommand& value)
{
if (SELECTION_ID_STATE == d_selectionId) {
d_state.object() = value;
}
else {
reset();
- new (d_state.buffer()) ClusterStateCommand(value, d_allocator_p);
+ new (d_state.buffer())
+ ClusterStateCommand(value, d_allocator_p);
d_selectionId = SELECTION_ID_STATE;
}
return d_state.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ClusterStateCommand& ClusterCommand::makeState(ClusterStateCommand&& value)
{
if (SELECTION_ID_STATE == d_selectionId) {
@@ -19471,7 +21476,7 @@ ClusterStateCommand& ClusterCommand::makeState(ClusterStateCommand&& value)
else {
reset();
new (d_state.buffer())
- ClusterStateCommand(bsl::move(value), d_allocator_p);
+ ClusterStateCommand(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_STATE;
}
@@ -19481,119 +21486,143 @@ ClusterStateCommand& ClusterCommand::makeState(ClusterStateCommand&& value)
// ACCESSORS
-bsl::ostream& ClusterCommand::print(bsl::ostream& stream,
- int level,
- int spacesPerLevel) const
+bsl::ostream& ClusterCommand::print(
+ bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
switch (d_selectionId) {
- case SELECTION_ID_STATUS: {
+ case SELECTION_ID_STATUS: {
printer.printAttribute("status", d_status.object());
- } break;
- case SELECTION_ID_QUEUE_HELPER: {
+ } break;
+ case SELECTION_ID_QUEUE_HELPER: {
printer.printAttribute("queueHelper", d_queueHelper.object());
- } break;
- case SELECTION_ID_FORCE_GC_QUEUES: {
+ } break;
+ case SELECTION_ID_FORCE_GC_QUEUES: {
printer.printAttribute("forceGcQueues", d_forceGcQueues.object());
- } break;
- case SELECTION_ID_STORAGE: {
+ } break;
+ case SELECTION_ID_STORAGE: {
printer.printAttribute("storage", d_storage.object());
- } break;
- case SELECTION_ID_STATE: {
+ } break;
+ case SELECTION_ID_STATE: {
printer.printAttribute("state", d_state.object());
- } break;
- default: stream << "SELECTION UNDEFINED\n";
+ } break;
+ default:
+ stream << "SELECTION UNDEFINED\n";
}
printer.end();
return stream;
}
-const char* ClusterCommand::selectionName() const
+
+const char *ClusterCommand::selectionName() const
{
switch (d_selectionId) {
- case SELECTION_ID_STATUS:
+ case SELECTION_ID_STATUS:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_STATUS].name();
- case SELECTION_ID_QUEUE_HELPER:
+ case SELECTION_ID_QUEUE_HELPER:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE_HELPER].name();
- case SELECTION_ID_FORCE_GC_QUEUES:
+ case SELECTION_ID_FORCE_GC_QUEUES:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_FORCE_GC_QUEUES].name();
- case SELECTION_ID_STORAGE:
+ case SELECTION_ID_STORAGE:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_STORAGE].name();
- case SELECTION_ID_STATE:
+ case SELECTION_ID_STATE:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_STATE].name();
- default:
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
return "(* UNDEFINED *)";
}
}
-// -------------------
-// class ClusterStatus
-// -------------------
+ // -------------------
+ // class ClusterStatus
+ // -------------------
// CONSTANTS
const char ClusterStatus::CLASS_NAME[] = "ClusterStatus";
const bdlat_AttributeInfo ClusterStatus::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_NAME,
- "name",
- sizeof("name") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_DESCRIPTION,
- "description",
- sizeof("description") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_SELF_NODE_DESCRIPTION,
- "selfNodeDescription",
- sizeof("selfNodeDescription") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_IS_HEALTHY,
- "isHealthy",
- sizeof("isHealthy") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_NODE_STATUSES,
- "nodeStatuses",
- sizeof("nodeStatuses") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {ATTRIBUTE_ID_ELECTOR_INFO,
- "electorInfo",
- sizeof("electorInfo") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {ATTRIBUTE_ID_PARTITIONS_INFO,
- "partitionsInfo",
- sizeof("partitionsInfo") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {ATTRIBUTE_ID_QUEUES_INFO,
- "queuesInfo",
- sizeof("queuesInfo") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {ATTRIBUTE_ID_CLUSTER_STORAGE_SUMMARY,
- "clusterStorageSummary",
- sizeof("clusterStorageSummary") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ ATTRIBUTE_ID_NAME,
+ "name",
+ sizeof("name") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_DESCRIPTION,
+ "description",
+ sizeof("description") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_SELF_NODE_DESCRIPTION,
+ "selfNodeDescription",
+ sizeof("selfNodeDescription") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_IS_HEALTHY,
+ "isHealthy",
+ sizeof("isHealthy") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_NODE_STATUSES,
+ "nodeStatuses",
+ sizeof("nodeStatuses") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ ATTRIBUTE_ID_ELECTOR_INFO,
+ "electorInfo",
+ sizeof("electorInfo") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ ATTRIBUTE_ID_PARTITIONS_INFO,
+ "partitionsInfo",
+ sizeof("partitionsInfo") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ ATTRIBUTE_ID_QUEUES_INFO,
+ "queuesInfo",
+ sizeof("queuesInfo") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ ATTRIBUTE_ID_CLUSTER_STORAGE_SUMMARY,
+ "clusterStorageSummary",
+ sizeof("clusterStorageSummary") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* ClusterStatus::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *ClusterStatus::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 9; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- ClusterStatus::ATTRIBUTE_INFO_ARRAY[i];
+ ClusterStatus::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -19601,33 +21630,35 @@ const bdlat_AttributeInfo* ClusterStatus::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* ClusterStatus::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *ClusterStatus::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_NAME: return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME];
- case ATTRIBUTE_ID_DESCRIPTION:
+ case ATTRIBUTE_ID_NAME:
+ return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME];
+ case ATTRIBUTE_ID_DESCRIPTION:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DESCRIPTION];
- case ATTRIBUTE_ID_SELF_NODE_DESCRIPTION:
+ case ATTRIBUTE_ID_SELF_NODE_DESCRIPTION:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SELF_NODE_DESCRIPTION];
- case ATTRIBUTE_ID_IS_HEALTHY:
+ case ATTRIBUTE_ID_IS_HEALTHY:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_HEALTHY];
- case ATTRIBUTE_ID_NODE_STATUSES:
+ case ATTRIBUTE_ID_NODE_STATUSES:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NODE_STATUSES];
- case ATTRIBUTE_ID_ELECTOR_INFO:
+ case ATTRIBUTE_ID_ELECTOR_INFO:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ELECTOR_INFO];
- case ATTRIBUTE_ID_PARTITIONS_INFO:
+ case ATTRIBUTE_ID_PARTITIONS_INFO:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITIONS_INFO];
- case ATTRIBUTE_ID_QUEUES_INFO:
+ case ATTRIBUTE_ID_QUEUES_INFO:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUES_INFO];
- case ATTRIBUTE_ID_CLUSTER_STORAGE_SUMMARY:
+ case ATTRIBUTE_ID_CLUSTER_STORAGE_SUMMARY:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTER_STORAGE_SUMMARY];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-ClusterStatus::ClusterStatus(bslma::Allocator* basicAllocator)
+ClusterStatus::ClusterStatus(bslma::Allocator *basicAllocator)
: d_name(basicAllocator)
, d_description(basicAllocator)
, d_selfNodeDescription(basicAllocator)
@@ -19641,7 +21672,7 @@ ClusterStatus::ClusterStatus(bslma::Allocator* basicAllocator)
}
ClusterStatus::ClusterStatus(const ClusterStatus& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_name(original.d_name, basicAllocator)
, d_description(original.d_description, basicAllocator)
, d_selfNodeDescription(original.d_selfNodeDescription, basicAllocator)
@@ -19654,33 +21685,31 @@ ClusterStatus::ClusterStatus(const ClusterStatus& original,
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ClusterStatus::ClusterStatus(ClusterStatus&& original) noexcept
-: d_name(bsl::move(original.d_name)),
- d_description(bsl::move(original.d_description)),
- d_selfNodeDescription(bsl::move(original.d_selfNodeDescription)),
- d_queuesInfo(bsl::move(original.d_queuesInfo)),
- d_partitionsInfo(bsl::move(original.d_partitionsInfo)),
- d_nodeStatuses(bsl::move(original.d_nodeStatuses)),
- d_electorInfo(bsl::move(original.d_electorInfo)),
- d_clusterStorageSummary(bsl::move(original.d_clusterStorageSummary)),
- d_isHealthy(bsl::move(original.d_isHealthy))
+: d_name(bsl::move(original.d_name))
+, d_description(bsl::move(original.d_description))
+, d_selfNodeDescription(bsl::move(original.d_selfNodeDescription))
+, d_queuesInfo(bsl::move(original.d_queuesInfo))
+, d_partitionsInfo(bsl::move(original.d_partitionsInfo))
+, d_nodeStatuses(bsl::move(original.d_nodeStatuses))
+, d_electorInfo(bsl::move(original.d_electorInfo))
+, d_clusterStorageSummary(bsl::move(original.d_clusterStorageSummary))
+, d_isHealthy(bsl::move(original.d_isHealthy))
{
}
-ClusterStatus::ClusterStatus(ClusterStatus&& original,
- bslma::Allocator* basicAllocator)
+ClusterStatus::ClusterStatus(ClusterStatus&& original,
+ bslma::Allocator *basicAllocator)
: d_name(bsl::move(original.d_name), basicAllocator)
, d_description(bsl::move(original.d_description), basicAllocator)
-, d_selfNodeDescription(bsl::move(original.d_selfNodeDescription),
- basicAllocator)
+, d_selfNodeDescription(bsl::move(original.d_selfNodeDescription), basicAllocator)
, d_queuesInfo(bsl::move(original.d_queuesInfo), basicAllocator)
, d_partitionsInfo(bsl::move(original.d_partitionsInfo), basicAllocator)
, d_nodeStatuses(bsl::move(original.d_nodeStatuses), basicAllocator)
, d_electorInfo(bsl::move(original.d_electorInfo), basicAllocator)
-, d_clusterStorageSummary(bsl::move(original.d_clusterStorageSummary),
- basicAllocator)
+, d_clusterStorageSummary(bsl::move(original.d_clusterStorageSummary), basicAllocator)
, d_isHealthy(bsl::move(original.d_isHealthy))
{
}
@@ -19692,36 +21721,38 @@ ClusterStatus::~ClusterStatus()
// MANIPULATORS
-ClusterStatus& ClusterStatus::operator=(const ClusterStatus& rhs)
+ClusterStatus&
+ClusterStatus::operator=(const ClusterStatus& rhs)
{
if (this != &rhs) {
- d_name = rhs.d_name;
- d_description = rhs.d_description;
- d_selfNodeDescription = rhs.d_selfNodeDescription;
- d_isHealthy = rhs.d_isHealthy;
- d_nodeStatuses = rhs.d_nodeStatuses;
- d_electorInfo = rhs.d_electorInfo;
- d_partitionsInfo = rhs.d_partitionsInfo;
- d_queuesInfo = rhs.d_queuesInfo;
+ d_name = rhs.d_name;
+ d_description = rhs.d_description;
+ d_selfNodeDescription = rhs.d_selfNodeDescription;
+ d_isHealthy = rhs.d_isHealthy;
+ d_nodeStatuses = rhs.d_nodeStatuses;
+ d_electorInfo = rhs.d_electorInfo;
+ d_partitionsInfo = rhs.d_partitionsInfo;
+ d_queuesInfo = rhs.d_queuesInfo;
d_clusterStorageSummary = rhs.d_clusterStorageSummary;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-ClusterStatus& ClusterStatus::operator=(ClusterStatus&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ClusterStatus&
+ClusterStatus::operator=(ClusterStatus&& rhs)
{
if (this != &rhs) {
- d_name = bsl::move(rhs.d_name);
- d_description = bsl::move(rhs.d_description);
- d_selfNodeDescription = bsl::move(rhs.d_selfNodeDescription);
- d_isHealthy = bsl::move(rhs.d_isHealthy);
- d_nodeStatuses = bsl::move(rhs.d_nodeStatuses);
- d_electorInfo = bsl::move(rhs.d_electorInfo);
- d_partitionsInfo = bsl::move(rhs.d_partitionsInfo);
- d_queuesInfo = bsl::move(rhs.d_queuesInfo);
+ d_name = bsl::move(rhs.d_name);
+ d_description = bsl::move(rhs.d_description);
+ d_selfNodeDescription = bsl::move(rhs.d_selfNodeDescription);
+ d_isHealthy = bsl::move(rhs.d_isHealthy);
+ d_nodeStatuses = bsl::move(rhs.d_nodeStatuses);
+ d_electorInfo = bsl::move(rhs.d_electorInfo);
+ d_partitionsInfo = bsl::move(rhs.d_partitionsInfo);
+ d_queuesInfo = bsl::move(rhs.d_queuesInfo);
d_clusterStorageSummary = bsl::move(rhs.d_clusterStorageSummary);
}
@@ -19744,8 +21775,9 @@ void ClusterStatus::reset()
// ACCESSORS
-bsl::ostream&
-ClusterStatus::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& ClusterStatus::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
@@ -19757,48 +21789,58 @@ ClusterStatus::print(bsl::ostream& stream, int level, int spacesPerLevel) const
printer.printAttribute("electorInfo", this->electorInfo());
printer.printAttribute("partitionsInfo", this->partitionsInfo());
printer.printAttribute("queuesInfo", this->queuesInfo());
- printer.printAttribute("clusterStorageSummary",
- this->clusterStorageSummary());
+ printer.printAttribute("clusterStorageSummary", this->clusterStorageSummary());
printer.end();
return stream;
}
-// --------------------
-// class DomainsCommand
-// --------------------
+
+
+ // --------------------
+ // class DomainsCommand
+ // --------------------
// CONSTANTS
const char DomainsCommand::CLASS_NAME[] = "DomainsCommand";
const bdlat_SelectionInfo DomainsCommand::SELECTION_INFO_ARRAY[] = {
- {SELECTION_ID_DOMAIN,
- "domain",
- sizeof("domain") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_RESOLVER,
- "resolver",
- sizeof("resolver") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_RECONFIGURE,
- "reconfigure",
- sizeof("reconfigure") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ SELECTION_ID_DOMAIN,
+ "domain",
+ sizeof("domain") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_RESOLVER,
+ "resolver",
+ sizeof("resolver") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_RECONFIGURE,
+ "reconfigure",
+ sizeof("reconfigure") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_SelectionInfo*
-DomainsCommand::lookupSelectionInfo(const char* name, int nameLength)
+const bdlat_SelectionInfo *DomainsCommand::lookupSelectionInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 3; ++i) {
const bdlat_SelectionInfo& selectionInfo =
- DomainsCommand::SELECTION_INFO_ARRAY[i];
+ DomainsCommand::SELECTION_INFO_ARRAY[i];
- if (nameLength == selectionInfo.d_nameLength &&
- 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength)) {
+ if (nameLength == selectionInfo.d_nameLength
+ && 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength))
+ {
return &selectionInfo;
}
}
@@ -19806,109 +21848,121 @@ DomainsCommand::lookupSelectionInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_SelectionInfo* DomainsCommand::lookupSelectionInfo(int id)
+const bdlat_SelectionInfo *DomainsCommand::lookupSelectionInfo(int id)
{
switch (id) {
- case SELECTION_ID_DOMAIN:
+ case SELECTION_ID_DOMAIN:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAIN];
- case SELECTION_ID_RESOLVER:
+ case SELECTION_ID_RESOLVER:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_RESOLVER];
- case SELECTION_ID_RECONFIGURE:
+ case SELECTION_ID_RECONFIGURE:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_RECONFIGURE];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-DomainsCommand::DomainsCommand(const DomainsCommand& original,
- bslma::Allocator* basicAllocator)
+DomainsCommand::DomainsCommand(
+ const DomainsCommand& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_DOMAIN: {
+ case SELECTION_ID_DOMAIN: {
new (d_domain.buffer())
- Domain(original.d_domain.object(), d_allocator_p);
- } break;
- case SELECTION_ID_RESOLVER: {
+ Domain(
+ original.d_domain.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_RESOLVER: {
new (d_resolver.buffer())
- DomainResolverCommand(original.d_resolver.object(), d_allocator_p);
- } break;
- case SELECTION_ID_RECONFIGURE: {
+ DomainResolverCommand(
+ original.d_resolver.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_RECONFIGURE: {
new (d_reconfigure.buffer())
- DomainReconfigure(original.d_reconfigure.object(), d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ DomainReconfigure(
+ original.d_reconfigure.object(), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
DomainsCommand::DomainsCommand(DomainsCommand&& original) noexcept
-: d_selectionId(original.d_selectionId),
- d_allocator_p(original.d_allocator_p)
+: d_selectionId(original.d_selectionId)
+, d_allocator_p(original.d_allocator_p)
{
switch (d_selectionId) {
- case SELECTION_ID_DOMAIN: {
+ case SELECTION_ID_DOMAIN: {
new (d_domain.buffer())
- Domain(bsl::move(original.d_domain.object()), d_allocator_p);
- } break;
- case SELECTION_ID_RESOLVER: {
+ Domain(
+ bsl::move(original.d_domain.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_RESOLVER: {
new (d_resolver.buffer())
- DomainResolverCommand(bsl::move(original.d_resolver.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_RECONFIGURE: {
+ DomainResolverCommand(
+ bsl::move(original.d_resolver.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_RECONFIGURE: {
new (d_reconfigure.buffer())
- DomainReconfigure(bsl::move(original.d_reconfigure.object()),
- d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ DomainReconfigure(
+ bsl::move(original.d_reconfigure.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-DomainsCommand::DomainsCommand(DomainsCommand&& original,
- bslma::Allocator* basicAllocator)
+DomainsCommand::DomainsCommand(
+ DomainsCommand&& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_DOMAIN: {
+ case SELECTION_ID_DOMAIN: {
new (d_domain.buffer())
- Domain(bsl::move(original.d_domain.object()), d_allocator_p);
- } break;
- case SELECTION_ID_RESOLVER: {
+ Domain(
+ bsl::move(original.d_domain.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_RESOLVER: {
new (d_resolver.buffer())
- DomainResolverCommand(bsl::move(original.d_resolver.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_RECONFIGURE: {
+ DomainResolverCommand(
+ bsl::move(original.d_resolver.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_RECONFIGURE: {
new (d_reconfigure.buffer())
- DomainReconfigure(bsl::move(original.d_reconfigure.object()),
- d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ DomainReconfigure(
+ bsl::move(original.d_reconfigure.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
#endif
// MANIPULATORS
-DomainsCommand& DomainsCommand::operator=(const DomainsCommand& rhs)
+DomainsCommand&
+DomainsCommand::operator=(const DomainsCommand& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_DOMAIN: {
+ case SELECTION_ID_DOMAIN: {
makeDomain(rhs.d_domain.object());
- } break;
- case SELECTION_ID_RESOLVER: {
+ } break;
+ case SELECTION_ID_RESOLVER: {
makeResolver(rhs.d_resolver.object());
- } break;
- case SELECTION_ID_RECONFIGURE: {
+ } break;
+ case SELECTION_ID_RECONFIGURE: {
makeReconfigure(rhs.d_reconfigure.object());
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -19917,22 +21971,23 @@ DomainsCommand& DomainsCommand::operator=(const DomainsCommand& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-DomainsCommand& DomainsCommand::operator=(DomainsCommand&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+DomainsCommand&
+DomainsCommand::operator=(DomainsCommand&& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_DOMAIN: {
+ case SELECTION_ID_DOMAIN: {
makeDomain(bsl::move(rhs.d_domain.object()));
- } break;
- case SELECTION_ID_RESOLVER: {
+ } break;
+ case SELECTION_ID_RESOLVER: {
makeResolver(bsl::move(rhs.d_resolver.object()));
- } break;
- case SELECTION_ID_RECONFIGURE: {
+ } break;
+ case SELECTION_ID_RECONFIGURE: {
makeReconfigure(bsl::move(rhs.d_reconfigure.object()));
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -19945,16 +22000,17 @@ DomainsCommand& DomainsCommand::operator=(DomainsCommand&& rhs)
void DomainsCommand::reset()
{
switch (d_selectionId) {
- case SELECTION_ID_DOMAIN: {
+ case SELECTION_ID_DOMAIN: {
d_domain.object().~Domain();
- } break;
- case SELECTION_ID_RESOLVER: {
+ } break;
+ case SELECTION_ID_RESOLVER: {
d_resolver.object().~DomainResolverCommand();
- } break;
- case SELECTION_ID_RECONFIGURE: {
+ } break;
+ case SELECTION_ID_RECONFIGURE: {
d_reconfigure.object().~DomainReconfigure();
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
d_selectionId = SELECTION_ID_UNDEFINED;
@@ -19963,29 +22019,30 @@ void DomainsCommand::reset()
int DomainsCommand::makeSelection(int selectionId)
{
switch (selectionId) {
- case SELECTION_ID_DOMAIN: {
+ case SELECTION_ID_DOMAIN: {
makeDomain();
- } break;
- case SELECTION_ID_RESOLVER: {
+ } break;
+ case SELECTION_ID_RESOLVER: {
makeResolver();
- } break;
- case SELECTION_ID_RECONFIGURE: {
+ } break;
+ case SELECTION_ID_RECONFIGURE: {
makeReconfigure();
- } break;
- case SELECTION_ID_UNDEFINED: {
+ } break;
+ case SELECTION_ID_UNDEFINED: {
reset();
- } break;
- default: return -1;
+ } break;
+ default:
+ return -1;
}
return 0;
}
-int DomainsCommand::makeSelection(const char* name, int nameLength)
+int DomainsCommand::makeSelection(const char *name, int nameLength)
{
- const bdlat_SelectionInfo* selectionInfo = lookupSelectionInfo(name,
- nameLength);
+ const bdlat_SelectionInfo *selectionInfo =
+ lookupSelectionInfo(name, nameLength);
if (0 == selectionInfo) {
- return -1;
+ return -1;
}
return makeSelection(selectionInfo->d_id);
@@ -19998,7 +22055,8 @@ Domain& DomainsCommand::makeDomain()
}
else {
reset();
- new (d_domain.buffer()) Domain(d_allocator_p);
+ new (d_domain.buffer())
+ Domain(d_allocator_p);
d_selectionId = SELECTION_ID_DOMAIN;
}
@@ -20012,15 +22070,16 @@ Domain& DomainsCommand::makeDomain(const Domain& value)
}
else {
reset();
- new (d_domain.buffer()) Domain(value, d_allocator_p);
+ new (d_domain.buffer())
+ Domain(value, d_allocator_p);
d_selectionId = SELECTION_ID_DOMAIN;
}
return d_domain.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Domain& DomainsCommand::makeDomain(Domain&& value)
{
if (SELECTION_ID_DOMAIN == d_selectionId) {
@@ -20028,7 +22087,8 @@ Domain& DomainsCommand::makeDomain(Domain&& value)
}
else {
reset();
- new (d_domain.buffer()) Domain(bsl::move(value), d_allocator_p);
+ new (d_domain.buffer())
+ Domain(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_DOMAIN;
}
@@ -20043,32 +22103,32 @@ DomainResolverCommand& DomainsCommand::makeResolver()
}
else {
reset();
- new (d_resolver.buffer()) DomainResolverCommand(d_allocator_p);
+ new (d_resolver.buffer())
+ DomainResolverCommand(d_allocator_p);
d_selectionId = SELECTION_ID_RESOLVER;
}
return d_resolver.object();
}
-DomainResolverCommand&
-DomainsCommand::makeResolver(const DomainResolverCommand& value)
+DomainResolverCommand& DomainsCommand::makeResolver(const DomainResolverCommand& value)
{
if (SELECTION_ID_RESOLVER == d_selectionId) {
d_resolver.object() = value;
}
else {
reset();
- new (d_resolver.buffer()) DomainResolverCommand(value, d_allocator_p);
+ new (d_resolver.buffer())
+ DomainResolverCommand(value, d_allocator_p);
d_selectionId = SELECTION_ID_RESOLVER;
}
return d_resolver.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-DomainResolverCommand&
-DomainsCommand::makeResolver(DomainResolverCommand&& value)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+DomainResolverCommand& DomainsCommand::makeResolver(DomainResolverCommand&& value)
{
if (SELECTION_ID_RESOLVER == d_selectionId) {
d_resolver.object() = bsl::move(value);
@@ -20076,7 +22136,7 @@ DomainsCommand::makeResolver(DomainResolverCommand&& value)
else {
reset();
new (d_resolver.buffer())
- DomainResolverCommand(bsl::move(value), d_allocator_p);
+ DomainResolverCommand(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_RESOLVER;
}
@@ -20091,30 +22151,31 @@ DomainReconfigure& DomainsCommand::makeReconfigure()
}
else {
reset();
- new (d_reconfigure.buffer()) DomainReconfigure(d_allocator_p);
+ new (d_reconfigure.buffer())
+ DomainReconfigure(d_allocator_p);
d_selectionId = SELECTION_ID_RECONFIGURE;
}
return d_reconfigure.object();
}
-DomainReconfigure&
-DomainsCommand::makeReconfigure(const DomainReconfigure& value)
+DomainReconfigure& DomainsCommand::makeReconfigure(const DomainReconfigure& value)
{
if (SELECTION_ID_RECONFIGURE == d_selectionId) {
d_reconfigure.object() = value;
}
else {
reset();
- new (d_reconfigure.buffer()) DomainReconfigure(value, d_allocator_p);
+ new (d_reconfigure.buffer())
+ DomainReconfigure(value, d_allocator_p);
d_selectionId = SELECTION_ID_RECONFIGURE;
}
return d_reconfigure.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
DomainReconfigure& DomainsCommand::makeReconfigure(DomainReconfigure&& value)
{
if (SELECTION_ID_RECONFIGURE == d_selectionId) {
@@ -20123,7 +22184,7 @@ DomainReconfigure& DomainsCommand::makeReconfigure(DomainReconfigure&& value)
else {
reset();
new (d_reconfigure.buffer())
- DomainReconfigure(bsl::move(value), d_allocator_p);
+ DomainReconfigure(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_RECONFIGURE;
}
@@ -20133,69 +22194,77 @@ DomainReconfigure& DomainsCommand::makeReconfigure(DomainReconfigure&& value)
// ACCESSORS
-bsl::ostream& DomainsCommand::print(bsl::ostream& stream,
- int level,
- int spacesPerLevel) const
+bsl::ostream& DomainsCommand::print(
+ bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
switch (d_selectionId) {
- case SELECTION_ID_DOMAIN: {
+ case SELECTION_ID_DOMAIN: {
printer.printAttribute("domain", d_domain.object());
- } break;
- case SELECTION_ID_RESOLVER: {
+ } break;
+ case SELECTION_ID_RESOLVER: {
printer.printAttribute("resolver", d_resolver.object());
- } break;
- case SELECTION_ID_RECONFIGURE: {
+ } break;
+ case SELECTION_ID_RECONFIGURE: {
printer.printAttribute("reconfigure", d_reconfigure.object());
- } break;
- default: stream << "SELECTION UNDEFINED\n";
+ } break;
+ default:
+ stream << "SELECTION UNDEFINED\n";
}
printer.end();
return stream;
}
-const char* DomainsCommand::selectionName() const
+
+const char *DomainsCommand::selectionName() const
{
switch (d_selectionId) {
- case SELECTION_ID_DOMAIN:
+ case SELECTION_ID_DOMAIN:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAIN].name();
- case SELECTION_ID_RESOLVER:
+ case SELECTION_ID_RESOLVER:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_RESOLVER].name();
- case SELECTION_ID_RECONFIGURE:
+ case SELECTION_ID_RECONFIGURE:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_RECONFIGURE].name();
- default:
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
return "(* UNDEFINED *)";
}
}
-// ----------------------
-// class RoundRobinRouter
-// ----------------------
+ // ----------------------
+ // class RoundRobinRouter
+ // ----------------------
// CONSTANTS
const char RoundRobinRouter::CLASS_NAME[] = "RoundRobinRouter";
const bdlat_AttributeInfo RoundRobinRouter::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_CONSUMERS,
- "consumers",
- sizeof("consumers") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ ATTRIBUTE_ID_CONSUMERS,
+ "consumers",
+ sizeof("consumers") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo*
-RoundRobinRouter::lookupAttributeInfo(const char* name, int nameLength)
+const bdlat_AttributeInfo *RoundRobinRouter::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 1; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- RoundRobinRouter::ATTRIBUTE_INFO_ARRAY[i];
+ RoundRobinRouter::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -20203,37 +22272,38 @@ RoundRobinRouter::lookupAttributeInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_AttributeInfo* RoundRobinRouter::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *RoundRobinRouter::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_CONSUMERS:
+ case ATTRIBUTE_ID_CONSUMERS:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONSUMERS];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-RoundRobinRouter::RoundRobinRouter(bslma::Allocator* basicAllocator)
+RoundRobinRouter::RoundRobinRouter(bslma::Allocator *basicAllocator)
: d_consumers(basicAllocator)
{
}
RoundRobinRouter::RoundRobinRouter(const RoundRobinRouter& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_consumers(original.d_consumers, basicAllocator)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
RoundRobinRouter::RoundRobinRouter(RoundRobinRouter&& original) noexcept
: d_consumers(bsl::move(original.d_consumers))
{
}
RoundRobinRouter::RoundRobinRouter(RoundRobinRouter&& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_consumers(bsl::move(original.d_consumers), basicAllocator)
{
}
@@ -20245,7 +22315,8 @@ RoundRobinRouter::~RoundRobinRouter()
// MANIPULATORS
-RoundRobinRouter& RoundRobinRouter::operator=(const RoundRobinRouter& rhs)
+RoundRobinRouter&
+RoundRobinRouter::operator=(const RoundRobinRouter& rhs)
{
if (this != &rhs) {
d_consumers = rhs.d_consumers;
@@ -20254,9 +22325,10 @@ RoundRobinRouter& RoundRobinRouter::operator=(const RoundRobinRouter& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-RoundRobinRouter& RoundRobinRouter::operator=(RoundRobinRouter&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+RoundRobinRouter&
+RoundRobinRouter::operator=(RoundRobinRouter&& rhs)
{
if (this != &rhs) {
d_consumers = bsl::move(rhs.d_consumers);
@@ -20284,57 +22356,74 @@ bsl::ostream& RoundRobinRouter::print(bsl::ostream& stream,
return stream;
}
-// -------------------
-// class StorageResult
-// -------------------
+
+
+ // -------------------
+ // class StorageResult
+ // -------------------
// CONSTANTS
const char StorageResult::CLASS_NAME[] = "StorageResult";
const bdlat_SelectionInfo StorageResult::SELECTION_INFO_ARRAY[] = {
- {SELECTION_ID_SUCCESS,
- "success",
- sizeof("success") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_ERROR,
- "error",
- sizeof("error") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_STORAGE_CONTENT,
- "storageContent",
- sizeof("storageContent") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_CLUSTER_STORAGE_SUMMARY,
- "clusterStorageSummary",
- sizeof("clusterStorageSummary") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_REPLICATION_RESULT,
- "replicationResult",
- sizeof("replicationResult") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_PURGED_QUEUES,
- "purgedQueues",
- sizeof("purgedQueues") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ SELECTION_ID_SUCCESS,
+ "success",
+ sizeof("success") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_ERROR,
+ "error",
+ sizeof("error") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_STORAGE_CONTENT,
+ "storageContent",
+ sizeof("storageContent") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_CLUSTER_STORAGE_SUMMARY,
+ "clusterStorageSummary",
+ sizeof("clusterStorageSummary") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_REPLICATION_RESULT,
+ "replicationResult",
+ sizeof("replicationResult") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_PURGED_QUEUES,
+ "purgedQueues",
+ sizeof("purgedQueues") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_SelectionInfo* StorageResult::lookupSelectionInfo(const char* name,
- int nameLength)
+const bdlat_SelectionInfo *StorageResult::lookupSelectionInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 6; ++i) {
const bdlat_SelectionInfo& selectionInfo =
- StorageResult::SELECTION_INFO_ARRAY[i];
+ StorageResult::SELECTION_INFO_ARRAY[i];
- if (nameLength == selectionInfo.d_nameLength &&
- 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength)) {
+ if (nameLength == selectionInfo.d_nameLength
+ && 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength))
+ {
return &selectionInfo;
}
}
@@ -20342,162 +22431,178 @@ const bdlat_SelectionInfo* StorageResult::lookupSelectionInfo(const char* name,
return 0;
}
-const bdlat_SelectionInfo* StorageResult::lookupSelectionInfo(int id)
+const bdlat_SelectionInfo *StorageResult::lookupSelectionInfo(int id)
{
switch (id) {
- case SELECTION_ID_SUCCESS:
+ case SELECTION_ID_SUCCESS:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_SUCCESS];
- case SELECTION_ID_ERROR:
+ case SELECTION_ID_ERROR:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR];
- case SELECTION_ID_STORAGE_CONTENT:
+ case SELECTION_ID_STORAGE_CONTENT:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_STORAGE_CONTENT];
- case SELECTION_ID_CLUSTER_STORAGE_SUMMARY:
+ case SELECTION_ID_CLUSTER_STORAGE_SUMMARY:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_STORAGE_SUMMARY];
- case SELECTION_ID_REPLICATION_RESULT:
+ case SELECTION_ID_REPLICATION_RESULT:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_REPLICATION_RESULT];
- case SELECTION_ID_PURGED_QUEUES:
+ case SELECTION_ID_PURGED_QUEUES:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_PURGED_QUEUES];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-StorageResult::StorageResult(const StorageResult& original,
- bslma::Allocator* basicAllocator)
+StorageResult::StorageResult(
+ const StorageResult& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_SUCCESS: {
- new (d_success.buffer()) Void(original.d_success.object());
- } break;
- case SELECTION_ID_ERROR: {
- new (d_error.buffer()) Error(original.d_error.object(), d_allocator_p);
- } break;
- case SELECTION_ID_STORAGE_CONTENT: {
+ case SELECTION_ID_SUCCESS: {
+ new (d_success.buffer())
+ Void(original.d_success.object());
+ } break;
+ case SELECTION_ID_ERROR: {
+ new (d_error.buffer())
+ Error(
+ original.d_error.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_STORAGE_CONTENT: {
new (d_storageContent.buffer())
- StorageContent(original.d_storageContent.object(), d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: {
+ StorageContent(
+ original.d_storageContent.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: {
new (d_clusterStorageSummary.buffer())
- ClusterStorageSummary(original.d_clusterStorageSummary.object(),
- d_allocator_p);
- } break;
- case SELECTION_ID_REPLICATION_RESULT: {
+ ClusterStorageSummary(
+ original.d_clusterStorageSummary.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_REPLICATION_RESULT: {
new (d_replicationResult.buffer())
- ReplicationResult(original.d_replicationResult.object(),
- d_allocator_p);
- } break;
- case SELECTION_ID_PURGED_QUEUES: {
+ ReplicationResult(
+ original.d_replicationResult.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_PURGED_QUEUES: {
new (d_purgedQueues.buffer())
- PurgedQueues(original.d_purgedQueues.object(), d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ PurgedQueues(
+ original.d_purgedQueues.object(), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
StorageResult::StorageResult(StorageResult&& original) noexcept
-: d_selectionId(original.d_selectionId),
- d_allocator_p(original.d_allocator_p)
+: d_selectionId(original.d_selectionId)
+, d_allocator_p(original.d_allocator_p)
{
switch (d_selectionId) {
- case SELECTION_ID_SUCCESS: {
- new (d_success.buffer()) Void(bsl::move(original.d_success.object()));
- } break;
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_SUCCESS: {
+ new (d_success.buffer())
+ Void(bsl::move(original.d_success.object()));
+ } break;
+ case SELECTION_ID_ERROR: {
new (d_error.buffer())
- Error(bsl::move(original.d_error.object()), d_allocator_p);
- } break;
- case SELECTION_ID_STORAGE_CONTENT: {
+ Error(
+ bsl::move(original.d_error.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_STORAGE_CONTENT: {
new (d_storageContent.buffer())
- StorageContent(bsl::move(original.d_storageContent.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: {
- new (d_clusterStorageSummary.buffer()) ClusterStorageSummary(
- bsl::move(original.d_clusterStorageSummary.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_REPLICATION_RESULT: {
+ StorageContent(
+ bsl::move(original.d_storageContent.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: {
+ new (d_clusterStorageSummary.buffer())
+ ClusterStorageSummary(
+ bsl::move(original.d_clusterStorageSummary.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_REPLICATION_RESULT: {
new (d_replicationResult.buffer())
- ReplicationResult(bsl::move(original.d_replicationResult.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_PURGED_QUEUES: {
+ ReplicationResult(
+ bsl::move(original.d_replicationResult.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_PURGED_QUEUES: {
new (d_purgedQueues.buffer())
- PurgedQueues(bsl::move(original.d_purgedQueues.object()),
- d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ PurgedQueues(
+ bsl::move(original.d_purgedQueues.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-StorageResult::StorageResult(StorageResult&& original,
- bslma::Allocator* basicAllocator)
+StorageResult::StorageResult(
+ StorageResult&& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_SUCCESS: {
- new (d_success.buffer()) Void(bsl::move(original.d_success.object()));
- } break;
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_SUCCESS: {
+ new (d_success.buffer())
+ Void(bsl::move(original.d_success.object()));
+ } break;
+ case SELECTION_ID_ERROR: {
new (d_error.buffer())
- Error(bsl::move(original.d_error.object()), d_allocator_p);
- } break;
- case SELECTION_ID_STORAGE_CONTENT: {
+ Error(
+ bsl::move(original.d_error.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_STORAGE_CONTENT: {
new (d_storageContent.buffer())
- StorageContent(bsl::move(original.d_storageContent.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: {
- new (d_clusterStorageSummary.buffer()) ClusterStorageSummary(
- bsl::move(original.d_clusterStorageSummary.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_REPLICATION_RESULT: {
+ StorageContent(
+ bsl::move(original.d_storageContent.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: {
+ new (d_clusterStorageSummary.buffer())
+ ClusterStorageSummary(
+ bsl::move(original.d_clusterStorageSummary.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_REPLICATION_RESULT: {
new (d_replicationResult.buffer())
- ReplicationResult(bsl::move(original.d_replicationResult.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_PURGED_QUEUES: {
+ ReplicationResult(
+ bsl::move(original.d_replicationResult.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_PURGED_QUEUES: {
new (d_purgedQueues.buffer())
- PurgedQueues(bsl::move(original.d_purgedQueues.object()),
- d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ PurgedQueues(
+ bsl::move(original.d_purgedQueues.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
#endif
// MANIPULATORS
-StorageResult& StorageResult::operator=(const StorageResult& rhs)
+StorageResult&
+StorageResult::operator=(const StorageResult& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_SUCCESS: {
+ case SELECTION_ID_SUCCESS: {
makeSuccess(rhs.d_success.object());
- } break;
- case SELECTION_ID_ERROR: {
+ } break;
+ case SELECTION_ID_ERROR: {
makeError(rhs.d_error.object());
- } break;
- case SELECTION_ID_STORAGE_CONTENT: {
+ } break;
+ case SELECTION_ID_STORAGE_CONTENT: {
makeStorageContent(rhs.d_storageContent.object());
- } break;
- case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: {
+ } break;
+ case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: {
makeClusterStorageSummary(rhs.d_clusterStorageSummary.object());
- } break;
- case SELECTION_ID_REPLICATION_RESULT: {
+ } break;
+ case SELECTION_ID_REPLICATION_RESULT: {
makeReplicationResult(rhs.d_replicationResult.object());
- } break;
- case SELECTION_ID_PURGED_QUEUES: {
+ } break;
+ case SELECTION_ID_PURGED_QUEUES: {
makePurgedQueues(rhs.d_purgedQueues.object());
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -20506,32 +22611,32 @@ StorageResult& StorageResult::operator=(const StorageResult& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-StorageResult& StorageResult::operator=(StorageResult&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+StorageResult&
+StorageResult::operator=(StorageResult&& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_SUCCESS: {
+ case SELECTION_ID_SUCCESS: {
makeSuccess(bsl::move(rhs.d_success.object()));
- } break;
- case SELECTION_ID_ERROR: {
+ } break;
+ case SELECTION_ID_ERROR: {
makeError(bsl::move(rhs.d_error.object()));
- } break;
- case SELECTION_ID_STORAGE_CONTENT: {
+ } break;
+ case SELECTION_ID_STORAGE_CONTENT: {
makeStorageContent(bsl::move(rhs.d_storageContent.object()));
- } break;
- case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: {
- makeClusterStorageSummary(
- bsl::move(rhs.d_clusterStorageSummary.object()));
- } break;
- case SELECTION_ID_REPLICATION_RESULT: {
+ } break;
+ case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: {
+ makeClusterStorageSummary(bsl::move(rhs.d_clusterStorageSummary.object()));
+ } break;
+ case SELECTION_ID_REPLICATION_RESULT: {
makeReplicationResult(bsl::move(rhs.d_replicationResult.object()));
- } break;
- case SELECTION_ID_PURGED_QUEUES: {
+ } break;
+ case SELECTION_ID_PURGED_QUEUES: {
makePurgedQueues(bsl::move(rhs.d_purgedQueues.object()));
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -20544,25 +22649,26 @@ StorageResult& StorageResult::operator=(StorageResult&& rhs)
void StorageResult::reset()
{
switch (d_selectionId) {
- case SELECTION_ID_SUCCESS: {
+ case SELECTION_ID_SUCCESS: {
d_success.object().~Void();
- } break;
- case SELECTION_ID_ERROR: {
+ } break;
+ case SELECTION_ID_ERROR: {
d_error.object().~Error();
- } break;
- case SELECTION_ID_STORAGE_CONTENT: {
+ } break;
+ case SELECTION_ID_STORAGE_CONTENT: {
d_storageContent.object().~StorageContent();
- } break;
- case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: {
+ } break;
+ case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: {
d_clusterStorageSummary.object().~ClusterStorageSummary();
- } break;
- case SELECTION_ID_REPLICATION_RESULT: {
+ } break;
+ case SELECTION_ID_REPLICATION_RESULT: {
d_replicationResult.object().~ReplicationResult();
- } break;
- case SELECTION_ID_PURGED_QUEUES: {
+ } break;
+ case SELECTION_ID_PURGED_QUEUES: {
d_purgedQueues.object().~PurgedQueues();
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
d_selectionId = SELECTION_ID_UNDEFINED;
@@ -20571,38 +22677,39 @@ void StorageResult::reset()
int StorageResult::makeSelection(int selectionId)
{
switch (selectionId) {
- case SELECTION_ID_SUCCESS: {
+ case SELECTION_ID_SUCCESS: {
makeSuccess();
- } break;
- case SELECTION_ID_ERROR: {
+ } break;
+ case SELECTION_ID_ERROR: {
makeError();
- } break;
- case SELECTION_ID_STORAGE_CONTENT: {
+ } break;
+ case SELECTION_ID_STORAGE_CONTENT: {
makeStorageContent();
- } break;
- case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: {
+ } break;
+ case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: {
makeClusterStorageSummary();
- } break;
- case SELECTION_ID_REPLICATION_RESULT: {
+ } break;
+ case SELECTION_ID_REPLICATION_RESULT: {
makeReplicationResult();
- } break;
- case SELECTION_ID_PURGED_QUEUES: {
+ } break;
+ case SELECTION_ID_PURGED_QUEUES: {
makePurgedQueues();
- } break;
- case SELECTION_ID_UNDEFINED: {
+ } break;
+ case SELECTION_ID_UNDEFINED: {
reset();
- } break;
- default: return -1;
+ } break;
+ default:
+ return -1;
}
return 0;
}
-int StorageResult::makeSelection(const char* name, int nameLength)
+int StorageResult::makeSelection(const char *name, int nameLength)
{
- const bdlat_SelectionInfo* selectionInfo = lookupSelectionInfo(name,
- nameLength);
+ const bdlat_SelectionInfo *selectionInfo =
+ lookupSelectionInfo(name, nameLength);
if (0 == selectionInfo) {
- return -1;
+ return -1;
}
return makeSelection(selectionInfo->d_id);
@@ -20615,7 +22722,8 @@ Void& StorageResult::makeSuccess()
}
else {
reset();
- new (d_success.buffer()) Void();
+ new (d_success.buffer())
+ Void();
d_selectionId = SELECTION_ID_SUCCESS;
}
@@ -20629,15 +22737,16 @@ Void& StorageResult::makeSuccess(const Void& value)
}
else {
reset();
- new (d_success.buffer()) Void(value);
+ new (d_success.buffer())
+ Void(value);
d_selectionId = SELECTION_ID_SUCCESS;
}
return d_success.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Void& StorageResult::makeSuccess(Void&& value)
{
if (SELECTION_ID_SUCCESS == d_selectionId) {
@@ -20645,7 +22754,8 @@ Void& StorageResult::makeSuccess(Void&& value)
}
else {
reset();
- new (d_success.buffer()) Void(bsl::move(value));
+ new (d_success.buffer())
+ Void(bsl::move(value));
d_selectionId = SELECTION_ID_SUCCESS;
}
@@ -20660,7 +22770,8 @@ Error& StorageResult::makeError()
}
else {
reset();
- new (d_error.buffer()) Error(d_allocator_p);
+ new (d_error.buffer())
+ Error(d_allocator_p);
d_selectionId = SELECTION_ID_ERROR;
}
@@ -20674,15 +22785,16 @@ Error& StorageResult::makeError(const Error& value)
}
else {
reset();
- new (d_error.buffer()) Error(value, d_allocator_p);
+ new (d_error.buffer())
+ Error(value, d_allocator_p);
d_selectionId = SELECTION_ID_ERROR;
}
return d_error.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Error& StorageResult::makeError(Error&& value)
{
if (SELECTION_ID_ERROR == d_selectionId) {
@@ -20690,7 +22802,8 @@ Error& StorageResult::makeError(Error&& value)
}
else {
reset();
- new (d_error.buffer()) Error(bsl::move(value), d_allocator_p);
+ new (d_error.buffer())
+ Error(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_ERROR;
}
@@ -20705,7 +22818,8 @@ StorageContent& StorageResult::makeStorageContent()
}
else {
reset();
- new (d_storageContent.buffer()) StorageContent(d_allocator_p);
+ new (d_storageContent.buffer())
+ StorageContent(d_allocator_p);
d_selectionId = SELECTION_ID_STORAGE_CONTENT;
}
@@ -20719,15 +22833,16 @@ StorageContent& StorageResult::makeStorageContent(const StorageContent& value)
}
else {
reset();
- new (d_storageContent.buffer()) StorageContent(value, d_allocator_p);
+ new (d_storageContent.buffer())
+ StorageContent(value, d_allocator_p);
d_selectionId = SELECTION_ID_STORAGE_CONTENT;
}
return d_storageContent.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
StorageContent& StorageResult::makeStorageContent(StorageContent&& value)
{
if (SELECTION_ID_STORAGE_CONTENT == d_selectionId) {
@@ -20736,7 +22851,7 @@ StorageContent& StorageResult::makeStorageContent(StorageContent&& value)
else {
reset();
new (d_storageContent.buffer())
- StorageContent(bsl::move(value), d_allocator_p);
+ StorageContent(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_STORAGE_CONTENT;
}
@@ -20752,15 +22867,14 @@ ClusterStorageSummary& StorageResult::makeClusterStorageSummary()
else {
reset();
new (d_clusterStorageSummary.buffer())
- ClusterStorageSummary(d_allocator_p);
+ ClusterStorageSummary(d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER_STORAGE_SUMMARY;
}
return d_clusterStorageSummary.object();
}
-ClusterStorageSummary&
-StorageResult::makeClusterStorageSummary(const ClusterStorageSummary& value)
+ClusterStorageSummary& StorageResult::makeClusterStorageSummary(const ClusterStorageSummary& value)
{
if (SELECTION_ID_CLUSTER_STORAGE_SUMMARY == d_selectionId) {
d_clusterStorageSummary.object() = value;
@@ -20768,17 +22882,16 @@ StorageResult::makeClusterStorageSummary(const ClusterStorageSummary& value)
else {
reset();
new (d_clusterStorageSummary.buffer())
- ClusterStorageSummary(value, d_allocator_p);
+ ClusterStorageSummary(value, d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER_STORAGE_SUMMARY;
}
return d_clusterStorageSummary.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-ClusterStorageSummary&
-StorageResult::makeClusterStorageSummary(ClusterStorageSummary&& value)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ClusterStorageSummary& StorageResult::makeClusterStorageSummary(ClusterStorageSummary&& value)
{
if (SELECTION_ID_CLUSTER_STORAGE_SUMMARY == d_selectionId) {
d_clusterStorageSummary.object() = bsl::move(value);
@@ -20786,7 +22899,7 @@ StorageResult::makeClusterStorageSummary(ClusterStorageSummary&& value)
else {
reset();
new (d_clusterStorageSummary.buffer())
- ClusterStorageSummary(bsl::move(value), d_allocator_p);
+ ClusterStorageSummary(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER_STORAGE_SUMMARY;
}
@@ -20801,15 +22914,15 @@ ReplicationResult& StorageResult::makeReplicationResult()
}
else {
reset();
- new (d_replicationResult.buffer()) ReplicationResult(d_allocator_p);
+ new (d_replicationResult.buffer())
+ ReplicationResult(d_allocator_p);
d_selectionId = SELECTION_ID_REPLICATION_RESULT;
}
return d_replicationResult.object();
}
-ReplicationResult&
-StorageResult::makeReplicationResult(const ReplicationResult& value)
+ReplicationResult& StorageResult::makeReplicationResult(const ReplicationResult& value)
{
if (SELECTION_ID_REPLICATION_RESULT == d_selectionId) {
d_replicationResult.object() = value;
@@ -20817,17 +22930,16 @@ StorageResult::makeReplicationResult(const ReplicationResult& value)
else {
reset();
new (d_replicationResult.buffer())
- ReplicationResult(value, d_allocator_p);
+ ReplicationResult(value, d_allocator_p);
d_selectionId = SELECTION_ID_REPLICATION_RESULT;
}
return d_replicationResult.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-ReplicationResult&
-StorageResult::makeReplicationResult(ReplicationResult&& value)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ReplicationResult& StorageResult::makeReplicationResult(ReplicationResult&& value)
{
if (SELECTION_ID_REPLICATION_RESULT == d_selectionId) {
d_replicationResult.object() = bsl::move(value);
@@ -20835,7 +22947,7 @@ StorageResult::makeReplicationResult(ReplicationResult&& value)
else {
reset();
new (d_replicationResult.buffer())
- ReplicationResult(bsl::move(value), d_allocator_p);
+ ReplicationResult(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_REPLICATION_RESULT;
}
@@ -20850,7 +22962,8 @@ PurgedQueues& StorageResult::makePurgedQueues()
}
else {
reset();
- new (d_purgedQueues.buffer()) PurgedQueues(d_allocator_p);
+ new (d_purgedQueues.buffer())
+ PurgedQueues(d_allocator_p);
d_selectionId = SELECTION_ID_PURGED_QUEUES;
}
@@ -20864,15 +22977,16 @@ PurgedQueues& StorageResult::makePurgedQueues(const PurgedQueues& value)
}
else {
reset();
- new (d_purgedQueues.buffer()) PurgedQueues(value, d_allocator_p);
+ new (d_purgedQueues.buffer())
+ PurgedQueues(value, d_allocator_p);
d_selectionId = SELECTION_ID_PURGED_QUEUES;
}
return d_purgedQueues.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
PurgedQueues& StorageResult::makePurgedQueues(PurgedQueues&& value)
{
if (SELECTION_ID_PURGED_QUEUES == d_selectionId) {
@@ -20881,7 +22995,7 @@ PurgedQueues& StorageResult::makePurgedQueues(PurgedQueues&& value)
else {
reset();
new (d_purgedQueues.buffer())
- PurgedQueues(bsl::move(value), d_allocator_p);
+ PurgedQueues(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_PURGED_QUEUES;
}
@@ -20891,101 +23005,113 @@ PurgedQueues& StorageResult::makePurgedQueues(PurgedQueues&& value)
// ACCESSORS
-bsl::ostream&
-StorageResult::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& StorageResult::print(
+ bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
switch (d_selectionId) {
- case SELECTION_ID_SUCCESS: {
+ case SELECTION_ID_SUCCESS: {
printer.printAttribute("success", d_success.object());
- } break;
- case SELECTION_ID_ERROR: {
+ } break;
+ case SELECTION_ID_ERROR: {
printer.printAttribute("error", d_error.object());
- } break;
- case SELECTION_ID_STORAGE_CONTENT: {
+ } break;
+ case SELECTION_ID_STORAGE_CONTENT: {
printer.printAttribute("storageContent", d_storageContent.object());
- } break;
- case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: {
- printer.printAttribute("clusterStorageSummary",
- d_clusterStorageSummary.object());
- } break;
- case SELECTION_ID_REPLICATION_RESULT: {
- printer.printAttribute("replicationResult",
- d_replicationResult.object());
- } break;
- case SELECTION_ID_PURGED_QUEUES: {
+ } break;
+ case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: {
+ printer.printAttribute("clusterStorageSummary", d_clusterStorageSummary.object());
+ } break;
+ case SELECTION_ID_REPLICATION_RESULT: {
+ printer.printAttribute("replicationResult", d_replicationResult.object());
+ } break;
+ case SELECTION_ID_PURGED_QUEUES: {
printer.printAttribute("purgedQueues", d_purgedQueues.object());
- } break;
- default: stream << "SELECTION UNDEFINED\n";
+ } break;
+ default:
+ stream << "SELECTION UNDEFINED\n";
}
printer.end();
return stream;
}
-const char* StorageResult::selectionName() const
+
+const char *StorageResult::selectionName() const
{
switch (d_selectionId) {
- case SELECTION_ID_SUCCESS:
+ case SELECTION_ID_SUCCESS:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_SUCCESS].name();
- case SELECTION_ID_ERROR:
+ case SELECTION_ID_ERROR:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR].name();
- case SELECTION_ID_STORAGE_CONTENT:
+ case SELECTION_ID_STORAGE_CONTENT:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_STORAGE_CONTENT].name();
- case SELECTION_ID_CLUSTER_STORAGE_SUMMARY:
- return SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_STORAGE_SUMMARY]
- .name();
- case SELECTION_ID_REPLICATION_RESULT:
+ case SELECTION_ID_CLUSTER_STORAGE_SUMMARY:
+ return SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_STORAGE_SUMMARY].name();
+ case SELECTION_ID_REPLICATION_RESULT:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_REPLICATION_RESULT].name();
- case SELECTION_ID_PURGED_QUEUES:
+ case SELECTION_ID_PURGED_QUEUES:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_PURGED_QUEUES].name();
- default:
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
return "(* UNDEFINED *)";
}
}
-// --------------
-// class AppState
-// --------------
+ // --------------
+ // class AppState
+ // --------------
// CONSTANTS
const char AppState::CLASS_NAME[] = "AppState";
const bdlat_AttributeInfo AppState::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_APP_ID,
- "appId",
- sizeof("appId") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_NUM_CONSUMERS,
- "numConsumers",
- sizeof("numConsumers") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_REDELIVERY_LIST_LENGTH,
- "redeliveryListLength",
- sizeof("redeliveryListLength") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_ROUND_ROBIN_ROUTER,
- "roundRobinRouter",
- sizeof("roundRobinRouter") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ ATTRIBUTE_ID_APP_ID,
+ "appId",
+ sizeof("appId") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_NUM_CONSUMERS,
+ "numConsumers",
+ sizeof("numConsumers") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_REDELIVERY_LIST_LENGTH,
+ "redeliveryListLength",
+ sizeof("redeliveryListLength") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_ROUND_ROBIN_ROUTER,
+ "roundRobinRouter",
+ sizeof("roundRobinRouter") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* AppState::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *AppState::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 4; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- AppState::ATTRIBUTE_INFO_ARRAY[i];
+ AppState::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -20993,24 +23119,25 @@ const bdlat_AttributeInfo* AppState::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* AppState::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *AppState::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_APP_ID:
+ case ATTRIBUTE_ID_APP_ID:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_ID];
- case ATTRIBUTE_ID_NUM_CONSUMERS:
+ case ATTRIBUTE_ID_NUM_CONSUMERS:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_CONSUMERS];
- case ATTRIBUTE_ID_REDELIVERY_LIST_LENGTH:
+ case ATTRIBUTE_ID_REDELIVERY_LIST_LENGTH:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_REDELIVERY_LIST_LENGTH];
- case ATTRIBUTE_ID_ROUND_ROBIN_ROUTER:
+ case ATTRIBUTE_ID_ROUND_ROBIN_ROUTER:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ROUND_ROBIN_ROUTER];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-AppState::AppState(bslma::Allocator* basicAllocator)
+AppState::AppState(bslma::Allocator *basicAllocator)
: d_redeliveryListLength()
, d_appId(basicAllocator)
, d_roundRobinRouter(basicAllocator)
@@ -21018,7 +23145,8 @@ AppState::AppState(bslma::Allocator* basicAllocator)
{
}
-AppState::AppState(const AppState& original, bslma::Allocator* basicAllocator)
+AppState::AppState(const AppState& original,
+ bslma::Allocator *basicAllocator)
: d_redeliveryListLength(original.d_redeliveryListLength)
, d_appId(original.d_appId, basicAllocator)
, d_roundRobinRouter(original.d_roundRobinRouter, basicAllocator)
@@ -21026,17 +23154,18 @@ AppState::AppState(const AppState& original, bslma::Allocator* basicAllocator)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
AppState::AppState(AppState&& original) noexcept
-: d_redeliveryListLength(bsl::move(original.d_redeliveryListLength)),
- d_appId(bsl::move(original.d_appId)),
- d_roundRobinRouter(bsl::move(original.d_roundRobinRouter)),
- d_numConsumers(bsl::move(original.d_numConsumers))
+: d_redeliveryListLength(bsl::move(original.d_redeliveryListLength))
+, d_appId(bsl::move(original.d_appId))
+, d_roundRobinRouter(bsl::move(original.d_roundRobinRouter))
+, d_numConsumers(bsl::move(original.d_numConsumers))
{
}
-AppState::AppState(AppState&& original, bslma::Allocator* basicAllocator)
+AppState::AppState(AppState&& original,
+ bslma::Allocator *basicAllocator)
: d_redeliveryListLength(bsl::move(original.d_redeliveryListLength))
, d_appId(bsl::move(original.d_appId), basicAllocator)
, d_roundRobinRouter(bsl::move(original.d_roundRobinRouter), basicAllocator)
@@ -21051,27 +23180,29 @@ AppState::~AppState()
// MANIPULATORS
-AppState& AppState::operator=(const AppState& rhs)
+AppState&
+AppState::operator=(const AppState& rhs)
{
if (this != &rhs) {
- d_appId = rhs.d_appId;
- d_numConsumers = rhs.d_numConsumers;
+ d_appId = rhs.d_appId;
+ d_numConsumers = rhs.d_numConsumers;
d_redeliveryListLength = rhs.d_redeliveryListLength;
- d_roundRobinRouter = rhs.d_roundRobinRouter;
+ d_roundRobinRouter = rhs.d_roundRobinRouter;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-AppState& AppState::operator=(AppState&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+AppState&
+AppState::operator=(AppState&& rhs)
{
if (this != &rhs) {
- d_appId = bsl::move(rhs.d_appId);
- d_numConsumers = bsl::move(rhs.d_numConsumers);
+ d_appId = bsl::move(rhs.d_appId);
+ d_numConsumers = bsl::move(rhs.d_numConsumers);
d_redeliveryListLength = bsl::move(rhs.d_redeliveryListLength);
- d_roundRobinRouter = bsl::move(rhs.d_roundRobinRouter);
+ d_roundRobinRouter = bsl::move(rhs.d_roundRobinRouter);
}
return *this;
@@ -21088,51 +23219,60 @@ void AppState::reset()
// ACCESSORS
-bsl::ostream&
-AppState::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& AppState::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
printer.printAttribute("appId", this->appId());
printer.printAttribute("numConsumers", this->numConsumers());
- printer.printAttribute("redeliveryListLength",
- this->redeliveryListLength());
+ printer.printAttribute("redeliveryListLength", this->redeliveryListLength());
printer.printAttribute("roundRobinRouter", this->roundRobinRouter());
printer.end();
return stream;
}
-// -------------
-// class Cluster
-// -------------
+
+
+ // -------------
+ // class Cluster
+ // -------------
// CONSTANTS
const char Cluster::CLASS_NAME[] = "Cluster";
const bdlat_AttributeInfo Cluster::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_NAME,
- "name",
- sizeof("name") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_COMMAND,
- "command",
- sizeof("command") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ ATTRIBUTE_ID_NAME,
+ "name",
+ sizeof("name") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_COMMAND,
+ "command",
+ sizeof("command") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* Cluster::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *Cluster::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 2; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- Cluster::ATTRIBUTE_INFO_ARRAY[i];
+ Cluster::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -21140,39 +23280,43 @@ const bdlat_AttributeInfo* Cluster::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* Cluster::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *Cluster::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_NAME: return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME];
- case ATTRIBUTE_ID_COMMAND:
+ case ATTRIBUTE_ID_NAME:
+ return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME];
+ case ATTRIBUTE_ID_COMMAND:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-Cluster::Cluster(bslma::Allocator* basicAllocator)
+Cluster::Cluster(bslma::Allocator *basicAllocator)
: d_name(basicAllocator)
, d_command(basicAllocator)
{
}
-Cluster::Cluster(const Cluster& original, bslma::Allocator* basicAllocator)
+Cluster::Cluster(const Cluster& original,
+ bslma::Allocator *basicAllocator)
: d_name(original.d_name, basicAllocator)
, d_command(original.d_command, basicAllocator)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Cluster::Cluster(Cluster&& original) noexcept
-: d_name(bsl::move(original.d_name)),
- d_command(bsl::move(original.d_command))
+: d_name(bsl::move(original.d_name))
+, d_command(bsl::move(original.d_command))
{
}
-Cluster::Cluster(Cluster&& original, bslma::Allocator* basicAllocator)
+Cluster::Cluster(Cluster&& original,
+ bslma::Allocator *basicAllocator)
: d_name(bsl::move(original.d_name), basicAllocator)
, d_command(bsl::move(original.d_command), basicAllocator)
{
@@ -21185,22 +23329,24 @@ Cluster::~Cluster()
// MANIPULATORS
-Cluster& Cluster::operator=(const Cluster& rhs)
+Cluster&
+Cluster::operator=(const Cluster& rhs)
{
if (this != &rhs) {
- d_name = rhs.d_name;
+ d_name = rhs.d_name;
d_command = rhs.d_command;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-Cluster& Cluster::operator=(Cluster&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+Cluster&
+Cluster::operator=(Cluster&& rhs)
{
if (this != &rhs) {
- d_name = bsl::move(rhs.d_name);
+ d_name = bsl::move(rhs.d_name);
d_command = bsl::move(rhs.d_command);
}
@@ -21216,8 +23362,9 @@ void Cluster::reset()
// ACCESSORS
-bsl::ostream&
-Cluster::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& Cluster::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
@@ -21227,62 +23374,81 @@ Cluster::print(bsl::ostream& stream, int level, int spacesPerLevel) const
return stream;
}
-// -------------------
-// class ClusterResult
-// -------------------
+
+
+ // -------------------
+ // class ClusterResult
+ // -------------------
// CONSTANTS
const char ClusterResult::CLASS_NAME[] = "ClusterResult";
const bdlat_SelectionInfo ClusterResult::SELECTION_INFO_ARRAY[] = {
- {SELECTION_ID_ERROR,
- "error",
- sizeof("error") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_SUCCESS,
- "success",
- sizeof("success") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_ELECTOR_RESULT,
- "electorResult",
- sizeof("electorResult") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_STORAGE_RESULT,
- "storageResult",
- sizeof("storageResult") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_CLUSTER_QUEUE_HELPER,
- "clusterQueueHelper",
- sizeof("clusterQueueHelper") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_CLUSTER_STATUS,
- "clusterStatus",
- sizeof("clusterStatus") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_CLUSTER_PROXY_STATUS,
- "clusterProxyStatus",
- sizeof("clusterProxyStatus") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ SELECTION_ID_ERROR,
+ "error",
+ sizeof("error") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_SUCCESS,
+ "success",
+ sizeof("success") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_ELECTOR_RESULT,
+ "electorResult",
+ sizeof("electorResult") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_STORAGE_RESULT,
+ "storageResult",
+ sizeof("storageResult") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_CLUSTER_QUEUE_HELPER,
+ "clusterQueueHelper",
+ sizeof("clusterQueueHelper") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_CLUSTER_STATUS,
+ "clusterStatus",
+ sizeof("clusterStatus") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_CLUSTER_PROXY_STATUS,
+ "clusterProxyStatus",
+ sizeof("clusterProxyStatus") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_SelectionInfo* ClusterResult::lookupSelectionInfo(const char* name,
- int nameLength)
+const bdlat_SelectionInfo *ClusterResult::lookupSelectionInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 7; ++i) {
const bdlat_SelectionInfo& selectionInfo =
- ClusterResult::SELECTION_INFO_ARRAY[i];
+ ClusterResult::SELECTION_INFO_ARRAY[i];
- if (nameLength == selectionInfo.d_nameLength &&
- 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength)) {
+ if (nameLength == selectionInfo.d_nameLength
+ && 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength))
+ {
return &selectionInfo;
}
}
@@ -21290,181 +23456,198 @@ const bdlat_SelectionInfo* ClusterResult::lookupSelectionInfo(const char* name,
return 0;
}
-const bdlat_SelectionInfo* ClusterResult::lookupSelectionInfo(int id)
+const bdlat_SelectionInfo *ClusterResult::lookupSelectionInfo(int id)
{
switch (id) {
- case SELECTION_ID_ERROR:
+ case SELECTION_ID_ERROR:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR];
- case SELECTION_ID_SUCCESS:
+ case SELECTION_ID_SUCCESS:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_SUCCESS];
- case SELECTION_ID_ELECTOR_RESULT:
+ case SELECTION_ID_ELECTOR_RESULT:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_ELECTOR_RESULT];
- case SELECTION_ID_STORAGE_RESULT:
+ case SELECTION_ID_STORAGE_RESULT:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_STORAGE_RESULT];
- case SELECTION_ID_CLUSTER_QUEUE_HELPER:
+ case SELECTION_ID_CLUSTER_QUEUE_HELPER:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_QUEUE_HELPER];
- case SELECTION_ID_CLUSTER_STATUS:
+ case SELECTION_ID_CLUSTER_STATUS:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_STATUS];
- case SELECTION_ID_CLUSTER_PROXY_STATUS:
+ case SELECTION_ID_CLUSTER_PROXY_STATUS:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_PROXY_STATUS];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-ClusterResult::ClusterResult(const ClusterResult& original,
- bslma::Allocator* basicAllocator)
+ClusterResult::ClusterResult(
+ const ClusterResult& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_ERROR: {
- new (d_error.buffer()) Error(original.d_error.object(), d_allocator_p);
- } break;
- case SELECTION_ID_SUCCESS: {
- new (d_success.buffer()) Void(original.d_success.object());
- } break;
- case SELECTION_ID_ELECTOR_RESULT: {
+ case SELECTION_ID_ERROR: {
+ new (d_error.buffer())
+ Error(
+ original.d_error.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_SUCCESS: {
+ new (d_success.buffer())
+ Void(original.d_success.object());
+ } break;
+ case SELECTION_ID_ELECTOR_RESULT: {
new (d_electorResult.buffer())
- ElectorResult(original.d_electorResult.object(), d_allocator_p);
- } break;
- case SELECTION_ID_STORAGE_RESULT: {
+ ElectorResult(
+ original.d_electorResult.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_STORAGE_RESULT: {
new (d_storageResult.buffer())
- StorageResult(original.d_storageResult.object(), d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTER_QUEUE_HELPER: {
+ StorageResult(
+ original.d_storageResult.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTER_QUEUE_HELPER: {
new (d_clusterQueueHelper.buffer())
- ClusterQueueHelper(original.d_clusterQueueHelper.object(),
- d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTER_STATUS: {
+ ClusterQueueHelper(
+ original.d_clusterQueueHelper.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTER_STATUS: {
new (d_clusterStatus.buffer())
- ClusterStatus(original.d_clusterStatus.object(), d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTER_PROXY_STATUS: {
+ ClusterStatus(
+ original.d_clusterStatus.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTER_PROXY_STATUS: {
new (d_clusterProxyStatus.buffer())
- ClusterProxyStatus(original.d_clusterProxyStatus.object(),
- d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ ClusterProxyStatus(
+ original.d_clusterProxyStatus.object(), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ClusterResult::ClusterResult(ClusterResult&& original) noexcept
-: d_selectionId(original.d_selectionId),
- d_allocator_p(original.d_allocator_p)
+: d_selectionId(original.d_selectionId)
+, d_allocator_p(original.d_allocator_p)
{
switch (d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
new (d_error.buffer())
- Error(bsl::move(original.d_error.object()), d_allocator_p);
- } break;
- case SELECTION_ID_SUCCESS: {
- new (d_success.buffer()) Void(bsl::move(original.d_success.object()));
- } break;
- case SELECTION_ID_ELECTOR_RESULT: {
+ Error(
+ bsl::move(original.d_error.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_SUCCESS: {
+ new (d_success.buffer())
+ Void(bsl::move(original.d_success.object()));
+ } break;
+ case SELECTION_ID_ELECTOR_RESULT: {
new (d_electorResult.buffer())
- ElectorResult(bsl::move(original.d_electorResult.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_STORAGE_RESULT: {
+ ElectorResult(
+ bsl::move(original.d_electorResult.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_STORAGE_RESULT: {
new (d_storageResult.buffer())
- StorageResult(bsl::move(original.d_storageResult.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTER_QUEUE_HELPER: {
- new (d_clusterQueueHelper.buffer()) ClusterQueueHelper(
- bsl::move(original.d_clusterQueueHelper.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTER_STATUS: {
+ StorageResult(
+ bsl::move(original.d_storageResult.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTER_QUEUE_HELPER: {
+ new (d_clusterQueueHelper.buffer())
+ ClusterQueueHelper(
+ bsl::move(original.d_clusterQueueHelper.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTER_STATUS: {
new (d_clusterStatus.buffer())
- ClusterStatus(bsl::move(original.d_clusterStatus.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTER_PROXY_STATUS: {
- new (d_clusterProxyStatus.buffer()) ClusterProxyStatus(
- bsl::move(original.d_clusterProxyStatus.object()),
- d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ ClusterStatus(
+ bsl::move(original.d_clusterStatus.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTER_PROXY_STATUS: {
+ new (d_clusterProxyStatus.buffer())
+ ClusterProxyStatus(
+ bsl::move(original.d_clusterProxyStatus.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-ClusterResult::ClusterResult(ClusterResult&& original,
- bslma::Allocator* basicAllocator)
+ClusterResult::ClusterResult(
+ ClusterResult&& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
new (d_error.buffer())
- Error(bsl::move(original.d_error.object()), d_allocator_p);
- } break;
- case SELECTION_ID_SUCCESS: {
- new (d_success.buffer()) Void(bsl::move(original.d_success.object()));
- } break;
- case SELECTION_ID_ELECTOR_RESULT: {
+ Error(
+ bsl::move(original.d_error.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_SUCCESS: {
+ new (d_success.buffer())
+ Void(bsl::move(original.d_success.object()));
+ } break;
+ case SELECTION_ID_ELECTOR_RESULT: {
new (d_electorResult.buffer())
- ElectorResult(bsl::move(original.d_electorResult.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_STORAGE_RESULT: {
+ ElectorResult(
+ bsl::move(original.d_electorResult.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_STORAGE_RESULT: {
new (d_storageResult.buffer())
- StorageResult(bsl::move(original.d_storageResult.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTER_QUEUE_HELPER: {
- new (d_clusterQueueHelper.buffer()) ClusterQueueHelper(
- bsl::move(original.d_clusterQueueHelper.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTER_STATUS: {
+ StorageResult(
+ bsl::move(original.d_storageResult.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTER_QUEUE_HELPER: {
+ new (d_clusterQueueHelper.buffer())
+ ClusterQueueHelper(
+ bsl::move(original.d_clusterQueueHelper.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTER_STATUS: {
new (d_clusterStatus.buffer())
- ClusterStatus(bsl::move(original.d_clusterStatus.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTER_PROXY_STATUS: {
- new (d_clusterProxyStatus.buffer()) ClusterProxyStatus(
- bsl::move(original.d_clusterProxyStatus.object()),
- d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ ClusterStatus(
+ bsl::move(original.d_clusterStatus.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTER_PROXY_STATUS: {
+ new (d_clusterProxyStatus.buffer())
+ ClusterProxyStatus(
+ bsl::move(original.d_clusterProxyStatus.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
#endif
// MANIPULATORS
-ClusterResult& ClusterResult::operator=(const ClusterResult& rhs)
+ClusterResult&
+ClusterResult::operator=(const ClusterResult& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
makeError(rhs.d_error.object());
- } break;
- case SELECTION_ID_SUCCESS: {
+ } break;
+ case SELECTION_ID_SUCCESS: {
makeSuccess(rhs.d_success.object());
- } break;
- case SELECTION_ID_ELECTOR_RESULT: {
+ } break;
+ case SELECTION_ID_ELECTOR_RESULT: {
makeElectorResult(rhs.d_electorResult.object());
- } break;
- case SELECTION_ID_STORAGE_RESULT: {
+ } break;
+ case SELECTION_ID_STORAGE_RESULT: {
makeStorageResult(rhs.d_storageResult.object());
- } break;
- case SELECTION_ID_CLUSTER_QUEUE_HELPER: {
+ } break;
+ case SELECTION_ID_CLUSTER_QUEUE_HELPER: {
makeClusterQueueHelper(rhs.d_clusterQueueHelper.object());
- } break;
- case SELECTION_ID_CLUSTER_STATUS: {
+ } break;
+ case SELECTION_ID_CLUSTER_STATUS: {
makeClusterStatus(rhs.d_clusterStatus.object());
- } break;
- case SELECTION_ID_CLUSTER_PROXY_STATUS: {
+ } break;
+ case SELECTION_ID_CLUSTER_PROXY_STATUS: {
makeClusterProxyStatus(rhs.d_clusterProxyStatus.object());
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -21473,36 +23656,35 @@ ClusterResult& ClusterResult::operator=(const ClusterResult& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-ClusterResult& ClusterResult::operator=(ClusterResult&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ClusterResult&
+ClusterResult::operator=(ClusterResult&& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
makeError(bsl::move(rhs.d_error.object()));
- } break;
- case SELECTION_ID_SUCCESS: {
+ } break;
+ case SELECTION_ID_SUCCESS: {
makeSuccess(bsl::move(rhs.d_success.object()));
- } break;
- case SELECTION_ID_ELECTOR_RESULT: {
+ } break;
+ case SELECTION_ID_ELECTOR_RESULT: {
makeElectorResult(bsl::move(rhs.d_electorResult.object()));
- } break;
- case SELECTION_ID_STORAGE_RESULT: {
+ } break;
+ case SELECTION_ID_STORAGE_RESULT: {
makeStorageResult(bsl::move(rhs.d_storageResult.object()));
- } break;
- case SELECTION_ID_CLUSTER_QUEUE_HELPER: {
- makeClusterQueueHelper(
- bsl::move(rhs.d_clusterQueueHelper.object()));
- } break;
- case SELECTION_ID_CLUSTER_STATUS: {
+ } break;
+ case SELECTION_ID_CLUSTER_QUEUE_HELPER: {
+ makeClusterQueueHelper(bsl::move(rhs.d_clusterQueueHelper.object()));
+ } break;
+ case SELECTION_ID_CLUSTER_STATUS: {
makeClusterStatus(bsl::move(rhs.d_clusterStatus.object()));
- } break;
- case SELECTION_ID_CLUSTER_PROXY_STATUS: {
- makeClusterProxyStatus(
- bsl::move(rhs.d_clusterProxyStatus.object()));
- } break;
- default:
+ } break;
+ case SELECTION_ID_CLUSTER_PROXY_STATUS: {
+ makeClusterProxyStatus(bsl::move(rhs.d_clusterProxyStatus.object()));
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -21515,28 +23697,29 @@ ClusterResult& ClusterResult::operator=(ClusterResult&& rhs)
void ClusterResult::reset()
{
switch (d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
d_error.object().~Error();
- } break;
- case SELECTION_ID_SUCCESS: {
+ } break;
+ case SELECTION_ID_SUCCESS: {
d_success.object().~Void();
- } break;
- case SELECTION_ID_ELECTOR_RESULT: {
+ } break;
+ case SELECTION_ID_ELECTOR_RESULT: {
d_electorResult.object().~ElectorResult();
- } break;
- case SELECTION_ID_STORAGE_RESULT: {
+ } break;
+ case SELECTION_ID_STORAGE_RESULT: {
d_storageResult.object().~StorageResult();
- } break;
- case SELECTION_ID_CLUSTER_QUEUE_HELPER: {
+ } break;
+ case SELECTION_ID_CLUSTER_QUEUE_HELPER: {
d_clusterQueueHelper.object().~ClusterQueueHelper();
- } break;
- case SELECTION_ID_CLUSTER_STATUS: {
+ } break;
+ case SELECTION_ID_CLUSTER_STATUS: {
d_clusterStatus.object().~ClusterStatus();
- } break;
- case SELECTION_ID_CLUSTER_PROXY_STATUS: {
+ } break;
+ case SELECTION_ID_CLUSTER_PROXY_STATUS: {
d_clusterProxyStatus.object().~ClusterProxyStatus();
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
d_selectionId = SELECTION_ID_UNDEFINED;
@@ -21545,41 +23728,42 @@ void ClusterResult::reset()
int ClusterResult::makeSelection(int selectionId)
{
switch (selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
makeError();
- } break;
- case SELECTION_ID_SUCCESS: {
+ } break;
+ case SELECTION_ID_SUCCESS: {
makeSuccess();
- } break;
- case SELECTION_ID_ELECTOR_RESULT: {
+ } break;
+ case SELECTION_ID_ELECTOR_RESULT: {
makeElectorResult();
- } break;
- case SELECTION_ID_STORAGE_RESULT: {
+ } break;
+ case SELECTION_ID_STORAGE_RESULT: {
makeStorageResult();
- } break;
- case SELECTION_ID_CLUSTER_QUEUE_HELPER: {
+ } break;
+ case SELECTION_ID_CLUSTER_QUEUE_HELPER: {
makeClusterQueueHelper();
- } break;
- case SELECTION_ID_CLUSTER_STATUS: {
+ } break;
+ case SELECTION_ID_CLUSTER_STATUS: {
makeClusterStatus();
- } break;
- case SELECTION_ID_CLUSTER_PROXY_STATUS: {
+ } break;
+ case SELECTION_ID_CLUSTER_PROXY_STATUS: {
makeClusterProxyStatus();
- } break;
- case SELECTION_ID_UNDEFINED: {
+ } break;
+ case SELECTION_ID_UNDEFINED: {
reset();
- } break;
- default: return -1;
+ } break;
+ default:
+ return -1;
}
return 0;
}
-int ClusterResult::makeSelection(const char* name, int nameLength)
+int ClusterResult::makeSelection(const char *name, int nameLength)
{
- const bdlat_SelectionInfo* selectionInfo = lookupSelectionInfo(name,
- nameLength);
+ const bdlat_SelectionInfo *selectionInfo =
+ lookupSelectionInfo(name, nameLength);
if (0 == selectionInfo) {
- return -1;
+ return -1;
}
return makeSelection(selectionInfo->d_id);
@@ -21592,7 +23776,8 @@ Error& ClusterResult::makeError()
}
else {
reset();
- new (d_error.buffer()) Error(d_allocator_p);
+ new (d_error.buffer())
+ Error(d_allocator_p);
d_selectionId = SELECTION_ID_ERROR;
}
@@ -21606,15 +23791,16 @@ Error& ClusterResult::makeError(const Error& value)
}
else {
reset();
- new (d_error.buffer()) Error(value, d_allocator_p);
+ new (d_error.buffer())
+ Error(value, d_allocator_p);
d_selectionId = SELECTION_ID_ERROR;
}
return d_error.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Error& ClusterResult::makeError(Error&& value)
{
if (SELECTION_ID_ERROR == d_selectionId) {
@@ -21622,7 +23808,8 @@ Error& ClusterResult::makeError(Error&& value)
}
else {
reset();
- new (d_error.buffer()) Error(bsl::move(value), d_allocator_p);
+ new (d_error.buffer())
+ Error(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_ERROR;
}
@@ -21637,7 +23824,8 @@ Void& ClusterResult::makeSuccess()
}
else {
reset();
- new (d_success.buffer()) Void();
+ new (d_success.buffer())
+ Void();
d_selectionId = SELECTION_ID_SUCCESS;
}
@@ -21651,15 +23839,16 @@ Void& ClusterResult::makeSuccess(const Void& value)
}
else {
reset();
- new (d_success.buffer()) Void(value);
+ new (d_success.buffer())
+ Void(value);
d_selectionId = SELECTION_ID_SUCCESS;
}
return d_success.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Void& ClusterResult::makeSuccess(Void&& value)
{
if (SELECTION_ID_SUCCESS == d_selectionId) {
@@ -21667,7 +23856,8 @@ Void& ClusterResult::makeSuccess(Void&& value)
}
else {
reset();
- new (d_success.buffer()) Void(bsl::move(value));
+ new (d_success.buffer())
+ Void(bsl::move(value));
d_selectionId = SELECTION_ID_SUCCESS;
}
@@ -21682,7 +23872,8 @@ ElectorResult& ClusterResult::makeElectorResult()
}
else {
reset();
- new (d_electorResult.buffer()) ElectorResult(d_allocator_p);
+ new (d_electorResult.buffer())
+ ElectorResult(d_allocator_p);
d_selectionId = SELECTION_ID_ELECTOR_RESULT;
}
@@ -21696,15 +23887,16 @@ ElectorResult& ClusterResult::makeElectorResult(const ElectorResult& value)
}
else {
reset();
- new (d_electorResult.buffer()) ElectorResult(value, d_allocator_p);
+ new (d_electorResult.buffer())
+ ElectorResult(value, d_allocator_p);
d_selectionId = SELECTION_ID_ELECTOR_RESULT;
}
return d_electorResult.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ElectorResult& ClusterResult::makeElectorResult(ElectorResult&& value)
{
if (SELECTION_ID_ELECTOR_RESULT == d_selectionId) {
@@ -21713,7 +23905,7 @@ ElectorResult& ClusterResult::makeElectorResult(ElectorResult&& value)
else {
reset();
new (d_electorResult.buffer())
- ElectorResult(bsl::move(value), d_allocator_p);
+ ElectorResult(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_ELECTOR_RESULT;
}
@@ -21728,7 +23920,8 @@ StorageResult& ClusterResult::makeStorageResult()
}
else {
reset();
- new (d_storageResult.buffer()) StorageResult(d_allocator_p);
+ new (d_storageResult.buffer())
+ StorageResult(d_allocator_p);
d_selectionId = SELECTION_ID_STORAGE_RESULT;
}
@@ -21742,15 +23935,16 @@ StorageResult& ClusterResult::makeStorageResult(const StorageResult& value)
}
else {
reset();
- new (d_storageResult.buffer()) StorageResult(value, d_allocator_p);
+ new (d_storageResult.buffer())
+ StorageResult(value, d_allocator_p);
d_selectionId = SELECTION_ID_STORAGE_RESULT;
}
return d_storageResult.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
StorageResult& ClusterResult::makeStorageResult(StorageResult&& value)
{
if (SELECTION_ID_STORAGE_RESULT == d_selectionId) {
@@ -21759,7 +23953,7 @@ StorageResult& ClusterResult::makeStorageResult(StorageResult&& value)
else {
reset();
new (d_storageResult.buffer())
- StorageResult(bsl::move(value), d_allocator_p);
+ StorageResult(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_STORAGE_RESULT;
}
@@ -21774,15 +23968,15 @@ ClusterQueueHelper& ClusterResult::makeClusterQueueHelper()
}
else {
reset();
- new (d_clusterQueueHelper.buffer()) ClusterQueueHelper(d_allocator_p);
+ new (d_clusterQueueHelper.buffer())
+ ClusterQueueHelper(d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER_QUEUE_HELPER;
}
return d_clusterQueueHelper.object();
}
-ClusterQueueHelper&
-ClusterResult::makeClusterQueueHelper(const ClusterQueueHelper& value)
+ClusterQueueHelper& ClusterResult::makeClusterQueueHelper(const ClusterQueueHelper& value)
{
if (SELECTION_ID_CLUSTER_QUEUE_HELPER == d_selectionId) {
d_clusterQueueHelper.object() = value;
@@ -21790,17 +23984,16 @@ ClusterResult::makeClusterQueueHelper(const ClusterQueueHelper& value)
else {
reset();
new (d_clusterQueueHelper.buffer())
- ClusterQueueHelper(value, d_allocator_p);
+ ClusterQueueHelper(value, d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER_QUEUE_HELPER;
}
return d_clusterQueueHelper.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-ClusterQueueHelper&
-ClusterResult::makeClusterQueueHelper(ClusterQueueHelper&& value)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ClusterQueueHelper& ClusterResult::makeClusterQueueHelper(ClusterQueueHelper&& value)
{
if (SELECTION_ID_CLUSTER_QUEUE_HELPER == d_selectionId) {
d_clusterQueueHelper.object() = bsl::move(value);
@@ -21808,7 +24001,7 @@ ClusterResult::makeClusterQueueHelper(ClusterQueueHelper&& value)
else {
reset();
new (d_clusterQueueHelper.buffer())
- ClusterQueueHelper(bsl::move(value), d_allocator_p);
+ ClusterQueueHelper(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER_QUEUE_HELPER;
}
@@ -21823,7 +24016,8 @@ ClusterStatus& ClusterResult::makeClusterStatus()
}
else {
reset();
- new (d_clusterStatus.buffer()) ClusterStatus(d_allocator_p);
+ new (d_clusterStatus.buffer())
+ ClusterStatus(d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER_STATUS;
}
@@ -21837,15 +24031,16 @@ ClusterStatus& ClusterResult::makeClusterStatus(const ClusterStatus& value)
}
else {
reset();
- new (d_clusterStatus.buffer()) ClusterStatus(value, d_allocator_p);
+ new (d_clusterStatus.buffer())
+ ClusterStatus(value, d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER_STATUS;
}
return d_clusterStatus.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ClusterStatus& ClusterResult::makeClusterStatus(ClusterStatus&& value)
{
if (SELECTION_ID_CLUSTER_STATUS == d_selectionId) {
@@ -21854,7 +24049,7 @@ ClusterStatus& ClusterResult::makeClusterStatus(ClusterStatus&& value)
else {
reset();
new (d_clusterStatus.buffer())
- ClusterStatus(bsl::move(value), d_allocator_p);
+ ClusterStatus(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER_STATUS;
}
@@ -21869,15 +24064,15 @@ ClusterProxyStatus& ClusterResult::makeClusterProxyStatus()
}
else {
reset();
- new (d_clusterProxyStatus.buffer()) ClusterProxyStatus(d_allocator_p);
+ new (d_clusterProxyStatus.buffer())
+ ClusterProxyStatus(d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER_PROXY_STATUS;
}
return d_clusterProxyStatus.object();
}
-ClusterProxyStatus&
-ClusterResult::makeClusterProxyStatus(const ClusterProxyStatus& value)
+ClusterProxyStatus& ClusterResult::makeClusterProxyStatus(const ClusterProxyStatus& value)
{
if (SELECTION_ID_CLUSTER_PROXY_STATUS == d_selectionId) {
d_clusterProxyStatus.object() = value;
@@ -21885,17 +24080,16 @@ ClusterResult::makeClusterProxyStatus(const ClusterProxyStatus& value)
else {
reset();
new (d_clusterProxyStatus.buffer())
- ClusterProxyStatus(value, d_allocator_p);
+ ClusterProxyStatus(value, d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER_PROXY_STATUS;
}
return d_clusterProxyStatus.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-ClusterProxyStatus&
-ClusterResult::makeClusterProxyStatus(ClusterProxyStatus&& value)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ClusterProxyStatus& ClusterResult::makeClusterProxyStatus(ClusterProxyStatus&& value)
{
if (SELECTION_ID_CLUSTER_PROXY_STATUS == d_selectionId) {
d_clusterProxyStatus.object() = bsl::move(value);
@@ -21903,7 +24097,7 @@ ClusterResult::makeClusterProxyStatus(ClusterProxyStatus&& value)
else {
reset();
new (d_clusterProxyStatus.buffer())
- ClusterProxyStatus(bsl::move(value), d_allocator_p);
+ ClusterProxyStatus(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER_PROXY_STATUS;
}
@@ -21913,102 +24107,111 @@ ClusterResult::makeClusterProxyStatus(ClusterProxyStatus&& value)
// ACCESSORS
-bsl::ostream&
-ClusterResult::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& ClusterResult::print(
+ bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
switch (d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
printer.printAttribute("error", d_error.object());
- } break;
- case SELECTION_ID_SUCCESS: {
+ } break;
+ case SELECTION_ID_SUCCESS: {
printer.printAttribute("success", d_success.object());
- } break;
- case SELECTION_ID_ELECTOR_RESULT: {
+ } break;
+ case SELECTION_ID_ELECTOR_RESULT: {
printer.printAttribute("electorResult", d_electorResult.object());
- } break;
- case SELECTION_ID_STORAGE_RESULT: {
+ } break;
+ case SELECTION_ID_STORAGE_RESULT: {
printer.printAttribute("storageResult", d_storageResult.object());
- } break;
- case SELECTION_ID_CLUSTER_QUEUE_HELPER: {
- printer.printAttribute("clusterQueueHelper",
- d_clusterQueueHelper.object());
- } break;
- case SELECTION_ID_CLUSTER_STATUS: {
+ } break;
+ case SELECTION_ID_CLUSTER_QUEUE_HELPER: {
+ printer.printAttribute("clusterQueueHelper", d_clusterQueueHelper.object());
+ } break;
+ case SELECTION_ID_CLUSTER_STATUS: {
printer.printAttribute("clusterStatus", d_clusterStatus.object());
- } break;
- case SELECTION_ID_CLUSTER_PROXY_STATUS: {
- printer.printAttribute("clusterProxyStatus",
- d_clusterProxyStatus.object());
- } break;
- default: stream << "SELECTION UNDEFINED\n";
+ } break;
+ case SELECTION_ID_CLUSTER_PROXY_STATUS: {
+ printer.printAttribute("clusterProxyStatus", d_clusterProxyStatus.object());
+ } break;
+ default:
+ stream << "SELECTION UNDEFINED\n";
}
printer.end();
return stream;
}
-const char* ClusterResult::selectionName() const
+
+const char *ClusterResult::selectionName() const
{
switch (d_selectionId) {
- case SELECTION_ID_ERROR:
+ case SELECTION_ID_ERROR:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR].name();
- case SELECTION_ID_SUCCESS:
+ case SELECTION_ID_SUCCESS:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_SUCCESS].name();
- case SELECTION_ID_ELECTOR_RESULT:
+ case SELECTION_ID_ELECTOR_RESULT:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_ELECTOR_RESULT].name();
- case SELECTION_ID_STORAGE_RESULT:
+ case SELECTION_ID_STORAGE_RESULT:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_STORAGE_RESULT].name();
- case SELECTION_ID_CLUSTER_QUEUE_HELPER:
- return SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_QUEUE_HELPER]
- .name();
- case SELECTION_ID_CLUSTER_STATUS:
+ case SELECTION_ID_CLUSTER_QUEUE_HELPER:
+ return SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_QUEUE_HELPER].name();
+ case SELECTION_ID_CLUSTER_STATUS:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_STATUS].name();
- case SELECTION_ID_CLUSTER_PROXY_STATUS:
- return SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_PROXY_STATUS]
- .name();
- default:
+ case SELECTION_ID_CLUSTER_PROXY_STATUS:
+ return SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_PROXY_STATUS].name();
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
return "(* UNDEFINED *)";
}
}
-// ---------------------
-// class ClustersCommand
-// ---------------------
+ // ---------------------
+ // class ClustersCommand
+ // ---------------------
// CONSTANTS
const char ClustersCommand::CLASS_NAME[] = "ClustersCommand";
const bdlat_SelectionInfo ClustersCommand::SELECTION_INFO_ARRAY[] = {
- {SELECTION_ID_LIST,
- "list",
- sizeof("list") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_ADD_REVERSE_PROXY,
- "addReverseProxy",
- sizeof("addReverseProxy") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_CLUSTER,
- "cluster",
- sizeof("cluster") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ SELECTION_ID_LIST,
+ "list",
+ sizeof("list") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_ADD_REVERSE_PROXY,
+ "addReverseProxy",
+ sizeof("addReverseProxy") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_CLUSTER,
+ "cluster",
+ sizeof("cluster") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_SelectionInfo*
-ClustersCommand::lookupSelectionInfo(const char* name, int nameLength)
+const bdlat_SelectionInfo *ClustersCommand::lookupSelectionInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 3; ++i) {
const bdlat_SelectionInfo& selectionInfo =
- ClustersCommand::SELECTION_INFO_ARRAY[i];
+ ClustersCommand::SELECTION_INFO_ARRAY[i];
- if (nameLength == selectionInfo.d_nameLength &&
- 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength)) {
+ if (nameLength == selectionInfo.d_nameLength
+ && 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength))
+ {
return &selectionInfo;
}
}
@@ -22016,104 +24219,118 @@ ClustersCommand::lookupSelectionInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_SelectionInfo* ClustersCommand::lookupSelectionInfo(int id)
+const bdlat_SelectionInfo *ClustersCommand::lookupSelectionInfo(int id)
{
switch (id) {
- case SELECTION_ID_LIST: return &SELECTION_INFO_ARRAY[SELECTION_INDEX_LIST];
- case SELECTION_ID_ADD_REVERSE_PROXY:
+ case SELECTION_ID_LIST:
+ return &SELECTION_INFO_ARRAY[SELECTION_INDEX_LIST];
+ case SELECTION_ID_ADD_REVERSE_PROXY:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_ADD_REVERSE_PROXY];
- case SELECTION_ID_CLUSTER:
+ case SELECTION_ID_CLUSTER:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-ClustersCommand::ClustersCommand(const ClustersCommand& original,
- bslma::Allocator* basicAllocator)
+ClustersCommand::ClustersCommand(
+ const ClustersCommand& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_LIST: {
- new (d_list.buffer()) Void(original.d_list.object());
- } break;
- case SELECTION_ID_ADD_REVERSE_PROXY: {
+ case SELECTION_ID_LIST: {
+ new (d_list.buffer())
+ Void(original.d_list.object());
+ } break;
+ case SELECTION_ID_ADD_REVERSE_PROXY: {
new (d_addReverseProxy.buffer())
- AddReverseProxy(original.d_addReverseProxy.object(),
- d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTER: {
+ AddReverseProxy(
+ original.d_addReverseProxy.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTER: {
new (d_cluster.buffer())
- Cluster(original.d_cluster.object(), d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ Cluster(
+ original.d_cluster.object(), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ClustersCommand::ClustersCommand(ClustersCommand&& original) noexcept
-: d_selectionId(original.d_selectionId),
- d_allocator_p(original.d_allocator_p)
+: d_selectionId(original.d_selectionId)
+, d_allocator_p(original.d_allocator_p)
{
switch (d_selectionId) {
- case SELECTION_ID_LIST: {
- new (d_list.buffer()) Void(bsl::move(original.d_list.object()));
- } break;
- case SELECTION_ID_ADD_REVERSE_PROXY: {
+ case SELECTION_ID_LIST: {
+ new (d_list.buffer())
+ Void(bsl::move(original.d_list.object()));
+ } break;
+ case SELECTION_ID_ADD_REVERSE_PROXY: {
new (d_addReverseProxy.buffer())
- AddReverseProxy(bsl::move(original.d_addReverseProxy.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTER: {
+ AddReverseProxy(
+ bsl::move(original.d_addReverseProxy.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTER: {
new (d_cluster.buffer())
- Cluster(bsl::move(original.d_cluster.object()), d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ Cluster(
+ bsl::move(original.d_cluster.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-ClustersCommand::ClustersCommand(ClustersCommand&& original,
- bslma::Allocator* basicAllocator)
+ClustersCommand::ClustersCommand(
+ ClustersCommand&& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_LIST: {
- new (d_list.buffer()) Void(bsl::move(original.d_list.object()));
- } break;
- case SELECTION_ID_ADD_REVERSE_PROXY: {
+ case SELECTION_ID_LIST: {
+ new (d_list.buffer())
+ Void(bsl::move(original.d_list.object()));
+ } break;
+ case SELECTION_ID_ADD_REVERSE_PROXY: {
new (d_addReverseProxy.buffer())
- AddReverseProxy(bsl::move(original.d_addReverseProxy.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTER: {
+ AddReverseProxy(
+ bsl::move(original.d_addReverseProxy.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTER: {
new (d_cluster.buffer())
- Cluster(bsl::move(original.d_cluster.object()), d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ Cluster(
+ bsl::move(original.d_cluster.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
#endif
// MANIPULATORS
-ClustersCommand& ClustersCommand::operator=(const ClustersCommand& rhs)
+ClustersCommand&
+ClustersCommand::operator=(const ClustersCommand& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_LIST: {
+ case SELECTION_ID_LIST: {
makeList(rhs.d_list.object());
- } break;
- case SELECTION_ID_ADD_REVERSE_PROXY: {
+ } break;
+ case SELECTION_ID_ADD_REVERSE_PROXY: {
makeAddReverseProxy(rhs.d_addReverseProxy.object());
- } break;
- case SELECTION_ID_CLUSTER: {
+ } break;
+ case SELECTION_ID_CLUSTER: {
makeCluster(rhs.d_cluster.object());
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -22122,22 +24339,23 @@ ClustersCommand& ClustersCommand::operator=(const ClustersCommand& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-ClustersCommand& ClustersCommand::operator=(ClustersCommand&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ClustersCommand&
+ClustersCommand::operator=(ClustersCommand&& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_LIST: {
+ case SELECTION_ID_LIST: {
makeList(bsl::move(rhs.d_list.object()));
- } break;
- case SELECTION_ID_ADD_REVERSE_PROXY: {
+ } break;
+ case SELECTION_ID_ADD_REVERSE_PROXY: {
makeAddReverseProxy(bsl::move(rhs.d_addReverseProxy.object()));
- } break;
- case SELECTION_ID_CLUSTER: {
+ } break;
+ case SELECTION_ID_CLUSTER: {
makeCluster(bsl::move(rhs.d_cluster.object()));
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -22150,16 +24368,17 @@ ClustersCommand& ClustersCommand::operator=(ClustersCommand&& rhs)
void ClustersCommand::reset()
{
switch (d_selectionId) {
- case SELECTION_ID_LIST: {
+ case SELECTION_ID_LIST: {
d_list.object().~Void();
- } break;
- case SELECTION_ID_ADD_REVERSE_PROXY: {
+ } break;
+ case SELECTION_ID_ADD_REVERSE_PROXY: {
d_addReverseProxy.object().~AddReverseProxy();
- } break;
- case SELECTION_ID_CLUSTER: {
+ } break;
+ case SELECTION_ID_CLUSTER: {
d_cluster.object().~Cluster();
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
d_selectionId = SELECTION_ID_UNDEFINED;
@@ -22168,29 +24387,30 @@ void ClustersCommand::reset()
int ClustersCommand::makeSelection(int selectionId)
{
switch (selectionId) {
- case SELECTION_ID_LIST: {
+ case SELECTION_ID_LIST: {
makeList();
- } break;
- case SELECTION_ID_ADD_REVERSE_PROXY: {
+ } break;
+ case SELECTION_ID_ADD_REVERSE_PROXY: {
makeAddReverseProxy();
- } break;
- case SELECTION_ID_CLUSTER: {
+ } break;
+ case SELECTION_ID_CLUSTER: {
makeCluster();
- } break;
- case SELECTION_ID_UNDEFINED: {
+ } break;
+ case SELECTION_ID_UNDEFINED: {
reset();
- } break;
- default: return -1;
+ } break;
+ default:
+ return -1;
}
return 0;
}
-int ClustersCommand::makeSelection(const char* name, int nameLength)
+int ClustersCommand::makeSelection(const char *name, int nameLength)
{
- const bdlat_SelectionInfo* selectionInfo = lookupSelectionInfo(name,
- nameLength);
+ const bdlat_SelectionInfo *selectionInfo =
+ lookupSelectionInfo(name, nameLength);
if (0 == selectionInfo) {
- return -1;
+ return -1;
}
return makeSelection(selectionInfo->d_id);
@@ -22203,7 +24423,8 @@ Void& ClustersCommand::makeList()
}
else {
reset();
- new (d_list.buffer()) Void();
+ new (d_list.buffer())
+ Void();
d_selectionId = SELECTION_ID_LIST;
}
@@ -22217,15 +24438,16 @@ Void& ClustersCommand::makeList(const Void& value)
}
else {
reset();
- new (d_list.buffer()) Void(value);
+ new (d_list.buffer())
+ Void(value);
d_selectionId = SELECTION_ID_LIST;
}
return d_list.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Void& ClustersCommand::makeList(Void&& value)
{
if (SELECTION_ID_LIST == d_selectionId) {
@@ -22233,7 +24455,8 @@ Void& ClustersCommand::makeList(Void&& value)
}
else {
reset();
- new (d_list.buffer()) Void(bsl::move(value));
+ new (d_list.buffer())
+ Void(bsl::move(value));
d_selectionId = SELECTION_ID_LIST;
}
@@ -22248,30 +24471,31 @@ AddReverseProxy& ClustersCommand::makeAddReverseProxy()
}
else {
reset();
- new (d_addReverseProxy.buffer()) AddReverseProxy(d_allocator_p);
+ new (d_addReverseProxy.buffer())
+ AddReverseProxy(d_allocator_p);
d_selectionId = SELECTION_ID_ADD_REVERSE_PROXY;
}
return d_addReverseProxy.object();
}
-AddReverseProxy&
-ClustersCommand::makeAddReverseProxy(const AddReverseProxy& value)
+AddReverseProxy& ClustersCommand::makeAddReverseProxy(const AddReverseProxy& value)
{
if (SELECTION_ID_ADD_REVERSE_PROXY == d_selectionId) {
d_addReverseProxy.object() = value;
}
else {
reset();
- new (d_addReverseProxy.buffer()) AddReverseProxy(value, d_allocator_p);
+ new (d_addReverseProxy.buffer())
+ AddReverseProxy(value, d_allocator_p);
d_selectionId = SELECTION_ID_ADD_REVERSE_PROXY;
}
return d_addReverseProxy.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
AddReverseProxy& ClustersCommand::makeAddReverseProxy(AddReverseProxy&& value)
{
if (SELECTION_ID_ADD_REVERSE_PROXY == d_selectionId) {
@@ -22280,7 +24504,7 @@ AddReverseProxy& ClustersCommand::makeAddReverseProxy(AddReverseProxy&& value)
else {
reset();
new (d_addReverseProxy.buffer())
- AddReverseProxy(bsl::move(value), d_allocator_p);
+ AddReverseProxy(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_ADD_REVERSE_PROXY;
}
@@ -22295,7 +24519,8 @@ Cluster& ClustersCommand::makeCluster()
}
else {
reset();
- new (d_cluster.buffer()) Cluster(d_allocator_p);
+ new (d_cluster.buffer())
+ Cluster(d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER;
}
@@ -22309,15 +24534,16 @@ Cluster& ClustersCommand::makeCluster(const Cluster& value)
}
else {
reset();
- new (d_cluster.buffer()) Cluster(value, d_allocator_p);
+ new (d_cluster.buffer())
+ Cluster(value, d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER;
}
return d_cluster.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Cluster& ClustersCommand::makeCluster(Cluster&& value)
{
if (SELECTION_ID_CLUSTER == d_selectionId) {
@@ -22325,7 +24551,8 @@ Cluster& ClustersCommand::makeCluster(Cluster&& value)
}
else {
reset();
- new (d_cluster.buffer()) Cluster(bsl::move(value), d_allocator_p);
+ new (d_cluster.buffer())
+ Cluster(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER;
}
@@ -22335,84 +24562,98 @@ Cluster& ClustersCommand::makeCluster(Cluster&& value)
// ACCESSORS
-bsl::ostream& ClustersCommand::print(bsl::ostream& stream,
- int level,
- int spacesPerLevel) const
+bsl::ostream& ClustersCommand::print(
+ bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
switch (d_selectionId) {
- case SELECTION_ID_LIST: {
+ case SELECTION_ID_LIST: {
printer.printAttribute("list", d_list.object());
- } break;
- case SELECTION_ID_ADD_REVERSE_PROXY: {
+ } break;
+ case SELECTION_ID_ADD_REVERSE_PROXY: {
printer.printAttribute("addReverseProxy", d_addReverseProxy.object());
- } break;
- case SELECTION_ID_CLUSTER: {
+ } break;
+ case SELECTION_ID_CLUSTER: {
printer.printAttribute("cluster", d_cluster.object());
- } break;
- default: stream << "SELECTION UNDEFINED\n";
+ } break;
+ default:
+ stream << "SELECTION UNDEFINED\n";
}
printer.end();
return stream;
}
-const char* ClustersCommand::selectionName() const
+
+const char *ClustersCommand::selectionName() const
{
switch (d_selectionId) {
- case SELECTION_ID_LIST:
+ case SELECTION_ID_LIST:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_LIST].name();
- case SELECTION_ID_ADD_REVERSE_PROXY:
+ case SELECTION_ID_ADD_REVERSE_PROXY:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_ADD_REVERSE_PROXY].name();
- case SELECTION_ID_CLUSTER:
+ case SELECTION_ID_CLUSTER:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER].name();
- default:
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
return "(* UNDEFINED *)";
}
}
-// --------------------
-// class ClustersResult
-// --------------------
+ // --------------------
+ // class ClustersResult
+ // --------------------
// CONSTANTS
const char ClustersResult::CLASS_NAME[] = "ClustersResult";
const bdlat_SelectionInfo ClustersResult::SELECTION_INFO_ARRAY[] = {
- {SELECTION_ID_ERROR,
- "error",
- sizeof("error") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_SUCCESS,
- "success",
- sizeof("success") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_CLUSTER_LIST,
- "clusterList",
- sizeof("clusterList") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_CLUSTER_RESULT,
- "clusterResult",
- sizeof("clusterResult") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ SELECTION_ID_ERROR,
+ "error",
+ sizeof("error") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_SUCCESS,
+ "success",
+ sizeof("success") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_CLUSTER_LIST,
+ "clusterList",
+ sizeof("clusterList") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_CLUSTER_RESULT,
+ "clusterResult",
+ sizeof("clusterResult") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_SelectionInfo*
-ClustersResult::lookupSelectionInfo(const char* name, int nameLength)
+const bdlat_SelectionInfo *ClustersResult::lookupSelectionInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 4; ++i) {
const bdlat_SelectionInfo& selectionInfo =
- ClustersResult::SELECTION_INFO_ARRAY[i];
+ ClustersResult::SELECTION_INFO_ARRAY[i];
- if (nameLength == selectionInfo.d_nameLength &&
- 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength)) {
+ if (nameLength == selectionInfo.d_nameLength
+ && 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength))
+ {
return &selectionInfo;
}
}
@@ -22420,122 +24661,138 @@ ClustersResult::lookupSelectionInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_SelectionInfo* ClustersResult::lookupSelectionInfo(int id)
+const bdlat_SelectionInfo *ClustersResult::lookupSelectionInfo(int id)
{
switch (id) {
- case SELECTION_ID_ERROR:
+ case SELECTION_ID_ERROR:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR];
- case SELECTION_ID_SUCCESS:
+ case SELECTION_ID_SUCCESS:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_SUCCESS];
- case SELECTION_ID_CLUSTER_LIST:
+ case SELECTION_ID_CLUSTER_LIST:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_LIST];
- case SELECTION_ID_CLUSTER_RESULT:
+ case SELECTION_ID_CLUSTER_RESULT:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_RESULT];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-ClustersResult::ClustersResult(const ClustersResult& original,
- bslma::Allocator* basicAllocator)
+ClustersResult::ClustersResult(
+ const ClustersResult& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_ERROR: {
- new (d_error.buffer()) Error(original.d_error.object(), d_allocator_p);
- } break;
- case SELECTION_ID_SUCCESS: {
- new (d_success.buffer()) Void(original.d_success.object());
- } break;
- case SELECTION_ID_CLUSTER_LIST: {
+ case SELECTION_ID_ERROR: {
+ new (d_error.buffer())
+ Error(
+ original.d_error.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_SUCCESS: {
+ new (d_success.buffer())
+ Void(original.d_success.object());
+ } break;
+ case SELECTION_ID_CLUSTER_LIST: {
new (d_clusterList.buffer())
- ClusterList(original.d_clusterList.object(), d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTER_RESULT: {
+ ClusterList(
+ original.d_clusterList.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTER_RESULT: {
new (d_clusterResult.buffer())
- ClusterResult(original.d_clusterResult.object(), d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ ClusterResult(
+ original.d_clusterResult.object(), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ClustersResult::ClustersResult(ClustersResult&& original) noexcept
-: d_selectionId(original.d_selectionId),
- d_allocator_p(original.d_allocator_p)
+: d_selectionId(original.d_selectionId)
+, d_allocator_p(original.d_allocator_p)
{
switch (d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
new (d_error.buffer())
- Error(bsl::move(original.d_error.object()), d_allocator_p);
- } break;
- case SELECTION_ID_SUCCESS: {
- new (d_success.buffer()) Void(bsl::move(original.d_success.object()));
- } break;
- case SELECTION_ID_CLUSTER_LIST: {
+ Error(
+ bsl::move(original.d_error.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_SUCCESS: {
+ new (d_success.buffer())
+ Void(bsl::move(original.d_success.object()));
+ } break;
+ case SELECTION_ID_CLUSTER_LIST: {
new (d_clusterList.buffer())
- ClusterList(bsl::move(original.d_clusterList.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTER_RESULT: {
+ ClusterList(
+ bsl::move(original.d_clusterList.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTER_RESULT: {
new (d_clusterResult.buffer())
- ClusterResult(bsl::move(original.d_clusterResult.object()),
- d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ ClusterResult(
+ bsl::move(original.d_clusterResult.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-ClustersResult::ClustersResult(ClustersResult&& original,
- bslma::Allocator* basicAllocator)
+ClustersResult::ClustersResult(
+ ClustersResult&& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
new (d_error.buffer())
- Error(bsl::move(original.d_error.object()), d_allocator_p);
- } break;
- case SELECTION_ID_SUCCESS: {
- new (d_success.buffer()) Void(bsl::move(original.d_success.object()));
- } break;
- case SELECTION_ID_CLUSTER_LIST: {
+ Error(
+ bsl::move(original.d_error.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_SUCCESS: {
+ new (d_success.buffer())
+ Void(bsl::move(original.d_success.object()));
+ } break;
+ case SELECTION_ID_CLUSTER_LIST: {
new (d_clusterList.buffer())
- ClusterList(bsl::move(original.d_clusterList.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTER_RESULT: {
+ ClusterList(
+ bsl::move(original.d_clusterList.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTER_RESULT: {
new (d_clusterResult.buffer())
- ClusterResult(bsl::move(original.d_clusterResult.object()),
- d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ ClusterResult(
+ bsl::move(original.d_clusterResult.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
#endif
// MANIPULATORS
-ClustersResult& ClustersResult::operator=(const ClustersResult& rhs)
+ClustersResult&
+ClustersResult::operator=(const ClustersResult& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
makeError(rhs.d_error.object());
- } break;
- case SELECTION_ID_SUCCESS: {
+ } break;
+ case SELECTION_ID_SUCCESS: {
makeSuccess(rhs.d_success.object());
- } break;
- case SELECTION_ID_CLUSTER_LIST: {
+ } break;
+ case SELECTION_ID_CLUSTER_LIST: {
makeClusterList(rhs.d_clusterList.object());
- } break;
- case SELECTION_ID_CLUSTER_RESULT: {
+ } break;
+ case SELECTION_ID_CLUSTER_RESULT: {
makeClusterResult(rhs.d_clusterResult.object());
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -22544,25 +24801,26 @@ ClustersResult& ClustersResult::operator=(const ClustersResult& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-ClustersResult& ClustersResult::operator=(ClustersResult&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ClustersResult&
+ClustersResult::operator=(ClustersResult&& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
makeError(bsl::move(rhs.d_error.object()));
- } break;
- case SELECTION_ID_SUCCESS: {
+ } break;
+ case SELECTION_ID_SUCCESS: {
makeSuccess(bsl::move(rhs.d_success.object()));
- } break;
- case SELECTION_ID_CLUSTER_LIST: {
+ } break;
+ case SELECTION_ID_CLUSTER_LIST: {
makeClusterList(bsl::move(rhs.d_clusterList.object()));
- } break;
- case SELECTION_ID_CLUSTER_RESULT: {
+ } break;
+ case SELECTION_ID_CLUSTER_RESULT: {
makeClusterResult(bsl::move(rhs.d_clusterResult.object()));
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -22575,19 +24833,20 @@ ClustersResult& ClustersResult::operator=(ClustersResult&& rhs)
void ClustersResult::reset()
{
switch (d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
d_error.object().~Error();
- } break;
- case SELECTION_ID_SUCCESS: {
+ } break;
+ case SELECTION_ID_SUCCESS: {
d_success.object().~Void();
- } break;
- case SELECTION_ID_CLUSTER_LIST: {
+ } break;
+ case SELECTION_ID_CLUSTER_LIST: {
d_clusterList.object().~ClusterList();
- } break;
- case SELECTION_ID_CLUSTER_RESULT: {
+ } break;
+ case SELECTION_ID_CLUSTER_RESULT: {
d_clusterResult.object().~ClusterResult();
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
d_selectionId = SELECTION_ID_UNDEFINED;
@@ -22596,32 +24855,33 @@ void ClustersResult::reset()
int ClustersResult::makeSelection(int selectionId)
{
switch (selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
makeError();
- } break;
- case SELECTION_ID_SUCCESS: {
+ } break;
+ case SELECTION_ID_SUCCESS: {
makeSuccess();
- } break;
- case SELECTION_ID_CLUSTER_LIST: {
+ } break;
+ case SELECTION_ID_CLUSTER_LIST: {
makeClusterList();
- } break;
- case SELECTION_ID_CLUSTER_RESULT: {
+ } break;
+ case SELECTION_ID_CLUSTER_RESULT: {
makeClusterResult();
- } break;
- case SELECTION_ID_UNDEFINED: {
+ } break;
+ case SELECTION_ID_UNDEFINED: {
reset();
- } break;
- default: return -1;
+ } break;
+ default:
+ return -1;
}
return 0;
}
-int ClustersResult::makeSelection(const char* name, int nameLength)
+int ClustersResult::makeSelection(const char *name, int nameLength)
{
- const bdlat_SelectionInfo* selectionInfo = lookupSelectionInfo(name,
- nameLength);
+ const bdlat_SelectionInfo *selectionInfo =
+ lookupSelectionInfo(name, nameLength);
if (0 == selectionInfo) {
- return -1;
+ return -1;
}
return makeSelection(selectionInfo->d_id);
@@ -22634,7 +24894,8 @@ Error& ClustersResult::makeError()
}
else {
reset();
- new (d_error.buffer()) Error(d_allocator_p);
+ new (d_error.buffer())
+ Error(d_allocator_p);
d_selectionId = SELECTION_ID_ERROR;
}
@@ -22648,15 +24909,16 @@ Error& ClustersResult::makeError(const Error& value)
}
else {
reset();
- new (d_error.buffer()) Error(value, d_allocator_p);
+ new (d_error.buffer())
+ Error(value, d_allocator_p);
d_selectionId = SELECTION_ID_ERROR;
}
return d_error.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Error& ClustersResult::makeError(Error&& value)
{
if (SELECTION_ID_ERROR == d_selectionId) {
@@ -22664,7 +24926,8 @@ Error& ClustersResult::makeError(Error&& value)
}
else {
reset();
- new (d_error.buffer()) Error(bsl::move(value), d_allocator_p);
+ new (d_error.buffer())
+ Error(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_ERROR;
}
@@ -22679,7 +24942,8 @@ Void& ClustersResult::makeSuccess()
}
else {
reset();
- new (d_success.buffer()) Void();
+ new (d_success.buffer())
+ Void();
d_selectionId = SELECTION_ID_SUCCESS;
}
@@ -22693,15 +24957,16 @@ Void& ClustersResult::makeSuccess(const Void& value)
}
else {
reset();
- new (d_success.buffer()) Void(value);
+ new (d_success.buffer())
+ Void(value);
d_selectionId = SELECTION_ID_SUCCESS;
}
return d_success.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Void& ClustersResult::makeSuccess(Void&& value)
{
if (SELECTION_ID_SUCCESS == d_selectionId) {
@@ -22709,7 +24974,8 @@ Void& ClustersResult::makeSuccess(Void&& value)
}
else {
reset();
- new (d_success.buffer()) Void(bsl::move(value));
+ new (d_success.buffer())
+ Void(bsl::move(value));
d_selectionId = SELECTION_ID_SUCCESS;
}
@@ -22724,7 +24990,8 @@ ClusterList& ClustersResult::makeClusterList()
}
else {
reset();
- new (d_clusterList.buffer()) ClusterList(d_allocator_p);
+ new (d_clusterList.buffer())
+ ClusterList(d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER_LIST;
}
@@ -22738,15 +25005,16 @@ ClusterList& ClustersResult::makeClusterList(const ClusterList& value)
}
else {
reset();
- new (d_clusterList.buffer()) ClusterList(value, d_allocator_p);
+ new (d_clusterList.buffer())
+ ClusterList(value, d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER_LIST;
}
return d_clusterList.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ClusterList& ClustersResult::makeClusterList(ClusterList&& value)
{
if (SELECTION_ID_CLUSTER_LIST == d_selectionId) {
@@ -22755,7 +25023,7 @@ ClusterList& ClustersResult::makeClusterList(ClusterList&& value)
else {
reset();
new (d_clusterList.buffer())
- ClusterList(bsl::move(value), d_allocator_p);
+ ClusterList(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER_LIST;
}
@@ -22770,7 +25038,8 @@ ClusterResult& ClustersResult::makeClusterResult()
}
else {
reset();
- new (d_clusterResult.buffer()) ClusterResult(d_allocator_p);
+ new (d_clusterResult.buffer())
+ ClusterResult(d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER_RESULT;
}
@@ -22784,15 +25053,16 @@ ClusterResult& ClustersResult::makeClusterResult(const ClusterResult& value)
}
else {
reset();
- new (d_clusterResult.buffer()) ClusterResult(value, d_allocator_p);
+ new (d_clusterResult.buffer())
+ ClusterResult(value, d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER_RESULT;
}
return d_clusterResult.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ClusterResult& ClustersResult::makeClusterResult(ClusterResult&& value)
{
if (SELECTION_ID_CLUSTER_RESULT == d_selectionId) {
@@ -22801,7 +25071,7 @@ ClusterResult& ClustersResult::makeClusterResult(ClusterResult&& value)
else {
reset();
new (d_clusterResult.buffer())
- ClusterResult(bsl::move(value), d_allocator_p);
+ ClusterResult(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER_RESULT;
}
@@ -22811,89 +25081,103 @@ ClusterResult& ClustersResult::makeClusterResult(ClusterResult&& value)
// ACCESSORS
-bsl::ostream& ClustersResult::print(bsl::ostream& stream,
- int level,
- int spacesPerLevel) const
+bsl::ostream& ClustersResult::print(
+ bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
switch (d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
printer.printAttribute("error", d_error.object());
- } break;
- case SELECTION_ID_SUCCESS: {
+ } break;
+ case SELECTION_ID_SUCCESS: {
printer.printAttribute("success", d_success.object());
- } break;
- case SELECTION_ID_CLUSTER_LIST: {
+ } break;
+ case SELECTION_ID_CLUSTER_LIST: {
printer.printAttribute("clusterList", d_clusterList.object());
- } break;
- case SELECTION_ID_CLUSTER_RESULT: {
+ } break;
+ case SELECTION_ID_CLUSTER_RESULT: {
printer.printAttribute("clusterResult", d_clusterResult.object());
- } break;
- default: stream << "SELECTION UNDEFINED\n";
+ } break;
+ default:
+ stream << "SELECTION UNDEFINED\n";
}
printer.end();
return stream;
}
-const char* ClustersResult::selectionName() const
+
+const char *ClustersResult::selectionName() const
{
switch (d_selectionId) {
- case SELECTION_ID_ERROR:
+ case SELECTION_ID_ERROR:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR].name();
- case SELECTION_ID_SUCCESS:
+ case SELECTION_ID_SUCCESS:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_SUCCESS].name();
- case SELECTION_ID_CLUSTER_LIST:
+ case SELECTION_ID_CLUSTER_LIST:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_LIST].name();
- case SELECTION_ID_CLUSTER_RESULT:
+ case SELECTION_ID_CLUSTER_RESULT:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_RESULT].name();
- default:
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
return "(* UNDEFINED *)";
}
}
-// -------------------
-// class ConsumerState
-// -------------------
+ // -------------------
+ // class ConsumerState
+ // -------------------
// CONSTANTS
const char ConsumerState::CLASS_NAME[] = "ConsumerState";
const bdlat_AttributeInfo ConsumerState::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_APP_ID,
- "appId",
- sizeof("appId") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_STATUS,
- "status",
- sizeof("status") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {ATTRIBUTE_ID_IS_AT_END_OF_STORAGE,
- "isAtEndOfStorage",
- sizeof("isAtEndOfStorage") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_APP_STATE,
- "appState",
- sizeof("appState") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ ATTRIBUTE_ID_APP_ID,
+ "appId",
+ sizeof("appId") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_STATUS,
+ "status",
+ sizeof("status") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ ATTRIBUTE_ID_IS_AT_END_OF_STORAGE,
+ "isAtEndOfStorage",
+ sizeof("isAtEndOfStorage") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_APP_STATE,
+ "appState",
+ sizeof("appState") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* ConsumerState::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *ConsumerState::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 4; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- ConsumerState::ATTRIBUTE_INFO_ARRAY[i];
+ ConsumerState::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -22901,24 +25185,25 @@ const bdlat_AttributeInfo* ConsumerState::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* ConsumerState::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *ConsumerState::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_APP_ID:
+ case ATTRIBUTE_ID_APP_ID:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_ID];
- case ATTRIBUTE_ID_STATUS:
+ case ATTRIBUTE_ID_STATUS:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STATUS];
- case ATTRIBUTE_ID_IS_AT_END_OF_STORAGE:
+ case ATTRIBUTE_ID_IS_AT_END_OF_STORAGE:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_AT_END_OF_STORAGE];
- case ATTRIBUTE_ID_APP_STATE:
+ case ATTRIBUTE_ID_APP_STATE:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_STATE];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-ConsumerState::ConsumerState(bslma::Allocator* basicAllocator)
+ConsumerState::ConsumerState(bslma::Allocator *basicAllocator)
: d_appId(basicAllocator)
, d_appState(basicAllocator)
, d_status(static_cast(0))
@@ -22927,7 +25212,7 @@ ConsumerState::ConsumerState(bslma::Allocator* basicAllocator)
}
ConsumerState::ConsumerState(const ConsumerState& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_appId(original.d_appId, basicAllocator)
, d_appState(original.d_appState, basicAllocator)
, d_status(original.d_status)
@@ -22935,18 +25220,18 @@ ConsumerState::ConsumerState(const ConsumerState& original,
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ConsumerState::ConsumerState(ConsumerState&& original) noexcept
-: d_appId(bsl::move(original.d_appId)),
- d_appState(bsl::move(original.d_appState)),
- d_status(bsl::move(original.d_status)),
- d_isAtEndOfStorage(bsl::move(original.d_isAtEndOfStorage))
+: d_appId(bsl::move(original.d_appId))
+, d_appState(bsl::move(original.d_appState))
+, d_status(bsl::move(original.d_status))
+, d_isAtEndOfStorage(bsl::move(original.d_isAtEndOfStorage))
{
}
-ConsumerState::ConsumerState(ConsumerState&& original,
- bslma::Allocator* basicAllocator)
+ConsumerState::ConsumerState(ConsumerState&& original,
+ bslma::Allocator *basicAllocator)
: d_appId(bsl::move(original.d_appId), basicAllocator)
, d_appState(bsl::move(original.d_appState), basicAllocator)
, d_status(bsl::move(original.d_status))
@@ -22961,27 +25246,29 @@ ConsumerState::~ConsumerState()
// MANIPULATORS
-ConsumerState& ConsumerState::operator=(const ConsumerState& rhs)
+ConsumerState&
+ConsumerState::operator=(const ConsumerState& rhs)
{
if (this != &rhs) {
- d_appId = rhs.d_appId;
- d_status = rhs.d_status;
+ d_appId = rhs.d_appId;
+ d_status = rhs.d_status;
d_isAtEndOfStorage = rhs.d_isAtEndOfStorage;
- d_appState = rhs.d_appState;
+ d_appState = rhs.d_appState;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-ConsumerState& ConsumerState::operator=(ConsumerState&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ConsumerState&
+ConsumerState::operator=(ConsumerState&& rhs)
{
if (this != &rhs) {
- d_appId = bsl::move(rhs.d_appId);
- d_status = bsl::move(rhs.d_status);
+ d_appId = bsl::move(rhs.d_appId);
+ d_status = bsl::move(rhs.d_status);
d_isAtEndOfStorage = bsl::move(rhs.d_isAtEndOfStorage);
- d_appState = bsl::move(rhs.d_appState);
+ d_appState = bsl::move(rhs.d_appState);
}
return *this;
@@ -22998,8 +25285,9 @@ void ConsumerState::reset()
// ACCESSORS
-bsl::ostream&
-ConsumerState::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& ConsumerState::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
@@ -23011,47 +25299,60 @@ ConsumerState::print(bsl::ostream& stream, int level, int spacesPerLevel) const
return stream;
}
-// ----------------------
-// class RelayQueueEngine
-// ----------------------
+
+
+ // ----------------------
+ // class RelayQueueEngine
+ // ----------------------
// CONSTANTS
const char RelayQueueEngine::CLASS_NAME[] = "RelayQueueEngine";
const bdlat_AttributeInfo RelayQueueEngine::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_NUM_SUBSTREAMS,
- "numSubstreams",
- sizeof("numSubstreams") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_SUB_STREAMS,
- "subStreams",
- sizeof("subStreams") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {ATTRIBUTE_ID_APP_STATES,
- "appStates",
- sizeof("appStates") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {ATTRIBUTE_ID_ROUTING,
- "Routing",
- sizeof("Routing") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ ATTRIBUTE_ID_NUM_SUBSTREAMS,
+ "numSubstreams",
+ sizeof("numSubstreams") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_SUB_STREAMS,
+ "subStreams",
+ sizeof("subStreams") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ ATTRIBUTE_ID_APP_STATES,
+ "appStates",
+ sizeof("appStates") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ ATTRIBUTE_ID_ROUTING,
+ "Routing",
+ sizeof("Routing") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo*
-RelayQueueEngine::lookupAttributeInfo(const char* name, int nameLength)
+const bdlat_AttributeInfo *RelayQueueEngine::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 4; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- RelayQueueEngine::ATTRIBUTE_INFO_ARRAY[i];
+ RelayQueueEngine::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -23059,24 +25360,25 @@ RelayQueueEngine::lookupAttributeInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_AttributeInfo* RelayQueueEngine::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *RelayQueueEngine::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_NUM_SUBSTREAMS:
+ case ATTRIBUTE_ID_NUM_SUBSTREAMS:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_SUBSTREAMS];
- case ATTRIBUTE_ID_SUB_STREAMS:
+ case ATTRIBUTE_ID_SUB_STREAMS:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUB_STREAMS];
- case ATTRIBUTE_ID_APP_STATES:
+ case ATTRIBUTE_ID_APP_STATES:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_STATES];
- case ATTRIBUTE_ID_ROUTING:
+ case ATTRIBUTE_ID_ROUTING:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ROUTING];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-RelayQueueEngine::RelayQueueEngine(bslma::Allocator* basicAllocator)
+RelayQueueEngine::RelayQueueEngine(bslma::Allocator *basicAllocator)
: d_subStreams(basicAllocator)
, d_appStates(basicAllocator)
, d_routing(basicAllocator)
@@ -23085,7 +25387,7 @@ RelayQueueEngine::RelayQueueEngine(bslma::Allocator* basicAllocator)
}
RelayQueueEngine::RelayQueueEngine(const RelayQueueEngine& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_subStreams(original.d_subStreams, basicAllocator)
, d_appStates(original.d_appStates, basicAllocator)
, d_routing(original.d_routing, basicAllocator)
@@ -23093,18 +25395,18 @@ RelayQueueEngine::RelayQueueEngine(const RelayQueueEngine& original,
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
RelayQueueEngine::RelayQueueEngine(RelayQueueEngine&& original) noexcept
-: d_subStreams(bsl::move(original.d_subStreams)),
- d_appStates(bsl::move(original.d_appStates)),
- d_routing(bsl::move(original.d_routing)),
- d_numSubstreams(bsl::move(original.d_numSubstreams))
+: d_subStreams(bsl::move(original.d_subStreams))
+, d_appStates(bsl::move(original.d_appStates))
+, d_routing(bsl::move(original.d_routing))
+, d_numSubstreams(bsl::move(original.d_numSubstreams))
{
}
RelayQueueEngine::RelayQueueEngine(RelayQueueEngine&& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_subStreams(bsl::move(original.d_subStreams), basicAllocator)
, d_appStates(bsl::move(original.d_appStates), basicAllocator)
, d_routing(bsl::move(original.d_routing), basicAllocator)
@@ -23119,27 +25421,29 @@ RelayQueueEngine::~RelayQueueEngine()
// MANIPULATORS
-RelayQueueEngine& RelayQueueEngine::operator=(const RelayQueueEngine& rhs)
+RelayQueueEngine&
+RelayQueueEngine::operator=(const RelayQueueEngine& rhs)
{
if (this != &rhs) {
d_numSubstreams = rhs.d_numSubstreams;
- d_subStreams = rhs.d_subStreams;
- d_appStates = rhs.d_appStates;
- d_routing = rhs.d_routing;
+ d_subStreams = rhs.d_subStreams;
+ d_appStates = rhs.d_appStates;
+ d_routing = rhs.d_routing;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-RelayQueueEngine& RelayQueueEngine::operator=(RelayQueueEngine&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+RelayQueueEngine&
+RelayQueueEngine::operator=(RelayQueueEngine&& rhs)
{
if (this != &rhs) {
d_numSubstreams = bsl::move(rhs.d_numSubstreams);
- d_subStreams = bsl::move(rhs.d_subStreams);
- d_appStates = bsl::move(rhs.d_appStates);
- d_routing = bsl::move(rhs.d_routing);
+ d_subStreams = bsl::move(rhs.d_subStreams);
+ d_appStates = bsl::move(rhs.d_appStates);
+ d_routing = bsl::move(rhs.d_routing);
}
return *this;
@@ -23170,62 +25474,81 @@ bsl::ostream& RelayQueueEngine::print(bsl::ostream& stream,
return stream;
}
-// -------------------
-// class CommandChoice
-// -------------------
+
+
+ // -------------------
+ // class CommandChoice
+ // -------------------
// CONSTANTS
const char CommandChoice::CLASS_NAME[] = "CommandChoice";
const bdlat_SelectionInfo CommandChoice::SELECTION_INFO_ARRAY[] = {
- {SELECTION_ID_HELP,
- "help",
- sizeof("help") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_DOMAINS,
- "domains",
- sizeof("domains") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_CONFIG_PROVIDER,
- "configProvider",
- sizeof("configProvider") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_STAT,
- "stat",
- sizeof("stat") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_CLUSTERS,
- "clusters",
- sizeof("clusters") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_DANGER,
- "danger",
- sizeof("danger") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_BROKER_CONFIG,
- "brokerConfig",
- sizeof("brokerConfig") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ SELECTION_ID_HELP,
+ "help",
+ sizeof("help") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_DOMAINS,
+ "domains",
+ sizeof("domains") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_CONFIG_PROVIDER,
+ "configProvider",
+ sizeof("configProvider") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_STAT,
+ "stat",
+ sizeof("stat") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_CLUSTERS,
+ "clusters",
+ sizeof("clusters") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_DANGER,
+ "danger",
+ sizeof("danger") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_BROKER_CONFIG,
+ "brokerConfig",
+ sizeof("brokerConfig") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_SelectionInfo* CommandChoice::lookupSelectionInfo(const char* name,
- int nameLength)
+const bdlat_SelectionInfo *CommandChoice::lookupSelectionInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 7; ++i) {
const bdlat_SelectionInfo& selectionInfo =
- CommandChoice::SELECTION_INFO_ARRAY[i];
+ CommandChoice::SELECTION_INFO_ARRAY[i];
- if (nameLength == selectionInfo.d_nameLength &&
- 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength)) {
+ if (nameLength == selectionInfo.d_nameLength
+ && 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength))
+ {
return &selectionInfo;
}
}
@@ -23233,174 +25556,192 @@ const bdlat_SelectionInfo* CommandChoice::lookupSelectionInfo(const char* name,
return 0;
}
-const bdlat_SelectionInfo* CommandChoice::lookupSelectionInfo(int id)
+const bdlat_SelectionInfo *CommandChoice::lookupSelectionInfo(int id)
{
switch (id) {
- case SELECTION_ID_HELP: return &SELECTION_INFO_ARRAY[SELECTION_INDEX_HELP];
- case SELECTION_ID_DOMAINS:
+ case SELECTION_ID_HELP:
+ return &SELECTION_INFO_ARRAY[SELECTION_INDEX_HELP];
+ case SELECTION_ID_DOMAINS:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAINS];
- case SELECTION_ID_CONFIG_PROVIDER:
+ case SELECTION_ID_CONFIG_PROVIDER:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_CONFIG_PROVIDER];
- case SELECTION_ID_STAT: return &SELECTION_INFO_ARRAY[SELECTION_INDEX_STAT];
- case SELECTION_ID_CLUSTERS:
+ case SELECTION_ID_STAT:
+ return &SELECTION_INFO_ARRAY[SELECTION_INDEX_STAT];
+ case SELECTION_ID_CLUSTERS:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTERS];
- case SELECTION_ID_DANGER:
+ case SELECTION_ID_DANGER:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_DANGER];
- case SELECTION_ID_BROKER_CONFIG:
+ case SELECTION_ID_BROKER_CONFIG:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_BROKER_CONFIG];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-CommandChoice::CommandChoice(const CommandChoice& original,
- bslma::Allocator* basicAllocator)
+CommandChoice::CommandChoice(
+ const CommandChoice& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_HELP: {
- new (d_help.buffer()) HelpCommand(original.d_help.object());
- } break;
- case SELECTION_ID_DOMAINS: {
+ case SELECTION_ID_HELP: {
+ new (d_help.buffer())
+ HelpCommand(original.d_help.object());
+ } break;
+ case SELECTION_ID_DOMAINS: {
new (d_domains.buffer())
- DomainsCommand(original.d_domains.object(), d_allocator_p);
- } break;
- case SELECTION_ID_CONFIG_PROVIDER: {
+ DomainsCommand(
+ original.d_domains.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_CONFIG_PROVIDER: {
new (d_configProvider.buffer())
- ConfigProviderCommand(original.d_configProvider.object(),
- d_allocator_p);
- } break;
- case SELECTION_ID_STAT: {
+ ConfigProviderCommand(
+ original.d_configProvider.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_STAT: {
new (d_stat.buffer())
- StatCommand(original.d_stat.object(), d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTERS: {
+ StatCommand(
+ original.d_stat.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTERS: {
new (d_clusters.buffer())
- ClustersCommand(original.d_clusters.object(), d_allocator_p);
- } break;
- case SELECTION_ID_DANGER: {
- new (d_danger.buffer()) DangerCommand(original.d_danger.object());
- } break;
- case SELECTION_ID_BROKER_CONFIG: {
+ ClustersCommand(
+ original.d_clusters.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_DANGER: {
+ new (d_danger.buffer())
+ DangerCommand(original.d_danger.object());
+ } break;
+ case SELECTION_ID_BROKER_CONFIG: {
new (d_brokerConfig.buffer())
BrokerConfigCommand(original.d_brokerConfig.object());
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
CommandChoice::CommandChoice(CommandChoice&& original) noexcept
-: d_selectionId(original.d_selectionId),
- d_allocator_p(original.d_allocator_p)
+: d_selectionId(original.d_selectionId)
+, d_allocator_p(original.d_allocator_p)
{
switch (d_selectionId) {
- case SELECTION_ID_HELP: {
- new (d_help.buffer()) HelpCommand(bsl::move(original.d_help.object()));
- } break;
- case SELECTION_ID_DOMAINS: {
+ case SELECTION_ID_HELP: {
+ new (d_help.buffer())
+ HelpCommand(bsl::move(original.d_help.object()));
+ } break;
+ case SELECTION_ID_DOMAINS: {
new (d_domains.buffer())
- DomainsCommand(bsl::move(original.d_domains.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_CONFIG_PROVIDER: {
- new (d_configProvider.buffer()) ConfigProviderCommand(
- bsl::move(original.d_configProvider.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_STAT: {
+ DomainsCommand(
+ bsl::move(original.d_domains.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_CONFIG_PROVIDER: {
+ new (d_configProvider.buffer())
+ ConfigProviderCommand(
+ bsl::move(original.d_configProvider.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_STAT: {
new (d_stat.buffer())
- StatCommand(bsl::move(original.d_stat.object()), d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTERS: {
+ StatCommand(
+ bsl::move(original.d_stat.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTERS: {
new (d_clusters.buffer())
- ClustersCommand(bsl::move(original.d_clusters.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_DANGER: {
+ ClustersCommand(
+ bsl::move(original.d_clusters.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_DANGER: {
new (d_danger.buffer())
DangerCommand(bsl::move(original.d_danger.object()));
- } break;
- case SELECTION_ID_BROKER_CONFIG: {
+ } break;
+ case SELECTION_ID_BROKER_CONFIG: {
new (d_brokerConfig.buffer())
BrokerConfigCommand(bsl::move(original.d_brokerConfig.object()));
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-CommandChoice::CommandChoice(CommandChoice&& original,
- bslma::Allocator* basicAllocator)
+CommandChoice::CommandChoice(
+ CommandChoice&& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_HELP: {
- new (d_help.buffer()) HelpCommand(bsl::move(original.d_help.object()));
- } break;
- case SELECTION_ID_DOMAINS: {
+ case SELECTION_ID_HELP: {
+ new (d_help.buffer())
+ HelpCommand(bsl::move(original.d_help.object()));
+ } break;
+ case SELECTION_ID_DOMAINS: {
new (d_domains.buffer())
- DomainsCommand(bsl::move(original.d_domains.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_CONFIG_PROVIDER: {
- new (d_configProvider.buffer()) ConfigProviderCommand(
- bsl::move(original.d_configProvider.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_STAT: {
+ DomainsCommand(
+ bsl::move(original.d_domains.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_CONFIG_PROVIDER: {
+ new (d_configProvider.buffer())
+ ConfigProviderCommand(
+ bsl::move(original.d_configProvider.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_STAT: {
new (d_stat.buffer())
- StatCommand(bsl::move(original.d_stat.object()), d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTERS: {
+ StatCommand(
+ bsl::move(original.d_stat.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTERS: {
new (d_clusters.buffer())
- ClustersCommand(bsl::move(original.d_clusters.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_DANGER: {
+ ClustersCommand(
+ bsl::move(original.d_clusters.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_DANGER: {
new (d_danger.buffer())
DangerCommand(bsl::move(original.d_danger.object()));
- } break;
- case SELECTION_ID_BROKER_CONFIG: {
+ } break;
+ case SELECTION_ID_BROKER_CONFIG: {
new (d_brokerConfig.buffer())
BrokerConfigCommand(bsl::move(original.d_brokerConfig.object()));
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
#endif
// MANIPULATORS
-CommandChoice& CommandChoice::operator=(const CommandChoice& rhs)
+CommandChoice&
+CommandChoice::operator=(const CommandChoice& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_HELP: {
+ case SELECTION_ID_HELP: {
makeHelp(rhs.d_help.object());
- } break;
- case SELECTION_ID_DOMAINS: {
+ } break;
+ case SELECTION_ID_DOMAINS: {
makeDomains(rhs.d_domains.object());
- } break;
- case SELECTION_ID_CONFIG_PROVIDER: {
+ } break;
+ case SELECTION_ID_CONFIG_PROVIDER: {
makeConfigProvider(rhs.d_configProvider.object());
- } break;
- case SELECTION_ID_STAT: {
+ } break;
+ case SELECTION_ID_STAT: {
makeStat(rhs.d_stat.object());
- } break;
- case SELECTION_ID_CLUSTERS: {
+ } break;
+ case SELECTION_ID_CLUSTERS: {
makeClusters(rhs.d_clusters.object());
- } break;
- case SELECTION_ID_DANGER: {
+ } break;
+ case SELECTION_ID_DANGER: {
makeDanger(rhs.d_danger.object());
- } break;
- case SELECTION_ID_BROKER_CONFIG: {
+ } break;
+ case SELECTION_ID_BROKER_CONFIG: {
makeBrokerConfig(rhs.d_brokerConfig.object());
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -23409,34 +25750,35 @@ CommandChoice& CommandChoice::operator=(const CommandChoice& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-CommandChoice& CommandChoice::operator=(CommandChoice&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+CommandChoice&
+CommandChoice::operator=(CommandChoice&& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_HELP: {
+ case SELECTION_ID_HELP: {
makeHelp(bsl::move(rhs.d_help.object()));
- } break;
- case SELECTION_ID_DOMAINS: {
+ } break;
+ case SELECTION_ID_DOMAINS: {
makeDomains(bsl::move(rhs.d_domains.object()));
- } break;
- case SELECTION_ID_CONFIG_PROVIDER: {
+ } break;
+ case SELECTION_ID_CONFIG_PROVIDER: {
makeConfigProvider(bsl::move(rhs.d_configProvider.object()));
- } break;
- case SELECTION_ID_STAT: {
+ } break;
+ case SELECTION_ID_STAT: {
makeStat(bsl::move(rhs.d_stat.object()));
- } break;
- case SELECTION_ID_CLUSTERS: {
+ } break;
+ case SELECTION_ID_CLUSTERS: {
makeClusters(bsl::move(rhs.d_clusters.object()));
- } break;
- case SELECTION_ID_DANGER: {
+ } break;
+ case SELECTION_ID_DANGER: {
makeDanger(bsl::move(rhs.d_danger.object()));
- } break;
- case SELECTION_ID_BROKER_CONFIG: {
+ } break;
+ case SELECTION_ID_BROKER_CONFIG: {
makeBrokerConfig(bsl::move(rhs.d_brokerConfig.object()));
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -23449,28 +25791,29 @@ CommandChoice& CommandChoice::operator=(CommandChoice&& rhs)
void CommandChoice::reset()
{
switch (d_selectionId) {
- case SELECTION_ID_HELP: {
+ case SELECTION_ID_HELP: {
d_help.object().~HelpCommand();
- } break;
- case SELECTION_ID_DOMAINS: {
+ } break;
+ case SELECTION_ID_DOMAINS: {
d_domains.object().~DomainsCommand();
- } break;
- case SELECTION_ID_CONFIG_PROVIDER: {
+ } break;
+ case SELECTION_ID_CONFIG_PROVIDER: {
d_configProvider.object().~ConfigProviderCommand();
- } break;
- case SELECTION_ID_STAT: {
+ } break;
+ case SELECTION_ID_STAT: {
d_stat.object().~StatCommand();
- } break;
- case SELECTION_ID_CLUSTERS: {
+ } break;
+ case SELECTION_ID_CLUSTERS: {
d_clusters.object().~ClustersCommand();
- } break;
- case SELECTION_ID_DANGER: {
+ } break;
+ case SELECTION_ID_DANGER: {
d_danger.object().~DangerCommand();
- } break;
- case SELECTION_ID_BROKER_CONFIG: {
+ } break;
+ case SELECTION_ID_BROKER_CONFIG: {
d_brokerConfig.object().~BrokerConfigCommand();
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
d_selectionId = SELECTION_ID_UNDEFINED;
@@ -23479,41 +25822,42 @@ void CommandChoice::reset()
int CommandChoice::makeSelection(int selectionId)
{
switch (selectionId) {
- case SELECTION_ID_HELP: {
+ case SELECTION_ID_HELP: {
makeHelp();
- } break;
- case SELECTION_ID_DOMAINS: {
+ } break;
+ case SELECTION_ID_DOMAINS: {
makeDomains();
- } break;
- case SELECTION_ID_CONFIG_PROVIDER: {
+ } break;
+ case SELECTION_ID_CONFIG_PROVIDER: {
makeConfigProvider();
- } break;
- case SELECTION_ID_STAT: {
+ } break;
+ case SELECTION_ID_STAT: {
makeStat();
- } break;
- case SELECTION_ID_CLUSTERS: {
+ } break;
+ case SELECTION_ID_CLUSTERS: {
makeClusters();
- } break;
- case SELECTION_ID_DANGER: {
+ } break;
+ case SELECTION_ID_DANGER: {
makeDanger();
- } break;
- case SELECTION_ID_BROKER_CONFIG: {
+ } break;
+ case SELECTION_ID_BROKER_CONFIG: {
makeBrokerConfig();
- } break;
- case SELECTION_ID_UNDEFINED: {
+ } break;
+ case SELECTION_ID_UNDEFINED: {
reset();
- } break;
- default: return -1;
+ } break;
+ default:
+ return -1;
}
return 0;
}
-int CommandChoice::makeSelection(const char* name, int nameLength)
+int CommandChoice::makeSelection(const char *name, int nameLength)
{
- const bdlat_SelectionInfo* selectionInfo = lookupSelectionInfo(name,
- nameLength);
+ const bdlat_SelectionInfo *selectionInfo =
+ lookupSelectionInfo(name, nameLength);
if (0 == selectionInfo) {
- return -1;
+ return -1;
}
return makeSelection(selectionInfo->d_id);
@@ -23526,7 +25870,8 @@ HelpCommand& CommandChoice::makeHelp()
}
else {
reset();
- new (d_help.buffer()) HelpCommand();
+ new (d_help.buffer())
+ HelpCommand();
d_selectionId = SELECTION_ID_HELP;
}
@@ -23540,15 +25885,16 @@ HelpCommand& CommandChoice::makeHelp(const HelpCommand& value)
}
else {
reset();
- new (d_help.buffer()) HelpCommand(value);
+ new (d_help.buffer())
+ HelpCommand(value);
d_selectionId = SELECTION_ID_HELP;
}
return d_help.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
HelpCommand& CommandChoice::makeHelp(HelpCommand&& value)
{
if (SELECTION_ID_HELP == d_selectionId) {
@@ -23556,7 +25902,8 @@ HelpCommand& CommandChoice::makeHelp(HelpCommand&& value)
}
else {
reset();
- new (d_help.buffer()) HelpCommand(bsl::move(value));
+ new (d_help.buffer())
+ HelpCommand(bsl::move(value));
d_selectionId = SELECTION_ID_HELP;
}
@@ -23571,7 +25918,8 @@ DomainsCommand& CommandChoice::makeDomains()
}
else {
reset();
- new (d_domains.buffer()) DomainsCommand(d_allocator_p);
+ new (d_domains.buffer())
+ DomainsCommand(d_allocator_p);
d_selectionId = SELECTION_ID_DOMAINS;
}
@@ -23585,15 +25933,16 @@ DomainsCommand& CommandChoice::makeDomains(const DomainsCommand& value)
}
else {
reset();
- new (d_domains.buffer()) DomainsCommand(value, d_allocator_p);
+ new (d_domains.buffer())
+ DomainsCommand(value, d_allocator_p);
d_selectionId = SELECTION_ID_DOMAINS;
}
return d_domains.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
DomainsCommand& CommandChoice::makeDomains(DomainsCommand&& value)
{
if (SELECTION_ID_DOMAINS == d_selectionId) {
@@ -23602,7 +25951,7 @@ DomainsCommand& CommandChoice::makeDomains(DomainsCommand&& value)
else {
reset();
new (d_domains.buffer())
- DomainsCommand(bsl::move(value), d_allocator_p);
+ DomainsCommand(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_DOMAINS;
}
@@ -23617,15 +25966,15 @@ ConfigProviderCommand& CommandChoice::makeConfigProvider()
}
else {
reset();
- new (d_configProvider.buffer()) ConfigProviderCommand(d_allocator_p);
+ new (d_configProvider.buffer())
+ ConfigProviderCommand(d_allocator_p);
d_selectionId = SELECTION_ID_CONFIG_PROVIDER;
}
return d_configProvider.object();
}
-ConfigProviderCommand&
-CommandChoice::makeConfigProvider(const ConfigProviderCommand& value)
+ConfigProviderCommand& CommandChoice::makeConfigProvider(const ConfigProviderCommand& value)
{
if (SELECTION_ID_CONFIG_PROVIDER == d_selectionId) {
d_configProvider.object() = value;
@@ -23633,17 +25982,16 @@ CommandChoice::makeConfigProvider(const ConfigProviderCommand& value)
else {
reset();
new (d_configProvider.buffer())
- ConfigProviderCommand(value, d_allocator_p);
+ ConfigProviderCommand(value, d_allocator_p);
d_selectionId = SELECTION_ID_CONFIG_PROVIDER;
}
return d_configProvider.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-ConfigProviderCommand&
-CommandChoice::makeConfigProvider(ConfigProviderCommand&& value)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ConfigProviderCommand& CommandChoice::makeConfigProvider(ConfigProviderCommand&& value)
{
if (SELECTION_ID_CONFIG_PROVIDER == d_selectionId) {
d_configProvider.object() = bsl::move(value);
@@ -23651,7 +25999,7 @@ CommandChoice::makeConfigProvider(ConfigProviderCommand&& value)
else {
reset();
new (d_configProvider.buffer())
- ConfigProviderCommand(bsl::move(value), d_allocator_p);
+ ConfigProviderCommand(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_CONFIG_PROVIDER;
}
@@ -23666,7 +26014,8 @@ StatCommand& CommandChoice::makeStat()
}
else {
reset();
- new (d_stat.buffer()) StatCommand(d_allocator_p);
+ new (d_stat.buffer())
+ StatCommand(d_allocator_p);
d_selectionId = SELECTION_ID_STAT;
}
@@ -23680,15 +26029,16 @@ StatCommand& CommandChoice::makeStat(const StatCommand& value)
}
else {
reset();
- new (d_stat.buffer()) StatCommand(value, d_allocator_p);
+ new (d_stat.buffer())
+ StatCommand(value, d_allocator_p);
d_selectionId = SELECTION_ID_STAT;
}
return d_stat.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
StatCommand& CommandChoice::makeStat(StatCommand&& value)
{
if (SELECTION_ID_STAT == d_selectionId) {
@@ -23696,7 +26046,8 @@ StatCommand& CommandChoice::makeStat(StatCommand&& value)
}
else {
reset();
- new (d_stat.buffer()) StatCommand(bsl::move(value), d_allocator_p);
+ new (d_stat.buffer())
+ StatCommand(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_STAT;
}
@@ -23711,7 +26062,8 @@ ClustersCommand& CommandChoice::makeClusters()
}
else {
reset();
- new (d_clusters.buffer()) ClustersCommand(d_allocator_p);
+ new (d_clusters.buffer())
+ ClustersCommand(d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTERS;
}
@@ -23725,15 +26077,16 @@ ClustersCommand& CommandChoice::makeClusters(const ClustersCommand& value)
}
else {
reset();
- new (d_clusters.buffer()) ClustersCommand(value, d_allocator_p);
+ new (d_clusters.buffer())
+ ClustersCommand(value, d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTERS;
}
return d_clusters.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ClustersCommand& CommandChoice::makeClusters(ClustersCommand&& value)
{
if (SELECTION_ID_CLUSTERS == d_selectionId) {
@@ -23742,7 +26095,7 @@ ClustersCommand& CommandChoice::makeClusters(ClustersCommand&& value)
else {
reset();
new (d_clusters.buffer())
- ClustersCommand(bsl::move(value), d_allocator_p);
+ ClustersCommand(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTERS;
}
@@ -23757,7 +26110,8 @@ DangerCommand& CommandChoice::makeDanger()
}
else {
reset();
- new (d_danger.buffer()) DangerCommand();
+ new (d_danger.buffer())
+ DangerCommand();
d_selectionId = SELECTION_ID_DANGER;
}
@@ -23771,15 +26125,16 @@ DangerCommand& CommandChoice::makeDanger(const DangerCommand& value)
}
else {
reset();
- new (d_danger.buffer()) DangerCommand(value);
+ new (d_danger.buffer())
+ DangerCommand(value);
d_selectionId = SELECTION_ID_DANGER;
}
return d_danger.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
DangerCommand& CommandChoice::makeDanger(DangerCommand&& value)
{
if (SELECTION_ID_DANGER == d_selectionId) {
@@ -23787,7 +26142,8 @@ DangerCommand& CommandChoice::makeDanger(DangerCommand&& value)
}
else {
reset();
- new (d_danger.buffer()) DangerCommand(bsl::move(value));
+ new (d_danger.buffer())
+ DangerCommand(bsl::move(value));
d_selectionId = SELECTION_ID_DANGER;
}
@@ -23802,39 +26158,40 @@ BrokerConfigCommand& CommandChoice::makeBrokerConfig()
}
else {
reset();
- new (d_brokerConfig.buffer()) BrokerConfigCommand();
+ new (d_brokerConfig.buffer())
+ BrokerConfigCommand();
d_selectionId = SELECTION_ID_BROKER_CONFIG;
}
return d_brokerConfig.object();
}
-BrokerConfigCommand&
-CommandChoice::makeBrokerConfig(const BrokerConfigCommand& value)
+BrokerConfigCommand& CommandChoice::makeBrokerConfig(const BrokerConfigCommand& value)
{
if (SELECTION_ID_BROKER_CONFIG == d_selectionId) {
d_brokerConfig.object() = value;
}
else {
reset();
- new (d_brokerConfig.buffer()) BrokerConfigCommand(value);
+ new (d_brokerConfig.buffer())
+ BrokerConfigCommand(value);
d_selectionId = SELECTION_ID_BROKER_CONFIG;
}
return d_brokerConfig.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-BrokerConfigCommand&
-CommandChoice::makeBrokerConfig(BrokerConfigCommand&& value)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+BrokerConfigCommand& CommandChoice::makeBrokerConfig(BrokerConfigCommand&& value)
{
if (SELECTION_ID_BROKER_CONFIG == d_selectionId) {
d_brokerConfig.object() = bsl::move(value);
}
else {
reset();
- new (d_brokerConfig.buffer()) BrokerConfigCommand(bsl::move(value));
+ new (d_brokerConfig.buffer())
+ BrokerConfigCommand(bsl::move(value));
d_selectionId = SELECTION_ID_BROKER_CONFIG;
}
@@ -23844,103 +26201,118 @@ CommandChoice::makeBrokerConfig(BrokerConfigCommand&& value)
// ACCESSORS
-bsl::ostream&
-CommandChoice::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& CommandChoice::print(
+ bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
switch (d_selectionId) {
- case SELECTION_ID_HELP: {
+ case SELECTION_ID_HELP: {
printer.printAttribute("help", d_help.object());
- } break;
- case SELECTION_ID_DOMAINS: {
+ } break;
+ case SELECTION_ID_DOMAINS: {
printer.printAttribute("domains", d_domains.object());
- } break;
- case SELECTION_ID_CONFIG_PROVIDER: {
+ } break;
+ case SELECTION_ID_CONFIG_PROVIDER: {
printer.printAttribute("configProvider", d_configProvider.object());
- } break;
- case SELECTION_ID_STAT: {
+ } break;
+ case SELECTION_ID_STAT: {
printer.printAttribute("stat", d_stat.object());
- } break;
- case SELECTION_ID_CLUSTERS: {
+ } break;
+ case SELECTION_ID_CLUSTERS: {
printer.printAttribute("clusters", d_clusters.object());
- } break;
- case SELECTION_ID_DANGER: {
+ } break;
+ case SELECTION_ID_DANGER: {
printer.printAttribute("danger", d_danger.object());
- } break;
- case SELECTION_ID_BROKER_CONFIG: {
+ } break;
+ case SELECTION_ID_BROKER_CONFIG: {
printer.printAttribute("brokerConfig", d_brokerConfig.object());
- } break;
- default: stream << "SELECTION UNDEFINED\n";
+ } break;
+ default:
+ stream << "SELECTION UNDEFINED\n";
}
printer.end();
return stream;
}
-const char* CommandChoice::selectionName() const
+
+const char *CommandChoice::selectionName() const
{
switch (d_selectionId) {
- case SELECTION_ID_HELP:
+ case SELECTION_ID_HELP:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_HELP].name();
- case SELECTION_ID_DOMAINS:
+ case SELECTION_ID_DOMAINS:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAINS].name();
- case SELECTION_ID_CONFIG_PROVIDER:
+ case SELECTION_ID_CONFIG_PROVIDER:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_CONFIG_PROVIDER].name();
- case SELECTION_ID_STAT:
+ case SELECTION_ID_STAT:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_STAT].name();
- case SELECTION_ID_CLUSTERS:
+ case SELECTION_ID_CLUSTERS:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTERS].name();
- case SELECTION_ID_DANGER:
+ case SELECTION_ID_DANGER:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_DANGER].name();
- case SELECTION_ID_BROKER_CONFIG:
+ case SELECTION_ID_BROKER_CONFIG:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_BROKER_CONFIG].name();
- default:
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
return "(* UNDEFINED *)";
}
}
-// -----------------------
-// class FanoutQueueEngine
-// -----------------------
+ // -----------------------
+ // class FanoutQueueEngine
+ // -----------------------
// CONSTANTS
const char FanoutQueueEngine::CLASS_NAME[] = "FanoutQueueEngine";
const bdlat_AttributeInfo FanoutQueueEngine::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_MAX_CONSUMERS,
- "maxConsumers",
- sizeof("maxConsumers") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_MODE,
- "mode",
- sizeof("mode") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_CONSUMER_STATES,
- "consumerStates",
- sizeof("consumerStates") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {ATTRIBUTE_ID_ROUTING,
- "Routing",
- sizeof("Routing") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ ATTRIBUTE_ID_MAX_CONSUMERS,
+ "maxConsumers",
+ sizeof("maxConsumers") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_MODE,
+ "mode",
+ sizeof("mode") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_CONSUMER_STATES,
+ "consumerStates",
+ sizeof("consumerStates") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ ATTRIBUTE_ID_ROUTING,
+ "Routing",
+ sizeof("Routing") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo*
-FanoutQueueEngine::lookupAttributeInfo(const char* name, int nameLength)
+const bdlat_AttributeInfo *FanoutQueueEngine::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 4; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- FanoutQueueEngine::ATTRIBUTE_INFO_ARRAY[i];
+ FanoutQueueEngine::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -23948,23 +26320,25 @@ FanoutQueueEngine::lookupAttributeInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_AttributeInfo* FanoutQueueEngine::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *FanoutQueueEngine::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_MAX_CONSUMERS:
+ case ATTRIBUTE_ID_MAX_CONSUMERS:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MAX_CONSUMERS];
- case ATTRIBUTE_ID_MODE: return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MODE];
- case ATTRIBUTE_ID_CONSUMER_STATES:
+ case ATTRIBUTE_ID_MODE:
+ return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MODE];
+ case ATTRIBUTE_ID_CONSUMER_STATES:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONSUMER_STATES];
- case ATTRIBUTE_ID_ROUTING:
+ case ATTRIBUTE_ID_ROUTING:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ROUTING];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-FanoutQueueEngine::FanoutQueueEngine(bslma::Allocator* basicAllocator)
+FanoutQueueEngine::FanoutQueueEngine(bslma::Allocator *basicAllocator)
: d_consumerStates(basicAllocator)
, d_mode(basicAllocator)
, d_routing(basicAllocator)
@@ -23973,7 +26347,7 @@ FanoutQueueEngine::FanoutQueueEngine(bslma::Allocator* basicAllocator)
}
FanoutQueueEngine::FanoutQueueEngine(const FanoutQueueEngine& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_consumerStates(original.d_consumerStates, basicAllocator)
, d_mode(original.d_mode, basicAllocator)
, d_routing(original.d_routing, basicAllocator)
@@ -23981,18 +26355,18 @@ FanoutQueueEngine::FanoutQueueEngine(const FanoutQueueEngine& original,
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
FanoutQueueEngine::FanoutQueueEngine(FanoutQueueEngine&& original) noexcept
-: d_consumerStates(bsl::move(original.d_consumerStates)),
- d_mode(bsl::move(original.d_mode)),
- d_routing(bsl::move(original.d_routing)),
- d_maxConsumers(bsl::move(original.d_maxConsumers))
+: d_consumerStates(bsl::move(original.d_consumerStates))
+, d_mode(bsl::move(original.d_mode))
+, d_routing(bsl::move(original.d_routing))
+, d_maxConsumers(bsl::move(original.d_maxConsumers))
{
}
FanoutQueueEngine::FanoutQueueEngine(FanoutQueueEngine&& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_consumerStates(bsl::move(original.d_consumerStates), basicAllocator)
, d_mode(bsl::move(original.d_mode), basicAllocator)
, d_routing(bsl::move(original.d_routing), basicAllocator)
@@ -24007,27 +26381,29 @@ FanoutQueueEngine::~FanoutQueueEngine()
// MANIPULATORS
-FanoutQueueEngine& FanoutQueueEngine::operator=(const FanoutQueueEngine& rhs)
+FanoutQueueEngine&
+FanoutQueueEngine::operator=(const FanoutQueueEngine& rhs)
{
if (this != &rhs) {
- d_maxConsumers = rhs.d_maxConsumers;
- d_mode = rhs.d_mode;
+ d_maxConsumers = rhs.d_maxConsumers;
+ d_mode = rhs.d_mode;
d_consumerStates = rhs.d_consumerStates;
- d_routing = rhs.d_routing;
+ d_routing = rhs.d_routing;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-FanoutQueueEngine& FanoutQueueEngine::operator=(FanoutQueueEngine&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+FanoutQueueEngine&
+FanoutQueueEngine::operator=(FanoutQueueEngine&& rhs)
{
if (this != &rhs) {
- d_maxConsumers = bsl::move(rhs.d_maxConsumers);
- d_mode = bsl::move(rhs.d_mode);
+ d_maxConsumers = bsl::move(rhs.d_maxConsumers);
+ d_mode = bsl::move(rhs.d_mode);
d_consumerStates = bsl::move(rhs.d_consumerStates);
- d_routing = bsl::move(rhs.d_routing);
+ d_routing = bsl::move(rhs.d_routing);
}
return *this;
@@ -24058,33 +26434,41 @@ bsl::ostream& FanoutQueueEngine::print(bsl::ostream& stream,
return stream;
}
-// -------------
-// class Command
-// -------------
+
+
+ // -------------
+ // class Command
+ // -------------
// CONSTANTS
const char Command::CLASS_NAME[] = "Command";
-const EncodingFormat::Value Command::DEFAULT_INITIALIZER_ENCODING =
- EncodingFormat::TEXT;
+const EncodingFormat::Value Command::DEFAULT_INITIALIZER_ENCODING = EncodingFormat::TEXT;
const bdlat_AttributeInfo Command::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_CHOICE,
- "Choice",
- sizeof("Choice") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT | bdlat_FormattingMode::e_UNTAGGED},
- {ATTRIBUTE_ID_ENCODING,
- "encoding",
- sizeof("encoding") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ ATTRIBUTE_ID_CHOICE,
+ "Choice",
+ sizeof("Choice") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ | bdlat_FormattingMode::e_UNTAGGED
+ },
+ {
+ ATTRIBUTE_ID_ENCODING,
+ "encoding",
+ sizeof("encoding") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* Command::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *Command::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
if (bdlb::String::areEqualCaseless("help", name, nameLength)) {
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE];
@@ -24116,10 +26500,11 @@ const bdlat_AttributeInfo* Command::lookupAttributeInfo(const char* name,
for (int i = 0; i < 2; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- Command::ATTRIBUTE_INFO_ARRAY[i];
+ Command::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -24127,40 +26512,43 @@ const bdlat_AttributeInfo* Command::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* Command::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *Command::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_CHOICE:
+ case ATTRIBUTE_ID_CHOICE:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE];
- case ATTRIBUTE_ID_ENCODING:
+ case ATTRIBUTE_ID_ENCODING:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ENCODING];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-Command::Command(bslma::Allocator* basicAllocator)
+Command::Command(bslma::Allocator *basicAllocator)
: d_choice(basicAllocator)
, d_encoding(DEFAULT_INITIALIZER_ENCODING)
{
}
-Command::Command(const Command& original, bslma::Allocator* basicAllocator)
+Command::Command(const Command& original,
+ bslma::Allocator *basicAllocator)
: d_choice(original.d_choice, basicAllocator)
, d_encoding(original.d_encoding)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Command::Command(Command&& original) noexcept
-: d_choice(bsl::move(original.d_choice)),
- d_encoding(bsl::move(original.d_encoding))
+: d_choice(bsl::move(original.d_choice))
+, d_encoding(bsl::move(original.d_encoding))
{
}
-Command::Command(Command&& original, bslma::Allocator* basicAllocator)
+Command::Command(Command&& original,
+ bslma::Allocator *basicAllocator)
: d_choice(bsl::move(original.d_choice), basicAllocator)
, d_encoding(bsl::move(original.d_encoding))
{
@@ -24173,22 +26561,24 @@ Command::~Command()
// MANIPULATORS
-Command& Command::operator=(const Command& rhs)
+Command&
+Command::operator=(const Command& rhs)
{
if (this != &rhs) {
- d_choice = rhs.d_choice;
+ d_choice = rhs.d_choice;
d_encoding = rhs.d_encoding;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-Command& Command::operator=(Command&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+Command&
+Command::operator=(Command&& rhs)
{
if (this != &rhs) {
- d_choice = bsl::move(rhs.d_choice);
+ d_choice = bsl::move(rhs.d_choice);
d_encoding = bsl::move(rhs.d_encoding);
}
@@ -24204,8 +26594,9 @@ void Command::reset()
// ACCESSORS
-bsl::ostream&
-Command::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& Command::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
@@ -24215,37 +26606,46 @@ Command::print(bsl::ostream& stream, int level, int spacesPerLevel) const
return stream;
}
-// -----------------
-// class QueueEngine
-// -----------------
+
+
+ // -----------------
+ // class QueueEngine
+ // -----------------
// CONSTANTS
const char QueueEngine::CLASS_NAME[] = "QueueEngine";
const bdlat_SelectionInfo QueueEngine::SELECTION_INFO_ARRAY[] = {
- {SELECTION_ID_FANOUT,
- "fanout",
- sizeof("fanout") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_RELAY,
- "relay",
- sizeof("relay") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ SELECTION_ID_FANOUT,
+ "fanout",
+ sizeof("fanout") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_RELAY,
+ "relay",
+ sizeof("relay") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_SelectionInfo* QueueEngine::lookupSelectionInfo(const char* name,
- int nameLength)
+const bdlat_SelectionInfo *QueueEngine::lookupSelectionInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 2; ++i) {
const bdlat_SelectionInfo& selectionInfo =
- QueueEngine::SELECTION_INFO_ARRAY[i];
+ QueueEngine::SELECTION_INFO_ARRAY[i];
- if (nameLength == selectionInfo.d_nameLength &&
- 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength)) {
+ if (nameLength == selectionInfo.d_nameLength
+ && 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength))
+ {
return &selectionInfo;
}
}
@@ -24253,92 +26653,101 @@ const bdlat_SelectionInfo* QueueEngine::lookupSelectionInfo(const char* name,
return 0;
}
-const bdlat_SelectionInfo* QueueEngine::lookupSelectionInfo(int id)
+const bdlat_SelectionInfo *QueueEngine::lookupSelectionInfo(int id)
{
switch (id) {
- case SELECTION_ID_FANOUT:
+ case SELECTION_ID_FANOUT:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_FANOUT];
- case SELECTION_ID_RELAY:
+ case SELECTION_ID_RELAY:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_RELAY];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-QueueEngine::QueueEngine(const QueueEngine& original,
- bslma::Allocator* basicAllocator)
+QueueEngine::QueueEngine(
+ const QueueEngine& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_FANOUT: {
+ case SELECTION_ID_FANOUT: {
new (d_fanout.buffer())
- FanoutQueueEngine(original.d_fanout.object(), d_allocator_p);
- } break;
- case SELECTION_ID_RELAY: {
+ FanoutQueueEngine(
+ original.d_fanout.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_RELAY: {
new (d_relay.buffer())
- RelayQueueEngine(original.d_relay.object(), d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ RelayQueueEngine(
+ original.d_relay.object(), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
QueueEngine::QueueEngine(QueueEngine&& original) noexcept
-: d_selectionId(original.d_selectionId),
- d_allocator_p(original.d_allocator_p)
+: d_selectionId(original.d_selectionId)
+, d_allocator_p(original.d_allocator_p)
{
switch (d_selectionId) {
- case SELECTION_ID_FANOUT: {
+ case SELECTION_ID_FANOUT: {
new (d_fanout.buffer())
- FanoutQueueEngine(bsl::move(original.d_fanout.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_RELAY: {
+ FanoutQueueEngine(
+ bsl::move(original.d_fanout.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_RELAY: {
new (d_relay.buffer())
- RelayQueueEngine(bsl::move(original.d_relay.object()),
- d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ RelayQueueEngine(
+ bsl::move(original.d_relay.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-QueueEngine::QueueEngine(QueueEngine&& original,
- bslma::Allocator* basicAllocator)
+QueueEngine::QueueEngine(
+ QueueEngine&& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_FANOUT: {
+ case SELECTION_ID_FANOUT: {
new (d_fanout.buffer())
- FanoutQueueEngine(bsl::move(original.d_fanout.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_RELAY: {
+ FanoutQueueEngine(
+ bsl::move(original.d_fanout.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_RELAY: {
new (d_relay.buffer())
- RelayQueueEngine(bsl::move(original.d_relay.object()),
- d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ RelayQueueEngine(
+ bsl::move(original.d_relay.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
#endif
// MANIPULATORS
-QueueEngine& QueueEngine::operator=(const QueueEngine& rhs)
+QueueEngine&
+QueueEngine::operator=(const QueueEngine& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_FANOUT: {
+ case SELECTION_ID_FANOUT: {
makeFanout(rhs.d_fanout.object());
- } break;
- case SELECTION_ID_RELAY: {
+ } break;
+ case SELECTION_ID_RELAY: {
makeRelay(rhs.d_relay.object());
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -24347,19 +26756,20 @@ QueueEngine& QueueEngine::operator=(const QueueEngine& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-QueueEngine& QueueEngine::operator=(QueueEngine&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+QueueEngine&
+QueueEngine::operator=(QueueEngine&& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_FANOUT: {
+ case SELECTION_ID_FANOUT: {
makeFanout(bsl::move(rhs.d_fanout.object()));
- } break;
- case SELECTION_ID_RELAY: {
+ } break;
+ case SELECTION_ID_RELAY: {
makeRelay(bsl::move(rhs.d_relay.object()));
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -24372,13 +26782,14 @@ QueueEngine& QueueEngine::operator=(QueueEngine&& rhs)
void QueueEngine::reset()
{
switch (d_selectionId) {
- case SELECTION_ID_FANOUT: {
+ case SELECTION_ID_FANOUT: {
d_fanout.object().~FanoutQueueEngine();
- } break;
- case SELECTION_ID_RELAY: {
+ } break;
+ case SELECTION_ID_RELAY: {
d_relay.object().~RelayQueueEngine();
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
d_selectionId = SELECTION_ID_UNDEFINED;
@@ -24387,26 +26798,27 @@ void QueueEngine::reset()
int QueueEngine::makeSelection(int selectionId)
{
switch (selectionId) {
- case SELECTION_ID_FANOUT: {
+ case SELECTION_ID_FANOUT: {
makeFanout();
- } break;
- case SELECTION_ID_RELAY: {
+ } break;
+ case SELECTION_ID_RELAY: {
makeRelay();
- } break;
- case SELECTION_ID_UNDEFINED: {
+ } break;
+ case SELECTION_ID_UNDEFINED: {
reset();
- } break;
- default: return -1;
+ } break;
+ default:
+ return -1;
}
return 0;
}
-int QueueEngine::makeSelection(const char* name, int nameLength)
+int QueueEngine::makeSelection(const char *name, int nameLength)
{
- const bdlat_SelectionInfo* selectionInfo = lookupSelectionInfo(name,
- nameLength);
+ const bdlat_SelectionInfo *selectionInfo =
+ lookupSelectionInfo(name, nameLength);
if (0 == selectionInfo) {
- return -1;
+ return -1;
}
return makeSelection(selectionInfo->d_id);
@@ -24419,7 +26831,8 @@ FanoutQueueEngine& QueueEngine::makeFanout()
}
else {
reset();
- new (d_fanout.buffer()) FanoutQueueEngine(d_allocator_p);
+ new (d_fanout.buffer())
+ FanoutQueueEngine(d_allocator_p);
d_selectionId = SELECTION_ID_FANOUT;
}
@@ -24433,15 +26846,16 @@ FanoutQueueEngine& QueueEngine::makeFanout(const FanoutQueueEngine& value)
}
else {
reset();
- new (d_fanout.buffer()) FanoutQueueEngine(value, d_allocator_p);
+ new (d_fanout.buffer())
+ FanoutQueueEngine(value, d_allocator_p);
d_selectionId = SELECTION_ID_FANOUT;
}
return d_fanout.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
FanoutQueueEngine& QueueEngine::makeFanout(FanoutQueueEngine&& value)
{
if (SELECTION_ID_FANOUT == d_selectionId) {
@@ -24450,7 +26864,7 @@ FanoutQueueEngine& QueueEngine::makeFanout(FanoutQueueEngine&& value)
else {
reset();
new (d_fanout.buffer())
- FanoutQueueEngine(bsl::move(value), d_allocator_p);
+ FanoutQueueEngine(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_FANOUT;
}
@@ -24465,7 +26879,8 @@ RelayQueueEngine& QueueEngine::makeRelay()
}
else {
reset();
- new (d_relay.buffer()) RelayQueueEngine(d_allocator_p);
+ new (d_relay.buffer())
+ RelayQueueEngine(d_allocator_p);
d_selectionId = SELECTION_ID_RELAY;
}
@@ -24479,15 +26894,16 @@ RelayQueueEngine& QueueEngine::makeRelay(const RelayQueueEngine& value)
}
else {
reset();
- new (d_relay.buffer()) RelayQueueEngine(value, d_allocator_p);
+ new (d_relay.buffer())
+ RelayQueueEngine(value, d_allocator_p);
d_selectionId = SELECTION_ID_RELAY;
}
return d_relay.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
RelayQueueEngine& QueueEngine::makeRelay(RelayQueueEngine&& value)
{
if (SELECTION_ID_RELAY == d_selectionId) {
@@ -24496,7 +26912,7 @@ RelayQueueEngine& QueueEngine::makeRelay(RelayQueueEngine&& value)
else {
reset();
new (d_relay.buffer())
- RelayQueueEngine(bsl::move(value), d_allocator_p);
+ RelayQueueEngine(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_RELAY;
}
@@ -24506,63 +26922,72 @@ RelayQueueEngine& QueueEngine::makeRelay(RelayQueueEngine&& value)
// ACCESSORS
-bsl::ostream&
-QueueEngine::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& QueueEngine::print(
+ bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
switch (d_selectionId) {
- case SELECTION_ID_FANOUT: {
+ case SELECTION_ID_FANOUT: {
printer.printAttribute("fanout", d_fanout.object());
- } break;
- case SELECTION_ID_RELAY: {
+ } break;
+ case SELECTION_ID_RELAY: {
printer.printAttribute("relay", d_relay.object());
- } break;
- default: stream << "SELECTION UNDEFINED\n";
+ } break;
+ default:
+ stream << "SELECTION UNDEFINED\n";
}
printer.end();
return stream;
}
-const char* QueueEngine::selectionName() const
+
+const char *QueueEngine::selectionName() const
{
switch (d_selectionId) {
- case SELECTION_ID_FANOUT:
+ case SELECTION_ID_FANOUT:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_FANOUT].name();
- case SELECTION_ID_RELAY:
+ case SELECTION_ID_RELAY:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_RELAY].name();
- default:
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
return "(* UNDEFINED *)";
}
}
-// ----------------
-// class LocalQueue
-// ----------------
+ // ----------------
+ // class LocalQueue
+ // ----------------
// CONSTANTS
const char LocalQueue::CLASS_NAME[] = "LocalQueue";
const bdlat_AttributeInfo LocalQueue::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_QUEUE_ENGINE,
- "queueEngine",
- sizeof("queueEngine") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ ATTRIBUTE_ID_QUEUE_ENGINE,
+ "queueEngine",
+ sizeof("queueEngine") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* LocalQueue::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *LocalQueue::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 1; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- LocalQueue::ATTRIBUTE_INFO_ARRAY[i];
+ LocalQueue::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -24570,36 +26995,38 @@ const bdlat_AttributeInfo* LocalQueue::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* LocalQueue::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *LocalQueue::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_QUEUE_ENGINE:
+ case ATTRIBUTE_ID_QUEUE_ENGINE:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_ENGINE];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-LocalQueue::LocalQueue(bslma::Allocator* basicAllocator)
+LocalQueue::LocalQueue(bslma::Allocator *basicAllocator)
: d_queueEngine(basicAllocator)
{
}
LocalQueue::LocalQueue(const LocalQueue& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_queueEngine(original.d_queueEngine, basicAllocator)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
LocalQueue::LocalQueue(LocalQueue&& original) noexcept
: d_queueEngine(bsl::move(original.d_queueEngine))
{
}
-LocalQueue::LocalQueue(LocalQueue&& original, bslma::Allocator* basicAllocator)
+LocalQueue::LocalQueue(LocalQueue&& original,
+ bslma::Allocator *basicAllocator)
: d_queueEngine(bsl::move(original.d_queueEngine), basicAllocator)
{
}
@@ -24611,7 +27038,8 @@ LocalQueue::~LocalQueue()
// MANIPULATORS
-LocalQueue& LocalQueue::operator=(const LocalQueue& rhs)
+LocalQueue&
+LocalQueue::operator=(const LocalQueue& rhs)
{
if (this != &rhs) {
d_queueEngine = rhs.d_queueEngine;
@@ -24620,9 +27048,10 @@ LocalQueue& LocalQueue::operator=(const LocalQueue& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-LocalQueue& LocalQueue::operator=(LocalQueue&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+LocalQueue&
+LocalQueue::operator=(LocalQueue&& rhs)
{
if (this != &rhs) {
d_queueEngine = bsl::move(rhs.d_queueEngine);
@@ -24639,8 +27068,9 @@ void LocalQueue::reset()
// ACCESSORS
-bsl::ostream&
-LocalQueue::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& LocalQueue::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
@@ -24649,57 +27079,74 @@ LocalQueue::print(bsl::ostream& stream, int level, int spacesPerLevel) const
return stream;
}
-// -----------------
-// class RemoteQueue
-// -----------------
+
+
+ // -----------------
+ // class RemoteQueue
+ // -----------------
// CONSTANTS
const char RemoteQueue::CLASS_NAME[] = "RemoteQueue";
const bdlat_AttributeInfo RemoteQueue::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_NUM_PENDING_PUTS,
- "numPendingPuts",
- sizeof("numPendingPuts") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_NUM_PENDING_CONFIRMS,
- "numPendingConfirms",
- sizeof("numPendingConfirms") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_IS_PUSH_EXPIRATION_TIMER_SCHEDULED,
- "isPushExpirationTimerScheduled",
- sizeof("isPushExpirationTimerScheduled") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_NUM_UPSTREAM_GENERATION,
- "numUpstreamGeneration",
- sizeof("numUpstreamGeneration") - 1,
- "",
- bdlat_FormattingMode::e_DEC},
- {ATTRIBUTE_ID_STREAMS,
- "streams",
- sizeof("streams") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {ATTRIBUTE_ID_QUEUE_ENGINE,
- "queueEngine",
- sizeof("queueEngine") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ ATTRIBUTE_ID_NUM_PENDING_PUTS,
+ "numPendingPuts",
+ sizeof("numPendingPuts") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_NUM_PENDING_CONFIRMS,
+ "numPendingConfirms",
+ sizeof("numPendingConfirms") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_IS_PUSH_EXPIRATION_TIMER_SCHEDULED,
+ "isPushExpirationTimerScheduled",
+ sizeof("isPushExpirationTimerScheduled") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_NUM_UPSTREAM_GENERATION,
+ "numUpstreamGeneration",
+ sizeof("numUpstreamGeneration") - 1,
+ "",
+ bdlat_FormattingMode::e_DEC
+ },
+ {
+ ATTRIBUTE_ID_STREAMS,
+ "streams",
+ sizeof("streams") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ ATTRIBUTE_ID_QUEUE_ENGINE,
+ "queueEngine",
+ sizeof("queueEngine") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo* RemoteQueue::lookupAttributeInfo(const char* name,
- int nameLength)
+const bdlat_AttributeInfo *RemoteQueue::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 6; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- RemoteQueue::ATTRIBUTE_INFO_ARRAY[i];
+ RemoteQueue::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -24707,29 +27154,29 @@ const bdlat_AttributeInfo* RemoteQueue::lookupAttributeInfo(const char* name,
return 0;
}
-const bdlat_AttributeInfo* RemoteQueue::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *RemoteQueue::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_NUM_PENDING_PUTS:
+ case ATTRIBUTE_ID_NUM_PENDING_PUTS:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_PENDING_PUTS];
- case ATTRIBUTE_ID_NUM_PENDING_CONFIRMS:
+ case ATTRIBUTE_ID_NUM_PENDING_CONFIRMS:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_PENDING_CONFIRMS];
- case ATTRIBUTE_ID_IS_PUSH_EXPIRATION_TIMER_SCHEDULED:
- return &ATTRIBUTE_INFO_ARRAY
- [ATTRIBUTE_INDEX_IS_PUSH_EXPIRATION_TIMER_SCHEDULED];
- case ATTRIBUTE_ID_NUM_UPSTREAM_GENERATION:
+ case ATTRIBUTE_ID_IS_PUSH_EXPIRATION_TIMER_SCHEDULED:
+ return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_PUSH_EXPIRATION_TIMER_SCHEDULED];
+ case ATTRIBUTE_ID_NUM_UPSTREAM_GENERATION:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_UPSTREAM_GENERATION];
- case ATTRIBUTE_ID_STREAMS:
+ case ATTRIBUTE_ID_STREAMS:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STREAMS];
- case ATTRIBUTE_ID_QUEUE_ENGINE:
+ case ATTRIBUTE_ID_QUEUE_ENGINE:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_ENGINE];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-RemoteQueue::RemoteQueue(bslma::Allocator* basicAllocator)
+RemoteQueue::RemoteQueue(bslma::Allocator *basicAllocator)
: d_numPendingPuts()
, d_numPendingConfirms()
, d_streams(basicAllocator)
@@ -24740,7 +27187,7 @@ RemoteQueue::RemoteQueue(bslma::Allocator* basicAllocator)
}
RemoteQueue::RemoteQueue(const RemoteQueue& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_numPendingPuts(original.d_numPendingPuts)
, d_numPendingConfirms(original.d_numPendingConfirms)
, d_streams(original.d_streams, basicAllocator)
@@ -24750,28 +27197,26 @@ RemoteQueue::RemoteQueue(const RemoteQueue& original,
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
RemoteQueue::RemoteQueue(RemoteQueue&& original) noexcept
-: d_numPendingPuts(bsl::move(original.d_numPendingPuts)),
- d_numPendingConfirms(bsl::move(original.d_numPendingConfirms)),
- d_streams(bsl::move(original.d_streams)),
- d_queueEngine(bsl::move(original.d_queueEngine)),
- d_numUpstreamGeneration(bsl::move(original.d_numUpstreamGeneration)),
- d_isPushExpirationTimerScheduled(
- bsl::move(original.d_isPushExpirationTimerScheduled))
+: d_numPendingPuts(bsl::move(original.d_numPendingPuts))
+, d_numPendingConfirms(bsl::move(original.d_numPendingConfirms))
+, d_streams(bsl::move(original.d_streams))
+, d_queueEngine(bsl::move(original.d_queueEngine))
+, d_numUpstreamGeneration(bsl::move(original.d_numUpstreamGeneration))
+, d_isPushExpirationTimerScheduled(bsl::move(original.d_isPushExpirationTimerScheduled))
{
}
-RemoteQueue::RemoteQueue(RemoteQueue&& original,
- bslma::Allocator* basicAllocator)
+RemoteQueue::RemoteQueue(RemoteQueue&& original,
+ bslma::Allocator *basicAllocator)
: d_numPendingPuts(bsl::move(original.d_numPendingPuts))
, d_numPendingConfirms(bsl::move(original.d_numPendingConfirms))
, d_streams(bsl::move(original.d_streams), basicAllocator)
, d_queueEngine(bsl::move(original.d_queueEngine), basicAllocator)
, d_numUpstreamGeneration(bsl::move(original.d_numUpstreamGeneration))
-, d_isPushExpirationTimerScheduled(
- bsl::move(original.d_isPushExpirationTimerScheduled))
+, d_isPushExpirationTimerScheduled(bsl::move(original.d_isPushExpirationTimerScheduled))
{
}
#endif
@@ -24782,33 +27227,33 @@ RemoteQueue::~RemoteQueue()
// MANIPULATORS
-RemoteQueue& RemoteQueue::operator=(const RemoteQueue& rhs)
+RemoteQueue&
+RemoteQueue::operator=(const RemoteQueue& rhs)
{
if (this != &rhs) {
- d_numPendingPuts = rhs.d_numPendingPuts;
+ d_numPendingPuts = rhs.d_numPendingPuts;
d_numPendingConfirms = rhs.d_numPendingConfirms;
- d_isPushExpirationTimerScheduled =
- rhs.d_isPushExpirationTimerScheduled;
+ d_isPushExpirationTimerScheduled = rhs.d_isPushExpirationTimerScheduled;
d_numUpstreamGeneration = rhs.d_numUpstreamGeneration;
- d_streams = rhs.d_streams;
- d_queueEngine = rhs.d_queueEngine;
+ d_streams = rhs.d_streams;
+ d_queueEngine = rhs.d_queueEngine;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-RemoteQueue& RemoteQueue::operator=(RemoteQueue&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+RemoteQueue&
+RemoteQueue::operator=(RemoteQueue&& rhs)
{
if (this != &rhs) {
- d_numPendingPuts = bsl::move(rhs.d_numPendingPuts);
- d_numPendingConfirms = bsl::move(rhs.d_numPendingConfirms);
- d_isPushExpirationTimerScheduled = bsl::move(
- rhs.d_isPushExpirationTimerScheduled);
+ d_numPendingPuts = bsl::move(rhs.d_numPendingPuts);
+ d_numPendingConfirms = bsl::move(rhs.d_numPendingConfirms);
+ d_isPushExpirationTimerScheduled = bsl::move(rhs.d_isPushExpirationTimerScheduled);
d_numUpstreamGeneration = bsl::move(rhs.d_numUpstreamGeneration);
- d_streams = bsl::move(rhs.d_streams);
- d_queueEngine = bsl::move(rhs.d_queueEngine);
+ d_streams = bsl::move(rhs.d_streams);
+ d_queueEngine = bsl::move(rhs.d_queueEngine);
}
return *this;
@@ -24827,59 +27272,69 @@ void RemoteQueue::reset()
// ACCESSORS
-bsl::ostream&
-RemoteQueue::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& RemoteQueue::print(bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
printer.printAttribute("numPendingPuts", this->numPendingPuts());
printer.printAttribute("numPendingConfirms", this->numPendingConfirms());
- printer.printAttribute("isPushExpirationTimerScheduled",
- this->isPushExpirationTimerScheduled());
- printer.printAttribute("numUpstreamGeneration",
- this->numUpstreamGeneration());
+ printer.printAttribute("isPushExpirationTimerScheduled", this->isPushExpirationTimerScheduled());
+ printer.printAttribute("numUpstreamGeneration", this->numUpstreamGeneration());
printer.printAttribute("streams", this->streams());
printer.printAttribute("queueEngine", this->queueEngine());
printer.end();
return stream;
}
-// -----------
-// class Queue
-// -----------
+
+
+ // -----------
+ // class Queue
+ // -----------
// CONSTANTS
const char Queue::CLASS_NAME[] = "Queue";
const bdlat_SelectionInfo Queue::SELECTION_INFO_ARRAY[] = {
- {SELECTION_ID_LOCAL_QUEUE,
- "localQueue",
- sizeof("localQueue") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_REMOTE_QUEUE,
- "remoteQueue",
- sizeof("remoteQueue") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_UNINITIALIZED_QUEUE,
- "uninitializedQueue",
- sizeof("uninitializedQueue") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ SELECTION_ID_LOCAL_QUEUE,
+ "localQueue",
+ sizeof("localQueue") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_REMOTE_QUEUE,
+ "remoteQueue",
+ sizeof("remoteQueue") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_UNINITIALIZED_QUEUE,
+ "uninitializedQueue",
+ sizeof("uninitializedQueue") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_SelectionInfo* Queue::lookupSelectionInfo(const char* name,
- int nameLength)
+const bdlat_SelectionInfo *Queue::lookupSelectionInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 3; ++i) {
const bdlat_SelectionInfo& selectionInfo =
- Queue::SELECTION_INFO_ARRAY[i];
+ Queue::SELECTION_INFO_ARRAY[i];
- if (nameLength == selectionInfo.d_nameLength &&
- 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength)) {
+ if (nameLength == selectionInfo.d_nameLength
+ && 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength))
+ {
return &selectionInfo;
}
}
@@ -24887,107 +27342,118 @@ const bdlat_SelectionInfo* Queue::lookupSelectionInfo(const char* name,
return 0;
}
-const bdlat_SelectionInfo* Queue::lookupSelectionInfo(int id)
+const bdlat_SelectionInfo *Queue::lookupSelectionInfo(int id)
{
switch (id) {
- case SELECTION_ID_LOCAL_QUEUE:
+ case SELECTION_ID_LOCAL_QUEUE:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_LOCAL_QUEUE];
- case SELECTION_ID_REMOTE_QUEUE:
+ case SELECTION_ID_REMOTE_QUEUE:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_REMOTE_QUEUE];
- case SELECTION_ID_UNINITIALIZED_QUEUE:
+ case SELECTION_ID_UNINITIALIZED_QUEUE:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_UNINITIALIZED_QUEUE];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-Queue::Queue(const Queue& original, bslma::Allocator* basicAllocator)
+Queue::Queue(
+ const Queue& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_LOCAL_QUEUE: {
+ case SELECTION_ID_LOCAL_QUEUE: {
new (d_localQueue.buffer())
- LocalQueue(original.d_localQueue.object(), d_allocator_p);
- } break;
- case SELECTION_ID_REMOTE_QUEUE: {
+ LocalQueue(
+ original.d_localQueue.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_REMOTE_QUEUE: {
new (d_remoteQueue.buffer())
- RemoteQueue(original.d_remoteQueue.object(), d_allocator_p);
- } break;
- case SELECTION_ID_UNINITIALIZED_QUEUE: {
+ RemoteQueue(
+ original.d_remoteQueue.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_UNINITIALIZED_QUEUE: {
new (d_uninitializedQueue.buffer())
UninitializedQueue(original.d_uninitializedQueue.object());
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Queue::Queue(Queue&& original) noexcept
-: d_selectionId(original.d_selectionId),
- d_allocator_p(original.d_allocator_p)
+: d_selectionId(original.d_selectionId)
+, d_allocator_p(original.d_allocator_p)
{
switch (d_selectionId) {
- case SELECTION_ID_LOCAL_QUEUE: {
+ case SELECTION_ID_LOCAL_QUEUE: {
new (d_localQueue.buffer())
- LocalQueue(bsl::move(original.d_localQueue.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_REMOTE_QUEUE: {
+ LocalQueue(
+ bsl::move(original.d_localQueue.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_REMOTE_QUEUE: {
new (d_remoteQueue.buffer())
- RemoteQueue(bsl::move(original.d_remoteQueue.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_UNINITIALIZED_QUEUE: {
- new (d_uninitializedQueue.buffer()) UninitializedQueue(
- bsl::move(original.d_uninitializedQueue.object()));
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ RemoteQueue(
+ bsl::move(original.d_remoteQueue.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_UNINITIALIZED_QUEUE: {
+ new (d_uninitializedQueue.buffer())
+ UninitializedQueue(bsl::move(original.d_uninitializedQueue.object()));
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-Queue::Queue(Queue&& original, bslma::Allocator* basicAllocator)
+Queue::Queue(
+ Queue&& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_LOCAL_QUEUE: {
+ case SELECTION_ID_LOCAL_QUEUE: {
new (d_localQueue.buffer())
- LocalQueue(bsl::move(original.d_localQueue.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_REMOTE_QUEUE: {
+ LocalQueue(
+ bsl::move(original.d_localQueue.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_REMOTE_QUEUE: {
new (d_remoteQueue.buffer())
- RemoteQueue(bsl::move(original.d_remoteQueue.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_UNINITIALIZED_QUEUE: {
- new (d_uninitializedQueue.buffer()) UninitializedQueue(
- bsl::move(original.d_uninitializedQueue.object()));
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ RemoteQueue(
+ bsl::move(original.d_remoteQueue.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_UNINITIALIZED_QUEUE: {
+ new (d_uninitializedQueue.buffer())
+ UninitializedQueue(bsl::move(original.d_uninitializedQueue.object()));
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
#endif
// MANIPULATORS
-Queue& Queue::operator=(const Queue& rhs)
+Queue&
+Queue::operator=(const Queue& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_LOCAL_QUEUE: {
+ case SELECTION_ID_LOCAL_QUEUE: {
makeLocalQueue(rhs.d_localQueue.object());
- } break;
- case SELECTION_ID_REMOTE_QUEUE: {
+ } break;
+ case SELECTION_ID_REMOTE_QUEUE: {
makeRemoteQueue(rhs.d_remoteQueue.object());
- } break;
- case SELECTION_ID_UNINITIALIZED_QUEUE: {
+ } break;
+ case SELECTION_ID_UNINITIALIZED_QUEUE: {
makeUninitializedQueue(rhs.d_uninitializedQueue.object());
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -24996,23 +27462,23 @@ Queue& Queue::operator=(const Queue& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-Queue& Queue::operator=(Queue&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+Queue&
+Queue::operator=(Queue&& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_LOCAL_QUEUE: {
+ case SELECTION_ID_LOCAL_QUEUE: {
makeLocalQueue(bsl::move(rhs.d_localQueue.object()));
- } break;
- case SELECTION_ID_REMOTE_QUEUE: {
+ } break;
+ case SELECTION_ID_REMOTE_QUEUE: {
makeRemoteQueue(bsl::move(rhs.d_remoteQueue.object()));
- } break;
- case SELECTION_ID_UNINITIALIZED_QUEUE: {
- makeUninitializedQueue(
- bsl::move(rhs.d_uninitializedQueue.object()));
- } break;
- default:
+ } break;
+ case SELECTION_ID_UNINITIALIZED_QUEUE: {
+ makeUninitializedQueue(bsl::move(rhs.d_uninitializedQueue.object()));
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -25025,16 +27491,17 @@ Queue& Queue::operator=(Queue&& rhs)
void Queue::reset()
{
switch (d_selectionId) {
- case SELECTION_ID_LOCAL_QUEUE: {
+ case SELECTION_ID_LOCAL_QUEUE: {
d_localQueue.object().~LocalQueue();
- } break;
- case SELECTION_ID_REMOTE_QUEUE: {
+ } break;
+ case SELECTION_ID_REMOTE_QUEUE: {
d_remoteQueue.object().~RemoteQueue();
- } break;
- case SELECTION_ID_UNINITIALIZED_QUEUE: {
+ } break;
+ case SELECTION_ID_UNINITIALIZED_QUEUE: {
d_uninitializedQueue.object().~UninitializedQueue();
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
d_selectionId = SELECTION_ID_UNDEFINED;
@@ -25043,29 +27510,30 @@ void Queue::reset()
int Queue::makeSelection(int selectionId)
{
switch (selectionId) {
- case SELECTION_ID_LOCAL_QUEUE: {
+ case SELECTION_ID_LOCAL_QUEUE: {
makeLocalQueue();
- } break;
- case SELECTION_ID_REMOTE_QUEUE: {
+ } break;
+ case SELECTION_ID_REMOTE_QUEUE: {
makeRemoteQueue();
- } break;
- case SELECTION_ID_UNINITIALIZED_QUEUE: {
+ } break;
+ case SELECTION_ID_UNINITIALIZED_QUEUE: {
makeUninitializedQueue();
- } break;
- case SELECTION_ID_UNDEFINED: {
+ } break;
+ case SELECTION_ID_UNDEFINED: {
reset();
- } break;
- default: return -1;
+ } break;
+ default:
+ return -1;
}
return 0;
}
-int Queue::makeSelection(const char* name, int nameLength)
+int Queue::makeSelection(const char *name, int nameLength)
{
- const bdlat_SelectionInfo* selectionInfo = lookupSelectionInfo(name,
- nameLength);
+ const bdlat_SelectionInfo *selectionInfo =
+ lookupSelectionInfo(name, nameLength);
if (0 == selectionInfo) {
- return -1;
+ return -1;
}
return makeSelection(selectionInfo->d_id);
@@ -25078,7 +27546,8 @@ LocalQueue& Queue::makeLocalQueue()
}
else {
reset();
- new (d_localQueue.buffer()) LocalQueue(d_allocator_p);
+ new (d_localQueue.buffer())
+ LocalQueue(d_allocator_p);
d_selectionId = SELECTION_ID_LOCAL_QUEUE;
}
@@ -25092,15 +27561,16 @@ LocalQueue& Queue::makeLocalQueue(const LocalQueue& value)
}
else {
reset();
- new (d_localQueue.buffer()) LocalQueue(value, d_allocator_p);
+ new (d_localQueue.buffer())
+ LocalQueue(value, d_allocator_p);
d_selectionId = SELECTION_ID_LOCAL_QUEUE;
}
return d_localQueue.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
LocalQueue& Queue::makeLocalQueue(LocalQueue&& value)
{
if (SELECTION_ID_LOCAL_QUEUE == d_selectionId) {
@@ -25109,7 +27579,7 @@ LocalQueue& Queue::makeLocalQueue(LocalQueue&& value)
else {
reset();
new (d_localQueue.buffer())
- LocalQueue(bsl::move(value), d_allocator_p);
+ LocalQueue(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_LOCAL_QUEUE;
}
@@ -25124,7 +27594,8 @@ RemoteQueue& Queue::makeRemoteQueue()
}
else {
reset();
- new (d_remoteQueue.buffer()) RemoteQueue(d_allocator_p);
+ new (d_remoteQueue.buffer())
+ RemoteQueue(d_allocator_p);
d_selectionId = SELECTION_ID_REMOTE_QUEUE;
}
@@ -25138,15 +27609,16 @@ RemoteQueue& Queue::makeRemoteQueue(const RemoteQueue& value)
}
else {
reset();
- new (d_remoteQueue.buffer()) RemoteQueue(value, d_allocator_p);
+ new (d_remoteQueue.buffer())
+ RemoteQueue(value, d_allocator_p);
d_selectionId = SELECTION_ID_REMOTE_QUEUE;
}
return d_remoteQueue.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
RemoteQueue& Queue::makeRemoteQueue(RemoteQueue&& value)
{
if (SELECTION_ID_REMOTE_QUEUE == d_selectionId) {
@@ -25155,7 +27627,7 @@ RemoteQueue& Queue::makeRemoteQueue(RemoteQueue&& value)
else {
reset();
new (d_remoteQueue.buffer())
- RemoteQueue(bsl::move(value), d_allocator_p);
+ RemoteQueue(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_REMOTE_QUEUE;
}
@@ -25170,30 +27642,31 @@ UninitializedQueue& Queue::makeUninitializedQueue()
}
else {
reset();
- new (d_uninitializedQueue.buffer()) UninitializedQueue();
+ new (d_uninitializedQueue.buffer())
+ UninitializedQueue();
d_selectionId = SELECTION_ID_UNINITIALIZED_QUEUE;
}
return d_uninitializedQueue.object();
}
-UninitializedQueue&
-Queue::makeUninitializedQueue(const UninitializedQueue& value)
+UninitializedQueue& Queue::makeUninitializedQueue(const UninitializedQueue& value)
{
if (SELECTION_ID_UNINITIALIZED_QUEUE == d_selectionId) {
d_uninitializedQueue.object() = value;
}
else {
reset();
- new (d_uninitializedQueue.buffer()) UninitializedQueue(value);
+ new (d_uninitializedQueue.buffer())
+ UninitializedQueue(value);
d_selectionId = SELECTION_ID_UNINITIALIZED_QUEUE;
}
return d_uninitializedQueue.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
UninitializedQueue& Queue::makeUninitializedQueue(UninitializedQueue&& value)
{
if (SELECTION_ID_UNINITIALIZED_QUEUE == d_selectionId) {
@@ -25202,7 +27675,7 @@ UninitializedQueue& Queue::makeUninitializedQueue(UninitializedQueue&& value)
else {
reset();
new (d_uninitializedQueue.buffer())
- UninitializedQueue(bsl::move(value));
+ UninitializedQueue(bsl::move(value));
d_selectionId = SELECTION_ID_UNINITIALIZED_QUEUE;
}
@@ -25212,75 +27685,84 @@ UninitializedQueue& Queue::makeUninitializedQueue(UninitializedQueue&& value)
// ACCESSORS
-bsl::ostream&
-Queue::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& Queue::print(
+ bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
switch (d_selectionId) {
- case SELECTION_ID_LOCAL_QUEUE: {
+ case SELECTION_ID_LOCAL_QUEUE: {
printer.printAttribute("localQueue", d_localQueue.object());
- } break;
- case SELECTION_ID_REMOTE_QUEUE: {
+ } break;
+ case SELECTION_ID_REMOTE_QUEUE: {
printer.printAttribute("remoteQueue", d_remoteQueue.object());
- } break;
- case SELECTION_ID_UNINITIALIZED_QUEUE: {
- printer.printAttribute("uninitializedQueue",
- d_uninitializedQueue.object());
- } break;
- default: stream << "SELECTION UNDEFINED\n";
+ } break;
+ case SELECTION_ID_UNINITIALIZED_QUEUE: {
+ printer.printAttribute("uninitializedQueue", d_uninitializedQueue.object());
+ } break;
+ default:
+ stream << "SELECTION UNDEFINED\n";
}
printer.end();
return stream;
}
-const char* Queue::selectionName() const
+
+const char *Queue::selectionName() const
{
switch (d_selectionId) {
- case SELECTION_ID_LOCAL_QUEUE:
+ case SELECTION_ID_LOCAL_QUEUE:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_LOCAL_QUEUE].name();
- case SELECTION_ID_REMOTE_QUEUE:
+ case SELECTION_ID_REMOTE_QUEUE:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_REMOTE_QUEUE].name();
- case SELECTION_ID_UNINITIALIZED_QUEUE:
- return SELECTION_INFO_ARRAY[SELECTION_INDEX_UNINITIALIZED_QUEUE]
- .name();
- default:
+ case SELECTION_ID_UNINITIALIZED_QUEUE:
+ return SELECTION_INFO_ARRAY[SELECTION_INDEX_UNINITIALIZED_QUEUE].name();
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
return "(* UNDEFINED *)";
}
}
-// --------------------
-// class QueueInternals
-// --------------------
+ // --------------------
+ // class QueueInternals
+ // --------------------
// CONSTANTS
const char QueueInternals::CLASS_NAME[] = "QueueInternals";
const bdlat_AttributeInfo QueueInternals::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_STATE,
- "state",
- sizeof("state") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {ATTRIBUTE_ID_QUEUE,
- "queue",
- sizeof("queue") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ ATTRIBUTE_ID_STATE,
+ "state",
+ sizeof("state") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ ATTRIBUTE_ID_QUEUE,
+ "queue",
+ sizeof("queue") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo*
-QueueInternals::lookupAttributeInfo(const char* name, int nameLength)
+const bdlat_AttributeInfo *QueueInternals::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 2; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- QueueInternals::ATTRIBUTE_INFO_ARRAY[i];
+ QueueInternals::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -25288,42 +27770,43 @@ QueueInternals::lookupAttributeInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_AttributeInfo* QueueInternals::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *QueueInternals::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_STATE:
+ case ATTRIBUTE_ID_STATE:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STATE];
- case ATTRIBUTE_ID_QUEUE:
+ case ATTRIBUTE_ID_QUEUE:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-QueueInternals::QueueInternals(bslma::Allocator* basicAllocator)
+QueueInternals::QueueInternals(bslma::Allocator *basicAllocator)
: d_state(basicAllocator)
, d_queue(basicAllocator)
{
}
QueueInternals::QueueInternals(const QueueInternals& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_state(original.d_state, basicAllocator)
, d_queue(original.d_queue, basicAllocator)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
QueueInternals::QueueInternals(QueueInternals&& original) noexcept
-: d_state(bsl::move(original.d_state)),
- d_queue(bsl::move(original.d_queue))
+: d_state(bsl::move(original.d_state))
+, d_queue(bsl::move(original.d_queue))
{
}
-QueueInternals::QueueInternals(QueueInternals&& original,
- bslma::Allocator* basicAllocator)
+QueueInternals::QueueInternals(QueueInternals&& original,
+ bslma::Allocator *basicAllocator)
: d_state(bsl::move(original.d_state), basicAllocator)
, d_queue(bsl::move(original.d_queue), basicAllocator)
{
@@ -25336,7 +27819,8 @@ QueueInternals::~QueueInternals()
// MANIPULATORS
-QueueInternals& QueueInternals::operator=(const QueueInternals& rhs)
+QueueInternals&
+QueueInternals::operator=(const QueueInternals& rhs)
{
if (this != &rhs) {
d_state = rhs.d_state;
@@ -25346,9 +27830,10 @@ QueueInternals& QueueInternals::operator=(const QueueInternals& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-QueueInternals& QueueInternals::operator=(QueueInternals&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+QueueInternals&
+QueueInternals::operator=(QueueInternals&& rhs)
{
if (this != &rhs) {
d_state = bsl::move(rhs.d_state);
@@ -25379,47 +27864,60 @@ bsl::ostream& QueueInternals::print(bsl::ostream& stream,
return stream;
}
-// -----------------
-// class QueueResult
-// -----------------
+
+
+ // -----------------
+ // class QueueResult
+ // -----------------
// CONSTANTS
const char QueueResult::CLASS_NAME[] = "QueueResult";
const bdlat_SelectionInfo QueueResult::SELECTION_INFO_ARRAY[] = {
- {SELECTION_ID_ERROR,
- "error",
- sizeof("error") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_PURGED_QUEUES,
- "purgedQueues",
- sizeof("purgedQueues") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_QUEUE_CONTENTS,
- "queueContents",
- sizeof("queueContents") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_QUEUE_INTERNALS,
- "queueInternals",
- sizeof("queueInternals") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ SELECTION_ID_ERROR,
+ "error",
+ sizeof("error") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_PURGED_QUEUES,
+ "purgedQueues",
+ sizeof("purgedQueues") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_QUEUE_CONTENTS,
+ "queueContents",
+ sizeof("queueContents") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_QUEUE_INTERNALS,
+ "queueInternals",
+ sizeof("queueInternals") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_SelectionInfo* QueueResult::lookupSelectionInfo(const char* name,
- int nameLength)
+const bdlat_SelectionInfo *QueueResult::lookupSelectionInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 4; ++i) {
const bdlat_SelectionInfo& selectionInfo =
- QueueResult::SELECTION_INFO_ARRAY[i];
+ QueueResult::SELECTION_INFO_ARRAY[i];
- if (nameLength == selectionInfo.d_nameLength &&
- 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength)) {
+ if (nameLength == selectionInfo.d_nameLength
+ && 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength))
+ {
return &selectionInfo;
}
}
@@ -25427,127 +27925,141 @@ const bdlat_SelectionInfo* QueueResult::lookupSelectionInfo(const char* name,
return 0;
}
-const bdlat_SelectionInfo* QueueResult::lookupSelectionInfo(int id)
+const bdlat_SelectionInfo *QueueResult::lookupSelectionInfo(int id)
{
switch (id) {
- case SELECTION_ID_ERROR:
+ case SELECTION_ID_ERROR:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR];
- case SELECTION_ID_PURGED_QUEUES:
+ case SELECTION_ID_PURGED_QUEUES:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_PURGED_QUEUES];
- case SELECTION_ID_QUEUE_CONTENTS:
+ case SELECTION_ID_QUEUE_CONTENTS:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE_CONTENTS];
- case SELECTION_ID_QUEUE_INTERNALS:
+ case SELECTION_ID_QUEUE_INTERNALS:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE_INTERNALS];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-QueueResult::QueueResult(const QueueResult& original,
- bslma::Allocator* basicAllocator)
+QueueResult::QueueResult(
+ const QueueResult& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_ERROR: {
- new (d_error.buffer()) Error(original.d_error.object(), d_allocator_p);
- } break;
- case SELECTION_ID_PURGED_QUEUES: {
+ case SELECTION_ID_ERROR: {
+ new (d_error.buffer())
+ Error(
+ original.d_error.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_PURGED_QUEUES: {
new (d_purgedQueues.buffer())
- PurgedQueues(original.d_purgedQueues.object(), d_allocator_p);
- } break;
- case SELECTION_ID_QUEUE_CONTENTS: {
+ PurgedQueues(
+ original.d_purgedQueues.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_QUEUE_CONTENTS: {
new (d_queueContents.buffer())
- QueueContents(original.d_queueContents.object(), d_allocator_p);
- } break;
- case SELECTION_ID_QUEUE_INTERNALS: {
+ QueueContents(
+ original.d_queueContents.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_QUEUE_INTERNALS: {
new (d_queueInternals.buffer())
- QueueInternals(original.d_queueInternals.object(), d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ QueueInternals(
+ original.d_queueInternals.object(), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
QueueResult::QueueResult(QueueResult&& original) noexcept
-: d_selectionId(original.d_selectionId),
- d_allocator_p(original.d_allocator_p)
+: d_selectionId(original.d_selectionId)
+, d_allocator_p(original.d_allocator_p)
{
switch (d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
new (d_error.buffer())
- Error(bsl::move(original.d_error.object()), d_allocator_p);
- } break;
- case SELECTION_ID_PURGED_QUEUES: {
+ Error(
+ bsl::move(original.d_error.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_PURGED_QUEUES: {
new (d_purgedQueues.buffer())
- PurgedQueues(bsl::move(original.d_purgedQueues.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_QUEUE_CONTENTS: {
+ PurgedQueues(
+ bsl::move(original.d_purgedQueues.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_QUEUE_CONTENTS: {
new (d_queueContents.buffer())
- QueueContents(bsl::move(original.d_queueContents.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_QUEUE_INTERNALS: {
+ QueueContents(
+ bsl::move(original.d_queueContents.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_QUEUE_INTERNALS: {
new (d_queueInternals.buffer())
- QueueInternals(bsl::move(original.d_queueInternals.object()),
- d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ QueueInternals(
+ bsl::move(original.d_queueInternals.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-QueueResult::QueueResult(QueueResult&& original,
- bslma::Allocator* basicAllocator)
+QueueResult::QueueResult(
+ QueueResult&& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
new (d_error.buffer())
- Error(bsl::move(original.d_error.object()), d_allocator_p);
- } break;
- case SELECTION_ID_PURGED_QUEUES: {
+ Error(
+ bsl::move(original.d_error.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_PURGED_QUEUES: {
new (d_purgedQueues.buffer())
- PurgedQueues(bsl::move(original.d_purgedQueues.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_QUEUE_CONTENTS: {
+ PurgedQueues(
+ bsl::move(original.d_purgedQueues.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_QUEUE_CONTENTS: {
new (d_queueContents.buffer())
- QueueContents(bsl::move(original.d_queueContents.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_QUEUE_INTERNALS: {
+ QueueContents(
+ bsl::move(original.d_queueContents.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_QUEUE_INTERNALS: {
new (d_queueInternals.buffer())
- QueueInternals(bsl::move(original.d_queueInternals.object()),
- d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ QueueInternals(
+ bsl::move(original.d_queueInternals.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
#endif
// MANIPULATORS
-QueueResult& QueueResult::operator=(const QueueResult& rhs)
+QueueResult&
+QueueResult::operator=(const QueueResult& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
makeError(rhs.d_error.object());
- } break;
- case SELECTION_ID_PURGED_QUEUES: {
+ } break;
+ case SELECTION_ID_PURGED_QUEUES: {
makePurgedQueues(rhs.d_purgedQueues.object());
- } break;
- case SELECTION_ID_QUEUE_CONTENTS: {
+ } break;
+ case SELECTION_ID_QUEUE_CONTENTS: {
makeQueueContents(rhs.d_queueContents.object());
- } break;
- case SELECTION_ID_QUEUE_INTERNALS: {
+ } break;
+ case SELECTION_ID_QUEUE_INTERNALS: {
makeQueueInternals(rhs.d_queueInternals.object());
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -25556,25 +28068,26 @@ QueueResult& QueueResult::operator=(const QueueResult& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-QueueResult& QueueResult::operator=(QueueResult&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+QueueResult&
+QueueResult::operator=(QueueResult&& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
makeError(bsl::move(rhs.d_error.object()));
- } break;
- case SELECTION_ID_PURGED_QUEUES: {
+ } break;
+ case SELECTION_ID_PURGED_QUEUES: {
makePurgedQueues(bsl::move(rhs.d_purgedQueues.object()));
- } break;
- case SELECTION_ID_QUEUE_CONTENTS: {
+ } break;
+ case SELECTION_ID_QUEUE_CONTENTS: {
makeQueueContents(bsl::move(rhs.d_queueContents.object()));
- } break;
- case SELECTION_ID_QUEUE_INTERNALS: {
+ } break;
+ case SELECTION_ID_QUEUE_INTERNALS: {
makeQueueInternals(bsl::move(rhs.d_queueInternals.object()));
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -25587,19 +28100,20 @@ QueueResult& QueueResult::operator=(QueueResult&& rhs)
void QueueResult::reset()
{
switch (d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
d_error.object().~Error();
- } break;
- case SELECTION_ID_PURGED_QUEUES: {
+ } break;
+ case SELECTION_ID_PURGED_QUEUES: {
d_purgedQueues.object().~PurgedQueues();
- } break;
- case SELECTION_ID_QUEUE_CONTENTS: {
+ } break;
+ case SELECTION_ID_QUEUE_CONTENTS: {
d_queueContents.object().~QueueContents();
- } break;
- case SELECTION_ID_QUEUE_INTERNALS: {
+ } break;
+ case SELECTION_ID_QUEUE_INTERNALS: {
d_queueInternals.object().~QueueInternals();
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
d_selectionId = SELECTION_ID_UNDEFINED;
@@ -25608,32 +28122,33 @@ void QueueResult::reset()
int QueueResult::makeSelection(int selectionId)
{
switch (selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
makeError();
- } break;
- case SELECTION_ID_PURGED_QUEUES: {
+ } break;
+ case SELECTION_ID_PURGED_QUEUES: {
makePurgedQueues();
- } break;
- case SELECTION_ID_QUEUE_CONTENTS: {
+ } break;
+ case SELECTION_ID_QUEUE_CONTENTS: {
makeQueueContents();
- } break;
- case SELECTION_ID_QUEUE_INTERNALS: {
+ } break;
+ case SELECTION_ID_QUEUE_INTERNALS: {
makeQueueInternals();
- } break;
- case SELECTION_ID_UNDEFINED: {
+ } break;
+ case SELECTION_ID_UNDEFINED: {
reset();
- } break;
- default: return -1;
+ } break;
+ default:
+ return -1;
}
return 0;
}
-int QueueResult::makeSelection(const char* name, int nameLength)
+int QueueResult::makeSelection(const char *name, int nameLength)
{
- const bdlat_SelectionInfo* selectionInfo = lookupSelectionInfo(name,
- nameLength);
+ const bdlat_SelectionInfo *selectionInfo =
+ lookupSelectionInfo(name, nameLength);
if (0 == selectionInfo) {
- return -1;
+ return -1;
}
return makeSelection(selectionInfo->d_id);
@@ -25646,7 +28161,8 @@ Error& QueueResult::makeError()
}
else {
reset();
- new (d_error.buffer()) Error(d_allocator_p);
+ new (d_error.buffer())
+ Error(d_allocator_p);
d_selectionId = SELECTION_ID_ERROR;
}
@@ -25660,15 +28176,16 @@ Error& QueueResult::makeError(const Error& value)
}
else {
reset();
- new (d_error.buffer()) Error(value, d_allocator_p);
+ new (d_error.buffer())
+ Error(value, d_allocator_p);
d_selectionId = SELECTION_ID_ERROR;
}
return d_error.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Error& QueueResult::makeError(Error&& value)
{
if (SELECTION_ID_ERROR == d_selectionId) {
@@ -25676,7 +28193,8 @@ Error& QueueResult::makeError(Error&& value)
}
else {
reset();
- new (d_error.buffer()) Error(bsl::move(value), d_allocator_p);
+ new (d_error.buffer())
+ Error(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_ERROR;
}
@@ -25691,7 +28209,8 @@ PurgedQueues& QueueResult::makePurgedQueues()
}
else {
reset();
- new (d_purgedQueues.buffer()) PurgedQueues(d_allocator_p);
+ new (d_purgedQueues.buffer())
+ PurgedQueues(d_allocator_p);
d_selectionId = SELECTION_ID_PURGED_QUEUES;
}
@@ -25705,15 +28224,16 @@ PurgedQueues& QueueResult::makePurgedQueues(const PurgedQueues& value)
}
else {
reset();
- new (d_purgedQueues.buffer()) PurgedQueues(value, d_allocator_p);
+ new (d_purgedQueues.buffer())
+ PurgedQueues(value, d_allocator_p);
d_selectionId = SELECTION_ID_PURGED_QUEUES;
}
return d_purgedQueues.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
PurgedQueues& QueueResult::makePurgedQueues(PurgedQueues&& value)
{
if (SELECTION_ID_PURGED_QUEUES == d_selectionId) {
@@ -25722,7 +28242,7 @@ PurgedQueues& QueueResult::makePurgedQueues(PurgedQueues&& value)
else {
reset();
new (d_purgedQueues.buffer())
- PurgedQueues(bsl::move(value), d_allocator_p);
+ PurgedQueues(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_PURGED_QUEUES;
}
@@ -25737,7 +28257,8 @@ QueueContents& QueueResult::makeQueueContents()
}
else {
reset();
- new (d_queueContents.buffer()) QueueContents(d_allocator_p);
+ new (d_queueContents.buffer())
+ QueueContents(d_allocator_p);
d_selectionId = SELECTION_ID_QUEUE_CONTENTS;
}
@@ -25751,15 +28272,16 @@ QueueContents& QueueResult::makeQueueContents(const QueueContents& value)
}
else {
reset();
- new (d_queueContents.buffer()) QueueContents(value, d_allocator_p);
+ new (d_queueContents.buffer())
+ QueueContents(value, d_allocator_p);
d_selectionId = SELECTION_ID_QUEUE_CONTENTS;
}
return d_queueContents.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
QueueContents& QueueResult::makeQueueContents(QueueContents&& value)
{
if (SELECTION_ID_QUEUE_CONTENTS == d_selectionId) {
@@ -25768,7 +28290,7 @@ QueueContents& QueueResult::makeQueueContents(QueueContents&& value)
else {
reset();
new (d_queueContents.buffer())
- QueueContents(bsl::move(value), d_allocator_p);
+ QueueContents(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_QUEUE_CONTENTS;
}
@@ -25783,7 +28305,8 @@ QueueInternals& QueueResult::makeQueueInternals()
}
else {
reset();
- new (d_queueInternals.buffer()) QueueInternals(d_allocator_p);
+ new (d_queueInternals.buffer())
+ QueueInternals(d_allocator_p);
d_selectionId = SELECTION_ID_QUEUE_INTERNALS;
}
@@ -25797,15 +28320,16 @@ QueueInternals& QueueResult::makeQueueInternals(const QueueInternals& value)
}
else {
reset();
- new (d_queueInternals.buffer()) QueueInternals(value, d_allocator_p);
+ new (d_queueInternals.buffer())
+ QueueInternals(value, d_allocator_p);
d_selectionId = SELECTION_ID_QUEUE_INTERNALS;
}
return d_queueInternals.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
QueueInternals& QueueResult::makeQueueInternals(QueueInternals&& value)
{
if (SELECTION_ID_QUEUE_INTERNALS == d_selectionId) {
@@ -25814,7 +28338,7 @@ QueueInternals& QueueResult::makeQueueInternals(QueueInternals&& value)
else {
reset();
new (d_queueInternals.buffer())
- QueueInternals(bsl::move(value), d_allocator_p);
+ QueueInternals(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_QUEUE_INTERNALS;
}
@@ -25824,193 +28348,250 @@ QueueInternals& QueueResult::makeQueueInternals(QueueInternals&& value)
// ACCESSORS
-bsl::ostream&
-QueueResult::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& QueueResult::print(
+ bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
switch (d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
printer.printAttribute("error", d_error.object());
- } break;
- case SELECTION_ID_PURGED_QUEUES: {
+ } break;
+ case SELECTION_ID_PURGED_QUEUES: {
printer.printAttribute("purgedQueues", d_purgedQueues.object());
- } break;
- case SELECTION_ID_QUEUE_CONTENTS: {
+ } break;
+ case SELECTION_ID_QUEUE_CONTENTS: {
printer.printAttribute("queueContents", d_queueContents.object());
- } break;
- case SELECTION_ID_QUEUE_INTERNALS: {
+ } break;
+ case SELECTION_ID_QUEUE_INTERNALS: {
printer.printAttribute("queueInternals", d_queueInternals.object());
- } break;
- default: stream << "SELECTION UNDEFINED\n";
+ } break;
+ default:
+ stream << "SELECTION UNDEFINED\n";
}
printer.end();
return stream;
}
-const char* QueueResult::selectionName() const
+
+const char *QueueResult::selectionName() const
{
switch (d_selectionId) {
- case SELECTION_ID_ERROR:
+ case SELECTION_ID_ERROR:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR].name();
- case SELECTION_ID_PURGED_QUEUES:
+ case SELECTION_ID_PURGED_QUEUES:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_PURGED_QUEUES].name();
- case SELECTION_ID_QUEUE_CONTENTS:
+ case SELECTION_ID_QUEUE_CONTENTS:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE_CONTENTS].name();
- case SELECTION_ID_QUEUE_INTERNALS:
+ case SELECTION_ID_QUEUE_INTERNALS:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE_INTERNALS].name();
- default:
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
return "(* UNDEFINED *)";
}
}
-// ------------
-// class Result
-// ------------
+ // ------------
+ // class Result
+ // ------------
// CONSTANTS
const char Result::CLASS_NAME[] = "Result";
const bdlat_SelectionInfo Result::SELECTION_INFO_ARRAY[] = {
- {SELECTION_ID_ERROR,
- "error",
- sizeof("error") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_SUCCESS,
- "success",
- sizeof("success") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_VALUE,
- "value",
- sizeof("value") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_TUNABLE,
- "tunable",
- sizeof("tunable") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_TUNABLES,
- "tunables",
- sizeof("tunables") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_TUNABLE_CONFIRMATION,
- "tunableConfirmation",
- sizeof("tunableConfirmation") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_HELP,
- "help",
- sizeof("help") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_DOMAIN_INFO,
- "domainInfo",
- sizeof("domainInfo") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_PURGED_QUEUES,
- "purgedQueues",
- sizeof("purgedQueues") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_QUEUE_INTERNALS,
- "queueInternals",
- sizeof("queueInternals") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_MESSAGE_GROUP_ID_HELPER,
- "messageGroupIdHelper",
- sizeof("messageGroupIdHelper") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_QUEUE_CONTENTS,
- "queueContents",
- sizeof("queueContents") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_MESSAGE,
- "message",
- sizeof("message") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_STATS,
- "stats",
- sizeof("stats") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {SELECTION_ID_CLUSTER_LIST,
- "clusterList",
- sizeof("clusterList") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_CLUSTER_STATUS,
- "clusterStatus",
- sizeof("clusterStatus") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_CLUSTER_PROXY_STATUS,
- "clusterProxyStatus",
- sizeof("clusterProxyStatus") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_NODE_STATUSES,
- "nodeStatuses",
- sizeof("nodeStatuses") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_ELECTOR_INFO,
- "electorInfo",
- sizeof("electorInfo") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_PARTITIONS_INFO,
- "partitionsInfo",
- sizeof("partitionsInfo") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_CLUSTER_QUEUE_HELPER,
- "clusterQueueHelper",
- sizeof("clusterQueueHelper") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_STORAGE_CONTENT,
- "storageContent",
- sizeof("storageContent") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_CLUSTER_STORAGE_SUMMARY,
- "clusterStorageSummary",
- sizeof("clusterStorageSummary") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES,
- "clusterDomainQueueStatuses",
- sizeof("clusterDomainQueueStatuses") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_BROKER_CONFIG,
- "brokerConfig",
- sizeof("brokerConfig") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ SELECTION_ID_ERROR,
+ "error",
+ sizeof("error") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_SUCCESS,
+ "success",
+ sizeof("success") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_VALUE,
+ "value",
+ sizeof("value") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_TUNABLE,
+ "tunable",
+ sizeof("tunable") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_TUNABLES,
+ "tunables",
+ sizeof("tunables") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_TUNABLE_CONFIRMATION,
+ "tunableConfirmation",
+ sizeof("tunableConfirmation") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_HELP,
+ "help",
+ sizeof("help") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_DOMAIN_INFO,
+ "domainInfo",
+ sizeof("domainInfo") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_PURGED_QUEUES,
+ "purgedQueues",
+ sizeof("purgedQueues") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_QUEUE_INTERNALS,
+ "queueInternals",
+ sizeof("queueInternals") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_MESSAGE_GROUP_ID_HELPER,
+ "messageGroupIdHelper",
+ sizeof("messageGroupIdHelper") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_QUEUE_CONTENTS,
+ "queueContents",
+ sizeof("queueContents") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_MESSAGE,
+ "message",
+ sizeof("message") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_STATS,
+ "stats",
+ sizeof("stats") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ SELECTION_ID_CLUSTER_LIST,
+ "clusterList",
+ sizeof("clusterList") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_CLUSTER_STATUS,
+ "clusterStatus",
+ sizeof("clusterStatus") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_CLUSTER_PROXY_STATUS,
+ "clusterProxyStatus",
+ sizeof("clusterProxyStatus") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_NODE_STATUSES,
+ "nodeStatuses",
+ sizeof("nodeStatuses") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_ELECTOR_INFO,
+ "electorInfo",
+ sizeof("electorInfo") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_PARTITIONS_INFO,
+ "partitionsInfo",
+ sizeof("partitionsInfo") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_CLUSTER_QUEUE_HELPER,
+ "clusterQueueHelper",
+ sizeof("clusterQueueHelper") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_STORAGE_CONTENT,
+ "storageContent",
+ sizeof("storageContent") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_CLUSTER_STORAGE_SUMMARY,
+ "clusterStorageSummary",
+ sizeof("clusterStorageSummary") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES,
+ "clusterDomainQueueStatuses",
+ sizeof("clusterDomainQueueStatuses") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_BROKER_CONFIG,
+ "brokerConfig",
+ sizeof("brokerConfig") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_SelectionInfo* Result::lookupSelectionInfo(const char* name,
- int nameLength)
+const bdlat_SelectionInfo *Result::lookupSelectionInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 25; ++i) {
const bdlat_SelectionInfo& selectionInfo =
- Result::SELECTION_INFO_ARRAY[i];
+ Result::SELECTION_INFO_ARRAY[i];
- if (nameLength == selectionInfo.d_nameLength &&
- 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength)) {
+ if (nameLength == selectionInfo.d_nameLength
+ && 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength))
+ {
return &selectionInfo;
}
}
@@ -26018,512 +28599,558 @@ const bdlat_SelectionInfo* Result::lookupSelectionInfo(const char* name,
return 0;
}
-const bdlat_SelectionInfo* Result::lookupSelectionInfo(int id)
+const bdlat_SelectionInfo *Result::lookupSelectionInfo(int id)
{
switch (id) {
- case SELECTION_ID_ERROR:
+ case SELECTION_ID_ERROR:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR];
- case SELECTION_ID_SUCCESS:
+ case SELECTION_ID_SUCCESS:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_SUCCESS];
- case SELECTION_ID_VALUE:
+ case SELECTION_ID_VALUE:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_VALUE];
- case SELECTION_ID_TUNABLE:
+ case SELECTION_ID_TUNABLE:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE];
- case SELECTION_ID_TUNABLES:
+ case SELECTION_ID_TUNABLES:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLES];
- case SELECTION_ID_TUNABLE_CONFIRMATION:
+ case SELECTION_ID_TUNABLE_CONFIRMATION:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE_CONFIRMATION];
- case SELECTION_ID_HELP: return &SELECTION_INFO_ARRAY[SELECTION_INDEX_HELP];
- case SELECTION_ID_DOMAIN_INFO:
+ case SELECTION_ID_HELP:
+ return &SELECTION_INFO_ARRAY[SELECTION_INDEX_HELP];
+ case SELECTION_ID_DOMAIN_INFO:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAIN_INFO];
- case SELECTION_ID_PURGED_QUEUES:
+ case SELECTION_ID_PURGED_QUEUES:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_PURGED_QUEUES];
- case SELECTION_ID_QUEUE_INTERNALS:
+ case SELECTION_ID_QUEUE_INTERNALS:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE_INTERNALS];
- case SELECTION_ID_MESSAGE_GROUP_ID_HELPER:
+ case SELECTION_ID_MESSAGE_GROUP_ID_HELPER:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_MESSAGE_GROUP_ID_HELPER];
- case SELECTION_ID_QUEUE_CONTENTS:
+ case SELECTION_ID_QUEUE_CONTENTS:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE_CONTENTS];
- case SELECTION_ID_MESSAGE:
+ case SELECTION_ID_MESSAGE:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_MESSAGE];
- case SELECTION_ID_STATS:
+ case SELECTION_ID_STATS:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_STATS];
- case SELECTION_ID_CLUSTER_LIST:
+ case SELECTION_ID_CLUSTER_LIST:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_LIST];
- case SELECTION_ID_CLUSTER_STATUS:
+ case SELECTION_ID_CLUSTER_STATUS:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_STATUS];
- case SELECTION_ID_CLUSTER_PROXY_STATUS:
+ case SELECTION_ID_CLUSTER_PROXY_STATUS:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_PROXY_STATUS];
- case SELECTION_ID_NODE_STATUSES:
+ case SELECTION_ID_NODE_STATUSES:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_NODE_STATUSES];
- case SELECTION_ID_ELECTOR_INFO:
+ case SELECTION_ID_ELECTOR_INFO:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_ELECTOR_INFO];
- case SELECTION_ID_PARTITIONS_INFO:
+ case SELECTION_ID_PARTITIONS_INFO:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_PARTITIONS_INFO];
- case SELECTION_ID_CLUSTER_QUEUE_HELPER:
+ case SELECTION_ID_CLUSTER_QUEUE_HELPER:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_QUEUE_HELPER];
- case SELECTION_ID_STORAGE_CONTENT:
+ case SELECTION_ID_STORAGE_CONTENT:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_STORAGE_CONTENT];
- case SELECTION_ID_CLUSTER_STORAGE_SUMMARY:
+ case SELECTION_ID_CLUSTER_STORAGE_SUMMARY:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_STORAGE_SUMMARY];
- case SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES:
- return &SELECTION_INFO_ARRAY
- [SELECTION_INDEX_CLUSTER_DOMAIN_QUEUE_STATUSES];
- case SELECTION_ID_BROKER_CONFIG:
+ case SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES:
+ return &SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_DOMAIN_QUEUE_STATUSES];
+ case SELECTION_ID_BROKER_CONFIG:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_BROKER_CONFIG];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-Result::Result(const Result& original, bslma::Allocator* basicAllocator)
+Result::Result(
+ const Result& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_ERROR: {
- new (d_error.buffer()) Error(original.d_error.object(), d_allocator_p);
- } break;
- case SELECTION_ID_SUCCESS: {
- new (d_success.buffer()) Void(original.d_success.object());
- } break;
- case SELECTION_ID_VALUE: {
- new (d_value.buffer()) Value(original.d_value.object(), d_allocator_p);
- } break;
- case SELECTION_ID_TUNABLE: {
+ case SELECTION_ID_ERROR: {
+ new (d_error.buffer())
+ Error(
+ original.d_error.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_SUCCESS: {
+ new (d_success.buffer())
+ Void(original.d_success.object());
+ } break;
+ case SELECTION_ID_VALUE: {
+ new (d_value.buffer())
+ Value(
+ original.d_value.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_TUNABLE: {
new (d_tunable.buffer())
- Tunable(original.d_tunable.object(), d_allocator_p);
- } break;
- case SELECTION_ID_TUNABLES: {
+ Tunable(
+ original.d_tunable.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_TUNABLES: {
new (d_tunables.buffer())
- Tunables(original.d_tunables.object(), d_allocator_p);
- } break;
- case SELECTION_ID_TUNABLE_CONFIRMATION: {
+ Tunables(
+ original.d_tunables.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_TUNABLE_CONFIRMATION: {
new (d_tunableConfirmation.buffer())
- TunableConfirmation(original.d_tunableConfirmation.object(),
- d_allocator_p);
- } break;
- case SELECTION_ID_HELP: {
- new (d_help.buffer()) Help(original.d_help.object(), d_allocator_p);
- } break;
- case SELECTION_ID_DOMAIN_INFO: {
+ TunableConfirmation(
+ original.d_tunableConfirmation.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_HELP: {
+ new (d_help.buffer())
+ Help(
+ original.d_help.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_DOMAIN_INFO: {
new (d_domainInfo.buffer())
- DomainInfo(original.d_domainInfo.object(), d_allocator_p);
- } break;
- case SELECTION_ID_PURGED_QUEUES: {
+ DomainInfo(
+ original.d_domainInfo.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_PURGED_QUEUES: {
new (d_purgedQueues.buffer())
- PurgedQueues(original.d_purgedQueues.object(), d_allocator_p);
- } break;
- case SELECTION_ID_QUEUE_INTERNALS: {
+ PurgedQueues(
+ original.d_purgedQueues.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_QUEUE_INTERNALS: {
new (d_queueInternals.buffer())
- QueueInternals(original.d_queueInternals.object(), d_allocator_p);
- } break;
- case SELECTION_ID_MESSAGE_GROUP_ID_HELPER: {
+ QueueInternals(
+ original.d_queueInternals.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_MESSAGE_GROUP_ID_HELPER: {
new (d_messageGroupIdHelper.buffer())
- MessageGroupIdHelper(original.d_messageGroupIdHelper.object(),
- d_allocator_p);
- } break;
- case SELECTION_ID_QUEUE_CONTENTS: {
+ MessageGroupIdHelper(
+ original.d_messageGroupIdHelper.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_QUEUE_CONTENTS: {
new (d_queueContents.buffer())
- QueueContents(original.d_queueContents.object(), d_allocator_p);
- } break;
- case SELECTION_ID_MESSAGE: {
+ QueueContents(
+ original.d_queueContents.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_MESSAGE: {
new (d_message.buffer())
- Message(original.d_message.object(), d_allocator_p);
- } break;
- case SELECTION_ID_STATS: {
+ Message(
+ original.d_message.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_STATS: {
new (d_stats.buffer())
- bsl::string(original.d_stats.object(), d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTER_LIST: {
+ bsl::string(
+ original.d_stats.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTER_LIST: {
new (d_clusterList.buffer())
- ClusterList(original.d_clusterList.object(), d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTER_STATUS: {
+ ClusterList(
+ original.d_clusterList.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTER_STATUS: {
new (d_clusterStatus.buffer())
- ClusterStatus(original.d_clusterStatus.object(), d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTER_PROXY_STATUS: {
+ ClusterStatus(
+ original.d_clusterStatus.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTER_PROXY_STATUS: {
new (d_clusterProxyStatus.buffer())
- ClusterProxyStatus(original.d_clusterProxyStatus.object(),
- d_allocator_p);
- } break;
- case SELECTION_ID_NODE_STATUSES: {
+ ClusterProxyStatus(
+ original.d_clusterProxyStatus.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_NODE_STATUSES: {
new (d_nodeStatuses.buffer())
- NodeStatuses(original.d_nodeStatuses.object(), d_allocator_p);
- } break;
- case SELECTION_ID_ELECTOR_INFO: {
+ NodeStatuses(
+ original.d_nodeStatuses.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_ELECTOR_INFO: {
new (d_electorInfo.buffer())
- ElectorInfo(original.d_electorInfo.object(), d_allocator_p);
- } break;
- case SELECTION_ID_PARTITIONS_INFO: {
+ ElectorInfo(
+ original.d_electorInfo.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_PARTITIONS_INFO: {
new (d_partitionsInfo.buffer())
- PartitionsInfo(original.d_partitionsInfo.object(), d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTER_QUEUE_HELPER: {
+ PartitionsInfo(
+ original.d_partitionsInfo.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTER_QUEUE_HELPER: {
new (d_clusterQueueHelper.buffer())
- ClusterQueueHelper(original.d_clusterQueueHelper.object(),
- d_allocator_p);
- } break;
- case SELECTION_ID_STORAGE_CONTENT: {
+ ClusterQueueHelper(
+ original.d_clusterQueueHelper.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_STORAGE_CONTENT: {
new (d_storageContent.buffer())
- StorageContent(original.d_storageContent.object(), d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: {
+ StorageContent(
+ original.d_storageContent.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: {
new (d_clusterStorageSummary.buffer())
- ClusterStorageSummary(original.d_clusterStorageSummary.object(),
- d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES: {
- new (d_clusterDomainQueueStatuses.buffer()) ClusterDomainQueueStatuses(
- original.d_clusterDomainQueueStatuses.object(),
- d_allocator_p);
- } break;
- case SELECTION_ID_BROKER_CONFIG: {
+ ClusterStorageSummary(
+ original.d_clusterStorageSummary.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES: {
+ new (d_clusterDomainQueueStatuses.buffer())
+ ClusterDomainQueueStatuses(
+ original.d_clusterDomainQueueStatuses.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_BROKER_CONFIG: {
new (d_brokerConfig.buffer())
- BrokerConfig(original.d_brokerConfig.object(), d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ BrokerConfig(
+ original.d_brokerConfig.object(), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Result::Result(Result&& original) noexcept
-: d_selectionId(original.d_selectionId),
- d_allocator_p(original.d_allocator_p)
+: d_selectionId(original.d_selectionId)
+, d_allocator_p(original.d_allocator_p)
{
switch (d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
new (d_error.buffer())
- Error(bsl::move(original.d_error.object()), d_allocator_p);
- } break;
- case SELECTION_ID_SUCCESS: {
- new (d_success.buffer()) Void(bsl::move(original.d_success.object()));
- } break;
- case SELECTION_ID_VALUE: {
+ Error(
+ bsl::move(original.d_error.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_SUCCESS: {
+ new (d_success.buffer())
+ Void(bsl::move(original.d_success.object()));
+ } break;
+ case SELECTION_ID_VALUE: {
new (d_value.buffer())
- Value(bsl::move(original.d_value.object()), d_allocator_p);
- } break;
- case SELECTION_ID_TUNABLE: {
+ Value(
+ bsl::move(original.d_value.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_TUNABLE: {
new (d_tunable.buffer())
- Tunable(bsl::move(original.d_tunable.object()), d_allocator_p);
- } break;
- case SELECTION_ID_TUNABLES: {
+ Tunable(
+ bsl::move(original.d_tunable.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_TUNABLES: {
new (d_tunables.buffer())
- Tunables(bsl::move(original.d_tunables.object()), d_allocator_p);
- } break;
- case SELECTION_ID_TUNABLE_CONFIRMATION: {
- new (d_tunableConfirmation.buffer()) TunableConfirmation(
- bsl::move(original.d_tunableConfirmation.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_HELP: {
+ Tunables(
+ bsl::move(original.d_tunables.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_TUNABLE_CONFIRMATION: {
+ new (d_tunableConfirmation.buffer())
+ TunableConfirmation(
+ bsl::move(original.d_tunableConfirmation.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_HELP: {
new (d_help.buffer())
- Help(bsl::move(original.d_help.object()), d_allocator_p);
- } break;
- case SELECTION_ID_DOMAIN_INFO: {
+ Help(
+ bsl::move(original.d_help.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_DOMAIN_INFO: {
new (d_domainInfo.buffer())
- DomainInfo(bsl::move(original.d_domainInfo.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_PURGED_QUEUES: {
+ DomainInfo(
+ bsl::move(original.d_domainInfo.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_PURGED_QUEUES: {
new (d_purgedQueues.buffer())
- PurgedQueues(bsl::move(original.d_purgedQueues.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_QUEUE_INTERNALS: {
+ PurgedQueues(
+ bsl::move(original.d_purgedQueues.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_QUEUE_INTERNALS: {
new (d_queueInternals.buffer())
- QueueInternals(bsl::move(original.d_queueInternals.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_MESSAGE_GROUP_ID_HELPER: {
- new (d_messageGroupIdHelper.buffer()) MessageGroupIdHelper(
- bsl::move(original.d_messageGroupIdHelper.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_QUEUE_CONTENTS: {
+ QueueInternals(
+ bsl::move(original.d_queueInternals.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_MESSAGE_GROUP_ID_HELPER: {
+ new (d_messageGroupIdHelper.buffer())
+ MessageGroupIdHelper(
+ bsl::move(original.d_messageGroupIdHelper.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_QUEUE_CONTENTS: {
new (d_queueContents.buffer())
- QueueContents(bsl::move(original.d_queueContents.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_MESSAGE: {
+ QueueContents(
+ bsl::move(original.d_queueContents.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_MESSAGE: {
new (d_message.buffer())
- Message(bsl::move(original.d_message.object()), d_allocator_p);
- } break;
- case SELECTION_ID_STATS: {
+ Message(
+ bsl::move(original.d_message.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_STATS: {
new (d_stats.buffer())
- bsl::string(bsl::move(original.d_stats.object()), d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTER_LIST: {
+ bsl::string(
+ bsl::move(original.d_stats.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTER_LIST: {
new (d_clusterList.buffer())
- ClusterList(bsl::move(original.d_clusterList.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTER_STATUS: {
+ ClusterList(
+ bsl::move(original.d_clusterList.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTER_STATUS: {
new (d_clusterStatus.buffer())
- ClusterStatus(bsl::move(original.d_clusterStatus.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTER_PROXY_STATUS: {
- new (d_clusterProxyStatus.buffer()) ClusterProxyStatus(
- bsl::move(original.d_clusterProxyStatus.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_NODE_STATUSES: {
+ ClusterStatus(
+ bsl::move(original.d_clusterStatus.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTER_PROXY_STATUS: {
+ new (d_clusterProxyStatus.buffer())
+ ClusterProxyStatus(
+ bsl::move(original.d_clusterProxyStatus.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_NODE_STATUSES: {
new (d_nodeStatuses.buffer())
- NodeStatuses(bsl::move(original.d_nodeStatuses.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_ELECTOR_INFO: {
+ NodeStatuses(
+ bsl::move(original.d_nodeStatuses.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_ELECTOR_INFO: {
new (d_electorInfo.buffer())
- ElectorInfo(bsl::move(original.d_electorInfo.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_PARTITIONS_INFO: {
+ ElectorInfo(
+ bsl::move(original.d_electorInfo.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_PARTITIONS_INFO: {
new (d_partitionsInfo.buffer())
- PartitionsInfo(bsl::move(original.d_partitionsInfo.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTER_QUEUE_HELPER: {
- new (d_clusterQueueHelper.buffer()) ClusterQueueHelper(
- bsl::move(original.d_clusterQueueHelper.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_STORAGE_CONTENT: {
+ PartitionsInfo(
+ bsl::move(original.d_partitionsInfo.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTER_QUEUE_HELPER: {
+ new (d_clusterQueueHelper.buffer())
+ ClusterQueueHelper(
+ bsl::move(original.d_clusterQueueHelper.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_STORAGE_CONTENT: {
new (d_storageContent.buffer())
- StorageContent(bsl::move(original.d_storageContent.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: {
- new (d_clusterStorageSummary.buffer()) ClusterStorageSummary(
- bsl::move(original.d_clusterStorageSummary.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES: {
- new (d_clusterDomainQueueStatuses.buffer()) ClusterDomainQueueStatuses(
- bsl::move(original.d_clusterDomainQueueStatuses.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_BROKER_CONFIG: {
+ StorageContent(
+ bsl::move(original.d_storageContent.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: {
+ new (d_clusterStorageSummary.buffer())
+ ClusterStorageSummary(
+ bsl::move(original.d_clusterStorageSummary.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES: {
+ new (d_clusterDomainQueueStatuses.buffer())
+ ClusterDomainQueueStatuses(
+ bsl::move(original.d_clusterDomainQueueStatuses.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_BROKER_CONFIG: {
new (d_brokerConfig.buffer())
- BrokerConfig(bsl::move(original.d_brokerConfig.object()),
- d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ BrokerConfig(
+ bsl::move(original.d_brokerConfig.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-Result::Result(Result&& original, bslma::Allocator* basicAllocator)
+Result::Result(
+ Result&& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
new (d_error.buffer())
- Error(bsl::move(original.d_error.object()), d_allocator_p);
- } break;
- case SELECTION_ID_SUCCESS: {
- new (d_success.buffer()) Void(bsl::move(original.d_success.object()));
- } break;
- case SELECTION_ID_VALUE: {
+ Error(
+ bsl::move(original.d_error.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_SUCCESS: {
+ new (d_success.buffer())
+ Void(bsl::move(original.d_success.object()));
+ } break;
+ case SELECTION_ID_VALUE: {
new (d_value.buffer())
- Value(bsl::move(original.d_value.object()), d_allocator_p);
- } break;
- case SELECTION_ID_TUNABLE: {
+ Value(
+ bsl::move(original.d_value.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_TUNABLE: {
new (d_tunable.buffer())
- Tunable(bsl::move(original.d_tunable.object()), d_allocator_p);
- } break;
- case SELECTION_ID_TUNABLES: {
+ Tunable(
+ bsl::move(original.d_tunable.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_TUNABLES: {
new (d_tunables.buffer())
- Tunables(bsl::move(original.d_tunables.object()), d_allocator_p);
- } break;
- case SELECTION_ID_TUNABLE_CONFIRMATION: {
- new (d_tunableConfirmation.buffer()) TunableConfirmation(
- bsl::move(original.d_tunableConfirmation.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_HELP: {
+ Tunables(
+ bsl::move(original.d_tunables.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_TUNABLE_CONFIRMATION: {
+ new (d_tunableConfirmation.buffer())
+ TunableConfirmation(
+ bsl::move(original.d_tunableConfirmation.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_HELP: {
new (d_help.buffer())
- Help(bsl::move(original.d_help.object()), d_allocator_p);
- } break;
- case SELECTION_ID_DOMAIN_INFO: {
+ Help(
+ bsl::move(original.d_help.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_DOMAIN_INFO: {
new (d_domainInfo.buffer())
- DomainInfo(bsl::move(original.d_domainInfo.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_PURGED_QUEUES: {
+ DomainInfo(
+ bsl::move(original.d_domainInfo.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_PURGED_QUEUES: {
new (d_purgedQueues.buffer())
- PurgedQueues(bsl::move(original.d_purgedQueues.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_QUEUE_INTERNALS: {
+ PurgedQueues(
+ bsl::move(original.d_purgedQueues.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_QUEUE_INTERNALS: {
new (d_queueInternals.buffer())
- QueueInternals(bsl::move(original.d_queueInternals.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_MESSAGE_GROUP_ID_HELPER: {
- new (d_messageGroupIdHelper.buffer()) MessageGroupIdHelper(
- bsl::move(original.d_messageGroupIdHelper.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_QUEUE_CONTENTS: {
+ QueueInternals(
+ bsl::move(original.d_queueInternals.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_MESSAGE_GROUP_ID_HELPER: {
+ new (d_messageGroupIdHelper.buffer())
+ MessageGroupIdHelper(
+ bsl::move(original.d_messageGroupIdHelper.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_QUEUE_CONTENTS: {
new (d_queueContents.buffer())
- QueueContents(bsl::move(original.d_queueContents.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_MESSAGE: {
+ QueueContents(
+ bsl::move(original.d_queueContents.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_MESSAGE: {
new (d_message.buffer())
- Message(bsl::move(original.d_message.object()), d_allocator_p);
- } break;
- case SELECTION_ID_STATS: {
+ Message(
+ bsl::move(original.d_message.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_STATS: {
new (d_stats.buffer())
- bsl::string(bsl::move(original.d_stats.object()), d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTER_LIST: {
+ bsl::string(
+ bsl::move(original.d_stats.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTER_LIST: {
new (d_clusterList.buffer())
- ClusterList(bsl::move(original.d_clusterList.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTER_STATUS: {
+ ClusterList(
+ bsl::move(original.d_clusterList.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTER_STATUS: {
new (d_clusterStatus.buffer())
- ClusterStatus(bsl::move(original.d_clusterStatus.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTER_PROXY_STATUS: {
- new (d_clusterProxyStatus.buffer()) ClusterProxyStatus(
- bsl::move(original.d_clusterProxyStatus.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_NODE_STATUSES: {
+ ClusterStatus(
+ bsl::move(original.d_clusterStatus.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTER_PROXY_STATUS: {
+ new (d_clusterProxyStatus.buffer())
+ ClusterProxyStatus(
+ bsl::move(original.d_clusterProxyStatus.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_NODE_STATUSES: {
new (d_nodeStatuses.buffer())
- NodeStatuses(bsl::move(original.d_nodeStatuses.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_ELECTOR_INFO: {
+ NodeStatuses(
+ bsl::move(original.d_nodeStatuses.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_ELECTOR_INFO: {
new (d_electorInfo.buffer())
- ElectorInfo(bsl::move(original.d_electorInfo.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_PARTITIONS_INFO: {
+ ElectorInfo(
+ bsl::move(original.d_electorInfo.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_PARTITIONS_INFO: {
new (d_partitionsInfo.buffer())
- PartitionsInfo(bsl::move(original.d_partitionsInfo.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTER_QUEUE_HELPER: {
- new (d_clusterQueueHelper.buffer()) ClusterQueueHelper(
- bsl::move(original.d_clusterQueueHelper.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_STORAGE_CONTENT: {
+ PartitionsInfo(
+ bsl::move(original.d_partitionsInfo.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTER_QUEUE_HELPER: {
+ new (d_clusterQueueHelper.buffer())
+ ClusterQueueHelper(
+ bsl::move(original.d_clusterQueueHelper.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_STORAGE_CONTENT: {
new (d_storageContent.buffer())
- StorageContent(bsl::move(original.d_storageContent.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: {
- new (d_clusterStorageSummary.buffer()) ClusterStorageSummary(
- bsl::move(original.d_clusterStorageSummary.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES: {
- new (d_clusterDomainQueueStatuses.buffer()) ClusterDomainQueueStatuses(
- bsl::move(original.d_clusterDomainQueueStatuses.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_BROKER_CONFIG: {
+ StorageContent(
+ bsl::move(original.d_storageContent.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: {
+ new (d_clusterStorageSummary.buffer())
+ ClusterStorageSummary(
+ bsl::move(original.d_clusterStorageSummary.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES: {
+ new (d_clusterDomainQueueStatuses.buffer())
+ ClusterDomainQueueStatuses(
+ bsl::move(original.d_clusterDomainQueueStatuses.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_BROKER_CONFIG: {
new (d_brokerConfig.buffer())
- BrokerConfig(bsl::move(original.d_brokerConfig.object()),
- d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ BrokerConfig(
+ bsl::move(original.d_brokerConfig.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
#endif
// MANIPULATORS
-Result& Result::operator=(const Result& rhs)
+Result&
+Result::operator=(const Result& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
makeError(rhs.d_error.object());
- } break;
- case SELECTION_ID_SUCCESS: {
+ } break;
+ case SELECTION_ID_SUCCESS: {
makeSuccess(rhs.d_success.object());
- } break;
- case SELECTION_ID_VALUE: {
+ } break;
+ case SELECTION_ID_VALUE: {
makeValue(rhs.d_value.object());
- } break;
- case SELECTION_ID_TUNABLE: {
+ } break;
+ case SELECTION_ID_TUNABLE: {
makeTunable(rhs.d_tunable.object());
- } break;
- case SELECTION_ID_TUNABLES: {
+ } break;
+ case SELECTION_ID_TUNABLES: {
makeTunables(rhs.d_tunables.object());
- } break;
- case SELECTION_ID_TUNABLE_CONFIRMATION: {
+ } break;
+ case SELECTION_ID_TUNABLE_CONFIRMATION: {
makeTunableConfirmation(rhs.d_tunableConfirmation.object());
- } break;
- case SELECTION_ID_HELP: {
+ } break;
+ case SELECTION_ID_HELP: {
makeHelp(rhs.d_help.object());
- } break;
- case SELECTION_ID_DOMAIN_INFO: {
+ } break;
+ case SELECTION_ID_DOMAIN_INFO: {
makeDomainInfo(rhs.d_domainInfo.object());
- } break;
- case SELECTION_ID_PURGED_QUEUES: {
+ } break;
+ case SELECTION_ID_PURGED_QUEUES: {
makePurgedQueues(rhs.d_purgedQueues.object());
- } break;
- case SELECTION_ID_QUEUE_INTERNALS: {
+ } break;
+ case SELECTION_ID_QUEUE_INTERNALS: {
makeQueueInternals(rhs.d_queueInternals.object());
- } break;
- case SELECTION_ID_MESSAGE_GROUP_ID_HELPER: {
+ } break;
+ case SELECTION_ID_MESSAGE_GROUP_ID_HELPER: {
makeMessageGroupIdHelper(rhs.d_messageGroupIdHelper.object());
- } break;
- case SELECTION_ID_QUEUE_CONTENTS: {
+ } break;
+ case SELECTION_ID_QUEUE_CONTENTS: {
makeQueueContents(rhs.d_queueContents.object());
- } break;
- case SELECTION_ID_MESSAGE: {
+ } break;
+ case SELECTION_ID_MESSAGE: {
makeMessage(rhs.d_message.object());
- } break;
- case SELECTION_ID_STATS: {
+ } break;
+ case SELECTION_ID_STATS: {
makeStats(rhs.d_stats.object());
- } break;
- case SELECTION_ID_CLUSTER_LIST: {
+ } break;
+ case SELECTION_ID_CLUSTER_LIST: {
makeClusterList(rhs.d_clusterList.object());
- } break;
- case SELECTION_ID_CLUSTER_STATUS: {
+ } break;
+ case SELECTION_ID_CLUSTER_STATUS: {
makeClusterStatus(rhs.d_clusterStatus.object());
- } break;
- case SELECTION_ID_CLUSTER_PROXY_STATUS: {
+ } break;
+ case SELECTION_ID_CLUSTER_PROXY_STATUS: {
makeClusterProxyStatus(rhs.d_clusterProxyStatus.object());
- } break;
- case SELECTION_ID_NODE_STATUSES: {
+ } break;
+ case SELECTION_ID_NODE_STATUSES: {
makeNodeStatuses(rhs.d_nodeStatuses.object());
- } break;
- case SELECTION_ID_ELECTOR_INFO: {
+ } break;
+ case SELECTION_ID_ELECTOR_INFO: {
makeElectorInfo(rhs.d_electorInfo.object());
- } break;
- case SELECTION_ID_PARTITIONS_INFO: {
+ } break;
+ case SELECTION_ID_PARTITIONS_INFO: {
makePartitionsInfo(rhs.d_partitionsInfo.object());
- } break;
- case SELECTION_ID_CLUSTER_QUEUE_HELPER: {
+ } break;
+ case SELECTION_ID_CLUSTER_QUEUE_HELPER: {
makeClusterQueueHelper(rhs.d_clusterQueueHelper.object());
- } break;
- case SELECTION_ID_STORAGE_CONTENT: {
+ } break;
+ case SELECTION_ID_STORAGE_CONTENT: {
makeStorageContent(rhs.d_storageContent.object());
- } break;
- case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: {
+ } break;
+ case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: {
makeClusterStorageSummary(rhs.d_clusterStorageSummary.object());
- } break;
- case SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES: {
- makeClusterDomainQueueStatuses(
- rhs.d_clusterDomainQueueStatuses.object());
- } break;
- case SELECTION_ID_BROKER_CONFIG: {
+ } break;
+ case SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES: {
+ makeClusterDomainQueueStatuses(rhs.d_clusterDomainQueueStatuses.object());
+ } break;
+ case SELECTION_ID_BROKER_CONFIG: {
makeBrokerConfig(rhs.d_brokerConfig.object());
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -26532,94 +29159,89 @@ Result& Result::operator=(const Result& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-Result& Result::operator=(Result&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+Result&
+Result::operator=(Result&& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
makeError(bsl::move(rhs.d_error.object()));
- } break;
- case SELECTION_ID_SUCCESS: {
+ } break;
+ case SELECTION_ID_SUCCESS: {
makeSuccess(bsl::move(rhs.d_success.object()));
- } break;
- case SELECTION_ID_VALUE: {
+ } break;
+ case SELECTION_ID_VALUE: {
makeValue(bsl::move(rhs.d_value.object()));
- } break;
- case SELECTION_ID_TUNABLE: {
+ } break;
+ case SELECTION_ID_TUNABLE: {
makeTunable(bsl::move(rhs.d_tunable.object()));
- } break;
- case SELECTION_ID_TUNABLES: {
+ } break;
+ case SELECTION_ID_TUNABLES: {
makeTunables(bsl::move(rhs.d_tunables.object()));
- } break;
- case SELECTION_ID_TUNABLE_CONFIRMATION: {
- makeTunableConfirmation(
- bsl::move(rhs.d_tunableConfirmation.object()));
- } break;
- case SELECTION_ID_HELP: {
+ } break;
+ case SELECTION_ID_TUNABLE_CONFIRMATION: {
+ makeTunableConfirmation(bsl::move(rhs.d_tunableConfirmation.object()));
+ } break;
+ case SELECTION_ID_HELP: {
makeHelp(bsl::move(rhs.d_help.object()));
- } break;
- case SELECTION_ID_DOMAIN_INFO: {
+ } break;
+ case SELECTION_ID_DOMAIN_INFO: {
makeDomainInfo(bsl::move(rhs.d_domainInfo.object()));
- } break;
- case SELECTION_ID_PURGED_QUEUES: {
+ } break;
+ case SELECTION_ID_PURGED_QUEUES: {
makePurgedQueues(bsl::move(rhs.d_purgedQueues.object()));
- } break;
- case SELECTION_ID_QUEUE_INTERNALS: {
+ } break;
+ case SELECTION_ID_QUEUE_INTERNALS: {
makeQueueInternals(bsl::move(rhs.d_queueInternals.object()));
- } break;
- case SELECTION_ID_MESSAGE_GROUP_ID_HELPER: {
- makeMessageGroupIdHelper(
- bsl::move(rhs.d_messageGroupIdHelper.object()));
- } break;
- case SELECTION_ID_QUEUE_CONTENTS: {
+ } break;
+ case SELECTION_ID_MESSAGE_GROUP_ID_HELPER: {
+ makeMessageGroupIdHelper(bsl::move(rhs.d_messageGroupIdHelper.object()));
+ } break;
+ case SELECTION_ID_QUEUE_CONTENTS: {
makeQueueContents(bsl::move(rhs.d_queueContents.object()));
- } break;
- case SELECTION_ID_MESSAGE: {
+ } break;
+ case SELECTION_ID_MESSAGE: {
makeMessage(bsl::move(rhs.d_message.object()));
- } break;
- case SELECTION_ID_STATS: {
+ } break;
+ case SELECTION_ID_STATS: {
makeStats(bsl::move(rhs.d_stats.object()));
- } break;
- case SELECTION_ID_CLUSTER_LIST: {
+ } break;
+ case SELECTION_ID_CLUSTER_LIST: {
makeClusterList(bsl::move(rhs.d_clusterList.object()));
- } break;
- case SELECTION_ID_CLUSTER_STATUS: {
+ } break;
+ case SELECTION_ID_CLUSTER_STATUS: {
makeClusterStatus(bsl::move(rhs.d_clusterStatus.object()));
- } break;
- case SELECTION_ID_CLUSTER_PROXY_STATUS: {
- makeClusterProxyStatus(
- bsl::move(rhs.d_clusterProxyStatus.object()));
- } break;
- case SELECTION_ID_NODE_STATUSES: {
+ } break;
+ case SELECTION_ID_CLUSTER_PROXY_STATUS: {
+ makeClusterProxyStatus(bsl::move(rhs.d_clusterProxyStatus.object()));
+ } break;
+ case SELECTION_ID_NODE_STATUSES: {
makeNodeStatuses(bsl::move(rhs.d_nodeStatuses.object()));
- } break;
- case SELECTION_ID_ELECTOR_INFO: {
+ } break;
+ case SELECTION_ID_ELECTOR_INFO: {
makeElectorInfo(bsl::move(rhs.d_electorInfo.object()));
- } break;
- case SELECTION_ID_PARTITIONS_INFO: {
+ } break;
+ case SELECTION_ID_PARTITIONS_INFO: {
makePartitionsInfo(bsl::move(rhs.d_partitionsInfo.object()));
- } break;
- case SELECTION_ID_CLUSTER_QUEUE_HELPER: {
- makeClusterQueueHelper(
- bsl::move(rhs.d_clusterQueueHelper.object()));
- } break;
- case SELECTION_ID_STORAGE_CONTENT: {
+ } break;
+ case SELECTION_ID_CLUSTER_QUEUE_HELPER: {
+ makeClusterQueueHelper(bsl::move(rhs.d_clusterQueueHelper.object()));
+ } break;
+ case SELECTION_ID_STORAGE_CONTENT: {
makeStorageContent(bsl::move(rhs.d_storageContent.object()));
- } break;
- case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: {
- makeClusterStorageSummary(
- bsl::move(rhs.d_clusterStorageSummary.object()));
- } break;
- case SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES: {
- makeClusterDomainQueueStatuses(
- bsl::move(rhs.d_clusterDomainQueueStatuses.object()));
- } break;
- case SELECTION_ID_BROKER_CONFIG: {
+ } break;
+ case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: {
+ makeClusterStorageSummary(bsl::move(rhs.d_clusterStorageSummary.object()));
+ } break;
+ case SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES: {
+ makeClusterDomainQueueStatuses(bsl::move(rhs.d_clusterDomainQueueStatuses.object()));
+ } break;
+ case SELECTION_ID_BROKER_CONFIG: {
makeBrokerConfig(bsl::move(rhs.d_brokerConfig.object()));
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -26632,83 +29254,84 @@ Result& Result::operator=(Result&& rhs)
void Result::reset()
{
switch (d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
d_error.object().~Error();
- } break;
- case SELECTION_ID_SUCCESS: {
+ } break;
+ case SELECTION_ID_SUCCESS: {
d_success.object().~Void();
- } break;
- case SELECTION_ID_VALUE: {
+ } break;
+ case SELECTION_ID_VALUE: {
d_value.object().~Value();
- } break;
- case SELECTION_ID_TUNABLE: {
+ } break;
+ case SELECTION_ID_TUNABLE: {
d_tunable.object().~Tunable();
- } break;
- case SELECTION_ID_TUNABLES: {
+ } break;
+ case SELECTION_ID_TUNABLES: {
d_tunables.object().~Tunables();
- } break;
- case SELECTION_ID_TUNABLE_CONFIRMATION: {
+ } break;
+ case SELECTION_ID_TUNABLE_CONFIRMATION: {
d_tunableConfirmation.object().~TunableConfirmation();
- } break;
- case SELECTION_ID_HELP: {
+ } break;
+ case SELECTION_ID_HELP: {
d_help.object().~Help();
- } break;
- case SELECTION_ID_DOMAIN_INFO: {
+ } break;
+ case SELECTION_ID_DOMAIN_INFO: {
d_domainInfo.object().~DomainInfo();
- } break;
- case SELECTION_ID_PURGED_QUEUES: {
+ } break;
+ case SELECTION_ID_PURGED_QUEUES: {
d_purgedQueues.object().~PurgedQueues();
- } break;
- case SELECTION_ID_QUEUE_INTERNALS: {
+ } break;
+ case SELECTION_ID_QUEUE_INTERNALS: {
d_queueInternals.object().~QueueInternals();
- } break;
- case SELECTION_ID_MESSAGE_GROUP_ID_HELPER: {
+ } break;
+ case SELECTION_ID_MESSAGE_GROUP_ID_HELPER: {
d_messageGroupIdHelper.object().~MessageGroupIdHelper();
- } break;
- case SELECTION_ID_QUEUE_CONTENTS: {
+ } break;
+ case SELECTION_ID_QUEUE_CONTENTS: {
d_queueContents.object().~QueueContents();
- } break;
- case SELECTION_ID_MESSAGE: {
+ } break;
+ case SELECTION_ID_MESSAGE: {
d_message.object().~Message();
- } break;
- case SELECTION_ID_STATS: {
+ } break;
+ case SELECTION_ID_STATS: {
typedef bsl::string Type;
d_stats.object().~Type();
- } break;
- case SELECTION_ID_CLUSTER_LIST: {
+ } break;
+ case SELECTION_ID_CLUSTER_LIST: {
d_clusterList.object().~ClusterList();
- } break;
- case SELECTION_ID_CLUSTER_STATUS: {
+ } break;
+ case SELECTION_ID_CLUSTER_STATUS: {
d_clusterStatus.object().~ClusterStatus();
- } break;
- case SELECTION_ID_CLUSTER_PROXY_STATUS: {
+ } break;
+ case SELECTION_ID_CLUSTER_PROXY_STATUS: {
d_clusterProxyStatus.object().~ClusterProxyStatus();
- } break;
- case SELECTION_ID_NODE_STATUSES: {
+ } break;
+ case SELECTION_ID_NODE_STATUSES: {
d_nodeStatuses.object().~NodeStatuses();
- } break;
- case SELECTION_ID_ELECTOR_INFO: {
+ } break;
+ case SELECTION_ID_ELECTOR_INFO: {
d_electorInfo.object().~ElectorInfo();
- } break;
- case SELECTION_ID_PARTITIONS_INFO: {
+ } break;
+ case SELECTION_ID_PARTITIONS_INFO: {
d_partitionsInfo.object().~PartitionsInfo();
- } break;
- case SELECTION_ID_CLUSTER_QUEUE_HELPER: {
+ } break;
+ case SELECTION_ID_CLUSTER_QUEUE_HELPER: {
d_clusterQueueHelper.object().~ClusterQueueHelper();
- } break;
- case SELECTION_ID_STORAGE_CONTENT: {
+ } break;
+ case SELECTION_ID_STORAGE_CONTENT: {
d_storageContent.object().~StorageContent();
- } break;
- case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: {
+ } break;
+ case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: {
d_clusterStorageSummary.object().~ClusterStorageSummary();
- } break;
- case SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES: {
+ } break;
+ case SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES: {
d_clusterDomainQueueStatuses.object().~ClusterDomainQueueStatuses();
- } break;
- case SELECTION_ID_BROKER_CONFIG: {
+ } break;
+ case SELECTION_ID_BROKER_CONFIG: {
d_brokerConfig.object().~BrokerConfig();
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
d_selectionId = SELECTION_ID_UNDEFINED;
@@ -26717,95 +29340,96 @@ void Result::reset()
int Result::makeSelection(int selectionId)
{
switch (selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
makeError();
- } break;
- case SELECTION_ID_SUCCESS: {
+ } break;
+ case SELECTION_ID_SUCCESS: {
makeSuccess();
- } break;
- case SELECTION_ID_VALUE: {
+ } break;
+ case SELECTION_ID_VALUE: {
makeValue();
- } break;
- case SELECTION_ID_TUNABLE: {
+ } break;
+ case SELECTION_ID_TUNABLE: {
makeTunable();
- } break;
- case SELECTION_ID_TUNABLES: {
+ } break;
+ case SELECTION_ID_TUNABLES: {
makeTunables();
- } break;
- case SELECTION_ID_TUNABLE_CONFIRMATION: {
+ } break;
+ case SELECTION_ID_TUNABLE_CONFIRMATION: {
makeTunableConfirmation();
- } break;
- case SELECTION_ID_HELP: {
+ } break;
+ case SELECTION_ID_HELP: {
makeHelp();
- } break;
- case SELECTION_ID_DOMAIN_INFO: {
+ } break;
+ case SELECTION_ID_DOMAIN_INFO: {
makeDomainInfo();
- } break;
- case SELECTION_ID_PURGED_QUEUES: {
+ } break;
+ case SELECTION_ID_PURGED_QUEUES: {
makePurgedQueues();
- } break;
- case SELECTION_ID_QUEUE_INTERNALS: {
+ } break;
+ case SELECTION_ID_QUEUE_INTERNALS: {
makeQueueInternals();
- } break;
- case SELECTION_ID_MESSAGE_GROUP_ID_HELPER: {
+ } break;
+ case SELECTION_ID_MESSAGE_GROUP_ID_HELPER: {
makeMessageGroupIdHelper();
- } break;
- case SELECTION_ID_QUEUE_CONTENTS: {
+ } break;
+ case SELECTION_ID_QUEUE_CONTENTS: {
makeQueueContents();
- } break;
- case SELECTION_ID_MESSAGE: {
+ } break;
+ case SELECTION_ID_MESSAGE: {
makeMessage();
- } break;
- case SELECTION_ID_STATS: {
+ } break;
+ case SELECTION_ID_STATS: {
makeStats();
- } break;
- case SELECTION_ID_CLUSTER_LIST: {
+ } break;
+ case SELECTION_ID_CLUSTER_LIST: {
makeClusterList();
- } break;
- case SELECTION_ID_CLUSTER_STATUS: {
+ } break;
+ case SELECTION_ID_CLUSTER_STATUS: {
makeClusterStatus();
- } break;
- case SELECTION_ID_CLUSTER_PROXY_STATUS: {
+ } break;
+ case SELECTION_ID_CLUSTER_PROXY_STATUS: {
makeClusterProxyStatus();
- } break;
- case SELECTION_ID_NODE_STATUSES: {
+ } break;
+ case SELECTION_ID_NODE_STATUSES: {
makeNodeStatuses();
- } break;
- case SELECTION_ID_ELECTOR_INFO: {
+ } break;
+ case SELECTION_ID_ELECTOR_INFO: {
makeElectorInfo();
- } break;
- case SELECTION_ID_PARTITIONS_INFO: {
+ } break;
+ case SELECTION_ID_PARTITIONS_INFO: {
makePartitionsInfo();
- } break;
- case SELECTION_ID_CLUSTER_QUEUE_HELPER: {
+ } break;
+ case SELECTION_ID_CLUSTER_QUEUE_HELPER: {
makeClusterQueueHelper();
- } break;
- case SELECTION_ID_STORAGE_CONTENT: {
+ } break;
+ case SELECTION_ID_STORAGE_CONTENT: {
makeStorageContent();
- } break;
- case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: {
+ } break;
+ case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: {
makeClusterStorageSummary();
- } break;
- case SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES: {
+ } break;
+ case SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES: {
makeClusterDomainQueueStatuses();
- } break;
- case SELECTION_ID_BROKER_CONFIG: {
+ } break;
+ case SELECTION_ID_BROKER_CONFIG: {
makeBrokerConfig();
- } break;
- case SELECTION_ID_UNDEFINED: {
+ } break;
+ case SELECTION_ID_UNDEFINED: {
reset();
- } break;
- default: return -1;
+ } break;
+ default:
+ return -1;
}
return 0;
}
-int Result::makeSelection(const char* name, int nameLength)
+int Result::makeSelection(const char *name, int nameLength)
{
- const bdlat_SelectionInfo* selectionInfo = lookupSelectionInfo(name,
- nameLength);
+ const bdlat_SelectionInfo *selectionInfo =
+ lookupSelectionInfo(name, nameLength);
if (0 == selectionInfo) {
- return -1;
+ return -1;
}
return makeSelection(selectionInfo->d_id);
@@ -26818,7 +29442,8 @@ Error& Result::makeError()
}
else {
reset();
- new (d_error.buffer()) Error(d_allocator_p);
+ new (d_error.buffer())
+ Error(d_allocator_p);
d_selectionId = SELECTION_ID_ERROR;
}
@@ -26832,15 +29457,16 @@ Error& Result::makeError(const Error& value)
}
else {
reset();
- new (d_error.buffer()) Error(value, d_allocator_p);
+ new (d_error.buffer())
+ Error(value, d_allocator_p);
d_selectionId = SELECTION_ID_ERROR;
}
return d_error.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Error& Result::makeError(Error&& value)
{
if (SELECTION_ID_ERROR == d_selectionId) {
@@ -26848,7 +29474,8 @@ Error& Result::makeError(Error&& value)
}
else {
reset();
- new (d_error.buffer()) Error(bsl::move(value), d_allocator_p);
+ new (d_error.buffer())
+ Error(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_ERROR;
}
@@ -26863,7 +29490,8 @@ Void& Result::makeSuccess()
}
else {
reset();
- new (d_success.buffer()) Void();
+ new (d_success.buffer())
+ Void();
d_selectionId = SELECTION_ID_SUCCESS;
}
@@ -26877,15 +29505,16 @@ Void& Result::makeSuccess(const Void& value)
}
else {
reset();
- new (d_success.buffer()) Void(value);
+ new (d_success.buffer())
+ Void(value);
d_selectionId = SELECTION_ID_SUCCESS;
}
return d_success.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Void& Result::makeSuccess(Void&& value)
{
if (SELECTION_ID_SUCCESS == d_selectionId) {
@@ -26893,7 +29522,8 @@ Void& Result::makeSuccess(Void&& value)
}
else {
reset();
- new (d_success.buffer()) Void(bsl::move(value));
+ new (d_success.buffer())
+ Void(bsl::move(value));
d_selectionId = SELECTION_ID_SUCCESS;
}
@@ -26908,7 +29538,8 @@ Value& Result::makeValue()
}
else {
reset();
- new (d_value.buffer()) Value(d_allocator_p);
+ new (d_value.buffer())
+ Value(d_allocator_p);
d_selectionId = SELECTION_ID_VALUE;
}
@@ -26922,15 +29553,16 @@ Value& Result::makeValue(const Value& value)
}
else {
reset();
- new (d_value.buffer()) Value(value, d_allocator_p);
+ new (d_value.buffer())
+ Value(value, d_allocator_p);
d_selectionId = SELECTION_ID_VALUE;
}
return d_value.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Value& Result::makeValue(Value&& value)
{
if (SELECTION_ID_VALUE == d_selectionId) {
@@ -26938,7 +29570,8 @@ Value& Result::makeValue(Value&& value)
}
else {
reset();
- new (d_value.buffer()) Value(bsl::move(value), d_allocator_p);
+ new (d_value.buffer())
+ Value(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_VALUE;
}
@@ -26953,7 +29586,8 @@ Tunable& Result::makeTunable()
}
else {
reset();
- new (d_tunable.buffer()) Tunable(d_allocator_p);
+ new (d_tunable.buffer())
+ Tunable(d_allocator_p);
d_selectionId = SELECTION_ID_TUNABLE;
}
@@ -26967,15 +29601,16 @@ Tunable& Result::makeTunable(const Tunable& value)
}
else {
reset();
- new (d_tunable.buffer()) Tunable(value, d_allocator_p);
+ new (d_tunable.buffer())
+ Tunable(value, d_allocator_p);
d_selectionId = SELECTION_ID_TUNABLE;
}
return d_tunable.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Tunable& Result::makeTunable(Tunable&& value)
{
if (SELECTION_ID_TUNABLE == d_selectionId) {
@@ -26983,7 +29618,8 @@ Tunable& Result::makeTunable(Tunable&& value)
}
else {
reset();
- new (d_tunable.buffer()) Tunable(bsl::move(value), d_allocator_p);
+ new (d_tunable.buffer())
+ Tunable(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_TUNABLE;
}
@@ -26998,7 +29634,8 @@ Tunables& Result::makeTunables()
}
else {
reset();
- new (d_tunables.buffer()) Tunables(d_allocator_p);
+ new (d_tunables.buffer())
+ Tunables(d_allocator_p);
d_selectionId = SELECTION_ID_TUNABLES;
}
@@ -27012,15 +29649,16 @@ Tunables& Result::makeTunables(const Tunables& value)
}
else {
reset();
- new (d_tunables.buffer()) Tunables(value, d_allocator_p);
+ new (d_tunables.buffer())
+ Tunables(value, d_allocator_p);
d_selectionId = SELECTION_ID_TUNABLES;
}
return d_tunables.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Tunables& Result::makeTunables(Tunables&& value)
{
if (SELECTION_ID_TUNABLES == d_selectionId) {
@@ -27028,7 +29666,8 @@ Tunables& Result::makeTunables(Tunables&& value)
}
else {
reset();
- new (d_tunables.buffer()) Tunables(bsl::move(value), d_allocator_p);
+ new (d_tunables.buffer())
+ Tunables(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_TUNABLES;
}
@@ -27044,15 +29683,14 @@ TunableConfirmation& Result::makeTunableConfirmation()
else {
reset();
new (d_tunableConfirmation.buffer())
- TunableConfirmation(d_allocator_p);
+ TunableConfirmation(d_allocator_p);
d_selectionId = SELECTION_ID_TUNABLE_CONFIRMATION;
}
return d_tunableConfirmation.object();
}
-TunableConfirmation&
-Result::makeTunableConfirmation(const TunableConfirmation& value)
+TunableConfirmation& Result::makeTunableConfirmation(const TunableConfirmation& value)
{
if (SELECTION_ID_TUNABLE_CONFIRMATION == d_selectionId) {
d_tunableConfirmation.object() = value;
@@ -27060,17 +29698,16 @@ Result::makeTunableConfirmation(const TunableConfirmation& value)
else {
reset();
new (d_tunableConfirmation.buffer())
- TunableConfirmation(value, d_allocator_p);
+ TunableConfirmation(value, d_allocator_p);
d_selectionId = SELECTION_ID_TUNABLE_CONFIRMATION;
}
return d_tunableConfirmation.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-TunableConfirmation&
-Result::makeTunableConfirmation(TunableConfirmation&& value)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+TunableConfirmation& Result::makeTunableConfirmation(TunableConfirmation&& value)
{
if (SELECTION_ID_TUNABLE_CONFIRMATION == d_selectionId) {
d_tunableConfirmation.object() = bsl::move(value);
@@ -27078,7 +29715,7 @@ Result::makeTunableConfirmation(TunableConfirmation&& value)
else {
reset();
new (d_tunableConfirmation.buffer())
- TunableConfirmation(bsl::move(value), d_allocator_p);
+ TunableConfirmation(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_TUNABLE_CONFIRMATION;
}
@@ -27093,7 +29730,8 @@ Help& Result::makeHelp()
}
else {
reset();
- new (d_help.buffer()) Help(d_allocator_p);
+ new (d_help.buffer())
+ Help(d_allocator_p);
d_selectionId = SELECTION_ID_HELP;
}
@@ -27107,15 +29745,16 @@ Help& Result::makeHelp(const Help& value)
}
else {
reset();
- new (d_help.buffer()) Help(value, d_allocator_p);
+ new (d_help.buffer())
+ Help(value, d_allocator_p);
d_selectionId = SELECTION_ID_HELP;
}
return d_help.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Help& Result::makeHelp(Help&& value)
{
if (SELECTION_ID_HELP == d_selectionId) {
@@ -27123,7 +29762,8 @@ Help& Result::makeHelp(Help&& value)
}
else {
reset();
- new (d_help.buffer()) Help(bsl::move(value), d_allocator_p);
+ new (d_help.buffer())
+ Help(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_HELP;
}
@@ -27138,7 +29778,8 @@ DomainInfo& Result::makeDomainInfo()
}
else {
reset();
- new (d_domainInfo.buffer()) DomainInfo(d_allocator_p);
+ new (d_domainInfo.buffer())
+ DomainInfo(d_allocator_p);
d_selectionId = SELECTION_ID_DOMAIN_INFO;
}
@@ -27152,15 +29793,16 @@ DomainInfo& Result::makeDomainInfo(const DomainInfo& value)
}
else {
reset();
- new (d_domainInfo.buffer()) DomainInfo(value, d_allocator_p);
+ new (d_domainInfo.buffer())
+ DomainInfo(value, d_allocator_p);
d_selectionId = SELECTION_ID_DOMAIN_INFO;
}
return d_domainInfo.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
DomainInfo& Result::makeDomainInfo(DomainInfo&& value)
{
if (SELECTION_ID_DOMAIN_INFO == d_selectionId) {
@@ -27169,7 +29811,7 @@ DomainInfo& Result::makeDomainInfo(DomainInfo&& value)
else {
reset();
new (d_domainInfo.buffer())
- DomainInfo(bsl::move(value), d_allocator_p);
+ DomainInfo(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_DOMAIN_INFO;
}
@@ -27184,7 +29826,8 @@ PurgedQueues& Result::makePurgedQueues()
}
else {
reset();
- new (d_purgedQueues.buffer()) PurgedQueues(d_allocator_p);
+ new (d_purgedQueues.buffer())
+ PurgedQueues(d_allocator_p);
d_selectionId = SELECTION_ID_PURGED_QUEUES;
}
@@ -27198,15 +29841,16 @@ PurgedQueues& Result::makePurgedQueues(const PurgedQueues& value)
}
else {
reset();
- new (d_purgedQueues.buffer()) PurgedQueues(value, d_allocator_p);
+ new (d_purgedQueues.buffer())
+ PurgedQueues(value, d_allocator_p);
d_selectionId = SELECTION_ID_PURGED_QUEUES;
}
return d_purgedQueues.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
PurgedQueues& Result::makePurgedQueues(PurgedQueues&& value)
{
if (SELECTION_ID_PURGED_QUEUES == d_selectionId) {
@@ -27215,7 +29859,7 @@ PurgedQueues& Result::makePurgedQueues(PurgedQueues&& value)
else {
reset();
new (d_purgedQueues.buffer())
- PurgedQueues(bsl::move(value), d_allocator_p);
+ PurgedQueues(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_PURGED_QUEUES;
}
@@ -27230,7 +29874,8 @@ QueueInternals& Result::makeQueueInternals()
}
else {
reset();
- new (d_queueInternals.buffer()) QueueInternals(d_allocator_p);
+ new (d_queueInternals.buffer())
+ QueueInternals(d_allocator_p);
d_selectionId = SELECTION_ID_QUEUE_INTERNALS;
}
@@ -27244,15 +29889,16 @@ QueueInternals& Result::makeQueueInternals(const QueueInternals& value)
}
else {
reset();
- new (d_queueInternals.buffer()) QueueInternals(value, d_allocator_p);
+ new (d_queueInternals.buffer())
+ QueueInternals(value, d_allocator_p);
d_selectionId = SELECTION_ID_QUEUE_INTERNALS;
}
return d_queueInternals.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
QueueInternals& Result::makeQueueInternals(QueueInternals&& value)
{
if (SELECTION_ID_QUEUE_INTERNALS == d_selectionId) {
@@ -27261,7 +29907,7 @@ QueueInternals& Result::makeQueueInternals(QueueInternals&& value)
else {
reset();
new (d_queueInternals.buffer())
- QueueInternals(bsl::move(value), d_allocator_p);
+ QueueInternals(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_QUEUE_INTERNALS;
}
@@ -27277,15 +29923,14 @@ MessageGroupIdHelper& Result::makeMessageGroupIdHelper()
else {
reset();
new (d_messageGroupIdHelper.buffer())
- MessageGroupIdHelper(d_allocator_p);
+ MessageGroupIdHelper(d_allocator_p);
d_selectionId = SELECTION_ID_MESSAGE_GROUP_ID_HELPER;
}
return d_messageGroupIdHelper.object();
}
-MessageGroupIdHelper&
-Result::makeMessageGroupIdHelper(const MessageGroupIdHelper& value)
+MessageGroupIdHelper& Result::makeMessageGroupIdHelper(const MessageGroupIdHelper& value)
{
if (SELECTION_ID_MESSAGE_GROUP_ID_HELPER == d_selectionId) {
d_messageGroupIdHelper.object() = value;
@@ -27293,17 +29938,16 @@ Result::makeMessageGroupIdHelper(const MessageGroupIdHelper& value)
else {
reset();
new (d_messageGroupIdHelper.buffer())
- MessageGroupIdHelper(value, d_allocator_p);
+ MessageGroupIdHelper(value, d_allocator_p);
d_selectionId = SELECTION_ID_MESSAGE_GROUP_ID_HELPER;
}
return d_messageGroupIdHelper.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-MessageGroupIdHelper&
-Result::makeMessageGroupIdHelper(MessageGroupIdHelper&& value)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+MessageGroupIdHelper& Result::makeMessageGroupIdHelper(MessageGroupIdHelper&& value)
{
if (SELECTION_ID_MESSAGE_GROUP_ID_HELPER == d_selectionId) {
d_messageGroupIdHelper.object() = bsl::move(value);
@@ -27311,7 +29955,7 @@ Result::makeMessageGroupIdHelper(MessageGroupIdHelper&& value)
else {
reset();
new (d_messageGroupIdHelper.buffer())
- MessageGroupIdHelper(bsl::move(value), d_allocator_p);
+ MessageGroupIdHelper(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_MESSAGE_GROUP_ID_HELPER;
}
@@ -27326,7 +29970,8 @@ QueueContents& Result::makeQueueContents()
}
else {
reset();
- new (d_queueContents.buffer()) QueueContents(d_allocator_p);
+ new (d_queueContents.buffer())
+ QueueContents(d_allocator_p);
d_selectionId = SELECTION_ID_QUEUE_CONTENTS;
}
@@ -27340,15 +29985,16 @@ QueueContents& Result::makeQueueContents(const QueueContents& value)
}
else {
reset();
- new (d_queueContents.buffer()) QueueContents(value, d_allocator_p);
+ new (d_queueContents.buffer())
+ QueueContents(value, d_allocator_p);
d_selectionId = SELECTION_ID_QUEUE_CONTENTS;
}
return d_queueContents.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
QueueContents& Result::makeQueueContents(QueueContents&& value)
{
if (SELECTION_ID_QUEUE_CONTENTS == d_selectionId) {
@@ -27357,7 +30003,7 @@ QueueContents& Result::makeQueueContents(QueueContents&& value)
else {
reset();
new (d_queueContents.buffer())
- QueueContents(bsl::move(value), d_allocator_p);
+ QueueContents(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_QUEUE_CONTENTS;
}
@@ -27372,7 +30018,8 @@ Message& Result::makeMessage()
}
else {
reset();
- new (d_message.buffer()) Message(d_allocator_p);
+ new (d_message.buffer())
+ Message(d_allocator_p);
d_selectionId = SELECTION_ID_MESSAGE;
}
@@ -27386,15 +30033,16 @@ Message& Result::makeMessage(const Message& value)
}
else {
reset();
- new (d_message.buffer()) Message(value, d_allocator_p);
+ new (d_message.buffer())
+ Message(value, d_allocator_p);
d_selectionId = SELECTION_ID_MESSAGE;
}
return d_message.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Message& Result::makeMessage(Message&& value)
{
if (SELECTION_ID_MESSAGE == d_selectionId) {
@@ -27402,7 +30050,8 @@ Message& Result::makeMessage(Message&& value)
}
else {
reset();
- new (d_message.buffer()) Message(bsl::move(value), d_allocator_p);
+ new (d_message.buffer())
+ Message(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_MESSAGE;
}
@@ -27417,7 +30066,8 @@ bsl::string& Result::makeStats()
}
else {
reset();
- new (d_stats.buffer()) bsl::string(d_allocator_p);
+ new (d_stats.buffer())
+ bsl::string(d_allocator_p);
d_selectionId = SELECTION_ID_STATS;
}
@@ -27431,15 +30081,16 @@ bsl::string& Result::makeStats(const bsl::string& value)
}
else {
reset();
- new (d_stats.buffer()) bsl::string(value, d_allocator_p);
+ new (d_stats.buffer())
+ bsl::string(value, d_allocator_p);
d_selectionId = SELECTION_ID_STATS;
}
return d_stats.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
bsl::string& Result::makeStats(bsl::string&& value)
{
if (SELECTION_ID_STATS == d_selectionId) {
@@ -27447,7 +30098,8 @@ bsl::string& Result::makeStats(bsl::string&& value)
}
else {
reset();
- new (d_stats.buffer()) bsl::string(bsl::move(value), d_allocator_p);
+ new (d_stats.buffer())
+ bsl::string(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_STATS;
}
@@ -27462,7 +30114,8 @@ ClusterList& Result::makeClusterList()
}
else {
reset();
- new (d_clusterList.buffer()) ClusterList(d_allocator_p);
+ new (d_clusterList.buffer())
+ ClusterList(d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER_LIST;
}
@@ -27476,15 +30129,16 @@ ClusterList& Result::makeClusterList(const ClusterList& value)
}
else {
reset();
- new (d_clusterList.buffer()) ClusterList(value, d_allocator_p);
+ new (d_clusterList.buffer())
+ ClusterList(value, d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER_LIST;
}
return d_clusterList.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ClusterList& Result::makeClusterList(ClusterList&& value)
{
if (SELECTION_ID_CLUSTER_LIST == d_selectionId) {
@@ -27493,7 +30147,7 @@ ClusterList& Result::makeClusterList(ClusterList&& value)
else {
reset();
new (d_clusterList.buffer())
- ClusterList(bsl::move(value), d_allocator_p);
+ ClusterList(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER_LIST;
}
@@ -27508,7 +30162,8 @@ ClusterStatus& Result::makeClusterStatus()
}
else {
reset();
- new (d_clusterStatus.buffer()) ClusterStatus(d_allocator_p);
+ new (d_clusterStatus.buffer())
+ ClusterStatus(d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER_STATUS;
}
@@ -27522,15 +30177,16 @@ ClusterStatus& Result::makeClusterStatus(const ClusterStatus& value)
}
else {
reset();
- new (d_clusterStatus.buffer()) ClusterStatus(value, d_allocator_p);
+ new (d_clusterStatus.buffer())
+ ClusterStatus(value, d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER_STATUS;
}
return d_clusterStatus.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ClusterStatus& Result::makeClusterStatus(ClusterStatus&& value)
{
if (SELECTION_ID_CLUSTER_STATUS == d_selectionId) {
@@ -27539,7 +30195,7 @@ ClusterStatus& Result::makeClusterStatus(ClusterStatus&& value)
else {
reset();
new (d_clusterStatus.buffer())
- ClusterStatus(bsl::move(value), d_allocator_p);
+ ClusterStatus(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER_STATUS;
}
@@ -27554,15 +30210,15 @@ ClusterProxyStatus& Result::makeClusterProxyStatus()
}
else {
reset();
- new (d_clusterProxyStatus.buffer()) ClusterProxyStatus(d_allocator_p);
+ new (d_clusterProxyStatus.buffer())
+ ClusterProxyStatus(d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER_PROXY_STATUS;
}
return d_clusterProxyStatus.object();
}
-ClusterProxyStatus&
-Result::makeClusterProxyStatus(const ClusterProxyStatus& value)
+ClusterProxyStatus& Result::makeClusterProxyStatus(const ClusterProxyStatus& value)
{
if (SELECTION_ID_CLUSTER_PROXY_STATUS == d_selectionId) {
d_clusterProxyStatus.object() = value;
@@ -27570,15 +30226,15 @@ Result::makeClusterProxyStatus(const ClusterProxyStatus& value)
else {
reset();
new (d_clusterProxyStatus.buffer())
- ClusterProxyStatus(value, d_allocator_p);
+ ClusterProxyStatus(value, d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER_PROXY_STATUS;
}
return d_clusterProxyStatus.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ClusterProxyStatus& Result::makeClusterProxyStatus(ClusterProxyStatus&& value)
{
if (SELECTION_ID_CLUSTER_PROXY_STATUS == d_selectionId) {
@@ -27587,7 +30243,7 @@ ClusterProxyStatus& Result::makeClusterProxyStatus(ClusterProxyStatus&& value)
else {
reset();
new (d_clusterProxyStatus.buffer())
- ClusterProxyStatus(bsl::move(value), d_allocator_p);
+ ClusterProxyStatus(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER_PROXY_STATUS;
}
@@ -27602,7 +30258,8 @@ NodeStatuses& Result::makeNodeStatuses()
}
else {
reset();
- new (d_nodeStatuses.buffer()) NodeStatuses(d_allocator_p);
+ new (d_nodeStatuses.buffer())
+ NodeStatuses(d_allocator_p);
d_selectionId = SELECTION_ID_NODE_STATUSES;
}
@@ -27616,15 +30273,16 @@ NodeStatuses& Result::makeNodeStatuses(const NodeStatuses& value)
}
else {
reset();
- new (d_nodeStatuses.buffer()) NodeStatuses(value, d_allocator_p);
+ new (d_nodeStatuses.buffer())
+ NodeStatuses(value, d_allocator_p);
d_selectionId = SELECTION_ID_NODE_STATUSES;
}
return d_nodeStatuses.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
NodeStatuses& Result::makeNodeStatuses(NodeStatuses&& value)
{
if (SELECTION_ID_NODE_STATUSES == d_selectionId) {
@@ -27633,7 +30291,7 @@ NodeStatuses& Result::makeNodeStatuses(NodeStatuses&& value)
else {
reset();
new (d_nodeStatuses.buffer())
- NodeStatuses(bsl::move(value), d_allocator_p);
+ NodeStatuses(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_NODE_STATUSES;
}
@@ -27648,7 +30306,8 @@ ElectorInfo& Result::makeElectorInfo()
}
else {
reset();
- new (d_electorInfo.buffer()) ElectorInfo(d_allocator_p);
+ new (d_electorInfo.buffer())
+ ElectorInfo(d_allocator_p);
d_selectionId = SELECTION_ID_ELECTOR_INFO;
}
@@ -27662,15 +30321,16 @@ ElectorInfo& Result::makeElectorInfo(const ElectorInfo& value)
}
else {
reset();
- new (d_electorInfo.buffer()) ElectorInfo(value, d_allocator_p);
+ new (d_electorInfo.buffer())
+ ElectorInfo(value, d_allocator_p);
d_selectionId = SELECTION_ID_ELECTOR_INFO;
}
return d_electorInfo.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ElectorInfo& Result::makeElectorInfo(ElectorInfo&& value)
{
if (SELECTION_ID_ELECTOR_INFO == d_selectionId) {
@@ -27679,7 +30339,7 @@ ElectorInfo& Result::makeElectorInfo(ElectorInfo&& value)
else {
reset();
new (d_electorInfo.buffer())
- ElectorInfo(bsl::move(value), d_allocator_p);
+ ElectorInfo(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_ELECTOR_INFO;
}
@@ -27694,7 +30354,8 @@ PartitionsInfo& Result::makePartitionsInfo()
}
else {
reset();
- new (d_partitionsInfo.buffer()) PartitionsInfo(d_allocator_p);
+ new (d_partitionsInfo.buffer())
+ PartitionsInfo(d_allocator_p);
d_selectionId = SELECTION_ID_PARTITIONS_INFO;
}
@@ -27708,15 +30369,16 @@ PartitionsInfo& Result::makePartitionsInfo(const PartitionsInfo& value)
}
else {
reset();
- new (d_partitionsInfo.buffer()) PartitionsInfo(value, d_allocator_p);
+ new (d_partitionsInfo.buffer())
+ PartitionsInfo(value, d_allocator_p);
d_selectionId = SELECTION_ID_PARTITIONS_INFO;
}
return d_partitionsInfo.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
PartitionsInfo& Result::makePartitionsInfo(PartitionsInfo&& value)
{
if (SELECTION_ID_PARTITIONS_INFO == d_selectionId) {
@@ -27725,7 +30387,7 @@ PartitionsInfo& Result::makePartitionsInfo(PartitionsInfo&& value)
else {
reset();
new (d_partitionsInfo.buffer())
- PartitionsInfo(bsl::move(value), d_allocator_p);
+ PartitionsInfo(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_PARTITIONS_INFO;
}
@@ -27740,15 +30402,15 @@ ClusterQueueHelper& Result::makeClusterQueueHelper()
}
else {
reset();
- new (d_clusterQueueHelper.buffer()) ClusterQueueHelper(d_allocator_p);
+ new (d_clusterQueueHelper.buffer())
+ ClusterQueueHelper(d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER_QUEUE_HELPER;
}
return d_clusterQueueHelper.object();
}
-ClusterQueueHelper&
-Result::makeClusterQueueHelper(const ClusterQueueHelper& value)
+ClusterQueueHelper& Result::makeClusterQueueHelper(const ClusterQueueHelper& value)
{
if (SELECTION_ID_CLUSTER_QUEUE_HELPER == d_selectionId) {
d_clusterQueueHelper.object() = value;
@@ -27756,15 +30418,15 @@ Result::makeClusterQueueHelper(const ClusterQueueHelper& value)
else {
reset();
new (d_clusterQueueHelper.buffer())
- ClusterQueueHelper(value, d_allocator_p);
+ ClusterQueueHelper(value, d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER_QUEUE_HELPER;
}
return d_clusterQueueHelper.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ClusterQueueHelper& Result::makeClusterQueueHelper(ClusterQueueHelper&& value)
{
if (SELECTION_ID_CLUSTER_QUEUE_HELPER == d_selectionId) {
@@ -27773,7 +30435,7 @@ ClusterQueueHelper& Result::makeClusterQueueHelper(ClusterQueueHelper&& value)
else {
reset();
new (d_clusterQueueHelper.buffer())
- ClusterQueueHelper(bsl::move(value), d_allocator_p);
+ ClusterQueueHelper(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER_QUEUE_HELPER;
}
@@ -27788,7 +30450,8 @@ StorageContent& Result::makeStorageContent()
}
else {
reset();
- new (d_storageContent.buffer()) StorageContent(d_allocator_p);
+ new (d_storageContent.buffer())
+ StorageContent(d_allocator_p);
d_selectionId = SELECTION_ID_STORAGE_CONTENT;
}
@@ -27802,15 +30465,16 @@ StorageContent& Result::makeStorageContent(const StorageContent& value)
}
else {
reset();
- new (d_storageContent.buffer()) StorageContent(value, d_allocator_p);
+ new (d_storageContent.buffer())
+ StorageContent(value, d_allocator_p);
d_selectionId = SELECTION_ID_STORAGE_CONTENT;
}
return d_storageContent.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
StorageContent& Result::makeStorageContent(StorageContent&& value)
{
if (SELECTION_ID_STORAGE_CONTENT == d_selectionId) {
@@ -27819,7 +30483,7 @@ StorageContent& Result::makeStorageContent(StorageContent&& value)
else {
reset();
new (d_storageContent.buffer())
- StorageContent(bsl::move(value), d_allocator_p);
+ StorageContent(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_STORAGE_CONTENT;
}
@@ -27835,15 +30499,14 @@ ClusterStorageSummary& Result::makeClusterStorageSummary()
else {
reset();
new (d_clusterStorageSummary.buffer())
- ClusterStorageSummary(d_allocator_p);
+ ClusterStorageSummary(d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER_STORAGE_SUMMARY;
}
return d_clusterStorageSummary.object();
}
-ClusterStorageSummary&
-Result::makeClusterStorageSummary(const ClusterStorageSummary& value)
+ClusterStorageSummary& Result::makeClusterStorageSummary(const ClusterStorageSummary& value)
{
if (SELECTION_ID_CLUSTER_STORAGE_SUMMARY == d_selectionId) {
d_clusterStorageSummary.object() = value;
@@ -27851,17 +30514,16 @@ Result::makeClusterStorageSummary(const ClusterStorageSummary& value)
else {
reset();
new (d_clusterStorageSummary.buffer())
- ClusterStorageSummary(value, d_allocator_p);
+ ClusterStorageSummary(value, d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER_STORAGE_SUMMARY;
}
return d_clusterStorageSummary.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-ClusterStorageSummary&
-Result::makeClusterStorageSummary(ClusterStorageSummary&& value)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ClusterStorageSummary& Result::makeClusterStorageSummary(ClusterStorageSummary&& value)
{
if (SELECTION_ID_CLUSTER_STORAGE_SUMMARY == d_selectionId) {
d_clusterStorageSummary.object() = bsl::move(value);
@@ -27869,7 +30531,7 @@ Result::makeClusterStorageSummary(ClusterStorageSummary&& value)
else {
reset();
new (d_clusterStorageSummary.buffer())
- ClusterStorageSummary(bsl::move(value), d_allocator_p);
+ ClusterStorageSummary(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER_STORAGE_SUMMARY;
}
@@ -27880,21 +30542,19 @@ Result::makeClusterStorageSummary(ClusterStorageSummary&& value)
ClusterDomainQueueStatuses& Result::makeClusterDomainQueueStatuses()
{
if (SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES == d_selectionId) {
- bdlat_ValueTypeFunctions::reset(
- &d_clusterDomainQueueStatuses.object());
+ bdlat_ValueTypeFunctions::reset(&d_clusterDomainQueueStatuses.object());
}
else {
reset();
new (d_clusterDomainQueueStatuses.buffer())
- ClusterDomainQueueStatuses(d_allocator_p);
+ ClusterDomainQueueStatuses(d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES;
}
return d_clusterDomainQueueStatuses.object();
}
-ClusterDomainQueueStatuses&
-Result::makeClusterDomainQueueStatuses(const ClusterDomainQueueStatuses& value)
+ClusterDomainQueueStatuses& Result::makeClusterDomainQueueStatuses(const ClusterDomainQueueStatuses& value)
{
if (SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES == d_selectionId) {
d_clusterDomainQueueStatuses.object() = value;
@@ -27902,17 +30562,16 @@ Result::makeClusterDomainQueueStatuses(const ClusterDomainQueueStatuses& value)
else {
reset();
new (d_clusterDomainQueueStatuses.buffer())
- ClusterDomainQueueStatuses(value, d_allocator_p);
+ ClusterDomainQueueStatuses(value, d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES;
}
return d_clusterDomainQueueStatuses.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-ClusterDomainQueueStatuses&
-Result::makeClusterDomainQueueStatuses(ClusterDomainQueueStatuses&& value)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ClusterDomainQueueStatuses& Result::makeClusterDomainQueueStatuses(ClusterDomainQueueStatuses&& value)
{
if (SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES == d_selectionId) {
d_clusterDomainQueueStatuses.object() = bsl::move(value);
@@ -27920,7 +30579,7 @@ Result::makeClusterDomainQueueStatuses(ClusterDomainQueueStatuses&& value)
else {
reset();
new (d_clusterDomainQueueStatuses.buffer())
- ClusterDomainQueueStatuses(bsl::move(value), d_allocator_p);
+ ClusterDomainQueueStatuses(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES;
}
@@ -27935,7 +30594,8 @@ BrokerConfig& Result::makeBrokerConfig()
}
else {
reset();
- new (d_brokerConfig.buffer()) BrokerConfig(d_allocator_p);
+ new (d_brokerConfig.buffer())
+ BrokerConfig(d_allocator_p);
d_selectionId = SELECTION_ID_BROKER_CONFIG;
}
@@ -27949,15 +30609,16 @@ BrokerConfig& Result::makeBrokerConfig(const BrokerConfig& value)
}
else {
reset();
- new (d_brokerConfig.buffer()) BrokerConfig(value, d_allocator_p);
+ new (d_brokerConfig.buffer())
+ BrokerConfig(value, d_allocator_p);
d_selectionId = SELECTION_ID_BROKER_CONFIG;
}
return d_brokerConfig.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
BrokerConfig& Result::makeBrokerConfig(BrokerConfig&& value)
{
if (SELECTION_ID_BROKER_CONFIG == d_selectionId) {
@@ -27966,7 +30627,7 @@ BrokerConfig& Result::makeBrokerConfig(BrokerConfig&& value)
else {
reset();
new (d_brokerConfig.buffer())
- BrokerConfig(bsl::move(value), d_allocator_p);
+ BrokerConfig(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_BROKER_CONFIG;
}
@@ -27976,211 +30637,215 @@ BrokerConfig& Result::makeBrokerConfig(BrokerConfig&& value)
// ACCESSORS
-bsl::ostream&
-Result::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& Result::print(
+ bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
switch (d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
printer.printAttribute("error", d_error.object());
- } break;
- case SELECTION_ID_SUCCESS: {
+ } break;
+ case SELECTION_ID_SUCCESS: {
printer.printAttribute("success", d_success.object());
- } break;
- case SELECTION_ID_VALUE: {
+ } break;
+ case SELECTION_ID_VALUE: {
printer.printAttribute("value", d_value.object());
- } break;
- case SELECTION_ID_TUNABLE: {
+ } break;
+ case SELECTION_ID_TUNABLE: {
printer.printAttribute("tunable", d_tunable.object());
- } break;
- case SELECTION_ID_TUNABLES: {
+ } break;
+ case SELECTION_ID_TUNABLES: {
printer.printAttribute("tunables", d_tunables.object());
- } break;
- case SELECTION_ID_TUNABLE_CONFIRMATION: {
- printer.printAttribute("tunableConfirmation",
- d_tunableConfirmation.object());
- } break;
- case SELECTION_ID_HELP: {
+ } break;
+ case SELECTION_ID_TUNABLE_CONFIRMATION: {
+ printer.printAttribute("tunableConfirmation", d_tunableConfirmation.object());
+ } break;
+ case SELECTION_ID_HELP: {
printer.printAttribute("help", d_help.object());
- } break;
- case SELECTION_ID_DOMAIN_INFO: {
+ } break;
+ case SELECTION_ID_DOMAIN_INFO: {
printer.printAttribute("domainInfo", d_domainInfo.object());
- } break;
- case SELECTION_ID_PURGED_QUEUES: {
+ } break;
+ case SELECTION_ID_PURGED_QUEUES: {
printer.printAttribute("purgedQueues", d_purgedQueues.object());
- } break;
- case SELECTION_ID_QUEUE_INTERNALS: {
+ } break;
+ case SELECTION_ID_QUEUE_INTERNALS: {
printer.printAttribute("queueInternals", d_queueInternals.object());
- } break;
- case SELECTION_ID_MESSAGE_GROUP_ID_HELPER: {
- printer.printAttribute("messageGroupIdHelper",
- d_messageGroupIdHelper.object());
- } break;
- case SELECTION_ID_QUEUE_CONTENTS: {
+ } break;
+ case SELECTION_ID_MESSAGE_GROUP_ID_HELPER: {
+ printer.printAttribute("messageGroupIdHelper", d_messageGroupIdHelper.object());
+ } break;
+ case SELECTION_ID_QUEUE_CONTENTS: {
printer.printAttribute("queueContents", d_queueContents.object());
- } break;
- case SELECTION_ID_MESSAGE: {
+ } break;
+ case SELECTION_ID_MESSAGE: {
printer.printAttribute("message", d_message.object());
- } break;
- case SELECTION_ID_STATS: {
+ } break;
+ case SELECTION_ID_STATS: {
printer.printAttribute("stats", d_stats.object());
- } break;
- case SELECTION_ID_CLUSTER_LIST: {
+ } break;
+ case SELECTION_ID_CLUSTER_LIST: {
printer.printAttribute("clusterList", d_clusterList.object());
- } break;
- case SELECTION_ID_CLUSTER_STATUS: {
+ } break;
+ case SELECTION_ID_CLUSTER_STATUS: {
printer.printAttribute("clusterStatus", d_clusterStatus.object());
- } break;
- case SELECTION_ID_CLUSTER_PROXY_STATUS: {
- printer.printAttribute("clusterProxyStatus",
- d_clusterProxyStatus.object());
- } break;
- case SELECTION_ID_NODE_STATUSES: {
+ } break;
+ case SELECTION_ID_CLUSTER_PROXY_STATUS: {
+ printer.printAttribute("clusterProxyStatus", d_clusterProxyStatus.object());
+ } break;
+ case SELECTION_ID_NODE_STATUSES: {
printer.printAttribute("nodeStatuses", d_nodeStatuses.object());
- } break;
- case SELECTION_ID_ELECTOR_INFO: {
+ } break;
+ case SELECTION_ID_ELECTOR_INFO: {
printer.printAttribute("electorInfo", d_electorInfo.object());
- } break;
- case SELECTION_ID_PARTITIONS_INFO: {
+ } break;
+ case SELECTION_ID_PARTITIONS_INFO: {
printer.printAttribute("partitionsInfo", d_partitionsInfo.object());
- } break;
- case SELECTION_ID_CLUSTER_QUEUE_HELPER: {
- printer.printAttribute("clusterQueueHelper",
- d_clusterQueueHelper.object());
- } break;
- case SELECTION_ID_STORAGE_CONTENT: {
+ } break;
+ case SELECTION_ID_CLUSTER_QUEUE_HELPER: {
+ printer.printAttribute("clusterQueueHelper", d_clusterQueueHelper.object());
+ } break;
+ case SELECTION_ID_STORAGE_CONTENT: {
printer.printAttribute("storageContent", d_storageContent.object());
- } break;
- case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: {
- printer.printAttribute("clusterStorageSummary",
- d_clusterStorageSummary.object());
- } break;
- case SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES: {
- printer.printAttribute("clusterDomainQueueStatuses",
- d_clusterDomainQueueStatuses.object());
- } break;
- case SELECTION_ID_BROKER_CONFIG: {
+ } break;
+ case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: {
+ printer.printAttribute("clusterStorageSummary", d_clusterStorageSummary.object());
+ } break;
+ case SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES: {
+ printer.printAttribute("clusterDomainQueueStatuses", d_clusterDomainQueueStatuses.object());
+ } break;
+ case SELECTION_ID_BROKER_CONFIG: {
printer.printAttribute("brokerConfig", d_brokerConfig.object());
- } break;
- default: stream << "SELECTION UNDEFINED\n";
+ } break;
+ default:
+ stream << "SELECTION UNDEFINED\n";
}
printer.end();
return stream;
}
-const char* Result::selectionName() const
+
+const char *Result::selectionName() const
{
switch (d_selectionId) {
- case SELECTION_ID_ERROR:
+ case SELECTION_ID_ERROR:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR].name();
- case SELECTION_ID_SUCCESS:
+ case SELECTION_ID_SUCCESS:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_SUCCESS].name();
- case SELECTION_ID_VALUE:
+ case SELECTION_ID_VALUE:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_VALUE].name();
- case SELECTION_ID_TUNABLE:
+ case SELECTION_ID_TUNABLE:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE].name();
- case SELECTION_ID_TUNABLES:
+ case SELECTION_ID_TUNABLES:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLES].name();
- case SELECTION_ID_TUNABLE_CONFIRMATION:
- return SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE_CONFIRMATION]
- .name();
- case SELECTION_ID_HELP:
+ case SELECTION_ID_TUNABLE_CONFIRMATION:
+ return SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE_CONFIRMATION].name();
+ case SELECTION_ID_HELP:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_HELP].name();
- case SELECTION_ID_DOMAIN_INFO:
+ case SELECTION_ID_DOMAIN_INFO:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAIN_INFO].name();
- case SELECTION_ID_PURGED_QUEUES:
+ case SELECTION_ID_PURGED_QUEUES:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_PURGED_QUEUES].name();
- case SELECTION_ID_QUEUE_INTERNALS:
+ case SELECTION_ID_QUEUE_INTERNALS:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE_INTERNALS].name();
- case SELECTION_ID_MESSAGE_GROUP_ID_HELPER:
- return SELECTION_INFO_ARRAY[SELECTION_INDEX_MESSAGE_GROUP_ID_HELPER]
- .name();
- case SELECTION_ID_QUEUE_CONTENTS:
+ case SELECTION_ID_MESSAGE_GROUP_ID_HELPER:
+ return SELECTION_INFO_ARRAY[SELECTION_INDEX_MESSAGE_GROUP_ID_HELPER].name();
+ case SELECTION_ID_QUEUE_CONTENTS:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE_CONTENTS].name();
- case SELECTION_ID_MESSAGE:
+ case SELECTION_ID_MESSAGE:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_MESSAGE].name();
- case SELECTION_ID_STATS:
+ case SELECTION_ID_STATS:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_STATS].name();
- case SELECTION_ID_CLUSTER_LIST:
+ case SELECTION_ID_CLUSTER_LIST:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_LIST].name();
- case SELECTION_ID_CLUSTER_STATUS:
+ case SELECTION_ID_CLUSTER_STATUS:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_STATUS].name();
- case SELECTION_ID_CLUSTER_PROXY_STATUS:
- return SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_PROXY_STATUS]
- .name();
- case SELECTION_ID_NODE_STATUSES:
+ case SELECTION_ID_CLUSTER_PROXY_STATUS:
+ return SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_PROXY_STATUS].name();
+ case SELECTION_ID_NODE_STATUSES:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_NODE_STATUSES].name();
- case SELECTION_ID_ELECTOR_INFO:
+ case SELECTION_ID_ELECTOR_INFO:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_ELECTOR_INFO].name();
- case SELECTION_ID_PARTITIONS_INFO:
+ case SELECTION_ID_PARTITIONS_INFO:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_PARTITIONS_INFO].name();
- case SELECTION_ID_CLUSTER_QUEUE_HELPER:
- return SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_QUEUE_HELPER]
- .name();
- case SELECTION_ID_STORAGE_CONTENT:
+ case SELECTION_ID_CLUSTER_QUEUE_HELPER:
+ return SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_QUEUE_HELPER].name();
+ case SELECTION_ID_STORAGE_CONTENT:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_STORAGE_CONTENT].name();
- case SELECTION_ID_CLUSTER_STORAGE_SUMMARY:
- return SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_STORAGE_SUMMARY]
- .name();
- case SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES:
- return SELECTION_INFO_ARRAY
- [SELECTION_INDEX_CLUSTER_DOMAIN_QUEUE_STATUSES]
- .name();
- case SELECTION_ID_BROKER_CONFIG:
+ case SELECTION_ID_CLUSTER_STORAGE_SUMMARY:
+ return SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_STORAGE_SUMMARY].name();
+ case SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES:
+ return SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_DOMAIN_QUEUE_STATUSES].name();
+ case SELECTION_ID_BROKER_CONFIG:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_BROKER_CONFIG].name();
- default:
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
return "(* UNDEFINED *)";
}
}
-// ------------------
-// class DomainResult
-// ------------------
+ // ------------------
+ // class DomainResult
+ // ------------------
// CONSTANTS
const char DomainResult::CLASS_NAME[] = "DomainResult";
const bdlat_SelectionInfo DomainResult::SELECTION_INFO_ARRAY[] = {
- {SELECTION_ID_SUCCESS,
- "success",
- sizeof("success") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_ERROR,
- "error",
- sizeof("error") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_DOMAIN_INFO,
- "domainInfo",
- sizeof("domainInfo") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_PURGED_QUEUES,
- "purgedQueues",
- sizeof("purgedQueues") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_QUEUE_RESULT,
- "queueResult",
- sizeof("queueResult") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ SELECTION_ID_SUCCESS,
+ "success",
+ sizeof("success") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_ERROR,
+ "error",
+ sizeof("error") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_DOMAIN_INFO,
+ "domainInfo",
+ sizeof("domainInfo") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_PURGED_QUEUES,
+ "purgedQueues",
+ sizeof("purgedQueues") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_QUEUE_RESULT,
+ "queueResult",
+ sizeof("queueResult") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_SelectionInfo* DomainResult::lookupSelectionInfo(const char* name,
- int nameLength)
+const bdlat_SelectionInfo *DomainResult::lookupSelectionInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 5; ++i) {
const bdlat_SelectionInfo& selectionInfo =
- DomainResult::SELECTION_INFO_ARRAY[i];
+ DomainResult::SELECTION_INFO_ARRAY[i];
- if (nameLength == selectionInfo.d_nameLength &&
- 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength)) {
+ if (nameLength == selectionInfo.d_nameLength
+ && 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength))
+ {
return &selectionInfo;
}
}
@@ -28188,141 +30853,158 @@ const bdlat_SelectionInfo* DomainResult::lookupSelectionInfo(const char* name,
return 0;
}
-const bdlat_SelectionInfo* DomainResult::lookupSelectionInfo(int id)
+const bdlat_SelectionInfo *DomainResult::lookupSelectionInfo(int id)
{
switch (id) {
- case SELECTION_ID_SUCCESS:
+ case SELECTION_ID_SUCCESS:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_SUCCESS];
- case SELECTION_ID_ERROR:
+ case SELECTION_ID_ERROR:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR];
- case SELECTION_ID_DOMAIN_INFO:
+ case SELECTION_ID_DOMAIN_INFO:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAIN_INFO];
- case SELECTION_ID_PURGED_QUEUES:
+ case SELECTION_ID_PURGED_QUEUES:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_PURGED_QUEUES];
- case SELECTION_ID_QUEUE_RESULT:
+ case SELECTION_ID_QUEUE_RESULT:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE_RESULT];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-DomainResult::DomainResult(const DomainResult& original,
- bslma::Allocator* basicAllocator)
+DomainResult::DomainResult(
+ const DomainResult& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_SUCCESS: {
- new (d_success.buffer()) Void(original.d_success.object());
- } break;
- case SELECTION_ID_ERROR: {
- new (d_error.buffer()) Error(original.d_error.object(), d_allocator_p);
- } break;
- case SELECTION_ID_DOMAIN_INFO: {
+ case SELECTION_ID_SUCCESS: {
+ new (d_success.buffer())
+ Void(original.d_success.object());
+ } break;
+ case SELECTION_ID_ERROR: {
+ new (d_error.buffer())
+ Error(
+ original.d_error.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_DOMAIN_INFO: {
new (d_domainInfo.buffer())
- DomainInfo(original.d_domainInfo.object(), d_allocator_p);
- } break;
- case SELECTION_ID_PURGED_QUEUES: {
+ DomainInfo(
+ original.d_domainInfo.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_PURGED_QUEUES: {
new (d_purgedQueues.buffer())
- PurgedQueues(original.d_purgedQueues.object(), d_allocator_p);
- } break;
- case SELECTION_ID_QUEUE_RESULT: {
+ PurgedQueues(
+ original.d_purgedQueues.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_QUEUE_RESULT: {
new (d_queueResult.buffer())
- QueueResult(original.d_queueResult.object(), d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ QueueResult(
+ original.d_queueResult.object(), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
DomainResult::DomainResult(DomainResult&& original) noexcept
-: d_selectionId(original.d_selectionId),
- d_allocator_p(original.d_allocator_p)
+: d_selectionId(original.d_selectionId)
+, d_allocator_p(original.d_allocator_p)
{
switch (d_selectionId) {
- case SELECTION_ID_SUCCESS: {
- new (d_success.buffer()) Void(bsl::move(original.d_success.object()));
- } break;
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_SUCCESS: {
+ new (d_success.buffer())
+ Void(bsl::move(original.d_success.object()));
+ } break;
+ case SELECTION_ID_ERROR: {
new (d_error.buffer())
- Error(bsl::move(original.d_error.object()), d_allocator_p);
- } break;
- case SELECTION_ID_DOMAIN_INFO: {
+ Error(
+ bsl::move(original.d_error.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_DOMAIN_INFO: {
new (d_domainInfo.buffer())
- DomainInfo(bsl::move(original.d_domainInfo.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_PURGED_QUEUES: {
+ DomainInfo(
+ bsl::move(original.d_domainInfo.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_PURGED_QUEUES: {
new (d_purgedQueues.buffer())
- PurgedQueues(bsl::move(original.d_purgedQueues.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_QUEUE_RESULT: {
+ PurgedQueues(
+ bsl::move(original.d_purgedQueues.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_QUEUE_RESULT: {
new (d_queueResult.buffer())
- QueueResult(bsl::move(original.d_queueResult.object()),
- d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ QueueResult(
+ bsl::move(original.d_queueResult.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-DomainResult::DomainResult(DomainResult&& original,
- bslma::Allocator* basicAllocator)
+DomainResult::DomainResult(
+ DomainResult&& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_SUCCESS: {
- new (d_success.buffer()) Void(bsl::move(original.d_success.object()));
- } break;
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_SUCCESS: {
+ new (d_success.buffer())
+ Void(bsl::move(original.d_success.object()));
+ } break;
+ case SELECTION_ID_ERROR: {
new (d_error.buffer())
- Error(bsl::move(original.d_error.object()), d_allocator_p);
- } break;
- case SELECTION_ID_DOMAIN_INFO: {
+ Error(
+ bsl::move(original.d_error.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_DOMAIN_INFO: {
new (d_domainInfo.buffer())
- DomainInfo(bsl::move(original.d_domainInfo.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_PURGED_QUEUES: {
+ DomainInfo(
+ bsl::move(original.d_domainInfo.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_PURGED_QUEUES: {
new (d_purgedQueues.buffer())
- PurgedQueues(bsl::move(original.d_purgedQueues.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_QUEUE_RESULT: {
+ PurgedQueues(
+ bsl::move(original.d_purgedQueues.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_QUEUE_RESULT: {
new (d_queueResult.buffer())
- QueueResult(bsl::move(original.d_queueResult.object()),
- d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ QueueResult(
+ bsl::move(original.d_queueResult.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
#endif
// MANIPULATORS
-DomainResult& DomainResult::operator=(const DomainResult& rhs)
+DomainResult&
+DomainResult::operator=(const DomainResult& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_SUCCESS: {
+ case SELECTION_ID_SUCCESS: {
makeSuccess(rhs.d_success.object());
- } break;
- case SELECTION_ID_ERROR: {
+ } break;
+ case SELECTION_ID_ERROR: {
makeError(rhs.d_error.object());
- } break;
- case SELECTION_ID_DOMAIN_INFO: {
+ } break;
+ case SELECTION_ID_DOMAIN_INFO: {
makeDomainInfo(rhs.d_domainInfo.object());
- } break;
- case SELECTION_ID_PURGED_QUEUES: {
+ } break;
+ case SELECTION_ID_PURGED_QUEUES: {
makePurgedQueues(rhs.d_purgedQueues.object());
- } break;
- case SELECTION_ID_QUEUE_RESULT: {
+ } break;
+ case SELECTION_ID_QUEUE_RESULT: {
makeQueueResult(rhs.d_queueResult.object());
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -28331,28 +31013,29 @@ DomainResult& DomainResult::operator=(const DomainResult& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-DomainResult& DomainResult::operator=(DomainResult&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+DomainResult&
+DomainResult::operator=(DomainResult&& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_SUCCESS: {
+ case SELECTION_ID_SUCCESS: {
makeSuccess(bsl::move(rhs.d_success.object()));
- } break;
- case SELECTION_ID_ERROR: {
+ } break;
+ case SELECTION_ID_ERROR: {
makeError(bsl::move(rhs.d_error.object()));
- } break;
- case SELECTION_ID_DOMAIN_INFO: {
+ } break;
+ case SELECTION_ID_DOMAIN_INFO: {
makeDomainInfo(bsl::move(rhs.d_domainInfo.object()));
- } break;
- case SELECTION_ID_PURGED_QUEUES: {
+ } break;
+ case SELECTION_ID_PURGED_QUEUES: {
makePurgedQueues(bsl::move(rhs.d_purgedQueues.object()));
- } break;
- case SELECTION_ID_QUEUE_RESULT: {
+ } break;
+ case SELECTION_ID_QUEUE_RESULT: {
makeQueueResult(bsl::move(rhs.d_queueResult.object()));
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -28365,22 +31048,23 @@ DomainResult& DomainResult::operator=(DomainResult&& rhs)
void DomainResult::reset()
{
switch (d_selectionId) {
- case SELECTION_ID_SUCCESS: {
+ case SELECTION_ID_SUCCESS: {
d_success.object().~Void();
- } break;
- case SELECTION_ID_ERROR: {
+ } break;
+ case SELECTION_ID_ERROR: {
d_error.object().~Error();
- } break;
- case SELECTION_ID_DOMAIN_INFO: {
+ } break;
+ case SELECTION_ID_DOMAIN_INFO: {
d_domainInfo.object().~DomainInfo();
- } break;
- case SELECTION_ID_PURGED_QUEUES: {
+ } break;
+ case SELECTION_ID_PURGED_QUEUES: {
d_purgedQueues.object().~PurgedQueues();
- } break;
- case SELECTION_ID_QUEUE_RESULT: {
+ } break;
+ case SELECTION_ID_QUEUE_RESULT: {
d_queueResult.object().~QueueResult();
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
d_selectionId = SELECTION_ID_UNDEFINED;
@@ -28389,35 +31073,36 @@ void DomainResult::reset()
int DomainResult::makeSelection(int selectionId)
{
switch (selectionId) {
- case SELECTION_ID_SUCCESS: {
+ case SELECTION_ID_SUCCESS: {
makeSuccess();
- } break;
- case SELECTION_ID_ERROR: {
+ } break;
+ case SELECTION_ID_ERROR: {
makeError();
- } break;
- case SELECTION_ID_DOMAIN_INFO: {
+ } break;
+ case SELECTION_ID_DOMAIN_INFO: {
makeDomainInfo();
- } break;
- case SELECTION_ID_PURGED_QUEUES: {
+ } break;
+ case SELECTION_ID_PURGED_QUEUES: {
makePurgedQueues();
- } break;
- case SELECTION_ID_QUEUE_RESULT: {
+ } break;
+ case SELECTION_ID_QUEUE_RESULT: {
makeQueueResult();
- } break;
- case SELECTION_ID_UNDEFINED: {
+ } break;
+ case SELECTION_ID_UNDEFINED: {
reset();
- } break;
- default: return -1;
+ } break;
+ default:
+ return -1;
}
return 0;
}
-int DomainResult::makeSelection(const char* name, int nameLength)
+int DomainResult::makeSelection(const char *name, int nameLength)
{
- const bdlat_SelectionInfo* selectionInfo = lookupSelectionInfo(name,
- nameLength);
+ const bdlat_SelectionInfo *selectionInfo =
+ lookupSelectionInfo(name, nameLength);
if (0 == selectionInfo) {
- return -1;
+ return -1;
}
return makeSelection(selectionInfo->d_id);
@@ -28430,7 +31115,8 @@ Void& DomainResult::makeSuccess()
}
else {
reset();
- new (d_success.buffer()) Void();
+ new (d_success.buffer())
+ Void();
d_selectionId = SELECTION_ID_SUCCESS;
}
@@ -28444,15 +31130,16 @@ Void& DomainResult::makeSuccess(const Void& value)
}
else {
reset();
- new (d_success.buffer()) Void(value);
+ new (d_success.buffer())
+ Void(value);
d_selectionId = SELECTION_ID_SUCCESS;
}
return d_success.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Void& DomainResult::makeSuccess(Void&& value)
{
if (SELECTION_ID_SUCCESS == d_selectionId) {
@@ -28460,7 +31147,8 @@ Void& DomainResult::makeSuccess(Void&& value)
}
else {
reset();
- new (d_success.buffer()) Void(bsl::move(value));
+ new (d_success.buffer())
+ Void(bsl::move(value));
d_selectionId = SELECTION_ID_SUCCESS;
}
@@ -28475,7 +31163,8 @@ Error& DomainResult::makeError()
}
else {
reset();
- new (d_error.buffer()) Error(d_allocator_p);
+ new (d_error.buffer())
+ Error(d_allocator_p);
d_selectionId = SELECTION_ID_ERROR;
}
@@ -28489,15 +31178,16 @@ Error& DomainResult::makeError(const Error& value)
}
else {
reset();
- new (d_error.buffer()) Error(value, d_allocator_p);
+ new (d_error.buffer())
+ Error(value, d_allocator_p);
d_selectionId = SELECTION_ID_ERROR;
}
return d_error.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Error& DomainResult::makeError(Error&& value)
{
if (SELECTION_ID_ERROR == d_selectionId) {
@@ -28505,7 +31195,8 @@ Error& DomainResult::makeError(Error&& value)
}
else {
reset();
- new (d_error.buffer()) Error(bsl::move(value), d_allocator_p);
+ new (d_error.buffer())
+ Error(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_ERROR;
}
@@ -28520,7 +31211,8 @@ DomainInfo& DomainResult::makeDomainInfo()
}
else {
reset();
- new (d_domainInfo.buffer()) DomainInfo(d_allocator_p);
+ new (d_domainInfo.buffer())
+ DomainInfo(d_allocator_p);
d_selectionId = SELECTION_ID_DOMAIN_INFO;
}
@@ -28534,15 +31226,16 @@ DomainInfo& DomainResult::makeDomainInfo(const DomainInfo& value)
}
else {
reset();
- new (d_domainInfo.buffer()) DomainInfo(value, d_allocator_p);
+ new (d_domainInfo.buffer())
+ DomainInfo(value, d_allocator_p);
d_selectionId = SELECTION_ID_DOMAIN_INFO;
}
return d_domainInfo.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
DomainInfo& DomainResult::makeDomainInfo(DomainInfo&& value)
{
if (SELECTION_ID_DOMAIN_INFO == d_selectionId) {
@@ -28551,7 +31244,7 @@ DomainInfo& DomainResult::makeDomainInfo(DomainInfo&& value)
else {
reset();
new (d_domainInfo.buffer())
- DomainInfo(bsl::move(value), d_allocator_p);
+ DomainInfo(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_DOMAIN_INFO;
}
@@ -28566,7 +31259,8 @@ PurgedQueues& DomainResult::makePurgedQueues()
}
else {
reset();
- new (d_purgedQueues.buffer()) PurgedQueues(d_allocator_p);
+ new (d_purgedQueues.buffer())
+ PurgedQueues(d_allocator_p);
d_selectionId = SELECTION_ID_PURGED_QUEUES;
}
@@ -28580,15 +31274,16 @@ PurgedQueues& DomainResult::makePurgedQueues(const PurgedQueues& value)
}
else {
reset();
- new (d_purgedQueues.buffer()) PurgedQueues(value, d_allocator_p);
+ new (d_purgedQueues.buffer())
+ PurgedQueues(value, d_allocator_p);
d_selectionId = SELECTION_ID_PURGED_QUEUES;
}
return d_purgedQueues.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
PurgedQueues& DomainResult::makePurgedQueues(PurgedQueues&& value)
{
if (SELECTION_ID_PURGED_QUEUES == d_selectionId) {
@@ -28597,7 +31292,7 @@ PurgedQueues& DomainResult::makePurgedQueues(PurgedQueues&& value)
else {
reset();
new (d_purgedQueues.buffer())
- PurgedQueues(bsl::move(value), d_allocator_p);
+ PurgedQueues(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_PURGED_QUEUES;
}
@@ -28612,7 +31307,8 @@ QueueResult& DomainResult::makeQueueResult()
}
else {
reset();
- new (d_queueResult.buffer()) QueueResult(d_allocator_p);
+ new (d_queueResult.buffer())
+ QueueResult(d_allocator_p);
d_selectionId = SELECTION_ID_QUEUE_RESULT;
}
@@ -28626,15 +31322,16 @@ QueueResult& DomainResult::makeQueueResult(const QueueResult& value)
}
else {
reset();
- new (d_queueResult.buffer()) QueueResult(value, d_allocator_p);
+ new (d_queueResult.buffer())
+ QueueResult(value, d_allocator_p);
d_selectionId = SELECTION_ID_QUEUE_RESULT;
}
return d_queueResult.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
QueueResult& DomainResult::makeQueueResult(QueueResult&& value)
{
if (SELECTION_ID_QUEUE_RESULT == d_selectionId) {
@@ -28643,7 +31340,7 @@ QueueResult& DomainResult::makeQueueResult(QueueResult&& value)
else {
reset();
new (d_queueResult.buffer())
- QueueResult(bsl::move(value), d_allocator_p);
+ QueueResult(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_QUEUE_RESULT;
}
@@ -28653,83 +31350,94 @@ QueueResult& DomainResult::makeQueueResult(QueueResult&& value)
// ACCESSORS
-bsl::ostream&
-DomainResult::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& DomainResult::print(
+ bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
switch (d_selectionId) {
- case SELECTION_ID_SUCCESS: {
+ case SELECTION_ID_SUCCESS: {
printer.printAttribute("success", d_success.object());
- } break;
- case SELECTION_ID_ERROR: {
+ } break;
+ case SELECTION_ID_ERROR: {
printer.printAttribute("error", d_error.object());
- } break;
- case SELECTION_ID_DOMAIN_INFO: {
+ } break;
+ case SELECTION_ID_DOMAIN_INFO: {
printer.printAttribute("domainInfo", d_domainInfo.object());
- } break;
- case SELECTION_ID_PURGED_QUEUES: {
+ } break;
+ case SELECTION_ID_PURGED_QUEUES: {
printer.printAttribute("purgedQueues", d_purgedQueues.object());
- } break;
- case SELECTION_ID_QUEUE_RESULT: {
+ } break;
+ case SELECTION_ID_QUEUE_RESULT: {
printer.printAttribute("queueResult", d_queueResult.object());
- } break;
- default: stream << "SELECTION UNDEFINED\n";
+ } break;
+ default:
+ stream << "SELECTION UNDEFINED\n";
}
printer.end();
return stream;
}
-const char* DomainResult::selectionName() const
+
+const char *DomainResult::selectionName() const
{
switch (d_selectionId) {
- case SELECTION_ID_SUCCESS:
+ case SELECTION_ID_SUCCESS:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_SUCCESS].name();
- case SELECTION_ID_ERROR:
+ case SELECTION_ID_ERROR:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR].name();
- case SELECTION_ID_DOMAIN_INFO:
+ case SELECTION_ID_DOMAIN_INFO:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAIN_INFO].name();
- case SELECTION_ID_PURGED_QUEUES:
+ case SELECTION_ID_PURGED_QUEUES:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_PURGED_QUEUES].name();
- case SELECTION_ID_QUEUE_RESULT:
+ case SELECTION_ID_QUEUE_RESULT:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE_RESULT].name();
- default:
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
return "(* UNDEFINED *)";
}
}
-// -------------------------
-// class RouteResponseResult
-// -------------------------
+ // -------------------------
+ // class RouteResponseResult
+ // -------------------------
// CONSTANTS
const char RouteResponseResult::CLASS_NAME[] = "RouteResponseResult";
const bdlat_AttributeInfo RouteResponseResult::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_SOURCE_NODE_DESCRIPTION,
- "sourceNodeDescription",
- sizeof("sourceNodeDescription") - 1,
- "",
- bdlat_FormattingMode::e_TEXT},
- {ATTRIBUTE_ID_RESULT,
- "result",
- sizeof("result") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ ATTRIBUTE_ID_SOURCE_NODE_DESCRIPTION,
+ "sourceNodeDescription",
+ sizeof("sourceNodeDescription") - 1,
+ "",
+ bdlat_FormattingMode::e_TEXT
+ },
+ {
+ ATTRIBUTE_ID_RESULT,
+ "result",
+ sizeof("result") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo*
-RouteResponseResult::lookupAttributeInfo(const char* name, int nameLength)
+const bdlat_AttributeInfo *RouteResponseResult::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 2; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- RouteResponseResult::ATTRIBUTE_INFO_ARRAY[i];
+ RouteResponseResult::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -28737,45 +31445,44 @@ RouteResponseResult::lookupAttributeInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_AttributeInfo* RouteResponseResult::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *RouteResponseResult::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_SOURCE_NODE_DESCRIPTION:
+ case ATTRIBUTE_ID_SOURCE_NODE_DESCRIPTION:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SOURCE_NODE_DESCRIPTION];
- case ATTRIBUTE_ID_RESULT:
+ case ATTRIBUTE_ID_RESULT:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_RESULT];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-RouteResponseResult::RouteResponseResult(bslma::Allocator* basicAllocator)
+RouteResponseResult::RouteResponseResult(bslma::Allocator *basicAllocator)
: d_sourceNodeDescription(basicAllocator)
, d_result(basicAllocator)
{
}
RouteResponseResult::RouteResponseResult(const RouteResponseResult& original,
- bslma::Allocator* basicAllocator)
+ bslma::Allocator *basicAllocator)
: d_sourceNodeDescription(original.d_sourceNodeDescription, basicAllocator)
, d_result(original.d_result, basicAllocator)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-RouteResponseResult::RouteResponseResult(
- RouteResponseResult&& original) noexcept
-: d_sourceNodeDescription(bsl::move(original.d_sourceNodeDescription)),
- d_result(bsl::move(original.d_result))
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+RouteResponseResult::RouteResponseResult(RouteResponseResult&& original) noexcept
+: d_sourceNodeDescription(bsl::move(original.d_sourceNodeDescription))
+, d_result(bsl::move(original.d_result))
{
}
RouteResponseResult::RouteResponseResult(RouteResponseResult&& original,
- bslma::Allocator* basicAllocator)
-: d_sourceNodeDescription(bsl::move(original.d_sourceNodeDescription),
- basicAllocator)
+ bslma::Allocator *basicAllocator)
+: d_sourceNodeDescription(bsl::move(original.d_sourceNodeDescription), basicAllocator)
, d_result(bsl::move(original.d_result), basicAllocator)
{
}
@@ -28792,19 +31499,20 @@ RouteResponseResult::operator=(const RouteResponseResult& rhs)
{
if (this != &rhs) {
d_sourceNodeDescription = rhs.d_sourceNodeDescription;
- d_result = rhs.d_result;
+ d_result = rhs.d_result;
}
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-RouteResponseResult& RouteResponseResult::operator=(RouteResponseResult&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+RouteResponseResult&
+RouteResponseResult::operator=(RouteResponseResult&& rhs)
{
if (this != &rhs) {
d_sourceNodeDescription = bsl::move(rhs.d_sourceNodeDescription);
- d_result = bsl::move(rhs.d_result);
+ d_result = bsl::move(rhs.d_result);
}
return *this;
@@ -28825,49 +31533,59 @@ bsl::ostream& RouteResponseResult::print(bsl::ostream& stream,
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
- printer.printAttribute("sourceNodeDescription",
- this->sourceNodeDescription());
+ printer.printAttribute("sourceNodeDescription", this->sourceNodeDescription());
printer.printAttribute("result", this->result());
printer.end();
return stream;
}
-// -------------------
-// class DomainsResult
-// -------------------
+
+
+ // -------------------
+ // class DomainsResult
+ // -------------------
// CONSTANTS
const char DomainsResult::CLASS_NAME[] = "DomainsResult";
const bdlat_SelectionInfo DomainsResult::SELECTION_INFO_ARRAY[] = {
- {SELECTION_ID_SUCCESS,
- "success",
- sizeof("success") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_ERROR,
- "error",
- sizeof("error") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_DOMAIN_RESULT,
- "domainResult",
- sizeof("domainResult") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ SELECTION_ID_SUCCESS,
+ "success",
+ sizeof("success") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_ERROR,
+ "error",
+ sizeof("error") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_DOMAIN_RESULT,
+ "domainResult",
+ sizeof("domainResult") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_SelectionInfo* DomainsResult::lookupSelectionInfo(const char* name,
- int nameLength)
+const bdlat_SelectionInfo *DomainsResult::lookupSelectionInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 3; ++i) {
const bdlat_SelectionInfo& selectionInfo =
- DomainsResult::SELECTION_INFO_ARRAY[i];
+ DomainsResult::SELECTION_INFO_ARRAY[i];
- if (nameLength == selectionInfo.d_nameLength &&
- 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength)) {
+ if (nameLength == selectionInfo.d_nameLength
+ && 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength))
+ {
return &selectionInfo;
}
}
@@ -28875,103 +31593,118 @@ const bdlat_SelectionInfo* DomainsResult::lookupSelectionInfo(const char* name,
return 0;
}
-const bdlat_SelectionInfo* DomainsResult::lookupSelectionInfo(int id)
+const bdlat_SelectionInfo *DomainsResult::lookupSelectionInfo(int id)
{
switch (id) {
- case SELECTION_ID_SUCCESS:
+ case SELECTION_ID_SUCCESS:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_SUCCESS];
- case SELECTION_ID_ERROR:
+ case SELECTION_ID_ERROR:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR];
- case SELECTION_ID_DOMAIN_RESULT:
+ case SELECTION_ID_DOMAIN_RESULT:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAIN_RESULT];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-DomainsResult::DomainsResult(const DomainsResult& original,
- bslma::Allocator* basicAllocator)
+DomainsResult::DomainsResult(
+ const DomainsResult& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_SUCCESS: {
- new (d_success.buffer()) Void(original.d_success.object());
- } break;
- case SELECTION_ID_ERROR: {
- new (d_error.buffer()) Error(original.d_error.object(), d_allocator_p);
- } break;
- case SELECTION_ID_DOMAIN_RESULT: {
+ case SELECTION_ID_SUCCESS: {
+ new (d_success.buffer())
+ Void(original.d_success.object());
+ } break;
+ case SELECTION_ID_ERROR: {
+ new (d_error.buffer())
+ Error(
+ original.d_error.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_DOMAIN_RESULT: {
new (d_domainResult.buffer())
- DomainResult(original.d_domainResult.object(), d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ DomainResult(
+ original.d_domainResult.object(), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
DomainsResult::DomainsResult(DomainsResult&& original) noexcept
-: d_selectionId(original.d_selectionId),
- d_allocator_p(original.d_allocator_p)
+: d_selectionId(original.d_selectionId)
+, d_allocator_p(original.d_allocator_p)
{
switch (d_selectionId) {
- case SELECTION_ID_SUCCESS: {
- new (d_success.buffer()) Void(bsl::move(original.d_success.object()));
- } break;
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_SUCCESS: {
+ new (d_success.buffer())
+ Void(bsl::move(original.d_success.object()));
+ } break;
+ case SELECTION_ID_ERROR: {
new (d_error.buffer())
- Error(bsl::move(original.d_error.object()), d_allocator_p);
- } break;
- case SELECTION_ID_DOMAIN_RESULT: {
+ Error(
+ bsl::move(original.d_error.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_DOMAIN_RESULT: {
new (d_domainResult.buffer())
- DomainResult(bsl::move(original.d_domainResult.object()),
- d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ DomainResult(
+ bsl::move(original.d_domainResult.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-DomainsResult::DomainsResult(DomainsResult&& original,
- bslma::Allocator* basicAllocator)
+DomainsResult::DomainsResult(
+ DomainsResult&& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_SUCCESS: {
- new (d_success.buffer()) Void(bsl::move(original.d_success.object()));
- } break;
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_SUCCESS: {
+ new (d_success.buffer())
+ Void(bsl::move(original.d_success.object()));
+ } break;
+ case SELECTION_ID_ERROR: {
new (d_error.buffer())
- Error(bsl::move(original.d_error.object()), d_allocator_p);
- } break;
- case SELECTION_ID_DOMAIN_RESULT: {
+ Error(
+ bsl::move(original.d_error.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_DOMAIN_RESULT: {
new (d_domainResult.buffer())
- DomainResult(bsl::move(original.d_domainResult.object()),
- d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ DomainResult(
+ bsl::move(original.d_domainResult.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
#endif
// MANIPULATORS
-DomainsResult& DomainsResult::operator=(const DomainsResult& rhs)
+DomainsResult&
+DomainsResult::operator=(const DomainsResult& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_SUCCESS: {
+ case SELECTION_ID_SUCCESS: {
makeSuccess(rhs.d_success.object());
- } break;
- case SELECTION_ID_ERROR: {
+ } break;
+ case SELECTION_ID_ERROR: {
makeError(rhs.d_error.object());
- } break;
- case SELECTION_ID_DOMAIN_RESULT: {
+ } break;
+ case SELECTION_ID_DOMAIN_RESULT: {
makeDomainResult(rhs.d_domainResult.object());
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -28980,22 +31713,23 @@ DomainsResult& DomainsResult::operator=(const DomainsResult& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-DomainsResult& DomainsResult::operator=(DomainsResult&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+DomainsResult&
+DomainsResult::operator=(DomainsResult&& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_SUCCESS: {
+ case SELECTION_ID_SUCCESS: {
makeSuccess(bsl::move(rhs.d_success.object()));
- } break;
- case SELECTION_ID_ERROR: {
+ } break;
+ case SELECTION_ID_ERROR: {
makeError(bsl::move(rhs.d_error.object()));
- } break;
- case SELECTION_ID_DOMAIN_RESULT: {
+ } break;
+ case SELECTION_ID_DOMAIN_RESULT: {
makeDomainResult(bsl::move(rhs.d_domainResult.object()));
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -29008,16 +31742,17 @@ DomainsResult& DomainsResult::operator=(DomainsResult&& rhs)
void DomainsResult::reset()
{
switch (d_selectionId) {
- case SELECTION_ID_SUCCESS: {
+ case SELECTION_ID_SUCCESS: {
d_success.object().~Void();
- } break;
- case SELECTION_ID_ERROR: {
+ } break;
+ case SELECTION_ID_ERROR: {
d_error.object().~Error();
- } break;
- case SELECTION_ID_DOMAIN_RESULT: {
+ } break;
+ case SELECTION_ID_DOMAIN_RESULT: {
d_domainResult.object().~DomainResult();
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
d_selectionId = SELECTION_ID_UNDEFINED;
@@ -29026,29 +31761,30 @@ void DomainsResult::reset()
int DomainsResult::makeSelection(int selectionId)
{
switch (selectionId) {
- case SELECTION_ID_SUCCESS: {
+ case SELECTION_ID_SUCCESS: {
makeSuccess();
- } break;
- case SELECTION_ID_ERROR: {
+ } break;
+ case SELECTION_ID_ERROR: {
makeError();
- } break;
- case SELECTION_ID_DOMAIN_RESULT: {
+ } break;
+ case SELECTION_ID_DOMAIN_RESULT: {
makeDomainResult();
- } break;
- case SELECTION_ID_UNDEFINED: {
+ } break;
+ case SELECTION_ID_UNDEFINED: {
reset();
- } break;
- default: return -1;
+ } break;
+ default:
+ return -1;
}
return 0;
}
-int DomainsResult::makeSelection(const char* name, int nameLength)
+int DomainsResult::makeSelection(const char *name, int nameLength)
{
- const bdlat_SelectionInfo* selectionInfo = lookupSelectionInfo(name,
- nameLength);
+ const bdlat_SelectionInfo *selectionInfo =
+ lookupSelectionInfo(name, nameLength);
if (0 == selectionInfo) {
- return -1;
+ return -1;
}
return makeSelection(selectionInfo->d_id);
@@ -29061,7 +31797,8 @@ Void& DomainsResult::makeSuccess()
}
else {
reset();
- new (d_success.buffer()) Void();
+ new (d_success.buffer())
+ Void();
d_selectionId = SELECTION_ID_SUCCESS;
}
@@ -29075,15 +31812,16 @@ Void& DomainsResult::makeSuccess(const Void& value)
}
else {
reset();
- new (d_success.buffer()) Void(value);
+ new (d_success.buffer())
+ Void(value);
d_selectionId = SELECTION_ID_SUCCESS;
}
return d_success.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Void& DomainsResult::makeSuccess(Void&& value)
{
if (SELECTION_ID_SUCCESS == d_selectionId) {
@@ -29091,7 +31829,8 @@ Void& DomainsResult::makeSuccess(Void&& value)
}
else {
reset();
- new (d_success.buffer()) Void(bsl::move(value));
+ new (d_success.buffer())
+ Void(bsl::move(value));
d_selectionId = SELECTION_ID_SUCCESS;
}
@@ -29106,7 +31845,8 @@ Error& DomainsResult::makeError()
}
else {
reset();
- new (d_error.buffer()) Error(d_allocator_p);
+ new (d_error.buffer())
+ Error(d_allocator_p);
d_selectionId = SELECTION_ID_ERROR;
}
@@ -29120,15 +31860,16 @@ Error& DomainsResult::makeError(const Error& value)
}
else {
reset();
- new (d_error.buffer()) Error(value, d_allocator_p);
+ new (d_error.buffer())
+ Error(value, d_allocator_p);
d_selectionId = SELECTION_ID_ERROR;
}
return d_error.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Error& DomainsResult::makeError(Error&& value)
{
if (SELECTION_ID_ERROR == d_selectionId) {
@@ -29136,7 +31877,8 @@ Error& DomainsResult::makeError(Error&& value)
}
else {
reset();
- new (d_error.buffer()) Error(bsl::move(value), d_allocator_p);
+ new (d_error.buffer())
+ Error(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_ERROR;
}
@@ -29151,7 +31893,8 @@ DomainResult& DomainsResult::makeDomainResult()
}
else {
reset();
- new (d_domainResult.buffer()) DomainResult(d_allocator_p);
+ new (d_domainResult.buffer())
+ DomainResult(d_allocator_p);
d_selectionId = SELECTION_ID_DOMAIN_RESULT;
}
@@ -29165,15 +31908,16 @@ DomainResult& DomainsResult::makeDomainResult(const DomainResult& value)
}
else {
reset();
- new (d_domainResult.buffer()) DomainResult(value, d_allocator_p);
+ new (d_domainResult.buffer())
+ DomainResult(value, d_allocator_p);
d_selectionId = SELECTION_ID_DOMAIN_RESULT;
}
return d_domainResult.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
DomainResult& DomainsResult::makeDomainResult(DomainResult&& value)
{
if (SELECTION_ID_DOMAIN_RESULT == d_selectionId) {
@@ -29182,7 +31926,7 @@ DomainResult& DomainsResult::makeDomainResult(DomainResult&& value)
else {
reset();
new (d_domainResult.buffer())
- DomainResult(bsl::move(value), d_allocator_p);
+ DomainResult(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_DOMAIN_RESULT;
}
@@ -29192,68 +31936,77 @@ DomainResult& DomainsResult::makeDomainResult(DomainResult&& value)
// ACCESSORS
-bsl::ostream&
-DomainsResult::print(bsl::ostream& stream, int level, int spacesPerLevel) const
+bsl::ostream& DomainsResult::print(
+ bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
switch (d_selectionId) {
- case SELECTION_ID_SUCCESS: {
+ case SELECTION_ID_SUCCESS: {
printer.printAttribute("success", d_success.object());
- } break;
- case SELECTION_ID_ERROR: {
+ } break;
+ case SELECTION_ID_ERROR: {
printer.printAttribute("error", d_error.object());
- } break;
- case SELECTION_ID_DOMAIN_RESULT: {
+ } break;
+ case SELECTION_ID_DOMAIN_RESULT: {
printer.printAttribute("domainResult", d_domainResult.object());
- } break;
- default: stream << "SELECTION UNDEFINED\n";
+ } break;
+ default:
+ stream << "SELECTION UNDEFINED\n";
}
printer.end();
return stream;
}
-const char* DomainsResult::selectionName() const
+
+const char *DomainsResult::selectionName() const
{
switch (d_selectionId) {
- case SELECTION_ID_SUCCESS:
+ case SELECTION_ID_SUCCESS:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_SUCCESS].name();
- case SELECTION_ID_ERROR:
+ case SELECTION_ID_ERROR:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR].name();
- case SELECTION_ID_DOMAIN_RESULT:
+ case SELECTION_ID_DOMAIN_RESULT:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAIN_RESULT].name();
- default:
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
return "(* UNDEFINED *)";
}
}
-// -----------------------------
-// class RouteResponseResultList
-// -----------------------------
+ // -----------------------------
+ // class RouteResponseResultList
+ // -----------------------------
// CONSTANTS
const char RouteResponseResultList::CLASS_NAME[] = "RouteResponseResultList";
const bdlat_AttributeInfo RouteResponseResultList::ATTRIBUTE_INFO_ARRAY[] = {
- {ATTRIBUTE_ID_RESPONSES,
- "responses",
- sizeof("responses") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ ATTRIBUTE_ID_RESPONSES,
+ "responses",
+ sizeof("responses") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_AttributeInfo*
-RouteResponseResultList::lookupAttributeInfo(const char* name, int nameLength)
+const bdlat_AttributeInfo *RouteResponseResultList::lookupAttributeInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 1; ++i) {
const bdlat_AttributeInfo& attributeInfo =
- RouteResponseResultList::ATTRIBUTE_INFO_ARRAY[i];
+ RouteResponseResultList::ATTRIBUTE_INFO_ARRAY[i];
- if (nameLength == attributeInfo.d_nameLength &&
- 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) {
+ if (nameLength == attributeInfo.d_nameLength
+ && 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength))
+ {
return &attributeInfo;
}
}
@@ -29261,41 +32014,38 @@ RouteResponseResultList::lookupAttributeInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_AttributeInfo* RouteResponseResultList::lookupAttributeInfo(int id)
+const bdlat_AttributeInfo *RouteResponseResultList::lookupAttributeInfo(int id)
{
switch (id) {
- case ATTRIBUTE_ID_RESPONSES:
+ case ATTRIBUTE_ID_RESPONSES:
return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_RESPONSES];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-RouteResponseResultList::RouteResponseResultList(
- bslma::Allocator* basicAllocator)
+RouteResponseResultList::RouteResponseResultList(bslma::Allocator *basicAllocator)
: d_responses(basicAllocator)
{
}
-RouteResponseResultList::RouteResponseResultList(
- const RouteResponseResultList& original,
- bslma::Allocator* basicAllocator)
+RouteResponseResultList::RouteResponseResultList(const RouteResponseResultList& original,
+ bslma::Allocator *basicAllocator)
: d_responses(original.d_responses, basicAllocator)
{
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-RouteResponseResultList::RouteResponseResultList(
- RouteResponseResultList&& original) noexcept
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+RouteResponseResultList::RouteResponseResultList(RouteResponseResultList&& original) noexcept
: d_responses(bsl::move(original.d_responses))
{
}
-RouteResponseResultList::RouteResponseResultList(
- RouteResponseResultList&& original,
- bslma::Allocator* basicAllocator)
+RouteResponseResultList::RouteResponseResultList(RouteResponseResultList&& original,
+ bslma::Allocator *basicAllocator)
: d_responses(bsl::move(original.d_responses), basicAllocator)
{
}
@@ -29317,8 +32067,8 @@ RouteResponseResultList::operator=(const RouteResponseResultList& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
RouteResponseResultList&
RouteResponseResultList::operator=(RouteResponseResultList&& rhs)
{
@@ -29337,9 +32087,10 @@ void RouteResponseResultList::reset()
// ACCESSORS
-bsl::ostream& RouteResponseResultList::print(bsl::ostream& stream,
- int level,
- int spacesPerLevel) const
+bsl::ostream& RouteResponseResultList::print(
+ bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
@@ -29348,87 +32099,116 @@ bsl::ostream& RouteResponseResultList::print(bsl::ostream& stream,
return stream;
}
-// --------------------
-// class InternalResult
-// --------------------
+
+
+ // --------------------
+ // class InternalResult
+ // --------------------
// CONSTANTS
const char InternalResult::CLASS_NAME[] = "InternalResult";
const bdlat_SelectionInfo InternalResult::SELECTION_INFO_ARRAY[] = {
- {SELECTION_ID_ERROR,
- "error",
- sizeof("error") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_SUCCESS,
- "success",
- sizeof("success") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_DOMAINS_RESULT,
- "domainsResult",
- sizeof("domainsResult") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_CLUSTERS_RESULT,
- "clustersResult",
- sizeof("clustersResult") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_HELP,
- "help",
- sizeof("help") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_QUEUE_INTERNALS,
- "queueInternals",
- sizeof("queueInternals") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_STAT_RESULT,
- "statResult",
- sizeof("statResult") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_CLUSTER_LIST,
- "clusterList",
- sizeof("clusterList") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_CLUSTER_QUEUE_HELPER,
- "clusterQueueHelper",
- sizeof("clusterQueueHelper") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_CLUSTER_STORAGE_SUMMARY,
- "clusterStorageSummary",
- sizeof("clusterStorageSummary") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES,
- "clusterDomainQueueStatuses",
- sizeof("clusterDomainQueueStatuses") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT},
- {SELECTION_ID_BROKER_CONFIG,
- "brokerConfig",
- sizeof("brokerConfig") - 1,
- "",
- bdlat_FormattingMode::e_DEFAULT}};
+ {
+ SELECTION_ID_ERROR,
+ "error",
+ sizeof("error") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_SUCCESS,
+ "success",
+ sizeof("success") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_DOMAINS_RESULT,
+ "domainsResult",
+ sizeof("domainsResult") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_CLUSTERS_RESULT,
+ "clustersResult",
+ sizeof("clustersResult") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_HELP,
+ "help",
+ sizeof("help") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_QUEUE_INTERNALS,
+ "queueInternals",
+ sizeof("queueInternals") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_STAT_RESULT,
+ "statResult",
+ sizeof("statResult") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_CLUSTER_LIST,
+ "clusterList",
+ sizeof("clusterList") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_CLUSTER_QUEUE_HELPER,
+ "clusterQueueHelper",
+ sizeof("clusterQueueHelper") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_CLUSTER_STORAGE_SUMMARY,
+ "clusterStorageSummary",
+ sizeof("clusterStorageSummary") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES,
+ "clusterDomainQueueStatuses",
+ sizeof("clusterDomainQueueStatuses") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ },
+ {
+ SELECTION_ID_BROKER_CONFIG,
+ "brokerConfig",
+ sizeof("brokerConfig") - 1,
+ "",
+ bdlat_FormattingMode::e_DEFAULT
+ }
+};
// CLASS METHODS
-const bdlat_SelectionInfo*
-InternalResult::lookupSelectionInfo(const char* name, int nameLength)
+const bdlat_SelectionInfo *InternalResult::lookupSelectionInfo(
+ const char *name,
+ int nameLength)
{
for (int i = 0; i < 12; ++i) {
const bdlat_SelectionInfo& selectionInfo =
- InternalResult::SELECTION_INFO_ARRAY[i];
+ InternalResult::SELECTION_INFO_ARRAY[i];
- if (nameLength == selectionInfo.d_nameLength &&
- 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength)) {
+ if (nameLength == selectionInfo.d_nameLength
+ && 0 == bsl::memcmp(selectionInfo.d_name_p, name, nameLength))
+ {
return &selectionInfo;
}
}
@@ -29436,275 +32216,298 @@ InternalResult::lookupSelectionInfo(const char* name, int nameLength)
return 0;
}
-const bdlat_SelectionInfo* InternalResult::lookupSelectionInfo(int id)
+const bdlat_SelectionInfo *InternalResult::lookupSelectionInfo(int id)
{
switch (id) {
- case SELECTION_ID_ERROR:
+ case SELECTION_ID_ERROR:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR];
- case SELECTION_ID_SUCCESS:
+ case SELECTION_ID_SUCCESS:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_SUCCESS];
- case SELECTION_ID_DOMAINS_RESULT:
+ case SELECTION_ID_DOMAINS_RESULT:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAINS_RESULT];
- case SELECTION_ID_CLUSTERS_RESULT:
+ case SELECTION_ID_CLUSTERS_RESULT:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTERS_RESULT];
- case SELECTION_ID_HELP: return &SELECTION_INFO_ARRAY[SELECTION_INDEX_HELP];
- case SELECTION_ID_QUEUE_INTERNALS:
+ case SELECTION_ID_HELP:
+ return &SELECTION_INFO_ARRAY[SELECTION_INDEX_HELP];
+ case SELECTION_ID_QUEUE_INTERNALS:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE_INTERNALS];
- case SELECTION_ID_STAT_RESULT:
+ case SELECTION_ID_STAT_RESULT:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_STAT_RESULT];
- case SELECTION_ID_CLUSTER_LIST:
+ case SELECTION_ID_CLUSTER_LIST:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_LIST];
- case SELECTION_ID_CLUSTER_QUEUE_HELPER:
+ case SELECTION_ID_CLUSTER_QUEUE_HELPER:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_QUEUE_HELPER];
- case SELECTION_ID_CLUSTER_STORAGE_SUMMARY:
+ case SELECTION_ID_CLUSTER_STORAGE_SUMMARY:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_STORAGE_SUMMARY];
- case SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES:
- return &SELECTION_INFO_ARRAY
- [SELECTION_INDEX_CLUSTER_DOMAIN_QUEUE_STATUSES];
- case SELECTION_ID_BROKER_CONFIG:
+ case SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES:
+ return &SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_DOMAIN_QUEUE_STATUSES];
+ case SELECTION_ID_BROKER_CONFIG:
return &SELECTION_INFO_ARRAY[SELECTION_INDEX_BROKER_CONFIG];
- default: return 0;
+ default:
+ return 0;
}
}
// CREATORS
-InternalResult::InternalResult(const InternalResult& original,
- bslma::Allocator* basicAllocator)
+InternalResult::InternalResult(
+ const InternalResult& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_ERROR: {
- new (d_error.buffer()) Error(original.d_error.object(), d_allocator_p);
- } break;
- case SELECTION_ID_SUCCESS: {
- new (d_success.buffer()) Void(original.d_success.object());
- } break;
- case SELECTION_ID_DOMAINS_RESULT: {
+ case SELECTION_ID_ERROR: {
+ new (d_error.buffer())
+ Error(
+ original.d_error.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_SUCCESS: {
+ new (d_success.buffer())
+ Void(original.d_success.object());
+ } break;
+ case SELECTION_ID_DOMAINS_RESULT: {
new (d_domainsResult.buffer())
- DomainsResult(original.d_domainsResult.object(), d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTERS_RESULT: {
+ DomainsResult(
+ original.d_domainsResult.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTERS_RESULT: {
new (d_clustersResult.buffer())
- ClustersResult(original.d_clustersResult.object(), d_allocator_p);
- } break;
- case SELECTION_ID_HELP: {
- new (d_help.buffer()) Help(original.d_help.object(), d_allocator_p);
- } break;
- case SELECTION_ID_QUEUE_INTERNALS: {
+ ClustersResult(
+ original.d_clustersResult.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_HELP: {
+ new (d_help.buffer())
+ Help(
+ original.d_help.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_QUEUE_INTERNALS: {
new (d_queueInternals.buffer())
- QueueInternals(original.d_queueInternals.object(), d_allocator_p);
- } break;
- case SELECTION_ID_STAT_RESULT: {
+ QueueInternals(
+ original.d_queueInternals.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_STAT_RESULT: {
new (d_statResult.buffer())
- StatResult(original.d_statResult.object(), d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTER_LIST: {
+ StatResult(
+ original.d_statResult.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTER_LIST: {
new (d_clusterList.buffer())
- ClusterList(original.d_clusterList.object(), d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTER_QUEUE_HELPER: {
+ ClusterList(
+ original.d_clusterList.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTER_QUEUE_HELPER: {
new (d_clusterQueueHelper.buffer())
- ClusterQueueHelper(original.d_clusterQueueHelper.object(),
- d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: {
+ ClusterQueueHelper(
+ original.d_clusterQueueHelper.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: {
new (d_clusterStorageSummary.buffer())
- ClusterStorageSummary(original.d_clusterStorageSummary.object(),
- d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES: {
- new (d_clusterDomainQueueStatuses.buffer()) ClusterDomainQueueStatuses(
- original.d_clusterDomainQueueStatuses.object(),
- d_allocator_p);
- } break;
- case SELECTION_ID_BROKER_CONFIG: {
+ ClusterStorageSummary(
+ original.d_clusterStorageSummary.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES: {
+ new (d_clusterDomainQueueStatuses.buffer())
+ ClusterDomainQueueStatuses(
+ original.d_clusterDomainQueueStatuses.object(), d_allocator_p);
+ } break;
+ case SELECTION_ID_BROKER_CONFIG: {
new (d_brokerConfig.buffer())
- BrokerConfig(original.d_brokerConfig.object(), d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ BrokerConfig(
+ original.d_brokerConfig.object(), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
InternalResult::InternalResult(InternalResult&& original) noexcept
-: d_selectionId(original.d_selectionId),
- d_allocator_p(original.d_allocator_p)
+: d_selectionId(original.d_selectionId)
+, d_allocator_p(original.d_allocator_p)
{
switch (d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
new (d_error.buffer())
- Error(bsl::move(original.d_error.object()), d_allocator_p);
- } break;
- case SELECTION_ID_SUCCESS: {
- new (d_success.buffer()) Void(bsl::move(original.d_success.object()));
- } break;
- case SELECTION_ID_DOMAINS_RESULT: {
+ Error(
+ bsl::move(original.d_error.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_SUCCESS: {
+ new (d_success.buffer())
+ Void(bsl::move(original.d_success.object()));
+ } break;
+ case SELECTION_ID_DOMAINS_RESULT: {
new (d_domainsResult.buffer())
- DomainsResult(bsl::move(original.d_domainsResult.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTERS_RESULT: {
+ DomainsResult(
+ bsl::move(original.d_domainsResult.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTERS_RESULT: {
new (d_clustersResult.buffer())
- ClustersResult(bsl::move(original.d_clustersResult.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_HELP: {
+ ClustersResult(
+ bsl::move(original.d_clustersResult.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_HELP: {
new (d_help.buffer())
- Help(bsl::move(original.d_help.object()), d_allocator_p);
- } break;
- case SELECTION_ID_QUEUE_INTERNALS: {
+ Help(
+ bsl::move(original.d_help.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_QUEUE_INTERNALS: {
new (d_queueInternals.buffer())
- QueueInternals(bsl::move(original.d_queueInternals.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_STAT_RESULT: {
+ QueueInternals(
+ bsl::move(original.d_queueInternals.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_STAT_RESULT: {
new (d_statResult.buffer())
- StatResult(bsl::move(original.d_statResult.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTER_LIST: {
+ StatResult(
+ bsl::move(original.d_statResult.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTER_LIST: {
new (d_clusterList.buffer())
- ClusterList(bsl::move(original.d_clusterList.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTER_QUEUE_HELPER: {
- new (d_clusterQueueHelper.buffer()) ClusterQueueHelper(
- bsl::move(original.d_clusterQueueHelper.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: {
- new (d_clusterStorageSummary.buffer()) ClusterStorageSummary(
- bsl::move(original.d_clusterStorageSummary.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES: {
- new (d_clusterDomainQueueStatuses.buffer()) ClusterDomainQueueStatuses(
- bsl::move(original.d_clusterDomainQueueStatuses.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_BROKER_CONFIG: {
+ ClusterList(
+ bsl::move(original.d_clusterList.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTER_QUEUE_HELPER: {
+ new (d_clusterQueueHelper.buffer())
+ ClusterQueueHelper(
+ bsl::move(original.d_clusterQueueHelper.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: {
+ new (d_clusterStorageSummary.buffer())
+ ClusterStorageSummary(
+ bsl::move(original.d_clusterStorageSummary.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES: {
+ new (d_clusterDomainQueueStatuses.buffer())
+ ClusterDomainQueueStatuses(
+ bsl::move(original.d_clusterDomainQueueStatuses.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_BROKER_CONFIG: {
new (d_brokerConfig.buffer())
- BrokerConfig(bsl::move(original.d_brokerConfig.object()),
- d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ BrokerConfig(
+ bsl::move(original.d_brokerConfig.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
-InternalResult::InternalResult(InternalResult&& original,
- bslma::Allocator* basicAllocator)
+InternalResult::InternalResult(
+ InternalResult&& original,
+ bslma::Allocator *basicAllocator)
: d_selectionId(original.d_selectionId)
, d_allocator_p(bslma::Default::allocator(basicAllocator))
{
switch (d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
new (d_error.buffer())
- Error(bsl::move(original.d_error.object()), d_allocator_p);
- } break;
- case SELECTION_ID_SUCCESS: {
- new (d_success.buffer()) Void(bsl::move(original.d_success.object()));
- } break;
- case SELECTION_ID_DOMAINS_RESULT: {
+ Error(
+ bsl::move(original.d_error.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_SUCCESS: {
+ new (d_success.buffer())
+ Void(bsl::move(original.d_success.object()));
+ } break;
+ case SELECTION_ID_DOMAINS_RESULT: {
new (d_domainsResult.buffer())
- DomainsResult(bsl::move(original.d_domainsResult.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTERS_RESULT: {
+ DomainsResult(
+ bsl::move(original.d_domainsResult.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTERS_RESULT: {
new (d_clustersResult.buffer())
- ClustersResult(bsl::move(original.d_clustersResult.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_HELP: {
+ ClustersResult(
+ bsl::move(original.d_clustersResult.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_HELP: {
new (d_help.buffer())
- Help(bsl::move(original.d_help.object()), d_allocator_p);
- } break;
- case SELECTION_ID_QUEUE_INTERNALS: {
+ Help(
+ bsl::move(original.d_help.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_QUEUE_INTERNALS: {
new (d_queueInternals.buffer())
- QueueInternals(bsl::move(original.d_queueInternals.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_STAT_RESULT: {
+ QueueInternals(
+ bsl::move(original.d_queueInternals.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_STAT_RESULT: {
new (d_statResult.buffer())
- StatResult(bsl::move(original.d_statResult.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTER_LIST: {
+ StatResult(
+ bsl::move(original.d_statResult.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTER_LIST: {
new (d_clusterList.buffer())
- ClusterList(bsl::move(original.d_clusterList.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTER_QUEUE_HELPER: {
- new (d_clusterQueueHelper.buffer()) ClusterQueueHelper(
- bsl::move(original.d_clusterQueueHelper.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: {
- new (d_clusterStorageSummary.buffer()) ClusterStorageSummary(
- bsl::move(original.d_clusterStorageSummary.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES: {
- new (d_clusterDomainQueueStatuses.buffer()) ClusterDomainQueueStatuses(
- bsl::move(original.d_clusterDomainQueueStatuses.object()),
- d_allocator_p);
- } break;
- case SELECTION_ID_BROKER_CONFIG: {
+ ClusterList(
+ bsl::move(original.d_clusterList.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTER_QUEUE_HELPER: {
+ new (d_clusterQueueHelper.buffer())
+ ClusterQueueHelper(
+ bsl::move(original.d_clusterQueueHelper.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: {
+ new (d_clusterStorageSummary.buffer())
+ ClusterStorageSummary(
+ bsl::move(original.d_clusterStorageSummary.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES: {
+ new (d_clusterDomainQueueStatuses.buffer())
+ ClusterDomainQueueStatuses(
+ bsl::move(original.d_clusterDomainQueueStatuses.object()), d_allocator_p);
+ } break;
+ case SELECTION_ID_BROKER_CONFIG: {
new (d_brokerConfig.buffer())
- BrokerConfig(bsl::move(original.d_brokerConfig.object()),
- d_allocator_p);
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ BrokerConfig(
+ bsl::move(original.d_brokerConfig.object()), d_allocator_p);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
}
#endif
// MANIPULATORS
-InternalResult& InternalResult::operator=(const InternalResult& rhs)
+InternalResult&
+InternalResult::operator=(const InternalResult& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
makeError(rhs.d_error.object());
- } break;
- case SELECTION_ID_SUCCESS: {
+ } break;
+ case SELECTION_ID_SUCCESS: {
makeSuccess(rhs.d_success.object());
- } break;
- case SELECTION_ID_DOMAINS_RESULT: {
+ } break;
+ case SELECTION_ID_DOMAINS_RESULT: {
makeDomainsResult(rhs.d_domainsResult.object());
- } break;
- case SELECTION_ID_CLUSTERS_RESULT: {
+ } break;
+ case SELECTION_ID_CLUSTERS_RESULT: {
makeClustersResult(rhs.d_clustersResult.object());
- } break;
- case SELECTION_ID_HELP: {
+ } break;
+ case SELECTION_ID_HELP: {
makeHelp(rhs.d_help.object());
- } break;
- case SELECTION_ID_QUEUE_INTERNALS: {
+ } break;
+ case SELECTION_ID_QUEUE_INTERNALS: {
makeQueueInternals(rhs.d_queueInternals.object());
- } break;
- case SELECTION_ID_STAT_RESULT: {
+ } break;
+ case SELECTION_ID_STAT_RESULT: {
makeStatResult(rhs.d_statResult.object());
- } break;
- case SELECTION_ID_CLUSTER_LIST: {
+ } break;
+ case SELECTION_ID_CLUSTER_LIST: {
makeClusterList(rhs.d_clusterList.object());
- } break;
- case SELECTION_ID_CLUSTER_QUEUE_HELPER: {
+ } break;
+ case SELECTION_ID_CLUSTER_QUEUE_HELPER: {
makeClusterQueueHelper(rhs.d_clusterQueueHelper.object());
- } break;
- case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: {
+ } break;
+ case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: {
makeClusterStorageSummary(rhs.d_clusterStorageSummary.object());
- } break;
- case SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES: {
- makeClusterDomainQueueStatuses(
- rhs.d_clusterDomainQueueStatuses.object());
- } break;
- case SELECTION_ID_BROKER_CONFIG: {
+ } break;
+ case SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES: {
+ makeClusterDomainQueueStatuses(rhs.d_clusterDomainQueueStatuses.object());
+ } break;
+ case SELECTION_ID_BROKER_CONFIG: {
makeBrokerConfig(rhs.d_brokerConfig.object());
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -29713,52 +32516,50 @@ InternalResult& InternalResult::operator=(const InternalResult& rhs)
return *this;
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-InternalResult& InternalResult::operator=(InternalResult&& rhs)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+InternalResult&
+InternalResult::operator=(InternalResult&& rhs)
{
if (this != &rhs) {
switch (rhs.d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
makeError(bsl::move(rhs.d_error.object()));
- } break;
- case SELECTION_ID_SUCCESS: {
+ } break;
+ case SELECTION_ID_SUCCESS: {
makeSuccess(bsl::move(rhs.d_success.object()));
- } break;
- case SELECTION_ID_DOMAINS_RESULT: {
+ } break;
+ case SELECTION_ID_DOMAINS_RESULT: {
makeDomainsResult(bsl::move(rhs.d_domainsResult.object()));
- } break;
- case SELECTION_ID_CLUSTERS_RESULT: {
+ } break;
+ case SELECTION_ID_CLUSTERS_RESULT: {
makeClustersResult(bsl::move(rhs.d_clustersResult.object()));
- } break;
- case SELECTION_ID_HELP: {
+ } break;
+ case SELECTION_ID_HELP: {
makeHelp(bsl::move(rhs.d_help.object()));
- } break;
- case SELECTION_ID_QUEUE_INTERNALS: {
+ } break;
+ case SELECTION_ID_QUEUE_INTERNALS: {
makeQueueInternals(bsl::move(rhs.d_queueInternals.object()));
- } break;
- case SELECTION_ID_STAT_RESULT: {
+ } break;
+ case SELECTION_ID_STAT_RESULT: {
makeStatResult(bsl::move(rhs.d_statResult.object()));
- } break;
- case SELECTION_ID_CLUSTER_LIST: {
+ } break;
+ case SELECTION_ID_CLUSTER_LIST: {
makeClusterList(bsl::move(rhs.d_clusterList.object()));
- } break;
- case SELECTION_ID_CLUSTER_QUEUE_HELPER: {
- makeClusterQueueHelper(
- bsl::move(rhs.d_clusterQueueHelper.object()));
- } break;
- case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: {
- makeClusterStorageSummary(
- bsl::move(rhs.d_clusterStorageSummary.object()));
- } break;
- case SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES: {
- makeClusterDomainQueueStatuses(
- bsl::move(rhs.d_clusterDomainQueueStatuses.object()));
- } break;
- case SELECTION_ID_BROKER_CONFIG: {
+ } break;
+ case SELECTION_ID_CLUSTER_QUEUE_HELPER: {
+ makeClusterQueueHelper(bsl::move(rhs.d_clusterQueueHelper.object()));
+ } break;
+ case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: {
+ makeClusterStorageSummary(bsl::move(rhs.d_clusterStorageSummary.object()));
+ } break;
+ case SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES: {
+ makeClusterDomainQueueStatuses(bsl::move(rhs.d_clusterDomainQueueStatuses.object()));
+ } break;
+ case SELECTION_ID_BROKER_CONFIG: {
makeBrokerConfig(bsl::move(rhs.d_brokerConfig.object()));
- } break;
- default:
+ } break;
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == rhs.d_selectionId);
reset();
}
@@ -29771,43 +32572,44 @@ InternalResult& InternalResult::operator=(InternalResult&& rhs)
void InternalResult::reset()
{
switch (d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
d_error.object().~Error();
- } break;
- case SELECTION_ID_SUCCESS: {
+ } break;
+ case SELECTION_ID_SUCCESS: {
d_success.object().~Void();
- } break;
- case SELECTION_ID_DOMAINS_RESULT: {
+ } break;
+ case SELECTION_ID_DOMAINS_RESULT: {
d_domainsResult.object().~DomainsResult();
- } break;
- case SELECTION_ID_CLUSTERS_RESULT: {
+ } break;
+ case SELECTION_ID_CLUSTERS_RESULT: {
d_clustersResult.object().~ClustersResult();
- } break;
- case SELECTION_ID_HELP: {
+ } break;
+ case SELECTION_ID_HELP: {
d_help.object().~Help();
- } break;
- case SELECTION_ID_QUEUE_INTERNALS: {
+ } break;
+ case SELECTION_ID_QUEUE_INTERNALS: {
d_queueInternals.object().~QueueInternals();
- } break;
- case SELECTION_ID_STAT_RESULT: {
+ } break;
+ case SELECTION_ID_STAT_RESULT: {
d_statResult.object().~StatResult();
- } break;
- case SELECTION_ID_CLUSTER_LIST: {
+ } break;
+ case SELECTION_ID_CLUSTER_LIST: {
d_clusterList.object().~ClusterList();
- } break;
- case SELECTION_ID_CLUSTER_QUEUE_HELPER: {
+ } break;
+ case SELECTION_ID_CLUSTER_QUEUE_HELPER: {
d_clusterQueueHelper.object().~ClusterQueueHelper();
- } break;
- case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: {
+ } break;
+ case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: {
d_clusterStorageSummary.object().~ClusterStorageSummary();
- } break;
- case SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES: {
+ } break;
+ case SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES: {
d_clusterDomainQueueStatuses.object().~ClusterDomainQueueStatuses();
- } break;
- case SELECTION_ID_BROKER_CONFIG: {
+ } break;
+ case SELECTION_ID_BROKER_CONFIG: {
d_brokerConfig.object().~BrokerConfig();
- } break;
- default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
+ } break;
+ default:
+ BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
}
d_selectionId = SELECTION_ID_UNDEFINED;
@@ -29816,56 +32618,57 @@ void InternalResult::reset()
int InternalResult::makeSelection(int selectionId)
{
switch (selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
makeError();
- } break;
- case SELECTION_ID_SUCCESS: {
+ } break;
+ case SELECTION_ID_SUCCESS: {
makeSuccess();
- } break;
- case SELECTION_ID_DOMAINS_RESULT: {
+ } break;
+ case SELECTION_ID_DOMAINS_RESULT: {
makeDomainsResult();
- } break;
- case SELECTION_ID_CLUSTERS_RESULT: {
+ } break;
+ case SELECTION_ID_CLUSTERS_RESULT: {
makeClustersResult();
- } break;
- case SELECTION_ID_HELP: {
+ } break;
+ case SELECTION_ID_HELP: {
makeHelp();
- } break;
- case SELECTION_ID_QUEUE_INTERNALS: {
+ } break;
+ case SELECTION_ID_QUEUE_INTERNALS: {
makeQueueInternals();
- } break;
- case SELECTION_ID_STAT_RESULT: {
+ } break;
+ case SELECTION_ID_STAT_RESULT: {
makeStatResult();
- } break;
- case SELECTION_ID_CLUSTER_LIST: {
+ } break;
+ case SELECTION_ID_CLUSTER_LIST: {
makeClusterList();
- } break;
- case SELECTION_ID_CLUSTER_QUEUE_HELPER: {
+ } break;
+ case SELECTION_ID_CLUSTER_QUEUE_HELPER: {
makeClusterQueueHelper();
- } break;
- case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: {
+ } break;
+ case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: {
makeClusterStorageSummary();
- } break;
- case SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES: {
+ } break;
+ case SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES: {
makeClusterDomainQueueStatuses();
- } break;
- case SELECTION_ID_BROKER_CONFIG: {
+ } break;
+ case SELECTION_ID_BROKER_CONFIG: {
makeBrokerConfig();
- } break;
- case SELECTION_ID_UNDEFINED: {
+ } break;
+ case SELECTION_ID_UNDEFINED: {
reset();
- } break;
- default: return -1;
+ } break;
+ default:
+ return -1;
}
return 0;
}
-int InternalResult::makeSelection(const char* name, int nameLength)
+int InternalResult::makeSelection(const char *name, int nameLength)
{
- const bdlat_SelectionInfo* selectionInfo = lookupSelectionInfo(name,
- nameLength);
+ const bdlat_SelectionInfo *selectionInfo =
+ lookupSelectionInfo(name, nameLength);
if (0 == selectionInfo) {
- return -1;
+ return -1;
}
return makeSelection(selectionInfo->d_id);
@@ -29878,7 +32681,8 @@ Error& InternalResult::makeError()
}
else {
reset();
- new (d_error.buffer()) Error(d_allocator_p);
+ new (d_error.buffer())
+ Error(d_allocator_p);
d_selectionId = SELECTION_ID_ERROR;
}
@@ -29892,15 +32696,16 @@ Error& InternalResult::makeError(const Error& value)
}
else {
reset();
- new (d_error.buffer()) Error(value, d_allocator_p);
+ new (d_error.buffer())
+ Error(value, d_allocator_p);
d_selectionId = SELECTION_ID_ERROR;
}
return d_error.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Error& InternalResult::makeError(Error&& value)
{
if (SELECTION_ID_ERROR == d_selectionId) {
@@ -29908,7 +32713,8 @@ Error& InternalResult::makeError(Error&& value)
}
else {
reset();
- new (d_error.buffer()) Error(bsl::move(value), d_allocator_p);
+ new (d_error.buffer())
+ Error(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_ERROR;
}
@@ -29923,7 +32729,8 @@ Void& InternalResult::makeSuccess()
}
else {
reset();
- new (d_success.buffer()) Void();
+ new (d_success.buffer())
+ Void();
d_selectionId = SELECTION_ID_SUCCESS;
}
@@ -29937,15 +32744,16 @@ Void& InternalResult::makeSuccess(const Void& value)
}
else {
reset();
- new (d_success.buffer()) Void(value);
+ new (d_success.buffer())
+ Void(value);
d_selectionId = SELECTION_ID_SUCCESS;
}
return d_success.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Void& InternalResult::makeSuccess(Void&& value)
{
if (SELECTION_ID_SUCCESS == d_selectionId) {
@@ -29953,7 +32761,8 @@ Void& InternalResult::makeSuccess(Void&& value)
}
else {
reset();
- new (d_success.buffer()) Void(bsl::move(value));
+ new (d_success.buffer())
+ Void(bsl::move(value));
d_selectionId = SELECTION_ID_SUCCESS;
}
@@ -29968,7 +32777,8 @@ DomainsResult& InternalResult::makeDomainsResult()
}
else {
reset();
- new (d_domainsResult.buffer()) DomainsResult(d_allocator_p);
+ new (d_domainsResult.buffer())
+ DomainsResult(d_allocator_p);
d_selectionId = SELECTION_ID_DOMAINS_RESULT;
}
@@ -29982,15 +32792,16 @@ DomainsResult& InternalResult::makeDomainsResult(const DomainsResult& value)
}
else {
reset();
- new (d_domainsResult.buffer()) DomainsResult(value, d_allocator_p);
+ new (d_domainsResult.buffer())
+ DomainsResult(value, d_allocator_p);
d_selectionId = SELECTION_ID_DOMAINS_RESULT;
}
return d_domainsResult.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
DomainsResult& InternalResult::makeDomainsResult(DomainsResult&& value)
{
if (SELECTION_ID_DOMAINS_RESULT == d_selectionId) {
@@ -29999,7 +32810,7 @@ DomainsResult& InternalResult::makeDomainsResult(DomainsResult&& value)
else {
reset();
new (d_domainsResult.buffer())
- DomainsResult(bsl::move(value), d_allocator_p);
+ DomainsResult(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_DOMAINS_RESULT;
}
@@ -30014,7 +32825,8 @@ ClustersResult& InternalResult::makeClustersResult()
}
else {
reset();
- new (d_clustersResult.buffer()) ClustersResult(d_allocator_p);
+ new (d_clustersResult.buffer())
+ ClustersResult(d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTERS_RESULT;
}
@@ -30028,15 +32840,16 @@ ClustersResult& InternalResult::makeClustersResult(const ClustersResult& value)
}
else {
reset();
- new (d_clustersResult.buffer()) ClustersResult(value, d_allocator_p);
+ new (d_clustersResult.buffer())
+ ClustersResult(value, d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTERS_RESULT;
}
return d_clustersResult.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ClustersResult& InternalResult::makeClustersResult(ClustersResult&& value)
{
if (SELECTION_ID_CLUSTERS_RESULT == d_selectionId) {
@@ -30045,7 +32858,7 @@ ClustersResult& InternalResult::makeClustersResult(ClustersResult&& value)
else {
reset();
new (d_clustersResult.buffer())
- ClustersResult(bsl::move(value), d_allocator_p);
+ ClustersResult(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTERS_RESULT;
}
@@ -30060,7 +32873,8 @@ Help& InternalResult::makeHelp()
}
else {
reset();
- new (d_help.buffer()) Help(d_allocator_p);
+ new (d_help.buffer())
+ Help(d_allocator_p);
d_selectionId = SELECTION_ID_HELP;
}
@@ -30074,15 +32888,16 @@ Help& InternalResult::makeHelp(const Help& value)
}
else {
reset();
- new (d_help.buffer()) Help(value, d_allocator_p);
+ new (d_help.buffer())
+ Help(value, d_allocator_p);
d_selectionId = SELECTION_ID_HELP;
}
return d_help.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Help& InternalResult::makeHelp(Help&& value)
{
if (SELECTION_ID_HELP == d_selectionId) {
@@ -30090,7 +32905,8 @@ Help& InternalResult::makeHelp(Help&& value)
}
else {
reset();
- new (d_help.buffer()) Help(bsl::move(value), d_allocator_p);
+ new (d_help.buffer())
+ Help(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_HELP;
}
@@ -30105,7 +32921,8 @@ QueueInternals& InternalResult::makeQueueInternals()
}
else {
reset();
- new (d_queueInternals.buffer()) QueueInternals(d_allocator_p);
+ new (d_queueInternals.buffer())
+ QueueInternals(d_allocator_p);
d_selectionId = SELECTION_ID_QUEUE_INTERNALS;
}
@@ -30119,15 +32936,16 @@ QueueInternals& InternalResult::makeQueueInternals(const QueueInternals& value)
}
else {
reset();
- new (d_queueInternals.buffer()) QueueInternals(value, d_allocator_p);
+ new (d_queueInternals.buffer())
+ QueueInternals(value, d_allocator_p);
d_selectionId = SELECTION_ID_QUEUE_INTERNALS;
}
return d_queueInternals.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
QueueInternals& InternalResult::makeQueueInternals(QueueInternals&& value)
{
if (SELECTION_ID_QUEUE_INTERNALS == d_selectionId) {
@@ -30136,7 +32954,7 @@ QueueInternals& InternalResult::makeQueueInternals(QueueInternals&& value)
else {
reset();
new (d_queueInternals.buffer())
- QueueInternals(bsl::move(value), d_allocator_p);
+ QueueInternals(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_QUEUE_INTERNALS;
}
@@ -30151,7 +32969,8 @@ StatResult& InternalResult::makeStatResult()
}
else {
reset();
- new (d_statResult.buffer()) StatResult(d_allocator_p);
+ new (d_statResult.buffer())
+ StatResult(d_allocator_p);
d_selectionId = SELECTION_ID_STAT_RESULT;
}
@@ -30165,15 +32984,16 @@ StatResult& InternalResult::makeStatResult(const StatResult& value)
}
else {
reset();
- new (d_statResult.buffer()) StatResult(value, d_allocator_p);
+ new (d_statResult.buffer())
+ StatResult(value, d_allocator_p);
d_selectionId = SELECTION_ID_STAT_RESULT;
}
return d_statResult.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
StatResult& InternalResult::makeStatResult(StatResult&& value)
{
if (SELECTION_ID_STAT_RESULT == d_selectionId) {
@@ -30182,7 +33002,7 @@ StatResult& InternalResult::makeStatResult(StatResult&& value)
else {
reset();
new (d_statResult.buffer())
- StatResult(bsl::move(value), d_allocator_p);
+ StatResult(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_STAT_RESULT;
}
@@ -30197,7 +33017,8 @@ ClusterList& InternalResult::makeClusterList()
}
else {
reset();
- new (d_clusterList.buffer()) ClusterList(d_allocator_p);
+ new (d_clusterList.buffer())
+ ClusterList(d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER_LIST;
}
@@ -30211,15 +33032,16 @@ ClusterList& InternalResult::makeClusterList(const ClusterList& value)
}
else {
reset();
- new (d_clusterList.buffer()) ClusterList(value, d_allocator_p);
+ new (d_clusterList.buffer())
+ ClusterList(value, d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER_LIST;
}
return d_clusterList.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ClusterList& InternalResult::makeClusterList(ClusterList&& value)
{
if (SELECTION_ID_CLUSTER_LIST == d_selectionId) {
@@ -30228,7 +33050,7 @@ ClusterList& InternalResult::makeClusterList(ClusterList&& value)
else {
reset();
new (d_clusterList.buffer())
- ClusterList(bsl::move(value), d_allocator_p);
+ ClusterList(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER_LIST;
}
@@ -30243,15 +33065,15 @@ ClusterQueueHelper& InternalResult::makeClusterQueueHelper()
}
else {
reset();
- new (d_clusterQueueHelper.buffer()) ClusterQueueHelper(d_allocator_p);
+ new (d_clusterQueueHelper.buffer())
+ ClusterQueueHelper(d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER_QUEUE_HELPER;
}
return d_clusterQueueHelper.object();
}
-ClusterQueueHelper&
-InternalResult::makeClusterQueueHelper(const ClusterQueueHelper& value)
+ClusterQueueHelper& InternalResult::makeClusterQueueHelper(const ClusterQueueHelper& value)
{
if (SELECTION_ID_CLUSTER_QUEUE_HELPER == d_selectionId) {
d_clusterQueueHelper.object() = value;
@@ -30259,17 +33081,16 @@ InternalResult::makeClusterQueueHelper(const ClusterQueueHelper& value)
else {
reset();
new (d_clusterQueueHelper.buffer())
- ClusterQueueHelper(value, d_allocator_p);
+ ClusterQueueHelper(value, d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER_QUEUE_HELPER;
}
return d_clusterQueueHelper.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-ClusterQueueHelper&
-InternalResult::makeClusterQueueHelper(ClusterQueueHelper&& value)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ClusterQueueHelper& InternalResult::makeClusterQueueHelper(ClusterQueueHelper&& value)
{
if (SELECTION_ID_CLUSTER_QUEUE_HELPER == d_selectionId) {
d_clusterQueueHelper.object() = bsl::move(value);
@@ -30277,7 +33098,7 @@ InternalResult::makeClusterQueueHelper(ClusterQueueHelper&& value)
else {
reset();
new (d_clusterQueueHelper.buffer())
- ClusterQueueHelper(bsl::move(value), d_allocator_p);
+ ClusterQueueHelper(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER_QUEUE_HELPER;
}
@@ -30293,15 +33114,14 @@ ClusterStorageSummary& InternalResult::makeClusterStorageSummary()
else {
reset();
new (d_clusterStorageSummary.buffer())
- ClusterStorageSummary(d_allocator_p);
+ ClusterStorageSummary(d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER_STORAGE_SUMMARY;
}
return d_clusterStorageSummary.object();
}
-ClusterStorageSummary&
-InternalResult::makeClusterStorageSummary(const ClusterStorageSummary& value)
+ClusterStorageSummary& InternalResult::makeClusterStorageSummary(const ClusterStorageSummary& value)
{
if (SELECTION_ID_CLUSTER_STORAGE_SUMMARY == d_selectionId) {
d_clusterStorageSummary.object() = value;
@@ -30309,17 +33129,16 @@ InternalResult::makeClusterStorageSummary(const ClusterStorageSummary& value)
else {
reset();
new (d_clusterStorageSummary.buffer())
- ClusterStorageSummary(value, d_allocator_p);
+ ClusterStorageSummary(value, d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER_STORAGE_SUMMARY;
}
return d_clusterStorageSummary.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-ClusterStorageSummary&
-InternalResult::makeClusterStorageSummary(ClusterStorageSummary&& value)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ClusterStorageSummary& InternalResult::makeClusterStorageSummary(ClusterStorageSummary&& value)
{
if (SELECTION_ID_CLUSTER_STORAGE_SUMMARY == d_selectionId) {
d_clusterStorageSummary.object() = bsl::move(value);
@@ -30327,7 +33146,7 @@ InternalResult::makeClusterStorageSummary(ClusterStorageSummary&& value)
else {
reset();
new (d_clusterStorageSummary.buffer())
- ClusterStorageSummary(bsl::move(value), d_allocator_p);
+ ClusterStorageSummary(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER_STORAGE_SUMMARY;
}
@@ -30338,21 +33157,19 @@ InternalResult::makeClusterStorageSummary(ClusterStorageSummary&& value)
ClusterDomainQueueStatuses& InternalResult::makeClusterDomainQueueStatuses()
{
if (SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES == d_selectionId) {
- bdlat_ValueTypeFunctions::reset(
- &d_clusterDomainQueueStatuses.object());
+ bdlat_ValueTypeFunctions::reset(&d_clusterDomainQueueStatuses.object());
}
else {
reset();
new (d_clusterDomainQueueStatuses.buffer())
- ClusterDomainQueueStatuses(d_allocator_p);
+ ClusterDomainQueueStatuses(d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES;
}
return d_clusterDomainQueueStatuses.object();
}
-ClusterDomainQueueStatuses& InternalResult::makeClusterDomainQueueStatuses(
- const ClusterDomainQueueStatuses& value)
+ClusterDomainQueueStatuses& InternalResult::makeClusterDomainQueueStatuses(const ClusterDomainQueueStatuses& value)
{
if (SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES == d_selectionId) {
d_clusterDomainQueueStatuses.object() = value;
@@ -30360,17 +33177,16 @@ ClusterDomainQueueStatuses& InternalResult::makeClusterDomainQueueStatuses(
else {
reset();
new (d_clusterDomainQueueStatuses.buffer())
- ClusterDomainQueueStatuses(value, d_allocator_p);
+ ClusterDomainQueueStatuses(value, d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES;
}
return d_clusterDomainQueueStatuses.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
-ClusterDomainQueueStatuses& InternalResult::makeClusterDomainQueueStatuses(
- ClusterDomainQueueStatuses&& value)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ClusterDomainQueueStatuses& InternalResult::makeClusterDomainQueueStatuses(ClusterDomainQueueStatuses&& value)
{
if (SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES == d_selectionId) {
d_clusterDomainQueueStatuses.object() = bsl::move(value);
@@ -30378,7 +33194,7 @@ ClusterDomainQueueStatuses& InternalResult::makeClusterDomainQueueStatuses(
else {
reset();
new (d_clusterDomainQueueStatuses.buffer())
- ClusterDomainQueueStatuses(bsl::move(value), d_allocator_p);
+ ClusterDomainQueueStatuses(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES;
}
@@ -30393,7 +33209,8 @@ BrokerConfig& InternalResult::makeBrokerConfig()
}
else {
reset();
- new (d_brokerConfig.buffer()) BrokerConfig(d_allocator_p);
+ new (d_brokerConfig.buffer())
+ BrokerConfig(d_allocator_p);
d_selectionId = SELECTION_ID_BROKER_CONFIG;
}
@@ -30407,15 +33224,16 @@ BrokerConfig& InternalResult::makeBrokerConfig(const BrokerConfig& value)
}
else {
reset();
- new (d_brokerConfig.buffer()) BrokerConfig(value, d_allocator_p);
+ new (d_brokerConfig.buffer())
+ BrokerConfig(value, d_allocator_p);
d_selectionId = SELECTION_ID_BROKER_CONFIG;
}
return d_brokerConfig.object();
}
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
BrokerConfig& InternalResult::makeBrokerConfig(BrokerConfig&& value)
{
if (SELECTION_ID_BROKER_CONFIG == d_selectionId) {
@@ -30424,7 +33242,7 @@ BrokerConfig& InternalResult::makeBrokerConfig(BrokerConfig&& value)
else {
reset();
new (d_brokerConfig.buffer())
- BrokerConfig(bsl::move(value), d_allocator_p);
+ BrokerConfig(bsl::move(value), d_allocator_p);
d_selectionId = SELECTION_ID_BROKER_CONFIG;
}
@@ -30434,90 +33252,86 @@ BrokerConfig& InternalResult::makeBrokerConfig(BrokerConfig&& value)
// ACCESSORS
-bsl::ostream& InternalResult::print(bsl::ostream& stream,
- int level,
- int spacesPerLevel) const
+bsl::ostream& InternalResult::print(
+ bsl::ostream& stream,
+ int level,
+ int spacesPerLevel) const
{
bslim::Printer printer(&stream, level, spacesPerLevel);
printer.start();
switch (d_selectionId) {
- case SELECTION_ID_ERROR: {
+ case SELECTION_ID_ERROR: {
printer.printAttribute("error", d_error.object());
- } break;
- case SELECTION_ID_SUCCESS: {
+ } break;
+ case SELECTION_ID_SUCCESS: {
printer.printAttribute("success", d_success.object());
- } break;
- case SELECTION_ID_DOMAINS_RESULT: {
+ } break;
+ case SELECTION_ID_DOMAINS_RESULT: {
printer.printAttribute("domainsResult", d_domainsResult.object());
- } break;
- case SELECTION_ID_CLUSTERS_RESULT: {
+ } break;
+ case SELECTION_ID_CLUSTERS_RESULT: {
printer.printAttribute("clustersResult", d_clustersResult.object());
- } break;
- case SELECTION_ID_HELP: {
+ } break;
+ case SELECTION_ID_HELP: {
printer.printAttribute("help", d_help.object());
- } break;
- case SELECTION_ID_QUEUE_INTERNALS: {
+ } break;
+ case SELECTION_ID_QUEUE_INTERNALS: {
printer.printAttribute("queueInternals", d_queueInternals.object());
- } break;
- case SELECTION_ID_STAT_RESULT: {
+ } break;
+ case SELECTION_ID_STAT_RESULT: {
printer.printAttribute("statResult", d_statResult.object());
- } break;
- case SELECTION_ID_CLUSTER_LIST: {
+ } break;
+ case SELECTION_ID_CLUSTER_LIST: {
printer.printAttribute("clusterList", d_clusterList.object());
- } break;
- case SELECTION_ID_CLUSTER_QUEUE_HELPER: {
- printer.printAttribute("clusterQueueHelper",
- d_clusterQueueHelper.object());
- } break;
- case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: {
- printer.printAttribute("clusterStorageSummary",
- d_clusterStorageSummary.object());
- } break;
- case SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES: {
- printer.printAttribute("clusterDomainQueueStatuses",
- d_clusterDomainQueueStatuses.object());
- } break;
- case SELECTION_ID_BROKER_CONFIG: {
+ } break;
+ case SELECTION_ID_CLUSTER_QUEUE_HELPER: {
+ printer.printAttribute("clusterQueueHelper", d_clusterQueueHelper.object());
+ } break;
+ case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: {
+ printer.printAttribute("clusterStorageSummary", d_clusterStorageSummary.object());
+ } break;
+ case SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES: {
+ printer.printAttribute("clusterDomainQueueStatuses", d_clusterDomainQueueStatuses.object());
+ } break;
+ case SELECTION_ID_BROKER_CONFIG: {
printer.printAttribute("brokerConfig", d_brokerConfig.object());
- } break;
- default: stream << "SELECTION UNDEFINED\n";
+ } break;
+ default:
+ stream << "SELECTION UNDEFINED\n";
}
printer.end();
return stream;
}
-const char* InternalResult::selectionName() const
+
+const char *InternalResult::selectionName() const
{
switch (d_selectionId) {
- case SELECTION_ID_ERROR:
+ case SELECTION_ID_ERROR:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR].name();
- case SELECTION_ID_SUCCESS:
+ case SELECTION_ID_SUCCESS:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_SUCCESS].name();
- case SELECTION_ID_DOMAINS_RESULT:
+ case SELECTION_ID_DOMAINS_RESULT:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAINS_RESULT].name();
- case SELECTION_ID_CLUSTERS_RESULT:
+ case SELECTION_ID_CLUSTERS_RESULT:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTERS_RESULT].name();
- case SELECTION_ID_HELP:
+ case SELECTION_ID_HELP:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_HELP].name();
- case SELECTION_ID_QUEUE_INTERNALS:
+ case SELECTION_ID_QUEUE_INTERNALS:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE_INTERNALS].name();
- case SELECTION_ID_STAT_RESULT:
+ case SELECTION_ID_STAT_RESULT:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_STAT_RESULT].name();
- case SELECTION_ID_CLUSTER_LIST:
+ case SELECTION_ID_CLUSTER_LIST:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_LIST].name();
- case SELECTION_ID_CLUSTER_QUEUE_HELPER:
- return SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_QUEUE_HELPER]
- .name();
- case SELECTION_ID_CLUSTER_STORAGE_SUMMARY:
- return SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_STORAGE_SUMMARY]
- .name();
- case SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES:
- return SELECTION_INFO_ARRAY
- [SELECTION_INDEX_CLUSTER_DOMAIN_QUEUE_STATUSES]
- .name();
- case SELECTION_ID_BROKER_CONFIG:
+ case SELECTION_ID_CLUSTER_QUEUE_HELPER:
+ return SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_QUEUE_HELPER].name();
+ case SELECTION_ID_CLUSTER_STORAGE_SUMMARY:
+ return SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_STORAGE_SUMMARY].name();
+ case SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES:
+ return SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_DOMAIN_QUEUE_STATUSES].name();
+ case SELECTION_ID_BROKER_CONFIG:
return SELECTION_INFO_ARRAY[SELECTION_INDEX_BROKER_CONFIG].name();
- default:
+ default:
BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId);
return "(* UNDEFINED *)";
}
@@ -30526,8 +33340,7 @@ const char* InternalResult::selectionName() const
} // close enterprise namespace
// GENERATED BY @BLP_BAS_CODEGEN_VERSION@
-// USING bas_codegen.pl -m msg --noAggregateConversion --noExternalization
-// --noIdent --package mqbcmd --msgComponent messages mqbcmd.xsd
+// USING bas_codegen.pl -m msg --noAggregateConversion --noExternalization --noIdent --package mqbcmd --msgComponent messages mqbcmd.xsd
// ----------------------------------------------------------------------------
// NOTICE:
// Copyright 2024 Bloomberg Finance L.P. All rights reserved.
diff --git a/src/groups/mqb/mqbcmd/mqbcmd_messages.h b/src/groups/mqb/mqbcmd/mqbcmd_messages.h
index dc74ae83d..c9b9e5c30 100644
--- a/src/groups/mqb/mqbcmd/mqbcmd_messages.h
+++ b/src/groups/mqb/mqbcmd/mqbcmd_messages.h
@@ -1,18 +1,3 @@
-// Copyright 2019-2024 Bloomberg Finance L.P.
-// SPDX-License-Identifier: Apache-2.0
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
// mqbcmd_messages.h *DO NOT EDIT* @generated -*-C++-*-
#ifndef INCLUDED_MQBCMD_MESSAGES
#define INCLUDED_MQBCMD_MESSAGES
@@ -60,391 +45,156 @@
namespace BloombergLP {
-namespace bslma {
-class Allocator;
-}
-
-namespace mqbcmd {
-class AddReverseProxy;
-}
-namespace mqbcmd {
-class BrokerConfig;
-}
-namespace mqbcmd {
-class CapacityMeter;
-}
-namespace mqbcmd {
-class ClientMsgGroupsCount;
-}
-namespace mqbcmd {
-class ClusterDomain;
-}
-namespace mqbcmd {
-class ClusterNode;
-}
-namespace mqbcmd {
-class CommandSpec;
-}
-namespace mqbcmd {
-class ConsumerInfo;
-}
-namespace mqbcmd {
-class Context;
-}
-namespace mqbcmd {
-class DomainReconfigure;
-}
-namespace mqbcmd {
-class Error;
-}
-namespace mqbcmd {
-class FileInfo;
-}
-namespace mqbcmd {
-class FileSet;
-}
-namespace mqbcmd {
-class HelpCommand;
-}
-namespace mqbcmd {
-class LeaderMessageSequence;
-}
-namespace mqbcmd {
-class LeastRecentlyUsedGroupId;
-}
-namespace mqbcmd {
-class ListMessages;
-}
-namespace mqbcmd {
-class Message;
-}
-namespace mqbcmd {
-class PurgedQueueDetails;
-}
-namespace mqbcmd {
-class RelayQueueEngineSubStream;
-}
-namespace mqbcmd {
-class RemoteStreamInfo;
-}
-namespace mqbcmd {
-class RouteResponse;
-}
-namespace mqbcmd {
-class StorageQueueCommand;
-}
-namespace mqbcmd {
-class StorageQueueInfo;
-}
-namespace mqbcmd {
-class SubId;
-}
-namespace mqbcmd {
-class Subscriber;
-}
-namespace mqbcmd {
-class UninitializedQueue;
-}
-namespace mqbcmd {
-class VirtualStorage;
-}
-namespace mqbcmd {
-class Void;
-}
-namespace mqbcmd {
-class ActiveFileSet;
-}
-namespace mqbcmd {
-class BrokerConfigCommand;
-}
-namespace mqbcmd {
-class ClearCache;
-}
-namespace mqbcmd {
-class ClusterInfo;
-}
-namespace mqbcmd {
-class ClusterNodeInfo;
-}
-namespace mqbcmd {
-class ClusterQueue;
-}
-namespace mqbcmd {
-class DangerCommand;
-}
-namespace mqbcmd {
-class ElectorInfo;
-}
-namespace mqbcmd {
-class GetTunableChoice;
-}
-namespace mqbcmd {
-class Help;
-}
-namespace mqbcmd {
-class MessageGroupIdManagerIndex;
-}
-namespace mqbcmd {
-class PartitionInfo;
-}
-namespace mqbcmd {
-class PurgeQueueResult;
-}
-namespace mqbcmd {
-class QueueCommand;
-}
-namespace mqbcmd {
-class QueueContents;
-}
-namespace mqbcmd {
-class QueueStorage;
-}
-namespace mqbcmd {
-class ResourceUsageMonitor;
-}
-namespace mqbcmd {
-class RouteResponseList;
-}
-namespace mqbcmd {
-class SetTunableChoice;
-}
-namespace mqbcmd {
-class StorageContent;
-}
-namespace mqbcmd {
-class StorageDomainCommand;
-}
-namespace mqbcmd {
-class StoragePartitionCommand;
-}
-namespace mqbcmd {
-class StorageQueue;
-}
-namespace mqbcmd {
-class Subscription;
-}
-namespace mqbcmd {
-class Value;
-}
-namespace mqbcmd {
-class ClusterList;
-}
-namespace mqbcmd {
-class ClusterQueueHelper;
-}
-namespace mqbcmd {
-class ConfigProviderCommand;
-}
-namespace mqbcmd {
-class DomainInfo;
-}
-namespace mqbcmd {
-class DomainQueue;
-}
-namespace mqbcmd {
-class DomainResolverCommand;
-}
-namespace mqbcmd {
-class FileStoreSummary;
-}
-namespace mqbcmd {
-class GetTunable;
-}
-namespace mqbcmd {
-class MessageGroupIdHelper;
-}
-namespace mqbcmd {
-class NodeStatuses;
-}
-namespace mqbcmd {
-class PartitionsInfo;
-}
-namespace mqbcmd {
-class PriorityGroup;
-}
-namespace mqbcmd {
-class PurgedQueues;
-}
-namespace mqbcmd {
-class QueueHandleSubStream;
-}
-namespace mqbcmd {
-class QueueStatuses;
-}
-namespace mqbcmd {
-class SetTunable;
-}
-namespace mqbcmd {
-class StorageDomain;
-}
-namespace mqbcmd {
-class StoragePartition;
-}
-namespace mqbcmd {
-class Tunable;
-}
-namespace mqbcmd {
-class TunableConfirmation;
-}
-namespace mqbcmd {
-class ClusterDomainQueueStatuses;
-}
-namespace mqbcmd {
-class ClusterProxyStatus;
-}
-namespace mqbcmd {
-class DomainCommand;
-}
-namespace mqbcmd {
-class ElectorCommand;
-}
-namespace mqbcmd {
-class FileStore;
-}
-namespace mqbcmd {
-class QueueHandle;
-}
-namespace mqbcmd {
-class ReplicationCommand;
-}
-namespace mqbcmd {
-class StatCommand;
-}
-namespace mqbcmd {
-class SubscriptionGroup;
-}
-namespace mqbcmd {
-class Tunables;
-}
-namespace mqbcmd {
-class ClusterStateCommand;
-}
-namespace mqbcmd {
-class ClusterStorageSummary;
-}
-namespace mqbcmd {
-class Domain;
-}
-namespace mqbcmd {
-class ElectorResult;
-}
-namespace mqbcmd {
-class QueueState;
-}
-namespace mqbcmd {
-class ReplicationResult;
-}
-namespace mqbcmd {
-class RouterConsumer;
-}
-namespace mqbcmd {
-class Routing;
-}
-namespace mqbcmd {
-class StatResult;
-}
-namespace mqbcmd {
-class StorageCommand;
-}
-namespace mqbcmd {
-class ClusterCommand;
-}
-namespace mqbcmd {
-class ClusterStatus;
-}
-namespace mqbcmd {
-class DomainsCommand;
-}
-namespace mqbcmd {
-class RoundRobinRouter;
-}
-namespace mqbcmd {
-class StorageResult;
-}
-namespace mqbcmd {
-class AppState;
-}
-namespace mqbcmd {
-class Cluster;
-}
-namespace mqbcmd {
-class ClusterResult;
-}
-namespace mqbcmd {
-class ClustersCommand;
-}
-namespace mqbcmd {
-class ClustersResult;
-}
-namespace mqbcmd {
-class ConsumerState;
-}
-namespace mqbcmd {
-class RelayQueueEngine;
-}
-namespace mqbcmd {
-class CommandChoice;
-}
-namespace mqbcmd {
-class FanoutQueueEngine;
-}
-namespace mqbcmd {
-class Command;
-}
-namespace mqbcmd {
-class QueueEngine;
-}
-namespace mqbcmd {
-class LocalQueue;
-}
-namespace mqbcmd {
-class RemoteQueue;
-}
-namespace mqbcmd {
-class Queue;
-}
-namespace mqbcmd {
-class QueueInternals;
-}
-namespace mqbcmd {
-class QueueResult;
-}
-namespace mqbcmd {
-class Result;
-}
-namespace mqbcmd {
-class DomainResult;
-}
-namespace mqbcmd {
-class RouteResponseResult;
-}
-namespace mqbcmd {
-class DomainsResult;
-}
-namespace mqbcmd {
-class RouteResponseResultList;
-}
-namespace mqbcmd {
-class InternalResult;
-}
+namespace bslma { class Allocator; }
+
+namespace mqbcmd { class AddReverseProxy; }
+namespace mqbcmd { class BrokerConfig; }
+namespace mqbcmd { class CapacityMeter; }
+namespace mqbcmd { class ClientMsgGroupsCount; }
+namespace mqbcmd { class ClusterDomain; }
+namespace mqbcmd { class ClusterNode; }
+namespace mqbcmd { class CommandSpec; }
+namespace mqbcmd { class ConsumerInfo; }
+namespace mqbcmd { class Context; }
+namespace mqbcmd { class DomainReconfigure; }
+namespace mqbcmd { class Error; }
+namespace mqbcmd { class FileInfo; }
+namespace mqbcmd { class FileSet; }
+namespace mqbcmd { class HelpCommand; }
+namespace mqbcmd { class LeaderMessageSequence; }
+namespace mqbcmd { class LeastRecentlyUsedGroupId; }
+namespace mqbcmd { class ListMessages; }
+namespace mqbcmd { class Message; }
+namespace mqbcmd { class PurgedQueueDetails; }
+namespace mqbcmd { class RelayQueueEngineSubStream; }
+namespace mqbcmd { class RemoteStreamInfo; }
+namespace mqbcmd { class RouteResponse; }
+namespace mqbcmd { class StorageQueueCommand; }
+namespace mqbcmd { class StorageQueueInfo; }
+namespace mqbcmd { class SubId; }
+namespace mqbcmd { class Subscriber; }
+namespace mqbcmd { class UninitializedQueue; }
+namespace mqbcmd { class VirtualStorage; }
+namespace mqbcmd { class Void; }
+namespace mqbcmd { class ActiveFileSet; }
+namespace mqbcmd { class BrokerConfigCommand; }
+namespace mqbcmd { class ClearCache; }
+namespace mqbcmd { class ClusterInfo; }
+namespace mqbcmd { class ClusterNodeInfo; }
+namespace mqbcmd { class ClusterQueue; }
+namespace mqbcmd { class DangerCommand; }
+namespace mqbcmd { class ElectorInfo; }
+namespace mqbcmd { class GetTunableChoice; }
+namespace mqbcmd { class Help; }
+namespace mqbcmd { class MessageGroupIdManagerIndex; }
+namespace mqbcmd { class PartitionInfo; }
+namespace mqbcmd { class PurgeQueueResult; }
+namespace mqbcmd { class QueueCommand; }
+namespace mqbcmd { class QueueContents; }
+namespace mqbcmd { class QueueStorage; }
+namespace mqbcmd { class ResourceUsageMonitor; }
+namespace mqbcmd { class RouteResponseList; }
+namespace mqbcmd { class SetTunableChoice; }
+namespace mqbcmd { class StorageContent; }
+namespace mqbcmd { class StorageDomainCommand; }
+namespace mqbcmd { class StoragePartitionCommand; }
+namespace mqbcmd { class StorageQueue; }
+namespace mqbcmd { class Subscription; }
+namespace mqbcmd { class Value; }
+namespace mqbcmd { class ClusterList; }
+namespace mqbcmd { class ClusterQueueHelper; }
+namespace mqbcmd { class ConfigProviderCommand; }
+namespace mqbcmd { class DomainInfo; }
+namespace mqbcmd { class DomainQueue; }
+namespace mqbcmd { class DomainResolverCommand; }
+namespace mqbcmd { class FileStoreSummary; }
+namespace mqbcmd { class GetTunable; }
+namespace mqbcmd { class MessageGroupIdHelper; }
+namespace mqbcmd { class NodeStatuses; }
+namespace mqbcmd { class PartitionsInfo; }
+namespace mqbcmd { class PriorityGroup; }
+namespace mqbcmd { class PurgedQueues; }
+namespace mqbcmd { class QueueHandleSubStream; }
+namespace mqbcmd { class QueueStatuses; }
+namespace mqbcmd { class SetTunable; }
+namespace mqbcmd { class StorageDomain; }
+namespace mqbcmd { class StoragePartition; }
+namespace mqbcmd { class Tunable; }
+namespace mqbcmd { class TunableConfirmation; }
+namespace mqbcmd { class ClusterDomainQueueStatuses; }
+namespace mqbcmd { class ClusterProxyStatus; }
+namespace mqbcmd { class DomainCommand; }
+namespace mqbcmd { class ElectorCommand; }
+namespace mqbcmd { class FileStore; }
+namespace mqbcmd { class QueueHandle; }
+namespace mqbcmd { class ReplicationCommand; }
+namespace mqbcmd { class StatCommand; }
+namespace mqbcmd { class SubscriptionGroup; }
+namespace mqbcmd { class Tunables; }
+namespace mqbcmd { class ClusterStateCommand; }
+namespace mqbcmd { class ClusterStorageSummary; }
+namespace mqbcmd { class Domain; }
+namespace mqbcmd { class ElectorResult; }
+namespace mqbcmd { class QueueState; }
+namespace mqbcmd { class ReplicationResult; }
+namespace mqbcmd { class RouterConsumer; }
+namespace mqbcmd { class Routing; }
+namespace mqbcmd { class StatResult; }
+namespace mqbcmd { class StorageCommand; }
+namespace mqbcmd { class ClusterCommand; }
+namespace mqbcmd { class ClusterStatus; }
+namespace mqbcmd { class DomainsCommand; }
+namespace mqbcmd { class RoundRobinRouter; }
+namespace mqbcmd { class StorageResult; }
+namespace mqbcmd { class AppState; }
+namespace mqbcmd { class Cluster; }
+namespace mqbcmd { class ClusterResult; }
+namespace mqbcmd { class ClustersCommand; }
+namespace mqbcmd { class ClustersResult; }
+namespace mqbcmd { class ConsumerState; }
+namespace mqbcmd { class RelayQueueEngine; }
+namespace mqbcmd { class CommandChoice; }
+namespace mqbcmd { class FanoutQueueEngine; }
+namespace mqbcmd { class Command; }
+namespace mqbcmd { class QueueEngine; }
+namespace mqbcmd { class LocalQueue; }
+namespace mqbcmd { class RemoteQueue; }
+namespace mqbcmd { class Queue; }
+namespace mqbcmd { class QueueInternals; }
+namespace mqbcmd { class QueueResult; }
+namespace mqbcmd { class Result; }
+namespace mqbcmd { class DomainResult; }
+namespace mqbcmd { class RouteResponseResult; }
+namespace mqbcmd { class DomainsResult; }
+namespace mqbcmd { class RouteResponseResultList; }
+namespace mqbcmd { class InternalResult; }
namespace mqbcmd {
-// =====================
-// class AddReverseProxy
-// =====================
+ // =====================
+ // class AddReverseProxy
+ // =====================
class AddReverseProxy {
+
// INSTANCE DATA
- bsl::string d_clusterName;
- bsl::string d_remotePeer;
+ bsl::string d_clusterName;
+ bsl::string d_remotePeer;
public:
// TYPES
- enum { ATTRIBUTE_ID_CLUSTER_NAME = 0, ATTRIBUTE_ID_REMOTE_PEER = 1 };
+ enum {
+ ATTRIBUTE_ID_CLUSTER_NAME = 0
+ , ATTRIBUTE_ID_REMOTE_PEER = 1
+ };
- enum { NUM_ATTRIBUTES = 2 };
+ enum {
+ NUM_ATTRIBUTES = 2
+ };
- enum { ATTRIBUTE_INDEX_CLUSTER_NAME = 0, ATTRIBUTE_INDEX_REMOTE_PEER = 1 };
+ enum {
+ ATTRIBUTE_INDEX_CLUSTER_NAME = 0
+ , ATTRIBUTE_INDEX_REMOTE_PEER = 1
+ };
// CONSTANTS
static const char CLASS_NAME[];
@@ -453,160 +203,162 @@ class AddReverseProxy {
public:
// CLASS METHODS
- static const bdlat_AttributeInfo* lookupAttributeInfo(int id);
- // Return attribute information for the attribute indicated by the
- // specified 'id' if the attribute exists, and 0 otherwise.
+ static const bdlat_AttributeInfo *lookupAttributeInfo(int id);
+ // Return attribute information for the attribute indicated by the
+ // specified 'id' if the attribute exists, and 0 otherwise.
- static const bdlat_AttributeInfo* lookupAttributeInfo(const char* name,
- int nameLength);
- // Return attribute information for the attribute indicated by the
- // specified 'name' of the specified 'nameLength' if the attribute
- // exists, and 0 otherwise.
+ static const bdlat_AttributeInfo *lookupAttributeInfo(
+ const char *name,
+ int nameLength);
+ // Return attribute information for the attribute indicated by the
+ // specified 'name' of the specified 'nameLength' if the attribute
+ // exists, and 0 otherwise.
// CREATORS
- explicit AddReverseProxy(bslma::Allocator* basicAllocator = 0);
- // Create an object of type 'AddReverseProxy' having the default value.
- // Use the optionally specified 'basicAllocator' to supply memory. If
- // 'basicAllocator' is 0, the currently installed default allocator is
- // used.
+ explicit AddReverseProxy(bslma::Allocator *basicAllocator = 0);
+ // Create an object of type 'AddReverseProxy' having the default value.
+ // Use the optionally specified 'basicAllocator' to supply memory. If
+ // 'basicAllocator' is 0, the currently installed default allocator is
+ // used.
AddReverseProxy(const AddReverseProxy& original,
- bslma::Allocator* basicAllocator = 0);
- // Create an object of type 'AddReverseProxy' having the value of the
- // specified 'original' object. Use the optionally specified
- // 'basicAllocator' to supply memory. If 'basicAllocator' is 0, the
- // currently installed default allocator is used.
-
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ bslma::Allocator *basicAllocator = 0);
+ // Create an object of type 'AddReverseProxy' having the value of the
+ // specified 'original' object. Use the optionally specified
+ // 'basicAllocator' to supply memory. If 'basicAllocator' is 0, the
+ // currently installed default allocator is used.
+
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
AddReverseProxy(AddReverseProxy&& original) noexcept;
- // Create an object of type 'AddReverseProxy' having the value of the
- // specified 'original' object. After performing this action, the
- // 'original' object will be left in a valid, but unspecified state.
+ // Create an object of type 'AddReverseProxy' having the value of the
+ // specified 'original' object. After performing this action, the
+ // 'original' object will be left in a valid, but unspecified state.
AddReverseProxy(AddReverseProxy&& original,
- bslma::Allocator* basicAllocator);
- // Create an object of type 'AddReverseProxy' having the value of the
- // specified 'original' object. After performing this action, the
- // 'original' object will be left in a valid, but unspecified state.
- // Use the optionally specified 'basicAllocator' to supply memory. If
- // 'basicAllocator' is 0, the currently installed default allocator is
- // used.
+ bslma::Allocator *basicAllocator);
+ // Create an object of type 'AddReverseProxy' having the value of the
+ // specified 'original' object. After performing this action, the
+ // 'original' object will be left in a valid, but unspecified state.
+ // Use the optionally specified 'basicAllocator' to supply memory. If
+ // 'basicAllocator' is 0, the currently installed default allocator is
+ // used.
#endif
~AddReverseProxy();
- // Destroy this object.
+ // Destroy this object.
// MANIPULATORS
AddReverseProxy& operator=(const AddReverseProxy& rhs);
- // Assign to this object the value of the specified 'rhs' object.
+ // Assign to this object the value of the specified 'rhs' object.
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
AddReverseProxy& operator=(AddReverseProxy&& rhs);
- // Assign to this object the value of the specified 'rhs' object.
- // After performing this action, the 'rhs' object will be left in a
- // valid, but unspecified state.
+ // Assign to this object the value of the specified 'rhs' object.
+ // After performing this action, the 'rhs' object will be left in a
+ // valid, but unspecified state.
#endif
void reset();
- // Reset this object to the default value (i.e., its value upon
- // default construction).
+ // Reset this object to the default value (i.e., its value upon
+ // default construction).
template
int manipulateAttributes(t_MANIPULATOR& manipulator);
- // Invoke the specified 'manipulator' sequentially on the address of
- // each (modifiable) attribute of this object, supplying 'manipulator'
- // with the corresponding attribute information structure until such
- // invocation returns a non-zero value. Return the value from the
- // last invocation of 'manipulator' (i.e., the invocation that
- // terminated the sequence).
+ // Invoke the specified 'manipulator' sequentially on the address of
+ // each (modifiable) attribute of this object, supplying 'manipulator'
+ // with the corresponding attribute information structure until such
+ // invocation returns a non-zero value. Return the value from the
+ // last invocation of 'manipulator' (i.e., the invocation that
+ // terminated the sequence).
template
int manipulateAttribute(t_MANIPULATOR& manipulator, int id);
- // Invoke the specified 'manipulator' on the address of
- // the (modifiable) attribute indicated by the specified 'id',
- // supplying 'manipulator' with the corresponding attribute
- // information structure. Return the value returned from the
- // invocation of 'manipulator' if 'id' identifies an attribute of this
- // class, and -1 otherwise.
-
- template
- int manipulateAttribute(t_MANIPULATOR& manipulator,
- const char* name,
- int nameLength);
- // Invoke the specified 'manipulator' on the address of
- // the (modifiable) attribute indicated by the specified 'name' of the
- // specified 'nameLength', supplying 'manipulator' with the
- // corresponding attribute information structure. Return the value
- // returned from the invocation of 'manipulator' if 'name' identifies
- // an attribute of this class, and -1 otherwise.
+ // Invoke the specified 'manipulator' on the address of
+ // the (modifiable) attribute indicated by the specified 'id',
+ // supplying 'manipulator' with the corresponding attribute
+ // information structure. Return the value returned from the
+ // invocation of 'manipulator' if 'id' identifies an attribute of this
+ // class, and -1 otherwise.
+
+ template
+ int manipulateAttribute(t_MANIPULATOR& manipulator,
+ const char *name,
+ int nameLength);
+ // Invoke the specified 'manipulator' on the address of
+ // the (modifiable) attribute indicated by the specified 'name' of the
+ // specified 'nameLength', supplying 'manipulator' with the
+ // corresponding attribute information structure. Return the value
+ // returned from the invocation of 'manipulator' if 'name' identifies
+ // an attribute of this class, and -1 otherwise.
bsl::string& clusterName();
- // Return a reference to the modifiable "ClusterName" attribute of this
- // object.
+ // Return a reference to the modifiable "ClusterName" attribute of this
+ // object.
bsl::string& remotePeer();
- // Return a reference to the modifiable "RemotePeer" attribute of this
- // object.
+ // Return a reference to the modifiable "RemotePeer" attribute of this
+ // object.
// ACCESSORS
- bsl::ostream&
- print(bsl::ostream& stream, int level = 0, int spacesPerLevel = 4) const;
- // Format this object to the specified output 'stream' at the
- // optionally specified indentation 'level' and return a reference to
- // the modifiable 'stream'. If 'level' is specified, optionally
- // specify 'spacesPerLevel', the number of spaces per indentation level
- // for this and all of its nested objects. Each line is indented by
- // the absolute value of 'level * spacesPerLevel'. If 'level' is
- // negative, suppress indentation of the first line. If
- // 'spacesPerLevel' is negative, suppress line breaks and format the
- // entire output on one line. If 'stream' is initially invalid, this
- // operation has no effect. Note that a trailing newline is provided
- // in multiline mode only.
+ bsl::ostream& print(bsl::ostream& stream,
+ int level = 0,
+ int spacesPerLevel = 4) const;
+ // Format this object to the specified output 'stream' at the
+ // optionally specified indentation 'level' and return a reference to
+ // the modifiable 'stream'. If 'level' is specified, optionally
+ // specify 'spacesPerLevel', the number of spaces per indentation level
+ // for this and all of its nested objects. Each line is indented by
+ // the absolute value of 'level * spacesPerLevel'. If 'level' is
+ // negative, suppress indentation of the first line. If
+ // 'spacesPerLevel' is negative, suppress line breaks and format the
+ // entire output on one line. If 'stream' is initially invalid, this
+ // operation has no effect. Note that a trailing newline is provided
+ // in multiline mode only.
template
int accessAttributes(t_ACCESSOR& accessor) const;
- // Invoke the specified 'accessor' sequentially on each
- // (non-modifiable) attribute of this object, supplying 'accessor'
- // with the corresponding attribute information structure until such
- // invocation returns a non-zero value. Return the value from the
- // last invocation of 'accessor' (i.e., the invocation that terminated
- // the sequence).
+ // Invoke the specified 'accessor' sequentially on each
+ // (non-modifiable) attribute of this object, supplying 'accessor'
+ // with the corresponding attribute information structure until such
+ // invocation returns a non-zero value. Return the value from the
+ // last invocation of 'accessor' (i.e., the invocation that terminated
+ // the sequence).
template
int accessAttribute(t_ACCESSOR& accessor, int id) const;
- // Invoke the specified 'accessor' on the (non-modifiable) attribute
- // of this object indicated by the specified 'id', supplying 'accessor'
- // with the corresponding attribute information structure. Return the
- // value returned from the invocation of 'accessor' if 'id' identifies
- // an attribute of this class, and -1 otherwise.
+ // Invoke the specified 'accessor' on the (non-modifiable) attribute
+ // of this object indicated by the specified 'id', supplying 'accessor'
+ // with the corresponding attribute information structure. Return the
+ // value returned from the invocation of 'accessor' if 'id' identifies
+ // an attribute of this class, and -1 otherwise.
template
- int accessAttribute(t_ACCESSOR& accessor,
- const char* name,
+ int accessAttribute(t_ACCESSOR& accessor,
+ const char *name,
int nameLength) const;
- // Invoke the specified 'accessor' on the (non-modifiable) attribute
- // of this object indicated by the specified 'name' of the specified
- // 'nameLength', supplying 'accessor' with the corresponding attribute
- // information structure. Return the value returned from the
- // invocation of 'accessor' if 'name' identifies an attribute of this
- // class, and -1 otherwise.
+ // Invoke the specified 'accessor' on the (non-modifiable) attribute
+ // of this object indicated by the specified 'name' of the specified
+ // 'nameLength', supplying 'accessor' with the corresponding attribute
+ // information structure. Return the value returned from the
+ // invocation of 'accessor' if 'name' identifies an attribute of this
+ // class, and -1 otherwise.
const bsl::string& clusterName() const;
- // Return a reference offering non-modifiable access to the
- // "ClusterName" attribute of this object.
+ // Return a reference offering non-modifiable access to the
+ // "ClusterName" attribute of this object.
const bsl::string& remotePeer() const;
- // Return a reference offering non-modifiable access to the
- // "RemotePeer" attribute of this object.
+ // Return a reference offering non-modifiable access to the
+ // "RemotePeer" attribute of this object.
// HIDDEN FRIENDS
friend bool operator==(const AddReverseProxy& lhs,
const AddReverseProxy& rhs)
- // Return 'true' if the specified 'lhs' and 'rhs' attribute objects
- // have the same value, and 'false' otherwise. Two attribute objects
- // have the same value if each respective attribute has the same value.
+ // Return 'true' if the specified 'lhs' and 'rhs' attribute objects
+ // have the same value, and 'false' otherwise. Two attribute objects
+ // have the same value if each respective attribute has the same value.
{
return lhs.clusterName() == rhs.clusterName() &&
lhs.remotePeer() == rhs.remotePeer();
@@ -614,15 +366,15 @@ class AddReverseProxy {
friend bool operator!=(const AddReverseProxy& lhs,
const AddReverseProxy& rhs)
- // Returns '!(lhs == rhs)'
+ // Returns '!(lhs == rhs)'
{
return !(lhs == rhs);
}
friend bsl::ostream& operator<<(bsl::ostream& stream,
const AddReverseProxy& rhs)
- // Format the specified 'rhs' to the specified output 'stream' and
- // return a reference to the modifiable 'stream'.
+ // Format the specified 'rhs' to the specified output 'stream' and
+ // return a reference to the modifiable 'stream'.
{
return rhs.print(stream, 0, -1);
}
@@ -630,10 +382,10 @@ class AddReverseProxy {
template
friend void hashAppend(t_HASH_ALGORITHM& hashAlg,
const AddReverseProxy& object)
- // Pass the specified 'object' to the specified 'hashAlg'. This
- // function integrates with the 'bslh' modular hashing system and
- // effectively provides a 'bsl::hash' specialization for
- // 'AddReverseProxy'.
+ // Pass the specified 'object' to the specified 'hashAlg'. This
+ // function integrates with the 'bslh' modular hashing system and
+ // effectively provides a 'bsl::hash' specialization for
+ // 'AddReverseProxy'.
{
using bslh::hashAppend;
hashAppend(hashAlg, object.clusterName());
@@ -645,26 +397,32 @@ class AddReverseProxy {
// TRAITS
-BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(
- mqbcmd::AddReverseProxy)
+BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::AddReverseProxy)
namespace mqbcmd {
-// ==================
-// class BrokerConfig
-// ==================
+ // ==================
+ // class BrokerConfig
+ // ==================
class BrokerConfig {
+
// INSTANCE DATA
- bsl::string d_asJSON;
+ bsl::string d_asJSON;
public:
// TYPES
- enum { ATTRIBUTE_ID_AS_J_S_O_N = 0 };
+ enum {
+ ATTRIBUTE_ID_AS_J_S_O_N = 0
+ };
- enum { NUM_ATTRIBUTES = 1 };
+ enum {
+ NUM_ATTRIBUTES = 1
+ };
- enum { ATTRIBUTE_INDEX_AS_J_S_O_N = 0 };
+ enum {
+ ATTRIBUTE_INDEX_AS_J_S_O_N = 0
+ };
// CONSTANTS
static const char CLASS_NAME[];
@@ -673,164 +431,167 @@ class BrokerConfig {
public:
// CLASS METHODS
- static const bdlat_AttributeInfo* lookupAttributeInfo(int id);
- // Return attribute information for the attribute indicated by the
- // specified 'id' if the attribute exists, and 0 otherwise.
+ static const bdlat_AttributeInfo *lookupAttributeInfo(int id);
+ // Return attribute information for the attribute indicated by the
+ // specified 'id' if the attribute exists, and 0 otherwise.
- static const bdlat_AttributeInfo* lookupAttributeInfo(const char* name,
- int nameLength);
- // Return attribute information for the attribute indicated by the
- // specified 'name' of the specified 'nameLength' if the attribute
- // exists, and 0 otherwise.
+ static const bdlat_AttributeInfo *lookupAttributeInfo(
+ const char *name,
+ int nameLength);
+ // Return attribute information for the attribute indicated by the
+ // specified 'name' of the specified 'nameLength' if the attribute
+ // exists, and 0 otherwise.
// CREATORS
- explicit BrokerConfig(bslma::Allocator* basicAllocator = 0);
- // Create an object of type 'BrokerConfig' having the default value.
- // Use the optionally specified 'basicAllocator' to supply memory. If
- // 'basicAllocator' is 0, the currently installed default allocator is
- // used.
+ explicit BrokerConfig(bslma::Allocator *basicAllocator = 0);
+ // Create an object of type 'BrokerConfig' having the default value.
+ // Use the optionally specified 'basicAllocator' to supply memory. If
+ // 'basicAllocator' is 0, the currently installed default allocator is
+ // used.
BrokerConfig(const BrokerConfig& original,
- bslma::Allocator* basicAllocator = 0);
- // Create an object of type 'BrokerConfig' having the value of the
- // specified 'original' object. Use the optionally specified
- // 'basicAllocator' to supply memory. If 'basicAllocator' is 0, the
- // currently installed default allocator is used.
-
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ bslma::Allocator *basicAllocator = 0);
+ // Create an object of type 'BrokerConfig' having the value of the
+ // specified 'original' object. Use the optionally specified
+ // 'basicAllocator' to supply memory. If 'basicAllocator' is 0, the
+ // currently installed default allocator is used.
+
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
BrokerConfig(BrokerConfig&& original) noexcept;
- // Create an object of type 'BrokerConfig' having the value of the
- // specified 'original' object. After performing this action, the
- // 'original' object will be left in a valid, but unspecified state.
+ // Create an object of type 'BrokerConfig' having the value of the
+ // specified 'original' object. After performing this action, the
+ // 'original' object will be left in a valid, but unspecified state.
- BrokerConfig(BrokerConfig&& original, bslma::Allocator* basicAllocator);
- // Create an object of type 'BrokerConfig' having the value of the
- // specified 'original' object. After performing this action, the
- // 'original' object will be left in a valid, but unspecified state.
- // Use the optionally specified 'basicAllocator' to supply memory. If
- // 'basicAllocator' is 0, the currently installed default allocator is
- // used.
+ BrokerConfig(BrokerConfig&& original,
+ bslma::Allocator *basicAllocator);
+ // Create an object of type 'BrokerConfig' having the value of the
+ // specified 'original' object. After performing this action, the
+ // 'original' object will be left in a valid, but unspecified state.
+ // Use the optionally specified 'basicAllocator' to supply memory. If
+ // 'basicAllocator' is 0, the currently installed default allocator is
+ // used.
#endif
~BrokerConfig();
- // Destroy this object.
+ // Destroy this object.
// MANIPULATORS
BrokerConfig& operator=(const BrokerConfig& rhs);
- // Assign to this object the value of the specified 'rhs' object.
+ // Assign to this object the value of the specified 'rhs' object.
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
BrokerConfig& operator=(BrokerConfig&& rhs);
- // Assign to this object the value of the specified 'rhs' object.
- // After performing this action, the 'rhs' object will be left in a
- // valid, but unspecified state.
+ // Assign to this object the value of the specified 'rhs' object.
+ // After performing this action, the 'rhs' object will be left in a
+ // valid, but unspecified state.
#endif
void reset();
- // Reset this object to the default value (i.e., its value upon
- // default construction).
+ // Reset this object to the default value (i.e., its value upon
+ // default construction).
template
int manipulateAttributes(t_MANIPULATOR& manipulator);
- // Invoke the specified 'manipulator' sequentially on the address of
- // each (modifiable) attribute of this object, supplying 'manipulator'
- // with the corresponding attribute information structure until such
- // invocation returns a non-zero value. Return the value from the
- // last invocation of 'manipulator' (i.e., the invocation that
- // terminated the sequence).
+ // Invoke the specified 'manipulator' sequentially on the address of
+ // each (modifiable) attribute of this object, supplying 'manipulator'
+ // with the corresponding attribute information structure until such
+ // invocation returns a non-zero value. Return the value from the
+ // last invocation of 'manipulator' (i.e., the invocation that
+ // terminated the sequence).
template
int manipulateAttribute(t_MANIPULATOR& manipulator, int id);
- // Invoke the specified 'manipulator' on the address of
- // the (modifiable) attribute indicated by the specified 'id',
- // supplying 'manipulator' with the corresponding attribute
- // information structure. Return the value returned from the
- // invocation of 'manipulator' if 'id' identifies an attribute of this
- // class, and -1 otherwise.
-
- template
- int manipulateAttribute(t_MANIPULATOR& manipulator,
- const char* name,
- int nameLength);
- // Invoke the specified 'manipulator' on the address of
- // the (modifiable) attribute indicated by the specified 'name' of the
- // specified 'nameLength', supplying 'manipulator' with the
- // corresponding attribute information structure. Return the value
- // returned from the invocation of 'manipulator' if 'name' identifies
- // an attribute of this class, and -1 otherwise.
+ // Invoke the specified 'manipulator' on the address of
+ // the (modifiable) attribute indicated by the specified 'id',
+ // supplying 'manipulator' with the corresponding attribute
+ // information structure. Return the value returned from the
+ // invocation of 'manipulator' if 'id' identifies an attribute of this
+ // class, and -1 otherwise.
+
+ template
+ int manipulateAttribute(t_MANIPULATOR& manipulator,
+ const char *name,
+ int nameLength);
+ // Invoke the specified 'manipulator' on the address of
+ // the (modifiable) attribute indicated by the specified 'name' of the
+ // specified 'nameLength', supplying 'manipulator' with the
+ // corresponding attribute information structure. Return the value
+ // returned from the invocation of 'manipulator' if 'name' identifies
+ // an attribute of this class, and -1 otherwise.
bsl::string& asJSON();
- // Return a reference to the modifiable "AsJSON" attribute of this
- // object.
+ // Return a reference to the modifiable "AsJSON" attribute of this
+ // object.
// ACCESSORS
- bsl::ostream&
- print(bsl::ostream& stream, int level = 0, int spacesPerLevel = 4) const;
- // Format this object to the specified output 'stream' at the
- // optionally specified indentation 'level' and return a reference to
- // the modifiable 'stream'. If 'level' is specified, optionally
- // specify 'spacesPerLevel', the number of spaces per indentation level
- // for this and all of its nested objects. Each line is indented by
- // the absolute value of 'level * spacesPerLevel'. If 'level' is
- // negative, suppress indentation of the first line. If
- // 'spacesPerLevel' is negative, suppress line breaks and format the
- // entire output on one line. If 'stream' is initially invalid, this
- // operation has no effect. Note that a trailing newline is provided
- // in multiline mode only.
+ bsl::ostream& print(bsl::ostream& stream,
+ int level = 0,
+ int spacesPerLevel = 4) const;
+ // Format this object to the specified output 'stream' at the
+ // optionally specified indentation 'level' and return a reference to
+ // the modifiable 'stream'. If 'level' is specified, optionally
+ // specify 'spacesPerLevel', the number of spaces per indentation level
+ // for this and all of its nested objects. Each line is indented by
+ // the absolute value of 'level * spacesPerLevel'. If 'level' is
+ // negative, suppress indentation of the first line. If
+ // 'spacesPerLevel' is negative, suppress line breaks and format the
+ // entire output on one line. If 'stream' is initially invalid, this
+ // operation has no effect. Note that a trailing newline is provided
+ // in multiline mode only.
template
int accessAttributes(t_ACCESSOR& accessor) const;
- // Invoke the specified 'accessor' sequentially on each
- // (non-modifiable) attribute of this object, supplying 'accessor'
- // with the corresponding attribute information structure until such
- // invocation returns a non-zero value. Return the value from the
- // last invocation of 'accessor' (i.e., the invocation that terminated
- // the sequence).
+ // Invoke the specified 'accessor' sequentially on each
+ // (non-modifiable) attribute of this object, supplying 'accessor'
+ // with the corresponding attribute information structure until such
+ // invocation returns a non-zero value. Return the value from the
+ // last invocation of 'accessor' (i.e., the invocation that terminated
+ // the sequence).
template
int accessAttribute(t_ACCESSOR& accessor, int id) const;
- // Invoke the specified 'accessor' on the (non-modifiable) attribute
- // of this object indicated by the specified 'id', supplying 'accessor'
- // with the corresponding attribute information structure. Return the
- // value returned from the invocation of 'accessor' if 'id' identifies
- // an attribute of this class, and -1 otherwise.
+ // Invoke the specified 'accessor' on the (non-modifiable) attribute
+ // of this object indicated by the specified 'id', supplying 'accessor'
+ // with the corresponding attribute information structure. Return the
+ // value returned from the invocation of 'accessor' if 'id' identifies
+ // an attribute of this class, and -1 otherwise.
template
- int accessAttribute(t_ACCESSOR& accessor,
- const char* name,
+ int accessAttribute(t_ACCESSOR& accessor,
+ const char *name,
int nameLength) const;
- // Invoke the specified 'accessor' on the (non-modifiable) attribute
- // of this object indicated by the specified 'name' of the specified
- // 'nameLength', supplying 'accessor' with the corresponding attribute
- // information structure. Return the value returned from the
- // invocation of 'accessor' if 'name' identifies an attribute of this
- // class, and -1 otherwise.
+ // Invoke the specified 'accessor' on the (non-modifiable) attribute
+ // of this object indicated by the specified 'name' of the specified
+ // 'nameLength', supplying 'accessor' with the corresponding attribute
+ // information structure. Return the value returned from the
+ // invocation of 'accessor' if 'name' identifies an attribute of this
+ // class, and -1 otherwise.
const bsl::string& asJSON() const;
- // Return a reference offering non-modifiable access to the "AsJSON"
- // attribute of this object.
+ // Return a reference offering non-modifiable access to the "AsJSON"
+ // attribute of this object.
// HIDDEN FRIENDS
friend bool operator==(const BrokerConfig& lhs, const BrokerConfig& rhs)
- // Return 'true' if the specified 'lhs' and 'rhs' attribute objects
- // have the same value, and 'false' otherwise. Two attribute objects
- // have the same value if each respective attribute has the same value.
+ // Return 'true' if the specified 'lhs' and 'rhs' attribute objects
+ // have the same value, and 'false' otherwise. Two attribute objects
+ // have the same value if each respective attribute has the same value.
{
return lhs.asJSON() == rhs.asJSON();
}
friend bool operator!=(const BrokerConfig& lhs, const BrokerConfig& rhs)
- // Returns '!(lhs == rhs)'
+ // Returns '!(lhs == rhs)'
{
return !(lhs == rhs);
}
friend bsl::ostream& operator<<(bsl::ostream& stream,
const BrokerConfig& rhs)
- // Format the specified 'rhs' to the specified output 'stream' and
- // return a reference to the modifiable 'stream'.
+ // Format the specified 'rhs' to the specified output 'stream' and
+ // return a reference to the modifiable 'stream'.
{
return rhs.print(stream, 0, -1);
}
@@ -838,10 +599,10 @@ class BrokerConfig {
template
friend void hashAppend(t_HASH_ALGORITHM& hashAlg,
const BrokerConfig& object)
- // Pass the specified 'object' to the specified 'hashAlg'. This
- // function integrates with the 'bslh' modular hashing system and
- // effectively provides a 'bsl::hash' specialization for
- // 'BrokerConfig'.
+ // Pass the specified 'object' to the specified 'hashAlg'. This
+ // function integrates with the 'bslh' modular hashing system and
+ // effectively provides a 'bsl::hash' specialization for
+ // 'BrokerConfig'.
{
using bslh::hashAppend;
hashAppend(hashAlg, object.asJSON());
@@ -856,21 +617,22 @@ BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::BrokerConfig)
namespace mqbcmd {
-// ===================
-// class CapacityMeter
-// ===================
+ // ===================
+ // class CapacityMeter
+ // ===================
class CapacityMeter {
+
// INSTANCE DATA
- bsls::Types::Int64 d_numMessages;
- bsls::Types::Int64 d_messageCapacity;
- bsls::Types::Int64 d_numMessagesReserved;
- bsls::Types::Int64 d_numBytes;
- bsls::Types::Int64 d_byteCapacity;
- bsls::Types::Int64 d_numBytesReserved;
- bsl::string d_name;
- bdlb::NullableAllocatedValue d_parent;
- bool d_isDisabled;
+ bsls::Types::Int64 d_numMessages;
+ bsls::Types::Int64 d_messageCapacity;
+ bsls::Types::Int64 d_numMessagesReserved;
+ bsls::Types::Int64 d_numBytes;
+ bsls::Types::Int64 d_byteCapacity;
+ bsls::Types::Int64 d_numBytesReserved;
+ bsl::string d_name;
+ bdlb::NullableAllocatedValue d_parent;
+ bool d_isDisabled;
// PRIVATE ACCESSORS
template
@@ -881,29 +643,31 @@ class CapacityMeter {
public:
// TYPES
enum {
- ATTRIBUTE_ID_NAME = 0,
- ATTRIBUTE_ID_IS_DISABLED = 1,
- ATTRIBUTE_ID_NUM_MESSAGES = 2,
- ATTRIBUTE_ID_MESSAGE_CAPACITY = 3,
- ATTRIBUTE_ID_NUM_MESSAGES_RESERVED = 4,
- ATTRIBUTE_ID_NUM_BYTES = 5,
- ATTRIBUTE_ID_BYTE_CAPACITY = 6,
- ATTRIBUTE_ID_NUM_BYTES_RESERVED = 7,
- ATTRIBUTE_ID_PARENT = 8
+ ATTRIBUTE_ID_NAME = 0
+ , ATTRIBUTE_ID_IS_DISABLED = 1
+ , ATTRIBUTE_ID_NUM_MESSAGES = 2
+ , ATTRIBUTE_ID_MESSAGE_CAPACITY = 3
+ , ATTRIBUTE_ID_NUM_MESSAGES_RESERVED = 4
+ , ATTRIBUTE_ID_NUM_BYTES = 5
+ , ATTRIBUTE_ID_BYTE_CAPACITY = 6
+ , ATTRIBUTE_ID_NUM_BYTES_RESERVED = 7
+ , ATTRIBUTE_ID_PARENT = 8
};
- enum { NUM_ATTRIBUTES = 9 };
+ enum {
+ NUM_ATTRIBUTES = 9
+ };
enum {
- ATTRIBUTE_INDEX_NAME = 0,
- ATTRIBUTE_INDEX_IS_DISABLED = 1,
- ATTRIBUTE_INDEX_NUM_MESSAGES = 2,
- ATTRIBUTE_INDEX_MESSAGE_CAPACITY = 3,
- ATTRIBUTE_INDEX_NUM_MESSAGES_RESERVED = 4,
- ATTRIBUTE_INDEX_NUM_BYTES = 5,
- ATTRIBUTE_INDEX_BYTE_CAPACITY = 6,
- ATTRIBUTE_INDEX_NUM_BYTES_RESERVED = 7,
- ATTRIBUTE_INDEX_PARENT = 8
+ ATTRIBUTE_INDEX_NAME = 0
+ , ATTRIBUTE_INDEX_IS_DISABLED = 1
+ , ATTRIBUTE_INDEX_NUM_MESSAGES = 2
+ , ATTRIBUTE_INDEX_MESSAGE_CAPACITY = 3
+ , ATTRIBUTE_INDEX_NUM_MESSAGES_RESERVED = 4
+ , ATTRIBUTE_INDEX_NUM_BYTES = 5
+ , ATTRIBUTE_INDEX_BYTE_CAPACITY = 6
+ , ATTRIBUTE_INDEX_NUM_BYTES_RESERVED = 7
+ , ATTRIBUTE_INDEX_PARENT = 8
};
// CONSTANTS
@@ -913,222 +677,225 @@ class CapacityMeter {
public:
// CLASS METHODS
- static const bdlat_AttributeInfo* lookupAttributeInfo(int id);
- // Return attribute information for the attribute indicated by the
- // specified 'id' if the attribute exists, and 0 otherwise.
+ static const bdlat_AttributeInfo *lookupAttributeInfo(int id);
+ // Return attribute information for the attribute indicated by the
+ // specified 'id' if the attribute exists, and 0 otherwise.
- static const bdlat_AttributeInfo* lookupAttributeInfo(const char* name,
- int nameLength);
- // Return attribute information for the attribute indicated by the
- // specified 'name' of the specified 'nameLength' if the attribute
- // exists, and 0 otherwise.
+ static const bdlat_AttributeInfo *lookupAttributeInfo(
+ const char *name,
+ int nameLength);
+ // Return attribute information for the attribute indicated by the
+ // specified 'name' of the specified 'nameLength' if the attribute
+ // exists, and 0 otherwise.
// CREATORS
- explicit CapacityMeter(bslma::Allocator* basicAllocator = 0);
- // Create an object of type 'CapacityMeter' having the default value.
- // Use the optionally specified 'basicAllocator' to supply memory. If
- // 'basicAllocator' is 0, the currently installed default allocator is
- // used.
+ explicit CapacityMeter(bslma::Allocator *basicAllocator = 0);
+ // Create an object of type 'CapacityMeter' having the default value.
+ // Use the optionally specified 'basicAllocator' to supply memory. If
+ // 'basicAllocator' is 0, the currently installed default allocator is
+ // used.
CapacityMeter(const CapacityMeter& original,
- bslma::Allocator* basicAllocator = 0);
- // Create an object of type 'CapacityMeter' having the value of the
- // specified 'original' object. Use the optionally specified
- // 'basicAllocator' to supply memory. If 'basicAllocator' is 0, the
- // currently installed default allocator is used.
-
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ bslma::Allocator *basicAllocator = 0);
+ // Create an object of type 'CapacityMeter' having the value of the
+ // specified 'original' object. Use the optionally specified
+ // 'basicAllocator' to supply memory. If 'basicAllocator' is 0, the
+ // currently installed default allocator is used.
+
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
CapacityMeter(CapacityMeter&& original) noexcept;
- // Create an object of type 'CapacityMeter' having the value of the
- // specified 'original' object. After performing this action, the
- // 'original' object will be left in a valid, but unspecified state.
+ // Create an object of type 'CapacityMeter' having the value of the
+ // specified 'original' object. After performing this action, the
+ // 'original' object will be left in a valid, but unspecified state.
- CapacityMeter(CapacityMeter&& original, bslma::Allocator* basicAllocator);
- // Create an object of type 'CapacityMeter' having the value of the
- // specified 'original' object. After performing this action, the
- // 'original' object will be left in a valid, but unspecified state.
- // Use the optionally specified 'basicAllocator' to supply memory. If
- // 'basicAllocator' is 0, the currently installed default allocator is
- // used.
+ CapacityMeter(CapacityMeter&& original,
+ bslma::Allocator *basicAllocator);
+ // Create an object of type 'CapacityMeter' having the value of the
+ // specified 'original' object. After performing this action, the
+ // 'original' object will be left in a valid, but unspecified state.
+ // Use the optionally specified 'basicAllocator' to supply memory. If
+ // 'basicAllocator' is 0, the currently installed default allocator is
+ // used.
#endif
~CapacityMeter();
- // Destroy this object.
+ // Destroy this object.
// MANIPULATORS
CapacityMeter& operator=(const CapacityMeter& rhs);
- // Assign to this object the value of the specified 'rhs' object.
+ // Assign to this object the value of the specified 'rhs' object.
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
CapacityMeter& operator=(CapacityMeter&& rhs);
- // Assign to this object the value of the specified 'rhs' object.
- // After performing this action, the 'rhs' object will be left in a
- // valid, but unspecified state.
+ // Assign to this object the value of the specified 'rhs' object.
+ // After performing this action, the 'rhs' object will be left in a
+ // valid, but unspecified state.
#endif
void reset();
- // Reset this object to the default value (i.e., its value upon
- // default construction).
+ // Reset this object to the default value (i.e., its value upon
+ // default construction).
template
int manipulateAttributes(t_MANIPULATOR& manipulator);
- // Invoke the specified 'manipulator' sequentially on the address of
- // each (modifiable) attribute of this object, supplying 'manipulator'
- // with the corresponding attribute information structure until such
- // invocation returns a non-zero value. Return the value from the
- // last invocation of 'manipulator' (i.e., the invocation that
- // terminated the sequence).
+ // Invoke the specified 'manipulator' sequentially on the address of
+ // each (modifiable) attribute of this object, supplying 'manipulator'
+ // with the corresponding attribute information structure until such
+ // invocation returns a non-zero value. Return the value from the
+ // last invocation of 'manipulator' (i.e., the invocation that
+ // terminated the sequence).
template
int manipulateAttribute(t_MANIPULATOR& manipulator, int id);
- // Invoke the specified 'manipulator' on the address of
- // the (modifiable) attribute indicated by the specified 'id',
- // supplying 'manipulator' with the corresponding attribute
- // information structure. Return the value returned from the
- // invocation of 'manipulator' if 'id' identifies an attribute of this
- // class, and -1 otherwise.
-
- template
- int manipulateAttribute(t_MANIPULATOR& manipulator,
- const char* name,
- int nameLength);
- // Invoke the specified 'manipulator' on the address of
- // the (modifiable) attribute indicated by the specified 'name' of the
- // specified 'nameLength', supplying 'manipulator' with the
- // corresponding attribute information structure. Return the value
- // returned from the invocation of 'manipulator' if 'name' identifies
- // an attribute of this class, and -1 otherwise.
+ // Invoke the specified 'manipulator' on the address of
+ // the (modifiable) attribute indicated by the specified 'id',
+ // supplying 'manipulator' with the corresponding attribute
+ // information structure. Return the value returned from the
+ // invocation of 'manipulator' if 'id' identifies an attribute of this
+ // class, and -1 otherwise.
+
+ template
+ int manipulateAttribute(t_MANIPULATOR& manipulator,
+ const char *name,
+ int nameLength);
+ // Invoke the specified 'manipulator' on the address of
+ // the (modifiable) attribute indicated by the specified 'name' of the
+ // specified 'nameLength', supplying 'manipulator' with the
+ // corresponding attribute information structure. Return the value
+ // returned from the invocation of 'manipulator' if 'name' identifies
+ // an attribute of this class, and -1 otherwise.
bsl::string& name();
- // Return a reference to the modifiable "Name" attribute of this
- // object.
+ // Return a reference to the modifiable "Name" attribute of this
+ // object.
bool& isDisabled();
- // Return a reference to the modifiable "IsDisabled" attribute of this
- // object.
+ // Return a reference to the modifiable "IsDisabled" attribute of this
+ // object.
bsls::Types::Int64& numMessages();
- // Return a reference to the modifiable "NumMessages" attribute of this
- // object.
+ // Return a reference to the modifiable "NumMessages" attribute of this
+ // object.
bsls::Types::Int64& messageCapacity();
- // Return a reference to the modifiable "MessageCapacity" attribute of
- // this object.
+ // Return a reference to the modifiable "MessageCapacity" attribute of
+ // this object.
bsls::Types::Int64& numMessagesReserved();
- // Return a reference to the modifiable "NumMessagesReserved" attribute
- // of this object.
+ // Return a reference to the modifiable "NumMessagesReserved" attribute
+ // of this object.
bsls::Types::Int64& numBytes();
- // Return a reference to the modifiable "NumBytes" attribute of this
- // object.
+ // Return a reference to the modifiable "NumBytes" attribute of this
+ // object.
bsls::Types::Int64& byteCapacity();
- // Return a reference to the modifiable "ByteCapacity" attribute of
- // this object.
+ // Return a reference to the modifiable "ByteCapacity" attribute of
+ // this object.
bsls::Types::Int64& numBytesReserved();
- // Return a reference to the modifiable "NumBytesReserved" attribute of
- // this object.
+ // Return a reference to the modifiable "NumBytesReserved" attribute of
+ // this object.
bdlb::NullableAllocatedValue& parent();
- // Return a reference to the modifiable "Parent" attribute of this
- // object.
+ // Return a reference to the modifiable "Parent" attribute of this
+ // object.
// ACCESSORS
- bsl::ostream&
- print(bsl::ostream& stream, int level = 0, int spacesPerLevel = 4) const;
- // Format this object to the specified output 'stream' at the
- // optionally specified indentation 'level' and return a reference to
- // the modifiable 'stream'. If 'level' is specified, optionally
- // specify 'spacesPerLevel', the number of spaces per indentation level
- // for this and all of its nested objects. Each line is indented by
- // the absolute value of 'level * spacesPerLevel'. If 'level' is
- // negative, suppress indentation of the first line. If
- // 'spacesPerLevel' is negative, suppress line breaks and format the
- // entire output on one line. If 'stream' is initially invalid, this
- // operation has no effect. Note that a trailing newline is provided
- // in multiline mode only.
+ bsl::ostream& print(bsl::ostream& stream,
+ int level = 0,
+ int spacesPerLevel = 4) const;
+ // Format this object to the specified output 'stream' at the
+ // optionally specified indentation 'level' and return a reference to
+ // the modifiable 'stream'. If 'level' is specified, optionally
+ // specify 'spacesPerLevel', the number of spaces per indentation level
+ // for this and all of its nested objects. Each line is indented by
+ // the absolute value of 'level * spacesPerLevel'. If 'level' is
+ // negative, suppress indentation of the first line. If
+ // 'spacesPerLevel' is negative, suppress line breaks and format the
+ // entire output on one line. If 'stream' is initially invalid, this
+ // operation has no effect. Note that a trailing newline is provided
+ // in multiline mode only.
template
int accessAttributes(t_ACCESSOR& accessor) const;
- // Invoke the specified 'accessor' sequentially on each
- // (non-modifiable) attribute of this object, supplying 'accessor'
- // with the corresponding attribute information structure until such
- // invocation returns a non-zero value. Return the value from the
- // last invocation of 'accessor' (i.e., the invocation that terminated
- // the sequence).
+ // Invoke the specified 'accessor' sequentially on each
+ // (non-modifiable) attribute of this object, supplying 'accessor'
+ // with the corresponding attribute information structure until such
+ // invocation returns a non-zero value. Return the value from the
+ // last invocation of 'accessor' (i.e., the invocation that terminated
+ // the sequence).
template
int accessAttribute(t_ACCESSOR& accessor, int id) const;
- // Invoke the specified 'accessor' on the (non-modifiable) attribute
- // of this object indicated by the specified 'id', supplying 'accessor'
- // with the corresponding attribute information structure. Return the
- // value returned from the invocation of 'accessor' if 'id' identifies
- // an attribute of this class, and -1 otherwise.
+ // Invoke the specified 'accessor' on the (non-modifiable) attribute
+ // of this object indicated by the specified 'id', supplying 'accessor'
+ // with the corresponding attribute information structure. Return the
+ // value returned from the invocation of 'accessor' if 'id' identifies
+ // an attribute of this class, and -1 otherwise.
template
- int accessAttribute(t_ACCESSOR& accessor,
- const char* name,
+ int accessAttribute(t_ACCESSOR& accessor,
+ const char *name,
int nameLength) const;
- // Invoke the specified 'accessor' on the (non-modifiable) attribute
- // of this object indicated by the specified 'name' of the specified
- // 'nameLength', supplying 'accessor' with the corresponding attribute
- // information structure. Return the value returned from the
- // invocation of 'accessor' if 'name' identifies an attribute of this
- // class, and -1 otherwise.
+ // Invoke the specified 'accessor' on the (non-modifiable) attribute
+ // of this object indicated by the specified 'name' of the specified
+ // 'nameLength', supplying 'accessor' with the corresponding attribute
+ // information structure. Return the value returned from the
+ // invocation of 'accessor' if 'name' identifies an attribute of this
+ // class, and -1 otherwise.
const bsl::string& name() const;
- // Return a reference offering non-modifiable access to the "Name"
- // attribute of this object.
+ // Return a reference offering non-modifiable access to the "Name"
+ // attribute of this object.
bool isDisabled() const;
- // Return the value of the "IsDisabled" attribute of this object.
+ // Return the value of the "IsDisabled" attribute of this object.
bsls::Types::Int64 numMessages() const;
- // Return the value of the "NumMessages" attribute of this object.
+ // Return the value of the "NumMessages" attribute of this object.
bsls::Types::Int64 messageCapacity() const;
- // Return the value of the "MessageCapacity" attribute of this object.
+ // Return the value of the "MessageCapacity" attribute of this object.
bsls::Types::Int64 numMessagesReserved() const;
- // Return the value of the "NumMessagesReserved" attribute of this
- // object.
+ // Return the value of the "NumMessagesReserved" attribute of this
+ // object.
bsls::Types::Int64 numBytes() const;
- // Return the value of the "NumBytes" attribute of this object.
+ // Return the value of the "NumBytes" attribute of this object.
bsls::Types::Int64 byteCapacity() const;
- // Return the value of the "ByteCapacity" attribute of this object.
+ // Return the value of the "ByteCapacity" attribute of this object.
bsls::Types::Int64 numBytesReserved() const;
- // Return the value of the "NumBytesReserved" attribute of this object.
+ // Return the value of the "NumBytesReserved" attribute of this object.
const bdlb::NullableAllocatedValue& parent() const;
- // Return a reference offering non-modifiable access to the "Parent"
- // attribute of this object.
+ // Return a reference offering non-modifiable access to the "Parent"
+ // attribute of this object.
// HIDDEN FRIENDS
friend bool operator==(const CapacityMeter& lhs, const CapacityMeter& rhs)
- // Return 'true' if the specified 'lhs' and 'rhs' attribute objects
- // have the same value, and 'false' otherwise. Two attribute objects
- // have the same value if each respective attribute has the same value.
+ // Return 'true' if the specified 'lhs' and 'rhs' attribute objects
+ // have the same value, and 'false' otherwise. Two attribute objects
+ // have the same value if each respective attribute has the same value.
{
return lhs.isEqualTo(rhs);
}
friend bool operator!=(const CapacityMeter& lhs, const CapacityMeter& rhs)
- // Returns '!(lhs == rhs)'
+ // Returns '!(lhs == rhs)'
{
return !(lhs == rhs);
}
friend bsl::ostream& operator<<(bsl::ostream& stream,
const CapacityMeter& rhs)
- // Format the specified 'rhs' to the specified output 'stream' and
- // return a reference to the modifiable 'stream'.
+ // Format the specified 'rhs' to the specified output 'stream' and
+ // return a reference to the modifiable 'stream'.
{
return rhs.print(stream, 0, -1);
}
@@ -1136,10 +903,10 @@ class CapacityMeter {
template
friend void hashAppend(t_HASH_ALGORITHM& hashAlg,
const CapacityMeter& object)
- // Pass the specified 'object' to the specified 'hashAlg'. This
- // function integrates with the 'bslh' modular hashing system and
- // effectively provides a 'bsl::hash' specialization for
- // 'CapacityMeter'.
+ // Pass the specified 'object' to the specified 'hashAlg'. This
+ // function integrates with the 'bslh' modular hashing system and
+ // effectively provides a 'bsl::hash' specialization for
+ // 'CapacityMeter'.
{
object.hashAppendImpl(hashAlg);
}
@@ -1149,32 +916,34 @@ class CapacityMeter {
// TRAITS
-BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(
- mqbcmd::CapacityMeter)
+BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::CapacityMeter)
namespace mqbcmd {
-// ==========================
-// class ClientMsgGroupsCount
-// ==========================
+ // ==========================
+ // class ClientMsgGroupsCount
+ // ==========================
class ClientMsgGroupsCount {
+
// INSTANCE DATA
- bsl::string d_clientDescription;
- unsigned int d_numMsgGroupIds;
+ bsl::string d_clientDescription;
+ unsigned int d_numMsgGroupIds;
public:
// TYPES
enum {
- ATTRIBUTE_ID_CLIENT_DESCRIPTION = 0,
- ATTRIBUTE_ID_NUM_MSG_GROUP_IDS = 1
+ ATTRIBUTE_ID_CLIENT_DESCRIPTION = 0
+ , ATTRIBUTE_ID_NUM_MSG_GROUP_IDS = 1
};
- enum { NUM_ATTRIBUTES = 2 };
+ enum {
+ NUM_ATTRIBUTES = 2
+ };
enum {
- ATTRIBUTE_INDEX_CLIENT_DESCRIPTION = 0,
- ATTRIBUTE_INDEX_NUM_MSG_GROUP_IDS = 1
+ ATTRIBUTE_INDEX_CLIENT_DESCRIPTION = 0
+ , ATTRIBUTE_INDEX_NUM_MSG_GROUP_IDS = 1
};
// CONSTANTS
@@ -1184,159 +953,161 @@ class ClientMsgGroupsCount {
public:
// CLASS METHODS
- static const bdlat_AttributeInfo* lookupAttributeInfo(int id);
- // Return attribute information for the attribute indicated by the
- // specified 'id' if the attribute exists, and 0 otherwise.
+ static const bdlat_AttributeInfo *lookupAttributeInfo(int id);
+ // Return attribute information for the attribute indicated by the
+ // specified 'id' if the attribute exists, and 0 otherwise.
- static const bdlat_AttributeInfo* lookupAttributeInfo(const char* name,
- int nameLength);
- // Return attribute information for the attribute indicated by the
- // specified 'name' of the specified 'nameLength' if the attribute
- // exists, and 0 otherwise.
+ static const bdlat_AttributeInfo *lookupAttributeInfo(
+ const char *name,
+ int nameLength);
+ // Return attribute information for the attribute indicated by the
+ // specified 'name' of the specified 'nameLength' if the attribute
+ // exists, and 0 otherwise.
// CREATORS
- explicit ClientMsgGroupsCount(bslma::Allocator* basicAllocator = 0);
- // Create an object of type 'ClientMsgGroupsCount' having the default
- // value. Use the optionally specified 'basicAllocator' to supply
- // memory. If 'basicAllocator' is 0, the currently installed default
- // allocator is used.
+ explicit ClientMsgGroupsCount(bslma::Allocator *basicAllocator = 0);
+ // Create an object of type 'ClientMsgGroupsCount' having the default
+ // value. Use the optionally specified 'basicAllocator' to supply
+ // memory. If 'basicAllocator' is 0, the currently installed default
+ // allocator is used.
ClientMsgGroupsCount(const ClientMsgGroupsCount& original,
- bslma::Allocator* basicAllocator = 0);
- // Create an object of type 'ClientMsgGroupsCount' having the value of
- // the specified 'original' object. Use the optionally specified
- // 'basicAllocator' to supply memory. If 'basicAllocator' is 0, the
- // currently installed default allocator is used.
-
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ bslma::Allocator *basicAllocator = 0);
+ // Create an object of type 'ClientMsgGroupsCount' having the value of
+ // the specified 'original' object. Use the optionally specified
+ // 'basicAllocator' to supply memory. If 'basicAllocator' is 0, the
+ // currently installed default allocator is used.
+
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ClientMsgGroupsCount(ClientMsgGroupsCount&& original) noexcept;
- // Create an object of type 'ClientMsgGroupsCount' having the value of
- // the specified 'original' object. After performing this action, the
- // 'original' object will be left in a valid, but unspecified state.
+ // Create an object of type 'ClientMsgGroupsCount' having the value of
+ // the specified 'original' object. After performing this action, the
+ // 'original' object will be left in a valid, but unspecified state.
ClientMsgGroupsCount(ClientMsgGroupsCount&& original,
- bslma::Allocator* basicAllocator);
- // Create an object of type 'ClientMsgGroupsCount' having the value of
- // the specified 'original' object. After performing this action, the
- // 'original' object will be left in a valid, but unspecified state.
- // Use the optionally specified 'basicAllocator' to supply memory. If
- // 'basicAllocator' is 0, the currently installed default allocator is
- // used.
+ bslma::Allocator *basicAllocator);
+ // Create an object of type 'ClientMsgGroupsCount' having the value of
+ // the specified 'original' object. After performing this action, the
+ // 'original' object will be left in a valid, but unspecified state.
+ // Use the optionally specified 'basicAllocator' to supply memory. If
+ // 'basicAllocator' is 0, the currently installed default allocator is
+ // used.
#endif
~ClientMsgGroupsCount();
- // Destroy this object.
+ // Destroy this object.
// MANIPULATORS
ClientMsgGroupsCount& operator=(const ClientMsgGroupsCount& rhs);
- // Assign to this object the value of the specified 'rhs' object.
+ // Assign to this object the value of the specified 'rhs' object.
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ClientMsgGroupsCount& operator=(ClientMsgGroupsCount&& rhs);
- // Assign to this object the value of the specified 'rhs' object.
- // After performing this action, the 'rhs' object will be left in a
- // valid, but unspecified state.
+ // Assign to this object the value of the specified 'rhs' object.
+ // After performing this action, the 'rhs' object will be left in a
+ // valid, but unspecified state.
#endif
void reset();
- // Reset this object to the default value (i.e., its value upon
- // default construction).
+ // Reset this object to the default value (i.e., its value upon
+ // default construction).
template
int manipulateAttributes(t_MANIPULATOR& manipulator);
- // Invoke the specified 'manipulator' sequentially on the address of
- // each (modifiable) attribute of this object, supplying 'manipulator'
- // with the corresponding attribute information structure until such
- // invocation returns a non-zero value. Return the value from the
- // last invocation of 'manipulator' (i.e., the invocation that
- // terminated the sequence).
+ // Invoke the specified 'manipulator' sequentially on the address of
+ // each (modifiable) attribute of this object, supplying 'manipulator'
+ // with the corresponding attribute information structure until such
+ // invocation returns a non-zero value. Return the value from the
+ // last invocation of 'manipulator' (i.e., the invocation that
+ // terminated the sequence).
template
int manipulateAttribute(t_MANIPULATOR& manipulator, int id);
- // Invoke the specified 'manipulator' on the address of
- // the (modifiable) attribute indicated by the specified 'id',
- // supplying 'manipulator' with the corresponding attribute
- // information structure. Return the value returned from the
- // invocation of 'manipulator' if 'id' identifies an attribute of this
- // class, and -1 otherwise.
-
- template
- int manipulateAttribute(t_MANIPULATOR& manipulator,
- const char* name,
- int nameLength);
- // Invoke the specified 'manipulator' on the address of
- // the (modifiable) attribute indicated by the specified 'name' of the
- // specified 'nameLength', supplying 'manipulator' with the
- // corresponding attribute information structure. Return the value
- // returned from the invocation of 'manipulator' if 'name' identifies
- // an attribute of this class, and -1 otherwise.
+ // Invoke the specified 'manipulator' on the address of
+ // the (modifiable) attribute indicated by the specified 'id',
+ // supplying 'manipulator' with the corresponding attribute
+ // information structure. Return the value returned from the
+ // invocation of 'manipulator' if 'id' identifies an attribute of this
+ // class, and -1 otherwise.
+
+ template
+ int manipulateAttribute(t_MANIPULATOR& manipulator,
+ const char *name,
+ int nameLength);
+ // Invoke the specified 'manipulator' on the address of
+ // the (modifiable) attribute indicated by the specified 'name' of the
+ // specified 'nameLength', supplying 'manipulator' with the
+ // corresponding attribute information structure. Return the value
+ // returned from the invocation of 'manipulator' if 'name' identifies
+ // an attribute of this class, and -1 otherwise.
bsl::string& clientDescription();
- // Return a reference to the modifiable "ClientDescription" attribute
- // of this object.
+ // Return a reference to the modifiable "ClientDescription" attribute
+ // of this object.
unsigned int& numMsgGroupIds();
- // Return a reference to the modifiable "NumMsgGroupIds" attribute of
- // this object.
+ // Return a reference to the modifiable "NumMsgGroupIds" attribute of
+ // this object.
// ACCESSORS
- bsl::ostream&
- print(bsl::ostream& stream, int level = 0, int spacesPerLevel = 4) const;
- // Format this object to the specified output 'stream' at the
- // optionally specified indentation 'level' and return a reference to
- // the modifiable 'stream'. If 'level' is specified, optionally
- // specify 'spacesPerLevel', the number of spaces per indentation level
- // for this and all of its nested objects. Each line is indented by
- // the absolute value of 'level * spacesPerLevel'. If 'level' is
- // negative, suppress indentation of the first line. If
- // 'spacesPerLevel' is negative, suppress line breaks and format the
- // entire output on one line. If 'stream' is initially invalid, this
- // operation has no effect. Note that a trailing newline is provided
- // in multiline mode only.
+ bsl::ostream& print(bsl::ostream& stream,
+ int level = 0,
+ int spacesPerLevel = 4) const;
+ // Format this object to the specified output 'stream' at the
+ // optionally specified indentation 'level' and return a reference to
+ // the modifiable 'stream'. If 'level' is specified, optionally
+ // specify 'spacesPerLevel', the number of spaces per indentation level
+ // for this and all of its nested objects. Each line is indented by
+ // the absolute value of 'level * spacesPerLevel'. If 'level' is
+ // negative, suppress indentation of the first line. If
+ // 'spacesPerLevel' is negative, suppress line breaks and format the
+ // entire output on one line. If 'stream' is initially invalid, this
+ // operation has no effect. Note that a trailing newline is provided
+ // in multiline mode only.
template
int accessAttributes(t_ACCESSOR& accessor) const;
- // Invoke the specified 'accessor' sequentially on each
- // (non-modifiable) attribute of this object, supplying 'accessor'
- // with the corresponding attribute information structure until such
- // invocation returns a non-zero value. Return the value from the
- // last invocation of 'accessor' (i.e., the invocation that terminated
- // the sequence).
+ // Invoke the specified 'accessor' sequentially on each
+ // (non-modifiable) attribute of this object, supplying 'accessor'
+ // with the corresponding attribute information structure until such
+ // invocation returns a non-zero value. Return the value from the
+ // last invocation of 'accessor' (i.e., the invocation that terminated
+ // the sequence).
template
int accessAttribute(t_ACCESSOR& accessor, int id) const;
- // Invoke the specified 'accessor' on the (non-modifiable) attribute
- // of this object indicated by the specified 'id', supplying 'accessor'
- // with the corresponding attribute information structure. Return the
- // value returned from the invocation of 'accessor' if 'id' identifies
- // an attribute of this class, and -1 otherwise.
+ // Invoke the specified 'accessor' on the (non-modifiable) attribute
+ // of this object indicated by the specified 'id', supplying 'accessor'
+ // with the corresponding attribute information structure. Return the
+ // value returned from the invocation of 'accessor' if 'id' identifies
+ // an attribute of this class, and -1 otherwise.
template
- int accessAttribute(t_ACCESSOR& accessor,
- const char* name,
+ int accessAttribute(t_ACCESSOR& accessor,
+ const char *name,
int nameLength) const;
- // Invoke the specified 'accessor' on the (non-modifiable) attribute
- // of this object indicated by the specified 'name' of the specified
- // 'nameLength', supplying 'accessor' with the corresponding attribute
- // information structure. Return the value returned from the
- // invocation of 'accessor' if 'name' identifies an attribute of this
- // class, and -1 otherwise.
+ // Invoke the specified 'accessor' on the (non-modifiable) attribute
+ // of this object indicated by the specified 'name' of the specified
+ // 'nameLength', supplying 'accessor' with the corresponding attribute
+ // information structure. Return the value returned from the
+ // invocation of 'accessor' if 'name' identifies an attribute of this
+ // class, and -1 otherwise.
const bsl::string& clientDescription() const;
- // Return a reference offering non-modifiable access to the
- // "ClientDescription" attribute of this object.
+ // Return a reference offering non-modifiable access to the
+ // "ClientDescription" attribute of this object.
unsigned int numMsgGroupIds() const;
- // Return the value of the "NumMsgGroupIds" attribute of this object.
+ // Return the value of the "NumMsgGroupIds" attribute of this object.
// HIDDEN FRIENDS
friend bool operator==(const ClientMsgGroupsCount& lhs,
const ClientMsgGroupsCount& rhs)
- // Return 'true' if the specified 'lhs' and 'rhs' attribute objects
- // have the same value, and 'false' otherwise. Two attribute objects
- // have the same value if each respective attribute has the same value.
+ // Return 'true' if the specified 'lhs' and 'rhs' attribute objects
+ // have the same value, and 'false' otherwise. Two attribute objects
+ // have the same value if each respective attribute has the same value.
{
return lhs.clientDescription() == rhs.clientDescription() &&
lhs.numMsgGroupIds() == rhs.numMsgGroupIds();
@@ -1344,15 +1115,15 @@ class ClientMsgGroupsCount {
friend bool operator!=(const ClientMsgGroupsCount& lhs,
const ClientMsgGroupsCount& rhs)
- // Returns '!(lhs == rhs)'
+ // Returns '!(lhs == rhs)'
{
return !(lhs == rhs);
}
friend bsl::ostream& operator<<(bsl::ostream& stream,
const ClientMsgGroupsCount& rhs)
- // Format the specified 'rhs' to the specified output 'stream' and
- // return a reference to the modifiable 'stream'.
+ // Format the specified 'rhs' to the specified output 'stream' and
+ // return a reference to the modifiable 'stream'.
{
return rhs.print(stream, 0, -1);
}
@@ -1360,10 +1131,10 @@ class ClientMsgGroupsCount {
template
friend void hashAppend(t_HASH_ALGORITHM& hashAlg,
const ClientMsgGroupsCount& object)
- // Pass the specified 'object' to the specified 'hashAlg'. This
- // function integrates with the 'bslh' modular hashing system and
- // effectively provides a 'bsl::hash' specialization for
- // 'ClientMsgGroupsCount'.
+ // Pass the specified 'object' to the specified 'hashAlg'. This
+ // function integrates with the 'bslh' modular hashing system and
+ // effectively provides a 'bsl::hash' specialization for
+ // 'ClientMsgGroupsCount'.
{
using bslh::hashAppend;
hashAppend(hashAlg, object.clientDescription());
@@ -1375,20 +1146,20 @@ class ClientMsgGroupsCount {
// TRAITS
-BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(
- mqbcmd::ClientMsgGroupsCount)
+BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::ClientMsgGroupsCount)
namespace mqbcmd {
-// ===================
-// class ClusterDomain
-// ===================
+ // ===================
+ // class ClusterDomain
+ // ===================
class ClusterDomain {
+
// INSTANCE DATA
- bsl::string d_name;
- unsigned int d_numAssignedQueues;
- bool d_loaded;
+ bsl::string d_name;
+ unsigned int d_numAssignedQueues;
+ bool d_loaded;
// PRIVATE ACCESSORS
template
@@ -1397,17 +1168,19 @@ class ClusterDomain {
public:
// TYPES
enum {
- ATTRIBUTE_ID_NAME = 0,
- ATTRIBUTE_ID_NUM_ASSIGNED_QUEUES = 1,
- ATTRIBUTE_ID_LOADED = 2
+ ATTRIBUTE_ID_NAME = 0
+ , ATTRIBUTE_ID_NUM_ASSIGNED_QUEUES = 1
+ , ATTRIBUTE_ID_LOADED = 2
};
- enum { NUM_ATTRIBUTES = 3 };
+ enum {
+ NUM_ATTRIBUTES = 3
+ };
enum {
- ATTRIBUTE_INDEX_NAME = 0,
- ATTRIBUTE_INDEX_NUM_ASSIGNED_QUEUES = 1,
- ATTRIBUTE_INDEX_LOADED = 2
+ ATTRIBUTE_INDEX_NAME = 0
+ , ATTRIBUTE_INDEX_NUM_ASSIGNED_QUEUES = 1
+ , ATTRIBUTE_INDEX_LOADED = 2
};
// CONSTANTS
@@ -1417,165 +1190,168 @@ class ClusterDomain {
public:
// CLASS METHODS
- static const bdlat_AttributeInfo* lookupAttributeInfo(int id);
- // Return attribute information for the attribute indicated by the
- // specified 'id' if the attribute exists, and 0 otherwise.
+ static const bdlat_AttributeInfo *lookupAttributeInfo(int id);
+ // Return attribute information for the attribute indicated by the
+ // specified 'id' if the attribute exists, and 0 otherwise.
- static const bdlat_AttributeInfo* lookupAttributeInfo(const char* name,
- int nameLength);
- // Return attribute information for the attribute indicated by the
- // specified 'name' of the specified 'nameLength' if the attribute
- // exists, and 0 otherwise.
+ static const bdlat_AttributeInfo *lookupAttributeInfo(
+ const char *name,
+ int nameLength);
+ // Return attribute information for the attribute indicated by the
+ // specified 'name' of the specified 'nameLength' if the attribute
+ // exists, and 0 otherwise.
// CREATORS
- explicit ClusterDomain(bslma::Allocator* basicAllocator = 0);
- // Create an object of type 'ClusterDomain' having the default value.
- // Use the optionally specified 'basicAllocator' to supply memory. If
- // 'basicAllocator' is 0, the currently installed default allocator is
- // used.
+ explicit ClusterDomain(bslma::Allocator *basicAllocator = 0);
+ // Create an object of type 'ClusterDomain' having the default value.
+ // Use the optionally specified 'basicAllocator' to supply memory. If
+ // 'basicAllocator' is 0, the currently installed default allocator is
+ // used.
ClusterDomain(const ClusterDomain& original,
- bslma::Allocator* basicAllocator = 0);
- // Create an object of type 'ClusterDomain' having the value of the
- // specified 'original' object. Use the optionally specified
- // 'basicAllocator' to supply memory. If 'basicAllocator' is 0, the
- // currently installed default allocator is used.
-
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ bslma::Allocator *basicAllocator = 0);
+ // Create an object of type 'ClusterDomain' having the value of the
+ // specified 'original' object. Use the optionally specified
+ // 'basicAllocator' to supply memory. If 'basicAllocator' is 0, the
+ // currently installed default allocator is used.
+
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ClusterDomain(ClusterDomain&& original) noexcept;
- // Create an object of type 'ClusterDomain' having the value of the
- // specified 'original' object. After performing this action, the
- // 'original' object will be left in a valid, but unspecified state.
+ // Create an object of type 'ClusterDomain' having the value of the
+ // specified 'original' object. After performing this action, the
+ // 'original' object will be left in a valid, but unspecified state.
- ClusterDomain(ClusterDomain&& original, bslma::Allocator* basicAllocator);
- // Create an object of type 'ClusterDomain' having the value of the
- // specified 'original' object. After performing this action, the
- // 'original' object will be left in a valid, but unspecified state.
- // Use the optionally specified 'basicAllocator' to supply memory. If
- // 'basicAllocator' is 0, the currently installed default allocator is
- // used.
+ ClusterDomain(ClusterDomain&& original,
+ bslma::Allocator *basicAllocator);
+ // Create an object of type 'ClusterDomain' having the value of the
+ // specified 'original' object. After performing this action, the
+ // 'original' object will be left in a valid, but unspecified state.
+ // Use the optionally specified 'basicAllocator' to supply memory. If
+ // 'basicAllocator' is 0, the currently installed default allocator is
+ // used.
#endif
~ClusterDomain();
- // Destroy this object.
+ // Destroy this object.
// MANIPULATORS
ClusterDomain& operator=(const ClusterDomain& rhs);
- // Assign to this object the value of the specified 'rhs' object.
+ // Assign to this object the value of the specified 'rhs' object.
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ClusterDomain& operator=(ClusterDomain&& rhs);
- // Assign to this object the value of the specified 'rhs' object.
- // After performing this action, the 'rhs' object will be left in a
- // valid, but unspecified state.
+ // Assign to this object the value of the specified 'rhs' object.
+ // After performing this action, the 'rhs' object will be left in a
+ // valid, but unspecified state.
#endif
void reset();
- // Reset this object to the default value (i.e., its value upon
- // default construction).
+ // Reset this object to the default value (i.e., its value upon
+ // default construction).
template
int manipulateAttributes(t_MANIPULATOR& manipulator);
- // Invoke the specified 'manipulator' sequentially on the address of
- // each (modifiable) attribute of this object, supplying 'manipulator'
- // with the corresponding attribute information structure until such
- // invocation returns a non-zero value. Return the value from the
- // last invocation of 'manipulator' (i.e., the invocation that
- // terminated the sequence).
+ // Invoke the specified 'manipulator' sequentially on the address of
+ // each (modifiable) attribute of this object, supplying 'manipulator'
+ // with the corresponding attribute information structure until such
+ // invocation returns a non-zero value. Return the value from the
+ // last invocation of 'manipulator' (i.e., the invocation that
+ // terminated the sequence).
template
int manipulateAttribute(t_MANIPULATOR& manipulator, int id);
- // Invoke the specified 'manipulator' on the address of
- // the (modifiable) attribute indicated by the specified 'id',
- // supplying 'manipulator' with the corresponding attribute
- // information structure. Return the value returned from the
- // invocation of 'manipulator' if 'id' identifies an attribute of this
- // class, and -1 otherwise.
-
- template
- int manipulateAttribute(t_MANIPULATOR& manipulator,
- const char* name,
- int nameLength);
- // Invoke the specified 'manipulator' on the address of
- // the (modifiable) attribute indicated by the specified 'name' of the
- // specified 'nameLength', supplying 'manipulator' with the
- // corresponding attribute information structure. Return the value
- // returned from the invocation of 'manipulator' if 'name' identifies
- // an attribute of this class, and -1 otherwise.
+ // Invoke the specified 'manipulator' on the address of
+ // the (modifiable) attribute indicated by the specified 'id',
+ // supplying 'manipulator' with the corresponding attribute
+ // information structure. Return the value returned from the
+ // invocation of 'manipulator' if 'id' identifies an attribute of this
+ // class, and -1 otherwise.
+
+ template
+ int manipulateAttribute(t_MANIPULATOR& manipulator,
+ const char *name,
+ int nameLength);
+ // Invoke the specified 'manipulator' on the address of
+ // the (modifiable) attribute indicated by the specified 'name' of the
+ // specified 'nameLength', supplying 'manipulator' with the
+ // corresponding attribute information structure. Return the value
+ // returned from the invocation of 'manipulator' if 'name' identifies
+ // an attribute of this class, and -1 otherwise.
bsl::string& name();
- // Return a reference to the modifiable "Name" attribute of this
- // object.
+ // Return a reference to the modifiable "Name" attribute of this
+ // object.
unsigned int& numAssignedQueues();
- // Return a reference to the modifiable "NumAssignedQueues" attribute
- // of this object.
+ // Return a reference to the modifiable "NumAssignedQueues" attribute
+ // of this object.
bool& loaded();
- // Return a reference to the modifiable "Loaded" attribute of this
- // object.
+ // Return a reference to the modifiable "Loaded" attribute of this
+ // object.
// ACCESSORS
- bsl::ostream&
- print(bsl::ostream& stream, int level = 0, int spacesPerLevel = 4) const;
- // Format this object to the specified output 'stream' at the
- // optionally specified indentation 'level' and return a reference to
- // the modifiable 'stream'. If 'level' is specified, optionally
- // specify 'spacesPerLevel', the number of spaces per indentation level
- // for this and all of its nested objects. Each line is indented by
- // the absolute value of 'level * spacesPerLevel'. If 'level' is
- // negative, suppress indentation of the first line. If
- // 'spacesPerLevel' is negative, suppress line breaks and format the
- // entire output on one line. If 'stream' is initially invalid, this
- // operation has no effect. Note that a trailing newline is provided
- // in multiline mode only.
+ bsl::ostream& print(bsl::ostream& stream,
+ int level = 0,
+ int spacesPerLevel = 4) const;
+ // Format this object to the specified output 'stream' at the
+ // optionally specified indentation 'level' and return a reference to
+ // the modifiable 'stream'. If 'level' is specified, optionally
+ // specify 'spacesPerLevel', the number of spaces per indentation level
+ // for this and all of its nested objects. Each line is indented by
+ // the absolute value of 'level * spacesPerLevel'. If 'level' is
+ // negative, suppress indentation of the first line. If
+ // 'spacesPerLevel' is negative, suppress line breaks and format the
+ // entire output on one line. If 'stream' is initially invalid, this
+ // operation has no effect. Note that a trailing newline is provided
+ // in multiline mode only.
template
int accessAttributes(t_ACCESSOR& accessor) const;
- // Invoke the specified 'accessor' sequentially on each
- // (non-modifiable) attribute of this object, supplying 'accessor'
- // with the corresponding attribute information structure until such
- // invocation returns a non-zero value. Return the value from the
- // last invocation of 'accessor' (i.e., the invocation that terminated
- // the sequence).
+ // Invoke the specified 'accessor' sequentially on each
+ // (non-modifiable) attribute of this object, supplying 'accessor'
+ // with the corresponding attribute information structure until such
+ // invocation returns a non-zero value. Return the value from the
+ // last invocation of 'accessor' (i.e., the invocation that terminated
+ // the sequence).
template
int accessAttribute(t_ACCESSOR& accessor, int id) const;
- // Invoke the specified 'accessor' on the (non-modifiable) attribute
- // of this object indicated by the specified 'id', supplying 'accessor'
- // with the corresponding attribute information structure. Return the
- // value returned from the invocation of 'accessor' if 'id' identifies
- // an attribute of this class, and -1 otherwise.
+ // Invoke the specified 'accessor' on the (non-modifiable) attribute
+ // of this object indicated by the specified 'id', supplying 'accessor'
+ // with the corresponding attribute information structure. Return the
+ // value returned from the invocation of 'accessor' if 'id' identifies
+ // an attribute of this class, and -1 otherwise.
template
- int accessAttribute(t_ACCESSOR& accessor,
- const char* name,
+ int accessAttribute(t_ACCESSOR& accessor,
+ const char *name,
int nameLength) const;
- // Invoke the specified 'accessor' on the (non-modifiable) attribute
- // of this object indicated by the specified 'name' of the specified
- // 'nameLength', supplying 'accessor' with the corresponding attribute
- // information structure. Return the value returned from the
- // invocation of 'accessor' if 'name' identifies an attribute of this
- // class, and -1 otherwise.
+ // Invoke the specified 'accessor' on the (non-modifiable) attribute
+ // of this object indicated by the specified 'name' of the specified
+ // 'nameLength', supplying 'accessor' with the corresponding attribute
+ // information structure. Return the value returned from the
+ // invocation of 'accessor' if 'name' identifies an attribute of this
+ // class, and -1 otherwise.
const bsl::string& name() const;
- // Return a reference offering non-modifiable access to the "Name"
- // attribute of this object.
+ // Return a reference offering non-modifiable access to the "Name"
+ // attribute of this object.
unsigned int numAssignedQueues() const;
- // Return the value of the "NumAssignedQueues" attribute of this
- // object.
+ // Return the value of the "NumAssignedQueues" attribute of this
+ // object.
bool loaded() const;
- // Return the value of the "Loaded" attribute of this object.
+ // Return the value of the "Loaded" attribute of this object.
// HIDDEN FRIENDS
friend bool operator==(const ClusterDomain& lhs, const ClusterDomain& rhs)
- // Return 'true' if the specified 'lhs' and 'rhs' attribute objects
- // have the same value, and 'false' otherwise. Two attribute objects
- // have the same value if each respective attribute has the same value.
+ // Return 'true' if the specified 'lhs' and 'rhs' attribute objects
+ // have the same value, and 'false' otherwise. Two attribute objects
+ // have the same value if each respective attribute has the same value.
{
return lhs.name() == rhs.name() &&
lhs.numAssignedQueues() == rhs.numAssignedQueues() &&
@@ -1583,15 +1359,15 @@ class ClusterDomain {
}
friend bool operator!=(const ClusterDomain& lhs, const ClusterDomain& rhs)
- // Returns '!(lhs == rhs)'
+ // Returns '!(lhs == rhs)'
{
return !(lhs == rhs);
}
friend bsl::ostream& operator<<(bsl::ostream& stream,
const ClusterDomain& rhs)
- // Format the specified 'rhs' to the specified output 'stream' and
- // return a reference to the modifiable 'stream'.
+ // Format the specified 'rhs' to the specified output 'stream' and
+ // return a reference to the modifiable 'stream'.
{
return rhs.print(stream, 0, -1);
}
@@ -1599,10 +1375,10 @@ class ClusterDomain {
template
friend void hashAppend(t_HASH_ALGORITHM& hashAlg,
const ClusterDomain& object)
- // Pass the specified 'object' to the specified 'hashAlg'. This
- // function integrates with the 'bslh' modular hashing system and
- // effectively provides a 'bsl::hash' specialization for
- // 'ClusterDomain'.
+ // Pass the specified 'object' to the specified 'hashAlg'. This
+ // function integrates with the 'bslh' modular hashing system and
+ // effectively provides a 'bsl::hash' specialization for
+ // 'ClusterDomain'.
{
object.hashAppendImpl(hashAlg);
}
@@ -1612,20 +1388,20 @@ class ClusterDomain {
// TRAITS
-BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(
- mqbcmd::ClusterDomain)
+BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::ClusterDomain)
namespace mqbcmd {
-// =================
-// class ClusterNode
-// =================
+ // =================
+ // class ClusterNode
+ // =================
class ClusterNode {
+
// INSTANCE DATA
- bsl::string d_hostName;
- bsl::string d_dataCenter;
- int d_nodeId;
+ bsl::string d_hostName;
+ bsl::string d_dataCenter;
+ int d_nodeId;
// PRIVATE ACCESSORS
template
@@ -1634,17 +1410,19 @@ class ClusterNode {
public:
// TYPES
enum {
- ATTRIBUTE_ID_HOST_NAME = 0,
- ATTRIBUTE_ID_NODE_ID = 1,
- ATTRIBUTE_ID_DATA_CENTER = 2
+ ATTRIBUTE_ID_HOST_NAME = 0
+ , ATTRIBUTE_ID_NODE_ID = 1
+ , ATTRIBUTE_ID_DATA_CENTER = 2
};
- enum { NUM_ATTRIBUTES = 3 };
+ enum {
+ NUM_ATTRIBUTES = 3
+ };
enum {
- ATTRIBUTE_INDEX_HOST_NAME = 0,
- ATTRIBUTE_INDEX_NODE_ID = 1,
- ATTRIBUTE_INDEX_DATA_CENTER = 2
+ ATTRIBUTE_INDEX_HOST_NAME = 0
+ , ATTRIBUTE_INDEX_NODE_ID = 1
+ , ATTRIBUTE_INDEX_DATA_CENTER = 2
};
// CONSTANTS
@@ -1654,165 +1432,168 @@ class ClusterNode {
public:
// CLASS METHODS
- static const bdlat_AttributeInfo* lookupAttributeInfo(int id);
- // Return attribute information for the attribute indicated by the
- // specified 'id' if the attribute exists, and 0 otherwise.
+ static const bdlat_AttributeInfo *lookupAttributeInfo(int id);
+ // Return attribute information for the attribute indicated by the
+ // specified 'id' if the attribute exists, and 0 otherwise.
- static const bdlat_AttributeInfo* lookupAttributeInfo(const char* name,
- int nameLength);
- // Return attribute information for the attribute indicated by the
- // specified 'name' of the specified 'nameLength' if the attribute
- // exists, and 0 otherwise.
+ static const bdlat_AttributeInfo *lookupAttributeInfo(
+ const char *name,
+ int nameLength);
+ // Return attribute information for the attribute indicated by the
+ // specified 'name' of the specified 'nameLength' if the attribute
+ // exists, and 0 otherwise.
// CREATORS
- explicit ClusterNode(bslma::Allocator* basicAllocator = 0);
- // Create an object of type 'ClusterNode' having the default value.
- // Use the optionally specified 'basicAllocator' to supply memory. If
- // 'basicAllocator' is 0, the currently installed default allocator is
- // used.
+ explicit ClusterNode(bslma::Allocator *basicAllocator = 0);
+ // Create an object of type 'ClusterNode' having the default value.
+ // Use the optionally specified 'basicAllocator' to supply memory. If
+ // 'basicAllocator' is 0, the currently installed default allocator is
+ // used.
ClusterNode(const ClusterNode& original,
- bslma::Allocator* basicAllocator = 0);
- // Create an object of type 'ClusterNode' having the value of the
- // specified 'original' object. Use the optionally specified
- // 'basicAllocator' to supply memory. If 'basicAllocator' is 0, the
- // currently installed default allocator is used.
-
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ bslma::Allocator *basicAllocator = 0);
+ // Create an object of type 'ClusterNode' having the value of the
+ // specified 'original' object. Use the optionally specified
+ // 'basicAllocator' to supply memory. If 'basicAllocator' is 0, the
+ // currently installed default allocator is used.
+
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ClusterNode(ClusterNode&& original) noexcept;
- // Create an object of type 'ClusterNode' having the value of the
- // specified 'original' object. After performing this action, the
- // 'original' object will be left in a valid, but unspecified state.
+ // Create an object of type 'ClusterNode' having the value of the
+ // specified 'original' object. After performing this action, the
+ // 'original' object will be left in a valid, but unspecified state.
- ClusterNode(ClusterNode&& original, bslma::Allocator* basicAllocator);
- // Create an object of type 'ClusterNode' having the value of the
- // specified 'original' object. After performing this action, the
- // 'original' object will be left in a valid, but unspecified state.
- // Use the optionally specified 'basicAllocator' to supply memory. If
- // 'basicAllocator' is 0, the currently installed default allocator is
- // used.
+ ClusterNode(ClusterNode&& original,
+ bslma::Allocator *basicAllocator);
+ // Create an object of type 'ClusterNode' having the value of the
+ // specified 'original' object. After performing this action, the
+ // 'original' object will be left in a valid, but unspecified state.
+ // Use the optionally specified 'basicAllocator' to supply memory. If
+ // 'basicAllocator' is 0, the currently installed default allocator is
+ // used.
#endif
~ClusterNode();
- // Destroy this object.
+ // Destroy this object.
// MANIPULATORS
ClusterNode& operator=(const ClusterNode& rhs);
- // Assign to this object the value of the specified 'rhs' object.
+ // Assign to this object the value of the specified 'rhs' object.
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ClusterNode& operator=(ClusterNode&& rhs);
- // Assign to this object the value of the specified 'rhs' object.
- // After performing this action, the 'rhs' object will be left in a
- // valid, but unspecified state.
+ // Assign to this object the value of the specified 'rhs' object.
+ // After performing this action, the 'rhs' object will be left in a
+ // valid, but unspecified state.
#endif
void reset();
- // Reset this object to the default value (i.e., its value upon
- // default construction).
+ // Reset this object to the default value (i.e., its value upon
+ // default construction).
template
int manipulateAttributes(t_MANIPULATOR& manipulator);
- // Invoke the specified 'manipulator' sequentially on the address of
- // each (modifiable) attribute of this object, supplying 'manipulator'
- // with the corresponding attribute information structure until such
- // invocation returns a non-zero value. Return the value from the
- // last invocation of 'manipulator' (i.e., the invocation that
- // terminated the sequence).
+ // Invoke the specified 'manipulator' sequentially on the address of
+ // each (modifiable) attribute of this object, supplying 'manipulator'
+ // with the corresponding attribute information structure until such
+ // invocation returns a non-zero value. Return the value from the
+ // last invocation of 'manipulator' (i.e., the invocation that
+ // terminated the sequence).
template
int manipulateAttribute(t_MANIPULATOR& manipulator, int id);
- // Invoke the specified 'manipulator' on the address of
- // the (modifiable) attribute indicated by the specified 'id',
- // supplying 'manipulator' with the corresponding attribute
- // information structure. Return the value returned from the
- // invocation of 'manipulator' if 'id' identifies an attribute of this
- // class, and -1 otherwise.
-
- template
- int manipulateAttribute(t_MANIPULATOR& manipulator,
- const char* name,
- int nameLength);
- // Invoke the specified 'manipulator' on the address of
- // the (modifiable) attribute indicated by the specified 'name' of the
- // specified 'nameLength', supplying 'manipulator' with the
- // corresponding attribute information structure. Return the value
- // returned from the invocation of 'manipulator' if 'name' identifies
- // an attribute of this class, and -1 otherwise.
+ // Invoke the specified 'manipulator' on the address of
+ // the (modifiable) attribute indicated by the specified 'id',
+ // supplying 'manipulator' with the corresponding attribute
+ // information structure. Return the value returned from the
+ // invocation of 'manipulator' if 'id' identifies an attribute of this
+ // class, and -1 otherwise.
+
+ template
+ int manipulateAttribute(t_MANIPULATOR& manipulator,
+ const char *name,
+ int nameLength);
+ // Invoke the specified 'manipulator' on the address of
+ // the (modifiable) attribute indicated by the specified 'name' of the
+ // specified 'nameLength', supplying 'manipulator' with the
+ // corresponding attribute information structure. Return the value
+ // returned from the invocation of 'manipulator' if 'name' identifies
+ // an attribute of this class, and -1 otherwise.
bsl::string& hostName();
- // Return a reference to the modifiable "HostName" attribute of this
- // object.
+ // Return a reference to the modifiable "HostName" attribute of this
+ // object.
int& nodeId();
- // Return a reference to the modifiable "NodeId" attribute of this
- // object.
+ // Return a reference to the modifiable "NodeId" attribute of this
+ // object.
bsl::string& dataCenter();
- // Return a reference to the modifiable "DataCenter" attribute of this
- // object.
+ // Return a reference to the modifiable "DataCenter" attribute of this
+ // object.
// ACCESSORS
- bsl::ostream&
- print(bsl::ostream& stream, int level = 0, int spacesPerLevel = 4) const;
- // Format this object to the specified output 'stream' at the
- // optionally specified indentation 'level' and return a reference to
- // the modifiable 'stream'. If 'level' is specified, optionally
- // specify 'spacesPerLevel', the number of spaces per indentation level
- // for this and all of its nested objects. Each line is indented by
- // the absolute value of 'level * spacesPerLevel'. If 'level' is
- // negative, suppress indentation of the first line. If
- // 'spacesPerLevel' is negative, suppress line breaks and format the
- // entire output on one line. If 'stream' is initially invalid, this
- // operation has no effect. Note that a trailing newline is provided
- // in multiline mode only.
+ bsl::ostream& print(bsl::ostream& stream,
+ int level = 0,
+ int spacesPerLevel = 4) const;
+ // Format this object to the specified output 'stream' at the
+ // optionally specified indentation 'level' and return a reference to
+ // the modifiable 'stream'. If 'level' is specified, optionally
+ // specify 'spacesPerLevel', the number of spaces per indentation level
+ // for this and all of its nested objects. Each line is indented by
+ // the absolute value of 'level * spacesPerLevel'. If 'level' is
+ // negative, suppress indentation of the first line. If
+ // 'spacesPerLevel' is negative, suppress line breaks and format the
+ // entire output on one line. If 'stream' is initially invalid, this
+ // operation has no effect. Note that a trailing newline is provided
+ // in multiline mode only.
template
int accessAttributes(t_ACCESSOR& accessor) const;
- // Invoke the specified 'accessor' sequentially on each
- // (non-modifiable) attribute of this object, supplying 'accessor'
- // with the corresponding attribute information structure until such
- // invocation returns a non-zero value. Return the value from the
- // last invocation of 'accessor' (i.e., the invocation that terminated
- // the sequence).
+ // Invoke the specified 'accessor' sequentially on each
+ // (non-modifiable) attribute of this object, supplying 'accessor'
+ // with the corresponding attribute information structure until such
+ // invocation returns a non-zero value. Return the value from the
+ // last invocation of 'accessor' (i.e., the invocation that terminated
+ // the sequence).
template
int accessAttribute(t_ACCESSOR& accessor, int id) const;
- // Invoke the specified 'accessor' on the (non-modifiable) attribute
- // of this object indicated by the specified 'id', supplying 'accessor'
- // with the corresponding attribute information structure. Return the
- // value returned from the invocation of 'accessor' if 'id' identifies
- // an attribute of this class, and -1 otherwise.
+ // Invoke the specified 'accessor' on the (non-modifiable) attribute
+ // of this object indicated by the specified 'id', supplying 'accessor'
+ // with the corresponding attribute information structure. Return the
+ // value returned from the invocation of 'accessor' if 'id' identifies
+ // an attribute of this class, and -1 otherwise.
template
- int accessAttribute(t_ACCESSOR& accessor,
- const char* name,
+ int accessAttribute(t_ACCESSOR& accessor,
+ const char *name,
int nameLength) const;
- // Invoke the specified 'accessor' on the (non-modifiable) attribute
- // of this object indicated by the specified 'name' of the specified
- // 'nameLength', supplying 'accessor' with the corresponding attribute
- // information structure. Return the value returned from the
- // invocation of 'accessor' if 'name' identifies an attribute of this
- // class, and -1 otherwise.
+ // Invoke the specified 'accessor' on the (non-modifiable) attribute
+ // of this object indicated by the specified 'name' of the specified
+ // 'nameLength', supplying 'accessor' with the corresponding attribute
+ // information structure. Return the value returned from the
+ // invocation of 'accessor' if 'name' identifies an attribute of this
+ // class, and -1 otherwise.
const bsl::string& hostName() const;
- // Return a reference offering non-modifiable access to the "HostName"
- // attribute of this object.
+ // Return a reference offering non-modifiable access to the "HostName"
+ // attribute of this object.
int nodeId() const;
- // Return the value of the "NodeId" attribute of this object.
+ // Return the value of the "NodeId" attribute of this object.
const bsl::string& dataCenter() const;
- // Return a reference offering non-modifiable access to the
- // "DataCenter" attribute of this object.
+ // Return a reference offering non-modifiable access to the
+ // "DataCenter" attribute of this object.
// HIDDEN FRIENDS
friend bool operator==(const ClusterNode& lhs, const ClusterNode& rhs)
- // Return 'true' if the specified 'lhs' and 'rhs' attribute objects
- // have the same value, and 'false' otherwise. Two attribute objects
- // have the same value if each respective attribute has the same value.
+ // Return 'true' if the specified 'lhs' and 'rhs' attribute objects
+ // have the same value, and 'false' otherwise. Two attribute objects
+ // have the same value if each respective attribute has the same value.
{
return lhs.hostName() == rhs.hostName() &&
lhs.nodeId() == rhs.nodeId() &&
@@ -1820,15 +1601,15 @@ class ClusterNode {
}
friend bool operator!=(const ClusterNode& lhs, const ClusterNode& rhs)
- // Returns '!(lhs == rhs)'
+ // Returns '!(lhs == rhs)'
{
return !(lhs == rhs);
}
friend bsl::ostream& operator<<(bsl::ostream& stream,
const ClusterNode& rhs)
- // Format the specified 'rhs' to the specified output 'stream' and
- // return a reference to the modifiable 'stream'.
+ // Format the specified 'rhs' to the specified output 'stream' and
+ // return a reference to the modifiable 'stream'.
{
return rhs.print(stream, 0, -1);
}
@@ -1836,9 +1617,9 @@ class ClusterNode {
template
friend void hashAppend(t_HASH_ALGORITHM& hashAlg,
const ClusterNode& object)
- // Pass the specified 'object' to the specified 'hashAlg'. This
- // function integrates with the 'bslh' modular hashing system and
- // effectively provides a 'bsl::hash' specialization for 'ClusterNode'.
+ // Pass the specified 'object' to the specified 'hashAlg'. This
+ // function integrates with the 'bslh' modular hashing system and
+ // effectively provides a 'bsl::hash' specialization for 'ClusterNode'.
{
object.hashAppendImpl(hashAlg);
}
@@ -1852,22 +1633,31 @@ BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::ClusterNode)
namespace mqbcmd {
-// =================
-// class CommandSpec
-// =================
+ // =================
+ // class CommandSpec
+ // =================
class CommandSpec {
+
// INSTANCE DATA
- bsl::string d_command;
- bsl::string d_description;
+ bsl::string d_command;
+ bsl::string d_description;
public:
// TYPES
- enum { ATTRIBUTE_ID_COMMAND = 0, ATTRIBUTE_ID_DESCRIPTION = 1 };
+ enum {
+ ATTRIBUTE_ID_COMMAND = 0
+ , ATTRIBUTE_ID_DESCRIPTION = 1
+ };
- enum { NUM_ATTRIBUTES = 2 };
+ enum {
+ NUM_ATTRIBUTES = 2
+ };
- enum { ATTRIBUTE_INDEX_COMMAND = 0, ATTRIBUTE_INDEX_DESCRIPTION = 1 };
+ enum {
+ ATTRIBUTE_INDEX_COMMAND = 0
+ , ATTRIBUTE_INDEX_DESCRIPTION = 1
+ };
// CONSTANTS
static const char CLASS_NAME[];
@@ -1876,173 +1666,176 @@ class CommandSpec {
public:
// CLASS METHODS
- static const bdlat_AttributeInfo* lookupAttributeInfo(int id);
- // Return attribute information for the attribute indicated by the
- // specified 'id' if the attribute exists, and 0 otherwise.
+ static const bdlat_AttributeInfo *lookupAttributeInfo(int id);
+ // Return attribute information for the attribute indicated by the
+ // specified 'id' if the attribute exists, and 0 otherwise.
- static const bdlat_AttributeInfo* lookupAttributeInfo(const char* name,
- int nameLength);
- // Return attribute information for the attribute indicated by the
- // specified 'name' of the specified 'nameLength' if the attribute
- // exists, and 0 otherwise.
+ static const bdlat_AttributeInfo *lookupAttributeInfo(
+ const char *name,
+ int nameLength);
+ // Return attribute information for the attribute indicated by the
+ // specified 'name' of the specified 'nameLength' if the attribute
+ // exists, and 0 otherwise.
// CREATORS
- explicit CommandSpec(bslma::Allocator* basicAllocator = 0);
- // Create an object of type 'CommandSpec' having the default value.
- // Use the optionally specified 'basicAllocator' to supply memory. If
- // 'basicAllocator' is 0, the currently installed default allocator is
- // used.
+ explicit CommandSpec(bslma::Allocator *basicAllocator = 0);
+ // Create an object of type 'CommandSpec' having the default value.
+ // Use the optionally specified 'basicAllocator' to supply memory. If
+ // 'basicAllocator' is 0, the currently installed default allocator is
+ // used.
CommandSpec(const CommandSpec& original,
- bslma::Allocator* basicAllocator = 0);
- // Create an object of type 'CommandSpec' having the value of the
- // specified 'original' object. Use the optionally specified
- // 'basicAllocator' to supply memory. If 'basicAllocator' is 0, the
- // currently installed default allocator is used.
-
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ bslma::Allocator *basicAllocator = 0);
+ // Create an object of type 'CommandSpec' having the value of the
+ // specified 'original' object. Use the optionally specified
+ // 'basicAllocator' to supply memory. If 'basicAllocator' is 0, the
+ // currently installed default allocator is used.
+
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
CommandSpec(CommandSpec&& original) noexcept;
- // Create an object of type 'CommandSpec' having the value of the
- // specified 'original' object. After performing this action, the
- // 'original' object will be left in a valid, but unspecified state.
+ // Create an object of type 'CommandSpec' having the value of the
+ // specified 'original' object. After performing this action, the
+ // 'original' object will be left in a valid, but unspecified state.
- CommandSpec(CommandSpec&& original, bslma::Allocator* basicAllocator);
- // Create an object of type 'CommandSpec' having the value of the
- // specified 'original' object. After performing this action, the
- // 'original' object will be left in a valid, but unspecified state.
- // Use the optionally specified 'basicAllocator' to supply memory. If
- // 'basicAllocator' is 0, the currently installed default allocator is
- // used.
+ CommandSpec(CommandSpec&& original,
+ bslma::Allocator *basicAllocator);
+ // Create an object of type 'CommandSpec' having the value of the
+ // specified 'original' object. After performing this action, the
+ // 'original' object will be left in a valid, but unspecified state.
+ // Use the optionally specified 'basicAllocator' to supply memory. If
+ // 'basicAllocator' is 0, the currently installed default allocator is
+ // used.
#endif
~CommandSpec();
- // Destroy this object.
+ // Destroy this object.
// MANIPULATORS
CommandSpec& operator=(const CommandSpec& rhs);
- // Assign to this object the value of the specified 'rhs' object.
+ // Assign to this object the value of the specified 'rhs' object.
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
CommandSpec& operator=(CommandSpec&& rhs);
- // Assign to this object the value of the specified 'rhs' object.
- // After performing this action, the 'rhs' object will be left in a
- // valid, but unspecified state.
+ // Assign to this object the value of the specified 'rhs' object.
+ // After performing this action, the 'rhs' object will be left in a
+ // valid, but unspecified state.
#endif
void reset();
- // Reset this object to the default value (i.e., its value upon
- // default construction).
+ // Reset this object to the default value (i.e., its value upon
+ // default construction).
template
int manipulateAttributes(t_MANIPULATOR& manipulator);
- // Invoke the specified 'manipulator' sequentially on the address of
- // each (modifiable) attribute of this object, supplying 'manipulator'
- // with the corresponding attribute information structure until such
- // invocation returns a non-zero value. Return the value from the
- // last invocation of 'manipulator' (i.e., the invocation that
- // terminated the sequence).
+ // Invoke the specified 'manipulator' sequentially on the address of
+ // each (modifiable) attribute of this object, supplying 'manipulator'
+ // with the corresponding attribute information structure until such
+ // invocation returns a non-zero value. Return the value from the
+ // last invocation of 'manipulator' (i.e., the invocation that
+ // terminated the sequence).
template
int manipulateAttribute(t_MANIPULATOR& manipulator, int id);
- // Invoke the specified 'manipulator' on the address of
- // the (modifiable) attribute indicated by the specified 'id',
- // supplying 'manipulator' with the corresponding attribute
- // information structure. Return the value returned from the
- // invocation of 'manipulator' if 'id' identifies an attribute of this
- // class, and -1 otherwise.
-
- template
- int manipulateAttribute(t_MANIPULATOR& manipulator,
- const char* name,
- int nameLength);
- // Invoke the specified 'manipulator' on the address of
- // the (modifiable) attribute indicated by the specified 'name' of the
- // specified 'nameLength', supplying 'manipulator' with the
- // corresponding attribute information structure. Return the value
- // returned from the invocation of 'manipulator' if 'name' identifies
- // an attribute of this class, and -1 otherwise.
+ // Invoke the specified 'manipulator' on the address of
+ // the (modifiable) attribute indicated by the specified 'id',
+ // supplying 'manipulator' with the corresponding attribute
+ // information structure. Return the value returned from the
+ // invocation of 'manipulator' if 'id' identifies an attribute of this
+ // class, and -1 otherwise.
+
+ template
+ int manipulateAttribute(t_MANIPULATOR& manipulator,
+ const char *name,
+ int nameLength);
+ // Invoke the specified 'manipulator' on the address of
+ // the (modifiable) attribute indicated by the specified 'name' of the
+ // specified 'nameLength', supplying 'manipulator' with the
+ // corresponding attribute information structure. Return the value
+ // returned from the invocation of 'manipulator' if 'name' identifies
+ // an attribute of this class, and -1 otherwise.
bsl::string& command();
- // Return a reference to the modifiable "Command" attribute of this
- // object.
+ // Return a reference to the modifiable "Command" attribute of this
+ // object.
bsl::string& description();
- // Return a reference to the modifiable "Description" attribute of this
- // object.
+ // Return a reference to the modifiable "Description" attribute of this
+ // object.
// ACCESSORS
- bsl::ostream&
- print(bsl::ostream& stream, int level = 0, int spacesPerLevel = 4) const;
- // Format this object to the specified output 'stream' at the
- // optionally specified indentation 'level' and return a reference to
- // the modifiable 'stream'. If 'level' is specified, optionally
- // specify 'spacesPerLevel', the number of spaces per indentation level
- // for this and all of its nested objects. Each line is indented by
- // the absolute value of 'level * spacesPerLevel'. If 'level' is
- // negative, suppress indentation of the first line. If
- // 'spacesPerLevel' is negative, suppress line breaks and format the
- // entire output on one line. If 'stream' is initially invalid, this
- // operation has no effect. Note that a trailing newline is provided
- // in multiline mode only.
+ bsl::ostream& print(bsl::ostream& stream,
+ int level = 0,
+ int spacesPerLevel = 4) const;
+ // Format this object to the specified output 'stream' at the
+ // optionally specified indentation 'level' and return a reference to
+ // the modifiable 'stream'. If 'level' is specified, optionally
+ // specify 'spacesPerLevel', the number of spaces per indentation level
+ // for this and all of its nested objects. Each line is indented by
+ // the absolute value of 'level * spacesPerLevel'. If 'level' is
+ // negative, suppress indentation of the first line. If
+ // 'spacesPerLevel' is negative, suppress line breaks and format the
+ // entire output on one line. If 'stream' is initially invalid, this
+ // operation has no effect. Note that a trailing newline is provided
+ // in multiline mode only.
template
int accessAttributes(t_ACCESSOR& accessor) const;
- // Invoke the specified 'accessor' sequentially on each
- // (non-modifiable) attribute of this object, supplying 'accessor'
- // with the corresponding attribute information structure until such
- // invocation returns a non-zero value. Return the value from the
- // last invocation of 'accessor' (i.e., the invocation that terminated
- // the sequence).
+ // Invoke the specified 'accessor' sequentially on each
+ // (non-modifiable) attribute of this object, supplying 'accessor'
+ // with the corresponding attribute information structure until such
+ // invocation returns a non-zero value. Return the value from the
+ // last invocation of 'accessor' (i.e., the invocation that terminated
+ // the sequence).
template
int accessAttribute(t_ACCESSOR& accessor, int id) const;
- // Invoke the specified 'accessor' on the (non-modifiable) attribute
- // of this object indicated by the specified 'id', supplying 'accessor'
- // with the corresponding attribute information structure. Return the
- // value returned from the invocation of 'accessor' if 'id' identifies
- // an attribute of this class, and -1 otherwise.
+ // Invoke the specified 'accessor' on the (non-modifiable) attribute
+ // of this object indicated by the specified 'id', supplying 'accessor'
+ // with the corresponding attribute information structure. Return the
+ // value returned from the invocation of 'accessor' if 'id' identifies
+ // an attribute of this class, and -1 otherwise.
template
- int accessAttribute(t_ACCESSOR& accessor,
- const char* name,
+ int accessAttribute(t_ACCESSOR& accessor,
+ const char *name,
int nameLength) const;
- // Invoke the specified 'accessor' on the (non-modifiable) attribute
- // of this object indicated by the specified 'name' of the specified
- // 'nameLength', supplying 'accessor' with the corresponding attribute
- // information structure. Return the value returned from the
- // invocation of 'accessor' if 'name' identifies an attribute of this
- // class, and -1 otherwise.
+ // Invoke the specified 'accessor' on the (non-modifiable) attribute
+ // of this object indicated by the specified 'name' of the specified
+ // 'nameLength', supplying 'accessor' with the corresponding attribute
+ // information structure. Return the value returned from the
+ // invocation of 'accessor' if 'name' identifies an attribute of this
+ // class, and -1 otherwise.
const bsl::string& command() const;
- // Return a reference offering non-modifiable access to the "Command"
- // attribute of this object.
+ // Return a reference offering non-modifiable access to the "Command"
+ // attribute of this object.
const bsl::string& description() const;
- // Return a reference offering non-modifiable access to the
- // "Description" attribute of this object.
+ // Return a reference offering non-modifiable access to the
+ // "Description" attribute of this object.
// HIDDEN FRIENDS
friend bool operator==(const CommandSpec& lhs, const CommandSpec& rhs)
- // Return 'true' if the specified 'lhs' and 'rhs' attribute objects
- // have the same value, and 'false' otherwise. Two attribute objects
- // have the same value if each respective attribute has the same value.
+ // Return 'true' if the specified 'lhs' and 'rhs' attribute objects
+ // have the same value, and 'false' otherwise. Two attribute objects
+ // have the same value if each respective attribute has the same value.
{
return lhs.command() == rhs.command() &&
lhs.description() == rhs.description();
}
friend bool operator!=(const CommandSpec& lhs, const CommandSpec& rhs)
- // Returns '!(lhs == rhs)'
+ // Returns '!(lhs == rhs)'
{
return !(lhs == rhs);
}
friend bsl::ostream& operator<<(bsl::ostream& stream,
const CommandSpec& rhs)
- // Format the specified 'rhs' to the specified output 'stream' and
- // return a reference to the modifiable 'stream'.
+ // Format the specified 'rhs' to the specified output 'stream' and
+ // return a reference to the modifiable 'stream'.
{
return rhs.print(stream, 0, -1);
}
@@ -2050,9 +1843,9 @@ class CommandSpec {
template
friend void hashAppend(t_HASH_ALGORITHM& hashAlg,
const CommandSpec& object)
- // Pass the specified 'object' to the specified 'hashAlg'. This
- // function integrates with the 'bslh' modular hashing system and
- // effectively provides a 'bsl::hash' specialization for 'CommandSpec'.
+ // Pass the specified 'object' to the specified 'hashAlg'. This
+ // function integrates with the 'bslh' modular hashing system and
+ // effectively provides a 'bsl::hash' specialization for 'CommandSpec'.
{
using bslh::hashAppend;
hashAppend(hashAlg, object.command());
@@ -2068,16 +1861,17 @@ BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::CommandSpec)
namespace mqbcmd {
-// ==================
-// class ConsumerInfo
-// ==================
+ // ==================
+ // class ConsumerInfo
+ // ==================
class ConsumerInfo {
+
// INSTANCE DATA
- bsls::Types::Int64 d_maxUnconfirmedMessages;
- bsls::Types::Int64 d_maxUnconfirmedBytes;
- int d_consumerPriority;
- int d_consumerPriorityCount;
+ bsls::Types::Int64 d_maxUnconfirmedMessages;
+ bsls::Types::Int64 d_maxUnconfirmedBytes;
+ int d_consumerPriority;
+ int d_consumerPriorityCount;
// PRIVATE ACCESSORS
template
@@ -2088,19 +1882,21 @@ class ConsumerInfo {
public:
// TYPES
enum {
- ATTRIBUTE_ID_MAX_UNCONFIRMED_MESSAGES = 0,
- ATTRIBUTE_ID_MAX_UNCONFIRMED_BYTES = 1,
- ATTRIBUTE_ID_CONSUMER_PRIORITY = 2,
- ATTRIBUTE_ID_CONSUMER_PRIORITY_COUNT = 3
+ ATTRIBUTE_ID_MAX_UNCONFIRMED_MESSAGES = 0
+ , ATTRIBUTE_ID_MAX_UNCONFIRMED_BYTES = 1
+ , ATTRIBUTE_ID_CONSUMER_PRIORITY = 2
+ , ATTRIBUTE_ID_CONSUMER_PRIORITY_COUNT = 3
};
- enum { NUM_ATTRIBUTES = 4 };
+ enum {
+ NUM_ATTRIBUTES = 4
+ };
enum {
- ATTRIBUTE_INDEX_MAX_UNCONFIRMED_MESSAGES = 0,
- ATTRIBUTE_INDEX_MAX_UNCONFIRMED_BYTES = 1,
- ATTRIBUTE_INDEX_CONSUMER_PRIORITY = 2,
- ATTRIBUTE_INDEX_CONSUMER_PRIORITY_COUNT = 3
+ ATTRIBUTE_INDEX_MAX_UNCONFIRMED_MESSAGES = 0
+ , ATTRIBUTE_INDEX_MAX_UNCONFIRMED_BYTES = 1
+ , ATTRIBUTE_INDEX_CONSUMER_PRIORITY = 2
+ , ATTRIBUTE_INDEX_CONSUMER_PRIORITY_COUNT = 3
};
// CONSTANTS
@@ -2110,147 +1906,150 @@ class ConsumerInfo {
public:
// CLASS METHODS
- static const bdlat_AttributeInfo* lookupAttributeInfo(int id);
- // Return attribute information for the attribute indicated by the
- // specified 'id' if the attribute exists, and 0 otherwise.
+ static const bdlat_AttributeInfo *lookupAttributeInfo(int id);
+ // Return attribute information for the attribute indicated by the
+ // specified 'id' if the attribute exists, and 0 otherwise.
- static const bdlat_AttributeInfo* lookupAttributeInfo(const char* name,
- int nameLength);
- // Return attribute information for the attribute indicated by the
- // specified 'name' of the specified 'nameLength' if the attribute
- // exists, and 0 otherwise.
+ static const bdlat_AttributeInfo *lookupAttributeInfo(
+ const char *name,
+ int nameLength);
+ // Return attribute information for the attribute indicated by the
+ // specified 'name' of the specified 'nameLength' if the attribute
+ // exists, and 0 otherwise.
// CREATORS
ConsumerInfo();
- // Create an object of type 'ConsumerInfo' having the default value.
+ // Create an object of type 'ConsumerInfo' having the default value.
+
// MANIPULATORS
void reset();
- // Reset this object to the default value (i.e., its value upon
- // default construction).
+ // Reset this object to the default value (i.e., its value upon
+ // default construction).
template
int manipulateAttributes(t_MANIPULATOR& manipulator);
- // Invoke the specified 'manipulator' sequentially on the address of
- // each (modifiable) attribute of this object, supplying 'manipulator'
- // with the corresponding attribute information structure until such
- // invocation returns a non-zero value. Return the value from the
- // last invocation of 'manipulator' (i.e., the invocation that
- // terminated the sequence).
+ // Invoke the specified 'manipulator' sequentially on the address of
+ // each (modifiable) attribute of this object, supplying 'manipulator'
+ // with the corresponding attribute information structure until such
+ // invocation returns a non-zero value. Return the value from the
+ // last invocation of 'manipulator' (i.e., the invocation that
+ // terminated the sequence).
template
int manipulateAttribute(t_MANIPULATOR& manipulator, int id);
- // Invoke the specified 'manipulator' on the address of
- // the (modifiable) attribute indicated by the specified 'id',
- // supplying 'manipulator' with the corresponding attribute
- // information structure. Return the value returned from the
- // invocation of 'manipulator' if 'id' identifies an attribute of this
- // class, and -1 otherwise.
-
- template
- int manipulateAttribute(t_MANIPULATOR& manipulator,
- const char* name,
- int nameLength);
- // Invoke the specified 'manipulator' on the address of
- // the (modifiable) attribute indicated by the specified 'name' of the
- // specified 'nameLength', supplying 'manipulator' with the
- // corresponding attribute information structure. Return the value
- // returned from the invocation of 'manipulator' if 'name' identifies
- // an attribute of this class, and -1 otherwise.
+ // Invoke the specified 'manipulator' on the address of
+ // the (modifiable) attribute indicated by the specified 'id',
+ // supplying 'manipulator' with the corresponding attribute
+ // information structure. Return the value returned from the
+ // invocation of 'manipulator' if 'id' identifies an attribute of this
+ // class, and -1 otherwise.
+
+ template
+ int manipulateAttribute(t_MANIPULATOR& manipulator,
+ const char *name,
+ int nameLength);
+ // Invoke the specified 'manipulator' on the address of
+ // the (modifiable) attribute indicated by the specified 'name' of the
+ // specified 'nameLength', supplying 'manipulator' with the
+ // corresponding attribute information structure. Return the value
+ // returned from the invocation of 'manipulator' if 'name' identifies
+ // an attribute of this class, and -1 otherwise.
bsls::Types::Int64& maxUnconfirmedMessages();
- // Return a reference to the modifiable "MaxUnconfirmedMessages"
- // attribute of this object.
+ // Return a reference to the modifiable "MaxUnconfirmedMessages"
+ // attribute of this object.
bsls::Types::Int64& maxUnconfirmedBytes();
- // Return a reference to the modifiable "MaxUnconfirmedBytes" attribute
- // of this object.
+ // Return a reference to the modifiable "MaxUnconfirmedBytes" attribute
+ // of this object.
int& consumerPriority();
- // Return a reference to the modifiable "ConsumerPriority" attribute of
- // this object.
+ // Return a reference to the modifiable "ConsumerPriority" attribute of
+ // this object.
int& consumerPriorityCount();
- // Return a reference to the modifiable "ConsumerPriorityCount"
- // attribute of this object.
+ // Return a reference to the modifiable "ConsumerPriorityCount"
+ // attribute of this object.
// ACCESSORS
- bsl::ostream&
- print(bsl::ostream& stream, int level = 0, int spacesPerLevel = 4) const;
- // Format this object to the specified output 'stream' at the
- // optionally specified indentation 'level' and return a reference to
- // the modifiable 'stream'. If 'level' is specified, optionally
- // specify 'spacesPerLevel', the number of spaces per indentation level
- // for this and all of its nested objects. Each line is indented by
- // the absolute value of 'level * spacesPerLevel'. If 'level' is
- // negative, suppress indentation of the first line. If
- // 'spacesPerLevel' is negative, suppress line breaks and format the
- // entire output on one line. If 'stream' is initially invalid, this
- // operation has no effect. Note that a trailing newline is provided
- // in multiline mode only.
+ bsl::ostream& print(bsl::ostream& stream,
+ int level = 0,
+ int spacesPerLevel = 4) const;
+ // Format this object to the specified output 'stream' at the
+ // optionally specified indentation 'level' and return a reference to
+ // the modifiable 'stream'. If 'level' is specified, optionally
+ // specify 'spacesPerLevel', the number of spaces per indentation level
+ // for this and all of its nested objects. Each line is indented by
+ // the absolute value of 'level * spacesPerLevel'. If 'level' is
+ // negative, suppress indentation of the first line. If
+ // 'spacesPerLevel' is negative, suppress line breaks and format the
+ // entire output on one line. If 'stream' is initially invalid, this
+ // operation has no effect. Note that a trailing newline is provided
+ // in multiline mode only.
template
int accessAttributes(t_ACCESSOR& accessor) const;
- // Invoke the specified 'accessor' sequentially on each
- // (non-modifiable) attribute of this object, supplying 'accessor'
- // with the corresponding attribute information structure until such
- // invocation returns a non-zero value. Return the value from the
- // last invocation of 'accessor' (i.e., the invocation that terminated
- // the sequence).
+ // Invoke the specified 'accessor' sequentially on each
+ // (non-modifiable) attribute of this object, supplying 'accessor'
+ // with the corresponding attribute information structure until such
+ // invocation returns a non-zero value. Return the value from the
+ // last invocation of 'accessor' (i.e., the invocation that terminated
+ // the sequence).
template
int accessAttribute(t_ACCESSOR& accessor, int id) const;
- // Invoke the specified 'accessor' on the (non-modifiable) attribute
- // of this object indicated by the specified 'id', supplying 'accessor'
- // with the corresponding attribute information structure. Return the
- // value returned from the invocation of 'accessor' if 'id' identifies
- // an attribute of this class, and -1 otherwise.
+ // Invoke the specified 'accessor' on the (non-modifiable) attribute
+ // of this object indicated by the specified 'id', supplying 'accessor'
+ // with the corresponding attribute information structure. Return the
+ // value returned from the invocation of 'accessor' if 'id' identifies
+ // an attribute of this class, and -1 otherwise.
template
- int accessAttribute(t_ACCESSOR& accessor,
- const char* name,
+ int accessAttribute(t_ACCESSOR& accessor,
+ const char *name,
int nameLength) const;
- // Invoke the specified 'accessor' on the (non-modifiable) attribute
- // of this object indicated by the specified 'name' of the specified
- // 'nameLength', supplying 'accessor' with the corresponding attribute
- // information structure. Return the value returned from the
- // invocation of 'accessor' if 'name' identifies an attribute of this
- // class, and -1 otherwise.
+ // Invoke the specified 'accessor' on the (non-modifiable) attribute
+ // of this object indicated by the specified 'name' of the specified
+ // 'nameLength', supplying 'accessor' with the corresponding attribute
+ // information structure. Return the value returned from the
+ // invocation of 'accessor' if 'name' identifies an attribute of this
+ // class, and -1 otherwise.
bsls::Types::Int64 maxUnconfirmedMessages() const;
- // Return the value of the "MaxUnconfirmedMessages" attribute of this
- // object.
+ // Return the value of the "MaxUnconfirmedMessages" attribute of this
+ // object.
bsls::Types::Int64 maxUnconfirmedBytes() const;
- // Return the value of the "MaxUnconfirmedBytes" attribute of this
- // object.
+ // Return the value of the "MaxUnconfirmedBytes" attribute of this
+ // object.
int consumerPriority() const;
- // Return the value of the "ConsumerPriority" attribute of this object.
+ // Return the value of the "ConsumerPriority" attribute of this object.
int consumerPriorityCount() const;
- // Return the value of the "ConsumerPriorityCount" attribute of this
- // object.
+ // Return the value of the "ConsumerPriorityCount" attribute of this
+ // object.
// HIDDEN FRIENDS
friend bool operator==(const ConsumerInfo& lhs, const ConsumerInfo& rhs)
- // Return 'true' if the specified 'lhs' and 'rhs' attribute objects
- // have the same value, and 'false' otherwise. Two attribute objects
- // have the same value if each respective attribute has the same value.
+ // Return 'true' if the specified 'lhs' and 'rhs' attribute objects
+ // have the same value, and 'false' otherwise. Two attribute objects
+ // have the same value if each respective attribute has the same value.
{
return lhs.isEqualTo(rhs);
}
friend bool operator!=(const ConsumerInfo& lhs, const ConsumerInfo& rhs)
- // Returns '!(lhs == rhs)'
+ // Returns '!(lhs == rhs)'
{
return !(lhs == rhs);
}
friend bsl::ostream& operator<<(bsl::ostream& stream,
const ConsumerInfo& rhs)
- // Format the specified 'rhs' to the specified output 'stream' and
- // return a reference to the modifiable 'stream'.
+ // Format the specified 'rhs' to the specified output 'stream' and
+ // return a reference to the modifiable 'stream'.
{
return rhs.print(stream, 0, -1);
}
@@ -2258,10 +2057,10 @@ class ConsumerInfo {
template
friend void hashAppend(t_HASH_ALGORITHM& hashAlg,
const ConsumerInfo& object)
- // Pass the specified 'object' to the specified 'hashAlg'. This
- // function integrates with the 'bslh' modular hashing system and
- // effectively provides a 'bsl::hash' specialization for
- // 'ConsumerInfo'.
+ // Pass the specified 'object' to the specified 'hashAlg'. This
+ // function integrates with the 'bslh' modular hashing system and
+ // effectively provides a 'bsl::hash' specialization for
+ // 'ConsumerInfo'.
{
object.hashAppendImpl(hashAlg);
}
@@ -2275,16 +2074,23 @@ BDLAT_DECL_SEQUENCE_WITH_BITWISEMOVEABLE_TRAITS(mqbcmd::ConsumerInfo)
namespace mqbcmd {
-// ====================
-// class ConsumerStatus
-// ====================
+ // ====================
+ // class ConsumerStatus
+ // ====================
struct ConsumerStatus {
+
public:
// TYPES
- enum Value { ALIVE = 0, REGISTERED = 1, UNAUTHORIZED = 2 };
+ enum Value {
+ ALIVE = 0
+ , REGISTERED = 1
+ , UNAUTHORIZED = 2
+ };
- enum { NUM_ENUMERATORS = 3 };
+ enum {
+ NUM_ENUMERATORS = 3
+ };
// CONSTANTS
static const char CLASS_NAME[];
@@ -2292,37 +2098,40 @@ struct ConsumerStatus {
static const bdlat_EnumeratorInfo ENUMERATOR_INFO_ARRAY[];
// CLASS METHODS
- static const char* toString(Value value);
- // Return the string representation exactly matching the enumerator
- // name corresponding to the specified enumeration 'value'.
-
- static int fromString(Value* result, const char* string, int stringLength);
- // Load into the specified 'result' the enumerator matching the
- // specified 'string' of the specified 'stringLength'. Return 0 on
- // success, and a non-zero value with no effect on 'result' otherwise
- // (i.e., 'string' does not match any enumerator).
-
- static int fromString(Value* result, const bsl::string& string);
- // Load into the specified 'result' the enumerator matching the
- // specified 'string'. Return 0 on success, and a non-zero value with
- // no effect on 'result' otherwise (i.e., 'string' does not match any
- // enumerator).
-
- static int fromInt(Value* result, int number);
- // Load into the specified 'result' the enumerator matching the
- // specified 'number'. Return 0 on success, and a non-zero value with
- // no effect on 'result' otherwise (i.e., 'number' does not match any
- // enumerator).
+ static const char *toString(Value value);
+ // Return the string representation exactly matching the enumerator
+ // name corresponding to the specified enumeration 'value'.
+
+ static int fromString(Value *result,
+ const char *string,
+ int stringLength);
+ // Load into the specified 'result' the enumerator matching the
+ // specified 'string' of the specified 'stringLength'. Return 0 on
+ // success, and a non-zero value with no effect on 'result' otherwise
+ // (i.e., 'string' does not match any enumerator).
+
+ static int fromString(Value *result,
+ const bsl::string& string);
+ // Load into the specified 'result' the enumerator matching the
+ // specified 'string'. Return 0 on success, and a non-zero value with
+ // no effect on 'result' otherwise (i.e., 'string' does not match any
+ // enumerator).
+
+ static int fromInt(Value *result, int number);
+ // Load into the specified 'result' the enumerator matching the
+ // specified 'number'. Return 0 on success, and a non-zero value with
+ // no effect on 'result' otherwise (i.e., 'number' does not match any
+ // enumerator).
static bsl::ostream& print(bsl::ostream& stream, Value value);
- // Write to the specified 'stream' the string representation of
- // the specified enumeration 'value'. Return a reference to
- // the modifiable 'stream'.
+ // Write to the specified 'stream' the string representation of
+ // the specified enumeration 'value'. Return a reference to
+ // the modifiable 'stream'.
// HIDDEN FRIENDS
friend bsl::ostream& operator<<(bsl::ostream& stream, Value rhs)
- // Format the specified 'rhs' to the specified output 'stream' and
- // return a reference to the modifiable 'stream'.
+ // Format the specified 'rhs' to the specified output 'stream' and
+ // return a reference to the modifiable 'stream'.
{
return ConsumerStatus::print(stream, rhs);
}
@@ -2334,23 +2143,31 @@ struct ConsumerStatus {
BDLAT_DECL_ENUMERATION_TRAITS(mqbcmd::ConsumerStatus)
+
namespace mqbcmd {
-// =============
-// class Context
-// =============
+ // =============
+ // class Context
+ // =============
class Context {
+
// INSTANCE DATA
- bsl::string d_queueHandleParametersJson;
+ bsl::string d_queueHandleParametersJson;
public:
// TYPES
- enum { ATTRIBUTE_ID_QUEUE_HANDLE_PARAMETERS_JSON = 0 };
+ enum {
+ ATTRIBUTE_ID_QUEUE_HANDLE_PARAMETERS_JSON = 0
+ };
- enum { NUM_ATTRIBUTES = 1 };
+ enum {
+ NUM_ATTRIBUTES = 1
+ };
- enum { ATTRIBUTE_INDEX_QUEUE_HANDLE_PARAMETERS_JSON = 0 };
+ enum {
+ ATTRIBUTE_INDEX_QUEUE_HANDLE_PARAMETERS_JSON = 0
+ };
// CONSTANTS
static const char CLASS_NAME[];
@@ -2359,172 +2176,175 @@ class Context {
public:
// CLASS METHODS
- static const bdlat_AttributeInfo* lookupAttributeInfo(int id);
- // Return attribute information for the attribute indicated by the
- // specified 'id' if the attribute exists, and 0 otherwise.
+ static const bdlat_AttributeInfo *lookupAttributeInfo(int id);
+ // Return attribute information for the attribute indicated by the
+ // specified 'id' if the attribute exists, and 0 otherwise.
- static const bdlat_AttributeInfo* lookupAttributeInfo(const char* name,
- int nameLength);
- // Return attribute information for the attribute indicated by the
- // specified 'name' of the specified 'nameLength' if the attribute
- // exists, and 0 otherwise.
+ static const bdlat_AttributeInfo *lookupAttributeInfo(
+ const char *name,
+ int nameLength);
+ // Return attribute information for the attribute indicated by the
+ // specified 'name' of the specified 'nameLength' if the attribute
+ // exists, and 0 otherwise.
// CREATORS
- explicit Context(bslma::Allocator* basicAllocator = 0);
- // Create an object of type 'Context' having the default value. Use
- // the optionally specified 'basicAllocator' to supply memory. If
- // 'basicAllocator' is 0, the currently installed default allocator is
- // used.
-
- Context(const Context& original, bslma::Allocator* basicAllocator = 0);
- // Create an object of type 'Context' having the value of the specified
- // 'original' object. Use the optionally specified 'basicAllocator' to
- // supply memory. If 'basicAllocator' is 0, the currently installed
- // default allocator is used.
-
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ explicit Context(bslma::Allocator *basicAllocator = 0);
+ // Create an object of type 'Context' having the default value. Use
+ // the optionally specified 'basicAllocator' to supply memory. If
+ // 'basicAllocator' is 0, the currently installed default allocator is
+ // used.
+
+ Context(const Context& original,
+ bslma::Allocator *basicAllocator = 0);
+ // Create an object of type 'Context' having the value of the specified
+ // 'original' object. Use the optionally specified 'basicAllocator' to
+ // supply memory. If 'basicAllocator' is 0, the currently installed
+ // default allocator is used.
+
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Context(Context&& original) noexcept;
- // Create an object of type 'Context' having the value of the specified
- // 'original' object. After performing this action, the 'original'
- // object will be left in a valid, but unspecified state.
+ // Create an object of type 'Context' having the value of the specified
+ // 'original' object. After performing this action, the 'original'
+ // object will be left in a valid, but unspecified state.
- Context(Context&& original, bslma::Allocator* basicAllocator);
- // Create an object of type 'Context' having the value of the specified
- // 'original' object. After performing this action, the 'original'
- // object will be left in a valid, but unspecified state. Use the
- // optionally specified 'basicAllocator' to supply memory. If
- // 'basicAllocator' is 0, the currently installed default allocator is
- // used.
+ Context(Context&& original,
+ bslma::Allocator *basicAllocator);
+ // Create an object of type 'Context' having the value of the specified
+ // 'original' object. After performing this action, the 'original'
+ // object will be left in a valid, but unspecified state. Use the
+ // optionally specified 'basicAllocator' to supply memory. If
+ // 'basicAllocator' is 0, the currently installed default allocator is
+ // used.
#endif
~Context();
- // Destroy this object.
+ // Destroy this object.
// MANIPULATORS
Context& operator=(const Context& rhs);
- // Assign to this object the value of the specified 'rhs' object.
+ // Assign to this object the value of the specified 'rhs' object.
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Context& operator=(Context&& rhs);
- // Assign to this object the value of the specified 'rhs' object.
- // After performing this action, the 'rhs' object will be left in a
- // valid, but unspecified state.
+ // Assign to this object the value of the specified 'rhs' object.
+ // After performing this action, the 'rhs' object will be left in a
+ // valid, but unspecified state.
#endif
void reset();
- // Reset this object to the default value (i.e., its value upon
- // default construction).
+ // Reset this object to the default value (i.e., its value upon
+ // default construction).
template
int manipulateAttributes(t_MANIPULATOR& manipulator);
- // Invoke the specified 'manipulator' sequentially on the address of
- // each (modifiable) attribute of this object, supplying 'manipulator'
- // with the corresponding attribute information structure until such
- // invocation returns a non-zero value. Return the value from the
- // last invocation of 'manipulator' (i.e., the invocation that
- // terminated the sequence).
+ // Invoke the specified 'manipulator' sequentially on the address of
+ // each (modifiable) attribute of this object, supplying 'manipulator'
+ // with the corresponding attribute information structure until such
+ // invocation returns a non-zero value. Return the value from the
+ // last invocation of 'manipulator' (i.e., the invocation that
+ // terminated the sequence).
template
int manipulateAttribute(t_MANIPULATOR& manipulator, int id);
- // Invoke the specified 'manipulator' on the address of
- // the (modifiable) attribute indicated by the specified 'id',
- // supplying 'manipulator' with the corresponding attribute
- // information structure. Return the value returned from the
- // invocation of 'manipulator' if 'id' identifies an attribute of this
- // class, and -1 otherwise.
-
- template
- int manipulateAttribute(t_MANIPULATOR& manipulator,
- const char* name,
- int nameLength);
- // Invoke the specified 'manipulator' on the address of
- // the (modifiable) attribute indicated by the specified 'name' of the
- // specified 'nameLength', supplying 'manipulator' with the
- // corresponding attribute information structure. Return the value
- // returned from the invocation of 'manipulator' if 'name' identifies
- // an attribute of this class, and -1 otherwise.
+ // Invoke the specified 'manipulator' on the address of
+ // the (modifiable) attribute indicated by the specified 'id',
+ // supplying 'manipulator' with the corresponding attribute
+ // information structure. Return the value returned from the
+ // invocation of 'manipulator' if 'id' identifies an attribute of this
+ // class, and -1 otherwise.
+
+ template
+ int manipulateAttribute(t_MANIPULATOR& manipulator,
+ const char *name,
+ int nameLength);
+ // Invoke the specified 'manipulator' on the address of
+ // the (modifiable) attribute indicated by the specified 'name' of the
+ // specified 'nameLength', supplying 'manipulator' with the
+ // corresponding attribute information structure. Return the value
+ // returned from the invocation of 'manipulator' if 'name' identifies
+ // an attribute of this class, and -1 otherwise.
bsl::string& queueHandleParametersJson();
- // Return a reference to the modifiable "QueueHandleParametersJson"
- // attribute of this object.
+ // Return a reference to the modifiable "QueueHandleParametersJson"
+ // attribute of this object.
// ACCESSORS
- bsl::ostream&
- print(bsl::ostream& stream, int level = 0, int spacesPerLevel = 4) const;
- // Format this object to the specified output 'stream' at the
- // optionally specified indentation 'level' and return a reference to
- // the modifiable 'stream'. If 'level' is specified, optionally
- // specify 'spacesPerLevel', the number of spaces per indentation level
- // for this and all of its nested objects. Each line is indented by
- // the absolute value of 'level * spacesPerLevel'. If 'level' is
- // negative, suppress indentation of the first line. If
- // 'spacesPerLevel' is negative, suppress line breaks and format the
- // entire output on one line. If 'stream' is initially invalid, this
- // operation has no effect. Note that a trailing newline is provided
- // in multiline mode only.
+ bsl::ostream& print(bsl::ostream& stream,
+ int level = 0,
+ int spacesPerLevel = 4) const;
+ // Format this object to the specified output 'stream' at the
+ // optionally specified indentation 'level' and return a reference to
+ // the modifiable 'stream'. If 'level' is specified, optionally
+ // specify 'spacesPerLevel', the number of spaces per indentation level
+ // for this and all of its nested objects. Each line is indented by
+ // the absolute value of 'level * spacesPerLevel'. If 'level' is
+ // negative, suppress indentation of the first line. If
+ // 'spacesPerLevel' is negative, suppress line breaks and format the
+ // entire output on one line. If 'stream' is initially invalid, this
+ // operation has no effect. Note that a trailing newline is provided
+ // in multiline mode only.
template
int accessAttributes(t_ACCESSOR& accessor) const;
- // Invoke the specified 'accessor' sequentially on each
- // (non-modifiable) attribute of this object, supplying 'accessor'
- // with the corresponding attribute information structure until such
- // invocation returns a non-zero value. Return the value from the
- // last invocation of 'accessor' (i.e., the invocation that terminated
- // the sequence).
+ // Invoke the specified 'accessor' sequentially on each
+ // (non-modifiable) attribute of this object, supplying 'accessor'
+ // with the corresponding attribute information structure until such
+ // invocation returns a non-zero value. Return the value from the
+ // last invocation of 'accessor' (i.e., the invocation that terminated
+ // the sequence).
template
int accessAttribute(t_ACCESSOR& accessor, int id) const;
- // Invoke the specified 'accessor' on the (non-modifiable) attribute
- // of this object indicated by the specified 'id', supplying 'accessor'
- // with the corresponding attribute information structure. Return the
- // value returned from the invocation of 'accessor' if 'id' identifies
- // an attribute of this class, and -1 otherwise.
+ // Invoke the specified 'accessor' on the (non-modifiable) attribute
+ // of this object indicated by the specified 'id', supplying 'accessor'
+ // with the corresponding attribute information structure. Return the
+ // value returned from the invocation of 'accessor' if 'id' identifies
+ // an attribute of this class, and -1 otherwise.
template
- int accessAttribute(t_ACCESSOR& accessor,
- const char* name,
+ int accessAttribute(t_ACCESSOR& accessor,
+ const char *name,
int nameLength) const;
- // Invoke the specified 'accessor' on the (non-modifiable) attribute
- // of this object indicated by the specified 'name' of the specified
- // 'nameLength', supplying 'accessor' with the corresponding attribute
- // information structure. Return the value returned from the
- // invocation of 'accessor' if 'name' identifies an attribute of this
- // class, and -1 otherwise.
+ // Invoke the specified 'accessor' on the (non-modifiable) attribute
+ // of this object indicated by the specified 'name' of the specified
+ // 'nameLength', supplying 'accessor' with the corresponding attribute
+ // information structure. Return the value returned from the
+ // invocation of 'accessor' if 'name' identifies an attribute of this
+ // class, and -1 otherwise.
const bsl::string& queueHandleParametersJson() const;
- // Return a reference offering non-modifiable access to the
- // "QueueHandleParametersJson" attribute of this object.
+ // Return a reference offering non-modifiable access to the
+ // "QueueHandleParametersJson" attribute of this object.
// HIDDEN FRIENDS
friend bool operator==(const Context& lhs, const Context& rhs)
- // Return 'true' if the specified 'lhs' and 'rhs' attribute objects
- // have the same value, and 'false' otherwise. Two attribute objects
- // have the same value if each respective attribute has the same value.
+ // Return 'true' if the specified 'lhs' and 'rhs' attribute objects
+ // have the same value, and 'false' otherwise. Two attribute objects
+ // have the same value if each respective attribute has the same value.
{
- return lhs.queueHandleParametersJson() ==
- rhs.queueHandleParametersJson();
+ return lhs.queueHandleParametersJson() == rhs.queueHandleParametersJson();
}
friend bool operator!=(const Context& lhs, const Context& rhs)
- // Returns '!(lhs == rhs)'
+ // Returns '!(lhs == rhs)'
{
return !(lhs == rhs);
}
friend bsl::ostream& operator<<(bsl::ostream& stream, const Context& rhs)
- // Format the specified 'rhs' to the specified output 'stream' and
- // return a reference to the modifiable 'stream'.
+ // Format the specified 'rhs' to the specified output 'stream' and
+ // return a reference to the modifiable 'stream'.
{
return rhs.print(stream, 0, -1);
}
template
friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const Context& object)
- // Pass the specified 'object' to the specified 'hashAlg'. This
- // function integrates with the 'bslh' modular hashing system and
- // effectively provides a 'bsl::hash' specialization for 'Context'.
+ // Pass the specified 'object' to the specified 'hashAlg'. This
+ // function integrates with the 'bslh' modular hashing system and
+ // effectively provides a 'bsl::hash' specialization for 'Context'.
{
using bslh::hashAppend;
hashAppend(hashAlg, object.queueHandleParametersJson());
@@ -2539,18 +2359,19 @@ BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::Context)
namespace mqbcmd {
-// =======================
-// class DomainReconfigure
-// =======================
+ // =======================
+ // class DomainReconfigure
+ // =======================
class DomainReconfigure {
+
// INSTANCE DATA
union {
- bsls::ObjectBuffer d_domain;
+ bsls::ObjectBuffer< bsl::string > d_domain;
};
- int d_selectionId;
- bslma::Allocator* d_allocator_p;
+ int d_selectionId;
+ bslma::Allocator *d_allocator_p;
// PRIVATE ACCESSORS
template
@@ -2561,11 +2382,18 @@ class DomainReconfigure {
public:
// TYPES
- enum { SELECTION_ID_UNDEFINED = -1, SELECTION_ID_DOMAIN = 0 };
+ enum {
+ SELECTION_ID_UNDEFINED = -1
+ , SELECTION_ID_DOMAIN = 0
+ };
- enum { NUM_SELECTIONS = 1 };
+ enum {
+ NUM_SELECTIONS = 1
+ };
- enum { SELECTION_INDEX_DOMAIN = 0 };
+ enum {
+ SELECTION_INDEX_DOMAIN = 0
+ };
// CONSTANTS
static const char CLASS_NAME[];
@@ -2573,166 +2401,168 @@ class DomainReconfigure {
static const bdlat_SelectionInfo SELECTION_INFO_ARRAY[];
// CLASS METHODS
- static const bdlat_SelectionInfo* lookupSelectionInfo(int id);
- // Return selection information for the selection indicated by the
- // specified 'id' if the selection exists, and 0 otherwise.
+ static const bdlat_SelectionInfo *lookupSelectionInfo(int id);
+ // Return selection information for the selection indicated by the
+ // specified 'id' if the selection exists, and 0 otherwise.
- static const bdlat_SelectionInfo* lookupSelectionInfo(const char* name,
- int nameLength);
- // Return selection information for the selection indicated by the
- // specified 'name' of the specified 'nameLength' if the selection
- // exists, and 0 otherwise.
+ static const bdlat_SelectionInfo *lookupSelectionInfo(
+ const char *name,
+ int nameLength);
+ // Return selection information for the selection indicated by the
+ // specified 'name' of the specified 'nameLength' if the selection
+ // exists, and 0 otherwise.
// CREATORS
- explicit DomainReconfigure(bslma::Allocator* basicAllocator = 0);
- // Create an object of type 'DomainReconfigure' having the default
- // value. Use the optionally specified 'basicAllocator' to supply
- // memory. If 'basicAllocator' is 0, the currently installed default
- // allocator is used.
+ explicit DomainReconfigure(bslma::Allocator *basicAllocator = 0);
+ // Create an object of type 'DomainReconfigure' having the default
+ // value. Use the optionally specified 'basicAllocator' to supply
+ // memory. If 'basicAllocator' is 0, the currently installed default
+ // allocator is used.
DomainReconfigure(const DomainReconfigure& original,
- bslma::Allocator* basicAllocator = 0);
- // Create an object of type 'DomainReconfigure' having the value of the
- // specified 'original' object. Use the optionally specified
- // 'basicAllocator' to supply memory. If 'basicAllocator' is 0, the
- // currently installed default allocator is used.
-
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ bslma::Allocator *basicAllocator = 0);
+ // Create an object of type 'DomainReconfigure' having the value of the
+ // specified 'original' object. Use the optionally specified
+ // 'basicAllocator' to supply memory. If 'basicAllocator' is 0, the
+ // currently installed default allocator is used.
+
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
DomainReconfigure(DomainReconfigure&& original) noexcept;
- // Create an object of type 'DomainReconfigure' having the value of the
- // specified 'original' object. After performing this action, the
- // 'original' object will be left in a valid, but unspecified state.
+ // Create an object of type 'DomainReconfigure' having the value of the
+ // specified 'original' object. After performing this action, the
+ // 'original' object will be left in a valid, but unspecified state.
DomainReconfigure(DomainReconfigure&& original,
- bslma::Allocator* basicAllocator);
- // Create an object of type 'DomainReconfigure' having the value of the
- // specified 'original' object. After performing this action, the
- // 'original' object will be left in a valid, but unspecified state.
- // Use the optionally specified 'basicAllocator' to supply memory. If
- // 'basicAllocator' is 0, the currently installed default allocator is
- // used.
+ bslma::Allocator *basicAllocator);
+ // Create an object of type 'DomainReconfigure' having the value of the
+ // specified 'original' object. After performing this action, the
+ // 'original' object will be left in a valid, but unspecified state.
+ // Use the optionally specified 'basicAllocator' to supply memory. If
+ // 'basicAllocator' is 0, the currently installed default allocator is
+ // used.
#endif
~DomainReconfigure();
- // Destroy this object.
+ // Destroy this object.
// MANIPULATORS
DomainReconfigure& operator=(const DomainReconfigure& rhs);
- // Assign to this object the value of the specified 'rhs' object.
+ // Assign to this object the value of the specified 'rhs' object.
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
DomainReconfigure& operator=(DomainReconfigure&& rhs);
- // Assign to this object the value of the specified 'rhs' object.
- // After performing this action, the 'rhs' object will be left in a
- // valid, but unspecified state.
+ // Assign to this object the value of the specified 'rhs' object.
+ // After performing this action, the 'rhs' object will be left in a
+ // valid, but unspecified state.
#endif
void reset();
- // Reset this object to the default value (i.e., its value upon default
- // construction).
+ // Reset this object to the default value (i.e., its value upon default
+ // construction).
int makeSelection(int selectionId);
- // Set the value of this object to be the default for the selection
- // indicated by the specified 'selectionId'. Return 0 on success, and
- // non-zero value otherwise (i.e., the selection is not found).
+ // Set the value of this object to be the default for the selection
+ // indicated by the specified 'selectionId'. Return 0 on success, and
+ // non-zero value otherwise (i.e., the selection is not found).
- int makeSelection(const char* name, int nameLength);
- // Set the value of this object to be the default for the selection
- // indicated by the specified 'name' of the specified 'nameLength'.
- // Return 0 on success, and non-zero value otherwise (i.e., the
- // selection is not found).
+ int makeSelection(const char *name, int nameLength);
+ // Set the value of this object to be the default for the selection
+ // indicated by the specified 'name' of the specified 'nameLength'.
+ // Return 0 on success, and non-zero value otherwise (i.e., the
+ // selection is not found).
bsl::string& makeDomain();
bsl::string& makeDomain(const bsl::string& value);
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
bsl::string& makeDomain(bsl::string&& value);
#endif
- // Set the value of this object to be a "Domain" value. Optionally
- // specify the 'value' of the "Domain". If 'value' is not specified,
- // the default "Domain" value is used.
+ // Set the value of this object to be a "Domain" value. Optionally
+ // specify the 'value' of the "Domain". If 'value' is not specified,
+ // the default "Domain" value is used.
template
int manipulateSelection(t_MANIPULATOR& manipulator);
- // Invoke the specified 'manipulator' on the address of the modifiable
- // selection, supplying 'manipulator' with the corresponding selection
- // information structure. Return the value returned from the
- // invocation of 'manipulator' if this object has a defined selection,
- // and -1 otherwise.
+ // Invoke the specified 'manipulator' on the address of the modifiable
+ // selection, supplying 'manipulator' with the corresponding selection
+ // information structure. Return the value returned from the
+ // invocation of 'manipulator' if this object has a defined selection,
+ // and -1 otherwise.
bsl::string& domain();
- // Return a reference to the modifiable "Domain" selection of this
- // object if "Domain" is the current selection. The behavior is
- // undefined unless "Domain" is the selection of this object.
+ // Return a reference to the modifiable "Domain" selection of this
+ // object if "Domain" is the current selection. The behavior is
+ // undefined unless "Domain" is the selection of this object.
// ACCESSORS
- bsl::ostream&
- print(bsl::ostream& stream, int level = 0, int spacesPerLevel = 4) const;
- // Format this object to the specified output 'stream' at the
- // optionally specified indentation 'level' and return a reference to
- // the modifiable 'stream'. If 'level' is specified, optionally
- // specify 'spacesPerLevel', the number of spaces per indentation level
- // for this and all of its nested objects. Each line is indented by
- // the absolute value of 'level * spacesPerLevel'. If 'level' is
- // negative, suppress indentation of the first line. If
- // 'spacesPerLevel' is negative, suppress line breaks and format the
- // entire output on one line. If 'stream' is initially invalid, this
- // operation has no effect. Note that a trailing newline is provided
- // in multiline mode only.
+ bsl::ostream& print(bsl::ostream& stream,
+ int level = 0,
+ int spacesPerLevel = 4) const;
+ // Format this object to the specified output 'stream' at the
+ // optionally specified indentation 'level' and return a reference to
+ // the modifiable 'stream'. If 'level' is specified, optionally
+ // specify 'spacesPerLevel', the number of spaces per indentation level
+ // for this and all of its nested objects. Each line is indented by
+ // the absolute value of 'level * spacesPerLevel'. If 'level' is
+ // negative, suppress indentation of the first line. If
+ // 'spacesPerLevel' is negative, suppress line breaks and format the
+ // entire output on one line. If 'stream' is initially invalid, this
+ // operation has no effect. Note that a trailing newline is provided
+ // in multiline mode only.
int selectionId() const;
- // Return the id of the current selection if the selection is defined,
- // and -1 otherwise.
+ // Return the id of the current selection if the selection is defined,
+ // and -1 otherwise.
template
int accessSelection(t_ACCESSOR& accessor) const;
- // Invoke the specified 'accessor' on the non-modifiable selection,
- // supplying 'accessor' with the corresponding selection information
- // structure. Return the value returned from the invocation of
- // 'accessor' if this object has a defined selection, and -1 otherwise.
+ // Invoke the specified 'accessor' on the non-modifiable selection,
+ // supplying 'accessor' with the corresponding selection information
+ // structure. Return the value returned from the invocation of
+ // 'accessor' if this object has a defined selection, and -1 otherwise.
const bsl::string& domain() const;
- // Return a reference to the non-modifiable "Domain" selection of this
- // object if "Domain" is the current selection. The behavior is
- // undefined unless "Domain" is the selection of this object.
+ // Return a reference to the non-modifiable "Domain" selection of this
+ // object if "Domain" is the current selection. The behavior is
+ // undefined unless "Domain" is the selection of this object.
bool isDomainValue() const;
- // Return 'true' if the value of this object is a "Domain" value, and
- // return 'false' otherwise.
+ // Return 'true' if the value of this object is a "Domain" value, and
+ // return 'false' otherwise.
bool isUndefinedValue() const;
- // Return 'true' if the value of this object is undefined, and 'false'
- // otherwise.
+ // Return 'true' if the value of this object is undefined, and 'false'
+ // otherwise.
- const char* selectionName() const;
- // Return the symbolic name of the current selection of this object.
+ const char *selectionName() const;
+ // Return the symbolic name of the current selection of this object.
// HIDDEN FRIENDS
friend bool operator==(const DomainReconfigure& lhs,
const DomainReconfigure& rhs)
- // Return 'true' if the specified 'lhs' and 'rhs' objects have the same
- // value, and 'false' otherwise. Two 'DomainReconfigure' objects have
- // the same value if either the selections in both objects have the
- // same ids and the same values, or both selections are undefined.
+ // Return 'true' if the specified 'lhs' and 'rhs' objects have the same
+ // value, and 'false' otherwise. Two 'DomainReconfigure' objects have
+ // the same value if either the selections in both objects have the
+ // same ids and the same values, or both selections are undefined.
{
return lhs.isEqualTo(rhs);
}
friend bool operator!=(const DomainReconfigure& lhs,
const DomainReconfigure& rhs)
- // Return 'true' if the specified 'lhs' and 'rhs' objects do not have
- // the same values, as determined by 'operator==', and 'false'
- // otherwise.
+ // Return 'true' if the specified 'lhs' and 'rhs' objects do not have
+ // the same values, as determined by 'operator==', and 'false'
+ // otherwise.
{
return !(lhs == rhs);
}
friend bsl::ostream& operator<<(bsl::ostream& stream,
const DomainReconfigure& rhs)
- // Format the specified 'rhs' to the specified output 'stream' and
- // return a reference to the modifiable 'stream'.
+ // Format the specified 'rhs' to the specified output 'stream' and
+ // return a reference to the modifiable 'stream'.
{
return rhs.print(stream, 0, -1);
}
@@ -2740,10 +2570,10 @@ class DomainReconfigure {
template
friend void hashAppend(t_HASH_ALGORITHM& hashAlg,
const DomainReconfigure& object)
- // Pass the specified 'object' to the specified 'hashAlg'. This
- // function integrates with the 'bslh' modular hashing system and
- // effectively provides a 'bsl::hash' specialization for
- // 'DomainReconfigure'.
+ // Pass the specified 'object' to the specified 'hashAlg'. This
+ // function integrates with the 'bslh' modular hashing system and
+ // effectively provides a 'bsl::hash' specialization for
+ // 'DomainReconfigure'.
{
return object.hashAppendImpl(hashAlg);
}
@@ -2753,21 +2583,28 @@ class DomainReconfigure {
// TRAITS
-BDLAT_DECL_CHOICE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(
- mqbcmd::DomainReconfigure)
+BDLAT_DECL_CHOICE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::DomainReconfigure)
namespace mqbcmd {
-// ==================
-// class ElectorState
-// ==================
+ // ==================
+ // class ElectorState
+ // ==================
struct ElectorState {
+
public:
// TYPES
- enum Value { DORMANT = 0, FOLLOWER = 1, CANDIDATE = 2, LEADER = 3 };
+ enum Value {
+ DORMANT = 0
+ , FOLLOWER = 1
+ , CANDIDATE = 2
+ , LEADER = 3
+ };
- enum { NUM_ENUMERATORS = 4 };
+ enum {
+ NUM_ENUMERATORS = 4
+ };
// CONSTANTS
static const char CLASS_NAME[];
@@ -2775,37 +2612,40 @@ struct ElectorState {
static const bdlat_EnumeratorInfo ENUMERATOR_INFO_ARRAY[];
// CLASS METHODS
- static const char* toString(Value value);
- // Return the string representation exactly matching the enumerator
- // name corresponding to the specified enumeration 'value'.
-
- static int fromString(Value* result, const char* string, int stringLength);
- // Load into the specified 'result' the enumerator matching the
- // specified 'string' of the specified 'stringLength'. Return 0 on
- // success, and a non-zero value with no effect on 'result' otherwise
- // (i.e., 'string' does not match any enumerator).
-
- static int fromString(Value* result, const bsl::string& string);
- // Load into the specified 'result' the enumerator matching the
- // specified 'string'. Return 0 on success, and a non-zero value with
- // no effect on 'result' otherwise (i.e., 'string' does not match any
- // enumerator).
-
- static int fromInt(Value* result, int number);
- // Load into the specified 'result' the enumerator matching the
- // specified 'number'. Return 0 on success, and a non-zero value with
- // no effect on 'result' otherwise (i.e., 'number' does not match any
- // enumerator).
+ static const char *toString(Value value);
+ // Return the string representation exactly matching the enumerator
+ // name corresponding to the specified enumeration 'value'.
+
+ static int fromString(Value *result,
+ const char *string,
+ int stringLength);
+ // Load into the specified 'result' the enumerator matching the
+ // specified 'string' of the specified 'stringLength'. Return 0 on
+ // success, and a non-zero value with no effect on 'result' otherwise
+ // (i.e., 'string' does not match any enumerator).
+
+ static int fromString(Value *result,
+ const bsl::string& string);
+ // Load into the specified 'result' the enumerator matching the
+ // specified 'string'. Return 0 on success, and a non-zero value with
+ // no effect on 'result' otherwise (i.e., 'string' does not match any
+ // enumerator).
+
+ static int fromInt(Value *result, int number);
+ // Load into the specified 'result' the enumerator matching the
+ // specified 'number'. Return 0 on success, and a non-zero value with
+ // no effect on 'result' otherwise (i.e., 'number' does not match any
+ // enumerator).
static bsl::ostream& print(bsl::ostream& stream, Value value);
- // Write to the specified 'stream' the string representation of
- // the specified enumeration 'value'. Return a reference to
- // the modifiable 'stream'.
+ // Write to the specified 'stream' the string representation of
+ // the specified enumeration 'value'. Return a reference to
+ // the modifiable 'stream'.
// HIDDEN FRIENDS
friend bsl::ostream& operator<<(bsl::ostream& stream, Value rhs)
- // Format the specified 'rhs' to the specified output 'stream' and
- // return a reference to the modifiable 'stream'.
+ // Format the specified 'rhs' to the specified output 'stream' and
+ // return a reference to the modifiable 'stream'.
{
return ElectorState::print(stream, rhs);
}
@@ -2817,20 +2657,27 @@ struct ElectorState {
BDLAT_DECL_ENUMERATION_TRAITS(mqbcmd::ElectorState)
+
namespace mqbcmd {
-// ====================
-// class EncodingFormat
-// ====================
+ // ====================
+ // class EncodingFormat
+ // ====================
struct EncodingFormat {
// Enumeration of the various encoding format versions.
public:
// TYPES
- enum Value { TEXT = 0, JSON_COMPACT = 1, JSON_PRETTY = 2 };
+ enum Value {
+ TEXT = 0
+ , JSON_COMPACT = 1
+ , JSON_PRETTY = 2
+ };
- enum { NUM_ENUMERATORS = 3 };
+ enum {
+ NUM_ENUMERATORS = 3
+ };
// CONSTANTS
static const char CLASS_NAME[];
@@ -2838,37 +2685,40 @@ struct EncodingFormat {
static const bdlat_EnumeratorInfo ENUMERATOR_INFO_ARRAY[];
// CLASS METHODS
- static const char* toString(Value value);
- // Return the string representation exactly matching the enumerator
- // name corresponding to the specified enumeration 'value'.
-
- static int fromString(Value* result, const char* string, int stringLength);
- // Load into the specified 'result' the enumerator matching the
- // specified 'string' of the specified 'stringLength'. Return 0 on
- // success, and a non-zero value with no effect on 'result' otherwise
- // (i.e., 'string' does not match any enumerator).
-
- static int fromString(Value* result, const bsl::string& string);
- // Load into the specified 'result' the enumerator matching the
- // specified 'string'. Return 0 on success, and a non-zero value with
- // no effect on 'result' otherwise (i.e., 'string' does not match any
- // enumerator).
-
- static int fromInt(Value* result, int number);
- // Load into the specified 'result' the enumerator matching the
- // specified 'number'. Return 0 on success, and a non-zero value with
- // no effect on 'result' otherwise (i.e., 'number' does not match any
- // enumerator).
+ static const char *toString(Value value);
+ // Return the string representation exactly matching the enumerator
+ // name corresponding to the specified enumeration 'value'.
+
+ static int fromString(Value *result,
+ const char *string,
+ int stringLength);
+ // Load into the specified 'result' the enumerator matching the
+ // specified 'string' of the specified 'stringLength'. Return 0 on
+ // success, and a non-zero value with no effect on 'result' otherwise
+ // (i.e., 'string' does not match any enumerator).
+
+ static int fromString(Value *result,
+ const bsl::string& string);
+ // Load into the specified 'result' the enumerator matching the
+ // specified 'string'. Return 0 on success, and a non-zero value with
+ // no effect on 'result' otherwise (i.e., 'string' does not match any
+ // enumerator).
+
+ static int fromInt(Value *result, int number);
+ // Load into the specified 'result' the enumerator matching the
+ // specified 'number'. Return 0 on success, and a non-zero value with
+ // no effect on 'result' otherwise (i.e., 'number' does not match any
+ // enumerator).
static bsl::ostream& print(bsl::ostream& stream, Value value);
- // Write to the specified 'stream' the string representation of
- // the specified enumeration 'value'. Return a reference to
- // the modifiable 'stream'.
+ // Write to the specified 'stream' the string representation of
+ // the specified enumeration 'value'. Return a reference to
+ // the modifiable 'stream'.
// HIDDEN FRIENDS
friend bsl::ostream& operator<<(bsl::ostream& stream, Value rhs)
- // Format the specified 'rhs' to the specified output 'stream' and
- // return a reference to the modifiable 'stream'.
+ // Format the specified 'rhs' to the specified output 'stream' and
+ // return a reference to the modifiable 'stream'.
{
return EncodingFormat::print(stream, rhs);
}
@@ -2880,23 +2730,31 @@ struct EncodingFormat {
BDLAT_DECL_ENUMERATION_TRAITS(mqbcmd::EncodingFormat)
+
namespace mqbcmd {
-// ===========
-// class Error
-// ===========
+ // ===========
+ // class Error
+ // ===========
class Error {
+
// INSTANCE DATA
- bsl::string d_message;
+ bsl::string d_message;
public:
// TYPES
- enum { ATTRIBUTE_ID_MESSAGE = 0 };
+ enum {
+ ATTRIBUTE_ID_MESSAGE = 0
+ };
- enum { NUM_ATTRIBUTES = 1 };
+ enum {
+ NUM_ATTRIBUTES = 1
+ };
- enum { ATTRIBUTE_INDEX_MESSAGE = 0 };
+ enum {
+ ATTRIBUTE_INDEX_MESSAGE = 0
+ };
// CONSTANTS
static const char CLASS_NAME[];
@@ -2905,171 +2763,175 @@ class Error {
public:
// CLASS METHODS
- static const bdlat_AttributeInfo* lookupAttributeInfo(int id);
- // Return attribute information for the attribute indicated by the
- // specified 'id' if the attribute exists, and 0 otherwise.
+ static const bdlat_AttributeInfo *lookupAttributeInfo(int id);
+ // Return attribute information for the attribute indicated by the
+ // specified 'id' if the attribute exists, and 0 otherwise.
- static const bdlat_AttributeInfo* lookupAttributeInfo(const char* name,
- int nameLength);
- // Return attribute information for the attribute indicated by the
- // specified 'name' of the specified 'nameLength' if the attribute
- // exists, and 0 otherwise.
+ static const bdlat_AttributeInfo *lookupAttributeInfo(
+ const char *name,
+ int nameLength);
+ // Return attribute information for the attribute indicated by the
+ // specified 'name' of the specified 'nameLength' if the attribute
+ // exists, and 0 otherwise.
// CREATORS
- explicit Error(bslma::Allocator* basicAllocator = 0);
- // Create an object of type 'Error' having the default value. Use the
- // optionally specified 'basicAllocator' to supply memory. If
- // 'basicAllocator' is 0, the currently installed default allocator is
- // used.
-
- Error(const Error& original, bslma::Allocator* basicAllocator = 0);
- // Create an object of type 'Error' having the value of the specified
- // 'original' object. Use the optionally specified 'basicAllocator' to
- // supply memory. If 'basicAllocator' is 0, the currently installed
- // default allocator is used.
-
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ explicit Error(bslma::Allocator *basicAllocator = 0);
+ // Create an object of type 'Error' having the default value. Use the
+ // optionally specified 'basicAllocator' to supply memory. If
+ // 'basicAllocator' is 0, the currently installed default allocator is
+ // used.
+
+ Error(const Error& original,
+ bslma::Allocator *basicAllocator = 0);
+ // Create an object of type 'Error' having the value of the specified
+ // 'original' object. Use the optionally specified 'basicAllocator' to
+ // supply memory. If 'basicAllocator' is 0, the currently installed
+ // default allocator is used.
+
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Error(Error&& original) noexcept;
- // Create an object of type 'Error' having the value of the specified
- // 'original' object. After performing this action, the 'original'
- // object will be left in a valid, but unspecified state.
+ // Create an object of type 'Error' having the value of the specified
+ // 'original' object. After performing this action, the 'original'
+ // object will be left in a valid, but unspecified state.
- Error(Error&& original, bslma::Allocator* basicAllocator);
- // Create an object of type 'Error' having the value of the specified
- // 'original' object. After performing this action, the 'original'
- // object will be left in a valid, but unspecified state. Use the
- // optionally specified 'basicAllocator' to supply memory. If
- // 'basicAllocator' is 0, the currently installed default allocator is
- // used.
+ Error(Error&& original,
+ bslma::Allocator *basicAllocator);
+ // Create an object of type 'Error' having the value of the specified
+ // 'original' object. After performing this action, the 'original'
+ // object will be left in a valid, but unspecified state. Use the
+ // optionally specified 'basicAllocator' to supply memory. If
+ // 'basicAllocator' is 0, the currently installed default allocator is
+ // used.
#endif
~Error();
- // Destroy this object.
+ // Destroy this object.
// MANIPULATORS
Error& operator=(const Error& rhs);
- // Assign to this object the value of the specified 'rhs' object.
+ // Assign to this object the value of the specified 'rhs' object.
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Error& operator=(Error&& rhs);
- // Assign to this object the value of the specified 'rhs' object.
- // After performing this action, the 'rhs' object will be left in a
- // valid, but unspecified state.
+ // Assign to this object the value of the specified 'rhs' object.
+ // After performing this action, the 'rhs' object will be left in a
+ // valid, but unspecified state.
#endif
void reset();
- // Reset this object to the default value (i.e., its value upon
- // default construction).
+ // Reset this object to the default value (i.e., its value upon
+ // default construction).
template
int manipulateAttributes(t_MANIPULATOR& manipulator);
- // Invoke the specified 'manipulator' sequentially on the address of
- // each (modifiable) attribute of this object, supplying 'manipulator'
- // with the corresponding attribute information structure until such
- // invocation returns a non-zero value. Return the value from the
- // last invocation of 'manipulator' (i.e., the invocation that
- // terminated the sequence).
+ // Invoke the specified 'manipulator' sequentially on the address of
+ // each (modifiable) attribute of this object, supplying 'manipulator'
+ // with the corresponding attribute information structure until such
+ // invocation returns a non-zero value. Return the value from the
+ // last invocation of 'manipulator' (i.e., the invocation that
+ // terminated the sequence).
template
int manipulateAttribute(t_MANIPULATOR& manipulator, int id);
- // Invoke the specified 'manipulator' on the address of
- // the (modifiable) attribute indicated by the specified 'id',
- // supplying 'manipulator' with the corresponding attribute
- // information structure. Return the value returned from the
- // invocation of 'manipulator' if 'id' identifies an attribute of this
- // class, and -1 otherwise.
-
- template
- int manipulateAttribute(t_MANIPULATOR& manipulator,
- const char* name,
- int nameLength);
- // Invoke the specified 'manipulator' on the address of
- // the (modifiable) attribute indicated by the specified 'name' of the
- // specified 'nameLength', supplying 'manipulator' with the
- // corresponding attribute information structure. Return the value
- // returned from the invocation of 'manipulator' if 'name' identifies
- // an attribute of this class, and -1 otherwise.
+ // Invoke the specified 'manipulator' on the address of
+ // the (modifiable) attribute indicated by the specified 'id',
+ // supplying 'manipulator' with the corresponding attribute
+ // information structure. Return the value returned from the
+ // invocation of 'manipulator' if 'id' identifies an attribute of this
+ // class, and -1 otherwise.
+
+ template
+ int manipulateAttribute(t_MANIPULATOR& manipulator,
+ const char *name,
+ int nameLength);
+ // Invoke the specified 'manipulator' on the address of
+ // the (modifiable) attribute indicated by the specified 'name' of the
+ // specified 'nameLength', supplying 'manipulator' with the
+ // corresponding attribute information structure. Return the value
+ // returned from the invocation of 'manipulator' if 'name' identifies
+ // an attribute of this class, and -1 otherwise.
bsl::string& message();
- // Return a reference to the modifiable "Message" attribute of this
- // object.
+ // Return a reference to the modifiable "Message" attribute of this
+ // object.
// ACCESSORS
- bsl::ostream&
- print(bsl::ostream& stream, int level = 0, int spacesPerLevel = 4) const;
- // Format this object to the specified output 'stream' at the
- // optionally specified indentation 'level' and return a reference to
- // the modifiable 'stream'. If 'level' is specified, optionally
- // specify 'spacesPerLevel', the number of spaces per indentation level
- // for this and all of its nested objects. Each line is indented by
- // the absolute value of 'level * spacesPerLevel'. If 'level' is
- // negative, suppress indentation of the first line. If
- // 'spacesPerLevel' is negative, suppress line breaks and format the
- // entire output on one line. If 'stream' is initially invalid, this
- // operation has no effect. Note that a trailing newline is provided
- // in multiline mode only.
+ bsl::ostream& print(bsl::ostream& stream,
+ int level = 0,
+ int spacesPerLevel = 4) const;
+ // Format this object to the specified output 'stream' at the
+ // optionally specified indentation 'level' and return a reference to
+ // the modifiable 'stream'. If 'level' is specified, optionally
+ // specify 'spacesPerLevel', the number of spaces per indentation level
+ // for this and all of its nested objects. Each line is indented by
+ // the absolute value of 'level * spacesPerLevel'. If 'level' is
+ // negative, suppress indentation of the first line. If
+ // 'spacesPerLevel' is negative, suppress line breaks and format the
+ // entire output on one line. If 'stream' is initially invalid, this
+ // operation has no effect. Note that a trailing newline is provided
+ // in multiline mode only.
template
int accessAttributes(t_ACCESSOR& accessor) const;
- // Invoke the specified 'accessor' sequentially on each
- // (non-modifiable) attribute of this object, supplying 'accessor'
- // with the corresponding attribute information structure until such
- // invocation returns a non-zero value. Return the value from the
- // last invocation of 'accessor' (i.e., the invocation that terminated
- // the sequence).
+ // Invoke the specified 'accessor' sequentially on each
+ // (non-modifiable) attribute of this object, supplying 'accessor'
+ // with the corresponding attribute information structure until such
+ // invocation returns a non-zero value. Return the value from the
+ // last invocation of 'accessor' (i.e., the invocation that terminated
+ // the sequence).
template
int accessAttribute(t_ACCESSOR& accessor, int id) const;
- // Invoke the specified 'accessor' on the (non-modifiable) attribute
- // of this object indicated by the specified 'id', supplying 'accessor'
- // with the corresponding attribute information structure. Return the
- // value returned from the invocation of 'accessor' if 'id' identifies
- // an attribute of this class, and -1 otherwise.
+ // Invoke the specified 'accessor' on the (non-modifiable) attribute
+ // of this object indicated by the specified 'id', supplying 'accessor'
+ // with the corresponding attribute information structure. Return the
+ // value returned from the invocation of 'accessor' if 'id' identifies
+ // an attribute of this class, and -1 otherwise.
template
- int accessAttribute(t_ACCESSOR& accessor,
- const char* name,
+ int accessAttribute(t_ACCESSOR& accessor,
+ const char *name,
int nameLength) const;
- // Invoke the specified 'accessor' on the (non-modifiable) attribute
- // of this object indicated by the specified 'name' of the specified
- // 'nameLength', supplying 'accessor' with the corresponding attribute
- // information structure. Return the value returned from the
- // invocation of 'accessor' if 'name' identifies an attribute of this
- // class, and -1 otherwise.
+ // Invoke the specified 'accessor' on the (non-modifiable) attribute
+ // of this object indicated by the specified 'name' of the specified
+ // 'nameLength', supplying 'accessor' with the corresponding attribute
+ // information structure. Return the value returned from the
+ // invocation of 'accessor' if 'name' identifies an attribute of this
+ // class, and -1 otherwise.
const bsl::string& message() const;
- // Return a reference offering non-modifiable access to the "Message"
- // attribute of this object.
+ // Return a reference offering non-modifiable access to the "Message"
+ // attribute of this object.
// HIDDEN FRIENDS
friend bool operator==(const Error& lhs, const Error& rhs)
- // Return 'true' if the specified 'lhs' and 'rhs' attribute objects
- // have the same value, and 'false' otherwise. Two attribute objects
- // have the same value if each respective attribute has the same value.
+ // Return 'true' if the specified 'lhs' and 'rhs' attribute objects
+ // have the same value, and 'false' otherwise. Two attribute objects
+ // have the same value if each respective attribute has the same value.
{
return lhs.message() == rhs.message();
}
friend bool operator!=(const Error& lhs, const Error& rhs)
- // Returns '!(lhs == rhs)'
+ // Returns '!(lhs == rhs)'
{
return !(lhs == rhs);
}
friend bsl::ostream& operator<<(bsl::ostream& stream, const Error& rhs)
- // Format the specified 'rhs' to the specified output 'stream' and
- // return a reference to the modifiable 'stream'.
+ // Format the specified 'rhs' to the specified output 'stream' and
+ // return a reference to the modifiable 'stream'.
{
return rhs.print(stream, 0, -1);
}
template
friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const Error& object)
- // Pass the specified 'object' to the specified 'hashAlg'. This
- // function integrates with the 'bslh' modular hashing system and
- // effectively provides a 'bsl::hash' specialization for 'Error'.
+ // Pass the specified 'object' to the specified 'hashAlg'. This
+ // function integrates with the 'bslh' modular hashing system and
+ // effectively provides a 'bsl::hash' specialization for 'Error'.
{
using bslh::hashAppend;
hashAppend(hashAlg, object.message());
@@ -3084,15 +2946,16 @@ BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::Error)
namespace mqbcmd {
-// ==============
-// class FileInfo
-// ==============
+ // ==============
+ // class FileInfo
+ // ==============
class FileInfo {
+
// INSTANCE DATA
- bsls::Types::Uint64 d_positionBytes;
- bsls::Types::Uint64 d_sizeBytes;
- bsls::Types::Uint64 d_outstandingBytes;
+ bsls::Types::Uint64 d_positionBytes;
+ bsls::Types::Uint64 d_sizeBytes;
+ bsls::Types::Uint64 d_outstandingBytes;
// PRIVATE ACCESSORS
template
@@ -3101,17 +2964,19 @@ class FileInfo {
public:
// TYPES
enum {
- ATTRIBUTE_ID_POSITION_BYTES = 0,
- ATTRIBUTE_ID_SIZE_BYTES = 1,
- ATTRIBUTE_ID_OUTSTANDING_BYTES = 2
+ ATTRIBUTE_ID_POSITION_BYTES = 0
+ , ATTRIBUTE_ID_SIZE_BYTES = 1
+ , ATTRIBUTE_ID_OUTSTANDING_BYTES = 2
};
- enum { NUM_ATTRIBUTES = 3 };
+ enum {
+ NUM_ATTRIBUTES = 3
+ };
enum {
- ATTRIBUTE_INDEX_POSITION_BYTES = 0,
- ATTRIBUTE_INDEX_SIZE_BYTES = 1,
- ATTRIBUTE_INDEX_OUTSTANDING_BYTES = 2
+ ATTRIBUTE_INDEX_POSITION_BYTES = 0
+ , ATTRIBUTE_INDEX_SIZE_BYTES = 1
+ , ATTRIBUTE_INDEX_OUTSTANDING_BYTES = 2
};
// CONSTANTS
@@ -3121,123 +2986,126 @@ class FileInfo {
public:
// CLASS METHODS
- static const bdlat_AttributeInfo* lookupAttributeInfo(int id);
- // Return attribute information for the attribute indicated by the
- // specified 'id' if the attribute exists, and 0 otherwise.
+ static const bdlat_AttributeInfo *lookupAttributeInfo(int id);
+ // Return attribute information for the attribute indicated by the
+ // specified 'id' if the attribute exists, and 0 otherwise.
- static const bdlat_AttributeInfo* lookupAttributeInfo(const char* name,
- int nameLength);
- // Return attribute information for the attribute indicated by the
- // specified 'name' of the specified 'nameLength' if the attribute
- // exists, and 0 otherwise.
+ static const bdlat_AttributeInfo *lookupAttributeInfo(
+ const char *name,
+ int nameLength);
+ // Return attribute information for the attribute indicated by the
+ // specified 'name' of the specified 'nameLength' if the attribute
+ // exists, and 0 otherwise.
// CREATORS
FileInfo();
- // Create an object of type 'FileInfo' having the default value.
+ // Create an object of type 'FileInfo' having the default value.
+
// MANIPULATORS
void reset();
- // Reset this object to the default value (i.e., its value upon
- // default construction).
+ // Reset this object to the default value (i.e., its value upon
+ // default construction).
template
int manipulateAttributes(t_MANIPULATOR& manipulator);
- // Invoke the specified 'manipulator' sequentially on the address of
- // each (modifiable) attribute of this object, supplying 'manipulator'
- // with the corresponding attribute information structure until such
- // invocation returns a non-zero value. Return the value from the
- // last invocation of 'manipulator' (i.e., the invocation that
- // terminated the sequence).
+ // Invoke the specified 'manipulator' sequentially on the address of
+ // each (modifiable) attribute of this object, supplying 'manipulator'
+ // with the corresponding attribute information structure until such
+ // invocation returns a non-zero value. Return the value from the
+ // last invocation of 'manipulator' (i.e., the invocation that
+ // terminated the sequence).
template
int manipulateAttribute(t_MANIPULATOR& manipulator, int id);
- // Invoke the specified 'manipulator' on the address of
- // the (modifiable) attribute indicated by the specified 'id',
- // supplying 'manipulator' with the corresponding attribute
- // information structure. Return the value returned from the
- // invocation of 'manipulator' if 'id' identifies an attribute of this
- // class, and -1 otherwise.
-
- template
- int manipulateAttribute(t_MANIPULATOR& manipulator,
- const char* name,
- int nameLength);
- // Invoke the specified 'manipulator' on the address of
- // the (modifiable) attribute indicated by the specified 'name' of the
- // specified 'nameLength', supplying 'manipulator' with the
- // corresponding attribute information structure. Return the value
- // returned from the invocation of 'manipulator' if 'name' identifies
- // an attribute of this class, and -1 otherwise.
+ // Invoke the specified 'manipulator' on the address of
+ // the (modifiable) attribute indicated by the specified 'id',
+ // supplying 'manipulator' with the corresponding attribute
+ // information structure. Return the value returned from the
+ // invocation of 'manipulator' if 'id' identifies an attribute of this
+ // class, and -1 otherwise.
+
+ template
+ int manipulateAttribute(t_MANIPULATOR& manipulator,
+ const char *name,
+ int nameLength);
+ // Invoke the specified 'manipulator' on the address of
+ // the (modifiable) attribute indicated by the specified 'name' of the
+ // specified 'nameLength', supplying 'manipulator' with the
+ // corresponding attribute information structure. Return the value
+ // returned from the invocation of 'manipulator' if 'name' identifies
+ // an attribute of this class, and -1 otherwise.
bsls::Types::Uint64& positionBytes();
- // Return a reference to the modifiable "PositionBytes" attribute of
- // this object.
+ // Return a reference to the modifiable "PositionBytes" attribute of
+ // this object.
bsls::Types::Uint64& sizeBytes();
- // Return a reference to the modifiable "SizeBytes" attribute of this
- // object.
+ // Return a reference to the modifiable "SizeBytes" attribute of this
+ // object.
bsls::Types::Uint64& outstandingBytes();
- // Return a reference to the modifiable "OutstandingBytes" attribute of
- // this object.
+ // Return a reference to the modifiable "OutstandingBytes" attribute of
+ // this object.
// ACCESSORS
- bsl::ostream&
- print(bsl::ostream& stream, int level = 0, int spacesPerLevel = 4) const;
- // Format this object to the specified output 'stream' at the
- // optionally specified indentation 'level' and return a reference to
- // the modifiable 'stream'. If 'level' is specified, optionally
- // specify 'spacesPerLevel', the number of spaces per indentation level
- // for this and all of its nested objects. Each line is indented by
- // the absolute value of 'level * spacesPerLevel'. If 'level' is
- // negative, suppress indentation of the first line. If
- // 'spacesPerLevel' is negative, suppress line breaks and format the
- // entire output on one line. If 'stream' is initially invalid, this
- // operation has no effect. Note that a trailing newline is provided
- // in multiline mode only.
+ bsl::ostream& print(bsl::ostream& stream,
+ int level = 0,
+ int spacesPerLevel = 4) const;
+ // Format this object to the specified output 'stream' at the
+ // optionally specified indentation 'level' and return a reference to
+ // the modifiable 'stream'. If 'level' is specified, optionally
+ // specify 'spacesPerLevel', the number of spaces per indentation level
+ // for this and all of its nested objects. Each line is indented by
+ // the absolute value of 'level * spacesPerLevel'. If 'level' is
+ // negative, suppress indentation of the first line. If
+ // 'spacesPerLevel' is negative, suppress line breaks and format the
+ // entire output on one line. If 'stream' is initially invalid, this
+ // operation has no effect. Note that a trailing newline is provided
+ // in multiline mode only.
template
int accessAttributes(t_ACCESSOR& accessor) const;
- // Invoke the specified 'accessor' sequentially on each
- // (non-modifiable) attribute of this object, supplying 'accessor'
- // with the corresponding attribute information structure until such
- // invocation returns a non-zero value. Return the value from the
- // last invocation of 'accessor' (i.e., the invocation that terminated
- // the sequence).
+ // Invoke the specified 'accessor' sequentially on each
+ // (non-modifiable) attribute of this object, supplying 'accessor'
+ // with the corresponding attribute information structure until such
+ // invocation returns a non-zero value. Return the value from the
+ // last invocation of 'accessor' (i.e., the invocation that terminated
+ // the sequence).
template
int accessAttribute(t_ACCESSOR& accessor, int id) const;
- // Invoke the specified 'accessor' on the (non-modifiable) attribute
- // of this object indicated by the specified 'id', supplying 'accessor'
- // with the corresponding attribute information structure. Return the
- // value returned from the invocation of 'accessor' if 'id' identifies
- // an attribute of this class, and -1 otherwise.
+ // Invoke the specified 'accessor' on the (non-modifiable) attribute
+ // of this object indicated by the specified 'id', supplying 'accessor'
+ // with the corresponding attribute information structure. Return the
+ // value returned from the invocation of 'accessor' if 'id' identifies
+ // an attribute of this class, and -1 otherwise.
template
- int accessAttribute(t_ACCESSOR& accessor,
- const char* name,
+ int accessAttribute(t_ACCESSOR& accessor,
+ const char *name,
int nameLength) const;
- // Invoke the specified 'accessor' on the (non-modifiable) attribute
- // of this object indicated by the specified 'name' of the specified
- // 'nameLength', supplying 'accessor' with the corresponding attribute
- // information structure. Return the value returned from the
- // invocation of 'accessor' if 'name' identifies an attribute of this
- // class, and -1 otherwise.
+ // Invoke the specified 'accessor' on the (non-modifiable) attribute
+ // of this object indicated by the specified 'name' of the specified
+ // 'nameLength', supplying 'accessor' with the corresponding attribute
+ // information structure. Return the value returned from the
+ // invocation of 'accessor' if 'name' identifies an attribute of this
+ // class, and -1 otherwise.
bsls::Types::Uint64 positionBytes() const;
- // Return the value of the "PositionBytes" attribute of this object.
+ // Return the value of the "PositionBytes" attribute of this object.
bsls::Types::Uint64 sizeBytes() const;
- // Return the value of the "SizeBytes" attribute of this object.
+ // Return the value of the "SizeBytes" attribute of this object.
bsls::Types::Uint64 outstandingBytes() const;
- // Return the value of the "OutstandingBytes" attribute of this object.
+ // Return the value of the "OutstandingBytes" attribute of this object.
// HIDDEN FRIENDS
friend bool operator==(const FileInfo& lhs, const FileInfo& rhs)
- // Return 'true' if the specified 'lhs' and 'rhs' attribute objects
- // have the same value, and 'false' otherwise. Two attribute objects
- // have the same value if each respective attribute has the same value.
+ // Return 'true' if the specified 'lhs' and 'rhs' attribute objects
+ // have the same value, and 'false' otherwise. Two attribute objects
+ // have the same value if each respective attribute has the same value.
{
return lhs.positionBytes() == rhs.positionBytes() &&
lhs.sizeBytes() == rhs.sizeBytes() &&
@@ -3245,23 +3113,23 @@ class FileInfo {
}
friend bool operator!=(const FileInfo& lhs, const FileInfo& rhs)
- // Returns '!(lhs == rhs)'
+ // Returns '!(lhs == rhs)'
{
return !(lhs == rhs);
}
friend bsl::ostream& operator<<(bsl::ostream& stream, const FileInfo& rhs)
- // Format the specified 'rhs' to the specified output 'stream' and
- // return a reference to the modifiable 'stream'.
+ // Format the specified 'rhs' to the specified output 'stream' and
+ // return a reference to the modifiable 'stream'.
{
return rhs.print(stream, 0, -1);
}
template
friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const FileInfo& object)
- // Pass the specified 'object' to the specified 'hashAlg'. This
- // function integrates with the 'bslh' modular hashing system and
- // effectively provides a 'bsl::hash' specialization for 'FileInfo'.
+ // Pass the specified 'object' to the specified 'hashAlg'. This
+ // function integrates with the 'bslh' modular hashing system and
+ // effectively provides a 'bsl::hash' specialization for 'FileInfo'.
{
object.hashAppendImpl(hashAlg);
}
@@ -3275,27 +3143,30 @@ BDLAT_DECL_SEQUENCE_WITH_BITWISEMOVEABLE_TRAITS(mqbcmd::FileInfo)
namespace mqbcmd {
-// =============
-// class FileSet
-// =============
+ // =============
+ // class FileSet
+ // =============
class FileSet {
+
// INSTANCE DATA
- bsls::Types::Uint64 d_aliasedBlobBufferCount;
- bsl::string d_dataFileName;
+ bsls::Types::Uint64 d_aliasedBlobBufferCount;
+ bsl::string d_dataFileName;
public:
// TYPES
enum {
- ATTRIBUTE_ID_DATA_FILE_NAME = 0,
- ATTRIBUTE_ID_ALIASED_BLOB_BUFFER_COUNT = 1
+ ATTRIBUTE_ID_DATA_FILE_NAME = 0
+ , ATTRIBUTE_ID_ALIASED_BLOB_BUFFER_COUNT = 1
};
- enum { NUM_ATTRIBUTES = 2 };
+ enum {
+ NUM_ATTRIBUTES = 2
+ };
enum {
- ATTRIBUTE_INDEX_DATA_FILE_NAME = 0,
- ATTRIBUTE_INDEX_ALIASED_BLOB_BUFFER_COUNT = 1
+ ATTRIBUTE_INDEX_DATA_FILE_NAME = 0
+ , ATTRIBUTE_INDEX_ALIASED_BLOB_BUFFER_COUNT = 1
};
// CONSTANTS
@@ -3305,180 +3176,184 @@ class FileSet {
public:
// CLASS METHODS
- static const bdlat_AttributeInfo* lookupAttributeInfo(int id);
- // Return attribute information for the attribute indicated by the
- // specified 'id' if the attribute exists, and 0 otherwise.
+ static const bdlat_AttributeInfo *lookupAttributeInfo(int id);
+ // Return attribute information for the attribute indicated by the
+ // specified 'id' if the attribute exists, and 0 otherwise.
- static const bdlat_AttributeInfo* lookupAttributeInfo(const char* name,
- int nameLength);
- // Return attribute information for the attribute indicated by the
- // specified 'name' of the specified 'nameLength' if the attribute
- // exists, and 0 otherwise.
+ static const bdlat_AttributeInfo *lookupAttributeInfo(
+ const char *name,
+ int nameLength);
+ // Return attribute information for the attribute indicated by the
+ // specified 'name' of the specified 'nameLength' if the attribute
+ // exists, and 0 otherwise.
// CREATORS
- explicit FileSet(bslma::Allocator* basicAllocator = 0);
- // Create an object of type 'FileSet' having the default value. Use
- // the optionally specified 'basicAllocator' to supply memory. If
- // 'basicAllocator' is 0, the currently installed default allocator is
- // used.
-
- FileSet(const FileSet& original, bslma::Allocator* basicAllocator = 0);
- // Create an object of type 'FileSet' having the value of the specified
- // 'original' object. Use the optionally specified 'basicAllocator' to
- // supply memory. If 'basicAllocator' is 0, the currently installed
- // default allocator is used.
-
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ explicit FileSet(bslma::Allocator *basicAllocator = 0);
+ // Create an object of type 'FileSet' having the default value. Use
+ // the optionally specified 'basicAllocator' to supply memory. If
+ // 'basicAllocator' is 0, the currently installed default allocator is
+ // used.
+
+ FileSet(const FileSet& original,
+ bslma::Allocator *basicAllocator = 0);
+ // Create an object of type 'FileSet' having the value of the specified
+ // 'original' object. Use the optionally specified 'basicAllocator' to
+ // supply memory. If 'basicAllocator' is 0, the currently installed
+ // default allocator is used.
+
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
FileSet(FileSet&& original) noexcept;
- // Create an object of type 'FileSet' having the value of the specified
- // 'original' object. After performing this action, the 'original'
- // object will be left in a valid, but unspecified state.
+ // Create an object of type 'FileSet' having the value of the specified
+ // 'original' object. After performing this action, the 'original'
+ // object will be left in a valid, but unspecified state.
- FileSet(FileSet&& original, bslma::Allocator* basicAllocator);
- // Create an object of type 'FileSet' having the value of the specified
- // 'original' object. After performing this action, the 'original'
- // object will be left in a valid, but unspecified state. Use the
- // optionally specified 'basicAllocator' to supply memory. If
- // 'basicAllocator' is 0, the currently installed default allocator is
- // used.
+ FileSet(FileSet&& original,
+ bslma::Allocator *basicAllocator);
+ // Create an object of type 'FileSet' having the value of the specified
+ // 'original' object. After performing this action, the 'original'
+ // object will be left in a valid, but unspecified state. Use the
+ // optionally specified 'basicAllocator' to supply memory. If
+ // 'basicAllocator' is 0, the currently installed default allocator is
+ // used.
#endif
~FileSet();
- // Destroy this object.
+ // Destroy this object.
// MANIPULATORS
FileSet& operator=(const FileSet& rhs);
- // Assign to this object the value of the specified 'rhs' object.
+ // Assign to this object the value of the specified 'rhs' object.
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
FileSet& operator=(FileSet&& rhs);
- // Assign to this object the value of the specified 'rhs' object.
- // After performing this action, the 'rhs' object will be left in a
- // valid, but unspecified state.
+ // Assign to this object the value of the specified 'rhs' object.
+ // After performing this action, the 'rhs' object will be left in a
+ // valid, but unspecified state.
#endif
void reset();
- // Reset this object to the default value (i.e., its value upon
- // default construction).
+ // Reset this object to the default value (i.e., its value upon
+ // default construction).
template
int manipulateAttributes(t_MANIPULATOR& manipulator);
- // Invoke the specified 'manipulator' sequentially on the address of
- // each (modifiable) attribute of this object, supplying 'manipulator'
- // with the corresponding attribute information structure until such
- // invocation returns a non-zero value. Return the value from the
- // last invocation of 'manipulator' (i.e., the invocation that
- // terminated the sequence).
+ // Invoke the specified 'manipulator' sequentially on the address of
+ // each (modifiable) attribute of this object, supplying 'manipulator'
+ // with the corresponding attribute information structure until such
+ // invocation returns a non-zero value. Return the value from the
+ // last invocation of 'manipulator' (i.e., the invocation that
+ // terminated the sequence).
template
int manipulateAttribute(t_MANIPULATOR& manipulator, int id);
- // Invoke the specified 'manipulator' on the address of
- // the (modifiable) attribute indicated by the specified 'id',
- // supplying 'manipulator' with the corresponding attribute
- // information structure. Return the value returned from the
- // invocation of 'manipulator' if 'id' identifies an attribute of this
- // class, and -1 otherwise.
-
- template
- int manipulateAttribute(t_MANIPULATOR& manipulator,
- const char* name,
- int nameLength);
- // Invoke the specified 'manipulator' on the address of
- // the (modifiable) attribute indicated by the specified 'name' of the
- // specified 'nameLength', supplying 'manipulator' with the
- // corresponding attribute information structure. Return the value
- // returned from the invocation of 'manipulator' if 'name' identifies
- // an attribute of this class, and -1 otherwise.
+ // Invoke the specified 'manipulator' on the address of
+ // the (modifiable) attribute indicated by the specified 'id',
+ // supplying 'manipulator' with the corresponding attribute
+ // information structure. Return the value returned from the
+ // invocation of 'manipulator' if 'id' identifies an attribute of this
+ // class, and -1 otherwise.
+
+ template
+ int manipulateAttribute(t_MANIPULATOR& manipulator,
+ const char *name,
+ int nameLength);
+ // Invoke the specified 'manipulator' on the address of
+ // the (modifiable) attribute indicated by the specified 'name' of the
+ // specified 'nameLength', supplying 'manipulator' with the
+ // corresponding attribute information structure. Return the value
+ // returned from the invocation of 'manipulator' if 'name' identifies
+ // an attribute of this class, and -1 otherwise.
bsl::string& dataFileName();
- // Return a reference to the modifiable "DataFileName" attribute of
- // this object.
+ // Return a reference to the modifiable "DataFileName" attribute of
+ // this object.
bsls::Types::Uint64& aliasedBlobBufferCount();
- // Return a reference to the modifiable "AliasedBlobBufferCount"
- // attribute of this object.
+ // Return a reference to the modifiable "AliasedBlobBufferCount"
+ // attribute of this object.
// ACCESSORS
- bsl::ostream&
- print(bsl::ostream& stream, int level = 0, int spacesPerLevel = 4) const;
- // Format this object to the specified output 'stream' at the
- // optionally specified indentation 'level' and return a reference to
- // the modifiable 'stream'. If 'level' is specified, optionally
- // specify 'spacesPerLevel', the number of spaces per indentation level
- // for this and all of its nested objects. Each line is indented by
- // the absolute value of 'level * spacesPerLevel'. If 'level' is
- // negative, suppress indentation of the first line. If
- // 'spacesPerLevel' is negative, suppress line breaks and format the
- // entire output on one line. If 'stream' is initially invalid, this
- // operation has no effect. Note that a trailing newline is provided
- // in multiline mode only.
+ bsl::ostream& print(bsl::ostream& stream,
+ int level = 0,
+ int spacesPerLevel = 4) const;
+ // Format this object to the specified output 'stream' at the
+ // optionally specified indentation 'level' and return a reference to
+ // the modifiable 'stream'. If 'level' is specified, optionally
+ // specify 'spacesPerLevel', the number of spaces per indentation level
+ // for this and all of its nested objects. Each line is indented by
+ // the absolute value of 'level * spacesPerLevel'. If 'level' is
+ // negative, suppress indentation of the first line. If
+ // 'spacesPerLevel' is negative, suppress line breaks and format the
+ // entire output on one line. If 'stream' is initially invalid, this
+ // operation has no effect. Note that a trailing newline is provided
+ // in multiline mode only.
template
int accessAttributes(t_ACCESSOR& accessor) const;
- // Invoke the specified 'accessor' sequentially on each
- // (non-modifiable) attribute of this object, supplying 'accessor'
- // with the corresponding attribute information structure until such
- // invocation returns a non-zero value. Return the value from the
- // last invocation of 'accessor' (i.e., the invocation that terminated
- // the sequence).
+ // Invoke the specified 'accessor' sequentially on each
+ // (non-modifiable) attribute of this object, supplying 'accessor'
+ // with the corresponding attribute information structure until such
+ // invocation returns a non-zero value. Return the value from the
+ // last invocation of 'accessor' (i.e., the invocation that terminated
+ // the sequence).
template
int accessAttribute(t_ACCESSOR& accessor, int id) const;
- // Invoke the specified 'accessor' on the (non-modifiable) attribute
- // of this object indicated by the specified 'id', supplying 'accessor'
- // with the corresponding attribute information structure. Return the
- // value returned from the invocation of 'accessor' if 'id' identifies
- // an attribute of this class, and -1 otherwise.
+ // Invoke the specified 'accessor' on the (non-modifiable) attribute
+ // of this object indicated by the specified 'id', supplying 'accessor'
+ // with the corresponding attribute information structure. Return the
+ // value returned from the invocation of 'accessor' if 'id' identifies
+ // an attribute of this class, and -1 otherwise.
template
- int accessAttribute(t_ACCESSOR& accessor,
- const char* name,
+ int accessAttribute(t_ACCESSOR& accessor,
+ const char *name,
int nameLength) const;
- // Invoke the specified 'accessor' on the (non-modifiable) attribute
- // of this object indicated by the specified 'name' of the specified
- // 'nameLength', supplying 'accessor' with the corresponding attribute
- // information structure. Return the value returned from the
- // invocation of 'accessor' if 'name' identifies an attribute of this
- // class, and -1 otherwise.
+ // Invoke the specified 'accessor' on the (non-modifiable) attribute
+ // of this object indicated by the specified 'name' of the specified
+ // 'nameLength', supplying 'accessor' with the corresponding attribute
+ // information structure. Return the value returned from the
+ // invocation of 'accessor' if 'name' identifies an attribute of this
+ // class, and -1 otherwise.
const bsl::string& dataFileName() const;
- // Return a reference offering non-modifiable access to the
- // "DataFileName" attribute of this object.
+ // Return a reference offering non-modifiable access to the
+ // "DataFileName" attribute of this object.
bsls::Types::Uint64 aliasedBlobBufferCount() const;
- // Return the value of the "AliasedBlobBufferCount" attribute of this
- // object.
+ // Return the value of the "AliasedBlobBufferCount" attribute of this
+ // object.
// HIDDEN FRIENDS
friend bool operator==(const FileSet& lhs, const FileSet& rhs)
- // Return 'true' if the specified 'lhs' and 'rhs' attribute objects
- // have the same value, and 'false' otherwise. Two attribute objects
- // have the same value if each respective attribute has the same value.
+ // Return 'true' if the specified 'lhs' and 'rhs' attribute objects
+ // have the same value, and 'false' otherwise. Two attribute objects
+ // have the same value if each respective attribute has the same value.
{
return lhs.dataFileName() == rhs.dataFileName() &&
lhs.aliasedBlobBufferCount() == rhs.aliasedBlobBufferCount();
}
friend bool operator!=(const FileSet& lhs, const FileSet& rhs)
- // Returns '!(lhs == rhs)'
+ // Returns '!(lhs == rhs)'
{
return !(lhs == rhs);
}
friend bsl::ostream& operator<<(bsl::ostream& stream, const FileSet& rhs)
- // Format the specified 'rhs' to the specified output 'stream' and
- // return a reference to the modifiable 'stream'.
+ // Format the specified 'rhs' to the specified output 'stream' and
+ // return a reference to the modifiable 'stream'.
{
return rhs.print(stream, 0, -1);
}
template
friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const FileSet& object)
- // Pass the specified 'object' to the specified 'hashAlg'. This
- // function integrates with the 'bslh' modular hashing system and
- // effectively provides a 'bsl::hash' specialization for 'FileSet'.
+ // Pass the specified 'object' to the specified 'hashAlg'. This
+ // function integrates with the 'bslh' modular hashing system and
+ // effectively provides a 'bsl::hash' specialization for 'FileSet'.
{
using bslh::hashAppend;
hashAppend(hashAlg, object.dataFileName());
@@ -3494,16 +3369,23 @@ BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::FileSet)
namespace mqbcmd {
-// ====================
-// class FileStoreState
-// ====================
+ // ====================
+ // class FileStoreState
+ // ====================
struct FileStoreState {
+
public:
// TYPES
- enum Value { OPEN = 0, CLOSED = 1, STOPPING = 2 };
+ enum Value {
+ OPEN = 0
+ , CLOSED = 1
+ , STOPPING = 2
+ };
- enum { NUM_ENUMERATORS = 3 };
+ enum {
+ NUM_ENUMERATORS = 3
+ };
// CONSTANTS
static const char CLASS_NAME[];
@@ -3511,37 +3393,40 @@ struct FileStoreState {
static const bdlat_EnumeratorInfo ENUMERATOR_INFO_ARRAY[];
// CLASS METHODS
- static const char* toString(Value value);
- // Return the string representation exactly matching the enumerator
- // name corresponding to the specified enumeration 'value'.
-
- static int fromString(Value* result, const char* string, int stringLength);
- // Load into the specified 'result' the enumerator matching the
- // specified 'string' of the specified 'stringLength'. Return 0 on
- // success, and a non-zero value with no effect on 'result' otherwise
- // (i.e., 'string' does not match any enumerator).
-
- static int fromString(Value* result, const bsl::string& string);
- // Load into the specified 'result' the enumerator matching the
- // specified 'string'. Return 0 on success, and a non-zero value with
- // no effect on 'result' otherwise (i.e., 'string' does not match any
- // enumerator).
-
- static int fromInt(Value* result, int number);
- // Load into the specified 'result' the enumerator matching the
- // specified 'number'. Return 0 on success, and a non-zero value with
- // no effect on 'result' otherwise (i.e., 'number' does not match any
- // enumerator).
+ static const char *toString(Value value);
+ // Return the string representation exactly matching the enumerator
+ // name corresponding to the specified enumeration 'value'.
+
+ static int fromString(Value *result,
+ const char *string,
+ int stringLength);
+ // Load into the specified 'result' the enumerator matching the
+ // specified 'string' of the specified 'stringLength'. Return 0 on
+ // success, and a non-zero value with no effect on 'result' otherwise
+ // (i.e., 'string' does not match any enumerator).
+
+ static int fromString(Value *result,
+ const bsl::string& string);
+ // Load into the specified 'result' the enumerator matching the
+ // specified 'string'. Return 0 on success, and a non-zero value with
+ // no effect on 'result' otherwise (i.e., 'string' does not match any
+ // enumerator).
+
+ static int fromInt(Value *result, int number);
+ // Load into the specified 'result' the enumerator matching the
+ // specified 'number'. Return 0 on success, and a non-zero value with
+ // no effect on 'result' otherwise (i.e., 'number' does not match any
+ // enumerator).
static bsl::ostream& print(bsl::ostream& stream, Value value);
- // Write to the specified 'stream' the string representation of
- // the specified enumeration 'value'. Return a reference to
- // the modifiable 'stream'.
+ // Write to the specified 'stream' the string representation of
+ // the specified enumeration 'value'. Return a reference to
+ // the modifiable 'stream'.
// HIDDEN FRIENDS
friend bsl::ostream& operator<<(bsl::ostream& stream, Value rhs)
- // Format the specified 'rhs' to the specified output 'stream' and
- // return a reference to the modifiable 'stream'.
+ // Format the specified 'rhs' to the specified output 'stream' and
+ // return a reference to the modifiable 'stream'.
{
return FileStoreState::print(stream, rhs);
}
@@ -3553,23 +3438,31 @@ struct FileStoreState {
BDLAT_DECL_ENUMERATION_TRAITS(mqbcmd::FileStoreState)
+
namespace mqbcmd {
-// =================
-// class HelpCommand
-// =================
+ // =================
+ // class HelpCommand
+ // =================
class HelpCommand {
+
// INSTANCE DATA
- bool d_plumbing;
+ bool d_plumbing;
public:
// TYPES
- enum { ATTRIBUTE_ID_PLUMBING = 0 };
+ enum {
+ ATTRIBUTE_ID_PLUMBING = 0
+ };
- enum { NUM_ATTRIBUTES = 1 };
+ enum {
+ NUM_ATTRIBUTES = 1
+ };
- enum { ATTRIBUTE_INDEX_PLUMBING = 0 };
+ enum {
+ ATTRIBUTE_INDEX_PLUMBING = 0
+ };
// CONSTANTS
static const char CLASS_NAME[];
@@ -3580,123 +3473,126 @@ class HelpCommand {
public:
// CLASS METHODS
- static const bdlat_AttributeInfo* lookupAttributeInfo(int id);
- // Return attribute information for the attribute indicated by the
- // specified 'id' if the attribute exists, and 0 otherwise.
+ static const bdlat_AttributeInfo *lookupAttributeInfo(int id);
+ // Return attribute information for the attribute indicated by the
+ // specified 'id' if the attribute exists, and 0 otherwise.
- static const bdlat_AttributeInfo* lookupAttributeInfo(const char* name,
- int nameLength);
- // Return attribute information for the attribute indicated by the
- // specified 'name' of the specified 'nameLength' if the attribute
- // exists, and 0 otherwise.
+ static const bdlat_AttributeInfo *lookupAttributeInfo(
+ const char *name,
+ int nameLength);
+ // Return attribute information for the attribute indicated by the
+ // specified 'name' of the specified 'nameLength' if the attribute
+ // exists, and 0 otherwise.
// CREATORS
HelpCommand();
- // Create an object of type 'HelpCommand' having the default value.
+ // Create an object of type 'HelpCommand' having the default value.
+
// MANIPULATORS
void reset();
- // Reset this object to the default value (i.e., its value upon
- // default construction).
+ // Reset this object to the default value (i.e., its value upon
+ // default construction).
template
int manipulateAttributes(t_MANIPULATOR& manipulator);
- // Invoke the specified 'manipulator' sequentially on the address of
- // each (modifiable) attribute of this object, supplying 'manipulator'
- // with the corresponding attribute information structure until such
- // invocation returns a non-zero value. Return the value from the
- // last invocation of 'manipulator' (i.e., the invocation that
- // terminated the sequence).
+ // Invoke the specified 'manipulator' sequentially on the address of
+ // each (modifiable) attribute of this object, supplying 'manipulator'
+ // with the corresponding attribute information structure until such
+ // invocation returns a non-zero value. Return the value from the
+ // last invocation of 'manipulator' (i.e., the invocation that
+ // terminated the sequence).
template
int manipulateAttribute(t_MANIPULATOR& manipulator, int id);
- // Invoke the specified 'manipulator' on the address of
- // the (modifiable) attribute indicated by the specified 'id',
- // supplying 'manipulator' with the corresponding attribute
- // information structure. Return the value returned from the
- // invocation of 'manipulator' if 'id' identifies an attribute of this
- // class, and -1 otherwise.
-
- template
- int manipulateAttribute(t_MANIPULATOR& manipulator,
- const char* name,
- int nameLength);
- // Invoke the specified 'manipulator' on the address of
- // the (modifiable) attribute indicated by the specified 'name' of the
- // specified 'nameLength', supplying 'manipulator' with the
- // corresponding attribute information structure. Return the value
- // returned from the invocation of 'manipulator' if 'name' identifies
- // an attribute of this class, and -1 otherwise.
+ // Invoke the specified 'manipulator' on the address of
+ // the (modifiable) attribute indicated by the specified 'id',
+ // supplying 'manipulator' with the corresponding attribute
+ // information structure. Return the value returned from the
+ // invocation of 'manipulator' if 'id' identifies an attribute of this
+ // class, and -1 otherwise.
+
+ template
+ int manipulateAttribute(t_MANIPULATOR& manipulator,
+ const char *name,
+ int nameLength);
+ // Invoke the specified 'manipulator' on the address of
+ // the (modifiable) attribute indicated by the specified 'name' of the
+ // specified 'nameLength', supplying 'manipulator' with the
+ // corresponding attribute information structure. Return the value
+ // returned from the invocation of 'manipulator' if 'name' identifies
+ // an attribute of this class, and -1 otherwise.
bool& plumbing();
- // Return a reference to the modifiable "Plumbing" attribute of this
- // object.
+ // Return a reference to the modifiable "Plumbing" attribute of this
+ // object.
// ACCESSORS
- bsl::ostream&
- print(bsl::ostream& stream, int level = 0, int spacesPerLevel = 4) const;
- // Format this object to the specified output 'stream' at the
- // optionally specified indentation 'level' and return a reference to
- // the modifiable 'stream'. If 'level' is specified, optionally
- // specify 'spacesPerLevel', the number of spaces per indentation level
- // for this and all of its nested objects. Each line is indented by
- // the absolute value of 'level * spacesPerLevel'. If 'level' is
- // negative, suppress indentation of the first line. If
- // 'spacesPerLevel' is negative, suppress line breaks and format the
- // entire output on one line. If 'stream' is initially invalid, this
- // operation has no effect. Note that a trailing newline is provided
- // in multiline mode only.
+ bsl::ostream& print(bsl::ostream& stream,
+ int level = 0,
+ int spacesPerLevel = 4) const;
+ // Format this object to the specified output 'stream' at the
+ // optionally specified indentation 'level' and return a reference to
+ // the modifiable 'stream'. If 'level' is specified, optionally
+ // specify 'spacesPerLevel', the number of spaces per indentation level
+ // for this and all of its nested objects. Each line is indented by
+ // the absolute value of 'level * spacesPerLevel'. If 'level' is
+ // negative, suppress indentation of the first line. If
+ // 'spacesPerLevel' is negative, suppress line breaks and format the
+ // entire output on one line. If 'stream' is initially invalid, this
+ // operation has no effect. Note that a trailing newline is provided
+ // in multiline mode only.
template
int accessAttributes(t_ACCESSOR& accessor) const;
- // Invoke the specified 'accessor' sequentially on each
- // (non-modifiable) attribute of this object, supplying 'accessor'
- // with the corresponding attribute information structure until such
- // invocation returns a non-zero value. Return the value from the
- // last invocation of 'accessor' (i.e., the invocation that terminated
- // the sequence).
+ // Invoke the specified 'accessor' sequentially on each
+ // (non-modifiable) attribute of this object, supplying 'accessor'
+ // with the corresponding attribute information structure until such
+ // invocation returns a non-zero value. Return the value from the
+ // last invocation of 'accessor' (i.e., the invocation that terminated
+ // the sequence).
template
int accessAttribute(t_ACCESSOR& accessor, int id) const;
- // Invoke the specified 'accessor' on the (non-modifiable) attribute
- // of this object indicated by the specified 'id', supplying 'accessor'
- // with the corresponding attribute information structure. Return the
- // value returned from the invocation of 'accessor' if 'id' identifies
- // an attribute of this class, and -1 otherwise.
+ // Invoke the specified 'accessor' on the (non-modifiable) attribute
+ // of this object indicated by the specified 'id', supplying 'accessor'
+ // with the corresponding attribute information structure. Return the
+ // value returned from the invocation of 'accessor' if 'id' identifies
+ // an attribute of this class, and -1 otherwise.
template
- int accessAttribute(t_ACCESSOR& accessor,
- const char* name,
+ int accessAttribute(t_ACCESSOR& accessor,
+ const char *name,
int nameLength) const;
- // Invoke the specified 'accessor' on the (non-modifiable) attribute
- // of this object indicated by the specified 'name' of the specified
- // 'nameLength', supplying 'accessor' with the corresponding attribute
- // information structure. Return the value returned from the
- // invocation of 'accessor' if 'name' identifies an attribute of this
- // class, and -1 otherwise.
+ // Invoke the specified 'accessor' on the (non-modifiable) attribute
+ // of this object indicated by the specified 'name' of the specified
+ // 'nameLength', supplying 'accessor' with the corresponding attribute
+ // information structure. Return the value returned from the
+ // invocation of 'accessor' if 'name' identifies an attribute of this
+ // class, and -1 otherwise.
bool plumbing() const;
- // Return the value of the "Plumbing" attribute of this object.
+ // Return the value of the "Plumbing" attribute of this object.
// HIDDEN FRIENDS
friend bool operator==(const HelpCommand& lhs, const HelpCommand& rhs)
- // Return 'true' if the specified 'lhs' and 'rhs' attribute objects
- // have the same value, and 'false' otherwise. Two attribute objects
- // have the same value if each respective attribute has the same value.
+ // Return 'true' if the specified 'lhs' and 'rhs' attribute objects
+ // have the same value, and 'false' otherwise. Two attribute objects
+ // have the same value if each respective attribute has the same value.
{
return lhs.plumbing() == rhs.plumbing();
}
friend bool operator!=(const HelpCommand& lhs, const HelpCommand& rhs)
- // Returns '!(lhs == rhs)'
+ // Returns '!(lhs == rhs)'
{
return !(lhs == rhs);
}
friend bsl::ostream& operator<<(bsl::ostream& stream,
const HelpCommand& rhs)
- // Format the specified 'rhs' to the specified output 'stream' and
- // return a reference to the modifiable 'stream'.
+ // Format the specified 'rhs' to the specified output 'stream' and
+ // return a reference to the modifiable 'stream'.
{
return rhs.print(stream, 0, -1);
}
@@ -3704,9 +3600,9 @@ class HelpCommand {
template
friend void hashAppend(t_HASH_ALGORITHM& hashAlg,
const HelpCommand& object)
- // Pass the specified 'object' to the specified 'hashAlg'. This
- // function integrates with the 'bslh' modular hashing system and
- // effectively provides a 'bsl::hash' specialization for 'HelpCommand'.
+ // Pass the specified 'object' to the specified 'hashAlg'. This
+ // function integrates with the 'bslh' modular hashing system and
+ // effectively provides a 'bsl::hash' specialization for 'HelpCommand'.
{
using bslh::hashAppend;
hashAppend(hashAlg, object.plumbing());
@@ -3721,24 +3617,30 @@ BDLAT_DECL_SEQUENCE_WITH_BITWISEMOVEABLE_TRAITS(mqbcmd::HelpCommand)
namespace mqbcmd {
-// ===========================
-// class LeaderMessageSequence
-// ===========================
+ // ===========================
+ // class LeaderMessageSequence
+ // ===========================
class LeaderMessageSequence {
+
// INSTANCE DATA
- bsls::Types::Uint64 d_electorTerm;
- bsls::Types::Uint64 d_sequenceNumber;
+ bsls::Types::Uint64 d_electorTerm;
+ bsls::Types::Uint64 d_sequenceNumber;
public:
// TYPES
- enum { ATTRIBUTE_ID_ELECTOR_TERM = 0, ATTRIBUTE_ID_SEQUENCE_NUMBER = 1 };
+ enum {
+ ATTRIBUTE_ID_ELECTOR_TERM = 0
+ , ATTRIBUTE_ID_SEQUENCE_NUMBER = 1
+ };
- enum { NUM_ATTRIBUTES = 2 };
+ enum {
+ NUM_ATTRIBUTES = 2
+ };
enum {
- ATTRIBUTE_INDEX_ELECTOR_TERM = 0,
- ATTRIBUTE_INDEX_SEQUENCE_NUMBER = 1
+ ATTRIBUTE_INDEX_ELECTOR_TERM = 0
+ , ATTRIBUTE_INDEX_SEQUENCE_NUMBER = 1
};
// CONSTANTS
@@ -3748,118 +3650,121 @@ class LeaderMessageSequence {
public:
// CLASS METHODS
- static const bdlat_AttributeInfo* lookupAttributeInfo(int id);
- // Return attribute information for the attribute indicated by the
- // specified 'id' if the attribute exists, and 0 otherwise.
+ static const bdlat_AttributeInfo *lookupAttributeInfo(int id);
+ // Return attribute information for the attribute indicated by the
+ // specified 'id' if the attribute exists, and 0 otherwise.
- static const bdlat_AttributeInfo* lookupAttributeInfo(const char* name,
- int nameLength);
- // Return attribute information for the attribute indicated by the
- // specified 'name' of the specified 'nameLength' if the attribute
- // exists, and 0 otherwise.
+ static const bdlat_AttributeInfo *lookupAttributeInfo(
+ const char *name,
+ int nameLength);
+ // Return attribute information for the attribute indicated by the
+ // specified 'name' of the specified 'nameLength' if the attribute
+ // exists, and 0 otherwise.
// CREATORS
LeaderMessageSequence();
- // Create an object of type 'LeaderMessageSequence' having the default
- // value.
+ // Create an object of type 'LeaderMessageSequence' having the default
+ // value.
+
// MANIPULATORS
void reset();
- // Reset this object to the default value (i.e., its value upon
- // default construction).
+ // Reset this object to the default value (i.e., its value upon
+ // default construction).
template
int manipulateAttributes(t_MANIPULATOR& manipulator);
- // Invoke the specified 'manipulator' sequentially on the address of
- // each (modifiable) attribute of this object, supplying 'manipulator'
- // with the corresponding attribute information structure until such
- // invocation returns a non-zero value. Return the value from the
- // last invocation of 'manipulator' (i.e., the invocation that
- // terminated the sequence).
+ // Invoke the specified 'manipulator' sequentially on the address of
+ // each (modifiable) attribute of this object, supplying 'manipulator'
+ // with the corresponding attribute information structure until such
+ // invocation returns a non-zero value. Return the value from the
+ // last invocation of 'manipulator' (i.e., the invocation that
+ // terminated the sequence).
template
int manipulateAttribute(t_MANIPULATOR& manipulator, int id);
- // Invoke the specified 'manipulator' on the address of
- // the (modifiable) attribute indicated by the specified 'id',
- // supplying 'manipulator' with the corresponding attribute
- // information structure. Return the value returned from the
- // invocation of 'manipulator' if 'id' identifies an attribute of this
- // class, and -1 otherwise.
-
- template
- int manipulateAttribute(t_MANIPULATOR& manipulator,
- const char* name,
- int nameLength);
- // Invoke the specified 'manipulator' on the address of
- // the (modifiable) attribute indicated by the specified 'name' of the
- // specified 'nameLength', supplying 'manipulator' with the
- // corresponding attribute information structure. Return the value
- // returned from the invocation of 'manipulator' if 'name' identifies
- // an attribute of this class, and -1 otherwise.
+ // Invoke the specified 'manipulator' on the address of
+ // the (modifiable) attribute indicated by the specified 'id',
+ // supplying 'manipulator' with the corresponding attribute
+ // information structure. Return the value returned from the
+ // invocation of 'manipulator' if 'id' identifies an attribute of this
+ // class, and -1 otherwise.
+
+ template
+ int manipulateAttribute(t_MANIPULATOR& manipulator,
+ const char *name,
+ int nameLength);
+ // Invoke the specified 'manipulator' on the address of
+ // the (modifiable) attribute indicated by the specified 'name' of the
+ // specified 'nameLength', supplying 'manipulator' with the
+ // corresponding attribute information structure. Return the value
+ // returned from the invocation of 'manipulator' if 'name' identifies
+ // an attribute of this class, and -1 otherwise.
bsls::Types::Uint64& electorTerm();
- // Return a reference to the modifiable "ElectorTerm" attribute of this
- // object.
+ // Return a reference to the modifiable "ElectorTerm" attribute of this
+ // object.
bsls::Types::Uint64& sequenceNumber();
- // Return a reference to the modifiable "SequenceNumber" attribute of
- // this object.
+ // Return a reference to the modifiable "SequenceNumber" attribute of
+ // this object.
// ACCESSORS
- bsl::ostream&
- print(bsl::ostream& stream, int level = 0, int spacesPerLevel = 4) const;
- // Format this object to the specified output 'stream' at the
- // optionally specified indentation 'level' and return a reference to
- // the modifiable 'stream'. If 'level' is specified, optionally
- // specify 'spacesPerLevel', the number of spaces per indentation level
- // for this and all of its nested objects. Each line is indented by
- // the absolute value of 'level * spacesPerLevel'. If 'level' is
- // negative, suppress indentation of the first line. If
- // 'spacesPerLevel' is negative, suppress line breaks and format the
- // entire output on one line. If 'stream' is initially invalid, this
- // operation has no effect. Note that a trailing newline is provided
- // in multiline mode only.
+ bsl::ostream& print(bsl::ostream& stream,
+ int level = 0,
+ int spacesPerLevel = 4) const;
+ // Format this object to the specified output 'stream' at the
+ // optionally specified indentation 'level' and return a reference to
+ // the modifiable 'stream'. If 'level' is specified, optionally
+ // specify 'spacesPerLevel', the number of spaces per indentation level
+ // for this and all of its nested objects. Each line is indented by
+ // the absolute value of 'level * spacesPerLevel'. If 'level' is
+ // negative, suppress indentation of the first line. If
+ // 'spacesPerLevel' is negative, suppress line breaks and format the
+ // entire output on one line. If 'stream' is initially invalid, this
+ // operation has no effect. Note that a trailing newline is provided
+ // in multiline mode only.
template
int accessAttributes(t_ACCESSOR& accessor) const;
- // Invoke the specified 'accessor' sequentially on each
- // (non-modifiable) attribute of this object, supplying 'accessor'
- // with the corresponding attribute information structure until such
- // invocation returns a non-zero value. Return the value from the
- // last invocation of 'accessor' (i.e., the invocation that terminated
- // the sequence).
+ // Invoke the specified 'accessor' sequentially on each
+ // (non-modifiable) attribute of this object, supplying 'accessor'
+ // with the corresponding attribute information structure until such
+ // invocation returns a non-zero value. Return the value from the
+ // last invocation of 'accessor' (i.e., the invocation that terminated
+ // the sequence).
template
int accessAttribute(t_ACCESSOR& accessor, int id) const;
- // Invoke the specified 'accessor' on the (non-modifiable) attribute
- // of this object indicated by the specified 'id', supplying 'accessor'
- // with the corresponding attribute information structure. Return the
- // value returned from the invocation of 'accessor' if 'id' identifies
- // an attribute of this class, and -1 otherwise.
+ // Invoke the specified 'accessor' on the (non-modifiable) attribute
+ // of this object indicated by the specified 'id', supplying 'accessor'
+ // with the corresponding attribute information structure. Return the
+ // value returned from the invocation of 'accessor' if 'id' identifies
+ // an attribute of this class, and -1 otherwise.
template
- int accessAttribute(t_ACCESSOR& accessor,
- const char* name,
+ int accessAttribute(t_ACCESSOR& accessor,
+ const char *name,
int nameLength) const;
- // Invoke the specified 'accessor' on the (non-modifiable) attribute
- // of this object indicated by the specified 'name' of the specified
- // 'nameLength', supplying 'accessor' with the corresponding attribute
- // information structure. Return the value returned from the
- // invocation of 'accessor' if 'name' identifies an attribute of this
- // class, and -1 otherwise.
+ // Invoke the specified 'accessor' on the (non-modifiable) attribute
+ // of this object indicated by the specified 'name' of the specified
+ // 'nameLength', supplying 'accessor' with the corresponding attribute
+ // information structure. Return the value returned from the
+ // invocation of 'accessor' if 'name' identifies an attribute of this
+ // class, and -1 otherwise.
bsls::Types::Uint64 electorTerm() const;
- // Return the value of the "ElectorTerm" attribute of this object.
+ // Return the value of the "ElectorTerm" attribute of this object.
bsls::Types::Uint64 sequenceNumber() const;
- // Return the value of the "SequenceNumber" attribute of this object.
+ // Return the value of the "SequenceNumber" attribute of this object.
// HIDDEN FRIENDS
friend bool operator==(const LeaderMessageSequence& lhs,
const LeaderMessageSequence& rhs)
- // Return 'true' if the specified 'lhs' and 'rhs' attribute objects
- // have the same value, and 'false' otherwise. Two attribute objects
- // have the same value if each respective attribute has the same value.
+ // Return 'true' if the specified 'lhs' and 'rhs' attribute objects
+ // have the same value, and 'false' otherwise. Two attribute objects
+ // have the same value if each respective attribute has the same value.
{
return lhs.electorTerm() == rhs.electorTerm() &&
lhs.sequenceNumber() == rhs.sequenceNumber();
@@ -3867,15 +3772,15 @@ class LeaderMessageSequence {
friend bool operator!=(const LeaderMessageSequence& lhs,
const LeaderMessageSequence& rhs)
- // Returns '!(lhs == rhs)'
+ // Returns '!(lhs == rhs)'
{
return !(lhs == rhs);
}
friend bsl::ostream& operator<<(bsl::ostream& stream,
const LeaderMessageSequence& rhs)
- // Format the specified 'rhs' to the specified output 'stream' and
- // return a reference to the modifiable 'stream'.
+ // Format the specified 'rhs' to the specified output 'stream' and
+ // return a reference to the modifiable 'stream'.
{
return rhs.print(stream, 0, -1);
}
@@ -3883,10 +3788,10 @@ class LeaderMessageSequence {
template
friend void hashAppend(t_HASH_ALGORITHM& hashAlg,
const LeaderMessageSequence& object)
- // Pass the specified 'object' to the specified 'hashAlg'. This
- // function integrates with the 'bslh' modular hashing system and
- // effectively provides a 'bsl::hash' specialization for
- // 'LeaderMessageSequence'.
+ // Pass the specified 'object' to the specified 'hashAlg'. This
+ // function integrates with the 'bslh' modular hashing system and
+ // effectively provides a 'bsl::hash' specialization for
+ // 'LeaderMessageSequence'.
{
using bslh::hashAppend;
hashAppend(hashAlg, object.electorTerm());
@@ -3902,16 +3807,23 @@ BDLAT_DECL_SEQUENCE_WITH_BITWISEMOVEABLE_TRAITS(mqbcmd::LeaderMessageSequence)
namespace mqbcmd {
-// ==================
-// class LeaderStatus
-// ==================
+ // ==================
+ // class LeaderStatus
+ // ==================
struct LeaderStatus {
+
public:
// TYPES
- enum Value { UNDEFINED = 0, PASSIVE = 1, ACTIVE = 2 };
+ enum Value {
+ UNDEFINED = 0
+ , PASSIVE = 1
+ , ACTIVE = 2
+ };
- enum { NUM_ENUMERATORS = 3 };
+ enum {
+ NUM_ENUMERATORS = 3
+ };
// CONSTANTS
static const char CLASS_NAME[];
@@ -3919,37 +3831,40 @@ struct LeaderStatus {
static const bdlat_EnumeratorInfo ENUMERATOR_INFO_ARRAY[];
// CLASS METHODS
- static const char* toString(Value value);
- // Return the string representation exactly matching the enumerator
- // name corresponding to the specified enumeration 'value'.
-
- static int fromString(Value* result, const char* string, int stringLength);
- // Load into the specified 'result' the enumerator matching the
- // specified 'string' of the specified 'stringLength'. Return 0 on
- // success, and a non-zero value with no effect on 'result' otherwise
- // (i.e., 'string' does not match any enumerator).
-
- static int fromString(Value* result, const bsl::string& string);
- // Load into the specified 'result' the enumerator matching the
- // specified 'string'. Return 0 on success, and a non-zero value with
- // no effect on 'result' otherwise (i.e., 'string' does not match any
- // enumerator).
-
- static int fromInt(Value* result, int number);
- // Load into the specified 'result' the enumerator matching the
- // specified 'number'. Return 0 on success, and a non-zero value with
- // no effect on 'result' otherwise (i.e., 'number' does not match any
- // enumerator).
+ static const char *toString(Value value);
+ // Return the string representation exactly matching the enumerator
+ // name corresponding to the specified enumeration 'value'.
+
+ static int fromString(Value *result,
+ const char *string,
+ int stringLength);
+ // Load into the specified 'result' the enumerator matching the
+ // specified 'string' of the specified 'stringLength'. Return 0 on
+ // success, and a non-zero value with no effect on 'result' otherwise
+ // (i.e., 'string' does not match any enumerator).
+
+ static int fromString(Value *result,
+ const bsl::string& string);
+ // Load into the specified 'result' the enumerator matching the
+ // specified 'string'. Return 0 on success, and a non-zero value with
+ // no effect on 'result' otherwise (i.e., 'string' does not match any
+ // enumerator).
+
+ static int fromInt(Value *result, int number);
+ // Load into the specified 'result' the enumerator matching the
+ // specified 'number'. Return 0 on success, and a non-zero value with
+ // no effect on 'result' otherwise (i.e., 'number' does not match any
+ // enumerator).
static bsl::ostream& print(bsl::ostream& stream, Value value);
- // Write to the specified 'stream' the string representation of
- // the specified enumeration 'value'. Return a reference to
- // the modifiable 'stream'.
+ // Write to the specified 'stream' the string representation of
+ // the specified enumeration 'value'. Return a reference to
+ // the modifiable 'stream'.
// HIDDEN FRIENDS
friend bsl::ostream& operator<<(bsl::ostream& stream, Value rhs)
- // Format the specified 'rhs' to the specified output 'stream' and
- // return a reference to the modifiable 'stream'.
+ // Format the specified 'rhs' to the specified output 'stream' and
+ // return a reference to the modifiable 'stream'.
{
return LeaderStatus::print(stream, rhs);
}
@@ -3961,17 +3876,19 @@ struct LeaderStatus {
BDLAT_DECL_ENUMERATION_TRAITS(mqbcmd::LeaderStatus)
+
namespace mqbcmd {
-// ==============================
-// class LeastRecentlyUsedGroupId
-// ==============================
+ // ==============================
+ // class LeastRecentlyUsedGroupId
+ // ==============================
class LeastRecentlyUsedGroupId {
+
// INSTANCE DATA
- bsls::Types::Int64 d_lastSeenDeltaNanoseconds;
- bsl::string d_clientDescription;
- bsl::string d_msgGroupId;
+ bsls::Types::Int64 d_lastSeenDeltaNanoseconds;
+ bsl::string d_clientDescription;
+ bsl::string d_msgGroupId;
// PRIVATE ACCESSORS
template
@@ -3980,17 +3897,19 @@ class LeastRecentlyUsedGroupId {
public:
// TYPES
enum {
- ATTRIBUTE_ID_CLIENT_DESCRIPTION = 0,
- ATTRIBUTE_ID_MSG_GROUP_ID = 1,
- ATTRIBUTE_ID_LAST_SEEN_DELTA_NANOSECONDS = 2
+ ATTRIBUTE_ID_CLIENT_DESCRIPTION = 0
+ , ATTRIBUTE_ID_MSG_GROUP_ID = 1
+ , ATTRIBUTE_ID_LAST_SEEN_DELTA_NANOSECONDS = 2
};
- enum { NUM_ATTRIBUTES = 3 };
+ enum {
+ NUM_ATTRIBUTES = 3
+ };
enum {
- ATTRIBUTE_INDEX_CLIENT_DESCRIPTION = 0,
- ATTRIBUTE_INDEX_MSG_GROUP_ID = 1,
- ATTRIBUTE_INDEX_LAST_SEEN_DELTA_NANOSECONDS = 2
+ ATTRIBUTE_INDEX_CLIENT_DESCRIPTION = 0
+ , ATTRIBUTE_INDEX_MSG_GROUP_ID = 1
+ , ATTRIBUTE_INDEX_LAST_SEEN_DELTA_NANOSECONDS = 2
};
// CONSTANTS
@@ -4000,187 +3919,188 @@ class LeastRecentlyUsedGroupId {
public:
// CLASS METHODS
- static const bdlat_AttributeInfo* lookupAttributeInfo(int id);
- // Return attribute information for the attribute indicated by the
- // specified 'id' if the attribute exists, and 0 otherwise.
+ static const bdlat_AttributeInfo *lookupAttributeInfo(int id);
+ // Return attribute information for the attribute indicated by the
+ // specified 'id' if the attribute exists, and 0 otherwise.
- static const bdlat_AttributeInfo* lookupAttributeInfo(const char* name,
- int nameLength);
- // Return attribute information for the attribute indicated by the
- // specified 'name' of the specified 'nameLength' if the attribute
- // exists, and 0 otherwise.
+ static const bdlat_AttributeInfo *lookupAttributeInfo(
+ const char *name,
+ int nameLength);
+ // Return attribute information for the attribute indicated by the
+ // specified 'name' of the specified 'nameLength' if the attribute
+ // exists, and 0 otherwise.
// CREATORS
- explicit LeastRecentlyUsedGroupId(bslma::Allocator* basicAllocator = 0);
- // Create an object of type 'LeastRecentlyUsedGroupId' having the
- // default value. Use the optionally specified 'basicAllocator' to
- // supply memory. If 'basicAllocator' is 0, the currently installed
- // default allocator is used.
+ explicit LeastRecentlyUsedGroupId(bslma::Allocator *basicAllocator = 0);
+ // Create an object of type 'LeastRecentlyUsedGroupId' having the
+ // default value. Use the optionally specified 'basicAllocator' to
+ // supply memory. If 'basicAllocator' is 0, the currently installed
+ // default allocator is used.
LeastRecentlyUsedGroupId(const LeastRecentlyUsedGroupId& original,
- bslma::Allocator* basicAllocator = 0);
- // Create an object of type 'LeastRecentlyUsedGroupId' having the value
- // of the specified 'original' object. Use the optionally specified
- // 'basicAllocator' to supply memory. If 'basicAllocator' is 0, the
- // currently installed default allocator is used.
-
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ bslma::Allocator *basicAllocator = 0);
+ // Create an object of type 'LeastRecentlyUsedGroupId' having the value
+ // of the specified 'original' object. Use the optionally specified
+ // 'basicAllocator' to supply memory. If 'basicAllocator' is 0, the
+ // currently installed default allocator is used.
+
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
LeastRecentlyUsedGroupId(LeastRecentlyUsedGroupId&& original) noexcept;
- // Create an object of type 'LeastRecentlyUsedGroupId' having the value
- // of the specified 'original' object. After performing this action,
- // the 'original' object will be left in a valid, but unspecified
- // state.
+ // Create an object of type 'LeastRecentlyUsedGroupId' having the value
+ // of the specified 'original' object. After performing this action,
+ // the 'original' object will be left in a valid, but unspecified
+ // state.
LeastRecentlyUsedGroupId(LeastRecentlyUsedGroupId&& original,
- bslma::Allocator* basicAllocator);
- // Create an object of type 'LeastRecentlyUsedGroupId' having the value
- // of the specified 'original' object. After performing this action,
- // the 'original' object will be left in a valid, but unspecified
- // state. Use the optionally specified 'basicAllocator' to supply
- // memory. If 'basicAllocator' is 0, the currently installed default
- // allocator is used.
+ bslma::Allocator *basicAllocator);
+ // Create an object of type 'LeastRecentlyUsedGroupId' having the value
+ // of the specified 'original' object. After performing this action,
+ // the 'original' object will be left in a valid, but unspecified
+ // state. Use the optionally specified 'basicAllocator' to supply
+ // memory. If 'basicAllocator' is 0, the currently installed default
+ // allocator is used.
#endif
~LeastRecentlyUsedGroupId();
- // Destroy this object.
+ // Destroy this object.
// MANIPULATORS
LeastRecentlyUsedGroupId& operator=(const LeastRecentlyUsedGroupId& rhs);
- // Assign to this object the value of the specified 'rhs' object.
+ // Assign to this object the value of the specified 'rhs' object.
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
LeastRecentlyUsedGroupId& operator=(LeastRecentlyUsedGroupId&& rhs);
- // Assign to this object the value of the specified 'rhs' object.
- // After performing this action, the 'rhs' object will be left in a
- // valid, but unspecified state.
+ // Assign to this object the value of the specified 'rhs' object.
+ // After performing this action, the 'rhs' object will be left in a
+ // valid, but unspecified state.
#endif
void reset();
- // Reset this object to the default value (i.e., its value upon
- // default construction).
+ // Reset this object to the default value (i.e., its value upon
+ // default construction).
template
int manipulateAttributes(t_MANIPULATOR& manipulator);
- // Invoke the specified 'manipulator' sequentially on the address of
- // each (modifiable) attribute of this object, supplying 'manipulator'
- // with the corresponding attribute information structure until such
- // invocation returns a non-zero value. Return the value from the
- // last invocation of 'manipulator' (i.e., the invocation that
- // terminated the sequence).
+ // Invoke the specified 'manipulator' sequentially on the address of
+ // each (modifiable) attribute of this object, supplying 'manipulator'
+ // with the corresponding attribute information structure until such
+ // invocation returns a non-zero value. Return the value from the
+ // last invocation of 'manipulator' (i.e., the invocation that
+ // terminated the sequence).
template
int manipulateAttribute(t_MANIPULATOR& manipulator, int id);
- // Invoke the specified 'manipulator' on the address of
- // the (modifiable) attribute indicated by the specified 'id',
- // supplying 'manipulator' with the corresponding attribute
- // information structure. Return the value returned from the
- // invocation of 'manipulator' if 'id' identifies an attribute of this
- // class, and -1 otherwise.
-
- template
- int manipulateAttribute(t_MANIPULATOR& manipulator,
- const char* name,
- int nameLength);
- // Invoke the specified 'manipulator' on the address of
- // the (modifiable) attribute indicated by the specified 'name' of the
- // specified 'nameLength', supplying 'manipulator' with the
- // corresponding attribute information structure. Return the value
- // returned from the invocation of 'manipulator' if 'name' identifies
- // an attribute of this class, and -1 otherwise.
+ // Invoke the specified 'manipulator' on the address of
+ // the (modifiable) attribute indicated by the specified 'id',
+ // supplying 'manipulator' with the corresponding attribute
+ // information structure. Return the value returned from the
+ // invocation of 'manipulator' if 'id' identifies an attribute of this
+ // class, and -1 otherwise.
+
+ template
+ int manipulateAttribute(t_MANIPULATOR& manipulator,
+ const char *name,
+ int nameLength);
+ // Invoke the specified 'manipulator' on the address of
+ // the (modifiable) attribute indicated by the specified 'name' of the
+ // specified 'nameLength', supplying 'manipulator' with the
+ // corresponding attribute information structure. Return the value
+ // returned from the invocation of 'manipulator' if 'name' identifies
+ // an attribute of this class, and -1 otherwise.
bsl::string& clientDescription();
- // Return a reference to the modifiable "ClientDescription" attribute
- // of this object.
+ // Return a reference to the modifiable "ClientDescription" attribute
+ // of this object.
bsl::string& msgGroupId();
- // Return a reference to the modifiable "MsgGroupId" attribute of this
- // object.
+ // Return a reference to the modifiable "MsgGroupId" attribute of this
+ // object.
bsls::Types::Int64& lastSeenDeltaNanoseconds();
- // Return a reference to the modifiable "LastSeenDeltaNanoseconds"
- // attribute of this object.
+ // Return a reference to the modifiable "LastSeenDeltaNanoseconds"
+ // attribute of this object.
// ACCESSORS
- bsl::ostream&
- print(bsl::ostream& stream, int level = 0, int spacesPerLevel = 4) const;
- // Format this object to the specified output 'stream' at the
- // optionally specified indentation 'level' and return a reference to
- // the modifiable 'stream'. If 'level' is specified, optionally
- // specify 'spacesPerLevel', the number of spaces per indentation level
- // for this and all of its nested objects. Each line is indented by
- // the absolute value of 'level * spacesPerLevel'. If 'level' is
- // negative, suppress indentation of the first line. If
- // 'spacesPerLevel' is negative, suppress line breaks and format the
- // entire output on one line. If 'stream' is initially invalid, this
- // operation has no effect. Note that a trailing newline is provided
- // in multiline mode only.
+ bsl::ostream& print(bsl::ostream& stream,
+ int level = 0,
+ int spacesPerLevel = 4) const;
+ // Format this object to the specified output 'stream' at the
+ // optionally specified indentation 'level' and return a reference to
+ // the modifiable 'stream'. If 'level' is specified, optionally
+ // specify 'spacesPerLevel', the number of spaces per indentation level
+ // for this and all of its nested objects. Each line is indented by
+ // the absolute value of 'level * spacesPerLevel'. If 'level' is
+ // negative, suppress indentation of the first line. If
+ // 'spacesPerLevel' is negative, suppress line breaks and format the
+ // entire output on one line. If 'stream' is initially invalid, this
+ // operation has no effect. Note that a trailing newline is provided
+ // in multiline mode only.
template
int accessAttributes(t_ACCESSOR& accessor) const;
- // Invoke the specified 'accessor' sequentially on each
- // (non-modifiable) attribute of this object, supplying 'accessor'
- // with the corresponding attribute information structure until such
- // invocation returns a non-zero value. Return the value from the
- // last invocation of 'accessor' (i.e., the invocation that terminated
- // the sequence).
+ // Invoke the specified 'accessor' sequentially on each
+ // (non-modifiable) attribute of this object, supplying 'accessor'
+ // with the corresponding attribute information structure until such
+ // invocation returns a non-zero value. Return the value from the
+ // last invocation of 'accessor' (i.e., the invocation that terminated
+ // the sequence).
template
int accessAttribute(t_ACCESSOR& accessor, int id) const;
- // Invoke the specified 'accessor' on the (non-modifiable) attribute
- // of this object indicated by the specified 'id', supplying 'accessor'
- // with the corresponding attribute information structure. Return the
- // value returned from the invocation of 'accessor' if 'id' identifies
- // an attribute of this class, and -1 otherwise.
+ // Invoke the specified 'accessor' on the (non-modifiable) attribute
+ // of this object indicated by the specified 'id', supplying 'accessor'
+ // with the corresponding attribute information structure. Return the
+ // value returned from the invocation of 'accessor' if 'id' identifies
+ // an attribute of this class, and -1 otherwise.
template
- int accessAttribute(t_ACCESSOR& accessor,
- const char* name,
+ int accessAttribute(t_ACCESSOR& accessor,
+ const char *name,
int nameLength) const;
- // Invoke the specified 'accessor' on the (non-modifiable) attribute
- // of this object indicated by the specified 'name' of the specified
- // 'nameLength', supplying 'accessor' with the corresponding attribute
- // information structure. Return the value returned from the
- // invocation of 'accessor' if 'name' identifies an attribute of this
- // class, and -1 otherwise.
+ // Invoke the specified 'accessor' on the (non-modifiable) attribute
+ // of this object indicated by the specified 'name' of the specified
+ // 'nameLength', supplying 'accessor' with the corresponding attribute
+ // information structure. Return the value returned from the
+ // invocation of 'accessor' if 'name' identifies an attribute of this
+ // class, and -1 otherwise.
const bsl::string& clientDescription() const;
- // Return a reference offering non-modifiable access to the
- // "ClientDescription" attribute of this object.
+ // Return a reference offering non-modifiable access to the
+ // "ClientDescription" attribute of this object.
const bsl::string& msgGroupId() const;
- // Return a reference offering non-modifiable access to the
- // "MsgGroupId" attribute of this object.
+ // Return a reference offering non-modifiable access to the
+ // "MsgGroupId" attribute of this object.
bsls::Types::Int64 lastSeenDeltaNanoseconds() const;
- // Return the value of the "LastSeenDeltaNanoseconds" attribute of this
- // object.
+ // Return the value of the "LastSeenDeltaNanoseconds" attribute of this
+ // object.
// HIDDEN FRIENDS
friend bool operator==(const LeastRecentlyUsedGroupId& lhs,
const LeastRecentlyUsedGroupId& rhs)
- // Return 'true' if the specified 'lhs' and 'rhs' attribute objects
- // have the same value, and 'false' otherwise. Two attribute objects
- // have the same value if each respective attribute has the same value.
+ // Return 'true' if the specified 'lhs' and 'rhs' attribute objects
+ // have the same value, and 'false' otherwise. Two attribute objects
+ // have the same value if each respective attribute has the same value.
{
return lhs.clientDescription() == rhs.clientDescription() &&
lhs.msgGroupId() == rhs.msgGroupId() &&
- lhs.lastSeenDeltaNanoseconds() ==
- rhs.lastSeenDeltaNanoseconds();
+ lhs.lastSeenDeltaNanoseconds() == rhs.lastSeenDeltaNanoseconds();
}
friend bool operator!=(const LeastRecentlyUsedGroupId& lhs,
const LeastRecentlyUsedGroupId& rhs)
- // Returns '!(lhs == rhs)'
+ // Returns '!(lhs == rhs)'
{
return !(lhs == rhs);
}
friend bsl::ostream& operator<<(bsl::ostream& stream,
const LeastRecentlyUsedGroupId& rhs)
- // Format the specified 'rhs' to the specified output 'stream' and
- // return a reference to the modifiable 'stream'.
+ // Format the specified 'rhs' to the specified output 'stream' and
+ // return a reference to the modifiable 'stream'.
{
return rhs.print(stream, 0, -1);
}
@@ -4188,10 +4108,10 @@ class LeastRecentlyUsedGroupId {
template
friend void hashAppend(t_HASH_ALGORITHM& hashAlg,
const LeastRecentlyUsedGroupId& object)
- // Pass the specified 'object' to the specified 'hashAlg'. This
- // function integrates with the 'bslh' modular hashing system and
- // effectively provides a 'bsl::hash' specialization for
- // 'LeastRecentlyUsedGroupId'.
+ // Pass the specified 'object' to the specified 'hashAlg'. This
+ // function integrates with the 'bslh' modular hashing system and
+ // effectively provides a 'bsl::hash' specialization for
+ // 'LeastRecentlyUsedGroupId'.
{
object.hashAppendImpl(hashAlg);
}
@@ -4201,20 +4121,20 @@ class LeastRecentlyUsedGroupId {
// TRAITS
-BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(
- mqbcmd::LeastRecentlyUsedGroupId)
+BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::LeastRecentlyUsedGroupId)
namespace mqbcmd {
-// ==================
-// class ListMessages
-// ==================
+ // ==================
+ // class ListMessages
+ // ==================
class ListMessages {
+
// INSTANCE DATA
- bdlb::NullableValue d_appId;
- int d_offset;
- int d_count;
+ bdlb::NullableValue d_appId;
+ int d_offset;
+ int d_count;
// PRIVATE ACCESSORS
template
@@ -4223,17 +4143,19 @@ class ListMessages {
public:
// TYPES
enum {
- ATTRIBUTE_ID_APP_ID = 0,
- ATTRIBUTE_ID_OFFSET = 1,
- ATTRIBUTE_ID_COUNT = 2
+ ATTRIBUTE_ID_APP_ID = 0
+ , ATTRIBUTE_ID_OFFSET = 1
+ , ATTRIBUTE_ID_COUNT = 2
};
- enum { NUM_ATTRIBUTES = 3 };
+ enum {
+ NUM_ATTRIBUTES = 3
+ };
enum {
- ATTRIBUTE_INDEX_APP_ID = 0,
- ATTRIBUTE_INDEX_OFFSET = 1,
- ATTRIBUTE_INDEX_COUNT = 2
+ ATTRIBUTE_INDEX_APP_ID = 0
+ , ATTRIBUTE_INDEX_OFFSET = 1
+ , ATTRIBUTE_INDEX_COUNT = 2
};
// CONSTANTS
@@ -4243,179 +4165,183 @@ class ListMessages {
public:
// CLASS METHODS
- static const bdlat_AttributeInfo* lookupAttributeInfo(int id);
- // Return attribute information for the attribute indicated by the
- // specified 'id' if the attribute exists, and 0 otherwise.
+ static const bdlat_AttributeInfo *lookupAttributeInfo(int id);
+ // Return attribute information for the attribute indicated by the
+ // specified 'id' if the attribute exists, and 0 otherwise.
- static const bdlat_AttributeInfo* lookupAttributeInfo(const char* name,
- int nameLength);
- // Return attribute information for the attribute indicated by the
- // specified 'name' of the specified 'nameLength' if the attribute
- // exists, and 0 otherwise.
+ static const bdlat_AttributeInfo *lookupAttributeInfo(
+ const char *name,
+ int nameLength);
+ // Return attribute information for the attribute indicated by the
+ // specified 'name' of the specified 'nameLength' if the attribute
+ // exists, and 0 otherwise.
// CREATORS
- explicit ListMessages(bslma::Allocator* basicAllocator = 0);
- // Create an object of type 'ListMessages' having the default value.
- // Use the optionally specified 'basicAllocator' to supply memory. If
- // 'basicAllocator' is 0, the currently installed default allocator is
- // used.
+ explicit ListMessages(bslma::Allocator *basicAllocator = 0);
+ // Create an object of type 'ListMessages' having the default value.
+ // Use the optionally specified 'basicAllocator' to supply memory. If
+ // 'basicAllocator' is 0, the currently installed default allocator is
+ // used.
ListMessages(const ListMessages& original,
- bslma::Allocator* basicAllocator = 0);
- // Create an object of type 'ListMessages' having the value of the
- // specified 'original' object. Use the optionally specified
- // 'basicAllocator' to supply memory. If 'basicAllocator' is 0, the
- // currently installed default allocator is used.
-
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ bslma::Allocator *basicAllocator = 0);
+ // Create an object of type 'ListMessages' having the value of the
+ // specified 'original' object. Use the optionally specified
+ // 'basicAllocator' to supply memory. If 'basicAllocator' is 0, the
+ // currently installed default allocator is used.
+
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ListMessages(ListMessages&& original) noexcept;
- // Create an object of type 'ListMessages' having the value of the
- // specified 'original' object. After performing this action, the
- // 'original' object will be left in a valid, but unspecified state.
+ // Create an object of type 'ListMessages' having the value of the
+ // specified 'original' object. After performing this action, the
+ // 'original' object will be left in a valid, but unspecified state.
- ListMessages(ListMessages&& original, bslma::Allocator* basicAllocator);
- // Create an object of type 'ListMessages' having the value of the
- // specified 'original' object. After performing this action, the
- // 'original' object will be left in a valid, but unspecified state.
- // Use the optionally specified 'basicAllocator' to supply memory. If
- // 'basicAllocator' is 0, the currently installed default allocator is
- // used.
+ ListMessages(ListMessages&& original,
+ bslma::Allocator *basicAllocator);
+ // Create an object of type 'ListMessages' having the value of the
+ // specified 'original' object. After performing this action, the
+ // 'original' object will be left in a valid, but unspecified state.
+ // Use the optionally specified 'basicAllocator' to supply memory. If
+ // 'basicAllocator' is 0, the currently installed default allocator is
+ // used.
#endif
~ListMessages();
- // Destroy this object.
+ // Destroy this object.
// MANIPULATORS
ListMessages& operator=(const ListMessages& rhs);
- // Assign to this object the value of the specified 'rhs' object.
+ // Assign to this object the value of the specified 'rhs' object.
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
ListMessages& operator=(ListMessages&& rhs);
- // Assign to this object the value of the specified 'rhs' object.
- // After performing this action, the 'rhs' object will be left in a
- // valid, but unspecified state.
+ // Assign to this object the value of the specified 'rhs' object.
+ // After performing this action, the 'rhs' object will be left in a
+ // valid, but unspecified state.
#endif
void reset();
- // Reset this object to the default value (i.e., its value upon
- // default construction).
+ // Reset this object to the default value (i.e., its value upon
+ // default construction).
template
int manipulateAttributes(t_MANIPULATOR& manipulator);
- // Invoke the specified 'manipulator' sequentially on the address of
- // each (modifiable) attribute of this object, supplying 'manipulator'
- // with the corresponding attribute information structure until such
- // invocation returns a non-zero value. Return the value from the
- // last invocation of 'manipulator' (i.e., the invocation that
- // terminated the sequence).
+ // Invoke the specified 'manipulator' sequentially on the address of
+ // each (modifiable) attribute of this object, supplying 'manipulator'
+ // with the corresponding attribute information structure until such
+ // invocation returns a non-zero value. Return the value from the
+ // last invocation of 'manipulator' (i.e., the invocation that
+ // terminated the sequence).
template
int manipulateAttribute(t_MANIPULATOR& manipulator, int id);
- // Invoke the specified 'manipulator' on the address of
- // the (modifiable) attribute indicated by the specified 'id',
- // supplying 'manipulator' with the corresponding attribute
- // information structure. Return the value returned from the
- // invocation of 'manipulator' if 'id' identifies an attribute of this
- // class, and -1 otherwise.
-
- template
- int manipulateAttribute(t_MANIPULATOR& manipulator,
- const char* name,
- int nameLength);
- // Invoke the specified 'manipulator' on the address of
- // the (modifiable) attribute indicated by the specified 'name' of the
- // specified 'nameLength', supplying 'manipulator' with the
- // corresponding attribute information structure. Return the value
- // returned from the invocation of 'manipulator' if 'name' identifies
- // an attribute of this class, and -1 otherwise.
+ // Invoke the specified 'manipulator' on the address of
+ // the (modifiable) attribute indicated by the specified 'id',
+ // supplying 'manipulator' with the corresponding attribute
+ // information structure. Return the value returned from the
+ // invocation of 'manipulator' if 'id' identifies an attribute of this
+ // class, and -1 otherwise.
+
+ template
+ int manipulateAttribute(t_MANIPULATOR& manipulator,
+ const char *name,
+ int nameLength);
+ // Invoke the specified 'manipulator' on the address of
+ // the (modifiable) attribute indicated by the specified 'name' of the
+ // specified 'nameLength', supplying 'manipulator' with the
+ // corresponding attribute information structure. Return the value
+ // returned from the invocation of 'manipulator' if 'name' identifies
+ // an attribute of this class, and -1 otherwise.
bdlb::NullableValue& appId();
- // Return a reference to the modifiable "AppId" attribute of this
- // object.
+ // Return a reference to the modifiable "AppId" attribute of this
+ // object.
int& offset();
- // Return a reference to the modifiable "Offset" attribute of this
- // object.
+ // Return a reference to the modifiable "Offset" attribute of this
+ // object.
int& count();
- // Return a reference to the modifiable "Count" attribute of this
- // object.
+ // Return a reference to the modifiable "Count" attribute of this
+ // object.
// ACCESSORS
- bsl::ostream&
- print(bsl::ostream& stream, int level = 0, int spacesPerLevel = 4) const;
- // Format this object to the specified output 'stream' at the
- // optionally specified indentation 'level' and return a reference to
- // the modifiable 'stream'. If 'level' is specified, optionally
- // specify 'spacesPerLevel', the number of spaces per indentation level
- // for this and all of its nested objects. Each line is indented by
- // the absolute value of 'level * spacesPerLevel'. If 'level' is
- // negative, suppress indentation of the first line. If
- // 'spacesPerLevel' is negative, suppress line breaks and format the
- // entire output on one line. If 'stream' is initially invalid, this
- // operation has no effect. Note that a trailing newline is provided
- // in multiline mode only.
+ bsl::ostream& print(bsl::ostream& stream,
+ int level = 0,
+ int spacesPerLevel = 4) const;
+ // Format this object to the specified output 'stream' at the
+ // optionally specified indentation 'level' and return a reference to
+ // the modifiable 'stream'. If 'level' is specified, optionally
+ // specify 'spacesPerLevel', the number of spaces per indentation level
+ // for this and all of its nested objects. Each line is indented by
+ // the absolute value of 'level * spacesPerLevel'. If 'level' is
+ // negative, suppress indentation of the first line. If
+ // 'spacesPerLevel' is negative, suppress line breaks and format the
+ // entire output on one line. If 'stream' is initially invalid, this
+ // operation has no effect. Note that a trailing newline is provided
+ // in multiline mode only.
template
int accessAttributes(t_ACCESSOR& accessor) const;
- // Invoke the specified 'accessor' sequentially on each
- // (non-modifiable) attribute of this object, supplying 'accessor'
- // with the corresponding attribute information structure until such
- // invocation returns a non-zero value. Return the value from the
- // last invocation of 'accessor' (i.e., the invocation that terminated
- // the sequence).
+ // Invoke the specified 'accessor' sequentially on each
+ // (non-modifiable) attribute of this object, supplying 'accessor'
+ // with the corresponding attribute information structure until such
+ // invocation returns a non-zero value. Return the value from the
+ // last invocation of 'accessor' (i.e., the invocation that terminated
+ // the sequence).
template
int accessAttribute(t_ACCESSOR& accessor, int id) const;
- // Invoke the specified 'accessor' on the (non-modifiable) attribute
- // of this object indicated by the specified 'id', supplying 'accessor'
- // with the corresponding attribute information structure. Return the
- // value returned from the invocation of 'accessor' if 'id' identifies
- // an attribute of this class, and -1 otherwise.
+ // Invoke the specified 'accessor' on the (non-modifiable) attribute
+ // of this object indicated by the specified 'id', supplying 'accessor'
+ // with the corresponding attribute information structure. Return the
+ // value returned from the invocation of 'accessor' if 'id' identifies
+ // an attribute of this class, and -1 otherwise.
template
- int accessAttribute(t_ACCESSOR& accessor,
- const char* name,
+ int accessAttribute(t_ACCESSOR& accessor,
+ const char *name,
int nameLength) const;
- // Invoke the specified 'accessor' on the (non-modifiable) attribute
- // of this object indicated by the specified 'name' of the specified
- // 'nameLength', supplying 'accessor' with the corresponding attribute
- // information structure. Return the value returned from the
- // invocation of 'accessor' if 'name' identifies an attribute of this
- // class, and -1 otherwise.
+ // Invoke the specified 'accessor' on the (non-modifiable) attribute
+ // of this object indicated by the specified 'name' of the specified
+ // 'nameLength', supplying 'accessor' with the corresponding attribute
+ // information structure. Return the value returned from the
+ // invocation of 'accessor' if 'name' identifies an attribute of this
+ // class, and -1 otherwise.
const bdlb::NullableValue& appId() const;
- // Return a reference offering non-modifiable access to the "AppId"
- // attribute of this object.
+ // Return a reference offering non-modifiable access to the "AppId"
+ // attribute of this object.
int offset() const;
- // Return the value of the "Offset" attribute of this object.
+ // Return the value of the "Offset" attribute of this object.
int count() const;
- // Return the value of the "Count" attribute of this object.
+ // Return the value of the "Count" attribute of this object.
// HIDDEN FRIENDS
friend bool operator==(const ListMessages& lhs, const ListMessages& rhs)
- // Return 'true' if the specified 'lhs' and 'rhs' attribute objects
- // have the same value, and 'false' otherwise. Two attribute objects
- // have the same value if each respective attribute has the same value.
+ // Return 'true' if the specified 'lhs' and 'rhs' attribute objects
+ // have the same value, and 'false' otherwise. Two attribute objects
+ // have the same value if each respective attribute has the same value.
{
- return lhs.appId() == rhs.appId() && lhs.offset() == rhs.offset() &&
+ return lhs.appId() == rhs.appId() &&
+ lhs.offset() == rhs.offset() &&
lhs.count() == rhs.count();
}
friend bool operator!=(const ListMessages& lhs, const ListMessages& rhs)
- // Returns '!(lhs == rhs)'
+ // Returns '!(lhs == rhs)'
{
return !(lhs == rhs);
}
friend bsl::ostream& operator<<(bsl::ostream& stream,
const ListMessages& rhs)
- // Format the specified 'rhs' to the specified output 'stream' and
- // return a reference to the modifiable 'stream'.
+ // Format the specified 'rhs' to the specified output 'stream' and
+ // return a reference to the modifiable 'stream'.
{
return rhs.print(stream, 0, -1);
}
@@ -4423,10 +4349,10 @@ class ListMessages {
template
friend void hashAppend(t_HASH_ALGORITHM& hashAlg,
const ListMessages& object)
- // Pass the specified 'object' to the specified 'hashAlg'. This
- // function integrates with the 'bslh' modular hashing system and
- // effectively provides a 'bsl::hash' specialization for
- // 'ListMessages'.
+ // Pass the specified 'object' to the specified 'hashAlg'. This
+ // function integrates with the 'bslh' modular hashing system and
+ // effectively provides a 'bsl::hash' specialization for
+ // 'ListMessages'.
{
object.hashAppendImpl(hashAlg);
}
@@ -4440,16 +4366,23 @@ BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::ListMessages)
namespace mqbcmd {
-// ==============
-// class Locality
-// ==============
+ // ==============
+ // class Locality
+ // ==============
struct Locality {
+
public:
// TYPES
- enum Value { REMOTE = 0, LOCAL = 1, MEMBER = 2 };
+ enum Value {
+ REMOTE = 0
+ , LOCAL = 1
+ , MEMBER = 2
+ };
- enum { NUM_ENUMERATORS = 3 };
+ enum {
+ NUM_ENUMERATORS = 3
+ };
// CONSTANTS
static const char CLASS_NAME[];
@@ -4457,37 +4390,40 @@ struct Locality {
static const bdlat_EnumeratorInfo ENUMERATOR_INFO_ARRAY[];
// CLASS METHODS
- static const char* toString(Value value);
- // Return the string representation exactly matching the enumerator
- // name corresponding to the specified enumeration 'value'.
-
- static int fromString(Value* result, const char* string, int stringLength);
- // Load into the specified 'result' the enumerator matching the
- // specified 'string' of the specified 'stringLength'. Return 0 on
- // success, and a non-zero value with no effect on 'result' otherwise
- // (i.e., 'string' does not match any enumerator).
-
- static int fromString(Value* result, const bsl::string& string);
- // Load into the specified 'result' the enumerator matching the
- // specified 'string'. Return 0 on success, and a non-zero value with
- // no effect on 'result' otherwise (i.e., 'string' does not match any
- // enumerator).
-
- static int fromInt(Value* result, int number);
- // Load into the specified 'result' the enumerator matching the
- // specified 'number'. Return 0 on success, and a non-zero value with
- // no effect on 'result' otherwise (i.e., 'number' does not match any
- // enumerator).
+ static const char *toString(Value value);
+ // Return the string representation exactly matching the enumerator
+ // name corresponding to the specified enumeration 'value'.
+
+ static int fromString(Value *result,
+ const char *string,
+ int stringLength);
+ // Load into the specified 'result' the enumerator matching the
+ // specified 'string' of the specified 'stringLength'. Return 0 on
+ // success, and a non-zero value with no effect on 'result' otherwise
+ // (i.e., 'string' does not match any enumerator).
+
+ static int fromString(Value *result,
+ const bsl::string& string);
+ // Load into the specified 'result' the enumerator matching the
+ // specified 'string'. Return 0 on success, and a non-zero value with
+ // no effect on 'result' otherwise (i.e., 'string' does not match any
+ // enumerator).
+
+ static int fromInt(Value *result, int number);
+ // Load into the specified 'result' the enumerator matching the
+ // specified 'number'. Return 0 on success, and a non-zero value with
+ // no effect on 'result' otherwise (i.e., 'number' does not match any
+ // enumerator).
static bsl::ostream& print(bsl::ostream& stream, Value value);
- // Write to the specified 'stream' the string representation of
- // the specified enumeration 'value'. Return a reference to
- // the modifiable 'stream'.
+ // Write to the specified 'stream' the string representation of
+ // the specified enumeration 'value'. Return a reference to
+ // the modifiable 'stream'.
// HIDDEN FRIENDS
friend bsl::ostream& operator<<(bsl::ostream& stream, Value rhs)
- // Format the specified 'rhs' to the specified output 'stream' and
- // return a reference to the modifiable 'stream'.
+ // Format the specified 'rhs' to the specified output 'stream' and
+ // return a reference to the modifiable 'stream'.
{
return Locality::print(stream, rhs);
}
@@ -4499,17 +4435,19 @@ struct Locality {
BDLAT_DECL_ENUMERATION_TRAITS(mqbcmd::Locality)
+
namespace mqbcmd {
-// =============
-// class Message
-// =============
+ // =============
+ // class Message
+ // =============
class Message {
+
// INSTANCE DATA
- bsls::Types::Int64 d_sizeBytes;
- bsl::string d_guid;
- bdlt::DatetimeTz d_arrivalTimestamp;
+ bsls::Types::Int64 d_sizeBytes;
+ bsl::string d_guid;
+ bdlt::DatetimeTz d_arrivalTimestamp;
// PRIVATE ACCESSORS
template
@@ -4518,17 +4456,19 @@ class Message {
public:
// TYPES
enum {
- ATTRIBUTE_ID_GUID = 0,
- ATTRIBUTE_ID_SIZE_BYTES = 1,
- ATTRIBUTE_ID_ARRIVAL_TIMESTAMP = 2
+ ATTRIBUTE_ID_GUID = 0
+ , ATTRIBUTE_ID_SIZE_BYTES = 1
+ , ATTRIBUTE_ID_ARRIVAL_TIMESTAMP = 2
};
- enum { NUM_ATTRIBUTES = 3 };
+ enum {
+ NUM_ATTRIBUTES = 3
+ };
enum {
- ATTRIBUTE_INDEX_GUID = 0,
- ATTRIBUTE_INDEX_SIZE_BYTES = 1,
- ATTRIBUTE_INDEX_ARRIVAL_TIMESTAMP = 2
+ ATTRIBUTE_INDEX_GUID = 0
+ , ATTRIBUTE_INDEX_SIZE_BYTES = 1
+ , ATTRIBUTE_INDEX_ARRIVAL_TIMESTAMP = 2
};
// CONSTANTS
@@ -4538,164 +4478,168 @@ class Message {
public:
// CLASS METHODS
- static const bdlat_AttributeInfo* lookupAttributeInfo(int id);
- // Return attribute information for the attribute indicated by the
- // specified 'id' if the attribute exists, and 0 otherwise.
+ static const bdlat_AttributeInfo *lookupAttributeInfo(int id);
+ // Return attribute information for the attribute indicated by the
+ // specified 'id' if the attribute exists, and 0 otherwise.
- static const bdlat_AttributeInfo* lookupAttributeInfo(const char* name,
- int nameLength);
- // Return attribute information for the attribute indicated by the
- // specified 'name' of the specified 'nameLength' if the attribute
- // exists, and 0 otherwise.
+ static const bdlat_AttributeInfo *lookupAttributeInfo(
+ const char *name,
+ int nameLength);
+ // Return attribute information for the attribute indicated by the
+ // specified 'name' of the specified 'nameLength' if the attribute
+ // exists, and 0 otherwise.
// CREATORS
- explicit Message(bslma::Allocator* basicAllocator = 0);
- // Create an object of type 'Message' having the default value. Use
- // the optionally specified 'basicAllocator' to supply memory. If
- // 'basicAllocator' is 0, the currently installed default allocator is
- // used.
-
- Message(const Message& original, bslma::Allocator* basicAllocator = 0);
- // Create an object of type 'Message' having the value of the specified
- // 'original' object. Use the optionally specified 'basicAllocator' to
- // supply memory. If 'basicAllocator' is 0, the currently installed
- // default allocator is used.
-
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ explicit Message(bslma::Allocator *basicAllocator = 0);
+ // Create an object of type 'Message' having the default value. Use
+ // the optionally specified 'basicAllocator' to supply memory. If
+ // 'basicAllocator' is 0, the currently installed default allocator is
+ // used.
+
+ Message(const Message& original,
+ bslma::Allocator *basicAllocator = 0);
+ // Create an object of type 'Message' having the value of the specified
+ // 'original' object. Use the optionally specified 'basicAllocator' to
+ // supply memory. If 'basicAllocator' is 0, the currently installed
+ // default allocator is used.
+
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Message(Message&& original) noexcept;
- // Create an object of type 'Message' having the value of the specified
- // 'original' object. After performing this action, the 'original'
- // object will be left in a valid, but unspecified state.
+ // Create an object of type 'Message' having the value of the specified
+ // 'original' object. After performing this action, the 'original'
+ // object will be left in a valid, but unspecified state.
- Message(Message&& original, bslma::Allocator* basicAllocator);
- // Create an object of type 'Message' having the value of the specified
- // 'original' object. After performing this action, the 'original'
- // object will be left in a valid, but unspecified state. Use the
- // optionally specified 'basicAllocator' to supply memory. If
- // 'basicAllocator' is 0, the currently installed default allocator is
- // used.
+ Message(Message&& original,
+ bslma::Allocator *basicAllocator);
+ // Create an object of type 'Message' having the value of the specified
+ // 'original' object. After performing this action, the 'original'
+ // object will be left in a valid, but unspecified state. Use the
+ // optionally specified 'basicAllocator' to supply memory. If
+ // 'basicAllocator' is 0, the currently installed default allocator is
+ // used.
#endif
~Message();
- // Destroy this object.
+ // Destroy this object.
// MANIPULATORS
Message& operator=(const Message& rhs);
- // Assign to this object the value of the specified 'rhs' object.
+ // Assign to this object the value of the specified 'rhs' object.
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
Message& operator=(Message&& rhs);
- // Assign to this object the value of the specified 'rhs' object.
- // After performing this action, the 'rhs' object will be left in a
- // valid, but unspecified state.
+ // Assign to this object the value of the specified 'rhs' object.
+ // After performing this action, the 'rhs' object will be left in a
+ // valid, but unspecified state.
#endif
void reset();
- // Reset this object to the default value (i.e., its value upon
- // default construction).
+ // Reset this object to the default value (i.e., its value upon
+ // default construction).
template
int manipulateAttributes(t_MANIPULATOR& manipulator);
- // Invoke the specified 'manipulator' sequentially on the address of
- // each (modifiable) attribute of this object, supplying 'manipulator'
- // with the corresponding attribute information structure until such
- // invocation returns a non-zero value. Return the value from the
- // last invocation of 'manipulator' (i.e., the invocation that
- // terminated the sequence).
+ // Invoke the specified 'manipulator' sequentially on the address of
+ // each (modifiable) attribute of this object, supplying 'manipulator'
+ // with the corresponding attribute information structure until such
+ // invocation returns a non-zero value. Return the value from the
+ // last invocation of 'manipulator' (i.e., the invocation that
+ // terminated the sequence).
template
int manipulateAttribute(t_MANIPULATOR& manipulator, int id);
- // Invoke the specified 'manipulator' on the address of
- // the (modifiable) attribute indicated by the specified 'id',
- // supplying 'manipulator' with the corresponding attribute
- // information structure. Return the value returned from the
- // invocation of 'manipulator' if 'id' identifies an attribute of this
- // class, and -1 otherwise.
-
- template
- int manipulateAttribute(t_MANIPULATOR& manipulator,
- const char* name,
- int nameLength);
- // Invoke the specified 'manipulator' on the address of
- // the (modifiable) attribute indicated by the specified 'name' of the
- // specified 'nameLength', supplying 'manipulator' with the
- // corresponding attribute information structure. Return the value
- // returned from the invocation of 'manipulator' if 'name' identifies
- // an attribute of this class, and -1 otherwise.
+ // Invoke the specified 'manipulator' on the address of
+ // the (modifiable) attribute indicated by the specified 'id',
+ // supplying 'manipulator' with the corresponding attribute
+ // information structure. Return the value returned from the
+ // invocation of 'manipulator' if 'id' identifies an attribute of this
+ // class, and -1 otherwise.
+
+ template
+ int manipulateAttribute(t_MANIPULATOR& manipulator,
+ const char *name,
+ int nameLength);
+ // Invoke the specified 'manipulator' on the address of
+ // the (modifiable) attribute indicated by the specified 'name' of the
+ // specified 'nameLength', supplying 'manipulator' with the
+ // corresponding attribute information structure. Return the value
+ // returned from the invocation of 'manipulator' if 'name' identifies
+ // an attribute of this class, and -1 otherwise.
bsl::string& guid();
- // Return a reference to the modifiable "Guid" attribute of this
- // object.
+ // Return a reference to the modifiable "Guid" attribute of this
+ // object.
bsls::Types::Int64& sizeBytes();
- // Return a reference to the modifiable "SizeBytes" attribute of this
- // object.
+ // Return a reference to the modifiable "SizeBytes" attribute of this
+ // object.
bdlt::DatetimeTz& arrivalTimestamp();
- // Return a reference to the modifiable "ArrivalTimestamp" attribute of
- // this object.
+ // Return a reference to the modifiable "ArrivalTimestamp" attribute of
+ // this object.
// ACCESSORS
- bsl::ostream&
- print(bsl::ostream& stream, int level = 0, int spacesPerLevel = 4) const;
- // Format this object to the specified output 'stream' at the
- // optionally specified indentation 'level' and return a reference to
- // the modifiable 'stream'. If 'level' is specified, optionally
- // specify 'spacesPerLevel', the number of spaces per indentation level
- // for this and all of its nested objects. Each line is indented by
- // the absolute value of 'level * spacesPerLevel'. If 'level' is
- // negative, suppress indentation of the first line. If
- // 'spacesPerLevel' is negative, suppress line breaks and format the
- // entire output on one line. If 'stream' is initially invalid, this
- // operation has no effect. Note that a trailing newline is provided
- // in multiline mode only.
+ bsl::ostream& print(bsl::ostream& stream,
+ int level = 0,
+ int spacesPerLevel = 4) const;
+ // Format this object to the specified output 'stream' at the
+ // optionally specified indentation 'level' and return a reference to
+ // the modifiable 'stream'. If 'level' is specified, optionally
+ // specify 'spacesPerLevel', the number of spaces per indentation level
+ // for this and all of its nested objects. Each line is indented by
+ // the absolute value of 'level * spacesPerLevel'. If 'level' is
+ // negative, suppress indentation of the first line. If
+ // 'spacesPerLevel' is negative, suppress line breaks and format the
+ // entire output on one line. If 'stream' is initially invalid, this
+ // operation has no effect. Note that a trailing newline is provided
+ // in multiline mode only.
template
int accessAttributes(t_ACCESSOR& accessor) const;
- // Invoke the specified 'accessor' sequentially on each
- // (non-modifiable) attribute of this object, supplying 'accessor'
- // with the corresponding attribute information structure until such
- // invocation returns a non-zero value. Return the value from the
- // last invocation of 'accessor' (i.e., the invocation that terminated
- // the sequence).
+ // Invoke the specified 'accessor' sequentially on each
+ // (non-modifiable) attribute of this object, supplying 'accessor'
+ // with the corresponding attribute information structure until such
+ // invocation returns a non-zero value. Return the value from the
+ // last invocation of 'accessor' (i.e., the invocation that terminated
+ // the sequence).
template
int accessAttribute(t_ACCESSOR& accessor, int id) const;
- // Invoke the specified 'accessor' on the (non-modifiable) attribute
- // of this object indicated by the specified 'id', supplying 'accessor'
- // with the corresponding attribute information structure. Return the
- // value returned from the invocation of 'accessor' if 'id' identifies
- // an attribute of this class, and -1 otherwise.
+ // Invoke the specified 'accessor' on the (non-modifiable) attribute
+ // of this object indicated by the specified 'id', supplying 'accessor'
+ // with the corresponding attribute information structure. Return the
+ // value returned from the invocation of 'accessor' if 'id' identifies
+ // an attribute of this class, and -1 otherwise.
template
- int accessAttribute(t_ACCESSOR& accessor,
- const char* name,
+ int accessAttribute(t_ACCESSOR& accessor,
+ const char *name,
int nameLength) const;
- // Invoke the specified 'accessor' on the (non-modifiable) attribute
- // of this object indicated by the specified 'name' of the specified
- // 'nameLength', supplying 'accessor' with the corresponding attribute
- // information structure. Return the value returned from the
- // invocation of 'accessor' if 'name' identifies an attribute of this
- // class, and -1 otherwise.
+ // Invoke the specified 'accessor' on the (non-modifiable) attribute
+ // of this object indicated by the specified 'name' of the specified
+ // 'nameLength', supplying 'accessor' with the corresponding attribute
+ // information structure. Return the value returned from the
+ // invocation of 'accessor' if 'name' identifies an attribute of this
+ // class, and -1 otherwise.
const bsl::string& guid() const;
- // Return a reference offering non-modifiable access to the "Guid"
- // attribute of this object.
+ // Return a reference offering non-modifiable access to the "Guid"
+ // attribute of this object.
bsls::Types::Int64 sizeBytes() const;
- // Return the value of the "SizeBytes" attribute of this object.
+ // Return the value of the "SizeBytes" attribute of this object.
const bdlt::DatetimeTz& arrivalTimestamp() const;
- // Return a reference offering non-modifiable access to the
- // "ArrivalTimestamp" attribute of this object.
+ // Return a reference offering non-modifiable access to the
+ // "ArrivalTimestamp" attribute of this object.
// HIDDEN FRIENDS
friend bool operator==(const Message& lhs, const Message& rhs)
- // Return 'true' if the specified 'lhs' and 'rhs' attribute objects
- // have the same value, and 'false' otherwise. Two attribute objects
- // have the same value if each respective attribute has the same value.
+ // Return 'true' if the specified 'lhs' and 'rhs' attribute objects
+ // have the same value, and 'false' otherwise. Two attribute objects
+ // have the same value if each respective attribute has the same value.
{
return lhs.guid() == rhs.guid() &&
lhs.sizeBytes() == rhs.sizeBytes() &&
@@ -4703,23 +4647,23 @@ class Message {
}
friend bool operator!=(const Message& lhs, const Message& rhs)
- // Returns '!(lhs == rhs)'
+ // Returns '!(lhs == rhs)'
{
return !(lhs == rhs);
}
friend bsl::ostream& operator<<(bsl::ostream& stream, const Message& rhs)
- // Format the specified 'rhs' to the specified output 'stream' and
- // return a reference to the modifiable 'stream'.
+ // Format the specified 'rhs' to the specified output 'stream' and
+ // return a reference to the modifiable 'stream'.
{
return rhs.print(stream, 0, -1);
}
template
friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const Message& object)
- // Pass the specified 'object' to the specified 'hashAlg'. This
- // function integrates with the 'bslh' modular hashing system and
- // effectively provides a 'bsl::hash' specialization for 'Message'.
+ // Pass the specified 'object' to the specified 'hashAlg'. This
+ // function integrates with the 'bslh' modular hashing system and
+ // effectively provides a 'bsl::hash' specialization for 'Message'.
{
object.hashAppendImpl(hashAlg);
}
@@ -4733,9 +4677,9 @@ BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::Message)
namespace mqbcmd {
-// ================
-// class NodeStatus
-// ================
+ // ================
+ // class NodeStatus
+ // ================
struct NodeStatus {
// Enumeration of the various node states.
@@ -4743,14 +4687,16 @@ struct NodeStatus {
public:
// TYPES
enum Value {
- E_UNKNOWN = 0,
- E_STARTING = 10,
- E_AVAILABLE = 20,
- E_STOPPING = 30,
- E_UNAVAILABLE = 40
+ E_UNKNOWN = 0
+ , E_STARTING = 10
+ , E_AVAILABLE = 20
+ , E_STOPPING = 30
+ , E_UNAVAILABLE = 40
};
- enum { NUM_ENUMERATORS = 5 };
+ enum {
+ NUM_ENUMERATORS = 5
+ };
// CONSTANTS
static const char CLASS_NAME[];
@@ -4758,37 +4704,40 @@ struct NodeStatus {
static const bdlat_EnumeratorInfo ENUMERATOR_INFO_ARRAY[];
// CLASS METHODS
- static const char* toString(Value value);
- // Return the string representation exactly matching the enumerator
- // name corresponding to the specified enumeration 'value'.
-
- static int fromString(Value* result, const char* string, int stringLength);
- // Load into the specified 'result' the enumerator matching the
- // specified 'string' of the specified 'stringLength'. Return 0 on
- // success, and a non-zero value with no effect on 'result' otherwise
- // (i.e., 'string' does not match any enumerator).
-
- static int fromString(Value* result, const bsl::string& string);
- // Load into the specified 'result' the enumerator matching the
- // specified 'string'. Return 0 on success, and a non-zero value with
- // no effect on 'result' otherwise (i.e., 'string' does not match any
- // enumerator).
-
- static int fromInt(Value* result, int number);
- // Load into the specified 'result' the enumerator matching the
- // specified 'number'. Return 0 on success, and a non-zero value with
- // no effect on 'result' otherwise (i.e., 'number' does not match any
- // enumerator).
+ static const char *toString(Value value);
+ // Return the string representation exactly matching the enumerator
+ // name corresponding to the specified enumeration 'value'.
+
+ static int fromString(Value *result,
+ const char *string,
+ int stringLength);
+ // Load into the specified 'result' the enumerator matching the
+ // specified 'string' of the specified 'stringLength'. Return 0 on
+ // success, and a non-zero value with no effect on 'result' otherwise
+ // (i.e., 'string' does not match any enumerator).
+
+ static int fromString(Value *result,
+ const bsl::string& string);
+ // Load into the specified 'result' the enumerator matching the
+ // specified 'string'. Return 0 on success, and a non-zero value with
+ // no effect on 'result' otherwise (i.e., 'string' does not match any
+ // enumerator).
+
+ static int fromInt(Value *result, int number);
+ // Load into the specified 'result' the enumerator matching the
+ // specified 'number'. Return 0 on success, and a non-zero value with
+ // no effect on 'result' otherwise (i.e., 'number' does not match any
+ // enumerator).
static bsl::ostream& print(bsl::ostream& stream, Value value);
- // Write to the specified 'stream' the string representation of
- // the specified enumeration 'value'. Return a reference to
- // the modifiable 'stream'.
+ // Write to the specified 'stream' the string representation of
+ // the specified enumeration 'value'. Return a reference to
+ // the modifiable 'stream'.
// HIDDEN FRIENDS
friend bsl::ostream& operator<<(bsl::ostream& stream, Value rhs)
- // Format the specified 'rhs' to the specified output 'stream' and
- // return a reference to the modifiable 'stream'.
+ // Format the specified 'rhs' to the specified output 'stream' and
+ // return a reference to the modifiable 'stream'.
{
return NodeStatus::print(stream, rhs);
}
@@ -4800,18 +4749,26 @@ struct NodeStatus {
BDLAT_DECL_ENUMERATION_TRAITS(mqbcmd::NodeStatus)
+
namespace mqbcmd {
-// ===================
-// class PrimaryStatus
-// ===================
+ // ===================
+ // class PrimaryStatus
+ // ===================
struct PrimaryStatus {
+
public:
// TYPES
- enum Value { UNDEFINED = 0, PASSIVE = 1, ACTIVE = 5 };
+ enum Value {
+ UNDEFINED = 0
+ , PASSIVE = 1
+ , ACTIVE = 5
+ };
- enum { NUM_ENUMERATORS = 3 };
+ enum {
+ NUM_ENUMERATORS = 3
+ };
// CONSTANTS
static const char CLASS_NAME[];
@@ -4819,37 +4776,40 @@ struct PrimaryStatus {
static const bdlat_EnumeratorInfo ENUMERATOR_INFO_ARRAY[];
// CLASS METHODS
- static const char* toString(Value value);
- // Return the string representation exactly matching the enumerator
- // name corresponding to the specified enumeration 'value'.
-
- static int fromString(Value* result, const char* string, int stringLength);
- // Load into the specified 'result' the enumerator matching the
- // specified 'string' of the specified 'stringLength'. Return 0 on
- // success, and a non-zero value with no effect on 'result' otherwise
- // (i.e., 'string' does not match any enumerator).
-
- static int fromString(Value* result, const bsl::string& string);
- // Load into the specified 'result' the enumerator matching the
- // specified 'string'. Return 0 on success, and a non-zero value with
- // no effect on 'result' otherwise (i.e., 'string' does not match any
- // enumerator).
-
- static int fromInt(Value* result, int number);
- // Load into the specified 'result' the enumerator matching the
- // specified 'number'. Return 0 on success, and a non-zero value with
- // no effect on 'result' otherwise (i.e., 'number' does not match any
- // enumerator).
+ static const char *toString(Value value);
+ // Return the string representation exactly matching the enumerator
+ // name corresponding to the specified enumeration 'value'.
+
+ static int fromString(Value *result,
+ const char *string,
+ int stringLength);
+ // Load into the specified 'result' the enumerator matching the
+ // specified 'string' of the specified 'stringLength'. Return 0 on
+ // success, and a non-zero value with no effect on 'result' otherwise
+ // (i.e., 'string' does not match any enumerator).
+
+ static int fromString(Value *result,
+ const bsl::string& string);
+ // Load into the specified 'result' the enumerator matching the
+ // specified 'string'. Return 0 on success, and a non-zero value with
+ // no effect on 'result' otherwise (i.e., 'string' does not match any
+ // enumerator).
+
+ static int fromInt(Value *result, int number);
+ // Load into the specified 'result' the enumerator matching the
+ // specified 'number'. Return 0 on success, and a non-zero value with
+ // no effect on 'result' otherwise (i.e., 'number' does not match any
+ // enumerator).
static bsl::ostream& print(bsl::ostream& stream, Value value);
- // Write to the specified 'stream' the string representation of
- // the specified enumeration 'value'. Return a reference to
- // the modifiable 'stream'.
+ // Write to the specified 'stream' the string representation of
+ // the specified enumeration 'value'. Return a reference to
+ // the modifiable 'stream'.
// HIDDEN FRIENDS
friend bsl::ostream& operator<<(bsl::ostream& stream, Value rhs)
- // Format the specified 'rhs' to the specified output 'stream' and
- // return a reference to the modifiable 'stream'.
+ // Format the specified 'rhs' to the specified output 'stream' and
+ // return a reference to the modifiable 'stream'.
{
return PrimaryStatus::print(stream, rhs);
}
@@ -4861,19 +4821,21 @@ struct PrimaryStatus {
BDLAT_DECL_ENUMERATION_TRAITS(mqbcmd::PrimaryStatus)
+
namespace mqbcmd {
-// ========================
-// class PurgedQueueDetails
-// ========================
+ // ========================
+ // class PurgedQueueDetails
+ // ========================
class PurgedQueueDetails {
+
// INSTANCE DATA
- bsls::Types::Int64 d_numMessagesPurged;
- bsls::Types::Int64 d_numBytesPurged;
- bsl::string d_queueUri;
- bsl::string d_appId;
- bsl::string d_appKey;
+ bsls::Types::Int64 d_numMessagesPurged;
+ bsls::Types::Int64 d_numBytesPurged;
+ bsl::string d_queueUri;
+ bsl::string d_appId;
+ bsl::string d_appKey;
// PRIVATE ACCESSORS
template
@@ -4884,21 +4846,23 @@ class PurgedQueueDetails {
public:
// TYPES
enum {
- ATTRIBUTE_ID_QUEUE_URI = 0,
- ATTRIBUTE_ID_APP_ID = 1,
- ATTRIBUTE_ID_APP_KEY = 2,
- ATTRIBUTE_ID_NUM_MESSAGES_PURGED = 3,
- ATTRIBUTE_ID_NUM_BYTES_PURGED = 4
+ ATTRIBUTE_ID_QUEUE_URI = 0
+ , ATTRIBUTE_ID_APP_ID = 1
+ , ATTRIBUTE_ID_APP_KEY = 2
+ , ATTRIBUTE_ID_NUM_MESSAGES_PURGED = 3
+ , ATTRIBUTE_ID_NUM_BYTES_PURGED = 4
};
- enum { NUM_ATTRIBUTES = 5 };
+ enum {
+ NUM_ATTRIBUTES = 5
+ };
enum {
- ATTRIBUTE_INDEX_QUEUE_URI = 0,
- ATTRIBUTE_INDEX_APP_ID = 1,
- ATTRIBUTE_INDEX_APP_KEY = 2,
- ATTRIBUTE_INDEX_NUM_MESSAGES_PURGED = 3,
- ATTRIBUTE_INDEX_NUM_BYTES_PURGED = 4
+ ATTRIBUTE_INDEX_QUEUE_URI = 0
+ , ATTRIBUTE_INDEX_APP_ID = 1
+ , ATTRIBUTE_INDEX_APP_KEY = 2
+ , ATTRIBUTE_INDEX_NUM_MESSAGES_PURGED = 3
+ , ATTRIBUTE_INDEX_NUM_BYTES_PURGED = 4
};
// CONSTANTS
@@ -4908,198 +4872,200 @@ class PurgedQueueDetails {
public:
// CLASS METHODS
- static const bdlat_AttributeInfo* lookupAttributeInfo(int id);
- // Return attribute information for the attribute indicated by the
- // specified 'id' if the attribute exists, and 0 otherwise.
+ static const bdlat_AttributeInfo *lookupAttributeInfo(int id);
+ // Return attribute information for the attribute indicated by the
+ // specified 'id' if the attribute exists, and 0 otherwise.
- static const bdlat_AttributeInfo* lookupAttributeInfo(const char* name,
- int nameLength);
- // Return attribute information for the attribute indicated by the
- // specified 'name' of the specified 'nameLength' if the attribute
- // exists, and 0 otherwise.
+ static const bdlat_AttributeInfo *lookupAttributeInfo(
+ const char *name,
+ int nameLength);
+ // Return attribute information for the attribute indicated by the
+ // specified 'name' of the specified 'nameLength' if the attribute
+ // exists, and 0 otherwise.
// CREATORS
- explicit PurgedQueueDetails(bslma::Allocator* basicAllocator = 0);
- // Create an object of type 'PurgedQueueDetails' having the default
- // value. Use the optionally specified 'basicAllocator' to supply
- // memory. If 'basicAllocator' is 0, the currently installed default
- // allocator is used.
+ explicit PurgedQueueDetails(bslma::Allocator *basicAllocator = 0);
+ // Create an object of type 'PurgedQueueDetails' having the default
+ // value. Use the optionally specified 'basicAllocator' to supply
+ // memory. If 'basicAllocator' is 0, the currently installed default
+ // allocator is used.
PurgedQueueDetails(const PurgedQueueDetails& original,
- bslma::Allocator* basicAllocator = 0);
- // Create an object of type 'PurgedQueueDetails' having the value of
- // the specified 'original' object. Use the optionally specified
- // 'basicAllocator' to supply memory. If 'basicAllocator' is 0, the
- // currently installed default allocator is used.
-
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ bslma::Allocator *basicAllocator = 0);
+ // Create an object of type 'PurgedQueueDetails' having the value of
+ // the specified 'original' object. Use the optionally specified
+ // 'basicAllocator' to supply memory. If 'basicAllocator' is 0, the
+ // currently installed default allocator is used.
+
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
PurgedQueueDetails(PurgedQueueDetails&& original) noexcept;
- // Create an object of type 'PurgedQueueDetails' having the value of
- // the specified 'original' object. After performing this action, the
- // 'original' object will be left in a valid, but unspecified state.
+ // Create an object of type 'PurgedQueueDetails' having the value of
+ // the specified 'original' object. After performing this action, the
+ // 'original' object will be left in a valid, but unspecified state.
PurgedQueueDetails(PurgedQueueDetails&& original,
- bslma::Allocator* basicAllocator);
- // Create an object of type 'PurgedQueueDetails' having the value of
- // the specified 'original' object. After performing this action, the
- // 'original' object will be left in a valid, but unspecified state.
- // Use the optionally specified 'basicAllocator' to supply memory. If
- // 'basicAllocator' is 0, the currently installed default allocator is
- // used.
+ bslma::Allocator *basicAllocator);
+ // Create an object of type 'PurgedQueueDetails' having the value of
+ // the specified 'original' object. After performing this action, the
+ // 'original' object will be left in a valid, but unspecified state.
+ // Use the optionally specified 'basicAllocator' to supply memory. If
+ // 'basicAllocator' is 0, the currently installed default allocator is
+ // used.
#endif
~PurgedQueueDetails();
- // Destroy this object.
+ // Destroy this object.
// MANIPULATORS
PurgedQueueDetails& operator=(const PurgedQueueDetails& rhs);
- // Assign to this object the value of the specified 'rhs' object.
+ // Assign to this object the value of the specified 'rhs' object.
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
PurgedQueueDetails& operator=(PurgedQueueDetails&& rhs);
- // Assign to this object the value of the specified 'rhs' object.
- // After performing this action, the 'rhs' object will be left in a
- // valid, but unspecified state.
+ // Assign to this object the value of the specified 'rhs' object.
+ // After performing this action, the 'rhs' object will be left in a
+ // valid, but unspecified state.
#endif
void reset();
- // Reset this object to the default value (i.e., its value upon
- // default construction).
+ // Reset this object to the default value (i.e., its value upon
+ // default construction).
template
int manipulateAttributes(t_MANIPULATOR& manipulator);
- // Invoke the specified 'manipulator' sequentially on the address of
- // each (modifiable) attribute of this object, supplying 'manipulator'
- // with the corresponding attribute information structure until such
- // invocation returns a non-zero value. Return the value from the
- // last invocation of 'manipulator' (i.e., the invocation that
- // terminated the sequence).
+ // Invoke the specified 'manipulator' sequentially on the address of
+ // each (modifiable) attribute of this object, supplying 'manipulator'
+ // with the corresponding attribute information structure until such
+ // invocation returns a non-zero value. Return the value from the
+ // last invocation of 'manipulator' (i.e., the invocation that
+ // terminated the sequence).
template
int manipulateAttribute(t_MANIPULATOR& manipulator, int id);
- // Invoke the specified 'manipulator' on the address of
- // the (modifiable) attribute indicated by the specified 'id',
- // supplying 'manipulator' with the corresponding attribute
- // information structure. Return the value returned from the
- // invocation of 'manipulator' if 'id' identifies an attribute of this
- // class, and -1 otherwise.
-
- template
- int manipulateAttribute(t_MANIPULATOR& manipulator,
- const char* name,
- int nameLength);
- // Invoke the specified 'manipulator' on the address of
- // the (modifiable) attribute indicated by the specified 'name' of the
- // specified 'nameLength', supplying 'manipulator' with the
- // corresponding attribute information structure. Return the value
- // returned from the invocation of 'manipulator' if 'name' identifies
- // an attribute of this class, and -1 otherwise.
+ // Invoke the specified 'manipulator' on the address of
+ // the (modifiable) attribute indicated by the specified 'id',
+ // supplying 'manipulator' with the corresponding attribute
+ // information structure. Return the value returned from the
+ // invocation of 'manipulator' if 'id' identifies an attribute of this
+ // class, and -1 otherwise.
+
+ template
+ int manipulateAttribute(t_MANIPULATOR& manipulator,
+ const char *name,
+ int nameLength);
+ // Invoke the specified 'manipulator' on the address of
+ // the (modifiable) attribute indicated by the specified 'name' of the
+ // specified 'nameLength', supplying 'manipulator' with the
+ // corresponding attribute information structure. Return the value
+ // returned from the invocation of 'manipulator' if 'name' identifies
+ // an attribute of this class, and -1 otherwise.
bsl::string& queueUri();
- // Return a reference to the modifiable "QueueUri" attribute of this
- // object.
+ // Return a reference to the modifiable "QueueUri" attribute of this
+ // object.
bsl::string& appId();
- // Return a reference to the modifiable "AppId" attribute of this
- // object.
+ // Return a reference to the modifiable "AppId" attribute of this
+ // object.
bsl::string& appKey();
- // Return a reference to the modifiable "AppKey" attribute of this
- // object.
+ // Return a reference to the modifiable "AppKey" attribute of this
+ // object.
bsls::Types::Int64& numMessagesPurged();
- // Return a reference to the modifiable "NumMessagesPurged" attribute
- // of this object.
+ // Return a reference to the modifiable "NumMessagesPurged" attribute
+ // of this object.
bsls::Types::Int64& numBytesPurged();
- // Return a reference to the modifiable "NumBytesPurged" attribute of
- // this object.
+ // Return a reference to the modifiable "NumBytesPurged" attribute of
+ // this object.
// ACCESSORS
- bsl::ostream&
- print(bsl::ostream& stream, int level = 0, int spacesPerLevel = 4) const;
- // Format this object to the specified output 'stream' at the
- // optionally specified indentation 'level' and return a reference to
- // the modifiable 'stream'. If 'level' is specified, optionally
- // specify 'spacesPerLevel', the number of spaces per indentation level
- // for this and all of its nested objects. Each line is indented by
- // the absolute value of 'level * spacesPerLevel'. If 'level' is
- // negative, suppress indentation of the first line. If
- // 'spacesPerLevel' is negative, suppress line breaks and format the
- // entire output on one line. If 'stream' is initially invalid, this
- // operation has no effect. Note that a trailing newline is provided
- // in multiline mode only.
+ bsl::ostream& print(bsl::ostream& stream,
+ int level = 0,
+ int spacesPerLevel = 4) const;
+ // Format this object to the specified output 'stream' at the
+ // optionally specified indentation 'level' and return a reference to
+ // the modifiable 'stream'. If 'level' is specified, optionally
+ // specify 'spacesPerLevel', the number of spaces per indentation level
+ // for this and all of its nested objects. Each line is indented by
+ // the absolute value of 'level * spacesPerLevel'. If 'level' is
+ // negative, suppress indentation of the first line. If
+ // 'spacesPerLevel' is negative, suppress line breaks and format the
+ // entire output on one line. If 'stream' is initially invalid, this
+ // operation has no effect. Note that a trailing newline is provided
+ // in multiline mode only.
template
int accessAttributes(t_ACCESSOR& accessor) const;
- // Invoke the specified 'accessor' sequentially on each
- // (non-modifiable) attribute of this object, supplying 'accessor'
- // with the corresponding attribute information structure until such
- // invocation returns a non-zero value. Return the value from the
- // last invocation of 'accessor' (i.e., the invocation that terminated
- // the sequence).
+ // Invoke the specified 'accessor' sequentially on each
+ // (non-modifiable) attribute of this object, supplying 'accessor'
+ // with the corresponding attribute information structure until such
+ // invocation returns a non-zero value. Return the value from the
+ // last invocation of 'accessor' (i.e., the invocation that terminated
+ // the sequence).
template
int accessAttribute(t_ACCESSOR& accessor, int id) const;
- // Invoke the specified 'accessor' on the (non-modifiable) attribute
- // of this object indicated by the specified 'id', supplying 'accessor'
- // with the corresponding attribute information structure. Return the
- // value returned from the invocation of 'accessor' if 'id' identifies
- // an attribute of this class, and -1 otherwise.
+ // Invoke the specified 'accessor' on the (non-modifiable) attribute
+ // of this object indicated by the specified 'id', supplying 'accessor'
+ // with the corresponding attribute information structure. Return the
+ // value returned from the invocation of 'accessor' if 'id' identifies
+ // an attribute of this class, and -1 otherwise.
template
- int accessAttribute(t_ACCESSOR& accessor,
- const char* name,
+ int accessAttribute(t_ACCESSOR& accessor,
+ const char *name,
int nameLength) const;
- // Invoke the specified 'accessor' on the (non-modifiable) attribute
- // of this object indicated by the specified 'name' of the specified
- // 'nameLength', supplying 'accessor' with the corresponding attribute
- // information structure. Return the value returned from the
- // invocation of 'accessor' if 'name' identifies an attribute of this
- // class, and -1 otherwise.
+ // Invoke the specified 'accessor' on the (non-modifiable) attribute
+ // of this object indicated by the specified 'name' of the specified
+ // 'nameLength', supplying 'accessor' with the corresponding attribute
+ // information structure. Return the value returned from the
+ // invocation of 'accessor' if 'name' identifies an attribute of this
+ // class, and -1 otherwise.
const bsl::string& queueUri() const;
- // Return a reference offering non-modifiable access to the "QueueUri"
- // attribute of this object.
+ // Return a reference offering non-modifiable access to the "QueueUri"
+ // attribute of this object.
const bsl::string& appId() const;
- // Return a reference offering non-modifiable access to the "AppId"
- // attribute of this object.
+ // Return a reference offering non-modifiable access to the "AppId"
+ // attribute of this object.
const bsl::string& appKey() const;
- // Return a reference offering non-modifiable access to the "AppKey"
- // attribute of this object.
+ // Return a reference offering non-modifiable access to the "AppKey"
+ // attribute of this object.
bsls::Types::Int64 numMessagesPurged() const;
- // Return the value of the "NumMessagesPurged" attribute of this
- // object.
+ // Return the value of the "NumMessagesPurged" attribute of this
+ // object.
bsls::Types::Int64 numBytesPurged() const;
- // Return the value of the "NumBytesPurged" attribute of this object.
+ // Return the value of the "NumBytesPurged" attribute of this object.
// HIDDEN FRIENDS
friend bool operator==(const PurgedQueueDetails& lhs,
const PurgedQueueDetails& rhs)
- // Return 'true' if the specified 'lhs' and 'rhs' attribute objects
- // have the same value, and 'false' otherwise. Two attribute objects
- // have the same value if each respective attribute has the same value.
+ // Return 'true' if the specified 'lhs' and 'rhs' attribute objects
+ // have the same value, and 'false' otherwise. Two attribute objects
+ // have the same value if each respective attribute has the same value.
{
return lhs.isEqualTo(rhs);
}
friend bool operator!=(const PurgedQueueDetails& lhs,
const PurgedQueueDetails& rhs)
- // Returns '!(lhs == rhs)'
+ // Returns '!(lhs == rhs)'
{
return !(lhs == rhs);
}
friend bsl::ostream& operator<<(bsl::ostream& stream,
const PurgedQueueDetails& rhs)
- // Format the specified 'rhs' to the specified output 'stream' and
- // return a reference to the modifiable 'stream'.
+ // Format the specified 'rhs' to the specified output 'stream' and
+ // return a reference to the modifiable 'stream'.
{
return rhs.print(stream, 0, -1);
}
@@ -5107,10 +5073,10 @@ class PurgedQueueDetails {
template
friend void hashAppend(t_HASH_ALGORITHM& hashAlg,
const PurgedQueueDetails& object)
- // Pass the specified 'object' to the specified 'hashAlg'. This
- // function integrates with the 'bslh' modular hashing system and
- // effectively provides a 'bsl::hash' specialization for
- // 'PurgedQueueDetails'.
+ // Pass the specified 'object' to the specified 'hashAlg'. This
+ // function integrates with the 'bslh' modular hashing system and
+ // effectively provides a 'bsl::hash' specialization for
+ // 'PurgedQueueDetails'.
{
object.hashAppendImpl(hashAlg);
}
@@ -5120,21 +5086,21 @@ class PurgedQueueDetails {
// TRAITS
-BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(
- mqbcmd::PurgedQueueDetails)
+BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::PurgedQueueDetails)
namespace mqbcmd {
-// ===============================
-// class RelayQueueEngineSubStream
-// ===============================
+ // ===============================
+ // class RelayQueueEngineSubStream
+ // ===============================
class RelayQueueEngineSubStream {
+
// INSTANCE DATA
- bsl::string d_appId;
- bsl::string d_appKey;
- // a.k.a. "storage key"
- unsigned int d_numMessages;
+ bsl::string d_appId;
+ bsl::string d_appKey;
+ // a.k.a. "storage key"
+ unsigned int d_numMessages;
// PRIVATE ACCESSORS
template
@@ -5143,17 +5109,19 @@ class RelayQueueEngineSubStream {
public:
// TYPES
enum {
- ATTRIBUTE_ID_APP_ID = 0,
- ATTRIBUTE_ID_APP_KEY = 1,
- ATTRIBUTE_ID_NUM_MESSAGES = 2
+ ATTRIBUTE_ID_APP_ID = 0
+ , ATTRIBUTE_ID_APP_KEY = 1
+ , ATTRIBUTE_ID_NUM_MESSAGES = 2
};
- enum { NUM_ATTRIBUTES = 3 };
+ enum {
+ NUM_ATTRIBUTES = 3
+ };
enum {
- ATTRIBUTE_INDEX_APP_ID = 0,
- ATTRIBUTE_INDEX_APP_KEY = 1,
- ATTRIBUTE_INDEX_NUM_MESSAGES = 2
+ ATTRIBUTE_INDEX_APP_ID = 0
+ , ATTRIBUTE_INDEX_APP_KEY = 1
+ , ATTRIBUTE_INDEX_NUM_MESSAGES = 2
};
// CONSTANTS
@@ -5163,184 +5131,187 @@ class RelayQueueEngineSubStream {
public:
// CLASS METHODS
- static const bdlat_AttributeInfo* lookupAttributeInfo(int id);
- // Return attribute information for the attribute indicated by the
- // specified 'id' if the attribute exists, and 0 otherwise.
+ static const bdlat_AttributeInfo *lookupAttributeInfo(int id);
+ // Return attribute information for the attribute indicated by the
+ // specified 'id' if the attribute exists, and 0 otherwise.
- static const bdlat_AttributeInfo* lookupAttributeInfo(const char* name,
- int nameLength);
- // Return attribute information for the attribute indicated by the
- // specified 'name' of the specified 'nameLength' if the attribute
- // exists, and 0 otherwise.
+ static const bdlat_AttributeInfo *lookupAttributeInfo(
+ const char *name,
+ int nameLength);
+ // Return attribute information for the attribute indicated by the
+ // specified 'name' of the specified 'nameLength' if the attribute
+ // exists, and 0 otherwise.
// CREATORS
- explicit RelayQueueEngineSubStream(bslma::Allocator* basicAllocator = 0);
- // Create an object of type 'RelayQueueEngineSubStream' having the
- // default value. Use the optionally specified 'basicAllocator' to
- // supply memory. If 'basicAllocator' is 0, the currently installed
- // default allocator is used.
+ explicit RelayQueueEngineSubStream(bslma::Allocator *basicAllocator = 0);
+ // Create an object of type 'RelayQueueEngineSubStream' having the
+ // default value. Use the optionally specified 'basicAllocator' to
+ // supply memory. If 'basicAllocator' is 0, the currently installed
+ // default allocator is used.
RelayQueueEngineSubStream(const RelayQueueEngineSubStream& original,
- bslma::Allocator* basicAllocator = 0);
- // Create an object of type 'RelayQueueEngineSubStream' having the
- // value of the specified 'original' object. Use the optionally
- // specified 'basicAllocator' to supply memory. If 'basicAllocator' is
- // 0, the currently installed default allocator is used.
-
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ bslma::Allocator *basicAllocator = 0);
+ // Create an object of type 'RelayQueueEngineSubStream' having the
+ // value of the specified 'original' object. Use the optionally
+ // specified 'basicAllocator' to supply memory. If 'basicAllocator' is
+ // 0, the currently installed default allocator is used.
+
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
RelayQueueEngineSubStream(RelayQueueEngineSubStream&& original) noexcept;
- // Create an object of type 'RelayQueueEngineSubStream' having the
- // value of the specified 'original' object. After performing this
- // action, the 'original' object will be left in a valid, but
- // unspecified state.
+ // Create an object of type 'RelayQueueEngineSubStream' having the
+ // value of the specified 'original' object. After performing this
+ // action, the 'original' object will be left in a valid, but
+ // unspecified state.
RelayQueueEngineSubStream(RelayQueueEngineSubStream&& original,
- bslma::Allocator* basicAllocator);
- // Create an object of type 'RelayQueueEngineSubStream' having the
- // value of the specified 'original' object. After performing this
- // action, the 'original' object will be left in a valid, but
- // unspecified state. Use the optionally specified 'basicAllocator' to
- // supply memory. If 'basicAllocator' is 0, the currently installed
- // default allocator is used.
+ bslma::Allocator *basicAllocator);
+ // Create an object of type 'RelayQueueEngineSubStream' having the
+ // value of the specified 'original' object. After performing this
+ // action, the 'original' object will be left in a valid, but
+ // unspecified state. Use the optionally specified 'basicAllocator' to
+ // supply memory. If 'basicAllocator' is 0, the currently installed
+ // default allocator is used.
#endif
~RelayQueueEngineSubStream();
- // Destroy this object.
+ // Destroy this object.
// MANIPULATORS
RelayQueueEngineSubStream& operator=(const RelayQueueEngineSubStream& rhs);
- // Assign to this object the value of the specified 'rhs' object.
+ // Assign to this object the value of the specified 'rhs' object.
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
RelayQueueEngineSubStream& operator=(RelayQueueEngineSubStream&& rhs);
- // Assign to this object the value of the specified 'rhs' object.
- // After performing this action, the 'rhs' object will be left in a
- // valid, but unspecified state.
+ // Assign to this object the value of the specified 'rhs' object.
+ // After performing this action, the 'rhs' object will be left in a
+ // valid, but unspecified state.
#endif
void reset();
- // Reset this object to the default value (i.e., its value upon
- // default construction).
+ // Reset this object to the default value (i.e., its value upon
+ // default construction).
template
int manipulateAttributes(t_MANIPULATOR& manipulator);
- // Invoke the specified 'manipulator' sequentially on the address of
- // each (modifiable) attribute of this object, supplying 'manipulator'
- // with the corresponding attribute information structure until such
- // invocation returns a non-zero value. Return the value from the
- // last invocation of 'manipulator' (i.e., the invocation that
- // terminated the sequence).
+ // Invoke the specified 'manipulator' sequentially on the address of
+ // each (modifiable) attribute of this object, supplying 'manipulator'
+ // with the corresponding attribute information structure until such
+ // invocation returns a non-zero value. Return the value from the
+ // last invocation of 'manipulator' (i.e., the invocation that
+ // terminated the sequence).
template
int manipulateAttribute(t_MANIPULATOR& manipulator, int id);
- // Invoke the specified 'manipulator' on the address of
- // the (modifiable) attribute indicated by the specified 'id',
- // supplying 'manipulator' with the corresponding attribute
- // information structure. Return the value returned from the
- // invocation of 'manipulator' if 'id' identifies an attribute of this
- // class, and -1 otherwise.
-
- template
- int manipulateAttribute(t_MANIPULATOR& manipulator,
- const char* name,
- int nameLength);
- // Invoke the specified 'manipulator' on the address of
- // the (modifiable) attribute indicated by the specified 'name' of the
- // specified 'nameLength', supplying 'manipulator' with the
- // corresponding attribute information structure. Return the value
- // returned from the invocation of 'manipulator' if 'name' identifies
- // an attribute of this class, and -1 otherwise.
+ // Invoke the specified 'manipulator' on the address of
+ // the (modifiable) attribute indicated by the specified 'id',
+ // supplying 'manipulator' with the corresponding attribute
+ // information structure. Return the value returned from the
+ // invocation of 'manipulator' if 'id' identifies an attribute of this
+ // class, and -1 otherwise.
+
+ template
+ int manipulateAttribute(t_MANIPULATOR& manipulator,
+ const char *name,
+ int nameLength);
+ // Invoke the specified 'manipulator' on the address of
+ // the (modifiable) attribute indicated by the specified 'name' of the
+ // specified 'nameLength', supplying 'manipulator' with the
+ // corresponding attribute information structure. Return the value
+ // returned from the invocation of 'manipulator' if 'name' identifies
+ // an attribute of this class, and -1 otherwise.
bsl::string& appId();
- // Return a reference to the modifiable "AppId" attribute of this
- // object.
+ // Return a reference to the modifiable "AppId" attribute of this
+ // object.
bsl::string& appKey();
- // Return a reference to the modifiable "AppKey" attribute of this
- // object.
+ // Return a reference to the modifiable "AppKey" attribute of this
+ // object.
unsigned int& numMessages();
- // Return a reference to the modifiable "NumMessages" attribute of this
- // object.
+ // Return a reference to the modifiable "NumMessages" attribute of this
+ // object.
// ACCESSORS
- bsl::ostream&
- print(bsl::ostream& stream, int level = 0, int spacesPerLevel = 4) const;
- // Format this object to the specified output 'stream' at the
- // optionally specified indentation 'level' and return a reference to
- // the modifiable 'stream'. If 'level' is specified, optionally
- // specify 'spacesPerLevel', the number of spaces per indentation level
- // for this and all of its nested objects. Each line is indented by
- // the absolute value of 'level * spacesPerLevel'. If 'level' is
- // negative, suppress indentation of the first line. If
- // 'spacesPerLevel' is negative, suppress line breaks and format the
- // entire output on one line. If 'stream' is initially invalid, this
- // operation has no effect. Note that a trailing newline is provided
- // in multiline mode only.
+ bsl::ostream& print(bsl::ostream& stream,
+ int level = 0,
+ int spacesPerLevel = 4) const;
+ // Format this object to the specified output 'stream' at the
+ // optionally specified indentation 'level' and return a reference to
+ // the modifiable 'stream'. If 'level' is specified, optionally
+ // specify 'spacesPerLevel', the number of spaces per indentation level
+ // for this and all of its nested objects. Each line is indented by
+ // the absolute value of 'level * spacesPerLevel'. If 'level' is
+ // negative, suppress indentation of the first line. If
+ // 'spacesPerLevel' is negative, suppress line breaks and format the
+ // entire output on one line. If 'stream' is initially invalid, this
+ // operation has no effect. Note that a trailing newline is provided
+ // in multiline mode only.
template
int accessAttributes(t_ACCESSOR& accessor) const;
- // Invoke the specified 'accessor' sequentially on each
- // (non-modifiable) attribute of this object, supplying 'accessor'
- // with the corresponding attribute information structure until such
- // invocation returns a non-zero value. Return the value from the
- // last invocation of 'accessor' (i.e., the invocation that terminated
- // the sequence).
+ // Invoke the specified 'accessor' sequentially on each
+ // (non-modifiable) attribute of this object, supplying 'accessor'
+ // with the corresponding attribute information structure until such
+ // invocation returns a non-zero value. Return the value from the
+ // last invocation of 'accessor' (i.e., the invocation that terminated
+ // the sequence).
template
int accessAttribute(t_ACCESSOR& accessor, int id) const;
- // Invoke the specified 'accessor' on the (non-modifiable) attribute
- // of this object indicated by the specified 'id', supplying 'accessor'
- // with the corresponding attribute information structure. Return the
- // value returned from the invocation of 'accessor' if 'id' identifies
- // an attribute of this class, and -1 otherwise.
+ // Invoke the specified 'accessor' on the (non-modifiable) attribute
+ // of this object indicated by the specified 'id', supplying 'accessor'
+ // with the corresponding attribute information structure. Return the
+ // value returned from the invocation of 'accessor' if 'id' identifies
+ // an attribute of this class, and -1 otherwise.
template
- int accessAttribute(t_ACCESSOR& accessor,
- const char* name,
+ int accessAttribute(t_ACCESSOR& accessor,
+ const char *name,
int nameLength) const;
- // Invoke the specified 'accessor' on the (non-modifiable) attribute
- // of this object indicated by the specified 'name' of the specified
- // 'nameLength', supplying 'accessor' with the corresponding attribute
- // information structure. Return the value returned from the
- // invocation of 'accessor' if 'name' identifies an attribute of this
- // class, and -1 otherwise.
+ // Invoke the specified 'accessor' on the (non-modifiable) attribute
+ // of this object indicated by the specified 'name' of the specified
+ // 'nameLength', supplying 'accessor' with the corresponding attribute
+ // information structure. Return the value returned from the
+ // invocation of 'accessor' if 'name' identifies an attribute of this
+ // class, and -1 otherwise.
const bsl::string& appId() const;
- // Return a reference offering non-modifiable access to the "AppId"
- // attribute of this object.
+ // Return a reference offering non-modifiable access to the "AppId"
+ // attribute of this object.
const bsl::string& appKey() const;
- // Return a reference offering non-modifiable access to the "AppKey"
- // attribute of this object.
+ // Return a reference offering non-modifiable access to the "AppKey"
+ // attribute of this object.
unsigned int numMessages() const;
- // Return the value of the "NumMessages" attribute of this object.
+ // Return the value of the "NumMessages" attribute of this object.
// HIDDEN FRIENDS
friend bool operator==(const RelayQueueEngineSubStream& lhs,
const RelayQueueEngineSubStream& rhs)
- // Return 'true' if the specified 'lhs' and 'rhs' attribute objects
- // have the same value, and 'false' otherwise. Two attribute objects
- // have the same value if each respective attribute has the same value.
+ // Return 'true' if the specified 'lhs' and 'rhs' attribute objects
+ // have the same value, and 'false' otherwise. Two attribute objects
+ // have the same value if each respective attribute has the same value.
{
- return lhs.appId() == rhs.appId() && lhs.appKey() == rhs.appKey() &&
+ return lhs.appId() == rhs.appId() &&
+ lhs.appKey() == rhs.appKey() &&
lhs.numMessages() == rhs.numMessages();
}
friend bool operator!=(const RelayQueueEngineSubStream& lhs,
const RelayQueueEngineSubStream& rhs)
- // Returns '!(lhs == rhs)'
+ // Returns '!(lhs == rhs)'
{
return !(lhs == rhs);
}
friend bsl::ostream& operator<<(bsl::ostream& stream,
const RelayQueueEngineSubStream& rhs)
- // Format the specified 'rhs' to the specified output 'stream' and
- // return a reference to the modifiable 'stream'.
+ // Format the specified 'rhs' to the specified output 'stream' and
+ // return a reference to the modifiable 'stream'.
{
return rhs.print(stream, 0, -1);
}
@@ -5348,10 +5319,10 @@ class RelayQueueEngineSubStream {
template
friend void hashAppend(t_HASH_ALGORITHM& hashAlg,
const RelayQueueEngineSubStream& object)
- // Pass the specified 'object' to the specified 'hashAlg'. This
- // function integrates with the 'bslh' modular hashing system and
- // effectively provides a 'bsl::hash' specialization for
- // 'RelayQueueEngineSubStream'.
+ // Pass the specified 'object' to the specified 'hashAlg'. This
+ // function integrates with the 'bslh' modular hashing system and
+ // effectively provides a 'bsl::hash' specialization for
+ // 'RelayQueueEngineSubStream'.
{
object.hashAppendImpl(hashAlg);
}
@@ -5361,20 +5332,20 @@ class RelayQueueEngineSubStream {
// TRAITS
-BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(
- mqbcmd::RelayQueueEngineSubStream)
+BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::RelayQueueEngineSubStream)
namespace mqbcmd {
-// ======================
-// class RemoteStreamInfo
-// ======================
+ // ======================
+ // class RemoteStreamInfo
+ // ======================
class RemoteStreamInfo {
+
// INSTANCE DATA
- bsls::Types::Int64 d_genCount;
- bsl::string d_state;
- int d_id;
+ bsls::Types::Int64 d_genCount;
+ bsl::string d_state;
+ int d_id;
// PRIVATE ACCESSORS
template
@@ -5383,17 +5354,19 @@ class RemoteStreamInfo {
public:
// TYPES
enum {
- ATTRIBUTE_ID_ID = 0,
- ATTRIBUTE_ID_STATE = 1,
- ATTRIBUTE_ID_GEN_COUNT = 2
+ ATTRIBUTE_ID_ID = 0
+ , ATTRIBUTE_ID_STATE = 1
+ , ATTRIBUTE_ID_GEN_COUNT = 2
};
- enum { NUM_ATTRIBUTES = 3 };
+ enum {
+ NUM_ATTRIBUTES = 3
+ };
enum {
- ATTRIBUTE_INDEX_ID = 0,
- ATTRIBUTE_INDEX_STATE = 1,
- ATTRIBUTE_INDEX_GEN_COUNT = 2
+ ATTRIBUTE_INDEX_ID = 0
+ , ATTRIBUTE_INDEX_STATE = 1
+ , ATTRIBUTE_INDEX_GEN_COUNT = 2
};
// CONSTANTS
@@ -5403,181 +5376,184 @@ class RemoteStreamInfo {
public:
// CLASS METHODS
- static const bdlat_AttributeInfo* lookupAttributeInfo(int id);
- // Return attribute information for the attribute indicated by the
- // specified 'id' if the attribute exists, and 0 otherwise.
+ static const bdlat_AttributeInfo *lookupAttributeInfo(int id);
+ // Return attribute information for the attribute indicated by the
+ // specified 'id' if the attribute exists, and 0 otherwise.
- static const bdlat_AttributeInfo* lookupAttributeInfo(const char* name,
- int nameLength);
- // Return attribute information for the attribute indicated by the
- // specified 'name' of the specified 'nameLength' if the attribute
- // exists, and 0 otherwise.
+ static const bdlat_AttributeInfo *lookupAttributeInfo(
+ const char *name,
+ int nameLength);
+ // Return attribute information for the attribute indicated by the
+ // specified 'name' of the specified 'nameLength' if the attribute
+ // exists, and 0 otherwise.
// CREATORS
- explicit RemoteStreamInfo(bslma::Allocator* basicAllocator = 0);
- // Create an object of type 'RemoteStreamInfo' having the default
- // value. Use the optionally specified 'basicAllocator' to supply
- // memory. If 'basicAllocator' is 0, the currently installed default
- // allocator is used.
+ explicit RemoteStreamInfo(bslma::Allocator *basicAllocator = 0);
+ // Create an object of type 'RemoteStreamInfo' having the default
+ // value. Use the optionally specified 'basicAllocator' to supply
+ // memory. If 'basicAllocator' is 0, the currently installed default
+ // allocator is used.
RemoteStreamInfo(const RemoteStreamInfo& original,
- bslma::Allocator* basicAllocator = 0);
- // Create an object of type 'RemoteStreamInfo' having the value of the
- // specified 'original' object. Use the optionally specified
- // 'basicAllocator' to supply memory. If 'basicAllocator' is 0, the
- // currently installed default allocator is used.
-
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ bslma::Allocator *basicAllocator = 0);
+ // Create an object of type 'RemoteStreamInfo' having the value of the
+ // specified 'original' object. Use the optionally specified
+ // 'basicAllocator' to supply memory. If 'basicAllocator' is 0, the
+ // currently installed default allocator is used.
+
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
RemoteStreamInfo(RemoteStreamInfo&& original) noexcept;
- // Create an object of type 'RemoteStreamInfo' having the value of the
- // specified 'original' object. After performing this action, the
- // 'original' object will be left in a valid, but unspecified state.
+ // Create an object of type 'RemoteStreamInfo' having the value of the
+ // specified 'original' object. After performing this action, the
+ // 'original' object will be left in a valid, but unspecified state.
RemoteStreamInfo(RemoteStreamInfo&& original,
- bslma::Allocator* basicAllocator);
- // Create an object of type 'RemoteStreamInfo' having the value of the
- // specified 'original' object. After performing this action, the
- // 'original' object will be left in a valid, but unspecified state.
- // Use the optionally specified 'basicAllocator' to supply memory. If
- // 'basicAllocator' is 0, the currently installed default allocator is
- // used.
+ bslma::Allocator *basicAllocator);
+ // Create an object of type 'RemoteStreamInfo' having the value of the
+ // specified 'original' object. After performing this action, the
+ // 'original' object will be left in a valid, but unspecified state.
+ // Use the optionally specified 'basicAllocator' to supply memory. If
+ // 'basicAllocator' is 0, the currently installed default allocator is
+ // used.
#endif
~RemoteStreamInfo();
- // Destroy this object.
+ // Destroy this object.
// MANIPULATORS
RemoteStreamInfo& operator=(const RemoteStreamInfo& rhs);
- // Assign to this object the value of the specified 'rhs' object.
+ // Assign to this object the value of the specified 'rhs' object.
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
RemoteStreamInfo& operator=(RemoteStreamInfo&& rhs);
- // Assign to this object the value of the specified 'rhs' object.
- // After performing this action, the 'rhs' object will be left in a
- // valid, but unspecified state.
+ // Assign to this object the value of the specified 'rhs' object.
+ // After performing this action, the 'rhs' object will be left in a
+ // valid, but unspecified state.
#endif
void reset();
- // Reset this object to the default value (i.e., its value upon
- // default construction).
+ // Reset this object to the default value (i.e., its value upon
+ // default construction).
template
int manipulateAttributes(t_MANIPULATOR& manipulator);
- // Invoke the specified 'manipulator' sequentially on the address of
- // each (modifiable) attribute of this object, supplying 'manipulator'
- // with the corresponding attribute information structure until such
- // invocation returns a non-zero value. Return the value from the
- // last invocation of 'manipulator' (i.e., the invocation that
- // terminated the sequence).
+ // Invoke the specified 'manipulator' sequentially on the address of
+ // each (modifiable) attribute of this object, supplying 'manipulator'
+ // with the corresponding attribute information structure until such
+ // invocation returns a non-zero value. Return the value from the
+ // last invocation of 'manipulator' (i.e., the invocation that
+ // terminated the sequence).
template
int manipulateAttribute(t_MANIPULATOR& manipulator, int id);
- // Invoke the specified 'manipulator' on the address of
- // the (modifiable) attribute indicated by the specified 'id',
- // supplying 'manipulator' with the corresponding attribute
- // information structure. Return the value returned from the
- // invocation of 'manipulator' if 'id' identifies an attribute of this
- // class, and -1 otherwise.
-
- template
- int manipulateAttribute(t_MANIPULATOR& manipulator,
- const char* name,
- int nameLength);
- // Invoke the specified 'manipulator' on the address of
- // the (modifiable) attribute indicated by the specified 'name' of the
- // specified 'nameLength', supplying 'manipulator' with the
- // corresponding attribute information structure. Return the value
- // returned from the invocation of 'manipulator' if 'name' identifies
- // an attribute of this class, and -1 otherwise.
+ // Invoke the specified 'manipulator' on the address of
+ // the (modifiable) attribute indicated by the specified 'id',
+ // supplying 'manipulator' with the corresponding attribute
+ // information structure. Return the value returned from the
+ // invocation of 'manipulator' if 'id' identifies an attribute of this
+ // class, and -1 otherwise.
+
+ template
+ int manipulateAttribute(t_MANIPULATOR& manipulator,
+ const char *name,
+ int nameLength);
+ // Invoke the specified 'manipulator' on the address of
+ // the (modifiable) attribute indicated by the specified 'name' of the
+ // specified 'nameLength', supplying 'manipulator' with the
+ // corresponding attribute information structure. Return the value
+ // returned from the invocation of 'manipulator' if 'name' identifies
+ // an attribute of this class, and -1 otherwise.
int& id();
- // Return a reference to the modifiable "Id" attribute of this object.
+ // Return a reference to the modifiable "Id" attribute of this object.
bsl::string& state();
- // Return a reference to the modifiable "State" attribute of this
- // object.
+ // Return a reference to the modifiable "State" attribute of this
+ // object.
bsls::Types::Int64& genCount();
- // Return a reference to the modifiable "GenCount" attribute of this
- // object.
+ // Return a reference to the modifiable "GenCount" attribute of this
+ // object.
// ACCESSORS
- bsl::ostream&
- print(bsl::ostream& stream, int level = 0, int spacesPerLevel = 4) const;
- // Format this object to the specified output 'stream' at the
- // optionally specified indentation 'level' and return a reference to
- // the modifiable 'stream'. If 'level' is specified, optionally
- // specify 'spacesPerLevel', the number of spaces per indentation level
- // for this and all of its nested objects. Each line is indented by
- // the absolute value of 'level * spacesPerLevel'. If 'level' is
- // negative, suppress indentation of the first line. If
- // 'spacesPerLevel' is negative, suppress line breaks and format the
- // entire output on one line. If 'stream' is initially invalid, this
- // operation has no effect. Note that a trailing newline is provided
- // in multiline mode only.
+ bsl::ostream& print(bsl::ostream& stream,
+ int level = 0,
+ int spacesPerLevel = 4) const;
+ // Format this object to the specified output 'stream' at the
+ // optionally specified indentation 'level' and return a reference to
+ // the modifiable 'stream'. If 'level' is specified, optionally
+ // specify 'spacesPerLevel', the number of spaces per indentation level
+ // for this and all of its nested objects. Each line is indented by
+ // the absolute value of 'level * spacesPerLevel'. If 'level' is
+ // negative, suppress indentation of the first line. If
+ // 'spacesPerLevel' is negative, suppress line breaks and format the
+ // entire output on one line. If 'stream' is initially invalid, this
+ // operation has no effect. Note that a trailing newline is provided
+ // in multiline mode only.
template
int accessAttributes(t_ACCESSOR& accessor) const;
- // Invoke the specified 'accessor' sequentially on each
- // (non-modifiable) attribute of this object, supplying 'accessor'
- // with the corresponding attribute information structure until such
- // invocation returns a non-zero value. Return the value from the
- // last invocation of 'accessor' (i.e., the invocation that terminated
- // the sequence).
+ // Invoke the specified 'accessor' sequentially on each
+ // (non-modifiable) attribute of this object, supplying 'accessor'
+ // with the corresponding attribute information structure until such
+ // invocation returns a non-zero value. Return the value from the
+ // last invocation of 'accessor' (i.e., the invocation that terminated
+ // the sequence).
template
int accessAttribute(t_ACCESSOR& accessor, int id) const;
- // Invoke the specified 'accessor' on the (non-modifiable) attribute
- // of this object indicated by the specified 'id', supplying 'accessor'
- // with the corresponding attribute information structure. Return the
- // value returned from the invocation of 'accessor' if 'id' identifies
- // an attribute of this class, and -1 otherwise.
+ // Invoke the specified 'accessor' on the (non-modifiable) attribute
+ // of this object indicated by the specified 'id', supplying 'accessor'
+ // with the corresponding attribute information structure. Return the
+ // value returned from the invocation of 'accessor' if 'id' identifies
+ // an attribute of this class, and -1 otherwise.
template
- int accessAttribute(t_ACCESSOR& accessor,
- const char* name,
+ int accessAttribute(t_ACCESSOR& accessor,
+ const char *name,
int nameLength) const;
- // Invoke the specified 'accessor' on the (non-modifiable) attribute
- // of this object indicated by the specified 'name' of the specified
- // 'nameLength', supplying 'accessor' with the corresponding attribute
- // information structure. Return the value returned from the
- // invocation of 'accessor' if 'name' identifies an attribute of this
- // class, and -1 otherwise.
+ // Invoke the specified 'accessor' on the (non-modifiable) attribute
+ // of this object indicated by the specified 'name' of the specified
+ // 'nameLength', supplying 'accessor' with the corresponding attribute
+ // information structure. Return the value returned from the
+ // invocation of 'accessor' if 'name' identifies an attribute of this
+ // class, and -1 otherwise.
int id() const;
- // Return the value of the "Id" attribute of this object.
+ // Return the value of the "Id" attribute of this object.
const bsl::string& state() const;
- // Return a reference offering non-modifiable access to the "State"
- // attribute of this object.
+ // Return a reference offering non-modifiable access to the "State"
+ // attribute of this object.
bsls::Types::Int64 genCount() const;
- // Return the value of the "GenCount" attribute of this object.
+ // Return the value of the "GenCount" attribute of this object.
// HIDDEN FRIENDS
friend bool operator==(const RemoteStreamInfo& lhs,
const RemoteStreamInfo& rhs)
- // Return 'true' if the specified 'lhs' and 'rhs' attribute objects
- // have the same value, and 'false' otherwise. Two attribute objects
- // have the same value if each respective attribute has the same value.
+ // Return 'true' if the specified 'lhs' and 'rhs' attribute objects
+ // have the same value, and 'false' otherwise. Two attribute objects
+ // have the same value if each respective attribute has the same value.
{
- return lhs.id() == rhs.id() && lhs.state() == rhs.state() &&
+ return lhs.id() == rhs.id() &&
+ lhs.state() == rhs.state() &&
lhs.genCount() == rhs.genCount();
}
friend bool operator!=(const RemoteStreamInfo& lhs,
const RemoteStreamInfo& rhs)
- // Returns '!(lhs == rhs)'
+ // Returns '!(lhs == rhs)'
{
return !(lhs == rhs);
}
friend bsl::ostream& operator<<(bsl::ostream& stream,
const RemoteStreamInfo& rhs)
- // Format the specified 'rhs' to the specified output 'stream' and
- // return a reference to the modifiable 'stream'.
+ // Format the specified 'rhs' to the specified output 'stream' and
+ // return a reference to the modifiable 'stream'.
{
return rhs.print(stream, 0, -1);
}
@@ -5585,10 +5561,10 @@ class RemoteStreamInfo {
template
friend void hashAppend(t_HASH_ALGORITHM& hashAlg,
const RemoteStreamInfo& object)
- // Pass the specified 'object' to the specified 'hashAlg'. This
- // function integrates with the 'bslh' modular hashing system and
- // effectively provides a 'bsl::hash' specialization for
- // 'RemoteStreamInfo'.
+ // Pass the specified 'object' to the specified 'hashAlg'. This
+ // function integrates with the 'bslh' modular hashing system and
+ // effectively provides a 'bsl::hash' specialization for
+ // 'RemoteStreamInfo'.
{
object.hashAppendImpl(hashAlg);
}
@@ -5598,21 +5574,27 @@ class RemoteStreamInfo {
// TRAITS
-BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(
- mqbcmd::RemoteStreamInfo)
+BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::RemoteStreamInfo)
namespace mqbcmd {
-// ===============================
-// class ResourceUsageMonitorState
-// ===============================
+ // ===============================
+ // class ResourceUsageMonitorState
+ // ===============================
struct ResourceUsageMonitorState {
+
public:
// TYPES
- enum Value { STATE_NORMAL = 0, STATE_HIGH_WATERMARK = 1, STATE_FULL = 2 };
+ enum Value {
+ STATE_NORMAL = 0
+ , STATE_HIGH_WATERMARK = 1
+ , STATE_FULL = 2
+ };
- enum { NUM_ENUMERATORS = 3 };
+ enum {
+ NUM_ENUMERATORS = 3
+ };
// CONSTANTS
static const char CLASS_NAME[];
@@ -5620,37 +5602,40 @@ struct ResourceUsageMonitorState {
static const bdlat_EnumeratorInfo ENUMERATOR_INFO_ARRAY[];
// CLASS METHODS
- static const char* toString(Value value);
- // Return the string representation exactly matching the enumerator
- // name corresponding to the specified enumeration 'value'.
-
- static int fromString(Value* result, const char* string, int stringLength);
- // Load into the specified 'result' the enumerator matching the
- // specified 'string' of the specified 'stringLength'. Return 0 on
- // success, and a non-zero value with no effect on 'result' otherwise
- // (i.e., 'string' does not match any enumerator).
-
- static int fromString(Value* result, const bsl::string& string);
- // Load into the specified 'result' the enumerator matching the
- // specified 'string'. Return 0 on success, and a non-zero value with
- // no effect on 'result' otherwise (i.e., 'string' does not match any
- // enumerator).
-
- static int fromInt(Value* result, int number);
- // Load into the specified 'result' the enumerator matching the
- // specified 'number'. Return 0 on success, and a non-zero value with
- // no effect on 'result' otherwise (i.e., 'number' does not match any
- // enumerator).
+ static const char *toString(Value value);
+ // Return the string representation exactly matching the enumerator
+ // name corresponding to the specified enumeration 'value'.
+
+ static int fromString(Value *result,
+ const char *string,
+ int stringLength);
+ // Load into the specified 'result' the enumerator matching the
+ // specified 'string' of the specified 'stringLength'. Return 0 on
+ // success, and a non-zero value with no effect on 'result' otherwise
+ // (i.e., 'string' does not match any enumerator).
+
+ static int fromString(Value *result,
+ const bsl::string& string);
+ // Load into the specified 'result' the enumerator matching the
+ // specified 'string'. Return 0 on success, and a non-zero value with
+ // no effect on 'result' otherwise (i.e., 'string' does not match any
+ // enumerator).
+
+ static int fromInt(Value *result, int number);
+ // Load into the specified 'result' the enumerator matching the
+ // specified 'number'. Return 0 on success, and a non-zero value with
+ // no effect on 'result' otherwise (i.e., 'number' does not match any
+ // enumerator).
static bsl::ostream& print(bsl::ostream& stream, Value value);
- // Write to the specified 'stream' the string representation of
- // the specified enumeration 'value'. Return a reference to
- // the modifiable 'stream'.
+ // Write to the specified 'stream' the string representation of
+ // the specified enumeration 'value'. Return a reference to
+ // the modifiable 'stream'.
// HIDDEN FRIENDS
friend bsl::ostream& operator<<(bsl::ostream& stream, Value rhs)
- // Format the specified 'rhs' to the specified output 'stream' and
- // return a reference to the modifiable 'stream'.
+ // Format the specified 'rhs' to the specified output 'stream' and
+ // return a reference to the modifiable 'stream'.
{
return ResourceUsageMonitorState::print(stream, rhs);
}
@@ -5662,31 +5647,34 @@ struct ResourceUsageMonitorState {
BDLAT_DECL_ENUMERATION_TRAITS(mqbcmd::ResourceUsageMonitorState)
+
namespace mqbcmd {
-// ===================
-// class RouteResponse
-// ===================
+ // ===================
+ // class RouteResponse
+ // ===================
class RouteResponse {
// A report of a command routed to a particular node.
// INSTANCE DATA
- bsl::string d_sourceNodeDescription;
- bsl::string d_response;
+ bsl::string d_sourceNodeDescription;
+ bsl::string d_response;
public:
// TYPES
enum {
- ATTRIBUTE_ID_SOURCE_NODE_DESCRIPTION = 0,
- ATTRIBUTE_ID_RESPONSE = 1
+ ATTRIBUTE_ID_SOURCE_NODE_DESCRIPTION = 0
+ , ATTRIBUTE_ID_RESPONSE = 1
};
- enum { NUM_ATTRIBUTES = 2 };
+ enum {
+ NUM_ATTRIBUTES = 2
+ };
enum {
- ATTRIBUTE_INDEX_SOURCE_NODE_DESCRIPTION = 0,
- ATTRIBUTE_INDEX_RESPONSE = 1
+ ATTRIBUTE_INDEX_SOURCE_NODE_DESCRIPTION = 0
+ , ATTRIBUTE_INDEX_RESPONSE = 1
};
// CONSTANTS
@@ -5696,173 +5684,176 @@ class RouteResponse {
public:
// CLASS METHODS
- static const bdlat_AttributeInfo* lookupAttributeInfo(int id);
- // Return attribute information for the attribute indicated by the
- // specified 'id' if the attribute exists, and 0 otherwise.
+ static const bdlat_AttributeInfo *lookupAttributeInfo(int id);
+ // Return attribute information for the attribute indicated by the
+ // specified 'id' if the attribute exists, and 0 otherwise.
- static const bdlat_AttributeInfo* lookupAttributeInfo(const char* name,
- int nameLength);
- // Return attribute information for the attribute indicated by the
- // specified 'name' of the specified 'nameLength' if the attribute
- // exists, and 0 otherwise.
+ static const bdlat_AttributeInfo *lookupAttributeInfo(
+ const char *name,
+ int nameLength);
+ // Return attribute information for the attribute indicated by the
+ // specified 'name' of the specified 'nameLength' if the attribute
+ // exists, and 0 otherwise.
// CREATORS
- explicit RouteResponse(bslma::Allocator* basicAllocator = 0);
- // Create an object of type 'RouteResponse' having the default value.
- // Use the optionally specified 'basicAllocator' to supply memory. If
- // 'basicAllocator' is 0, the currently installed default allocator is
- // used.
+ explicit RouteResponse(bslma::Allocator *basicAllocator = 0);
+ // Create an object of type 'RouteResponse' having the default value.
+ // Use the optionally specified 'basicAllocator' to supply memory. If
+ // 'basicAllocator' is 0, the currently installed default allocator is
+ // used.
RouteResponse(const RouteResponse& original,
- bslma::Allocator* basicAllocator = 0);
- // Create an object of type 'RouteResponse' having the value of the
- // specified 'original' object. Use the optionally specified
- // 'basicAllocator' to supply memory. If 'basicAllocator' is 0, the
- // currently installed default allocator is used.
-
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ bslma::Allocator *basicAllocator = 0);
+ // Create an object of type 'RouteResponse' having the value of the
+ // specified 'original' object. Use the optionally specified
+ // 'basicAllocator' to supply memory. If 'basicAllocator' is 0, the
+ // currently installed default allocator is used.
+
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
RouteResponse(RouteResponse&& original) noexcept;
- // Create an object of type 'RouteResponse' having the value of the
- // specified 'original' object. After performing this action, the
- // 'original' object will be left in a valid, but unspecified state.
+ // Create an object of type 'RouteResponse' having the value of the
+ // specified 'original' object. After performing this action, the
+ // 'original' object will be left in a valid, but unspecified state.
- RouteResponse(RouteResponse&& original, bslma::Allocator* basicAllocator);
- // Create an object of type 'RouteResponse' having the value of the
- // specified 'original' object. After performing this action, the
- // 'original' object will be left in a valid, but unspecified state.
- // Use the optionally specified 'basicAllocator' to supply memory. If
- // 'basicAllocator' is 0, the currently installed default allocator is
- // used.
+ RouteResponse(RouteResponse&& original,
+ bslma::Allocator *basicAllocator);
+ // Create an object of type 'RouteResponse' having the value of the
+ // specified 'original' object. After performing this action, the
+ // 'original' object will be left in a valid, but unspecified state.
+ // Use the optionally specified 'basicAllocator' to supply memory. If
+ // 'basicAllocator' is 0, the currently installed default allocator is
+ // used.
#endif
~RouteResponse();
- // Destroy this object.
+ // Destroy this object.
// MANIPULATORS
RouteResponse& operator=(const RouteResponse& rhs);
- // Assign to this object the value of the specified 'rhs' object.
+ // Assign to this object the value of the specified 'rhs' object.
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
RouteResponse& operator=(RouteResponse&& rhs);
- // Assign to this object the value of the specified 'rhs' object.
- // After performing this action, the 'rhs' object will be left in a
- // valid, but unspecified state.
+ // Assign to this object the value of the specified 'rhs' object.
+ // After performing this action, the 'rhs' object will be left in a
+ // valid, but unspecified state.
#endif
void reset();
- // Reset this object to the default value (i.e., its value upon
- // default construction).
+ // Reset this object to the default value (i.e., its value upon
+ // default construction).
template
int manipulateAttributes(t_MANIPULATOR& manipulator);
- // Invoke the specified 'manipulator' sequentially on the address of
- // each (modifiable) attribute of this object, supplying 'manipulator'
- // with the corresponding attribute information structure until such
- // invocation returns a non-zero value. Return the value from the
- // last invocation of 'manipulator' (i.e., the invocation that
- // terminated the sequence).
+ // Invoke the specified 'manipulator' sequentially on the address of
+ // each (modifiable) attribute of this object, supplying 'manipulator'
+ // with the corresponding attribute information structure until such
+ // invocation returns a non-zero value. Return the value from the
+ // last invocation of 'manipulator' (i.e., the invocation that
+ // terminated the sequence).
template
int manipulateAttribute(t_MANIPULATOR& manipulator, int id);
- // Invoke the specified 'manipulator' on the address of
- // the (modifiable) attribute indicated by the specified 'id',
- // supplying 'manipulator' with the corresponding attribute
- // information structure. Return the value returned from the
- // invocation of 'manipulator' if 'id' identifies an attribute of this
- // class, and -1 otherwise.
-
- template
- int manipulateAttribute(t_MANIPULATOR& manipulator,
- const char* name,
- int nameLength);
- // Invoke the specified 'manipulator' on the address of
- // the (modifiable) attribute indicated by the specified 'name' of the
- // specified 'nameLength', supplying 'manipulator' with the
- // corresponding attribute information structure. Return the value
- // returned from the invocation of 'manipulator' if 'name' identifies
- // an attribute of this class, and -1 otherwise.
+ // Invoke the specified 'manipulator' on the address of
+ // the (modifiable) attribute indicated by the specified 'id',
+ // supplying 'manipulator' with the corresponding attribute
+ // information structure. Return the value returned from the
+ // invocation of 'manipulator' if 'id' identifies an attribute of this
+ // class, and -1 otherwise.
+
+ template
+ int manipulateAttribute(t_MANIPULATOR& manipulator,
+ const char *name,
+ int nameLength);
+ // Invoke the specified 'manipulator' on the address of
+ // the (modifiable) attribute indicated by the specified 'name' of the
+ // specified 'nameLength', supplying 'manipulator' with the
+ // corresponding attribute information structure. Return the value
+ // returned from the invocation of 'manipulator' if 'name' identifies
+ // an attribute of this class, and -1 otherwise.
bsl::string& sourceNodeDescription();
- // Return a reference to the modifiable "SourceNodeDescription"
- // attribute of this object.
+ // Return a reference to the modifiable "SourceNodeDescription"
+ // attribute of this object.
bsl::string& response();
- // Return a reference to the modifiable "Response" attribute of this
- // object.
+ // Return a reference to the modifiable "Response" attribute of this
+ // object.
// ACCESSORS
- bsl::ostream&
- print(bsl::ostream& stream, int level = 0, int spacesPerLevel = 4) const;
- // Format this object to the specified output 'stream' at the
- // optionally specified indentation 'level' and return a reference to
- // the modifiable 'stream'. If 'level' is specified, optionally
- // specify 'spacesPerLevel', the number of spaces per indentation level
- // for this and all of its nested objects. Each line is indented by
- // the absolute value of 'level * spacesPerLevel'. If 'level' is
- // negative, suppress indentation of the first line. If
- // 'spacesPerLevel' is negative, suppress line breaks and format the
- // entire output on one line. If 'stream' is initially invalid, this
- // operation has no effect. Note that a trailing newline is provided
- // in multiline mode only.
+ bsl::ostream& print(bsl::ostream& stream,
+ int level = 0,
+ int spacesPerLevel = 4) const;
+ // Format this object to the specified output 'stream' at the
+ // optionally specified indentation 'level' and return a reference to
+ // the modifiable 'stream'. If 'level' is specified, optionally
+ // specify 'spacesPerLevel', the number of spaces per indentation level
+ // for this and all of its nested objects. Each line is indented by
+ // the absolute value of 'level * spacesPerLevel'. If 'level' is
+ // negative, suppress indentation of the first line. If
+ // 'spacesPerLevel' is negative, suppress line breaks and format the
+ // entire output on one line. If 'stream' is initially invalid, this
+ // operation has no effect. Note that a trailing newline is provided
+ // in multiline mode only.
template
int accessAttributes(t_ACCESSOR& accessor) const;
- // Invoke the specified 'accessor' sequentially on each
- // (non-modifiable) attribute of this object, supplying 'accessor'
- // with the corresponding attribute information structure until such
- // invocation returns a non-zero value. Return the value from the
- // last invocation of 'accessor' (i.e., the invocation that terminated
- // the sequence).
+ // Invoke the specified 'accessor' sequentially on each
+ // (non-modifiable) attribute of this object, supplying 'accessor'
+ // with the corresponding attribute information structure until such
+ // invocation returns a non-zero value. Return the value from the
+ // last invocation of 'accessor' (i.e., the invocation that terminated
+ // the sequence).
template
int accessAttribute(t_ACCESSOR& accessor, int id) const;
- // Invoke the specified 'accessor' on the (non-modifiable) attribute
- // of this object indicated by the specified 'id', supplying 'accessor'
- // with the corresponding attribute information structure. Return the
- // value returned from the invocation of 'accessor' if 'id' identifies
- // an attribute of this class, and -1 otherwise.
+ // Invoke the specified 'accessor' on the (non-modifiable) attribute
+ // of this object indicated by the specified 'id', supplying 'accessor'
+ // with the corresponding attribute information structure. Return the
+ // value returned from the invocation of 'accessor' if 'id' identifies
+ // an attribute of this class, and -1 otherwise.
template
- int accessAttribute(t_ACCESSOR& accessor,
- const char* name,
+ int accessAttribute(t_ACCESSOR& accessor,
+ const char *name,
int nameLength) const;
- // Invoke the specified 'accessor' on the (non-modifiable) attribute
- // of this object indicated by the specified 'name' of the specified
- // 'nameLength', supplying 'accessor' with the corresponding attribute
- // information structure. Return the value returned from the
- // invocation of 'accessor' if 'name' identifies an attribute of this
- // class, and -1 otherwise.
+ // Invoke the specified 'accessor' on the (non-modifiable) attribute
+ // of this object indicated by the specified 'name' of the specified
+ // 'nameLength', supplying 'accessor' with the corresponding attribute
+ // information structure. Return the value returned from the
+ // invocation of 'accessor' if 'name' identifies an attribute of this
+ // class, and -1 otherwise.
const bsl::string& sourceNodeDescription() const;
- // Return a reference offering non-modifiable access to the
- // "SourceNodeDescription" attribute of this object.
+ // Return a reference offering non-modifiable access to the
+ // "SourceNodeDescription" attribute of this object.
const bsl::string& response() const;
- // Return a reference offering non-modifiable access to the "Response"
- // attribute of this object.
+ // Return a reference offering non-modifiable access to the "Response"
+ // attribute of this object.
// HIDDEN FRIENDS
friend bool operator==(const RouteResponse& lhs, const RouteResponse& rhs)
- // Return 'true' if the specified 'lhs' and 'rhs' attribute objects
- // have the same value, and 'false' otherwise. Two attribute objects
- // have the same value if each respective attribute has the same value.
+ // Return 'true' if the specified 'lhs' and 'rhs' attribute objects
+ // have the same value, and 'false' otherwise. Two attribute objects
+ // have the same value if each respective attribute has the same value.
{
return lhs.sourceNodeDescription() == rhs.sourceNodeDescription() &&
lhs.response() == rhs.response();
}
friend bool operator!=(const RouteResponse& lhs, const RouteResponse& rhs)
- // Returns '!(lhs == rhs)'
+ // Returns '!(lhs == rhs)'
{
return !(lhs == rhs);
}
friend bsl::ostream& operator<<(bsl::ostream& stream,
const RouteResponse& rhs)
- // Format the specified 'rhs' to the specified output 'stream' and
- // return a reference to the modifiable 'stream'.
+ // Format the specified 'rhs' to the specified output 'stream' and
+ // return a reference to the modifiable 'stream'.
{
return rhs.print(stream, 0, -1);
}
@@ -5870,10 +5861,10 @@ class RouteResponse {
template
friend void hashAppend(t_HASH_ALGORITHM& hashAlg,
const RouteResponse& object)
- // Pass the specified 'object' to the specified 'hashAlg'. This
- // function integrates with the 'bslh' modular hashing system and
- // effectively provides a 'bsl::hash' specialization for
- // 'RouteResponse'.
+ // Pass the specified 'object' to the specified 'hashAlg'. This
+ // function integrates with the 'bslh' modular hashing system and
+ // effectively provides a 'bsl::hash' specialization for
+ // 'RouteResponse'.
{
using bslh::hashAppend;
hashAppend(hashAlg, object.sourceNodeDescription());
@@ -5885,24 +5876,24 @@ class RouteResponse {
// TRAITS
-BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(
- mqbcmd::RouteResponse)
+BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::RouteResponse)
namespace mqbcmd {
-// =========================
-// class StorageQueueCommand
-// =========================
+ // =========================
+ // class StorageQueueCommand
+ // =========================
class StorageQueueCommand {
+
// INSTANCE DATA
union {
- bsls::ObjectBuffer d_purgeAppId;
- // The special value "*" indicates the entire queue.
+ bsls::ObjectBuffer< bsl::string > d_purgeAppId;
+ // The special value "*" indicates the entire queue.
};
- int d_selectionId;
- bslma::Allocator* d_allocator_p;
+ int d_selectionId;
+ bslma::Allocator *d_allocator_p;
// PRIVATE ACCESSORS
template
@@ -5913,11 +5904,18 @@ class StorageQueueCommand {
public:
// TYPES
- enum { SELECTION_ID_UNDEFINED = -1, SELECTION_ID_PURGE_APP_ID = 0 };
+ enum {
+ SELECTION_ID_UNDEFINED = -1
+ , SELECTION_ID_PURGE_APP_ID = 0
+ };
- enum { NUM_SELECTIONS = 1 };
+ enum {
+ NUM_SELECTIONS = 1
+ };
- enum { SELECTION_INDEX_PURGE_APP_ID = 0 };
+ enum {
+ SELECTION_INDEX_PURGE_APP_ID = 0
+ };
// CONSTANTS
static const char CLASS_NAME[];
@@ -5925,166 +5923,168 @@ class StorageQueueCommand {
static const bdlat_SelectionInfo SELECTION_INFO_ARRAY[];
// CLASS METHODS
- static const bdlat_SelectionInfo* lookupSelectionInfo(int id);
- // Return selection information for the selection indicated by the
- // specified 'id' if the selection exists, and 0 otherwise.
+ static const bdlat_SelectionInfo *lookupSelectionInfo(int id);
+ // Return selection information for the selection indicated by the
+ // specified 'id' if the selection exists, and 0 otherwise.
- static const bdlat_SelectionInfo* lookupSelectionInfo(const char* name,
- int nameLength);
- // Return selection information for the selection indicated by the
- // specified 'name' of the specified 'nameLength' if the selection
- // exists, and 0 otherwise.
+ static const bdlat_SelectionInfo *lookupSelectionInfo(
+ const char *name,
+ int nameLength);
+ // Return selection information for the selection indicated by the
+ // specified 'name' of the specified 'nameLength' if the selection
+ // exists, and 0 otherwise.
// CREATORS
- explicit StorageQueueCommand(bslma::Allocator* basicAllocator = 0);
- // Create an object of type 'StorageQueueCommand' having the default
- // value. Use the optionally specified 'basicAllocator' to supply
- // memory. If 'basicAllocator' is 0, the currently installed default
- // allocator is used.
+ explicit StorageQueueCommand(bslma::Allocator *basicAllocator = 0);
+ // Create an object of type 'StorageQueueCommand' having the default
+ // value. Use the optionally specified 'basicAllocator' to supply
+ // memory. If 'basicAllocator' is 0, the currently installed default
+ // allocator is used.
StorageQueueCommand(const StorageQueueCommand& original,
- bslma::Allocator* basicAllocator = 0);
- // Create an object of type 'StorageQueueCommand' having the value of
- // the specified 'original' object. Use the optionally specified
- // 'basicAllocator' to supply memory. If 'basicAllocator' is 0, the
- // currently installed default allocator is used.
-
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ bslma::Allocator *basicAllocator = 0);
+ // Create an object of type 'StorageQueueCommand' having the value of
+ // the specified 'original' object. Use the optionally specified
+ // 'basicAllocator' to supply memory. If 'basicAllocator' is 0, the
+ // currently installed default allocator is used.
+
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
StorageQueueCommand(StorageQueueCommand&& original) noexcept;
- // Create an object of type 'StorageQueueCommand' having the value of
- // the specified 'original' object. After performing this action, the
- // 'original' object will be left in a valid, but unspecified state.
+ // Create an object of type 'StorageQueueCommand' having the value of
+ // the specified 'original' object. After performing this action, the
+ // 'original' object will be left in a valid, but unspecified state.
StorageQueueCommand(StorageQueueCommand&& original,
- bslma::Allocator* basicAllocator);
- // Create an object of type 'StorageQueueCommand' having the value of
- // the specified 'original' object. After performing this action, the
- // 'original' object will be left in a valid, but unspecified state.
- // Use the optionally specified 'basicAllocator' to supply memory. If
- // 'basicAllocator' is 0, the currently installed default allocator is
- // used.
+ bslma::Allocator *basicAllocator);
+ // Create an object of type 'StorageQueueCommand' having the value of
+ // the specified 'original' object. After performing this action, the
+ // 'original' object will be left in a valid, but unspecified state.
+ // Use the optionally specified 'basicAllocator' to supply memory. If
+ // 'basicAllocator' is 0, the currently installed default allocator is
+ // used.
#endif
~StorageQueueCommand();
- // Destroy this object.
+ // Destroy this object.
// MANIPULATORS
StorageQueueCommand& operator=(const StorageQueueCommand& rhs);
- // Assign to this object the value of the specified 'rhs' object.
+ // Assign to this object the value of the specified 'rhs' object.
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
StorageQueueCommand& operator=(StorageQueueCommand&& rhs);
- // Assign to this object the value of the specified 'rhs' object.
- // After performing this action, the 'rhs' object will be left in a
- // valid, but unspecified state.
+ // Assign to this object the value of the specified 'rhs' object.
+ // After performing this action, the 'rhs' object will be left in a
+ // valid, but unspecified state.
#endif
void reset();
- // Reset this object to the default value (i.e., its value upon default
- // construction).
+ // Reset this object to the default value (i.e., its value upon default
+ // construction).
int makeSelection(int selectionId);
- // Set the value of this object to be the default for the selection
- // indicated by the specified 'selectionId'. Return 0 on success, and
- // non-zero value otherwise (i.e., the selection is not found).
+ // Set the value of this object to be the default for the selection
+ // indicated by the specified 'selectionId'. Return 0 on success, and
+ // non-zero value otherwise (i.e., the selection is not found).
- int makeSelection(const char* name, int nameLength);
- // Set the value of this object to be the default for the selection
- // indicated by the specified 'name' of the specified 'nameLength'.
- // Return 0 on success, and non-zero value otherwise (i.e., the
- // selection is not found).
+ int makeSelection(const char *name, int nameLength);
+ // Set the value of this object to be the default for the selection
+ // indicated by the specified 'name' of the specified 'nameLength'.
+ // Return 0 on success, and non-zero value otherwise (i.e., the
+ // selection is not found).
bsl::string& makePurgeAppId();
bsl::string& makePurgeAppId(const bsl::string& value);
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
bsl::string& makePurgeAppId(bsl::string&& value);
#endif
- // Set the value of this object to be a "PurgeAppId" value. Optionally
- // specify the 'value' of the "PurgeAppId". If 'value' is not
- // specified, the default "PurgeAppId" value is used.
+ // Set the value of this object to be a "PurgeAppId" value. Optionally
+ // specify the 'value' of the "PurgeAppId". If 'value' is not
+ // specified, the default "PurgeAppId" value is used.
template
int manipulateSelection(t_MANIPULATOR& manipulator);
- // Invoke the specified 'manipulator' on the address of the modifiable
- // selection, supplying 'manipulator' with the corresponding selection
- // information structure. Return the value returned from the
- // invocation of 'manipulator' if this object has a defined selection,
- // and -1 otherwise.
+ // Invoke the specified 'manipulator' on the address of the modifiable
+ // selection, supplying 'manipulator' with the corresponding selection
+ // information structure. Return the value returned from the
+ // invocation of 'manipulator' if this object has a defined selection,
+ // and -1 otherwise.
bsl::string& purgeAppId();
- // Return a reference to the modifiable "PurgeAppId" selection of this
- // object if "PurgeAppId" is the current selection. The behavior is
- // undefined unless "PurgeAppId" is the selection of this object.
+ // Return a reference to the modifiable "PurgeAppId" selection of this
+ // object if "PurgeAppId" is the current selection. The behavior is
+ // undefined unless "PurgeAppId" is the selection of this object.
// ACCESSORS
- bsl::ostream&
- print(bsl::ostream& stream, int level = 0, int spacesPerLevel = 4) const;
- // Format this object to the specified output 'stream' at the
- // optionally specified indentation 'level' and return a reference to
- // the modifiable 'stream'. If 'level' is specified, optionally
- // specify 'spacesPerLevel', the number of spaces per indentation level
- // for this and all of its nested objects. Each line is indented by
- // the absolute value of 'level * spacesPerLevel'. If 'level' is
- // negative, suppress indentation of the first line. If
- // 'spacesPerLevel' is negative, suppress line breaks and format the
- // entire output on one line. If 'stream' is initially invalid, this
- // operation has no effect. Note that a trailing newline is provided
- // in multiline mode only.
+ bsl::ostream& print(bsl::ostream& stream,
+ int level = 0,
+ int spacesPerLevel = 4) const;
+ // Format this object to the specified output 'stream' at the
+ // optionally specified indentation 'level' and return a reference to
+ // the modifiable 'stream'. If 'level' is specified, optionally
+ // specify 'spacesPerLevel', the number of spaces per indentation level
+ // for this and all of its nested objects. Each line is indented by
+ // the absolute value of 'level * spacesPerLevel'. If 'level' is
+ // negative, suppress indentation of the first line. If
+ // 'spacesPerLevel' is negative, suppress line breaks and format the
+ // entire output on one line. If 'stream' is initially invalid, this
+ // operation has no effect. Note that a trailing newline is provided
+ // in multiline mode only.
int selectionId() const;
- // Return the id of the current selection if the selection is defined,
- // and -1 otherwise.
+ // Return the id of the current selection if the selection is defined,
+ // and -1 otherwise.
template
int accessSelection(t_ACCESSOR& accessor) const;
- // Invoke the specified 'accessor' on the non-modifiable selection,
- // supplying 'accessor' with the corresponding selection information
- // structure. Return the value returned from the invocation of
- // 'accessor' if this object has a defined selection, and -1 otherwise.
+ // Invoke the specified 'accessor' on the non-modifiable selection,
+ // supplying 'accessor' with the corresponding selection information
+ // structure. Return the value returned from the invocation of
+ // 'accessor' if this object has a defined selection, and -1 otherwise.
const bsl::string& purgeAppId() const;
- // Return a reference to the non-modifiable "PurgeAppId" selection of
- // this object if "PurgeAppId" is the current selection. The behavior
- // is undefined unless "PurgeAppId" is the selection of this object.
+ // Return a reference to the non-modifiable "PurgeAppId" selection of
+ // this object if "PurgeAppId" is the current selection. The behavior
+ // is undefined unless "PurgeAppId" is the selection of this object.
bool isPurgeAppIdValue() const;
- // Return 'true' if the value of this object is a "PurgeAppId" value,
- // and return 'false' otherwise.
+ // Return 'true' if the value of this object is a "PurgeAppId" value,
+ // and return 'false' otherwise.
bool isUndefinedValue() const;
- // Return 'true' if the value of this object is undefined, and 'false'
- // otherwise.
+ // Return 'true' if the value of this object is undefined, and 'false'
+ // otherwise.
- const char* selectionName() const;
- // Return the symbolic name of the current selection of this object.
+ const char *selectionName() const;
+ // Return the symbolic name of the current selection of this object.
// HIDDEN FRIENDS
friend bool operator==(const StorageQueueCommand& lhs,
const StorageQueueCommand& rhs)
- // Return 'true' if the specified 'lhs' and 'rhs' objects have the same
- // value, and 'false' otherwise. Two 'StorageQueueCommand' objects
- // have the same value if either the selections in both objects have
- // the same ids and the same values, or both selections are undefined.
+ // Return 'true' if the specified 'lhs' and 'rhs' objects have the same
+ // value, and 'false' otherwise. Two 'StorageQueueCommand' objects
+ // have the same value if either the selections in both objects have
+ // the same ids and the same values, or both selections are undefined.
{
return lhs.isEqualTo(rhs);
}
friend bool operator!=(const StorageQueueCommand& lhs,
const StorageQueueCommand& rhs)
- // Return 'true' if the specified 'lhs' and 'rhs' objects do not have
- // the same values, as determined by 'operator==', and 'false'
- // otherwise.
+ // Return 'true' if the specified 'lhs' and 'rhs' objects do not have
+ // the same values, as determined by 'operator==', and 'false'
+ // otherwise.
{
return !(lhs == rhs);
}
friend bsl::ostream& operator<<(bsl::ostream& stream,
const StorageQueueCommand& rhs)
- // Format the specified 'rhs' to the specified output 'stream' and
- // return a reference to the modifiable 'stream'.
+ // Format the specified 'rhs' to the specified output 'stream' and
+ // return a reference to the modifiable 'stream'.
{
return rhs.print(stream, 0, -1);
}
@@ -6092,10 +6092,10 @@ class StorageQueueCommand {
template
friend void hashAppend(t_HASH_ALGORITHM& hashAlg,
const StorageQueueCommand& object)
- // Pass the specified 'object' to the specified 'hashAlg'. This
- // function integrates with the 'bslh' modular hashing system and
- // effectively provides a 'bsl::hash' specialization for
- // 'StorageQueueCommand'.
+ // Pass the specified 'object' to the specified 'hashAlg'. This
+ // function integrates with the 'bslh' modular hashing system and
+ // effectively provides a 'bsl::hash' specialization for
+ // 'StorageQueueCommand'.
{
return object.hashAppendImpl(hashAlg);
}
@@ -6105,24 +6105,24 @@ class StorageQueueCommand {
// TRAITS
-BDLAT_DECL_CHOICE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(
- mqbcmd::StorageQueueCommand)
+BDLAT_DECL_CHOICE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::StorageQueueCommand)
namespace mqbcmd {
-// ======================
-// class StorageQueueInfo
-// ======================
+ // ======================
+ // class StorageQueueInfo
+ // ======================
class StorageQueueInfo {
+
// INSTANCE DATA
- bsls::Types::Int64 d_numMessages;
- bsls::Types::Int64 d_numBytes;
- bsl::string d_queueUri;
- bsl::string d_queueKey;
- unsigned int d_internalQueueId;
- int d_partitionId;
- bool d_isPersistent;
+ bsls::Types::Int64 d_numMessages;
+ bsls::Types::Int64 d_numBytes;
+ bsl::string d_queueUri;
+ bsl::string d_queueKey;
+ unsigned int d_internalQueueId;
+ int d_partitionId;
+ bool d_isPersistent;
// PRIVATE ACCESSORS
template
@@ -6133,25 +6133,27 @@ class StorageQueueInfo {
public:
// TYPES
enum {
- ATTRIBUTE_ID_QUEUE_URI = 0,
- ATTRIBUTE_ID_QUEUE_KEY = 1,
- ATTRIBUTE_ID_PARTITION_ID = 2,
- ATTRIBUTE_ID_NUM_MESSAGES = 3,
- ATTRIBUTE_ID_NUM_BYTES = 4,
- ATTRIBUTE_ID_IS_PERSISTENT = 5,
- ATTRIBUTE_ID_INTERNAL_QUEUE_ID = 6
+ ATTRIBUTE_ID_QUEUE_URI = 0
+ , ATTRIBUTE_ID_QUEUE_KEY = 1
+ , ATTRIBUTE_ID_PARTITION_ID = 2
+ , ATTRIBUTE_ID_NUM_MESSAGES = 3
+ , ATTRIBUTE_ID_NUM_BYTES = 4
+ , ATTRIBUTE_ID_IS_PERSISTENT = 5
+ , ATTRIBUTE_ID_INTERNAL_QUEUE_ID = 6
};
- enum { NUM_ATTRIBUTES = 7 };
+ enum {
+ NUM_ATTRIBUTES = 7
+ };
enum {
- ATTRIBUTE_INDEX_QUEUE_URI = 0,
- ATTRIBUTE_INDEX_QUEUE_KEY = 1,
- ATTRIBUTE_INDEX_PARTITION_ID = 2,
- ATTRIBUTE_INDEX_NUM_MESSAGES = 3,
- ATTRIBUTE_INDEX_NUM_BYTES = 4,
- ATTRIBUTE_INDEX_IS_PERSISTENT = 5,
- ATTRIBUTE_INDEX_INTERNAL_QUEUE_ID = 6
+ ATTRIBUTE_INDEX_QUEUE_URI = 0
+ , ATTRIBUTE_INDEX_QUEUE_KEY = 1
+ , ATTRIBUTE_INDEX_PARTITION_ID = 2
+ , ATTRIBUTE_INDEX_NUM_MESSAGES = 3
+ , ATTRIBUTE_INDEX_NUM_BYTES = 4
+ , ATTRIBUTE_INDEX_IS_PERSISTENT = 5
+ , ATTRIBUTE_INDEX_INTERNAL_QUEUE_ID = 6
};
// CONSTANTS
@@ -6161,210 +6163,212 @@ class StorageQueueInfo {
public:
// CLASS METHODS
- static const bdlat_AttributeInfo* lookupAttributeInfo(int id);
- // Return attribute information for the attribute indicated by the
- // specified 'id' if the attribute exists, and 0 otherwise.
+ static const bdlat_AttributeInfo *lookupAttributeInfo(int id);
+ // Return attribute information for the attribute indicated by the
+ // specified 'id' if the attribute exists, and 0 otherwise.
- static const bdlat_AttributeInfo* lookupAttributeInfo(const char* name,
- int nameLength);
- // Return attribute information for the attribute indicated by the
- // specified 'name' of the specified 'nameLength' if the attribute
- // exists, and 0 otherwise.
+ static const bdlat_AttributeInfo *lookupAttributeInfo(
+ const char *name,
+ int nameLength);
+ // Return attribute information for the attribute indicated by the
+ // specified 'name' of the specified 'nameLength' if the attribute
+ // exists, and 0 otherwise.
// CREATORS
- explicit StorageQueueInfo(bslma::Allocator* basicAllocator = 0);
- // Create an object of type 'StorageQueueInfo' having the default
- // value. Use the optionally specified 'basicAllocator' to supply
- // memory. If 'basicAllocator' is 0, the currently installed default
- // allocator is used.
+ explicit StorageQueueInfo(bslma::Allocator *basicAllocator = 0);
+ // Create an object of type 'StorageQueueInfo' having the default
+ // value. Use the optionally specified 'basicAllocator' to supply
+ // memory. If 'basicAllocator' is 0, the currently installed default
+ // allocator is used.
StorageQueueInfo(const StorageQueueInfo& original,
- bslma::Allocator* basicAllocator = 0);
- // Create an object of type 'StorageQueueInfo' having the value of the
- // specified 'original' object. Use the optionally specified
- // 'basicAllocator' to supply memory. If 'basicAllocator' is 0, the
- // currently installed default allocator is used.
-
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ bslma::Allocator *basicAllocator = 0);
+ // Create an object of type 'StorageQueueInfo' having the value of the
+ // specified 'original' object. Use the optionally specified
+ // 'basicAllocator' to supply memory. If 'basicAllocator' is 0, the
+ // currently installed default allocator is used.
+
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
StorageQueueInfo(StorageQueueInfo&& original) noexcept;
- // Create an object of type 'StorageQueueInfo' having the value of the
- // specified 'original' object. After performing this action, the
- // 'original' object will be left in a valid, but unspecified state.
+ // Create an object of type 'StorageQueueInfo' having the value of the
+ // specified 'original' object. After performing this action, the
+ // 'original' object will be left in a valid, but unspecified state.
StorageQueueInfo(StorageQueueInfo&& original,
- bslma::Allocator* basicAllocator);
- // Create an object of type 'StorageQueueInfo' having the value of the
- // specified 'original' object. After performing this action, the
- // 'original' object will be left in a valid, but unspecified state.
- // Use the optionally specified 'basicAllocator' to supply memory. If
- // 'basicAllocator' is 0, the currently installed default allocator is
- // used.
+ bslma::Allocator *basicAllocator);
+ // Create an object of type 'StorageQueueInfo' having the value of the
+ // specified 'original' object. After performing this action, the
+ // 'original' object will be left in a valid, but unspecified state.
+ // Use the optionally specified 'basicAllocator' to supply memory. If
+ // 'basicAllocator' is 0, the currently installed default allocator is
+ // used.
#endif
~StorageQueueInfo();
- // Destroy this object.
+ // Destroy this object.
// MANIPULATORS
StorageQueueInfo& operator=(const StorageQueueInfo& rhs);
- // Assign to this object the value of the specified 'rhs' object.
+ // Assign to this object the value of the specified 'rhs' object.
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
StorageQueueInfo& operator=(StorageQueueInfo&& rhs);
- // Assign to this object the value of the specified 'rhs' object.
- // After performing this action, the 'rhs' object will be left in a
- // valid, but unspecified state.
+ // Assign to this object the value of the specified 'rhs' object.
+ // After performing this action, the 'rhs' object will be left in a
+ // valid, but unspecified state.
#endif
void reset();
- // Reset this object to the default value (i.e., its value upon
- // default construction).
+ // Reset this object to the default value (i.e., its value upon
+ // default construction).
template
int manipulateAttributes(t_MANIPULATOR& manipulator);
- // Invoke the specified 'manipulator' sequentially on the address of
- // each (modifiable) attribute of this object, supplying 'manipulator'
- // with the corresponding attribute information structure until such
- // invocation returns a non-zero value. Return the value from the
- // last invocation of 'manipulator' (i.e., the invocation that
- // terminated the sequence).
+ // Invoke the specified 'manipulator' sequentially on the address of
+ // each (modifiable) attribute of this object, supplying 'manipulator'
+ // with the corresponding attribute information structure until such
+ // invocation returns a non-zero value. Return the value from the
+ // last invocation of 'manipulator' (i.e., the invocation that
+ // terminated the sequence).
template
int manipulateAttribute(t_MANIPULATOR& manipulator, int id);
- // Invoke the specified 'manipulator' on the address of
- // the (modifiable) attribute indicated by the specified 'id',
- // supplying 'manipulator' with the corresponding attribute
- // information structure. Return the value returned from the
- // invocation of 'manipulator' if 'id' identifies an attribute of this
- // class, and -1 otherwise.
-
- template
- int manipulateAttribute(t_MANIPULATOR& manipulator,
- const char* name,
- int nameLength);
- // Invoke the specified 'manipulator' on the address of
- // the (modifiable) attribute indicated by the specified 'name' of the
- // specified 'nameLength', supplying 'manipulator' with the
- // corresponding attribute information structure. Return the value
- // returned from the invocation of 'manipulator' if 'name' identifies
- // an attribute of this class, and -1 otherwise.
+ // Invoke the specified 'manipulator' on the address of
+ // the (modifiable) attribute indicated by the specified 'id',
+ // supplying 'manipulator' with the corresponding attribute
+ // information structure. Return the value returned from the
+ // invocation of 'manipulator' if 'id' identifies an attribute of this
+ // class, and -1 otherwise.
+
+ template
+ int manipulateAttribute(t_MANIPULATOR& manipulator,
+ const char *name,
+ int nameLength);
+ // Invoke the specified 'manipulator' on the address of
+ // the (modifiable) attribute indicated by the specified 'name' of the
+ // specified 'nameLength', supplying 'manipulator' with the
+ // corresponding attribute information structure. Return the value
+ // returned from the invocation of 'manipulator' if 'name' identifies
+ // an attribute of this class, and -1 otherwise.
bsl::string& queueUri();
- // Return a reference to the modifiable "QueueUri" attribute of this
- // object.
+ // Return a reference to the modifiable "QueueUri" attribute of this
+ // object.
bsl::string& queueKey();
- // Return a reference to the modifiable "QueueKey" attribute of this
- // object.
+ // Return a reference to the modifiable "QueueKey" attribute of this
+ // object.
int& partitionId();
- // Return a reference to the modifiable "PartitionId" attribute of this
- // object.
+ // Return a reference to the modifiable "PartitionId" attribute of this
+ // object.
bsls::Types::Int64& numMessages();
- // Return a reference to the modifiable "NumMessages" attribute of this
- // object.
+ // Return a reference to the modifiable "NumMessages" attribute of this
+ // object.
bsls::Types::Int64& numBytes();
- // Return a reference to the modifiable "NumBytes" attribute of this
- // object.
+ // Return a reference to the modifiable "NumBytes" attribute of this
+ // object.
bool& isPersistent();
- // Return a reference to the modifiable "IsPersistent" attribute of
- // this object.
+ // Return a reference to the modifiable "IsPersistent" attribute of
+ // this object.
unsigned int& internalQueueId();
- // Return a reference to the modifiable "InternalQueueId" attribute of
- // this object.
+ // Return a reference to the modifiable "InternalQueueId" attribute of
+ // this object.
// ACCESSORS
- bsl::ostream&
- print(bsl::ostream& stream, int level = 0, int spacesPerLevel = 4) const;
- // Format this object to the specified output 'stream' at the
- // optionally specified indentation 'level' and return a reference to
- // the modifiable 'stream'. If 'level' is specified, optionally
- // specify 'spacesPerLevel', the number of spaces per indentation level
- // for this and all of its nested objects. Each line is indented by
- // the absolute value of 'level * spacesPerLevel'. If 'level' is
- // negative, suppress indentation of the first line. If
- // 'spacesPerLevel' is negative, suppress line breaks and format the
- // entire output on one line. If 'stream' is initially invalid, this
- // operation has no effect. Note that a trailing newline is provided
- // in multiline mode only.
+ bsl::ostream& print(bsl::ostream& stream,
+ int level = 0,
+ int spacesPerLevel = 4) const;
+ // Format this object to the specified output 'stream' at the
+ // optionally specified indentation 'level' and return a reference to
+ // the modifiable 'stream'. If 'level' is specified, optionally
+ // specify 'spacesPerLevel', the number of spaces per indentation level
+ // for this and all of its nested objects. Each line is indented by
+ // the absolute value of 'level * spacesPerLevel'. If 'level' is
+ // negative, suppress indentation of the first line. If
+ // 'spacesPerLevel' is negative, suppress line breaks and format the
+ // entire output on one line. If 'stream' is initially invalid, this
+ // operation has no effect. Note that a trailing newline is provided
+ // in multiline mode only.
template
int accessAttributes(t_ACCESSOR& accessor) const;
- // Invoke the specified 'accessor' sequentially on each
- // (non-modifiable) attribute of this object, supplying 'accessor'
- // with the corresponding attribute information structure until such
- // invocation returns a non-zero value. Return the value from the
- // last invocation of 'accessor' (i.e., the invocation that terminated
- // the sequence).
+ // Invoke the specified 'accessor' sequentially on each
+ // (non-modifiable) attribute of this object, supplying 'accessor'
+ // with the corresponding attribute information structure until such
+ // invocation returns a non-zero value. Return the value from the
+ // last invocation of 'accessor' (i.e., the invocation that terminated
+ // the sequence).
template
int accessAttribute(t_ACCESSOR& accessor, int id) const;
- // Invoke the specified 'accessor' on the (non-modifiable) attribute
- // of this object indicated by the specified 'id', supplying 'accessor'
- // with the corresponding attribute information structure. Return the
- // value returned from the invocation of 'accessor' if 'id' identifies
- // an attribute of this class, and -1 otherwise.
+ // Invoke the specified 'accessor' on the (non-modifiable) attribute
+ // of this object indicated by the specified 'id', supplying 'accessor'
+ // with the corresponding attribute information structure. Return the
+ // value returned from the invocation of 'accessor' if 'id' identifies
+ // an attribute of this class, and -1 otherwise.
template
- int accessAttribute(t_ACCESSOR& accessor,
- const char* name,
+ int accessAttribute(t_ACCESSOR& accessor,
+ const char *name,
int nameLength) const;
- // Invoke the specified 'accessor' on the (non-modifiable) attribute
- // of this object indicated by the specified 'name' of the specified
- // 'nameLength', supplying 'accessor' with the corresponding attribute
- // information structure. Return the value returned from the
- // invocation of 'accessor' if 'name' identifies an attribute of this
- // class, and -1 otherwise.
+ // Invoke the specified 'accessor' on the (non-modifiable) attribute
+ // of this object indicated by the specified 'name' of the specified
+ // 'nameLength', supplying 'accessor' with the corresponding attribute
+ // information structure. Return the value returned from the
+ // invocation of 'accessor' if 'name' identifies an attribute of this
+ // class, and -1 otherwise.
const bsl::string& queueUri() const;
- // Return a reference offering non-modifiable access to the "QueueUri"
- // attribute of this object.
+ // Return a reference offering non-modifiable access to the "QueueUri"
+ // attribute of this object.
const bsl::string& queueKey() const;
- // Return a reference offering non-modifiable access to the "QueueKey"
- // attribute of this object.
+ // Return a reference offering non-modifiable access to the "QueueKey"
+ // attribute of this object.
int partitionId() const;
- // Return the value of the "PartitionId" attribute of this object.
+ // Return the value of the "PartitionId" attribute of this object.
bsls::Types::Int64 numMessages() const;
- // Return the value of the "NumMessages" attribute of this object.
+ // Return the value of the "NumMessages" attribute of this object.
bsls::Types::Int64 numBytes() const;
- // Return the value of the "NumBytes" attribute of this object.
+ // Return the value of the "NumBytes" attribute of this object.
bool isPersistent() const;
- // Return the value of the "IsPersistent" attribute of this object.
+ // Return the value of the "IsPersistent" attribute of this object.
unsigned int internalQueueId() const;
- // Return the value of the "InternalQueueId" attribute of this object.
+ // Return the value of the "InternalQueueId" attribute of this object.
// HIDDEN FRIENDS
friend bool operator==(const StorageQueueInfo& lhs,
const StorageQueueInfo& rhs)
- // Return 'true' if the specified 'lhs' and 'rhs' attribute objects
- // have the same value, and 'false' otherwise. Two attribute objects
- // have the same value if each respective attribute has the same value.
+ // Return 'true' if the specified 'lhs' and 'rhs' attribute objects
+ // have the same value, and 'false' otherwise. Two attribute objects
+ // have the same value if each respective attribute has the same value.
{
return lhs.isEqualTo(rhs);
}
friend bool operator!=(const StorageQueueInfo& lhs,
const StorageQueueInfo& rhs)
- // Returns '!(lhs == rhs)'
+ // Returns '!(lhs == rhs)'
{
return !(lhs == rhs);
}
friend bsl::ostream& operator<<(bsl::ostream& stream,
const StorageQueueInfo& rhs)
- // Format the specified 'rhs' to the specified output 'stream' and
- // return a reference to the modifiable 'stream'.
+ // Format the specified 'rhs' to the specified output 'stream' and
+ // return a reference to the modifiable 'stream'.
{
return rhs.print(stream, 0, -1);
}
@@ -6372,10 +6376,10 @@ class StorageQueueInfo {
template
friend void hashAppend(t_HASH_ALGORITHM& hashAlg,
const StorageQueueInfo& object)
- // Pass the specified 'object' to the specified 'hashAlg'. This
- // function integrates with the 'bslh' modular hashing system and
- // effectively provides a 'bsl::hash' specialization for
- // 'StorageQueueInfo'.
+ // Pass the specified 'object' to the specified 'hashAlg'. This
+ // function integrates with the 'bslh' modular hashing system and
+ // effectively provides a 'bsl::hash' specialization for
+ // 'StorageQueueInfo'.
{
object.hashAppendImpl(hashAlg);
}
@@ -6385,27 +6389,35 @@ class StorageQueueInfo {
// TRAITS
-BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(
- mqbcmd::StorageQueueInfo)
+BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::StorageQueueInfo)
namespace mqbcmd {
-// ===========
-// class SubId
-// ===========
+ // ===========
+ // class SubId
+ // ===========
class SubId {
+
// INSTANCE DATA
- bsl::string d_appId;
- unsigned int d_subId;
+ bsl::string d_appId;
+ unsigned int d_subId;
public:
// TYPES
- enum { ATTRIBUTE_ID_SUB_ID = 0, ATTRIBUTE_ID_APP_ID = 1 };
+ enum {
+ ATTRIBUTE_ID_SUB_ID = 0
+ , ATTRIBUTE_ID_APP_ID = 1
+ };
- enum { NUM_ATTRIBUTES = 2 };
+ enum {
+ NUM_ATTRIBUTES = 2
+ };
- enum { ATTRIBUTE_INDEX_SUB_ID = 0, ATTRIBUTE_INDEX_APP_ID = 1 };
+ enum {
+ ATTRIBUTE_INDEX_SUB_ID = 0
+ , ATTRIBUTE_INDEX_APP_ID = 1
+ };
// CONSTANTS
static const char CLASS_NAME[];
@@ -6414,178 +6426,183 @@ class SubId {
public:
// CLASS METHODS
- static const bdlat_AttributeInfo* lookupAttributeInfo(int id);
- // Return attribute information for the attribute indicated by the
- // specified 'id' if the attribute exists, and 0 otherwise.
+ static const bdlat_AttributeInfo *lookupAttributeInfo(int id);
+ // Return attribute information for the attribute indicated by the
+ // specified 'id' if the attribute exists, and 0 otherwise.
- static const bdlat_AttributeInfo* lookupAttributeInfo(const char* name,
- int nameLength);
- // Return attribute information for the attribute indicated by the
- // specified 'name' of the specified 'nameLength' if the attribute
- // exists, and 0 otherwise.
+ static const bdlat_AttributeInfo *lookupAttributeInfo(
+ const char *name,
+ int nameLength);
+ // Return attribute information for the attribute indicated by the
+ // specified 'name' of the specified 'nameLength' if the attribute
+ // exists, and 0 otherwise.
// CREATORS
- explicit SubId(bslma::Allocator* basicAllocator = 0);
- // Create an object of type 'SubId' having the default value. Use the
- // optionally specified 'basicAllocator' to supply memory. If
- // 'basicAllocator' is 0, the currently installed default allocator is
- // used.
-
- SubId(const SubId& original, bslma::Allocator* basicAllocator = 0);
- // Create an object of type 'SubId' having the value of the specified
- // 'original' object. Use the optionally specified 'basicAllocator' to
- // supply memory. If 'basicAllocator' is 0, the currently installed
- // default allocator is used.
-
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+ explicit SubId(bslma::Allocator *basicAllocator = 0);
+ // Create an object of type 'SubId' having the default value. Use the
+ // optionally specified 'basicAllocator' to supply memory. If
+ // 'basicAllocator' is 0, the currently installed default allocator is
+ // used.
+
+ SubId(const SubId& original,
+ bslma::Allocator *basicAllocator = 0);
+ // Create an object of type 'SubId' having the value of the specified
+ // 'original' object. Use the optionally specified 'basicAllocator' to
+ // supply memory. If 'basicAllocator' is 0, the currently installed
+ // default allocator is used.
+
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
SubId(SubId&& original) noexcept;
- // Create an object of type 'SubId' having the value of the specified
- // 'original' object. After performing this action, the 'original'
- // object will be left in a valid, but unspecified state.
+ // Create an object of type 'SubId' having the value of the specified
+ // 'original' object. After performing this action, the 'original'
+ // object will be left in a valid, but unspecified state.
- SubId(SubId&& original, bslma::Allocator* basicAllocator);
- // Create an object of type 'SubId' having the value of the specified
- // 'original' object. After performing this action, the 'original'
- // object will be left in a valid, but unspecified state. Use the
- // optionally specified 'basicAllocator' to supply memory. If
- // 'basicAllocator' is 0, the currently installed default allocator is
- // used.
+ SubId(SubId&& original,
+ bslma::Allocator *basicAllocator);
+ // Create an object of type 'SubId' having the value of the specified
+ // 'original' object. After performing this action, the 'original'
+ // object will be left in a valid, but unspecified state. Use the
+ // optionally specified 'basicAllocator' to supply memory. If
+ // 'basicAllocator' is 0, the currently installed default allocator is
+ // used.
#endif
~SubId();
- // Destroy this object.
+ // Destroy this object.
// MANIPULATORS
SubId& operator=(const SubId& rhs);
- // Assign to this object the value of the specified 'rhs' object.
+ // Assign to this object the value of the specified 'rhs' object.
-#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \
- defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
+#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \
+ && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT)
SubId& operator=(SubId&& rhs);
- // Assign to this object the value of the specified 'rhs' object.
- // After performing this action, the 'rhs' object will be left in a
- // valid, but unspecified state.
+ // Assign to this object the value of the specified 'rhs' object.
+ // After performing this action, the 'rhs' object will be left in a
+ // valid, but unspecified state.
#endif
void reset();
- // Reset this object to the default value (i.e., its value upon
- // default construction).
+ // Reset this object to the default value (i.e., its value upon
+ // default construction).
template
int manipulateAttributes(t_MANIPULATOR& manipulator);
- // Invoke the specified 'manipulator' sequentially on the address of
- // each (modifiable) attribute of this object, supplying 'manipulator'
- // with the corresponding attribute information structure until such
- // invocation returns a non-zero value. Return the value from the
- // last invocation of 'manipulator' (i.e., the invocation that
- // terminated the sequence).
+ // Invoke the specified 'manipulator' sequentially on the address of
+ // each (modifiable) attribute of this object, supplying 'manipulator'
+ // with the corresponding attribute information structure until such
+ // invocation returns a non-zero value. Return the value from the
+ // last invocation of 'manipulator' (i.e., the invocation that
+ // terminated the sequence).
template
int manipulateAttribute(t_MANIPULATOR& manipulator, int id);
- // Invoke the specified 'manipulator' on the address of
- // the (modifiable) attribute indicated by the specified 'id',
- // supplying 'manipulator' with the corresponding attribute
- // information structure. Return the value returned from the
- // invocation of 'manipulator' if 'id' identifies an attribute of this
- // class, and -1 otherwise.
-
- template
- int manipulateAttribute(t_MANIPULATOR& manipulator,
- const char* name,
- int nameLength);
- // Invoke the specified 'manipulator' on the address of
- // the (modifiable) attribute indicated by the specified 'name' of the
- // specified 'nameLength', supplying 'manipulator' with the
- // corresponding attribute information structure. Return the value
- // returned from the invocation of 'manipulator' if 'name' identifies
- // an attribute of this class, and -1 otherwise.
+ // Invoke the specified 'manipulator' on the address of
+ // the (modifiable) attribute indicated by the specified 'id',
+ // supplying 'manipulator' with the corresponding attribute
+ // information structure. Return the value returned from the
+ // invocation of 'manipulator' if 'id' identifies an attribute of this
+ // class, and -1 otherwise.
+
+ template