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 + 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. unsigned int& subId(); - // Return a reference to the modifiable "SubId" attribute of this - // object. + // Return a reference to the modifiable "SubId" 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. // 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. unsigned int subId() const; - // Return the value of the "SubId" attribute of this object. + // Return the value of the "SubId" 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. // HIDDEN FRIENDS friend bool operator==(const SubId& lhs, const SubId& 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.subId() == rhs.subId() && lhs.appId() == rhs.appId(); + return lhs.subId() == rhs.subId() && + lhs.appId() == rhs.appId(); } friend bool operator!=(const SubId& lhs, const SubId& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const SubId& 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 SubId& 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 'SubId'. + // 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 'SubId'. { using bslh::hashAppend; hashAppend(hashAlg, object.subId()); @@ -6601,21 +6618,28 @@ BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::SubId) namespace mqbcmd { -// ================ -// class Subscriber -// ================ + // ================ + // class Subscriber + // ================ class Subscriber { + // INSTANCE DATA - bsls::Types::Int64 d_downstreamSubQueueId; + bsls::Types::Int64 d_downstreamSubQueueId; public: // TYPES - enum { ATTRIBUTE_ID_DOWNSTREAM_SUB_QUEUE_ID = 0 }; + enum { + ATTRIBUTE_ID_DOWNSTREAM_SUB_QUEUE_ID = 0 + }; - enum { NUM_ATTRIBUTES = 1 }; + enum { + NUM_ATTRIBUTES = 1 + }; - enum { ATTRIBUTE_INDEX_DOWNSTREAM_SUB_QUEUE_ID = 0 }; + enum { + ATTRIBUTE_INDEX_DOWNSTREAM_SUB_QUEUE_ID = 0 + }; // CONSTANTS static const char CLASS_NAME[]; @@ -6624,133 +6648,136 @@ class Subscriber { 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 Subscriber(); - // Create an object of type 'Subscriber' having the default value. + // Create an object of type 'Subscriber' 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& downstreamSubQueueId(); - // Return a reference to the modifiable "DownstreamSubQueueId" - // attribute of this object. + // Return a reference to the modifiable "DownstreamSubQueueId" + // 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 downstreamSubQueueId() const; - // Return the value of the "DownstreamSubQueueId" attribute of this - // object. + // Return the value of the "DownstreamSubQueueId" attribute of this + // object. // HIDDEN FRIENDS friend bool operator==(const Subscriber& lhs, const Subscriber& 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.downstreamSubQueueId() == rhs.downstreamSubQueueId(); } friend bool operator!=(const Subscriber& lhs, const Subscriber& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const Subscriber& 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 Subscriber& 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 'Subscriber'. + // 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 'Subscriber'. { using bslh::hashAppend; hashAppend(hashAlg, object.downstreamSubQueueId()); @@ -6765,141 +6792,147 @@ BDLAT_DECL_SEQUENCE_WITH_BITWISEMOVEABLE_TRAITS(mqbcmd::Subscriber) namespace mqbcmd { -// ======================== -// class UninitializedQueue -// ======================== + // ======================== + // class UninitializedQueue + // ======================== class UninitializedQueue { + // INSTANCE DATA public: // TYPES - enum { NUM_ATTRIBUTES = 0 }; + enum { + NUM_ATTRIBUTES = 0 + }; + // CONSTANTS static const char CLASS_NAME[]; 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 // 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. // 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. // HIDDEN FRIENDS friend bool operator==(const UninitializedQueue&, const UninitializedQueue&) - // Returns 'true' as this type has no attributes and so all objects of - // this type are considered equal. + // Returns 'true' as this type has no attributes and so all objects of + // this type are considered equal. { return true; } friend bool operator!=(const UninitializedQueue& lhs, const UninitializedQueue& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const UninitializedQueue& 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&, const UninitializedQueue&) - // 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 - // 'UninitializedQueue'. + // 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 + // 'UninitializedQueue'. { } }; @@ -6912,15 +6945,16 @@ BDLAT_DECL_SEQUENCE_WITH_BITWISEMOVEABLE_TRAITS(mqbcmd::UninitializedQueue) namespace mqbcmd { -// ==================== -// class VirtualStorage -// ==================== + // ==================== + // class VirtualStorage + // ==================== class VirtualStorage { + // INSTANCE DATA - bsl::string d_appId; - bsl::string d_appKey; - unsigned int d_numMessages; + bsl::string d_appId; + bsl::string d_appKey; + unsigned int d_numMessages; // PRIVATE ACCESSORS template @@ -6929,17 +6963,19 @@ class VirtualStorage { 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 @@ -6949,183 +6985,186 @@ class VirtualStorage { 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 VirtualStorage(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'VirtualStorage' having the default value. - // Use the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit VirtualStorage(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'VirtualStorage' having the default value. + // Use the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. VirtualStorage(const VirtualStorage& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'VirtualStorage' 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 'VirtualStorage' 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) VirtualStorage(VirtualStorage&& original) noexcept; - // Create an object of type 'VirtualStorage' 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 'VirtualStorage' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - VirtualStorage(VirtualStorage&& original, - bslma::Allocator* basicAllocator); - // Create an object of type 'VirtualStorage' 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. + VirtualStorage(VirtualStorage&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'VirtualStorage' 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 ~VirtualStorage(); - // Destroy this object. + // Destroy this object. // MANIPULATORS VirtualStorage& operator=(const VirtualStorage& 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) VirtualStorage& operator=(VirtualStorage&& 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 VirtualStorage& lhs, const VirtualStorage& 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 VirtualStorage& lhs, const VirtualStorage& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const VirtualStorage& 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); } @@ -7133,10 +7172,10 @@ class VirtualStorage { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const VirtualStorage& 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 - // 'VirtualStorage'. + // 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 + // 'VirtualStorage'. { object.hashAppendImpl(hashAlg); } @@ -7146,142 +7185,147 @@ class VirtualStorage { // TRAITS -BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS( - mqbcmd::VirtualStorage) +BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::VirtualStorage) namespace mqbcmd { -// ========== -// class Void -// ========== + // ========== + // class Void + // ========== class Void { + // INSTANCE DATA public: // TYPES - enum { NUM_ATTRIBUTES = 0 }; + enum { + NUM_ATTRIBUTES = 0 + }; + // CONSTANTS static const char CLASS_NAME[]; 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 // 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. // 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. // HIDDEN FRIENDS friend bool operator==(const Void&, const Void&) - // Returns 'true' as this type has no attributes and so all objects of - // this type are considered equal. + // Returns 'true' as this type has no attributes and so all objects of + // this type are considered equal. { return true; } friend bool operator!=(const Void& lhs, const Void& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const Void& 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&, const Void&) - // 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 'Void'. + // 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 'Void'. { } }; @@ -7294,15 +7338,16 @@ BDLAT_DECL_SEQUENCE_WITH_BITWISEMOVEABLE_TRAITS(mqbcmd::Void) namespace mqbcmd { -// =================== -// class ActiveFileSet -// =================== + // =================== + // class ActiveFileSet + // =================== class ActiveFileSet { + // INSTANCE DATA - FileInfo d_dataFile; - FileInfo d_journalFile; - FileInfo d_qlistFile; + FileInfo d_dataFile; + FileInfo d_journalFile; + FileInfo d_qlistFile; // PRIVATE ACCESSORS template @@ -7311,17 +7356,19 @@ class ActiveFileSet { public: // TYPES enum { - ATTRIBUTE_ID_DATA_FILE = 0, - ATTRIBUTE_ID_JOURNAL_FILE = 1, - ATTRIBUTE_ID_QLIST_FILE = 2 + ATTRIBUTE_ID_DATA_FILE = 0 + , ATTRIBUTE_ID_JOURNAL_FILE = 1 + , ATTRIBUTE_ID_QLIST_FILE = 2 }; - enum { NUM_ATTRIBUTES = 3 }; + enum { + NUM_ATTRIBUTES = 3 + }; enum { - ATTRIBUTE_INDEX_DATA_FILE = 0, - ATTRIBUTE_INDEX_JOURNAL_FILE = 1, - ATTRIBUTE_INDEX_QLIST_FILE = 2 + ATTRIBUTE_INDEX_DATA_FILE = 0 + , ATTRIBUTE_INDEX_JOURNAL_FILE = 1 + , ATTRIBUTE_INDEX_QLIST_FILE = 2 }; // CONSTANTS @@ -7331,126 +7378,129 @@ class ActiveFileSet { 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 ActiveFileSet(); - // Create an object of type 'ActiveFileSet' having the default value. + // Create an object of type 'ActiveFileSet' 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. FileInfo& dataFile(); - // Return a reference to the modifiable "DataFile" attribute of this - // object. + // Return a reference to the modifiable "DataFile" attribute of this + // object. FileInfo& journalFile(); - // Return a reference to the modifiable "JournalFile" attribute of this - // object. + // Return a reference to the modifiable "JournalFile" attribute of this + // object. FileInfo& qlistFile(); - // Return a reference to the modifiable "QlistFile" attribute of this - // object. + // Return a reference to the modifiable "QlistFile" 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 FileInfo& dataFile() const; - // Return a reference offering non-modifiable access to the "DataFile" - // attribute of this object. + // Return a reference offering non-modifiable access to the "DataFile" + // attribute of this object. const FileInfo& journalFile() const; - // Return a reference offering non-modifiable access to the - // "JournalFile" attribute of this object. + // Return a reference offering non-modifiable access to the + // "JournalFile" attribute of this object. const FileInfo& qlistFile() const; - // Return a reference offering non-modifiable access to the "QlistFile" - // attribute of this object. + // Return a reference offering non-modifiable access to the "QlistFile" + // attribute of this object. // HIDDEN FRIENDS friend bool operator==(const ActiveFileSet& lhs, const ActiveFileSet& 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.dataFile() == rhs.dataFile() && lhs.journalFile() == rhs.journalFile() && @@ -7458,15 +7508,15 @@ class ActiveFileSet { } friend bool operator!=(const ActiveFileSet& lhs, const ActiveFileSet& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const ActiveFileSet& 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); } @@ -7474,10 +7524,10 @@ class ActiveFileSet { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const ActiveFileSet& 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 - // 'ActiveFileSet'. + // 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 + // 'ActiveFileSet'. { object.hashAppendImpl(hashAlg); } @@ -7491,17 +7541,18 @@ BDLAT_DECL_SEQUENCE_WITH_BITWISEMOVEABLE_TRAITS(mqbcmd::ActiveFileSet) namespace mqbcmd { -// ========================= -// class BrokerConfigCommand -// ========================= + // ========================= + // class BrokerConfigCommand + // ========================= class BrokerConfigCommand { + // INSTANCE DATA union { - bsls::ObjectBuffer d_dump; + bsls::ObjectBuffer< Void > d_dump; }; - int d_selectionId; + int d_selectionId; // PRIVATE ACCESSORS template @@ -7512,11 +7563,18 @@ class BrokerConfigCommand { public: // TYPES - enum { SELECTION_ID_UNDEFINED = -1, SELECTION_ID_DUMP = 0 }; + enum { + SELECTION_ID_UNDEFINED = -1 + , SELECTION_ID_DUMP = 0 + }; - enum { NUM_SELECTIONS = 1 }; + enum { + NUM_SELECTIONS = 1 + }; - enum { SELECTION_INDEX_DUMP = 0 }; + enum { + SELECTION_INDEX_DUMP = 0 + }; // CONSTANTS static const char CLASS_NAME[]; @@ -7524,152 +7582,154 @@ class BrokerConfigCommand { 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 BrokerConfigCommand(); - // Create an object of type 'BrokerConfigCommand' having the default - // value. + // Create an object of type 'BrokerConfigCommand' having the default + // value. BrokerConfigCommand(const BrokerConfigCommand& original); - // Create an object of type 'BrokerConfigCommand' having the value of - // the specified 'original' object. + // Create an object of type 'BrokerConfigCommand' having the value of + // the specified 'original' 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) BrokerConfigCommand(BrokerConfigCommand&& original) noexcept; - // Create an object of type 'BrokerConfigCommand' 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 'BrokerConfigCommand' having the value of + // the specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. #endif ~BrokerConfigCommand(); - // Destroy this object. + // Destroy this object. // MANIPULATORS BrokerConfigCommand& operator=(const BrokerConfigCommand& 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) BrokerConfigCommand& operator=(BrokerConfigCommand&& 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). Void& makeDump(); Void& makeDump(const Void& 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) Void& makeDump(Void&& value); #endif - // Set the value of this object to be a "Dump" value. Optionally - // specify the 'value' of the "Dump". If 'value' is not specified, the - // default "Dump" value is used. + // Set the value of this object to be a "Dump" value. Optionally + // specify the 'value' of the "Dump". If 'value' is not specified, the + // default "Dump" 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. Void& dump(); - // Return a reference to the modifiable "Dump" selection of this object - // if "Dump" is the current selection. The behavior is undefined - // unless "Dump" is the selection of this object. + // Return a reference to the modifiable "Dump" selection of this object + // if "Dump" is the current selection. The behavior is undefined + // unless "Dump" 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 Void& dump() const; - // Return a reference to the non-modifiable "Dump" selection of this - // object if "Dump" is the current selection. The behavior is - // undefined unless "Dump" is the selection of this object. + // Return a reference to the non-modifiable "Dump" selection of this + // object if "Dump" is the current selection. The behavior is + // undefined unless "Dump" is the selection of this object. bool isDumpValue() const; - // Return 'true' if the value of this object is a "Dump" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Dump" 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 BrokerConfigCommand& lhs, const BrokerConfigCommand& rhs) - // Return 'true' if the specified 'lhs' and 'rhs' objects have the same - // value, and 'false' otherwise. Two 'BrokerConfigCommand' 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 'BrokerConfigCommand' 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 BrokerConfigCommand& lhs, const BrokerConfigCommand& 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 BrokerConfigCommand& 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); } @@ -7677,10 +7737,10 @@ class BrokerConfigCommand { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const BrokerConfigCommand& 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 - // 'BrokerConfigCommand'. + // 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 + // 'BrokerConfigCommand'. { return object.hashAppendImpl(hashAlg); } @@ -7694,19 +7754,20 @@ BDLAT_DECL_CHOICE_WITH_BITWISEMOVEABLE_TRAITS(mqbcmd::BrokerConfigCommand) namespace mqbcmd { -// ================ -// class ClearCache -// ================ + // ================ + // class ClearCache + // ================ class ClearCache { + // INSTANCE DATA union { - bsls::ObjectBuffer d_domain; - bsls::ObjectBuffer d_all; + bsls::ObjectBuffer< bsl::string > d_domain; + bsls::ObjectBuffer< Void > d_all; }; - int d_selectionId; - bslma::Allocator* d_allocator_p; + int d_selectionId; + bslma::Allocator *d_allocator_p; // PRIVATE ACCESSORS template @@ -7718,14 +7779,19 @@ class ClearCache { // TYPES enum { - SELECTION_ID_UNDEFINED = -1, - SELECTION_ID_DOMAIN = 0, - SELECTION_ID_ALL = 1 + SELECTION_ID_UNDEFINED = -1 + , SELECTION_ID_DOMAIN = 0 + , SELECTION_ID_ALL = 1 }; - enum { NUM_SELECTIONS = 2 }; + enum { + NUM_SELECTIONS = 2 + }; - enum { SELECTION_INDEX_DOMAIN = 0, SELECTION_INDEX_ALL = 1 }; + enum { + SELECTION_INDEX_DOMAIN = 0 + , SELECTION_INDEX_ALL = 1 + }; // CONSTANTS static const char CLASS_NAME[]; @@ -7733,196 +7799,199 @@ class ClearCache { 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 ClearCache(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'ClearCache' having the default value. Use - // the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit ClearCache(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'ClearCache' having the default value. Use + // the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. ClearCache(const ClearCache& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'ClearCache' 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 'ClearCache' 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) ClearCache(ClearCache&& original) noexcept; - // Create an object of type 'ClearCache' 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 'ClearCache' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - ClearCache(ClearCache&& original, bslma::Allocator* basicAllocator); - // Create an object of type 'ClearCache' 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. + ClearCache(ClearCache&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'ClearCache' 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 ~ClearCache(); - // Destroy this object. + // Destroy this object. // MANIPULATORS ClearCache& operator=(const ClearCache& 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) ClearCache& operator=(ClearCache&& 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. Void& makeAll(); Void& makeAll(const Void& 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) Void& makeAll(Void&& value); #endif - // Set the value of this object to be a "All" value. Optionally - // specify the 'value' of the "All". If 'value' is not specified, the - // default "All" value is used. + // Set the value of this object to be a "All" value. Optionally + // specify the 'value' of the "All". If 'value' is not specified, the + // default "All" 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. Void& all(); - // Return a reference to the modifiable "All" selection of this object - // if "All" is the current selection. The behavior is undefined unless - // "All" is the selection of this object. + // Return a reference to the modifiable "All" selection of this object + // if "All" is the current selection. The behavior is undefined unless + // "All" 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. const Void& all() const; - // Return a reference to the non-modifiable "All" selection of this - // object if "All" is the current selection. The behavior is undefined - // unless "All" is the selection of this object. + // Return a reference to the non-modifiable "All" selection of this + // object if "All" is the current selection. The behavior is undefined + // unless "All" 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 isAllValue() const; - // Return 'true' if the value of this object is a "All" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "All" 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 ClearCache& lhs, const ClearCache& rhs) - // Return 'true' if the specified 'lhs' and 'rhs' objects have the same - // value, and 'false' otherwise. Two 'ClearCache' 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 'ClearCache' 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 ClearCache& lhs, const ClearCache& 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 ClearCache& 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 ClearCache& 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 'ClearCache'. + // 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 'ClearCache'. { return object.hashAppendImpl(hashAlg); } @@ -7936,15 +8005,16 @@ BDLAT_DECL_CHOICE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::ClearCache) namespace mqbcmd { -// ================= -// class ClusterInfo -// ================= + // ================= + // class ClusterInfo + // ================= class ClusterInfo { + // INSTANCE DATA - bsl::vector d_nodes; - bsl::string d_name; - Locality::Value d_locality; + bsl::vector d_nodes; + bsl::string d_name; + Locality::Value d_locality; // PRIVATE ACCESSORS template @@ -7953,17 +8023,19 @@ class ClusterInfo { public: // TYPES enum { - ATTRIBUTE_ID_LOCALITY = 0, - ATTRIBUTE_ID_NAME = 1, - ATTRIBUTE_ID_NODES = 2 + ATTRIBUTE_ID_LOCALITY = 0 + , ATTRIBUTE_ID_NAME = 1 + , ATTRIBUTE_ID_NODES = 2 }; - enum { NUM_ATTRIBUTES = 3 }; + enum { + NUM_ATTRIBUTES = 3 + }; enum { - ATTRIBUTE_INDEX_LOCALITY = 0, - ATTRIBUTE_INDEX_NAME = 1, - ATTRIBUTE_INDEX_NODES = 2 + ATTRIBUTE_INDEX_LOCALITY = 0 + , ATTRIBUTE_INDEX_NAME = 1 + , ATTRIBUTE_INDEX_NODES = 2 }; // CONSTANTS @@ -7973,180 +8045,184 @@ class ClusterInfo { 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 ClusterInfo(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'ClusterInfo' having the default value. - // Use the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit ClusterInfo(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'ClusterInfo' having the default value. + // Use the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. ClusterInfo(const ClusterInfo& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'ClusterInfo' 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 'ClusterInfo' 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) ClusterInfo(ClusterInfo&& original) noexcept; - // Create an object of type 'ClusterInfo' 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 'ClusterInfo' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - ClusterInfo(ClusterInfo&& original, bslma::Allocator* basicAllocator); - // Create an object of type 'ClusterInfo' 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. + ClusterInfo(ClusterInfo&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'ClusterInfo' 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 ~ClusterInfo(); - // Destroy this object. + // Destroy this object. // MANIPULATORS ClusterInfo& operator=(const ClusterInfo& 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) ClusterInfo& operator=(ClusterInfo&& 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. Locality::Value& locality(); - // Return a reference to the modifiable "Locality" attribute of this - // object. + // Return a reference to the modifiable "Locality" attribute of this + // object. 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. bsl::vector& nodes(); - // Return a reference to the modifiable "Nodes" attribute of this - // object. + // Return a reference to the modifiable "Nodes" 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. Locality::Value locality() const; - // Return the value of the "Locality" attribute of this object. + // Return the value of the "Locality" attribute of this object. 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. const bsl::vector& nodes() const; - // Return a reference offering non-modifiable access to the "Nodes" - // attribute of this object. + // Return a reference offering non-modifiable access to the "Nodes" + // attribute of this object. // HIDDEN FRIENDS friend bool operator==(const ClusterInfo& lhs, const ClusterInfo& 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.locality() == rhs.locality() && lhs.name() == rhs.name() && + return lhs.locality() == rhs.locality() && + lhs.name() == rhs.name() && lhs.nodes() == rhs.nodes(); } friend bool operator!=(const ClusterInfo& lhs, const ClusterInfo& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const ClusterInfo& 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); } @@ -8154,9 +8230,9 @@ class ClusterInfo { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const ClusterInfo& 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 'ClusterInfo'. + // 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 'ClusterInfo'. { object.hashAppendImpl(hashAlg); } @@ -8170,16 +8246,17 @@ BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::ClusterInfo) namespace mqbcmd { -// ===================== -// class ClusterNodeInfo -// ===================== + // ===================== + // class ClusterNodeInfo + // ===================== class ClusterNodeInfo { + // INSTANCE DATA - bsl::vector d_primaryForPartitionIds; - bsl::string d_description; - NodeStatus::Value d_status; - bdlb::NullableValue d_isAvailable; + bsl::vector d_primaryForPartitionIds; + bsl::string d_description; + NodeStatus::Value d_status; + bdlb::NullableValue d_isAvailable; // PRIVATE ACCESSORS template @@ -8190,19 +8267,21 @@ class ClusterNodeInfo { public: // TYPES enum { - ATTRIBUTE_ID_DESCRIPTION = 0, - ATTRIBUTE_ID_IS_AVAILABLE = 1, - ATTRIBUTE_ID_STATUS = 2, - ATTRIBUTE_ID_PRIMARY_FOR_PARTITION_IDS = 3 + ATTRIBUTE_ID_DESCRIPTION = 0 + , ATTRIBUTE_ID_IS_AVAILABLE = 1 + , ATTRIBUTE_ID_STATUS = 2 + , ATTRIBUTE_ID_PRIMARY_FOR_PARTITION_IDS = 3 }; - enum { NUM_ATTRIBUTES = 4 }; + enum { + NUM_ATTRIBUTES = 4 + }; enum { - ATTRIBUTE_INDEX_DESCRIPTION = 0, - ATTRIBUTE_INDEX_IS_AVAILABLE = 1, - ATTRIBUTE_INDEX_STATUS = 2, - ATTRIBUTE_INDEX_PRIMARY_FOR_PARTITION_IDS = 3 + ATTRIBUTE_INDEX_DESCRIPTION = 0 + , ATTRIBUTE_INDEX_IS_AVAILABLE = 1 + , ATTRIBUTE_INDEX_STATUS = 2 + , ATTRIBUTE_INDEX_PRIMARY_FOR_PARTITION_IDS = 3 }; // CONSTANTS @@ -8212,190 +8291,192 @@ class ClusterNodeInfo { 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 ClusterNodeInfo(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'ClusterNodeInfo' having the default value. - // Use the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit ClusterNodeInfo(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'ClusterNodeInfo' having the default value. + // Use the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. ClusterNodeInfo(const ClusterNodeInfo& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'ClusterNodeInfo' 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 'ClusterNodeInfo' 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) ClusterNodeInfo(ClusterNodeInfo&& original) noexcept; - // Create an object of type 'ClusterNodeInfo' 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 'ClusterNodeInfo' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. ClusterNodeInfo(ClusterNodeInfo&& original, - bslma::Allocator* basicAllocator); - // Create an object of type 'ClusterNodeInfo' 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 'ClusterNodeInfo' 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 ~ClusterNodeInfo(); - // Destroy this object. + // Destroy this object. // MANIPULATORS ClusterNodeInfo& operator=(const ClusterNodeInfo& 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) ClusterNodeInfo& operator=(ClusterNodeInfo&& 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& description(); - // Return a reference to the modifiable "Description" attribute of this - // object. + // Return a reference to the modifiable "Description" attribute of this + // object. bdlb::NullableValue& isAvailable(); - // Return a reference to the modifiable "IsAvailable" attribute of this - // object. + // Return a reference to the modifiable "IsAvailable" attribute of this + // object. NodeStatus::Value& status(); - // Return a reference to the modifiable "Status" attribute of this - // object. + // Return a reference to the modifiable "Status" attribute of this + // object. bsl::vector& primaryForPartitionIds(); - // Return a reference to the modifiable "PrimaryForPartitionIds" - // attribute of this object. + // Return a reference to the modifiable "PrimaryForPartitionIds" + // 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& 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. const bdlb::NullableValue& isAvailable() const; - // Return a reference offering non-modifiable access to the - // "IsAvailable" attribute of this object. + // Return a reference offering non-modifiable access to the + // "IsAvailable" attribute of this object. NodeStatus::Value status() const; - // Return the value of the "Status" attribute of this object. + // Return the value of the "Status" attribute of this object. const bsl::vector& primaryForPartitionIds() const; - // Return a reference offering non-modifiable access to the - // "PrimaryForPartitionIds" attribute of this object. + // Return a reference offering non-modifiable access to the + // "PrimaryForPartitionIds" attribute of this object. // HIDDEN FRIENDS friend bool operator==(const ClusterNodeInfo& lhs, const ClusterNodeInfo& 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 ClusterNodeInfo& lhs, const ClusterNodeInfo& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const ClusterNodeInfo& 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); } @@ -8403,10 +8484,10 @@ class ClusterNodeInfo { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const ClusterNodeInfo& 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 - // 'ClusterNodeInfo'. + // 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 + // 'ClusterNodeInfo'. { object.hashAppendImpl(hashAlg); } @@ -8416,28 +8497,28 @@ class ClusterNodeInfo { // TRAITS -BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS( - mqbcmd::ClusterNodeInfo) +BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::ClusterNodeInfo) namespace mqbcmd { -// ================== -// class ClusterQueue -// ================== + // ================== + // class ClusterQueue + // ================== class ClusterQueue { + // INSTANCE DATA - bsl::vector d_subIds; - bsl::vector d_contexts; - bsl::string d_uri; - bsl::string d_key; - bdlb::NullableValue d_primaryNodeDescription; - unsigned int d_numInFlightContexts; - unsigned int d_id; - int d_partitionId; - bool d_isAssigned; - bool d_isPrimaryAvailable; - bool d_isCreated; + bsl::vector d_subIds; + bsl::vector d_contexts; + bsl::string d_uri; + bsl::string d_key; + bdlb::NullableValue d_primaryNodeDescription; + unsigned int d_numInFlightContexts; + unsigned int d_id; + int d_partitionId; + bool d_isAssigned; + bool d_isPrimaryAvailable; + bool d_isCreated; // PRIVATE ACCESSORS template @@ -8448,33 +8529,35 @@ class ClusterQueue { public: // TYPES enum { - ATTRIBUTE_ID_URI = 0, - ATTRIBUTE_ID_NUM_IN_FLIGHT_CONTEXTS = 1, - ATTRIBUTE_ID_IS_ASSIGNED = 2, - ATTRIBUTE_ID_IS_PRIMARY_AVAILABLE = 3, - ATTRIBUTE_ID_ID = 4, - ATTRIBUTE_ID_SUB_IDS = 5, - ATTRIBUTE_ID_PARTITION_ID = 6, - ATTRIBUTE_ID_PRIMARY_NODE_DESCRIPTION = 7, - ATTRIBUTE_ID_KEY = 8, - ATTRIBUTE_ID_IS_CREATED = 9, - ATTRIBUTE_ID_CONTEXTS = 10 + ATTRIBUTE_ID_URI = 0 + , ATTRIBUTE_ID_NUM_IN_FLIGHT_CONTEXTS = 1 + , ATTRIBUTE_ID_IS_ASSIGNED = 2 + , ATTRIBUTE_ID_IS_PRIMARY_AVAILABLE = 3 + , ATTRIBUTE_ID_ID = 4 + , ATTRIBUTE_ID_SUB_IDS = 5 + , ATTRIBUTE_ID_PARTITION_ID = 6 + , ATTRIBUTE_ID_PRIMARY_NODE_DESCRIPTION = 7 + , ATTRIBUTE_ID_KEY = 8 + , ATTRIBUTE_ID_IS_CREATED = 9 + , ATTRIBUTE_ID_CONTEXTS = 10 }; - enum { NUM_ATTRIBUTES = 11 }; + enum { + NUM_ATTRIBUTES = 11 + }; enum { - ATTRIBUTE_INDEX_URI = 0, - ATTRIBUTE_INDEX_NUM_IN_FLIGHT_CONTEXTS = 1, - ATTRIBUTE_INDEX_IS_ASSIGNED = 2, - ATTRIBUTE_INDEX_IS_PRIMARY_AVAILABLE = 3, - ATTRIBUTE_INDEX_ID = 4, - ATTRIBUTE_INDEX_SUB_IDS = 5, - ATTRIBUTE_INDEX_PARTITION_ID = 6, - ATTRIBUTE_INDEX_PRIMARY_NODE_DESCRIPTION = 7, - ATTRIBUTE_INDEX_KEY = 8, - ATTRIBUTE_INDEX_IS_CREATED = 9, - ATTRIBUTE_INDEX_CONTEXTS = 10 + ATTRIBUTE_INDEX_URI = 0 + , ATTRIBUTE_INDEX_NUM_IN_FLIGHT_CONTEXTS = 1 + , ATTRIBUTE_INDEX_IS_ASSIGNED = 2 + , ATTRIBUTE_INDEX_IS_PRIMARY_AVAILABLE = 3 + , ATTRIBUTE_INDEX_ID = 4 + , ATTRIBUTE_INDEX_SUB_IDS = 5 + , ATTRIBUTE_INDEX_PARTITION_ID = 6 + , ATTRIBUTE_INDEX_PRIMARY_NODE_DESCRIPTION = 7 + , ATTRIBUTE_INDEX_KEY = 8 + , ATTRIBUTE_INDEX_IS_CREATED = 9 + , ATTRIBUTE_INDEX_CONTEXTS = 10 }; // CONSTANTS @@ -8484,237 +8567,240 @@ class ClusterQueue { 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 ClusterQueue(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'ClusterQueue' having the default value. - // Use the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit ClusterQueue(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'ClusterQueue' having the default value. + // Use the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. ClusterQueue(const ClusterQueue& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'ClusterQueue' 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 'ClusterQueue' 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) ClusterQueue(ClusterQueue&& original) noexcept; - // Create an object of type 'ClusterQueue' 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 'ClusterQueue' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - ClusterQueue(ClusterQueue&& original, bslma::Allocator* basicAllocator); - // Create an object of type 'ClusterQueue' 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. + ClusterQueue(ClusterQueue&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'ClusterQueue' 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 ~ClusterQueue(); - // Destroy this object. + // Destroy this object. // MANIPULATORS ClusterQueue& operator=(const ClusterQueue& 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) ClusterQueue& operator=(ClusterQueue&& 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& uri(); - // Return a reference to the modifiable "Uri" attribute of this object. + // Return a reference to the modifiable "Uri" attribute of this object. unsigned int& numInFlightContexts(); - // Return a reference to the modifiable "NumInFlightContexts" attribute - // of this object. + // Return a reference to the modifiable "NumInFlightContexts" attribute + // of this object. bool& isAssigned(); - // Return a reference to the modifiable "IsAssigned" attribute of this - // object. + // Return a reference to the modifiable "IsAssigned" attribute of this + // object. bool& isPrimaryAvailable(); - // Return a reference to the modifiable "IsPrimaryAvailable" attribute - // of this object. + // Return a reference to the modifiable "IsPrimaryAvailable" attribute + // of this object. unsigned 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::vector& subIds(); - // Return a reference to the modifiable "SubIds" attribute of this - // object. + // Return a reference to the modifiable "SubIds" 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. bdlb::NullableValue& primaryNodeDescription(); - // Return a reference to the modifiable "PrimaryNodeDescription" - // attribute of this object. + // Return a reference to the modifiable "PrimaryNodeDescription" + // attribute of this object. bsl::string& key(); - // Return a reference to the modifiable "Key" attribute of this object. + // Return a reference to the modifiable "Key" attribute of this object. bool& isCreated(); - // Return a reference to the modifiable "IsCreated" attribute of this - // object. + // Return a reference to the modifiable "IsCreated" attribute of this + // object. bsl::vector& contexts(); - // Return a reference to the modifiable "Contexts" attribute of this - // object. + // Return a reference to the modifiable "Contexts" 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& uri() const; - // Return a reference offering non-modifiable access to the "Uri" - // attribute of this object. + // Return a reference offering non-modifiable access to the "Uri" + // attribute of this object. unsigned int numInFlightContexts() const; - // Return the value of the "NumInFlightContexts" attribute of this - // object. + // Return the value of the "NumInFlightContexts" attribute of this + // object. bool isAssigned() const; - // Return the value of the "IsAssigned" attribute of this object. + // Return the value of the "IsAssigned" attribute of this object. bool isPrimaryAvailable() const; - // Return the value of the "IsPrimaryAvailable" attribute of this - // object. + // Return the value of the "IsPrimaryAvailable" attribute of this + // object. unsigned 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::vector& subIds() const; - // Return a reference offering non-modifiable access to the "SubIds" - // attribute of this object. + // Return a reference offering non-modifiable access to the "SubIds" + // 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. const bdlb::NullableValue& primaryNodeDescription() const; - // Return a reference offering non-modifiable access to the - // "PrimaryNodeDescription" attribute of this object. + // Return a reference offering non-modifiable access to the + // "PrimaryNodeDescription" attribute of this object. const bsl::string& key() const; - // Return a reference offering non-modifiable access to the "Key" - // attribute of this object. + // Return a reference offering non-modifiable access to the "Key" + // attribute of this object. bool isCreated() const; - // Return the value of the "IsCreated" attribute of this object. + // Return the value of the "IsCreated" attribute of this object. const bsl::vector& contexts() const; - // Return a reference offering non-modifiable access to the "Contexts" - // attribute of this object. + // Return a reference offering non-modifiable access to the "Contexts" + // attribute of this object. // HIDDEN FRIENDS friend bool operator==(const ClusterQueue& lhs, const ClusterQueue& 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 ClusterQueue& lhs, const ClusterQueue& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const ClusterQueue& 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); } @@ -8722,10 +8808,10 @@ class ClusterQueue { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const ClusterQueue& 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 - // 'ClusterQueue'. + // 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 + // 'ClusterQueue'. { object.hashAppendImpl(hashAlg); } @@ -8739,18 +8825,19 @@ BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::ClusterQueue) namespace mqbcmd { -// =================== -// class DangerCommand -// =================== + // =================== + // class DangerCommand + // =================== class DangerCommand { + // INSTANCE DATA union { - bsls::ObjectBuffer d_shutdown; - bsls::ObjectBuffer d_terminate; + bsls::ObjectBuffer< Void > d_shutdown; + bsls::ObjectBuffer< Void > d_terminate; }; - int d_selectionId; + int d_selectionId; // PRIVATE ACCESSORS template @@ -8762,14 +8849,19 @@ class DangerCommand { // TYPES enum { - SELECTION_ID_UNDEFINED = -1, - SELECTION_ID_SHUTDOWN = 0, - SELECTION_ID_TERMINATE = 1 + SELECTION_ID_UNDEFINED = -1 + , SELECTION_ID_SHUTDOWN = 0 + , SELECTION_ID_TERMINATE = 1 }; - enum { NUM_SELECTIONS = 2 }; + enum { + NUM_SELECTIONS = 2 + }; - enum { SELECTION_INDEX_SHUTDOWN = 0, SELECTION_INDEX_TERMINATE = 1 }; + enum { + SELECTION_INDEX_SHUTDOWN = 0 + , SELECTION_INDEX_TERMINATE = 1 + }; // CONSTANTS static const char CLASS_NAME[]; @@ -8777,173 +8869,175 @@ class DangerCommand { 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 DangerCommand(); - // Create an object of type 'DangerCommand' having the default value. + // Create an object of type 'DangerCommand' having the default value. DangerCommand(const DangerCommand& original); - // Create an object of type 'DangerCommand' having the value of the - // specified 'original' object. + // Create an object of type 'DangerCommand' having the value of the + // specified 'original' 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(DangerCommand&& original) noexcept; - // Create an object of type 'DangerCommand' 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 'DangerCommand' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. #endif ~DangerCommand(); - // Destroy this object. + // Destroy this object. // MANIPULATORS DangerCommand& operator=(const DangerCommand& 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) DangerCommand& operator=(DangerCommand&& 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). Void& makeShutdown(); Void& makeShutdown(const Void& 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) Void& makeShutdown(Void&& value); #endif - // Set the value of this object to be a "Shutdown" value. Optionally - // specify the 'value' of the "Shutdown". If 'value' is not specified, - // the default "Shutdown" value is used. + // Set the value of this object to be a "Shutdown" value. Optionally + // specify the 'value' of the "Shutdown". If 'value' is not specified, + // the default "Shutdown" value is used. Void& makeTerminate(); Void& makeTerminate(const Void& 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) Void& makeTerminate(Void&& value); #endif - // Set the value of this object to be a "Terminate" value. Optionally - // specify the 'value' of the "Terminate". If 'value' is not - // specified, the default "Terminate" value is used. + // Set the value of this object to be a "Terminate" value. Optionally + // specify the 'value' of the "Terminate". If 'value' is not + // specified, the default "Terminate" 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. Void& shutdown(); - // Return a reference to the modifiable "Shutdown" selection of this - // object if "Shutdown" is the current selection. The behavior is - // undefined unless "Shutdown" is the selection of this object. + // Return a reference to the modifiable "Shutdown" selection of this + // object if "Shutdown" is the current selection. The behavior is + // undefined unless "Shutdown" is the selection of this object. Void& terminate(); - // Return a reference to the modifiable "Terminate" selection of this - // object if "Terminate" is the current selection. The behavior is - // undefined unless "Terminate" is the selection of this object. + // Return a reference to the modifiable "Terminate" selection of this + // object if "Terminate" is the current selection. The behavior is + // undefined unless "Terminate" 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 Void& shutdown() const; - // Return a reference to the non-modifiable "Shutdown" selection of - // this object if "Shutdown" is the current selection. The behavior is - // undefined unless "Shutdown" is the selection of this object. + // Return a reference to the non-modifiable "Shutdown" selection of + // this object if "Shutdown" is the current selection. The behavior is + // undefined unless "Shutdown" is the selection of this object. const Void& terminate() const; - // Return a reference to the non-modifiable "Terminate" selection of - // this object if "Terminate" is the current selection. The behavior - // is undefined unless "Terminate" is the selection of this object. + // Return a reference to the non-modifiable "Terminate" selection of + // this object if "Terminate" is the current selection. The behavior + // is undefined unless "Terminate" is the selection of this object. bool isShutdownValue() const; - // Return 'true' if the value of this object is a "Shutdown" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Shutdown" value, and + // return 'false' otherwise. bool isTerminateValue() const; - // Return 'true' if the value of this object is a "Terminate" value, - // and return 'false' otherwise. + // Return 'true' if the value of this object is a "Terminate" 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 DangerCommand& lhs, const DangerCommand& rhs) - // Return 'true' if the specified 'lhs' and 'rhs' objects have the same - // value, and 'false' otherwise. Two 'DangerCommand' 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 'DangerCommand' 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 DangerCommand& lhs, const DangerCommand& 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 DangerCommand& 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); } @@ -8951,10 +9045,10 @@ class DangerCommand { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const DangerCommand& 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 - // 'DangerCommand'. + // 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 + // 'DangerCommand'. { return object.hashAppendImpl(hashAlg); } @@ -8968,16 +9062,17 @@ BDLAT_DECL_CHOICE_WITH_BITWISEMOVEABLE_TRAITS(mqbcmd::DangerCommand) namespace mqbcmd { -// ================= -// class ElectorInfo -// ================= + // ================= + // class ElectorInfo + // ================= class ElectorInfo { + // INSTANCE DATA - bsl::string d_leaderNode; - LeaderMessageSequence d_leaderMessageSequence; - LeaderStatus::Value d_leaderStatus; - ElectorState::Value d_electorState; + bsl::string d_leaderNode; + LeaderMessageSequence d_leaderMessageSequence; + LeaderStatus::Value d_leaderStatus; + ElectorState::Value d_electorState; // PRIVATE ACCESSORS template @@ -8988,19 +9083,21 @@ class ElectorInfo { public: // TYPES enum { - ATTRIBUTE_ID_ELECTOR_STATE = 0, - ATTRIBUTE_ID_LEADER_NODE = 1, - ATTRIBUTE_ID_LEADER_MESSAGE_SEQUENCE = 2, - ATTRIBUTE_ID_LEADER_STATUS = 3 + ATTRIBUTE_ID_ELECTOR_STATE = 0 + , ATTRIBUTE_ID_LEADER_NODE = 1 + , ATTRIBUTE_ID_LEADER_MESSAGE_SEQUENCE = 2 + , ATTRIBUTE_ID_LEADER_STATUS = 3 }; - enum { NUM_ATTRIBUTES = 4 }; + enum { + NUM_ATTRIBUTES = 4 + }; enum { - ATTRIBUTE_INDEX_ELECTOR_STATE = 0, - ATTRIBUTE_INDEX_LEADER_NODE = 1, - ATTRIBUTE_INDEX_LEADER_MESSAGE_SEQUENCE = 2, - ATTRIBUTE_INDEX_LEADER_STATUS = 3 + ATTRIBUTE_INDEX_ELECTOR_STATE = 0 + , ATTRIBUTE_INDEX_LEADER_NODE = 1 + , ATTRIBUTE_INDEX_LEADER_MESSAGE_SEQUENCE = 2 + , ATTRIBUTE_INDEX_LEADER_STATUS = 3 }; // CONSTANTS @@ -9010,186 +9107,189 @@ class ElectorInfo { 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 ElectorInfo(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'ElectorInfo' having the default value. - // Use the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit ElectorInfo(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'ElectorInfo' having the default value. + // Use the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. ElectorInfo(const ElectorInfo& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'ElectorInfo' 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 'ElectorInfo' 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) ElectorInfo(ElectorInfo&& original) noexcept; - // Create an object of type 'ElectorInfo' 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 'ElectorInfo' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - ElectorInfo(ElectorInfo&& original, bslma::Allocator* basicAllocator); - // Create an object of type 'ElectorInfo' 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. + ElectorInfo(ElectorInfo&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'ElectorInfo' 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 ~ElectorInfo(); - // Destroy this object. + // Destroy this object. // MANIPULATORS ElectorInfo& operator=(const ElectorInfo& 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) ElectorInfo& operator=(ElectorInfo&& 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. ElectorState::Value& electorState(); - // Return a reference to the modifiable "ElectorState" attribute of - // this object. + // Return a reference to the modifiable "ElectorState" attribute of + // this object. bsl::string& leaderNode(); - // Return a reference to the modifiable "LeaderNode" attribute of this - // object. + // Return a reference to the modifiable "LeaderNode" attribute of this + // object. LeaderMessageSequence& leaderMessageSequence(); - // Return a reference to the modifiable "LeaderMessageSequence" - // attribute of this object. + // Return a reference to the modifiable "LeaderMessageSequence" + // attribute of this object. LeaderStatus::Value& leaderStatus(); - // Return a reference to the modifiable "LeaderStatus" attribute of - // this object. + // Return a reference to the modifiable "LeaderStatus" 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. ElectorState::Value electorState() const; - // Return the value of the "ElectorState" attribute of this object. + // Return the value of the "ElectorState" attribute of this object. const bsl::string& leaderNode() const; - // Return a reference offering non-modifiable access to the - // "LeaderNode" attribute of this object. + // Return a reference offering non-modifiable access to the + // "LeaderNode" attribute of this object. const LeaderMessageSequence& leaderMessageSequence() const; - // Return a reference offering non-modifiable access to the - // "LeaderMessageSequence" attribute of this object. + // Return a reference offering non-modifiable access to the + // "LeaderMessageSequence" attribute of this object. LeaderStatus::Value leaderStatus() const; - // Return the value of the "LeaderStatus" attribute of this object. + // Return the value of the "LeaderStatus" attribute of this object. // HIDDEN FRIENDS friend bool operator==(const ElectorInfo& lhs, const ElectorInfo& 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 ElectorInfo& lhs, const ElectorInfo& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const ElectorInfo& 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); } @@ -9197,9 +9297,9 @@ class ElectorInfo { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const ElectorInfo& 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 'ElectorInfo'. + // 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 'ElectorInfo'. { object.hashAppendImpl(hashAlg); } @@ -9213,18 +9313,19 @@ BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::ElectorInfo) namespace mqbcmd { -// ====================== -// class GetTunableChoice -// ====================== + // ====================== + // class GetTunableChoice + // ====================== class GetTunableChoice { + // INSTANCE DATA union { - bsls::ObjectBuffer d_all; - bsls::ObjectBuffer d_self; + bsls::ObjectBuffer< Void > d_all; + bsls::ObjectBuffer< Void > d_self; }; - int d_selectionId; + int d_selectionId; // PRIVATE ACCESSORS template @@ -9236,14 +9337,19 @@ class GetTunableChoice { // TYPES enum { - SELECTION_ID_UNDEFINED = -1, - SELECTION_ID_ALL = 0, - SELECTION_ID_SELF = 1 + SELECTION_ID_UNDEFINED = -1 + , SELECTION_ID_ALL = 0 + , SELECTION_ID_SELF = 1 }; - enum { NUM_SELECTIONS = 2 }; + enum { + NUM_SELECTIONS = 2 + }; - enum { SELECTION_INDEX_ALL = 0, SELECTION_INDEX_SELF = 1 }; + enum { + SELECTION_INDEX_ALL = 0 + , SELECTION_INDEX_SELF = 1 + }; // CONSTANTS static const char CLASS_NAME[]; @@ -9251,176 +9357,178 @@ class GetTunableChoice { 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 GetTunableChoice(); - // Create an object of type 'GetTunableChoice' having the default - // value. + // Create an object of type 'GetTunableChoice' having the default + // value. GetTunableChoice(const GetTunableChoice& original); - // Create an object of type 'GetTunableChoice' having the value of the - // specified 'original' object. + // Create an object of type 'GetTunableChoice' having the value of the + // specified 'original' 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) GetTunableChoice(GetTunableChoice&& original) noexcept; - // Create an object of type 'GetTunableChoice' 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 'GetTunableChoice' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. #endif ~GetTunableChoice(); - // Destroy this object. + // Destroy this object. // MANIPULATORS GetTunableChoice& operator=(const GetTunableChoice& 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) GetTunableChoice& operator=(GetTunableChoice&& 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). Void& makeAll(); Void& makeAll(const Void& 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) Void& makeAll(Void&& value); #endif - // Set the value of this object to be a "All" value. Optionally - // specify the 'value' of the "All". If 'value' is not specified, the - // default "All" value is used. + // Set the value of this object to be a "All" value. Optionally + // specify the 'value' of the "All". If 'value' is not specified, the + // default "All" value is used. Void& makeSelf(); Void& makeSelf(const Void& 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) Void& makeSelf(Void&& value); #endif - // Set the value of this object to be a "Self" value. Optionally - // specify the 'value' of the "Self". If 'value' is not specified, the - // default "Self" value is used. + // Set the value of this object to be a "Self" value. Optionally + // specify the 'value' of the "Self". If 'value' is not specified, the + // default "Self" 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. Void& all(); - // Return a reference to the modifiable "All" selection of this object - // if "All" is the current selection. The behavior is undefined unless - // "All" is the selection of this object. + // Return a reference to the modifiable "All" selection of this object + // if "All" is the current selection. The behavior is undefined unless + // "All" is the selection of this object. Void& self(); - // Return a reference to the modifiable "Self" selection of this object - // if "Self" is the current selection. The behavior is undefined - // unless "Self" is the selection of this object. + // Return a reference to the modifiable "Self" selection of this object + // if "Self" is the current selection. The behavior is undefined + // unless "Self" 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 Void& all() const; - // Return a reference to the non-modifiable "All" selection of this - // object if "All" is the current selection. The behavior is undefined - // unless "All" is the selection of this object. + // Return a reference to the non-modifiable "All" selection of this + // object if "All" is the current selection. The behavior is undefined + // unless "All" is the selection of this object. const Void& self() const; - // Return a reference to the non-modifiable "Self" selection of this - // object if "Self" is the current selection. The behavior is - // undefined unless "Self" is the selection of this object. + // Return a reference to the non-modifiable "Self" selection of this + // object if "Self" is the current selection. The behavior is + // undefined unless "Self" is the selection of this object. bool isAllValue() const; - // Return 'true' if the value of this object is a "All" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "All" value, and + // return 'false' otherwise. bool isSelfValue() const; - // Return 'true' if the value of this object is a "Self" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Self" 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 GetTunableChoice& lhs, const GetTunableChoice& rhs) - // Return 'true' if the specified 'lhs' and 'rhs' objects have the same - // value, and 'false' otherwise. Two 'GetTunableChoice' 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 'GetTunableChoice' 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 GetTunableChoice& lhs, const GetTunableChoice& 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 GetTunableChoice& 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); } @@ -9428,10 +9536,10 @@ class GetTunableChoice { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const GetTunableChoice& 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 - // 'GetTunableChoice'. + // 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 + // 'GetTunableChoice'. { return object.hashAppendImpl(hashAlg); } @@ -9445,22 +9553,31 @@ BDLAT_DECL_CHOICE_WITH_BITWISEMOVEABLE_TRAITS(mqbcmd::GetTunableChoice) namespace mqbcmd { -// ========== -// class Help -// ========== + // ========== + // class Help + // ========== class Help { + // INSTANCE DATA - bsl::vector d_commands; - bool d_isPlumbing; + bsl::vector d_commands; + bool d_isPlumbing; public: // TYPES - enum { ATTRIBUTE_ID_COMMANDS = 0, ATTRIBUTE_ID_IS_PLUMBING = 1 }; + enum { + ATTRIBUTE_ID_COMMANDS = 0 + , ATTRIBUTE_ID_IS_PLUMBING = 1 + }; - enum { NUM_ATTRIBUTES = 2 }; + enum { + NUM_ATTRIBUTES = 2 + }; - enum { ATTRIBUTE_INDEX_COMMANDS = 0, ATTRIBUTE_INDEX_IS_PLUMBING = 1 }; + enum { + ATTRIBUTE_INDEX_COMMANDS = 0 + , ATTRIBUTE_INDEX_IS_PLUMBING = 1 + }; // CONSTANTS static const char CLASS_NAME[]; @@ -9469,179 +9586,183 @@ class Help { 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 Help(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'Help' having the default value. Use the - // optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. - - Help(const Help& original, bslma::Allocator* basicAllocator = 0); - // Create an object of type 'Help' 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 Help(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'Help' having the default value. Use the + // optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. + + Help(const Help& original, + bslma::Allocator *basicAllocator = 0); + // Create an object of type 'Help' 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) Help(Help&& original) noexcept; - // Create an object of type 'Help' 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 'Help' having the value of the specified + // 'original' object. After performing this action, the 'original' + // object will be left in a valid, but unspecified state. - Help(Help&& original, bslma::Allocator* basicAllocator); - // Create an object of type 'Help' 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. + Help(Help&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'Help' 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 ~Help(); - // Destroy this object. + // Destroy this object. // MANIPULATORS Help& operator=(const Help& 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) Help& operator=(Help&& 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::vector& commands(); - // Return a reference to the modifiable "Commands" attribute of this - // object. + // Return a reference to the modifiable "Commands" attribute of this + // object. bool& isPlumbing(); - // Return a reference to the modifiable "IsPlumbing" attribute of this - // object. + // Return a reference to the modifiable "IsPlumbing" 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::vector& commands() const; - // Return a reference offering non-modifiable access to the "Commands" - // attribute of this object. + // Return a reference offering non-modifiable access to the "Commands" + // attribute of this object. bool isPlumbing() const; - // Return the value of the "IsPlumbing" attribute of this object. + // Return the value of the "IsPlumbing" attribute of this object. // HIDDEN FRIENDS friend bool operator==(const Help& lhs, const Help& 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.commands() == rhs.commands() && lhs.isPlumbing() == rhs.isPlumbing(); } friend bool operator!=(const Help& lhs, const Help& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const Help& 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 Help& 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 'Help'. + // 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 'Help'. { using bslh::hashAppend; hashAppend(hashAlg, object.commands()); @@ -9657,27 +9778,30 @@ BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::Help) namespace mqbcmd { -// ================================ -// class MessageGroupIdManagerIndex -// ================================ + // ================================ + // class MessageGroupIdManagerIndex + // ================================ class MessageGroupIdManagerIndex { + // INSTANCE DATA - bsl::vector d_leastRecentlyUsedGroupIds; - bsl::vector d_numMsgGroupsPerClient; + bsl::vector d_leastRecentlyUsedGroupIds; + bsl::vector d_numMsgGroupsPerClient; public: // TYPES enum { - ATTRIBUTE_ID_LEAST_RECENTLY_USED_GROUP_IDS = 0, - ATTRIBUTE_ID_NUM_MSG_GROUPS_PER_CLIENT = 1 + ATTRIBUTE_ID_LEAST_RECENTLY_USED_GROUP_IDS = 0 + , ATTRIBUTE_ID_NUM_MSG_GROUPS_PER_CLIENT = 1 }; - enum { NUM_ATTRIBUTES = 2 }; + enum { + NUM_ATTRIBUTES = 2 + }; enum { - ATTRIBUTE_INDEX_LEAST_RECENTLY_USED_GROUP_IDS = 0, - ATTRIBUTE_INDEX_NUM_MSG_GROUPS_PER_CLIENT = 1 + ATTRIBUTE_INDEX_LEAST_RECENTLY_USED_GROUP_IDS = 0 + , ATTRIBUTE_INDEX_NUM_MSG_GROUPS_PER_CLIENT = 1 }; // CONSTANTS @@ -9687,180 +9811,179 @@ class MessageGroupIdManagerIndex { 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 MessageGroupIdManagerIndex(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'MessageGroupIdManagerIndex' having the - // default value. Use the optionally specified 'basicAllocator' to - // supply memory. If 'basicAllocator' is 0, the currently installed - // default allocator is used. + explicit MessageGroupIdManagerIndex(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'MessageGroupIdManagerIndex' having the + // default value. Use the optionally specified 'basicAllocator' to + // supply memory. If 'basicAllocator' is 0, the currently installed + // default allocator is used. MessageGroupIdManagerIndex(const MessageGroupIdManagerIndex& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'MessageGroupIdManagerIndex' 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 'MessageGroupIdManagerIndex' 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) MessageGroupIdManagerIndex(MessageGroupIdManagerIndex&& original) noexcept; - // Create an object of type 'MessageGroupIdManagerIndex' 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 'MessageGroupIdManagerIndex' having the + // value of the specified 'original' object. After performing this + // action, the 'original' object will be left in a valid, but + // unspecified state. MessageGroupIdManagerIndex(MessageGroupIdManagerIndex&& original, - bslma::Allocator* basicAllocator); - // Create an object of type 'MessageGroupIdManagerIndex' 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 'MessageGroupIdManagerIndex' 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 ~MessageGroupIdManagerIndex(); - // Destroy this object. + // Destroy this object. // MANIPULATORS - MessageGroupIdManagerIndex& - operator=(const MessageGroupIdManagerIndex& rhs); - // Assign to this object the value of the specified 'rhs' object. + MessageGroupIdManagerIndex& operator=(const MessageGroupIdManagerIndex& rhs); + // 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) MessageGroupIdManagerIndex& operator=(MessageGroupIdManagerIndex&& 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::vector& leastRecentlyUsedGroupIds(); - // Return a reference to the modifiable "LeastRecentlyUsedGroupIds" - // attribute of this object. + // Return a reference to the modifiable "LeastRecentlyUsedGroupIds" + // attribute of this object. bsl::vector& numMsgGroupsPerClient(); - // Return a reference to the modifiable "NumMsgGroupsPerClient" - // attribute of this object. + // Return a reference to the modifiable "NumMsgGroupsPerClient" + // 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. - - const bsl::vector& - leastRecentlyUsedGroupIds() const; - // Return a reference offering non-modifiable access to the - // "LeastRecentlyUsedGroupIds" attribute of this object. + // 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::vector& leastRecentlyUsedGroupIds() const; + // Return a reference offering non-modifiable access to the + // "LeastRecentlyUsedGroupIds" attribute of this object. const bsl::vector& numMsgGroupsPerClient() const; - // Return a reference offering non-modifiable access to the - // "NumMsgGroupsPerClient" attribute of this object. + // Return a reference offering non-modifiable access to the + // "NumMsgGroupsPerClient" attribute of this object. // HIDDEN FRIENDS friend bool operator==(const MessageGroupIdManagerIndex& lhs, const MessageGroupIdManagerIndex& 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.leastRecentlyUsedGroupIds() == - rhs.leastRecentlyUsedGroupIds() && + return lhs.leastRecentlyUsedGroupIds() == rhs.leastRecentlyUsedGroupIds() && lhs.numMsgGroupsPerClient() == rhs.numMsgGroupsPerClient(); } friend bool operator!=(const MessageGroupIdManagerIndex& lhs, const MessageGroupIdManagerIndex& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const MessageGroupIdManagerIndex& 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); } @@ -9868,10 +9991,10 @@ class MessageGroupIdManagerIndex { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const MessageGroupIdManagerIndex& 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 - // 'MessageGroupIdManagerIndex'. + // 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 + // 'MessageGroupIdManagerIndex'. { using bslh::hashAppend; hashAppend(hashAlg, object.leastRecentlyUsedGroupIds()); @@ -9883,22 +10006,22 @@ class MessageGroupIdManagerIndex { // TRAITS -BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS( - mqbcmd::MessageGroupIdManagerIndex) +BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::MessageGroupIdManagerIndex) namespace mqbcmd { -// =================== -// class PartitionInfo -// =================== + // =================== + // class PartitionInfo + // =================== class PartitionInfo { + // INSTANCE DATA - bdlb::NullableValue d_primaryNode; - unsigned int d_primaryLeaseId; - int d_numQueuesMapped; - int d_numActiveQueues; - PrimaryStatus::Value d_primaryStatus; + bdlb::NullableValue d_primaryNode; + unsigned int d_primaryLeaseId; + int d_numQueuesMapped; + int d_numActiveQueues; + PrimaryStatus::Value d_primaryStatus; // PRIVATE ACCESSORS template @@ -9909,21 +10032,23 @@ class PartitionInfo { public: // TYPES enum { - ATTRIBUTE_ID_NUM_QUEUES_MAPPED = 0, - ATTRIBUTE_ID_NUM_ACTIVE_QUEUES = 1, - ATTRIBUTE_ID_PRIMARY_NODE = 2, - ATTRIBUTE_ID_PRIMARY_LEASE_ID = 3, - ATTRIBUTE_ID_PRIMARY_STATUS = 4 + ATTRIBUTE_ID_NUM_QUEUES_MAPPED = 0 + , ATTRIBUTE_ID_NUM_ACTIVE_QUEUES = 1 + , ATTRIBUTE_ID_PRIMARY_NODE = 2 + , ATTRIBUTE_ID_PRIMARY_LEASE_ID = 3 + , ATTRIBUTE_ID_PRIMARY_STATUS = 4 }; - enum { NUM_ATTRIBUTES = 5 }; + enum { + NUM_ATTRIBUTES = 5 + }; enum { - ATTRIBUTE_INDEX_NUM_QUEUES_MAPPED = 0, - ATTRIBUTE_INDEX_NUM_ACTIVE_QUEUES = 1, - ATTRIBUTE_INDEX_PRIMARY_NODE = 2, - ATTRIBUTE_INDEX_PRIMARY_LEASE_ID = 3, - ATTRIBUTE_INDEX_PRIMARY_STATUS = 4 + ATTRIBUTE_INDEX_NUM_QUEUES_MAPPED = 0 + , ATTRIBUTE_INDEX_NUM_ACTIVE_QUEUES = 1 + , ATTRIBUTE_INDEX_PRIMARY_NODE = 2 + , ATTRIBUTE_INDEX_PRIMARY_LEASE_ID = 3 + , ATTRIBUTE_INDEX_PRIMARY_STATUS = 4 }; // CONSTANTS @@ -9933,192 +10058,195 @@ class PartitionInfo { 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 PartitionInfo(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'PartitionInfo' having the default value. - // Use the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit PartitionInfo(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'PartitionInfo' having the default value. + // Use the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. PartitionInfo(const PartitionInfo& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'PartitionInfo' 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 'PartitionInfo' 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) PartitionInfo(PartitionInfo&& original) noexcept; - // Create an object of type 'PartitionInfo' 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 'PartitionInfo' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - PartitionInfo(PartitionInfo&& original, bslma::Allocator* basicAllocator); - // Create an object of type 'PartitionInfo' 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. + PartitionInfo(PartitionInfo&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'PartitionInfo' 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 ~PartitionInfo(); - // Destroy this object. + // Destroy this object. // MANIPULATORS PartitionInfo& operator=(const PartitionInfo& 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) PartitionInfo& operator=(PartitionInfo&& 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& numQueuesMapped(); - // Return a reference to the modifiable "NumQueuesMapped" attribute of - // this object. + // Return a reference to the modifiable "NumQueuesMapped" attribute of + // this object. int& numActiveQueues(); - // Return a reference to the modifiable "NumActiveQueues" attribute of - // this object. + // Return a reference to the modifiable "NumActiveQueues" attribute of + // this object. bdlb::NullableValue& primaryNode(); - // Return a reference to the modifiable "PrimaryNode" attribute of this - // object. + // Return a reference to the modifiable "PrimaryNode" attribute of this + // object. unsigned int& primaryLeaseId(); - // Return a reference to the modifiable "PrimaryLeaseId" attribute of - // this object. + // Return a reference to the modifiable "PrimaryLeaseId" attribute of + // this object. PrimaryStatus::Value& primaryStatus(); - // Return a reference to the modifiable "PrimaryStatus" attribute of - // this object. + // Return a reference to the modifiable "PrimaryStatus" 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 numQueuesMapped() const; - // Return the value of the "NumQueuesMapped" attribute of this object. + // Return the value of the "NumQueuesMapped" attribute of this object. int numActiveQueues() const; - // Return the value of the "NumActiveQueues" attribute of this object. + // Return the value of the "NumActiveQueues" attribute of this object. const bdlb::NullableValue& primaryNode() const; - // Return a reference offering non-modifiable access to the - // "PrimaryNode" attribute of this object. + // Return a reference offering non-modifiable access to the + // "PrimaryNode" attribute of this object. unsigned int primaryLeaseId() const; - // Return the value of the "PrimaryLeaseId" attribute of this object. + // Return the value of the "PrimaryLeaseId" attribute of this object. PrimaryStatus::Value primaryStatus() const; - // Return the value of the "PrimaryStatus" attribute of this object. + // Return the value of the "PrimaryStatus" attribute of this object. // HIDDEN FRIENDS friend bool operator==(const PartitionInfo& lhs, const PartitionInfo& 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 PartitionInfo& lhs, const PartitionInfo& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const PartitionInfo& 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); } @@ -10126,10 +10254,10 @@ class PartitionInfo { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const PartitionInfo& 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 - // 'PartitionInfo'. + // 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 + // 'PartitionInfo'. { object.hashAppendImpl(hashAlg); } @@ -10139,24 +10267,24 @@ class PartitionInfo { // TRAITS -BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS( - mqbcmd::PartitionInfo) +BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::PartitionInfo) namespace mqbcmd { -// ====================== -// class PurgeQueueResult -// ====================== + // ====================== + // class PurgeQueueResult + // ====================== class PurgeQueueResult { + // INSTANCE DATA union { - bsls::ObjectBuffer d_error; - bsls::ObjectBuffer d_queue; + bsls::ObjectBuffer< Error > d_error; + bsls::ObjectBuffer< PurgedQueueDetails > d_queue; }; - int d_selectionId; - bslma::Allocator* d_allocator_p; + int d_selectionId; + bslma::Allocator *d_allocator_p; // PRIVATE ACCESSORS template @@ -10168,14 +10296,19 @@ class PurgeQueueResult { // TYPES enum { - SELECTION_ID_UNDEFINED = -1, - SELECTION_ID_ERROR = 0, - SELECTION_ID_QUEUE = 1 + SELECTION_ID_UNDEFINED = -1 + , SELECTION_ID_ERROR = 0 + , SELECTION_ID_QUEUE = 1 }; - enum { NUM_SELECTIONS = 2 }; + enum { + NUM_SELECTIONS = 2 + }; - enum { SELECTION_INDEX_ERROR = 0, SELECTION_INDEX_QUEUE = 1 }; + enum { + SELECTION_INDEX_ERROR = 0 + , SELECTION_INDEX_QUEUE = 1 + }; // CONSTANTS static const char CLASS_NAME[]; @@ -10183,190 +10316,192 @@ class PurgeQueueResult { 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 PurgeQueueResult(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'PurgeQueueResult' having the default - // value. Use the optionally specified 'basicAllocator' to supply - // memory. If 'basicAllocator' is 0, the currently installed default - // allocator is used. + explicit PurgeQueueResult(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'PurgeQueueResult' having the default + // value. Use the optionally specified 'basicAllocator' to supply + // memory. If 'basicAllocator' is 0, the currently installed default + // allocator is used. PurgeQueueResult(const PurgeQueueResult& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'PurgeQueueResult' 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 'PurgeQueueResult' 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) PurgeQueueResult(PurgeQueueResult&& original) noexcept; - // Create an object of type 'PurgeQueueResult' 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 'PurgeQueueResult' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. PurgeQueueResult(PurgeQueueResult&& original, - bslma::Allocator* basicAllocator); - // Create an object of type 'PurgeQueueResult' 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 'PurgeQueueResult' 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 ~PurgeQueueResult(); - // Destroy this object. + // Destroy this object. // MANIPULATORS PurgeQueueResult& operator=(const PurgeQueueResult& 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) PurgeQueueResult& operator=(PurgeQueueResult&& 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). Error& makeError(); Error& makeError(const Error& 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) Error& makeError(Error&& value); #endif - // Set the value of this object to be a "Error" value. Optionally - // specify the 'value' of the "Error". If 'value' is not specified, - // the default "Error" value is used. + // Set the value of this object to be a "Error" value. Optionally + // specify the 'value' of the "Error". If 'value' is not specified, + // the default "Error" value is used. PurgedQueueDetails& makeQueue(); PurgedQueueDetails& makeQueue(const PurgedQueueDetails& 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) PurgedQueueDetails& makeQueue(PurgedQueueDetails&& value); #endif - // Set the value of this object to be a "Queue" value. Optionally - // specify the 'value' of the "Queue". If 'value' is not specified, - // the default "Queue" value is used. + // Set the value of this object to be a "Queue" value. Optionally + // specify the 'value' of the "Queue". If 'value' is not specified, + // the default "Queue" 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. Error& error(); - // Return a reference to the modifiable "Error" selection of this - // object if "Error" is the current selection. The behavior is - // undefined unless "Error" is the selection of this object. + // Return a reference to the modifiable "Error" selection of this + // object if "Error" is the current selection. The behavior is + // undefined unless "Error" is the selection of this object. PurgedQueueDetails& queue(); - // Return a reference to the modifiable "Queue" selection of this - // object if "Queue" is the current selection. The behavior is - // undefined unless "Queue" is the selection of this object. + // Return a reference to the modifiable "Queue" selection of this + // object if "Queue" is the current selection. The behavior is + // undefined unless "Queue" 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 Error& error() const; - // Return a reference to the non-modifiable "Error" selection of this - // object if "Error" is the current selection. The behavior is - // undefined unless "Error" is the selection of this object. + // Return a reference to the non-modifiable "Error" selection of this + // object if "Error" is the current selection. The behavior is + // undefined unless "Error" is the selection of this object. const PurgedQueueDetails& queue() const; - // Return a reference to the non-modifiable "Queue" selection of this - // object if "Queue" is the current selection. The behavior is - // undefined unless "Queue" is the selection of this object. + // Return a reference to the non-modifiable "Queue" selection of this + // object if "Queue" is the current selection. The behavior is + // undefined unless "Queue" is the selection of this object. bool isErrorValue() const; - // Return 'true' if the value of this object is a "Error" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Error" value, and + // return 'false' otherwise. bool isQueueValue() const; - // Return 'true' if the value of this object is a "Queue" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Queue" 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 PurgeQueueResult& lhs, const PurgeQueueResult& rhs) - // Return 'true' if the specified 'lhs' and 'rhs' objects have the same - // value, and 'false' otherwise. Two 'PurgeQueueResult' 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 'PurgeQueueResult' 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 PurgeQueueResult& lhs, const PurgeQueueResult& 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 PurgeQueueResult& 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); } @@ -10374,10 +10509,10 @@ class PurgeQueueResult { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const PurgeQueueResult& 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 - // 'PurgeQueueResult'. + // 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 + // 'PurgeQueueResult'. { return object.hashAppendImpl(hashAlg); } @@ -10387,26 +10522,26 @@ class PurgeQueueResult { // TRAITS -BDLAT_DECL_CHOICE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS( - mqbcmd::PurgeQueueResult) +BDLAT_DECL_CHOICE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::PurgeQueueResult) namespace mqbcmd { -// ================== -// class QueueCommand -// ================== + // ================== + // class QueueCommand + // ================== class QueueCommand { + // INSTANCE DATA union { - bsls::ObjectBuffer d_purgeAppId; - // The special value "*" indicates the entire queue. - bsls::ObjectBuffer d_internals; - bsls::ObjectBuffer d_messages; + bsls::ObjectBuffer< bsl::string > d_purgeAppId; + // The special value "*" indicates the entire queue. + bsls::ObjectBuffer< Void > d_internals; + bsls::ObjectBuffer< ListMessages > d_messages; }; - int d_selectionId; - bslma::Allocator* d_allocator_p; + int d_selectionId; + bslma::Allocator *d_allocator_p; // PRIVATE ACCESSORS template @@ -10418,18 +10553,20 @@ class QueueCommand { // TYPES enum { - SELECTION_ID_UNDEFINED = -1, - SELECTION_ID_PURGE_APP_ID = 0, - SELECTION_ID_INTERNALS = 1, - SELECTION_ID_MESSAGES = 2 + SELECTION_ID_UNDEFINED = -1 + , SELECTION_ID_PURGE_APP_ID = 0 + , SELECTION_ID_INTERNALS = 1 + , SELECTION_ID_MESSAGES = 2 }; - enum { NUM_SELECTIONS = 3 }; + enum { + NUM_SELECTIONS = 3 + }; enum { - SELECTION_INDEX_PURGE_APP_ID = 0, - SELECTION_INDEX_INTERNALS = 1, - SELECTION_INDEX_MESSAGES = 2 + SELECTION_INDEX_PURGE_APP_ID = 0 + , SELECTION_INDEX_INTERNALS = 1 + , SELECTION_INDEX_MESSAGES = 2 }; // CONSTANTS @@ -10438,211 +10575,214 @@ class QueueCommand { 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 QueueCommand(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'QueueCommand' having the default value. - // Use the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit QueueCommand(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'QueueCommand' having the default value. + // Use the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. QueueCommand(const QueueCommand& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'QueueCommand' 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 'QueueCommand' 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) QueueCommand(QueueCommand&& original) noexcept; - // Create an object of type 'QueueCommand' 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 'QueueCommand' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - QueueCommand(QueueCommand&& original, bslma::Allocator* basicAllocator); - // Create an object of type 'QueueCommand' 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. + QueueCommand(QueueCommand&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'QueueCommand' 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 ~QueueCommand(); - // Destroy this object. + // Destroy this object. // MANIPULATORS QueueCommand& operator=(const QueueCommand& 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) QueueCommand& operator=(QueueCommand&& 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. Void& makeInternals(); Void& makeInternals(const Void& 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) Void& makeInternals(Void&& value); #endif - // Set the value of this object to be a "Internals" value. Optionally - // specify the 'value' of the "Internals". If 'value' is not - // specified, the default "Internals" value is used. + // Set the value of this object to be a "Internals" value. Optionally + // specify the 'value' of the "Internals". If 'value' is not + // specified, the default "Internals" value is used. ListMessages& makeMessages(); ListMessages& makeMessages(const ListMessages& 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) ListMessages& makeMessages(ListMessages&& value); #endif - // Set the value of this object to be a "Messages" value. Optionally - // specify the 'value' of the "Messages". If 'value' is not specified, - // the default "Messages" value is used. + // Set the value of this object to be a "Messages" value. Optionally + // specify the 'value' of the "Messages". If 'value' is not specified, + // the default "Messages" 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. Void& internals(); - // Return a reference to the modifiable "Internals" selection of this - // object if "Internals" is the current selection. The behavior is - // undefined unless "Internals" is the selection of this object. + // Return a reference to the modifiable "Internals" selection of this + // object if "Internals" is the current selection. The behavior is + // undefined unless "Internals" is the selection of this object. ListMessages& messages(); - // Return a reference to the modifiable "Messages" selection of this - // object if "Messages" is the current selection. The behavior is - // undefined unless "Messages" is the selection of this object. + // Return a reference to the modifiable "Messages" selection of this + // object if "Messages" is the current selection. The behavior is + // undefined unless "Messages" 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. const Void& internals() const; - // Return a reference to the non-modifiable "Internals" selection of - // this object if "Internals" is the current selection. The behavior - // is undefined unless "Internals" is the selection of this object. + // Return a reference to the non-modifiable "Internals" selection of + // this object if "Internals" is the current selection. The behavior + // is undefined unless "Internals" is the selection of this object. const ListMessages& messages() const; - // Return a reference to the non-modifiable "Messages" selection of - // this object if "Messages" is the current selection. The behavior is - // undefined unless "Messages" is the selection of this object. + // Return a reference to the non-modifiable "Messages" selection of + // this object if "Messages" is the current selection. The behavior is + // undefined unless "Messages" 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 isInternalsValue() const; - // Return 'true' if the value of this object is a "Internals" value, - // and return 'false' otherwise. + // Return 'true' if the value of this object is a "Internals" value, + // and return 'false' otherwise. bool isMessagesValue() const; - // Return 'true' if the value of this object is a "Messages" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Messages" 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 QueueCommand& lhs, const QueueCommand& rhs) - // Return 'true' if the specified 'lhs' and 'rhs' objects have the same - // value, and 'false' otherwise. Two 'QueueCommand' 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 'QueueCommand' 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 QueueCommand& lhs, const QueueCommand& 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 QueueCommand& 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); } @@ -10650,10 +10790,10 @@ class QueueCommand { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const QueueCommand& 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 - // 'QueueCommand'. + // 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 + // 'QueueCommand'. { return object.hashAppendImpl(hashAlg); } @@ -10667,15 +10807,16 @@ BDLAT_DECL_CHOICE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::QueueCommand) namespace mqbcmd { -// =================== -// class QueueContents -// =================== + // =================== + // class QueueContents + // =================== class QueueContents { + // INSTANCE DATA - bsls::Types::Int64 d_offset; - bsls::Types::Int64 d_totalQueueMessages; - bsl::vector d_messages; + bsls::Types::Int64 d_offset; + bsls::Types::Int64 d_totalQueueMessages; + bsl::vector d_messages; // PRIVATE ACCESSORS template @@ -10684,17 +10825,19 @@ class QueueContents { public: // TYPES enum { - ATTRIBUTE_ID_MESSAGES = 0, - ATTRIBUTE_ID_OFFSET = 1, - ATTRIBUTE_ID_TOTAL_QUEUE_MESSAGES = 2 + ATTRIBUTE_ID_MESSAGES = 0 + , ATTRIBUTE_ID_OFFSET = 1 + , ATTRIBUTE_ID_TOTAL_QUEUE_MESSAGES = 2 }; - enum { NUM_ATTRIBUTES = 3 }; + enum { + NUM_ATTRIBUTES = 3 + }; enum { - ATTRIBUTE_INDEX_MESSAGES = 0, - ATTRIBUTE_INDEX_OFFSET = 1, - ATTRIBUTE_INDEX_TOTAL_QUEUE_MESSAGES = 2 + ATTRIBUTE_INDEX_MESSAGES = 0 + , ATTRIBUTE_INDEX_OFFSET = 1 + , ATTRIBUTE_INDEX_TOTAL_QUEUE_MESSAGES = 2 }; // CONSTANTS @@ -10704,165 +10847,168 @@ class QueueContents { 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 QueueContents(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'QueueContents' having the default value. - // Use the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit QueueContents(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'QueueContents' having the default value. + // Use the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. QueueContents(const QueueContents& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'QueueContents' 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 'QueueContents' 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) QueueContents(QueueContents&& original) noexcept; - // Create an object of type 'QueueContents' 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 'QueueContents' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - QueueContents(QueueContents&& original, bslma::Allocator* basicAllocator); - // Create an object of type 'QueueContents' 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. + QueueContents(QueueContents&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'QueueContents' 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 ~QueueContents(); - // Destroy this object. + // Destroy this object. // MANIPULATORS QueueContents& operator=(const QueueContents& 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) QueueContents& operator=(QueueContents&& 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::vector& messages(); - // Return a reference to the modifiable "Messages" attribute of this - // object. + // Return a reference to the modifiable "Messages" attribute of this + // object. bsls::Types::Int64& offset(); - // Return a reference to the modifiable "Offset" attribute of this - // object. + // Return a reference to the modifiable "Offset" attribute of this + // object. bsls::Types::Int64& totalQueueMessages(); - // Return a reference to the modifiable "TotalQueueMessages" attribute - // of this object. + // Return a reference to the modifiable "TotalQueueMessages" 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::vector& messages() const; - // Return a reference offering non-modifiable access to the "Messages" - // attribute of this object. + // Return a reference offering non-modifiable access to the "Messages" + // attribute of this object. bsls::Types::Int64 offset() const; - // Return the value of the "Offset" attribute of this object. + // Return the value of the "Offset" attribute of this object. bsls::Types::Int64 totalQueueMessages() const; - // Return the value of the "TotalQueueMessages" attribute of this - // object. + // Return the value of the "TotalQueueMessages" attribute of this + // object. // HIDDEN FRIENDS friend bool operator==(const QueueContents& lhs, const QueueContents& 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.messages() == rhs.messages() && lhs.offset() == rhs.offset() && @@ -10870,15 +11016,15 @@ class QueueContents { } friend bool operator!=(const QueueContents& lhs, const QueueContents& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const QueueContents& 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); } @@ -10886,10 +11032,10 @@ class QueueContents { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const QueueContents& 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 - // 'QueueContents'. + // 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 + // 'QueueContents'. { object.hashAppendImpl(hashAlg); } @@ -10899,20 +11045,20 @@ class QueueContents { // TRAITS -BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS( - mqbcmd::QueueContents) +BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::QueueContents) namespace mqbcmd { -// ================== -// class QueueStorage -// ================== + // ================== + // class QueueStorage + // ================== class QueueStorage { + // INSTANCE DATA - bsl::vector d_virtualStorages; - unsigned int d_numMessages; - unsigned int d_numBytes; + bsl::vector d_virtualStorages; + unsigned int d_numMessages; + unsigned int d_numBytes; // PRIVATE ACCESSORS template @@ -10921,17 +11067,19 @@ class QueueStorage { public: // TYPES enum { - ATTRIBUTE_ID_NUM_MESSAGES = 0, - ATTRIBUTE_ID_NUM_BYTES = 1, - ATTRIBUTE_ID_VIRTUAL_STORAGES = 2 + ATTRIBUTE_ID_NUM_MESSAGES = 0 + , ATTRIBUTE_ID_NUM_BYTES = 1 + , ATTRIBUTE_ID_VIRTUAL_STORAGES = 2 }; - enum { NUM_ATTRIBUTES = 3 }; + enum { + NUM_ATTRIBUTES = 3 + }; enum { - ATTRIBUTE_INDEX_NUM_MESSAGES = 0, - ATTRIBUTE_INDEX_NUM_BYTES = 1, - ATTRIBUTE_INDEX_VIRTUAL_STORAGES = 2 + ATTRIBUTE_INDEX_NUM_MESSAGES = 0 + , ATTRIBUTE_INDEX_NUM_BYTES = 1 + , ATTRIBUTE_INDEX_VIRTUAL_STORAGES = 2 }; // CONSTANTS @@ -10941,164 +11089,167 @@ class QueueStorage { 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 QueueStorage(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'QueueStorage' having the default value. - // Use the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit QueueStorage(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'QueueStorage' having the default value. + // Use the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. QueueStorage(const QueueStorage& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'QueueStorage' 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 'QueueStorage' 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) QueueStorage(QueueStorage&& original) noexcept; - // Create an object of type 'QueueStorage' 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 'QueueStorage' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - QueueStorage(QueueStorage&& original, bslma::Allocator* basicAllocator); - // Create an object of type 'QueueStorage' 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. + QueueStorage(QueueStorage&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'QueueStorage' 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 ~QueueStorage(); - // Destroy this object. + // Destroy this object. // MANIPULATORS QueueStorage& operator=(const QueueStorage& 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) QueueStorage& operator=(QueueStorage&& 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. 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. unsigned int& numBytes(); - // Return a reference to the modifiable "NumBytes" attribute of this - // object. + // Return a reference to the modifiable "NumBytes" attribute of this + // object. bsl::vector& virtualStorages(); - // Return a reference to the modifiable "VirtualStorages" attribute of - // this object. + // Return a reference to the modifiable "VirtualStorages" 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. unsigned int numMessages() const; - // Return the value of the "NumMessages" attribute of this object. + // Return the value of the "NumMessages" attribute of this object. unsigned int numBytes() const; - // Return the value of the "NumBytes" attribute of this object. + // Return the value of the "NumBytes" attribute of this object. const bsl::vector& virtualStorages() const; - // Return a reference offering non-modifiable access to the - // "VirtualStorages" attribute of this object. + // Return a reference offering non-modifiable access to the + // "VirtualStorages" attribute of this object. // HIDDEN FRIENDS friend bool operator==(const QueueStorage& lhs, const QueueStorage& 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.numMessages() == rhs.numMessages() && lhs.numBytes() == rhs.numBytes() && @@ -11106,15 +11257,15 @@ class QueueStorage { } friend bool operator!=(const QueueStorage& lhs, const QueueStorage& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const QueueStorage& 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); } @@ -11122,10 +11273,10 @@ class QueueStorage { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const QueueStorage& 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 - // 'QueueStorage'. + // 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 + // 'QueueStorage'. { object.hashAppendImpl(hashAlg); } @@ -11139,23 +11290,24 @@ BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::QueueStorage) namespace mqbcmd { -// ========================== -// class ResourceUsageMonitor -// ========================== + // ========================== + // class ResourceUsageMonitor + // ========================== class ResourceUsageMonitor { + // INSTANCE DATA - bsls::Types::Int64 d_numMessages; - bsls::Types::Int64 d_messagesLowWatermarkRatio; - bsls::Types::Int64 d_messagesHighWatermarkRatio; - bsls::Types::Int64 d_messagesCapacity; - bsls::Types::Int64 d_numBytes; - bsls::Types::Int64 d_bytesLowWatermarkRatio; - bsls::Types::Int64 d_bytesHighWatermarkRatio; - bsls::Types::Int64 d_bytesCapacity; - ResourceUsageMonitorState::Value d_state; - ResourceUsageMonitorState::Value d_messagesState; - ResourceUsageMonitorState::Value d_bytesState; + bsls::Types::Int64 d_numMessages; + bsls::Types::Int64 d_messagesLowWatermarkRatio; + bsls::Types::Int64 d_messagesHighWatermarkRatio; + bsls::Types::Int64 d_messagesCapacity; + bsls::Types::Int64 d_numBytes; + bsls::Types::Int64 d_bytesLowWatermarkRatio; + bsls::Types::Int64 d_bytesHighWatermarkRatio; + bsls::Types::Int64 d_bytesCapacity; + ResourceUsageMonitorState::Value d_state; + ResourceUsageMonitorState::Value d_messagesState; + ResourceUsageMonitorState::Value d_bytesState; // PRIVATE ACCESSORS template @@ -11166,33 +11318,35 @@ class ResourceUsageMonitor { public: // TYPES enum { - ATTRIBUTE_ID_STATE = 0, - ATTRIBUTE_ID_MESSAGES_STATE = 1, - ATTRIBUTE_ID_NUM_MESSAGES = 2, - ATTRIBUTE_ID_MESSAGES_LOW_WATERMARK_RATIO = 3, - ATTRIBUTE_ID_MESSAGES_HIGH_WATERMARK_RATIO = 4, - ATTRIBUTE_ID_MESSAGES_CAPACITY = 5, - ATTRIBUTE_ID_BYTES_STATE = 6, - ATTRIBUTE_ID_NUM_BYTES = 7, - ATTRIBUTE_ID_BYTES_LOW_WATERMARK_RATIO = 8, - ATTRIBUTE_ID_BYTES_HIGH_WATERMARK_RATIO = 9, - ATTRIBUTE_ID_BYTES_CAPACITY = 10 + ATTRIBUTE_ID_STATE = 0 + , ATTRIBUTE_ID_MESSAGES_STATE = 1 + , ATTRIBUTE_ID_NUM_MESSAGES = 2 + , ATTRIBUTE_ID_MESSAGES_LOW_WATERMARK_RATIO = 3 + , ATTRIBUTE_ID_MESSAGES_HIGH_WATERMARK_RATIO = 4 + , ATTRIBUTE_ID_MESSAGES_CAPACITY = 5 + , ATTRIBUTE_ID_BYTES_STATE = 6 + , ATTRIBUTE_ID_NUM_BYTES = 7 + , ATTRIBUTE_ID_BYTES_LOW_WATERMARK_RATIO = 8 + , ATTRIBUTE_ID_BYTES_HIGH_WATERMARK_RATIO = 9 + , ATTRIBUTE_ID_BYTES_CAPACITY = 10 }; - enum { NUM_ATTRIBUTES = 11 }; + enum { + NUM_ATTRIBUTES = 11 + }; enum { - ATTRIBUTE_INDEX_STATE = 0, - ATTRIBUTE_INDEX_MESSAGES_STATE = 1, - ATTRIBUTE_INDEX_NUM_MESSAGES = 2, - ATTRIBUTE_INDEX_MESSAGES_LOW_WATERMARK_RATIO = 3, - ATTRIBUTE_INDEX_MESSAGES_HIGH_WATERMARK_RATIO = 4, - ATTRIBUTE_INDEX_MESSAGES_CAPACITY = 5, - ATTRIBUTE_INDEX_BYTES_STATE = 6, - ATTRIBUTE_INDEX_NUM_BYTES = 7, - ATTRIBUTE_INDEX_BYTES_LOW_WATERMARK_RATIO = 8, - ATTRIBUTE_INDEX_BYTES_HIGH_WATERMARK_RATIO = 9, - ATTRIBUTE_INDEX_BYTES_CAPACITY = 10 + ATTRIBUTE_INDEX_STATE = 0 + , ATTRIBUTE_INDEX_MESSAGES_STATE = 1 + , ATTRIBUTE_INDEX_NUM_MESSAGES = 2 + , ATTRIBUTE_INDEX_MESSAGES_LOW_WATERMARK_RATIO = 3 + , ATTRIBUTE_INDEX_MESSAGES_HIGH_WATERMARK_RATIO = 4 + , ATTRIBUTE_INDEX_MESSAGES_CAPACITY = 5 + , ATTRIBUTE_INDEX_BYTES_STATE = 6 + , ATTRIBUTE_INDEX_NUM_BYTES = 7 + , ATTRIBUTE_INDEX_BYTES_LOW_WATERMARK_RATIO = 8 + , ATTRIBUTE_INDEX_BYTES_HIGH_WATERMARK_RATIO = 9 + , ATTRIBUTE_INDEX_BYTES_CAPACITY = 10 }; // CONSTANTS @@ -11202,200 +11356,203 @@ class ResourceUsageMonitor { 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 ResourceUsageMonitor(); - // Create an object of type 'ResourceUsageMonitor' having the default - // value. + // Create an object of type 'ResourceUsageMonitor' 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. ResourceUsageMonitorState::Value& state(); - // Return a reference to the modifiable "State" attribute of this - // object. + // Return a reference to the modifiable "State" attribute of this + // object. ResourceUsageMonitorState::Value& messagesState(); - // Return a reference to the modifiable "MessagesState" attribute of - // this object. + // Return a reference to the modifiable "MessagesState" 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& messagesLowWatermarkRatio(); - // Return a reference to the modifiable "MessagesLowWatermarkRatio" - // attribute of this object. + // Return a reference to the modifiable "MessagesLowWatermarkRatio" + // attribute of this object. bsls::Types::Int64& messagesHighWatermarkRatio(); - // Return a reference to the modifiable "MessagesHighWatermarkRatio" - // attribute of this object. + // Return a reference to the modifiable "MessagesHighWatermarkRatio" + // attribute of this object. bsls::Types::Int64& messagesCapacity(); - // Return a reference to the modifiable "MessagesCapacity" attribute of - // this object. + // Return a reference to the modifiable "MessagesCapacity" attribute of + // this object. ResourceUsageMonitorState::Value& bytesState(); - // Return a reference to the modifiable "BytesState" attribute of this - // object. + // Return a reference to the modifiable "BytesState" 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& bytesLowWatermarkRatio(); - // Return a reference to the modifiable "BytesLowWatermarkRatio" - // attribute of this object. + // Return a reference to the modifiable "BytesLowWatermarkRatio" + // attribute of this object. bsls::Types::Int64& bytesHighWatermarkRatio(); - // Return a reference to the modifiable "BytesHighWatermarkRatio" - // attribute of this object. + // Return a reference to the modifiable "BytesHighWatermarkRatio" + // attribute of this object. bsls::Types::Int64& bytesCapacity(); - // Return a reference to the modifiable "BytesCapacity" attribute of - // this object. + // Return a reference to the modifiable "BytesCapacity" 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. ResourceUsageMonitorState::Value state() const; - // Return the value of the "State" attribute of this object. + // Return the value of the "State" attribute of this object. ResourceUsageMonitorState::Value messagesState() const; - // Return the value of the "MessagesState" attribute of this object. + // Return the value of the "MessagesState" 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 messagesLowWatermarkRatio() const; - // Return the value of the "MessagesLowWatermarkRatio" attribute of - // this object. + // Return the value of the "MessagesLowWatermarkRatio" attribute of + // this object. bsls::Types::Int64 messagesHighWatermarkRatio() const; - // Return the value of the "MessagesHighWatermarkRatio" attribute of - // this object. + // Return the value of the "MessagesHighWatermarkRatio" attribute of + // this object. bsls::Types::Int64 messagesCapacity() const; - // Return the value of the "MessagesCapacity" attribute of this object. + // Return the value of the "MessagesCapacity" attribute of this object. ResourceUsageMonitorState::Value bytesState() const; - // Return the value of the "BytesState" attribute of this object. + // Return the value of the "BytesState" 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 bytesLowWatermarkRatio() const; - // Return the value of the "BytesLowWatermarkRatio" attribute of this - // object. + // Return the value of the "BytesLowWatermarkRatio" attribute of this + // object. bsls::Types::Int64 bytesHighWatermarkRatio() const; - // Return the value of the "BytesHighWatermarkRatio" attribute of this - // object. + // Return the value of the "BytesHighWatermarkRatio" attribute of this + // object. bsls::Types::Int64 bytesCapacity() const; - // Return the value of the "BytesCapacity" attribute of this object. + // Return the value of the "BytesCapacity" attribute of this object. // HIDDEN FRIENDS friend bool operator==(const ResourceUsageMonitor& lhs, const ResourceUsageMonitor& 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 ResourceUsageMonitor& lhs, const ResourceUsageMonitor& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const ResourceUsageMonitor& 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); } @@ -11403,10 +11560,10 @@ class ResourceUsageMonitor { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const ResourceUsageMonitor& 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 - // 'ResourceUsageMonitor'. + // 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 + // 'ResourceUsageMonitor'. { object.hashAppendImpl(hashAlg); } @@ -11420,23 +11577,29 @@ BDLAT_DECL_SEQUENCE_WITH_BITWISEMOVEABLE_TRAITS(mqbcmd::ResourceUsageMonitor) namespace mqbcmd { -// ======================= -// class RouteResponseList -// ======================= + // ======================= + // class RouteResponseList + // ======================= class RouteResponseList { // A list of the textual responses from a routed command. // INSTANCE DATA - bsl::vector d_responses; + bsl::vector d_responses; public: // TYPES - enum { ATTRIBUTE_ID_RESPONSES = 0 }; + enum { + ATTRIBUTE_ID_RESPONSES = 0 + }; - enum { NUM_ATTRIBUTES = 1 }; + enum { + NUM_ATTRIBUTES = 1 + }; - enum { ATTRIBUTE_INDEX_RESPONSES = 0 }; + enum { + ATTRIBUTE_INDEX_RESPONSES = 0 + }; // CONSTANTS static const char CLASS_NAME[]; @@ -11445,167 +11608,169 @@ class RouteResponseList { 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 RouteResponseList(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'RouteResponseList' having the default - // value. Use the optionally specified 'basicAllocator' to supply - // memory. If 'basicAllocator' is 0, the currently installed default - // allocator is used. + explicit RouteResponseList(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'RouteResponseList' having the default + // value. Use the optionally specified 'basicAllocator' to supply + // memory. If 'basicAllocator' is 0, the currently installed default + // allocator is used. RouteResponseList(const RouteResponseList& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'RouteResponseList' 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 'RouteResponseList' 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) RouteResponseList(RouteResponseList&& original) noexcept; - // Create an object of type 'RouteResponseList' 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 'RouteResponseList' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. RouteResponseList(RouteResponseList&& original, - bslma::Allocator* basicAllocator); - // Create an object of type 'RouteResponseList' 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 'RouteResponseList' 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 ~RouteResponseList(); - // Destroy this object. + // Destroy this object. // MANIPULATORS RouteResponseList& operator=(const RouteResponseList& 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) RouteResponseList& operator=(RouteResponseList&& 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::vector& responses(); - // Return a reference to the modifiable "Responses" attribute of this - // object. + // Return a reference to the modifiable "Responses" 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::vector& responses() const; - // Return a reference offering non-modifiable access to the "Responses" - // attribute of this object. + // Return a reference offering non-modifiable access to the "Responses" + // attribute of this object. // HIDDEN FRIENDS friend bool operator==(const RouteResponseList& lhs, const RouteResponseList& 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.responses() == rhs.responses(); } friend bool operator!=(const RouteResponseList& lhs, const RouteResponseList& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const RouteResponseList& 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); } @@ -11613,10 +11778,10 @@ class RouteResponseList { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const RouteResponseList& 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 - // 'RouteResponseList'. + // 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 + // 'RouteResponseList'. { using bslh::hashAppend; hashAppend(hashAlg, object.responses()); @@ -11627,23 +11792,23 @@ class RouteResponseList { // TRAITS -BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS( - mqbcmd::RouteResponseList) +BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::RouteResponseList) namespace mqbcmd { -// ====================== -// class SetTunableChoice -// ====================== + // ====================== + // class SetTunableChoice + // ====================== class SetTunableChoice { + // INSTANCE DATA union { - bsls::ObjectBuffer d_all; - bsls::ObjectBuffer d_self; + bsls::ObjectBuffer< Void > d_all; + bsls::ObjectBuffer< Void > d_self; }; - int d_selectionId; + int d_selectionId; // PRIVATE ACCESSORS template @@ -11655,14 +11820,19 @@ class SetTunableChoice { // TYPES enum { - SELECTION_ID_UNDEFINED = -1, - SELECTION_ID_ALL = 0, - SELECTION_ID_SELF = 1 + SELECTION_ID_UNDEFINED = -1 + , SELECTION_ID_ALL = 0 + , SELECTION_ID_SELF = 1 }; - enum { NUM_SELECTIONS = 2 }; + enum { + NUM_SELECTIONS = 2 + }; - enum { SELECTION_INDEX_ALL = 0, SELECTION_INDEX_SELF = 1 }; + enum { + SELECTION_INDEX_ALL = 0 + , SELECTION_INDEX_SELF = 1 + }; // CONSTANTS static const char CLASS_NAME[]; @@ -11670,176 +11840,178 @@ class SetTunableChoice { 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 SetTunableChoice(); - // Create an object of type 'SetTunableChoice' having the default - // value. + // Create an object of type 'SetTunableChoice' having the default + // value. SetTunableChoice(const SetTunableChoice& original); - // Create an object of type 'SetTunableChoice' having the value of the - // specified 'original' object. + // Create an object of type 'SetTunableChoice' having the value of the + // specified 'original' 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) SetTunableChoice(SetTunableChoice&& original) noexcept; - // Create an object of type 'SetTunableChoice' 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 'SetTunableChoice' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. #endif ~SetTunableChoice(); - // Destroy this object. + // Destroy this object. // MANIPULATORS SetTunableChoice& operator=(const SetTunableChoice& 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) SetTunableChoice& operator=(SetTunableChoice&& 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). Void& makeAll(); Void& makeAll(const Void& 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) Void& makeAll(Void&& value); #endif - // Set the value of this object to be a "All" value. Optionally - // specify the 'value' of the "All". If 'value' is not specified, the - // default "All" value is used. + // Set the value of this object to be a "All" value. Optionally + // specify the 'value' of the "All". If 'value' is not specified, the + // default "All" value is used. Void& makeSelf(); Void& makeSelf(const Void& 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) Void& makeSelf(Void&& value); #endif - // Set the value of this object to be a "Self" value. Optionally - // specify the 'value' of the "Self". If 'value' is not specified, the - // default "Self" value is used. + // Set the value of this object to be a "Self" value. Optionally + // specify the 'value' of the "Self". If 'value' is not specified, the + // default "Self" 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. Void& all(); - // Return a reference to the modifiable "All" selection of this object - // if "All" is the current selection. The behavior is undefined unless - // "All" is the selection of this object. + // Return a reference to the modifiable "All" selection of this object + // if "All" is the current selection. The behavior is undefined unless + // "All" is the selection of this object. Void& self(); - // Return a reference to the modifiable "Self" selection of this object - // if "Self" is the current selection. The behavior is undefined - // unless "Self" is the selection of this object. + // Return a reference to the modifiable "Self" selection of this object + // if "Self" is the current selection. The behavior is undefined + // unless "Self" 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 Void& all() const; - // Return a reference to the non-modifiable "All" selection of this - // object if "All" is the current selection. The behavior is undefined - // unless "All" is the selection of this object. + // Return a reference to the non-modifiable "All" selection of this + // object if "All" is the current selection. The behavior is undefined + // unless "All" is the selection of this object. const Void& self() const; - // Return a reference to the non-modifiable "Self" selection of this - // object if "Self" is the current selection. The behavior is - // undefined unless "Self" is the selection of this object. + // Return a reference to the non-modifiable "Self" selection of this + // object if "Self" is the current selection. The behavior is + // undefined unless "Self" is the selection of this object. bool isAllValue() const; - // Return 'true' if the value of this object is a "All" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "All" value, and + // return 'false' otherwise. bool isSelfValue() const; - // Return 'true' if the value of this object is a "Self" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Self" 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 SetTunableChoice& lhs, const SetTunableChoice& rhs) - // Return 'true' if the specified 'lhs' and 'rhs' objects have the same - // value, and 'false' otherwise. Two 'SetTunableChoice' 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 'SetTunableChoice' 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 SetTunableChoice& lhs, const SetTunableChoice& 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 SetTunableChoice& 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); } @@ -11847,10 +12019,10 @@ class SetTunableChoice { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const SetTunableChoice& 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 - // 'SetTunableChoice'. + // 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 + // 'SetTunableChoice'. { return object.hashAppendImpl(hashAlg); } @@ -11864,21 +12036,28 @@ BDLAT_DECL_CHOICE_WITH_BITWISEMOVEABLE_TRAITS(mqbcmd::SetTunableChoice) namespace mqbcmd { -// ==================== -// class StorageContent -// ==================== + // ==================== + // class StorageContent + // ==================== class StorageContent { + // INSTANCE DATA - bsl::vector d_storages; + bsl::vector d_storages; public: // TYPES - enum { ATTRIBUTE_ID_STORAGES = 0 }; + enum { + ATTRIBUTE_ID_STORAGES = 0 + }; - enum { NUM_ATTRIBUTES = 1 }; + enum { + NUM_ATTRIBUTES = 1 + }; - enum { ATTRIBUTE_INDEX_STORAGES = 0 }; + enum { + ATTRIBUTE_INDEX_STORAGES = 0 + }; // CONSTANTS static const char CLASS_NAME[]; @@ -11887,167 +12066,169 @@ class StorageContent { 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 StorageContent(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'StorageContent' having the default value. - // Use the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit StorageContent(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'StorageContent' having the default value. + // Use the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. StorageContent(const StorageContent& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'StorageContent' 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 'StorageContent' 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) StorageContent(StorageContent&& original) noexcept; - // Create an object of type 'StorageContent' 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 'StorageContent' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - StorageContent(StorageContent&& original, - bslma::Allocator* basicAllocator); - // Create an object of type 'StorageContent' 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. + StorageContent(StorageContent&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'StorageContent' 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 ~StorageContent(); - // Destroy this object. + // Destroy this object. // MANIPULATORS StorageContent& operator=(const StorageContent& 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) StorageContent& operator=(StorageContent&& 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::vector& storages(); - // Return a reference to the modifiable "Storages" attribute of this - // object. + // Return a reference to the modifiable "Storages" 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::vector& storages() const; - // Return a reference offering non-modifiable access to the "Storages" - // attribute of this object. + // Return a reference offering non-modifiable access to the "Storages" + // attribute of this object. // HIDDEN FRIENDS friend bool operator==(const StorageContent& lhs, const StorageContent& 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.storages() == rhs.storages(); } friend bool operator!=(const StorageContent& lhs, const StorageContent& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const StorageContent& 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); } @@ -12055,10 +12236,10 @@ class StorageContent { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const StorageContent& 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 - // 'StorageContent'. + // 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 + // 'StorageContent'. { using bslh::hashAppend; hashAppend(hashAlg, object.storages()); @@ -12069,23 +12250,23 @@ class StorageContent { // TRAITS -BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS( - mqbcmd::StorageContent) +BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::StorageContent) namespace mqbcmd { -// ========================== -// class StorageDomainCommand -// ========================== + // ========================== + // class StorageDomainCommand + // ========================== class StorageDomainCommand { + // INSTANCE DATA union { - bsls::ObjectBuffer d_queueStatus; - bsls::ObjectBuffer d_purge; + bsls::ObjectBuffer< Void > d_queueStatus; + bsls::ObjectBuffer< Void > d_purge; }; - int d_selectionId; + int d_selectionId; // PRIVATE ACCESSORS template @@ -12097,14 +12278,19 @@ class StorageDomainCommand { // TYPES enum { - SELECTION_ID_UNDEFINED = -1, - SELECTION_ID_QUEUE_STATUS = 0, - SELECTION_ID_PURGE = 1 + SELECTION_ID_UNDEFINED = -1 + , SELECTION_ID_QUEUE_STATUS = 0 + , SELECTION_ID_PURGE = 1 }; - enum { NUM_SELECTIONS = 2 }; + enum { + NUM_SELECTIONS = 2 + }; - enum { SELECTION_INDEX_QUEUE_STATUS = 0, SELECTION_INDEX_PURGE = 1 }; + enum { + SELECTION_INDEX_QUEUE_STATUS = 0 + , SELECTION_INDEX_PURGE = 1 + }; // CONSTANTS static const char CLASS_NAME[]; @@ -12112,176 +12298,178 @@ class StorageDomainCommand { 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 StorageDomainCommand(); - // Create an object of type 'StorageDomainCommand' having the default - // value. + // Create an object of type 'StorageDomainCommand' having the default + // value. StorageDomainCommand(const StorageDomainCommand& original); - // Create an object of type 'StorageDomainCommand' having the value of - // the specified 'original' object. + // Create an object of type 'StorageDomainCommand' having the value of + // the specified 'original' 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) StorageDomainCommand(StorageDomainCommand&& original) noexcept; - // Create an object of type 'StorageDomainCommand' 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 'StorageDomainCommand' having the value of + // the specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. #endif ~StorageDomainCommand(); - // Destroy this object. + // Destroy this object. // MANIPULATORS StorageDomainCommand& operator=(const StorageDomainCommand& 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) StorageDomainCommand& operator=(StorageDomainCommand&& 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). Void& makeQueueStatus(); Void& makeQueueStatus(const Void& 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) Void& makeQueueStatus(Void&& value); #endif - // Set the value of this object to be a "QueueStatus" value. - // Optionally specify the 'value' of the "QueueStatus". If 'value' is - // not specified, the default "QueueStatus" value is used. + // Set the value of this object to be a "QueueStatus" value. + // Optionally specify the 'value' of the "QueueStatus". If 'value' is + // not specified, the default "QueueStatus" value is used. Void& makePurge(); Void& makePurge(const Void& 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) Void& makePurge(Void&& value); #endif - // Set the value of this object to be a "Purge" value. Optionally - // specify the 'value' of the "Purge". If 'value' is not specified, - // the default "Purge" value is used. + // Set the value of this object to be a "Purge" value. Optionally + // specify the 'value' of the "Purge". If 'value' is not specified, + // the default "Purge" 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. Void& queueStatus(); - // Return a reference to the modifiable "QueueStatus" selection of this - // object if "QueueStatus" is the current selection. The behavior is - // undefined unless "QueueStatus" is the selection of this object. + // Return a reference to the modifiable "QueueStatus" selection of this + // object if "QueueStatus" is the current selection. The behavior is + // undefined unless "QueueStatus" is the selection of this object. Void& purge(); - // Return a reference to the modifiable "Purge" selection of this - // object if "Purge" is the current selection. The behavior is - // undefined unless "Purge" is the selection of this object. + // Return a reference to the modifiable "Purge" selection of this + // object if "Purge" is the current selection. The behavior is + // undefined unless "Purge" 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 Void& queueStatus() const; - // Return a reference to the non-modifiable "QueueStatus" selection of - // this object if "QueueStatus" is the current selection. The behavior - // is undefined unless "QueueStatus" is the selection of this object. + // Return a reference to the non-modifiable "QueueStatus" selection of + // this object if "QueueStatus" is the current selection. The behavior + // is undefined unless "QueueStatus" is the selection of this object. const Void& purge() const; - // Return a reference to the non-modifiable "Purge" selection of this - // object if "Purge" is the current selection. The behavior is - // undefined unless "Purge" is the selection of this object. + // Return a reference to the non-modifiable "Purge" selection of this + // object if "Purge" is the current selection. The behavior is + // undefined unless "Purge" is the selection of this object. bool isQueueStatusValue() const; - // Return 'true' if the value of this object is a "QueueStatus" value, - // and return 'false' otherwise. + // Return 'true' if the value of this object is a "QueueStatus" value, + // and return 'false' otherwise. bool isPurgeValue() const; - // Return 'true' if the value of this object is a "Purge" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Purge" 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 StorageDomainCommand& lhs, const StorageDomainCommand& rhs) - // Return 'true' if the specified 'lhs' and 'rhs' objects have the same - // value, and 'false' otherwise. Two 'StorageDomainCommand' 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 'StorageDomainCommand' 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 StorageDomainCommand& lhs, const StorageDomainCommand& 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 StorageDomainCommand& 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); } @@ -12289,10 +12477,10 @@ class StorageDomainCommand { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const StorageDomainCommand& 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 - // 'StorageDomainCommand'. + // 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 + // 'StorageDomainCommand'. { return object.hashAppendImpl(hashAlg); } @@ -12306,19 +12494,20 @@ BDLAT_DECL_CHOICE_WITH_BITWISEMOVEABLE_TRAITS(mqbcmd::StorageDomainCommand) namespace mqbcmd { -// ============================= -// class StoragePartitionCommand -// ============================= + // ============================= + // class StoragePartitionCommand + // ============================= class StoragePartitionCommand { + // INSTANCE DATA union { - bsls::ObjectBuffer d_enable; - bsls::ObjectBuffer d_disable; - bsls::ObjectBuffer d_summary; + bsls::ObjectBuffer< Void > d_enable; + bsls::ObjectBuffer< Void > d_disable; + bsls::ObjectBuffer< Void > d_summary; }; - int d_selectionId; + int d_selectionId; // PRIVATE ACCESSORS template @@ -12330,18 +12519,20 @@ class StoragePartitionCommand { // TYPES enum { - SELECTION_ID_UNDEFINED = -1, - SELECTION_ID_ENABLE = 0, - SELECTION_ID_DISABLE = 1, - SELECTION_ID_SUMMARY = 2 + SELECTION_ID_UNDEFINED = -1 + , SELECTION_ID_ENABLE = 0 + , SELECTION_ID_DISABLE = 1 + , SELECTION_ID_SUMMARY = 2 }; - enum { NUM_SELECTIONS = 3 }; + enum { + NUM_SELECTIONS = 3 + }; enum { - SELECTION_INDEX_ENABLE = 0, - SELECTION_INDEX_DISABLE = 1, - SELECTION_INDEX_SUMMARY = 2 + SELECTION_INDEX_ENABLE = 0 + , SELECTION_INDEX_DISABLE = 1 + , SELECTION_INDEX_SUMMARY = 2 }; // CONSTANTS @@ -12350,201 +12541,203 @@ class StoragePartitionCommand { 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 StoragePartitionCommand(); - // Create an object of type 'StoragePartitionCommand' having the - // default value. + // Create an object of type 'StoragePartitionCommand' having the + // default value. StoragePartitionCommand(const StoragePartitionCommand& original); - // Create an object of type 'StoragePartitionCommand' having the value - // of the specified 'original' object. + // Create an object of type 'StoragePartitionCommand' having the value + // of the specified 'original' 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) StoragePartitionCommand(StoragePartitionCommand&& original) noexcept; - // Create an object of type 'StoragePartitionCommand' 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 'StoragePartitionCommand' having the value + // of the specified 'original' object. After performing this action, + // the 'original' object will be left in a valid, but unspecified + // state. #endif ~StoragePartitionCommand(); - // Destroy this object. + // Destroy this object. // MANIPULATORS StoragePartitionCommand& operator=(const StoragePartitionCommand& 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) StoragePartitionCommand& operator=(StoragePartitionCommand&& 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). Void& makeEnable(); Void& makeEnable(const Void& 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) Void& makeEnable(Void&& value); #endif - // Set the value of this object to be a "Enable" value. Optionally - // specify the 'value' of the "Enable". If 'value' is not specified, - // the default "Enable" value is used. + // Set the value of this object to be a "Enable" value. Optionally + // specify the 'value' of the "Enable". If 'value' is not specified, + // the default "Enable" value is used. Void& makeDisable(); Void& makeDisable(const Void& 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) Void& makeDisable(Void&& value); #endif - // Set the value of this object to be a "Disable" value. Optionally - // specify the 'value' of the "Disable". If 'value' is not specified, - // the default "Disable" value is used. + // Set the value of this object to be a "Disable" value. Optionally + // specify the 'value' of the "Disable". If 'value' is not specified, + // the default "Disable" value is used. Void& makeSummary(); Void& makeSummary(const Void& 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) Void& makeSummary(Void&& value); #endif - // Set the value of this object to be a "Summary" value. Optionally - // specify the 'value' of the "Summary". If 'value' is not specified, - // the default "Summary" value is used. + // Set the value of this object to be a "Summary" value. Optionally + // specify the 'value' of the "Summary". If 'value' is not specified, + // the default "Summary" 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. Void& enable(); - // Return a reference to the modifiable "Enable" selection of this - // object if "Enable" is the current selection. The behavior is - // undefined unless "Enable" is the selection of this object. + // Return a reference to the modifiable "Enable" selection of this + // object if "Enable" is the current selection. The behavior is + // undefined unless "Enable" is the selection of this object. Void& disable(); - // Return a reference to the modifiable "Disable" selection of this - // object if "Disable" is the current selection. The behavior is - // undefined unless "Disable" is the selection of this object. + // Return a reference to the modifiable "Disable" selection of this + // object if "Disable" is the current selection. The behavior is + // undefined unless "Disable" is the selection of this object. Void& summary(); - // Return a reference to the modifiable "Summary" selection of this - // object if "Summary" is the current selection. The behavior is - // undefined unless "Summary" is the selection of this object. + // Return a reference to the modifiable "Summary" selection of this + // object if "Summary" is the current selection. The behavior is + // undefined unless "Summary" 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 Void& enable() const; - // Return a reference to the non-modifiable "Enable" selection of this - // object if "Enable" is the current selection. The behavior is - // undefined unless "Enable" is the selection of this object. + // Return a reference to the non-modifiable "Enable" selection of this + // object if "Enable" is the current selection. The behavior is + // undefined unless "Enable" is the selection of this object. const Void& disable() const; - // Return a reference to the non-modifiable "Disable" selection of this - // object if "Disable" is the current selection. The behavior is - // undefined unless "Disable" is the selection of this object. + // Return a reference to the non-modifiable "Disable" selection of this + // object if "Disable" is the current selection. The behavior is + // undefined unless "Disable" is the selection of this object. const Void& summary() const; - // Return a reference to the non-modifiable "Summary" selection of this - // object if "Summary" is the current selection. The behavior is - // undefined unless "Summary" is the selection of this object. + // Return a reference to the non-modifiable "Summary" selection of this + // object if "Summary" is the current selection. The behavior is + // undefined unless "Summary" is the selection of this object. bool isEnableValue() const; - // Return 'true' if the value of this object is a "Enable" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Enable" value, and + // return 'false' otherwise. bool isDisableValue() const; - // Return 'true' if the value of this object is a "Disable" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Disable" value, and + // return 'false' otherwise. bool isSummaryValue() const; - // Return 'true' if the value of this object is a "Summary" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Summary" 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 StoragePartitionCommand& lhs, const StoragePartitionCommand& rhs) - // Return 'true' if the specified 'lhs' and 'rhs' objects have the same - // value, and 'false' otherwise. Two 'StoragePartitionCommand' 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 'StoragePartitionCommand' 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 StoragePartitionCommand& lhs, const StoragePartitionCommand& 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 StoragePartitionCommand& 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); } @@ -12552,10 +12745,10 @@ class StoragePartitionCommand { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const StoragePartitionCommand& 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 - // 'StoragePartitionCommand'. + // 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 + // 'StoragePartitionCommand'. { return object.hashAppendImpl(hashAlg); } @@ -12569,22 +12762,31 @@ BDLAT_DECL_CHOICE_WITH_BITWISEMOVEABLE_TRAITS(mqbcmd::StoragePartitionCommand) namespace mqbcmd { -// ================== -// class StorageQueue -// ================== + // ================== + // class StorageQueue + // ================== class StorageQueue { + // INSTANCE DATA - bsl::string d_canonicalUri; - StorageQueueCommand d_command; + bsl::string d_canonicalUri; + StorageQueueCommand d_command; public: // TYPES - enum { ATTRIBUTE_ID_CANONICAL_URI = 0, ATTRIBUTE_ID_COMMAND = 1 }; + enum { + ATTRIBUTE_ID_CANONICAL_URI = 0 + , ATTRIBUTE_ID_COMMAND = 1 + }; - enum { NUM_ATTRIBUTES = 2 }; + enum { + NUM_ATTRIBUTES = 2 + }; - enum { ATTRIBUTE_INDEX_CANONICAL_URI = 0, ATTRIBUTE_INDEX_COMMAND = 1 }; + enum { + ATTRIBUTE_INDEX_CANONICAL_URI = 0 + , ATTRIBUTE_INDEX_COMMAND = 1 + }; // CONSTANTS static const char CLASS_NAME[]; @@ -12593,173 +12795,176 @@ class StorageQueue { 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 StorageQueue(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'StorageQueue' having the default value. - // Use the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit StorageQueue(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'StorageQueue' having the default value. + // Use the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. StorageQueue(const StorageQueue& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'StorageQueue' 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 'StorageQueue' 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) StorageQueue(StorageQueue&& original) noexcept; - // Create an object of type 'StorageQueue' 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 'StorageQueue' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - StorageQueue(StorageQueue&& original, bslma::Allocator* basicAllocator); - // Create an object of type 'StorageQueue' 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. + StorageQueue(StorageQueue&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'StorageQueue' 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 ~StorageQueue(); - // Destroy this object. + // Destroy this object. // MANIPULATORS StorageQueue& operator=(const StorageQueue& 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) StorageQueue& operator=(StorageQueue&& 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& canonicalUri(); - // Return a reference to the modifiable "CanonicalUri" attribute of - // this object. + // Return a reference to the modifiable "CanonicalUri" attribute of + // this object. StorageQueueCommand& command(); - // Return a reference to the modifiable "Command" attribute of this - // object. + // Return a reference to the modifiable "Command" 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& canonicalUri() const; - // Return a reference offering non-modifiable access to the - // "CanonicalUri" attribute of this object. + // Return a reference offering non-modifiable access to the + // "CanonicalUri" attribute of this object. const StorageQueueCommand& 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. // HIDDEN FRIENDS friend bool operator==(const StorageQueue& lhs, const StorageQueue& 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.canonicalUri() == rhs.canonicalUri() && lhs.command() == rhs.command(); } friend bool operator!=(const StorageQueue& lhs, const StorageQueue& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const StorageQueue& 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); } @@ -12767,10 +12972,10 @@ class StorageQueue { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const StorageQueue& 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 - // 'StorageQueue'. + // 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 + // 'StorageQueue'. { using bslh::hashAppend; hashAppend(hashAlg, object.canonicalUri()); @@ -12786,15 +12991,16 @@ BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::StorageQueue) namespace mqbcmd { -// ================== -// class Subscription -// ================== + // ================== + // class Subscription + // ================== class Subscription { + // INSTANCE DATA - Subscriber d_subscriber; - ConsumerInfo d_consumer; - unsigned int d_downstreamSubscriptionId; + Subscriber d_subscriber; + ConsumerInfo d_consumer; + unsigned int d_downstreamSubscriptionId; // PRIVATE ACCESSORS template @@ -12803,17 +13009,19 @@ class Subscription { public: // TYPES enum { - ATTRIBUTE_ID_DOWNSTREAM_SUBSCRIPTION_ID = 0, - ATTRIBUTE_ID_CONSUMER = 1, - ATTRIBUTE_ID_SUBSCRIBER = 2 + ATTRIBUTE_ID_DOWNSTREAM_SUBSCRIPTION_ID = 0 + , ATTRIBUTE_ID_CONSUMER = 1 + , ATTRIBUTE_ID_SUBSCRIBER = 2 }; - enum { NUM_ATTRIBUTES = 3 }; + enum { + NUM_ATTRIBUTES = 3 + }; enum { - ATTRIBUTE_INDEX_DOWNSTREAM_SUBSCRIPTION_ID = 0, - ATTRIBUTE_INDEX_CONSUMER = 1, - ATTRIBUTE_INDEX_SUBSCRIBER = 2 + ATTRIBUTE_INDEX_DOWNSTREAM_SUBSCRIPTION_ID = 0 + , ATTRIBUTE_INDEX_CONSUMER = 1 + , ATTRIBUTE_INDEX_SUBSCRIBER = 2 }; // CONSTANTS @@ -12823,143 +13031,145 @@ class Subscription { 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 Subscription(); - // Create an object of type 'Subscription' having the default value. + // Create an object of type 'Subscription' 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. unsigned int& downstreamSubscriptionId(); - // Return a reference to the modifiable "DownstreamSubscriptionId" - // attribute of this object. + // Return a reference to the modifiable "DownstreamSubscriptionId" + // attribute of this object. ConsumerInfo& consumer(); - // Return a reference to the modifiable "Consumer" attribute of this - // object. + // Return a reference to the modifiable "Consumer" attribute of this + // object. Subscriber& subscriber(); - // Return a reference to the modifiable "Subscriber" attribute of this - // object. + // Return a reference to the modifiable "Subscriber" 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. unsigned int downstreamSubscriptionId() const; - // Return the value of the "DownstreamSubscriptionId" attribute of this - // object. + // Return the value of the "DownstreamSubscriptionId" attribute of this + // object. const ConsumerInfo& consumer() const; - // Return a reference offering non-modifiable access to the "Consumer" - // attribute of this object. + // Return a reference offering non-modifiable access to the "Consumer" + // attribute of this object. const Subscriber& subscriber() const; - // Return a reference offering non-modifiable access to the - // "Subscriber" attribute of this object. + // Return a reference offering non-modifiable access to the + // "Subscriber" attribute of this object. // HIDDEN FRIENDS friend bool operator==(const Subscription& lhs, const Subscription& 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.downstreamSubscriptionId() == - rhs.downstreamSubscriptionId() && + return lhs.downstreamSubscriptionId() == rhs.downstreamSubscriptionId() && lhs.consumer() == rhs.consumer() && lhs.subscriber() == rhs.subscriber(); } friend bool operator!=(const Subscription& lhs, const Subscription& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const Subscription& 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); } @@ -12967,10 +13177,10 @@ class Subscription { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const Subscription& 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 - // 'Subscription'. + // 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 + // 'Subscription'. { object.hashAppendImpl(hashAlg); } @@ -12984,25 +13194,26 @@ BDLAT_DECL_SEQUENCE_WITH_BITWISEMOVEABLE_TRAITS(mqbcmd::Subscription) namespace mqbcmd { -// =========== -// class Value -// =========== + // =========== + // class Value + // =========== class Value { + // INSTANCE DATA union { - bsls::ObjectBuffer d_theNull; - bsls::ObjectBuffer d_theBool; - bsls::ObjectBuffer d_theInteger; - bsls::ObjectBuffer d_theDouble; - bsls::ObjectBuffer d_theDate; - bsls::ObjectBuffer d_theTime; - bsls::ObjectBuffer d_theDatetime; - bsls::ObjectBuffer d_theString; + bsls::ObjectBuffer< Void > d_theNull; + bsls::ObjectBuffer< bool > d_theBool; + bsls::ObjectBuffer< bsls::Types::Int64 > d_theInteger; + bsls::ObjectBuffer< double > d_theDouble; + bsls::ObjectBuffer< bdlt::DateTz > d_theDate; + bsls::ObjectBuffer< bdlt::TimeTz > d_theTime; + bsls::ObjectBuffer< bdlt::DatetimeTz > d_theDatetime; + bsls::ObjectBuffer< bsl::string > d_theString; }; - int d_selectionId; - bslma::Allocator* d_allocator_p; + int d_selectionId; + bslma::Allocator *d_allocator_p; // PRIVATE ACCESSORS template @@ -13014,28 +13225,30 @@ class Value { // TYPES enum { - SELECTION_ID_UNDEFINED = -1, - SELECTION_ID_THE_NULL = 0, - SELECTION_ID_THE_BOOL = 1, - SELECTION_ID_THE_INTEGER = 2, - SELECTION_ID_THE_DOUBLE = 3, - SELECTION_ID_THE_DATE = 4, - SELECTION_ID_THE_TIME = 5, - SELECTION_ID_THE_DATETIME = 6, - SELECTION_ID_THE_STRING = 7 + SELECTION_ID_UNDEFINED = -1 + , SELECTION_ID_THE_NULL = 0 + , SELECTION_ID_THE_BOOL = 1 + , SELECTION_ID_THE_INTEGER = 2 + , SELECTION_ID_THE_DOUBLE = 3 + , SELECTION_ID_THE_DATE = 4 + , SELECTION_ID_THE_TIME = 5 + , SELECTION_ID_THE_DATETIME = 6 + , SELECTION_ID_THE_STRING = 7 }; - enum { NUM_SELECTIONS = 8 }; + enum { + NUM_SELECTIONS = 8 + }; enum { - SELECTION_INDEX_THE_NULL = 0, - SELECTION_INDEX_THE_BOOL = 1, - SELECTION_INDEX_THE_INTEGER = 2, - SELECTION_INDEX_THE_DOUBLE = 3, - SELECTION_INDEX_THE_DATE = 4, - SELECTION_INDEX_THE_TIME = 5, - SELECTION_INDEX_THE_DATETIME = 6, - SELECTION_INDEX_THE_STRING = 7 + SELECTION_INDEX_THE_NULL = 0 + , SELECTION_INDEX_THE_BOOL = 1 + , SELECTION_INDEX_THE_INTEGER = 2 + , SELECTION_INDEX_THE_DOUBLE = 3 + , SELECTION_INDEX_THE_DATE = 4 + , SELECTION_INDEX_THE_TIME = 5 + , SELECTION_INDEX_THE_DATETIME = 6 + , SELECTION_INDEX_THE_STRING = 7 }; // CONSTANTS @@ -13044,326 +13257,330 @@ class Value { 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 Value(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'Value' having the default value. Use the - // optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. - - Value(const Value& original, bslma::Allocator* basicAllocator = 0); - // Create an object of type 'Value' 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 Value(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'Value' having the default value. Use the + // optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. + + Value(const Value& original, + bslma::Allocator *basicAllocator = 0); + // Create an object of type 'Value' 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) Value(Value&& original) noexcept; - // Create an object of type 'Value' 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 'Value' having the value of the specified + // 'original' object. After performing this action, the 'original' + // object will be left in a valid, but unspecified state. - Value(Value&& original, bslma::Allocator* basicAllocator); - // Create an object of type 'Value' 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. + Value(Value&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'Value' 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 ~Value(); - // Destroy this object. + // Destroy this object. // MANIPULATORS Value& operator=(const Value& 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) Value& operator=(Value&& 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). Void& makeTheNull(); Void& makeTheNull(const Void& 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) Void& makeTheNull(Void&& value); #endif - // Set the value of this object to be a "TheNull" value. Optionally - // specify the 'value' of the "TheNull". If 'value' is not specified, - // the default "TheNull" value is used. + // Set the value of this object to be a "TheNull" value. Optionally + // specify the 'value' of the "TheNull". If 'value' is not specified, + // the default "TheNull" value is used. bool& makeTheBool(); bool& makeTheBool(bool value); - // Set the value of this object to be a "TheBool" value. Optionally - // specify the 'value' of the "TheBool". If 'value' is not specified, - // the default "TheBool" value is used. + // Set the value of this object to be a "TheBool" value. Optionally + // specify the 'value' of the "TheBool". If 'value' is not specified, + // the default "TheBool" value is used. bsls::Types::Int64& makeTheInteger(); bsls::Types::Int64& makeTheInteger(bsls::Types::Int64 value); - // Set the value of this object to be a "TheInteger" value. Optionally - // specify the 'value' of the "TheInteger". If 'value' is not - // specified, the default "TheInteger" value is used. + // Set the value of this object to be a "TheInteger" value. Optionally + // specify the 'value' of the "TheInteger". If 'value' is not + // specified, the default "TheInteger" value is used. double& makeTheDouble(); double& makeTheDouble(double value); - // Set the value of this object to be a "TheDouble" value. Optionally - // specify the 'value' of the "TheDouble". If 'value' is not - // specified, the default "TheDouble" value is used. + // Set the value of this object to be a "TheDouble" value. Optionally + // specify the 'value' of the "TheDouble". If 'value' is not + // specified, the default "TheDouble" value is used. bdlt::DateTz& makeTheDate(); bdlt::DateTz& makeTheDate(const bdlt::DateTz& 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) bdlt::DateTz& makeTheDate(bdlt::DateTz&& value); #endif - // Set the value of this object to be a "TheDate" value. Optionally - // specify the 'value' of the "TheDate". If 'value' is not specified, - // the default "TheDate" value is used. + // Set the value of this object to be a "TheDate" value. Optionally + // specify the 'value' of the "TheDate". If 'value' is not specified, + // the default "TheDate" value is used. bdlt::TimeTz& makeTheTime(); bdlt::TimeTz& makeTheTime(const bdlt::TimeTz& 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) bdlt::TimeTz& makeTheTime(bdlt::TimeTz&& value); #endif - // Set the value of this object to be a "TheTime" value. Optionally - // specify the 'value' of the "TheTime". If 'value' is not specified, - // the default "TheTime" value is used. + // Set the value of this object to be a "TheTime" value. Optionally + // specify the 'value' of the "TheTime". If 'value' is not specified, + // the default "TheTime" value is used. bdlt::DatetimeTz& makeTheDatetime(); bdlt::DatetimeTz& makeTheDatetime(const bdlt::DatetimeTz& 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) bdlt::DatetimeTz& makeTheDatetime(bdlt::DatetimeTz&& value); #endif - // Set the value of this object to be a "TheDatetime" value. - // Optionally specify the 'value' of the "TheDatetime". If 'value' is - // not specified, the default "TheDatetime" value is used. + // Set the value of this object to be a "TheDatetime" value. + // Optionally specify the 'value' of the "TheDatetime". If 'value' is + // not specified, the default "TheDatetime" value is used. bsl::string& makeTheString(); bsl::string& makeTheString(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& makeTheString(bsl::string&& value); #endif - // Set the value of this object to be a "TheString" value. Optionally - // specify the 'value' of the "TheString". If 'value' is not - // specified, the default "TheString" value is used. + // Set the value of this object to be a "TheString" value. Optionally + // specify the 'value' of the "TheString". If 'value' is not + // specified, the default "TheString" 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. Void& theNull(); - // Return a reference to the modifiable "TheNull" selection of this - // object if "TheNull" is the current selection. The behavior is - // undefined unless "TheNull" is the selection of this object. + // Return a reference to the modifiable "TheNull" selection of this + // object if "TheNull" is the current selection. The behavior is + // undefined unless "TheNull" is the selection of this object. bool& theBool(); - // Return a reference to the modifiable "TheBool" selection of this - // object if "TheBool" is the current selection. The behavior is - // undefined unless "TheBool" is the selection of this object. + // Return a reference to the modifiable "TheBool" selection of this + // object if "TheBool" is the current selection. The behavior is + // undefined unless "TheBool" is the selection of this object. bsls::Types::Int64& theInteger(); - // Return a reference to the modifiable "TheInteger" selection of this - // object if "TheInteger" is the current selection. The behavior is - // undefined unless "TheInteger" is the selection of this object. + // Return a reference to the modifiable "TheInteger" selection of this + // object if "TheInteger" is the current selection. The behavior is + // undefined unless "TheInteger" is the selection of this object. double& theDouble(); - // Return a reference to the modifiable "TheDouble" selection of this - // object if "TheDouble" is the current selection. The behavior is - // undefined unless "TheDouble" is the selection of this object. + // Return a reference to the modifiable "TheDouble" selection of this + // object if "TheDouble" is the current selection. The behavior is + // undefined unless "TheDouble" is the selection of this object. bdlt::DateTz& theDate(); - // Return a reference to the modifiable "TheDate" selection of this - // object if "TheDate" is the current selection. The behavior is - // undefined unless "TheDate" is the selection of this object. + // Return a reference to the modifiable "TheDate" selection of this + // object if "TheDate" is the current selection. The behavior is + // undefined unless "TheDate" is the selection of this object. bdlt::TimeTz& theTime(); - // Return a reference to the modifiable "TheTime" selection of this - // object if "TheTime" is the current selection. The behavior is - // undefined unless "TheTime" is the selection of this object. + // Return a reference to the modifiable "TheTime" selection of this + // object if "TheTime" is the current selection. The behavior is + // undefined unless "TheTime" is the selection of this object. bdlt::DatetimeTz& theDatetime(); - // Return a reference to the modifiable "TheDatetime" selection of this - // object if "TheDatetime" is the current selection. The behavior is - // undefined unless "TheDatetime" is the selection of this object. + // Return a reference to the modifiable "TheDatetime" selection of this + // object if "TheDatetime" is the current selection. The behavior is + // undefined unless "TheDatetime" is the selection of this object. bsl::string& theString(); - // Return a reference to the modifiable "TheString" selection of this - // object if "TheString" is the current selection. The behavior is - // undefined unless "TheString" is the selection of this object. + // Return a reference to the modifiable "TheString" selection of this + // object if "TheString" is the current selection. The behavior is + // undefined unless "TheString" 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 Void& theNull() const; - // Return a reference to the non-modifiable "TheNull" selection of this - // object if "TheNull" is the current selection. The behavior is - // undefined unless "TheNull" is the selection of this object. + // Return a reference to the non-modifiable "TheNull" selection of this + // object if "TheNull" is the current selection. The behavior is + // undefined unless "TheNull" is the selection of this object. const bool& theBool() const; - // Return a reference to the non-modifiable "TheBool" selection of this - // object if "TheBool" is the current selection. The behavior is - // undefined unless "TheBool" is the selection of this object. + // Return a reference to the non-modifiable "TheBool" selection of this + // object if "TheBool" is the current selection. The behavior is + // undefined unless "TheBool" is the selection of this object. const bsls::Types::Int64& theInteger() const; - // Return a reference to the non-modifiable "TheInteger" selection of - // this object if "TheInteger" is the current selection. The behavior - // is undefined unless "TheInteger" is the selection of this object. + // Return a reference to the non-modifiable "TheInteger" selection of + // this object if "TheInteger" is the current selection. The behavior + // is undefined unless "TheInteger" is the selection of this object. const double& theDouble() const; - // Return a reference to the non-modifiable "TheDouble" selection of - // this object if "TheDouble" is the current selection. The behavior - // is undefined unless "TheDouble" is the selection of this object. + // Return a reference to the non-modifiable "TheDouble" selection of + // this object if "TheDouble" is the current selection. The behavior + // is undefined unless "TheDouble" is the selection of this object. const bdlt::DateTz& theDate() const; - // Return a reference to the non-modifiable "TheDate" selection of this - // object if "TheDate" is the current selection. The behavior is - // undefined unless "TheDate" is the selection of this object. + // Return a reference to the non-modifiable "TheDate" selection of this + // object if "TheDate" is the current selection. The behavior is + // undefined unless "TheDate" is the selection of this object. const bdlt::TimeTz& theTime() const; - // Return a reference to the non-modifiable "TheTime" selection of this - // object if "TheTime" is the current selection. The behavior is - // undefined unless "TheTime" is the selection of this object. + // Return a reference to the non-modifiable "TheTime" selection of this + // object if "TheTime" is the current selection. The behavior is + // undefined unless "TheTime" is the selection of this object. const bdlt::DatetimeTz& theDatetime() const; - // Return a reference to the non-modifiable "TheDatetime" selection of - // this object if "TheDatetime" is the current selection. The behavior - // is undefined unless "TheDatetime" is the selection of this object. + // Return a reference to the non-modifiable "TheDatetime" selection of + // this object if "TheDatetime" is the current selection. The behavior + // is undefined unless "TheDatetime" is the selection of this object. const bsl::string& theString() const; - // Return a reference to the non-modifiable "TheString" selection of - // this object if "TheString" is the current selection. The behavior - // is undefined unless "TheString" is the selection of this object. + // Return a reference to the non-modifiable "TheString" selection of + // this object if "TheString" is the current selection. The behavior + // is undefined unless "TheString" is the selection of this object. bool isTheNullValue() const; - // Return 'true' if the value of this object is a "TheNull" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "TheNull" value, and + // return 'false' otherwise. bool isTheBoolValue() const; - // Return 'true' if the value of this object is a "TheBool" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "TheBool" value, and + // return 'false' otherwise. bool isTheIntegerValue() const; - // Return 'true' if the value of this object is a "TheInteger" value, - // and return 'false' otherwise. + // Return 'true' if the value of this object is a "TheInteger" value, + // and return 'false' otherwise. bool isTheDoubleValue() const; - // Return 'true' if the value of this object is a "TheDouble" value, - // and return 'false' otherwise. + // Return 'true' if the value of this object is a "TheDouble" value, + // and return 'false' otherwise. bool isTheDateValue() const; - // Return 'true' if the value of this object is a "TheDate" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "TheDate" value, and + // return 'false' otherwise. bool isTheTimeValue() const; - // Return 'true' if the value of this object is a "TheTime" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "TheTime" value, and + // return 'false' otherwise. bool isTheDatetimeValue() const; - // Return 'true' if the value of this object is a "TheDatetime" value, - // and return 'false' otherwise. + // Return 'true' if the value of this object is a "TheDatetime" value, + // and return 'false' otherwise. bool isTheStringValue() const; - // Return 'true' if the value of this object is a "TheString" value, - // and return 'false' otherwise. + // Return 'true' if the value of this object is a "TheString" 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 Value& lhs, const Value& rhs) - // Return 'true' if the specified 'lhs' and 'rhs' objects have the same - // value, and 'false' otherwise. Two 'Value' 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 'Value' 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 Value& lhs, const Value& 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 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 rhs.print(stream, 0, -1); } template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const Value& 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 'Value'. + // 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 'Value'. { return object.hashAppendImpl(hashAlg); } @@ -13377,21 +13594,28 @@ BDLAT_DECL_CHOICE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::Value) namespace mqbcmd { -// ================= -// class ClusterList -// ================= + // ================= + // class ClusterList + // ================= class ClusterList { + // INSTANCE DATA - bsl::vector d_clusters; + bsl::vector d_clusters; public: // TYPES - enum { ATTRIBUTE_ID_CLUSTERS = 0 }; + enum { + ATTRIBUTE_ID_CLUSTERS = 0 + }; - enum { NUM_ATTRIBUTES = 1 }; + enum { + NUM_ATTRIBUTES = 1 + }; - enum { ATTRIBUTE_INDEX_CLUSTERS = 0 }; + enum { + ATTRIBUTE_INDEX_CLUSTERS = 0 + }; // CONSTANTS static const char CLASS_NAME[]; @@ -13400,164 +13624,167 @@ class ClusterList { 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 ClusterList(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'ClusterList' having the default value. - // Use the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit ClusterList(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'ClusterList' having the default value. + // Use the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. ClusterList(const ClusterList& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'ClusterList' 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 'ClusterList' 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) ClusterList(ClusterList&& original) noexcept; - // Create an object of type 'ClusterList' 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 'ClusterList' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - ClusterList(ClusterList&& original, bslma::Allocator* basicAllocator); - // Create an object of type 'ClusterList' 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. + ClusterList(ClusterList&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'ClusterList' 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 ~ClusterList(); - // Destroy this object. + // Destroy this object. // MANIPULATORS ClusterList& operator=(const ClusterList& 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) ClusterList& operator=(ClusterList&& 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::vector& clusters(); - // Return a reference to the modifiable "Clusters" attribute of this - // object. + // Return a reference to the modifiable "Clusters" 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::vector& clusters() const; - // Return a reference offering non-modifiable access to the "Clusters" - // attribute of this object. + // Return a reference offering non-modifiable access to the "Clusters" + // attribute of this object. // HIDDEN FRIENDS friend bool operator==(const ClusterList& lhs, const ClusterList& 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.clusters() == rhs.clusters(); } friend bool operator!=(const ClusterList& lhs, const ClusterList& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const ClusterList& 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); } @@ -13565,9 +13792,9 @@ class ClusterList { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const ClusterList& 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 'ClusterList'. + // 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 'ClusterList'. { using bslh::hashAppend; hashAppend(hashAlg, object.clusters()); @@ -13582,19 +13809,20 @@ BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::ClusterList) namespace mqbcmd { -// ======================== -// class ClusterQueueHelper -// ======================== + // ======================== + // class ClusterQueueHelper + // ======================== class ClusterQueueHelper { + // INSTANCE DATA - bsl::vector d_queues; - bsl::vector d_domains; - bsl::string d_clusterName; - unsigned int d_numQueues; - unsigned int d_numQueueKeys; - unsigned int d_numPendingReopenQueueRequests; - Locality::Value d_locality; + bsl::vector d_queues; + bsl::vector d_domains; + bsl::string d_clusterName; + unsigned int d_numQueues; + unsigned int d_numQueueKeys; + unsigned int d_numPendingReopenQueueRequests; + Locality::Value d_locality; // PRIVATE ACCESSORS template @@ -13605,25 +13833,27 @@ class ClusterQueueHelper { public: // TYPES enum { - ATTRIBUTE_ID_CLUSTER_NAME = 0, - ATTRIBUTE_ID_LOCALITY = 1, - ATTRIBUTE_ID_NUM_QUEUES = 2, - ATTRIBUTE_ID_NUM_QUEUE_KEYS = 3, - ATTRIBUTE_ID_NUM_PENDING_REOPEN_QUEUE_REQUESTS = 4, - ATTRIBUTE_ID_DOMAINS = 5, - ATTRIBUTE_ID_QUEUES = 6 + ATTRIBUTE_ID_CLUSTER_NAME = 0 + , ATTRIBUTE_ID_LOCALITY = 1 + , ATTRIBUTE_ID_NUM_QUEUES = 2 + , ATTRIBUTE_ID_NUM_QUEUE_KEYS = 3 + , ATTRIBUTE_ID_NUM_PENDING_REOPEN_QUEUE_REQUESTS = 4 + , ATTRIBUTE_ID_DOMAINS = 5 + , ATTRIBUTE_ID_QUEUES = 6 }; - enum { NUM_ATTRIBUTES = 7 }; + enum { + NUM_ATTRIBUTES = 7 + }; enum { - ATTRIBUTE_INDEX_CLUSTER_NAME = 0, - ATTRIBUTE_INDEX_LOCALITY = 1, - ATTRIBUTE_INDEX_NUM_QUEUES = 2, - ATTRIBUTE_INDEX_NUM_QUEUE_KEYS = 3, - ATTRIBUTE_INDEX_NUM_PENDING_REOPEN_QUEUE_REQUESTS = 4, - ATTRIBUTE_INDEX_DOMAINS = 5, - ATTRIBUTE_INDEX_QUEUES = 6 + ATTRIBUTE_INDEX_CLUSTER_NAME = 0 + , ATTRIBUTE_INDEX_LOCALITY = 1 + , ATTRIBUTE_INDEX_NUM_QUEUES = 2 + , ATTRIBUTE_INDEX_NUM_QUEUE_KEYS = 3 + , ATTRIBUTE_INDEX_NUM_PENDING_REOPEN_QUEUE_REQUESTS = 4 + , ATTRIBUTE_INDEX_DOMAINS = 5 + , ATTRIBUTE_INDEX_QUEUES = 6 }; // CONSTANTS @@ -13633,212 +13863,214 @@ class ClusterQueueHelper { 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 ClusterQueueHelper(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'ClusterQueueHelper' having the default - // value. Use the optionally specified 'basicAllocator' to supply - // memory. If 'basicAllocator' is 0, the currently installed default - // allocator is used. + explicit ClusterQueueHelper(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'ClusterQueueHelper' having the default + // value. Use the optionally specified 'basicAllocator' to supply + // memory. If 'basicAllocator' is 0, the currently installed default + // allocator is used. ClusterQueueHelper(const ClusterQueueHelper& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'ClusterQueueHelper' 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 'ClusterQueueHelper' 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) ClusterQueueHelper(ClusterQueueHelper&& original) noexcept; - // Create an object of type 'ClusterQueueHelper' 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 'ClusterQueueHelper' having the value of + // the specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. ClusterQueueHelper(ClusterQueueHelper&& original, - bslma::Allocator* basicAllocator); - // Create an object of type 'ClusterQueueHelper' 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 'ClusterQueueHelper' 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 ~ClusterQueueHelper(); - // Destroy this object. + // Destroy this object. // MANIPULATORS ClusterQueueHelper& operator=(const ClusterQueueHelper& 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) ClusterQueueHelper& operator=(ClusterQueueHelper&& 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. Locality::Value& locality(); - // Return a reference to the modifiable "Locality" attribute of this - // object. + // Return a reference to the modifiable "Locality" attribute of this + // object. unsigned int& numQueues(); - // Return a reference to the modifiable "NumQueues" attribute of this - // object. + // Return a reference to the modifiable "NumQueues" attribute of this + // object. unsigned int& numQueueKeys(); - // Return a reference to the modifiable "NumQueueKeys" attribute of - // this object. + // Return a reference to the modifiable "NumQueueKeys" attribute of + // this object. unsigned int& numPendingReopenQueueRequests(); - // Return a reference to the modifiable "NumPendingReopenQueueRequests" - // attribute of this object. + // Return a reference to the modifiable "NumPendingReopenQueueRequests" + // attribute of this object. bsl::vector& domains(); - // Return a reference to the modifiable "Domains" attribute of this - // object. + // Return a reference to the modifiable "Domains" attribute of this + // object. bsl::vector& queues(); - // Return a reference to the modifiable "Queues" attribute of this - // object. + // Return a reference to the modifiable "Queues" 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. Locality::Value locality() const; - // Return the value of the "Locality" attribute of this object. + // Return the value of the "Locality" attribute of this object. unsigned int numQueues() const; - // Return the value of the "NumQueues" attribute of this object. + // Return the value of the "NumQueues" attribute of this object. unsigned int numQueueKeys() const; - // Return the value of the "NumQueueKeys" attribute of this object. + // Return the value of the "NumQueueKeys" attribute of this object. unsigned int numPendingReopenQueueRequests() const; - // Return the value of the "NumPendingReopenQueueRequests" attribute of - // this object. + // Return the value of the "NumPendingReopenQueueRequests" attribute of + // this object. const bsl::vector& domains() const; - // Return a reference offering non-modifiable access to the "Domains" - // attribute of this object. + // Return a reference offering non-modifiable access to the "Domains" + // attribute of this object. const bsl::vector& queues() const; - // Return a reference offering non-modifiable access to the "Queues" - // attribute of this object. + // Return a reference offering non-modifiable access to the "Queues" + // attribute of this object. // HIDDEN FRIENDS friend bool operator==(const ClusterQueueHelper& lhs, const ClusterQueueHelper& 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 ClusterQueueHelper& lhs, const ClusterQueueHelper& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const ClusterQueueHelper& 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); } @@ -13846,10 +14078,10 @@ class ClusterQueueHelper { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const ClusterQueueHelper& 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 - // 'ClusterQueueHelper'. + // 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 + // 'ClusterQueueHelper'. { object.hashAppendImpl(hashAlg); } @@ -13859,23 +14091,23 @@ class ClusterQueueHelper { // TRAITS -BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS( - mqbcmd::ClusterQueueHelper) +BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::ClusterQueueHelper) namespace mqbcmd { -// =========================== -// class ConfigProviderCommand -// =========================== + // =========================== + // class ConfigProviderCommand + // =========================== class ConfigProviderCommand { + // INSTANCE DATA union { - bsls::ObjectBuffer d_clearCache; + bsls::ObjectBuffer< ClearCache > d_clearCache; }; - int d_selectionId; - bslma::Allocator* d_allocator_p; + int d_selectionId; + bslma::Allocator *d_allocator_p; // PRIVATE ACCESSORS template @@ -13886,11 +14118,18 @@ class ConfigProviderCommand { public: // TYPES - enum { SELECTION_ID_UNDEFINED = -1, SELECTION_ID_CLEAR_CACHE = 0 }; + enum { + SELECTION_ID_UNDEFINED = -1 + , SELECTION_ID_CLEAR_CACHE = 0 + }; - enum { NUM_SELECTIONS = 1 }; + enum { + NUM_SELECTIONS = 1 + }; - enum { SELECTION_INDEX_CLEAR_CACHE = 0 }; + enum { + SELECTION_INDEX_CLEAR_CACHE = 0 + }; // CONSTANTS static const char CLASS_NAME[]; @@ -13898,166 +14137,168 @@ class ConfigProviderCommand { 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 ConfigProviderCommand(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'ConfigProviderCommand' having the default - // value. Use the optionally specified 'basicAllocator' to supply - // memory. If 'basicAllocator' is 0, the currently installed default - // allocator is used. + explicit ConfigProviderCommand(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'ConfigProviderCommand' having the default + // value. Use the optionally specified 'basicAllocator' to supply + // memory. If 'basicAllocator' is 0, the currently installed default + // allocator is used. ConfigProviderCommand(const ConfigProviderCommand& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'ConfigProviderCommand' 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 'ConfigProviderCommand' 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) ConfigProviderCommand(ConfigProviderCommand&& original) noexcept; - // Create an object of type 'ConfigProviderCommand' 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 'ConfigProviderCommand' having the value of + // the specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. ConfigProviderCommand(ConfigProviderCommand&& original, - bslma::Allocator* basicAllocator); - // Create an object of type 'ConfigProviderCommand' 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 'ConfigProviderCommand' 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 ~ConfigProviderCommand(); - // Destroy this object. + // Destroy this object. // MANIPULATORS ConfigProviderCommand& operator=(const ConfigProviderCommand& 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) ConfigProviderCommand& operator=(ConfigProviderCommand&& 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). ClearCache& makeClearCache(); ClearCache& makeClearCache(const ClearCache& 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) ClearCache& makeClearCache(ClearCache&& value); #endif - // Set the value of this object to be a "ClearCache" value. Optionally - // specify the 'value' of the "ClearCache". If 'value' is not - // specified, the default "ClearCache" value is used. + // Set the value of this object to be a "ClearCache" value. Optionally + // specify the 'value' of the "ClearCache". If 'value' is not + // specified, the default "ClearCache" 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. ClearCache& clearCache(); - // Return a reference to the modifiable "ClearCache" selection of this - // object if "ClearCache" is the current selection. The behavior is - // undefined unless "ClearCache" is the selection of this object. + // Return a reference to the modifiable "ClearCache" selection of this + // object if "ClearCache" is the current selection. The behavior is + // undefined unless "ClearCache" 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 ClearCache& clearCache() const; - // Return a reference to the non-modifiable "ClearCache" selection of - // this object if "ClearCache" is the current selection. The behavior - // is undefined unless "ClearCache" is the selection of this object. + // Return a reference to the non-modifiable "ClearCache" selection of + // this object if "ClearCache" is the current selection. The behavior + // is undefined unless "ClearCache" is the selection of this object. bool isClearCacheValue() const; - // Return 'true' if the value of this object is a "ClearCache" value, - // and return 'false' otherwise. + // Return 'true' if the value of this object is a "ClearCache" 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 ConfigProviderCommand& lhs, const ConfigProviderCommand& rhs) - // Return 'true' if the specified 'lhs' and 'rhs' objects have the same - // value, and 'false' otherwise. Two 'ConfigProviderCommand' 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 'ConfigProviderCommand' 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 ConfigProviderCommand& lhs, const ConfigProviderCommand& 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 ConfigProviderCommand& 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); } @@ -14065,10 +14306,10 @@ class ConfigProviderCommand { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const ConfigProviderCommand& 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 - // 'ConfigProviderCommand'. + // 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 + // 'ConfigProviderCommand'. { return object.hashAppendImpl(hashAlg); } @@ -14078,24 +14319,24 @@ class ConfigProviderCommand { // TRAITS -BDLAT_DECL_CHOICE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS( - mqbcmd::ConfigProviderCommand) +BDLAT_DECL_CHOICE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::ConfigProviderCommand) namespace mqbcmd { -// ================ -// class DomainInfo -// ================ + // ================ + // class DomainInfo + // ================ class DomainInfo { + // INSTANCE DATA - bslma::Allocator* d_allocator_p; - bsl::vector d_queueUris; - bsl::string d_name; - bsl::string d_configJson; - bsl::string d_clusterName; - StorageContent d_storageContent; - CapacityMeter* d_capacityMeter; + bslma::Allocator *d_allocator_p; + bsl::vector d_queueUris; + bsl::string d_name; + bsl::string d_configJson; + bsl::string d_clusterName; + StorageContent d_storageContent; + CapacityMeter *d_capacityMeter; // PRIVATE ACCESSORS template @@ -14106,23 +14347,25 @@ class DomainInfo { public: // TYPES enum { - ATTRIBUTE_ID_NAME = 0, - ATTRIBUTE_ID_CONFIG_JSON = 1, - ATTRIBUTE_ID_CLUSTER_NAME = 2, - ATTRIBUTE_ID_CAPACITY_METER = 3, - ATTRIBUTE_ID_QUEUE_URIS = 4, - ATTRIBUTE_ID_STORAGE_CONTENT = 5 + ATTRIBUTE_ID_NAME = 0 + , ATTRIBUTE_ID_CONFIG_JSON = 1 + , ATTRIBUTE_ID_CLUSTER_NAME = 2 + , ATTRIBUTE_ID_CAPACITY_METER = 3 + , ATTRIBUTE_ID_QUEUE_URIS = 4 + , ATTRIBUTE_ID_STORAGE_CONTENT = 5 }; - enum { NUM_ATTRIBUTES = 6 }; + enum { + NUM_ATTRIBUTES = 6 + }; enum { - ATTRIBUTE_INDEX_NAME = 0, - ATTRIBUTE_INDEX_CONFIG_JSON = 1, - ATTRIBUTE_INDEX_CLUSTER_NAME = 2, - ATTRIBUTE_INDEX_CAPACITY_METER = 3, - ATTRIBUTE_INDEX_QUEUE_URIS = 4, - ATTRIBUTE_INDEX_STORAGE_CONTENT = 5 + ATTRIBUTE_INDEX_NAME = 0 + , ATTRIBUTE_INDEX_CONFIG_JSON = 1 + , ATTRIBUTE_INDEX_CLUSTER_NAME = 2 + , ATTRIBUTE_INDEX_CAPACITY_METER = 3 + , ATTRIBUTE_INDEX_QUEUE_URIS = 4 + , ATTRIBUTE_INDEX_STORAGE_CONTENT = 5 }; // CONSTANTS @@ -14132,213 +14375,216 @@ class DomainInfo { 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 DomainInfo(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'DomainInfo' having the default value. Use - // the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit DomainInfo(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'DomainInfo' having the default value. Use + // the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. DomainInfo(const DomainInfo& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'DomainInfo' 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 'DomainInfo' 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) DomainInfo(DomainInfo&& original) noexcept; - // Create an object of type 'DomainInfo' 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 'DomainInfo' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - DomainInfo(DomainInfo&& original, bslma::Allocator* basicAllocator); - // Create an object of type 'DomainInfo' 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. + DomainInfo(DomainInfo&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'DomainInfo' 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 ~DomainInfo(); - // Destroy this object. + // Destroy this object. // MANIPULATORS DomainInfo& operator=(const DomainInfo& 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) DomainInfo& operator=(DomainInfo&& 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. bsl::string& configJson(); - // Return a reference to the modifiable "ConfigJson" attribute of this - // object. + // Return a reference to the modifiable "ConfigJson" attribute of this + // object. 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. CapacityMeter& capacityMeter(); - // Return a reference to the modifiable "CapacityMeter" attribute of - // this object. + // Return a reference to the modifiable "CapacityMeter" attribute of + // this object. bsl::vector& queueUris(); - // Return a reference to the modifiable "QueueUris" attribute of this - // object. + // Return a reference to the modifiable "QueueUris" attribute of this + // object. StorageContent& storageContent(); - // Return a reference to the modifiable "StorageContent" attribute of - // this object. + // Return a reference to the modifiable "StorageContent" 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. const bsl::string& configJson() const; - // Return a reference offering non-modifiable access to the - // "ConfigJson" attribute of this object. + // Return a reference offering non-modifiable access to the + // "ConfigJson" attribute of this object. 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 CapacityMeter& capacityMeter() const; - // Return a reference offering non-modifiable access to the - // "CapacityMeter" attribute of this object. + // Return a reference offering non-modifiable access to the + // "CapacityMeter" attribute of this object. const bsl::vector& queueUris() const; - // Return a reference offering non-modifiable access to the "QueueUris" - // attribute of this object. + // Return a reference offering non-modifiable access to the "QueueUris" + // attribute of this object. const StorageContent& storageContent() const; - // Return a reference offering non-modifiable access to the - // "StorageContent" attribute of this object. + // Return a reference offering non-modifiable access to the + // "StorageContent" attribute of this object. // HIDDEN FRIENDS friend bool operator==(const DomainInfo& lhs, const DomainInfo& 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 DomainInfo& lhs, const DomainInfo& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const DomainInfo& 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 DomainInfo& 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 'DomainInfo'. + // 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 'DomainInfo'. { object.hashAppendImpl(hashAlg); } @@ -14352,22 +14598,31 @@ BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::DomainInfo) namespace mqbcmd { -// ================= -// class DomainQueue -// ================= + // ================= + // class DomainQueue + // ================= class DomainQueue { + // INSTANCE DATA - bsl::string d_name; - QueueCommand d_command; + bsl::string d_name; + QueueCommand d_command; public: // TYPES - enum { ATTRIBUTE_ID_NAME = 0, ATTRIBUTE_ID_COMMAND = 1 }; + enum { + ATTRIBUTE_ID_NAME = 0 + , ATTRIBUTE_ID_COMMAND = 1 + }; - enum { NUM_ATTRIBUTES = 2 }; + enum { + NUM_ATTRIBUTES = 2 + }; - enum { ATTRIBUTE_INDEX_NAME = 0, ATTRIBUTE_INDEX_COMMAND = 1 }; + enum { + ATTRIBUTE_INDEX_NAME = 0 + , ATTRIBUTE_INDEX_COMMAND = 1 + }; // CONSTANTS static const char CLASS_NAME[]; @@ -14376,172 +14631,176 @@ class DomainQueue { 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 DomainQueue(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'DomainQueue' having the default value. - // Use the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit DomainQueue(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'DomainQueue' having the default value. + // Use the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. DomainQueue(const DomainQueue& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'DomainQueue' 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 'DomainQueue' 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) DomainQueue(DomainQueue&& original) noexcept; - // Create an object of type 'DomainQueue' 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 'DomainQueue' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - DomainQueue(DomainQueue&& original, bslma::Allocator* basicAllocator); - // Create an object of type 'DomainQueue' 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. + DomainQueue(DomainQueue&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'DomainQueue' 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 ~DomainQueue(); - // Destroy this object. + // Destroy this object. // MANIPULATORS DomainQueue& operator=(const DomainQueue& 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) DomainQueue& operator=(DomainQueue&& 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. QueueCommand& command(); - // Return a reference to the modifiable "Command" attribute of this - // object. + // Return a reference to the modifiable "Command" 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. const QueueCommand& 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. // HIDDEN FRIENDS friend bool operator==(const DomainQueue& lhs, const DomainQueue& 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.command() == rhs.command(); + return lhs.name() == rhs.name() && + lhs.command() == rhs.command(); } friend bool operator!=(const DomainQueue& lhs, const DomainQueue& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const DomainQueue& 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); } @@ -14549,9 +14808,9 @@ class DomainQueue { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const DomainQueue& 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 'DomainQueue'. + // 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 'DomainQueue'. { using bslh::hashAppend; hashAppend(hashAlg, object.name()); @@ -14567,18 +14826,19 @@ BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::DomainQueue) namespace mqbcmd { -// =========================== -// class DomainResolverCommand -// =========================== + // =========================== + // class DomainResolverCommand + // =========================== class DomainResolverCommand { + // INSTANCE DATA union { - bsls::ObjectBuffer d_clearCache; + bsls::ObjectBuffer< ClearCache > d_clearCache; }; - int d_selectionId; - bslma::Allocator* d_allocator_p; + int d_selectionId; + bslma::Allocator *d_allocator_p; // PRIVATE ACCESSORS template @@ -14589,11 +14849,18 @@ class DomainResolverCommand { public: // TYPES - enum { SELECTION_ID_UNDEFINED = -1, SELECTION_ID_CLEAR_CACHE = 0 }; + enum { + SELECTION_ID_UNDEFINED = -1 + , SELECTION_ID_CLEAR_CACHE = 0 + }; - enum { NUM_SELECTIONS = 1 }; + enum { + NUM_SELECTIONS = 1 + }; - enum { SELECTION_INDEX_CLEAR_CACHE = 0 }; + enum { + SELECTION_INDEX_CLEAR_CACHE = 0 + }; // CONSTANTS static const char CLASS_NAME[]; @@ -14601,166 +14868,168 @@ class DomainResolverCommand { 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 DomainResolverCommand(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'DomainResolverCommand' having the default - // value. Use the optionally specified 'basicAllocator' to supply - // memory. If 'basicAllocator' is 0, the currently installed default - // allocator is used. + explicit DomainResolverCommand(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'DomainResolverCommand' having the default + // value. Use the optionally specified 'basicAllocator' to supply + // memory. If 'basicAllocator' is 0, the currently installed default + // allocator is used. DomainResolverCommand(const DomainResolverCommand& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'DomainResolverCommand' 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 'DomainResolverCommand' 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) DomainResolverCommand(DomainResolverCommand&& original) noexcept; - // Create an object of type 'DomainResolverCommand' 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 'DomainResolverCommand' having the value of + // the specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. DomainResolverCommand(DomainResolverCommand&& original, - bslma::Allocator* basicAllocator); - // Create an object of type 'DomainResolverCommand' 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 'DomainResolverCommand' 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 ~DomainResolverCommand(); - // Destroy this object. + // Destroy this object. // MANIPULATORS DomainResolverCommand& operator=(const DomainResolverCommand& 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) DomainResolverCommand& operator=(DomainResolverCommand&& 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). ClearCache& makeClearCache(); ClearCache& makeClearCache(const ClearCache& 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) ClearCache& makeClearCache(ClearCache&& value); #endif - // Set the value of this object to be a "ClearCache" value. Optionally - // specify the 'value' of the "ClearCache". If 'value' is not - // specified, the default "ClearCache" value is used. + // Set the value of this object to be a "ClearCache" value. Optionally + // specify the 'value' of the "ClearCache". If 'value' is not + // specified, the default "ClearCache" 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. ClearCache& clearCache(); - // Return a reference to the modifiable "ClearCache" selection of this - // object if "ClearCache" is the current selection. The behavior is - // undefined unless "ClearCache" is the selection of this object. + // Return a reference to the modifiable "ClearCache" selection of this + // object if "ClearCache" is the current selection. The behavior is + // undefined unless "ClearCache" 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 ClearCache& clearCache() const; - // Return a reference to the non-modifiable "ClearCache" selection of - // this object if "ClearCache" is the current selection. The behavior - // is undefined unless "ClearCache" is the selection of this object. + // Return a reference to the non-modifiable "ClearCache" selection of + // this object if "ClearCache" is the current selection. The behavior + // is undefined unless "ClearCache" is the selection of this object. bool isClearCacheValue() const; - // Return 'true' if the value of this object is a "ClearCache" value, - // and return 'false' otherwise. + // Return 'true' if the value of this object is a "ClearCache" 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 DomainResolverCommand& lhs, const DomainResolverCommand& rhs) - // Return 'true' if the specified 'lhs' and 'rhs' objects have the same - // value, and 'false' otherwise. Two 'DomainResolverCommand' 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 'DomainResolverCommand' 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 DomainResolverCommand& lhs, const DomainResolverCommand& 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 DomainResolverCommand& 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); } @@ -14768,10 +15037,10 @@ class DomainResolverCommand { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const DomainResolverCommand& 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 - // 'DomainResolverCommand'. + // 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 + // 'DomainResolverCommand'. { return object.hashAppendImpl(hashAlg); } @@ -14781,28 +15050,28 @@ class DomainResolverCommand { // TRAITS -BDLAT_DECL_CHOICE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS( - mqbcmd::DomainResolverCommand) +BDLAT_DECL_CHOICE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::DomainResolverCommand) namespace mqbcmd { -// ====================== -// class FileStoreSummary -// ====================== + // ====================== + // class FileStoreSummary + // ====================== class FileStoreSummary { + // INSTANCE DATA - bsls::Types::Uint64 d_sequenceNum; - bsls::Types::Uint64 d_totalMappedBytes; - bsl::vector d_fileSets; - bsl::string d_primaryNodeDescription; - StorageContent d_storageContent; - ActiveFileSet d_activeFileSet; - unsigned int d_primaryLeaseId; - unsigned int d_numOutstandingRecords; - unsigned int d_numUnreceiptedMessages; - unsigned int d_naglePacketCount; - bool d_isAvailable; + bsls::Types::Uint64 d_sequenceNum; + bsls::Types::Uint64 d_totalMappedBytes; + bsl::vector d_fileSets; + bsl::string d_primaryNodeDescription; + StorageContent d_storageContent; + ActiveFileSet d_activeFileSet; + unsigned int d_primaryLeaseId; + unsigned int d_numOutstandingRecords; + unsigned int d_numUnreceiptedMessages; + unsigned int d_naglePacketCount; + bool d_isAvailable; // PRIVATE ACCESSORS template @@ -14813,33 +15082,35 @@ class FileStoreSummary { public: // TYPES enum { - ATTRIBUTE_ID_PRIMARY_NODE_DESCRIPTION = 0, - ATTRIBUTE_ID_PRIMARY_LEASE_ID = 1, - ATTRIBUTE_ID_SEQUENCE_NUM = 2, - ATTRIBUTE_ID_IS_AVAILABLE = 3, - ATTRIBUTE_ID_FILE_SETS = 4, - ATTRIBUTE_ID_ACTIVE_FILE_SET = 5, - ATTRIBUTE_ID_TOTAL_MAPPED_BYTES = 6, - ATTRIBUTE_ID_NUM_OUTSTANDING_RECORDS = 7, - ATTRIBUTE_ID_NUM_UNRECEIPTED_MESSAGES = 8, - ATTRIBUTE_ID_NAGLE_PACKET_COUNT = 9, - ATTRIBUTE_ID_STORAGE_CONTENT = 10 + ATTRIBUTE_ID_PRIMARY_NODE_DESCRIPTION = 0 + , ATTRIBUTE_ID_PRIMARY_LEASE_ID = 1 + , ATTRIBUTE_ID_SEQUENCE_NUM = 2 + , ATTRIBUTE_ID_IS_AVAILABLE = 3 + , ATTRIBUTE_ID_FILE_SETS = 4 + , ATTRIBUTE_ID_ACTIVE_FILE_SET = 5 + , ATTRIBUTE_ID_TOTAL_MAPPED_BYTES = 6 + , ATTRIBUTE_ID_NUM_OUTSTANDING_RECORDS = 7 + , ATTRIBUTE_ID_NUM_UNRECEIPTED_MESSAGES = 8 + , ATTRIBUTE_ID_NAGLE_PACKET_COUNT = 9 + , ATTRIBUTE_ID_STORAGE_CONTENT = 10 }; - enum { NUM_ATTRIBUTES = 11 }; + enum { + NUM_ATTRIBUTES = 11 + }; enum { - ATTRIBUTE_INDEX_PRIMARY_NODE_DESCRIPTION = 0, - ATTRIBUTE_INDEX_PRIMARY_LEASE_ID = 1, - ATTRIBUTE_INDEX_SEQUENCE_NUM = 2, - ATTRIBUTE_INDEX_IS_AVAILABLE = 3, - ATTRIBUTE_INDEX_FILE_SETS = 4, - ATTRIBUTE_INDEX_ACTIVE_FILE_SET = 5, - ATTRIBUTE_INDEX_TOTAL_MAPPED_BYTES = 6, - ATTRIBUTE_INDEX_NUM_OUTSTANDING_RECORDS = 7, - ATTRIBUTE_INDEX_NUM_UNRECEIPTED_MESSAGES = 8, - ATTRIBUTE_INDEX_NAGLE_PACKET_COUNT = 9, - ATTRIBUTE_INDEX_STORAGE_CONTENT = 10 + ATTRIBUTE_INDEX_PRIMARY_NODE_DESCRIPTION = 0 + , ATTRIBUTE_INDEX_PRIMARY_LEASE_ID = 1 + , ATTRIBUTE_INDEX_SEQUENCE_NUM = 2 + , ATTRIBUTE_INDEX_IS_AVAILABLE = 3 + , ATTRIBUTE_INDEX_FILE_SETS = 4 + , ATTRIBUTE_INDEX_ACTIVE_FILE_SET = 5 + , ATTRIBUTE_INDEX_TOTAL_MAPPED_BYTES = 6 + , ATTRIBUTE_INDEX_NUM_OUTSTANDING_RECORDS = 7 + , ATTRIBUTE_INDEX_NUM_UNRECEIPTED_MESSAGES = 8 + , ATTRIBUTE_INDEX_NAGLE_PACKET_COUNT = 9 + , ATTRIBUTE_INDEX_STORAGE_CONTENT = 10 }; // CONSTANTS @@ -14849,242 +15120,244 @@ class FileStoreSummary { 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 FileStoreSummary(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'FileStoreSummary' having the default - // value. Use the optionally specified 'basicAllocator' to supply - // memory. If 'basicAllocator' is 0, the currently installed default - // allocator is used. + explicit FileStoreSummary(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'FileStoreSummary' having the default + // value. Use the optionally specified 'basicAllocator' to supply + // memory. If 'basicAllocator' is 0, the currently installed default + // allocator is used. FileStoreSummary(const FileStoreSummary& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'FileStoreSummary' 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 'FileStoreSummary' 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) FileStoreSummary(FileStoreSummary&& original) noexcept; - // Create an object of type 'FileStoreSummary' 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 'FileStoreSummary' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. FileStoreSummary(FileStoreSummary&& original, - bslma::Allocator* basicAllocator); - // Create an object of type 'FileStoreSummary' 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 'FileStoreSummary' 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 ~FileStoreSummary(); - // Destroy this object. + // Destroy this object. // MANIPULATORS FileStoreSummary& operator=(const FileStoreSummary& 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) FileStoreSummary& operator=(FileStoreSummary&& 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& primaryNodeDescription(); - // Return a reference to the modifiable "PrimaryNodeDescription" - // attribute of this object. + // Return a reference to the modifiable "PrimaryNodeDescription" + // attribute of this object. unsigned int& primaryLeaseId(); - // Return a reference to the modifiable "PrimaryLeaseId" attribute of - // this object. + // Return a reference to the modifiable "PrimaryLeaseId" attribute of + // this object. bsls::Types::Uint64& sequenceNum(); - // Return a reference to the modifiable "SequenceNum" attribute of this - // object. + // Return a reference to the modifiable "SequenceNum" attribute of this + // object. bool& isAvailable(); - // Return a reference to the modifiable "IsAvailable" attribute of this - // object. + // Return a reference to the modifiable "IsAvailable" attribute of this + // object. bsl::vector& fileSets(); - // Return a reference to the modifiable "FileSets" attribute of this - // object. + // Return a reference to the modifiable "FileSets" attribute of this + // object. ActiveFileSet& activeFileSet(); - // Return a reference to the modifiable "ActiveFileSet" attribute of - // this object. + // Return a reference to the modifiable "ActiveFileSet" attribute of + // this object. bsls::Types::Uint64& totalMappedBytes(); - // Return a reference to the modifiable "TotalMappedBytes" attribute of - // this object. + // Return a reference to the modifiable "TotalMappedBytes" attribute of + // this object. unsigned int& numOutstandingRecords(); - // Return a reference to the modifiable "NumOutstandingRecords" - // attribute of this object. + // Return a reference to the modifiable "NumOutstandingRecords" + // attribute of this object. unsigned int& numUnreceiptedMessages(); - // Return a reference to the modifiable "NumUnreceiptedMessages" - // attribute of this object. + // Return a reference to the modifiable "NumUnreceiptedMessages" + // attribute of this object. unsigned int& naglePacketCount(); - // Return a reference to the modifiable "NaglePacketCount" attribute of - // this object. + // Return a reference to the modifiable "NaglePacketCount" attribute of + // this object. StorageContent& storageContent(); - // Return a reference to the modifiable "StorageContent" attribute of - // this object. + // Return a reference to the modifiable "StorageContent" 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& primaryNodeDescription() const; - // Return a reference offering non-modifiable access to the - // "PrimaryNodeDescription" attribute of this object. + // Return a reference offering non-modifiable access to the + // "PrimaryNodeDescription" attribute of this object. unsigned int primaryLeaseId() const; - // Return the value of the "PrimaryLeaseId" attribute of this object. + // Return the value of the "PrimaryLeaseId" attribute of this object. bsls::Types::Uint64 sequenceNum() const; - // Return the value of the "SequenceNum" attribute of this object. + // Return the value of the "SequenceNum" attribute of this object. bool isAvailable() const; - // Return the value of the "IsAvailable" attribute of this object. + // Return the value of the "IsAvailable" attribute of this object. const bsl::vector& fileSets() const; - // Return a reference offering non-modifiable access to the "FileSets" - // attribute of this object. + // Return a reference offering non-modifiable access to the "FileSets" + // attribute of this object. const ActiveFileSet& activeFileSet() const; - // Return a reference offering non-modifiable access to the - // "ActiveFileSet" attribute of this object. + // Return a reference offering non-modifiable access to the + // "ActiveFileSet" attribute of this object. bsls::Types::Uint64 totalMappedBytes() const; - // Return the value of the "TotalMappedBytes" attribute of this object. + // Return the value of the "TotalMappedBytes" attribute of this object. unsigned int numOutstandingRecords() const; - // Return the value of the "NumOutstandingRecords" attribute of this - // object. + // Return the value of the "NumOutstandingRecords" attribute of this + // object. unsigned int numUnreceiptedMessages() const; - // Return the value of the "NumUnreceiptedMessages" attribute of this - // object. + // Return the value of the "NumUnreceiptedMessages" attribute of this + // object. unsigned int naglePacketCount() const; - // Return the value of the "NaglePacketCount" attribute of this object. + // Return the value of the "NaglePacketCount" attribute of this object. const StorageContent& storageContent() const; - // Return a reference offering non-modifiable access to the - // "StorageContent" attribute of this object. + // Return a reference offering non-modifiable access to the + // "StorageContent" attribute of this object. // HIDDEN FRIENDS friend bool operator==(const FileStoreSummary& lhs, const FileStoreSummary& 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 FileStoreSummary& lhs, const FileStoreSummary& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const FileStoreSummary& 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); } @@ -15092,10 +15365,10 @@ class FileStoreSummary { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const FileStoreSummary& 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 - // 'FileStoreSummary'. + // 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 + // 'FileStoreSummary'. { object.hashAppendImpl(hashAlg); } @@ -15105,27 +15378,35 @@ class FileStoreSummary { // TRAITS -BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS( - mqbcmd::FileStoreSummary) +BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::FileStoreSummary) namespace mqbcmd { -// ================ -// class GetTunable -// ================ + // ================ + // class GetTunable + // ================ class GetTunable { + // INSTANCE DATA - bsl::string d_name; - GetTunableChoice d_choice; + bsl::string d_name; + GetTunableChoice d_choice; public: // TYPES - enum { ATTRIBUTE_ID_NAME = 0, ATTRIBUTE_ID_CHOICE = 1 }; + enum { + ATTRIBUTE_ID_NAME = 0 + , ATTRIBUTE_ID_CHOICE = 1 + }; - enum { NUM_ATTRIBUTES = 2 }; + enum { + NUM_ATTRIBUTES = 2 + }; - enum { ATTRIBUTE_INDEX_NAME = 0, ATTRIBUTE_INDEX_CHOICE = 1 }; + enum { + ATTRIBUTE_INDEX_NAME = 0 + , ATTRIBUTE_INDEX_CHOICE = 1 + }; // CONSTANTS static const char CLASS_NAME[]; @@ -15134,181 +15415,185 @@ class GetTunable { 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 GetTunable(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'GetTunable' having the default value. Use - // the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit GetTunable(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'GetTunable' having the default value. Use + // the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. GetTunable(const GetTunable& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'GetTunable' 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 'GetTunable' 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) GetTunable(GetTunable&& original) noexcept; - // Create an object of type 'GetTunable' 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 'GetTunable' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - GetTunable(GetTunable&& original, bslma::Allocator* basicAllocator); - // Create an object of type 'GetTunable' 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. + GetTunable(GetTunable&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'GetTunable' 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 ~GetTunable(); - // Destroy this object. + // Destroy this object. // MANIPULATORS GetTunable& operator=(const GetTunable& 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) GetTunable& operator=(GetTunable&& 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. GetTunableChoice& choice(); - // Return a reference to the modifiable "Choice" attribute of this - // object. + // Return a reference to the modifiable "Choice" 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. const GetTunableChoice& choice() const; - // Return a reference offering non-modifiable access to the "Choice" - // attribute of this object. + // Return a reference offering non-modifiable access to the "Choice" + // attribute of this object. // HIDDEN FRIENDS friend bool operator==(const GetTunable& lhs, const GetTunable& 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.choice() == rhs.choice(); + return lhs.name() == rhs.name() && + lhs.choice() == rhs.choice(); } friend bool operator!=(const GetTunable& lhs, const GetTunable& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const GetTunable& 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 GetTunable& 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 'GetTunable'. + // 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 'GetTunable'. { using bslh::hashAppend; hashAppend(hashAlg, object.name()); @@ -15324,16 +15609,17 @@ BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::GetTunable) namespace mqbcmd { -// ========================== -// class MessageGroupIdHelper -// ========================== + // ========================== + // class MessageGroupIdHelper + // ========================== class MessageGroupIdHelper { + // INSTANCE DATA - bsls::Types::Int64 d_timeoutNanoseconds; - MessageGroupIdManagerIndex d_status; - int d_maxMsgGroupIds; - bool d_isRebalanceOn; + bsls::Types::Int64 d_timeoutNanoseconds; + MessageGroupIdManagerIndex d_status; + int d_maxMsgGroupIds; + bool d_isRebalanceOn; // PRIVATE ACCESSORS template @@ -15344,19 +15630,21 @@ class MessageGroupIdHelper { public: // TYPES enum { - ATTRIBUTE_ID_TIMEOUT_NANOSECONDS = 0, - ATTRIBUTE_ID_MAX_MSG_GROUP_IDS = 1, - ATTRIBUTE_ID_IS_REBALANCE_ON = 2, - ATTRIBUTE_ID_STATUS = 3 + ATTRIBUTE_ID_TIMEOUT_NANOSECONDS = 0 + , ATTRIBUTE_ID_MAX_MSG_GROUP_IDS = 1 + , ATTRIBUTE_ID_IS_REBALANCE_ON = 2 + , ATTRIBUTE_ID_STATUS = 3 }; - enum { NUM_ATTRIBUTES = 4 }; + enum { + NUM_ATTRIBUTES = 4 + }; enum { - ATTRIBUTE_INDEX_TIMEOUT_NANOSECONDS = 0, - ATTRIBUTE_INDEX_MAX_MSG_GROUP_IDS = 1, - ATTRIBUTE_INDEX_IS_REBALANCE_ON = 2, - ATTRIBUTE_INDEX_STATUS = 3 + ATTRIBUTE_INDEX_TIMEOUT_NANOSECONDS = 0 + , ATTRIBUTE_INDEX_MAX_MSG_GROUP_IDS = 1 + , ATTRIBUTE_INDEX_IS_REBALANCE_ON = 2 + , ATTRIBUTE_INDEX_STATUS = 3 }; // CONSTANTS @@ -15366,189 +15654,191 @@ class MessageGroupIdHelper { 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 MessageGroupIdHelper(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'MessageGroupIdHelper' having the default - // value. Use the optionally specified 'basicAllocator' to supply - // memory. If 'basicAllocator' is 0, the currently installed default - // allocator is used. + explicit MessageGroupIdHelper(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'MessageGroupIdHelper' having the default + // value. Use the optionally specified 'basicAllocator' to supply + // memory. If 'basicAllocator' is 0, the currently installed default + // allocator is used. MessageGroupIdHelper(const MessageGroupIdHelper& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'MessageGroupIdHelper' 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 'MessageGroupIdHelper' 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) MessageGroupIdHelper(MessageGroupIdHelper&& original) noexcept; - // Create an object of type 'MessageGroupIdHelper' 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 'MessageGroupIdHelper' having the value of + // the specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. MessageGroupIdHelper(MessageGroupIdHelper&& original, - bslma::Allocator* basicAllocator); - // Create an object of type 'MessageGroupIdHelper' 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 'MessageGroupIdHelper' 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 ~MessageGroupIdHelper(); - // Destroy this object. + // Destroy this object. // MANIPULATORS MessageGroupIdHelper& operator=(const MessageGroupIdHelper& 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) MessageGroupIdHelper& operator=(MessageGroupIdHelper&& 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. bsls::Types::Int64& timeoutNanoseconds(); - // Return a reference to the modifiable "TimeoutNanoseconds" attribute - // of this object. + // Return a reference to the modifiable "TimeoutNanoseconds" attribute + // of this object. int& maxMsgGroupIds(); - // Return a reference to the modifiable "MaxMsgGroupIds" attribute of - // this object. + // Return a reference to the modifiable "MaxMsgGroupIds" attribute of + // this object. bool& isRebalanceOn(); - // Return a reference to the modifiable "IsRebalanceOn" attribute of - // this object. + // Return a reference to the modifiable "IsRebalanceOn" attribute of + // this object. MessageGroupIdManagerIndex& status(); - // Return a reference to the modifiable "Status" attribute of this - // object. + // Return a reference to the modifiable "Status" 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 timeoutNanoseconds() const; - // Return the value of the "TimeoutNanoseconds" attribute of this - // object. + // Return the value of the "TimeoutNanoseconds" attribute of this + // object. int maxMsgGroupIds() const; - // Return the value of the "MaxMsgGroupIds" attribute of this object. + // Return the value of the "MaxMsgGroupIds" attribute of this object. bool isRebalanceOn() const; - // Return the value of the "IsRebalanceOn" attribute of this object. + // Return the value of the "IsRebalanceOn" attribute of this object. const MessageGroupIdManagerIndex& status() const; - // Return a reference offering non-modifiable access to the "Status" - // attribute of this object. + // Return a reference offering non-modifiable access to the "Status" + // attribute of this object. // HIDDEN FRIENDS friend bool operator==(const MessageGroupIdHelper& lhs, const MessageGroupIdHelper& 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 MessageGroupIdHelper& lhs, const MessageGroupIdHelper& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const MessageGroupIdHelper& 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); } @@ -15556,10 +15846,10 @@ class MessageGroupIdHelper { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const MessageGroupIdHelper& 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 - // 'MessageGroupIdHelper'. + // 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 + // 'MessageGroupIdHelper'. { object.hashAppendImpl(hashAlg); } @@ -15569,26 +15859,32 @@ class MessageGroupIdHelper { // TRAITS -BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS( - mqbcmd::MessageGroupIdHelper) +BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::MessageGroupIdHelper) namespace mqbcmd { -// ================== -// class NodeStatuses -// ================== + // ================== + // class NodeStatuses + // ================== class NodeStatuses { + // INSTANCE DATA - bsl::vector d_nodes; + bsl::vector d_nodes; public: // TYPES - enum { ATTRIBUTE_ID_NODES = 0 }; + enum { + ATTRIBUTE_ID_NODES = 0 + }; - enum { NUM_ATTRIBUTES = 1 }; + enum { + NUM_ATTRIBUTES = 1 + }; - enum { ATTRIBUTE_INDEX_NODES = 0 }; + enum { + ATTRIBUTE_INDEX_NODES = 0 + }; // CONSTANTS static const char CLASS_NAME[]; @@ -15597,164 +15893,167 @@ class NodeStatuses { 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 NodeStatuses(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'NodeStatuses' having the default value. - // Use the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit NodeStatuses(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'NodeStatuses' having the default value. + // Use the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. NodeStatuses(const NodeStatuses& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'NodeStatuses' 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 'NodeStatuses' 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) NodeStatuses(NodeStatuses&& original) noexcept; - // Create an object of type 'NodeStatuses' 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 'NodeStatuses' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - NodeStatuses(NodeStatuses&& original, bslma::Allocator* basicAllocator); - // Create an object of type 'NodeStatuses' 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. + NodeStatuses(NodeStatuses&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'NodeStatuses' 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 ~NodeStatuses(); - // Destroy this object. + // Destroy this object. // MANIPULATORS NodeStatuses& operator=(const NodeStatuses& 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) NodeStatuses& operator=(NodeStatuses&& 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::vector& nodes(); - // Return a reference to the modifiable "Nodes" attribute of this - // object. + // Return a reference to the modifiable "Nodes" 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::vector& nodes() const; - // Return a reference offering non-modifiable access to the "Nodes" - // attribute of this object. + // Return a reference offering non-modifiable access to the "Nodes" + // attribute of this object. // HIDDEN FRIENDS friend bool operator==(const NodeStatuses& lhs, const NodeStatuses& 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.nodes() == rhs.nodes(); } friend bool operator!=(const NodeStatuses& lhs, const NodeStatuses& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const NodeStatuses& 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); } @@ -15762,10 +16061,10 @@ class NodeStatuses { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const NodeStatuses& 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 - // 'NodeStatuses'. + // 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 + // 'NodeStatuses'. { using bslh::hashAppend; hashAppend(hashAlg, object.nodes()); @@ -15780,21 +16079,28 @@ BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::NodeStatuses) namespace mqbcmd { -// ==================== -// class PartitionsInfo -// ==================== + // ==================== + // class PartitionsInfo + // ==================== class PartitionsInfo { + // INSTANCE DATA - bsl::vector d_partitions; + bsl::vector d_partitions; public: // TYPES - enum { ATTRIBUTE_ID_PARTITIONS = 0 }; + enum { + ATTRIBUTE_ID_PARTITIONS = 0 + }; - enum { NUM_ATTRIBUTES = 1 }; + enum { + NUM_ATTRIBUTES = 1 + }; - enum { ATTRIBUTE_INDEX_PARTITIONS = 0 }; + enum { + ATTRIBUTE_INDEX_PARTITIONS = 0 + }; // CONSTANTS static const char CLASS_NAME[]; @@ -15803,167 +16109,169 @@ class PartitionsInfo { 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 PartitionsInfo(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'PartitionsInfo' having the default value. - // Use the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit PartitionsInfo(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'PartitionsInfo' having the default value. + // Use the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. PartitionsInfo(const PartitionsInfo& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'PartitionsInfo' 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 'PartitionsInfo' 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) PartitionsInfo(PartitionsInfo&& original) noexcept; - // Create an object of type 'PartitionsInfo' 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 'PartitionsInfo' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - PartitionsInfo(PartitionsInfo&& original, - bslma::Allocator* basicAllocator); - // Create an object of type 'PartitionsInfo' 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. + PartitionsInfo(PartitionsInfo&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'PartitionsInfo' 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 ~PartitionsInfo(); - // Destroy this object. + // Destroy this object. // MANIPULATORS PartitionsInfo& operator=(const PartitionsInfo& 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) PartitionsInfo& operator=(PartitionsInfo&& 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::vector& partitions(); - // Return a reference to the modifiable "Partitions" attribute of this - // object. + // Return a reference to the modifiable "Partitions" 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::vector& partitions() const; - // Return a reference offering non-modifiable access to the - // "Partitions" attribute of this object. + // Return a reference offering non-modifiable access to the + // "Partitions" attribute of this object. // HIDDEN FRIENDS friend bool operator==(const PartitionsInfo& lhs, const PartitionsInfo& 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.partitions() == rhs.partitions(); } friend bool operator!=(const PartitionsInfo& lhs, const PartitionsInfo& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const PartitionsInfo& 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); } @@ -15971,10 +16279,10 @@ class PartitionsInfo { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const PartitionsInfo& 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 - // 'PartitionsInfo'. + // 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 + // 'PartitionsInfo'. { using bslh::hashAppend; hashAppend(hashAlg, object.partitions()); @@ -15985,27 +16293,35 @@ class PartitionsInfo { // TRAITS -BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS( - mqbcmd::PartitionsInfo) +BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::PartitionsInfo) namespace mqbcmd { -// =================== -// class PriorityGroup -// =================== + // =================== + // class PriorityGroup + // =================== class PriorityGroup { + // INSTANCE DATA - bsl::vector d_highestSubscriptions; - unsigned int d_id; + bsl::vector d_highestSubscriptions; + unsigned int d_id; public: // TYPES - enum { ATTRIBUTE_ID_ID = 0, ATTRIBUTE_ID_HIGHEST_SUBSCRIPTIONS = 1 }; + enum { + ATTRIBUTE_ID_ID = 0 + , ATTRIBUTE_ID_HIGHEST_SUBSCRIPTIONS = 1 + }; - enum { NUM_ATTRIBUTES = 2 }; + enum { + NUM_ATTRIBUTES = 2 + }; - enum { ATTRIBUTE_INDEX_ID = 0, ATTRIBUTE_INDEX_HIGHEST_SUBSCRIPTIONS = 1 }; + enum { + ATTRIBUTE_INDEX_ID = 0 + , ATTRIBUTE_INDEX_HIGHEST_SUBSCRIPTIONS = 1 + }; // CONSTANTS static const char CLASS_NAME[]; @@ -16014,171 +16330,174 @@ class PriorityGroup { 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 PriorityGroup(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'PriorityGroup' having the default value. - // Use the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit PriorityGroup(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'PriorityGroup' having the default value. + // Use the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. PriorityGroup(const PriorityGroup& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'PriorityGroup' 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 'PriorityGroup' 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) PriorityGroup(PriorityGroup&& original) noexcept; - // Create an object of type 'PriorityGroup' 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 'PriorityGroup' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - PriorityGroup(PriorityGroup&& original, bslma::Allocator* basicAllocator); - // Create an object of type 'PriorityGroup' 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. + PriorityGroup(PriorityGroup&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'PriorityGroup' 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 ~PriorityGroup(); - // Destroy this object. + // Destroy this object. // MANIPULATORS PriorityGroup& operator=(const PriorityGroup& 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) PriorityGroup& operator=(PriorityGroup&& 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. unsigned 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::vector& highestSubscriptions(); - // Return a reference to the modifiable "HighestSubscriptions" - // attribute of this object. + // Return a reference to the modifiable "HighestSubscriptions" + // 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. unsigned 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::vector& highestSubscriptions() const; - // Return a reference offering non-modifiable access to the - // "HighestSubscriptions" attribute of this object. + // Return a reference offering non-modifiable access to the + // "HighestSubscriptions" attribute of this object. // HIDDEN FRIENDS friend bool operator==(const PriorityGroup& lhs, const PriorityGroup& 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.highestSubscriptions() == rhs.highestSubscriptions(); } friend bool operator!=(const PriorityGroup& lhs, const PriorityGroup& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const PriorityGroup& 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); } @@ -16186,10 +16505,10 @@ class PriorityGroup { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const PriorityGroup& 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 - // 'PriorityGroup'. + // 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 + // 'PriorityGroup'. { using bslh::hashAppend; hashAppend(hashAlg, object.id()); @@ -16201,26 +16520,32 @@ class PriorityGroup { // TRAITS -BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS( - mqbcmd::PriorityGroup) +BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::PriorityGroup) namespace mqbcmd { -// ================== -// class PurgedQueues -// ================== + // ================== + // class PurgedQueues + // ================== class PurgedQueues { + // INSTANCE DATA - bsl::vector d_queues; + bsl::vector d_queues; public: // TYPES - enum { ATTRIBUTE_ID_QUEUES = 0 }; + enum { + ATTRIBUTE_ID_QUEUES = 0 + }; - enum { NUM_ATTRIBUTES = 1 }; + enum { + NUM_ATTRIBUTES = 1 + }; - enum { ATTRIBUTE_INDEX_QUEUES = 0 }; + enum { + ATTRIBUTE_INDEX_QUEUES = 0 + }; // CONSTANTS static const char CLASS_NAME[]; @@ -16229,164 +16554,167 @@ class PurgedQueues { 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 PurgedQueues(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'PurgedQueues' having the default value. - // Use the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit PurgedQueues(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'PurgedQueues' having the default value. + // Use the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. PurgedQueues(const PurgedQueues& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'PurgedQueues' 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 'PurgedQueues' 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) PurgedQueues(PurgedQueues&& original) noexcept; - // Create an object of type 'PurgedQueues' 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 'PurgedQueues' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - PurgedQueues(PurgedQueues&& original, bslma::Allocator* basicAllocator); - // Create an object of type 'PurgedQueues' 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. + PurgedQueues(PurgedQueues&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'PurgedQueues' 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 ~PurgedQueues(); - // Destroy this object. + // Destroy this object. // MANIPULATORS PurgedQueues& operator=(const PurgedQueues& 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) PurgedQueues& operator=(PurgedQueues&& 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::vector& queues(); - // Return a reference to the modifiable "Queues" attribute of this - // object. + // Return a reference to the modifiable "Queues" 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::vector& queues() const; - // Return a reference offering non-modifiable access to the "Queues" - // attribute of this object. + // Return a reference offering non-modifiable access to the "Queues" + // attribute of this object. // HIDDEN FRIENDS friend bool operator==(const PurgedQueues& lhs, const PurgedQueues& 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.queues() == rhs.queues(); } friend bool operator!=(const PurgedQueues& lhs, const PurgedQueues& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const PurgedQueues& 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); } @@ -16394,10 +16722,10 @@ class PurgedQueues { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const PurgedQueues& 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 - // 'PurgedQueues'. + // 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 + // 'PurgedQueues'. { using bslh::hashAppend; hashAppend(hashAlg, object.queues()); @@ -16412,17 +16740,18 @@ BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::PurgedQueues) namespace mqbcmd { -// ========================== -// class QueueHandleSubStream -// ========================== + // ========================== + // class QueueHandleSubStream + // ========================== class QueueHandleSubStream { + // INSTANCE DATA - bsl::vector d_unconfirmedMonitors; - bsl::string d_parametersJson; - bdlb::NullableValue d_numUnconfirmedMessages; - bdlb::NullableValue d_appId; - unsigned int d_subId; + bsl::vector d_unconfirmedMonitors; + bsl::string d_parametersJson; + bdlb::NullableValue d_numUnconfirmedMessages; + bdlb::NullableValue d_appId; + unsigned int d_subId; // PRIVATE ACCESSORS template @@ -16433,21 +16762,23 @@ class QueueHandleSubStream { public: // TYPES enum { - ATTRIBUTE_ID_SUB_ID = 0, - ATTRIBUTE_ID_APP_ID = 1, - ATTRIBUTE_ID_PARAMETERS_JSON = 2, - ATTRIBUTE_ID_UNCONFIRMED_MONITORS = 3, - ATTRIBUTE_ID_NUM_UNCONFIRMED_MESSAGES = 4 + ATTRIBUTE_ID_SUB_ID = 0 + , ATTRIBUTE_ID_APP_ID = 1 + , ATTRIBUTE_ID_PARAMETERS_JSON = 2 + , ATTRIBUTE_ID_UNCONFIRMED_MONITORS = 3 + , ATTRIBUTE_ID_NUM_UNCONFIRMED_MESSAGES = 4 }; - enum { NUM_ATTRIBUTES = 5 }; + enum { + NUM_ATTRIBUTES = 5 + }; enum { - ATTRIBUTE_INDEX_SUB_ID = 0, - ATTRIBUTE_INDEX_APP_ID = 1, - ATTRIBUTE_INDEX_PARAMETERS_JSON = 2, - ATTRIBUTE_INDEX_UNCONFIRMED_MONITORS = 3, - ATTRIBUTE_INDEX_NUM_UNCONFIRMED_MESSAGES = 4 + ATTRIBUTE_INDEX_SUB_ID = 0 + , ATTRIBUTE_INDEX_APP_ID = 1 + , ATTRIBUTE_INDEX_PARAMETERS_JSON = 2 + , ATTRIBUTE_INDEX_UNCONFIRMED_MONITORS = 3 + , ATTRIBUTE_INDEX_NUM_UNCONFIRMED_MESSAGES = 4 }; // CONSTANTS @@ -16457,199 +16788,200 @@ class QueueHandleSubStream { 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 QueueHandleSubStream(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'QueueHandleSubStream' having the default - // value. Use the optionally specified 'basicAllocator' to supply - // memory. If 'basicAllocator' is 0, the currently installed default - // allocator is used. + explicit QueueHandleSubStream(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'QueueHandleSubStream' having the default + // value. Use the optionally specified 'basicAllocator' to supply + // memory. If 'basicAllocator' is 0, the currently installed default + // allocator is used. QueueHandleSubStream(const QueueHandleSubStream& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'QueueHandleSubStream' 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 'QueueHandleSubStream' 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) QueueHandleSubStream(QueueHandleSubStream&& original) noexcept; - // Create an object of type 'QueueHandleSubStream' 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 'QueueHandleSubStream' having the value of + // the specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. QueueHandleSubStream(QueueHandleSubStream&& original, - bslma::Allocator* basicAllocator); - // Create an object of type 'QueueHandleSubStream' 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 'QueueHandleSubStream' 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 ~QueueHandleSubStream(); - // Destroy this object. + // Destroy this object. // MANIPULATORS QueueHandleSubStream& operator=(const QueueHandleSubStream& 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) QueueHandleSubStream& operator=(QueueHandleSubStream&& 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. unsigned int& subId(); - // Return a reference to the modifiable "SubId" attribute of this - // object. + // Return a reference to the modifiable "SubId" attribute of this + // object. 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. bsl::string& parametersJson(); - // Return a reference to the modifiable "ParametersJson" attribute of - // this object. + // Return a reference to the modifiable "ParametersJson" attribute of + // this object. bsl::vector& unconfirmedMonitors(); - // Return a reference to the modifiable "UnconfirmedMonitors" attribute - // of this object. + // Return a reference to the modifiable "UnconfirmedMonitors" attribute + // of this object. bdlb::NullableValue& numUnconfirmedMessages(); - // Return a reference to the modifiable "NumUnconfirmedMessages" - // attribute of this object. + // Return a reference to the modifiable "NumUnconfirmedMessages" + // 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. unsigned int subId() const; - // Return the value of the "SubId" attribute of this object. + // Return the value of the "SubId" attribute of this object. 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. const bsl::string& parametersJson() const; - // Return a reference offering non-modifiable access to the - // "ParametersJson" attribute of this object. + // Return a reference offering non-modifiable access to the + // "ParametersJson" attribute of this object. const bsl::vector& unconfirmedMonitors() const; - // Return a reference offering non-modifiable access to the - // "UnconfirmedMonitors" attribute of this object. + // Return a reference offering non-modifiable access to the + // "UnconfirmedMonitors" attribute of this object. - const bdlb::NullableValue& - numUnconfirmedMessages() const; - // Return a reference offering non-modifiable access to the - // "NumUnconfirmedMessages" attribute of this object. + const bdlb::NullableValue& numUnconfirmedMessages() const; + // Return a reference offering non-modifiable access to the + // "NumUnconfirmedMessages" attribute of this object. // HIDDEN FRIENDS friend bool operator==(const QueueHandleSubStream& lhs, const QueueHandleSubStream& 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 QueueHandleSubStream& lhs, const QueueHandleSubStream& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const QueueHandleSubStream& 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); } @@ -16657,10 +16989,10 @@ class QueueHandleSubStream { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const QueueHandleSubStream& 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 - // 'QueueHandleSubStream'. + // 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 + // 'QueueHandleSubStream'. { object.hashAppendImpl(hashAlg); } @@ -16670,26 +17002,32 @@ class QueueHandleSubStream { // TRAITS -BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS( - mqbcmd::QueueHandleSubStream) +BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::QueueHandleSubStream) namespace mqbcmd { -// =================== -// class QueueStatuses -// =================== + // =================== + // class QueueStatuses + // =================== class QueueStatuses { + // INSTANCE DATA - bsl::vector d_queueStatuses; + bsl::vector d_queueStatuses; public: // TYPES - enum { ATTRIBUTE_ID_QUEUE_STATUSES = 0 }; + enum { + ATTRIBUTE_ID_QUEUE_STATUSES = 0 + }; - enum { NUM_ATTRIBUTES = 1 }; + enum { + NUM_ATTRIBUTES = 1 + }; - enum { ATTRIBUTE_INDEX_QUEUE_STATUSES = 0 }; + enum { + ATTRIBUTE_INDEX_QUEUE_STATUSES = 0 + }; // CONSTANTS static const char CLASS_NAME[]; @@ -16698,164 +17036,167 @@ class QueueStatuses { 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 QueueStatuses(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'QueueStatuses' having the default value. - // Use the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit QueueStatuses(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'QueueStatuses' having the default value. + // Use the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. QueueStatuses(const QueueStatuses& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'QueueStatuses' 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 'QueueStatuses' 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) QueueStatuses(QueueStatuses&& original) noexcept; - // Create an object of type 'QueueStatuses' 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 'QueueStatuses' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - QueueStatuses(QueueStatuses&& original, bslma::Allocator* basicAllocator); - // Create an object of type 'QueueStatuses' 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. + QueueStatuses(QueueStatuses&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'QueueStatuses' 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 ~QueueStatuses(); - // Destroy this object. + // Destroy this object. // MANIPULATORS QueueStatuses& operator=(const QueueStatuses& 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) QueueStatuses& operator=(QueueStatuses&& 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::vector& queueStatuses(); - // Return a reference to the modifiable "QueueStatuses" attribute of - // this object. + // Return a reference to the modifiable "QueueStatuses" 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::vector& queueStatuses() const; - // Return a reference offering non-modifiable access to the - // "QueueStatuses" attribute of this object. + // Return a reference offering non-modifiable access to the + // "QueueStatuses" attribute of this object. // HIDDEN FRIENDS friend bool operator==(const QueueStatuses& lhs, const QueueStatuses& 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.queueStatuses() == rhs.queueStatuses(); } friend bool operator!=(const QueueStatuses& lhs, const QueueStatuses& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const QueueStatuses& 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); } @@ -16863,10 +17204,10 @@ class QueueStatuses { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const QueueStatuses& 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 - // 'QueueStatuses'. + // 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 + // 'QueueStatuses'. { using bslh::hashAppend; hashAppend(hashAlg, object.queueStatuses()); @@ -16877,20 +17218,20 @@ class QueueStatuses { // TRAITS -BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS( - mqbcmd::QueueStatuses) +BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::QueueStatuses) namespace mqbcmd { -// ================ -// class SetTunable -// ================ + // ================ + // class SetTunable + // ================ class SetTunable { + // INSTANCE DATA - bsl::string d_name; - Value d_value; - SetTunableChoice d_choice; + bsl::string d_name; + Value d_value; + SetTunableChoice d_choice; // PRIVATE ACCESSORS template @@ -16899,17 +17240,19 @@ class SetTunable { public: // TYPES enum { - ATTRIBUTE_ID_NAME = 0, - ATTRIBUTE_ID_VALUE = 1, - ATTRIBUTE_ID_CHOICE = 2 + ATTRIBUTE_ID_NAME = 0 + , ATTRIBUTE_ID_VALUE = 1 + , ATTRIBUTE_ID_CHOICE = 2 }; - enum { NUM_ATTRIBUTES = 3 }; + enum { + NUM_ATTRIBUTES = 3 + }; enum { - ATTRIBUTE_INDEX_NAME = 0, - ATTRIBUTE_INDEX_VALUE = 1, - ATTRIBUTE_INDEX_CHOICE = 2 + ATTRIBUTE_INDEX_NAME = 0 + , ATTRIBUTE_INDEX_VALUE = 1 + , ATTRIBUTE_INDEX_CHOICE = 2 }; // CONSTANTS @@ -16919,190 +17262,194 @@ class SetTunable { 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 SetTunable(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'SetTunable' having the default value. Use - // the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit SetTunable(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'SetTunable' having the default value. Use + // the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. SetTunable(const SetTunable& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'SetTunable' 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 'SetTunable' 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) SetTunable(SetTunable&& original) noexcept; - // Create an object of type 'SetTunable' 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 'SetTunable' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - SetTunable(SetTunable&& original, bslma::Allocator* basicAllocator); - // Create an object of type 'SetTunable' 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. + SetTunable(SetTunable&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'SetTunable' 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 ~SetTunable(); - // Destroy this object. + // Destroy this object. // MANIPULATORS SetTunable& operator=(const SetTunable& 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) SetTunable& operator=(SetTunable&& 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. Value& value(); - // Return a reference to the modifiable "Value" attribute of this - // object. + // Return a reference to the modifiable "Value" attribute of this + // object. SetTunableChoice& choice(); - // Return a reference to the modifiable "Choice" attribute of this - // object. + // Return a reference to the modifiable "Choice" 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. const Value& value() const; - // Return a reference offering non-modifiable access to the "Value" - // attribute of this object. + // Return a reference offering non-modifiable access to the "Value" + // attribute of this object. const SetTunableChoice& choice() const; - // Return a reference offering non-modifiable access to the "Choice" - // attribute of this object. + // Return a reference offering non-modifiable access to the "Choice" + // attribute of this object. // HIDDEN FRIENDS friend bool operator==(const SetTunable& lhs, const SetTunable& 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.value() == rhs.value() && + return lhs.name() == rhs.name() && + lhs.value() == rhs.value() && lhs.choice() == rhs.choice(); } friend bool operator!=(const SetTunable& lhs, const SetTunable& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const SetTunable& 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 SetTunable& 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 'SetTunable'. + // 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 'SetTunable'. { object.hashAppendImpl(hashAlg); } @@ -17116,22 +17463,31 @@ BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::SetTunable) namespace mqbcmd { -// =================== -// class StorageDomain -// =================== + // =================== + // class StorageDomain + // =================== class StorageDomain { + // INSTANCE DATA - bsl::string d_name; - StorageDomainCommand d_command; + bsl::string d_name; + StorageDomainCommand d_command; public: // TYPES - enum { ATTRIBUTE_ID_NAME = 0, ATTRIBUTE_ID_COMMAND = 1 }; + enum { + ATTRIBUTE_ID_NAME = 0 + , ATTRIBUTE_ID_COMMAND = 1 + }; - enum { NUM_ATTRIBUTES = 2 }; + enum { + NUM_ATTRIBUTES = 2 + }; - enum { ATTRIBUTE_INDEX_NAME = 0, ATTRIBUTE_INDEX_COMMAND = 1 }; + enum { + ATTRIBUTE_INDEX_NAME = 0 + , ATTRIBUTE_INDEX_COMMAND = 1 + }; // CONSTANTS static const char CLASS_NAME[]; @@ -17140,172 +17496,176 @@ class StorageDomain { 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 StorageDomain(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'StorageDomain' having the default value. - // Use the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit StorageDomain(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'StorageDomain' having the default value. + // Use the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. StorageDomain(const StorageDomain& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'StorageDomain' 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 'StorageDomain' 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) StorageDomain(StorageDomain&& original) noexcept; - // Create an object of type 'StorageDomain' 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 'StorageDomain' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - StorageDomain(StorageDomain&& original, bslma::Allocator* basicAllocator); - // Create an object of type 'StorageDomain' 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. + StorageDomain(StorageDomain&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'StorageDomain' 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 ~StorageDomain(); - // Destroy this object. + // Destroy this object. // MANIPULATORS StorageDomain& operator=(const StorageDomain& 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) StorageDomain& operator=(StorageDomain&& 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. StorageDomainCommand& command(); - // Return a reference to the modifiable "Command" attribute of this - // object. + // Return a reference to the modifiable "Command" 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. const StorageDomainCommand& 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. // HIDDEN FRIENDS friend bool operator==(const StorageDomain& lhs, const StorageDomain& 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.command() == rhs.command(); + return lhs.name() == rhs.name() && + lhs.command() == rhs.command(); } friend bool operator!=(const StorageDomain& lhs, const StorageDomain& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const StorageDomain& 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); } @@ -17313,10 +17673,10 @@ class StorageDomain { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const StorageDomain& 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 - // 'StorageDomain'. + // 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 + // 'StorageDomain'. { using bslh::hashAppend; hashAppend(hashAlg, object.name()); @@ -17328,27 +17688,35 @@ class StorageDomain { // TRAITS -BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS( - mqbcmd::StorageDomain) +BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::StorageDomain) namespace mqbcmd { -// ====================== -// class StoragePartition -// ====================== + // ====================== + // class StoragePartition + // ====================== class StoragePartition { + // INSTANCE DATA - StoragePartitionCommand d_command; - int d_partitionId; + StoragePartitionCommand d_command; + int d_partitionId; public: // TYPES - enum { ATTRIBUTE_ID_PARTITION_ID = 0, ATTRIBUTE_ID_COMMAND = 1 }; + enum { + ATTRIBUTE_ID_PARTITION_ID = 0 + , ATTRIBUTE_ID_COMMAND = 1 + }; - enum { NUM_ATTRIBUTES = 2 }; + enum { + NUM_ATTRIBUTES = 2 + }; - enum { ATTRIBUTE_INDEX_PARTITION_ID = 0, ATTRIBUTE_INDEX_COMMAND = 1 }; + enum { + ATTRIBUTE_INDEX_PARTITION_ID = 0 + , ATTRIBUTE_INDEX_COMMAND = 1 + }; // CONSTANTS static const char CLASS_NAME[]; @@ -17357,119 +17725,122 @@ class StoragePartition { 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 StoragePartition(); - // Create an object of type 'StoragePartition' having the default - // value. + // Create an object of type 'StoragePartition' 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. int& partitionId(); - // Return a reference to the modifiable "PartitionId" attribute of this - // object. + // Return a reference to the modifiable "PartitionId" attribute of this + // object. StoragePartitionCommand& command(); - // Return a reference to the modifiable "Command" attribute of this - // object. + // Return a reference to the modifiable "Command" 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 partitionId() const; - // Return the value of the "PartitionId" attribute of this object. + // Return the value of the "PartitionId" attribute of this object. const StoragePartitionCommand& 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. // HIDDEN FRIENDS friend bool operator==(const StoragePartition& lhs, const StoragePartition& 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.partitionId() == rhs.partitionId() && lhs.command() == rhs.command(); @@ -17477,15 +17848,15 @@ class StoragePartition { friend bool operator!=(const StoragePartition& lhs, const StoragePartition& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const StoragePartition& 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); } @@ -17493,10 +17864,10 @@ class StoragePartition { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const StoragePartition& 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 - // 'StoragePartition'. + // 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 + // 'StoragePartition'. { using bslh::hashAppend; hashAppend(hashAlg, object.partitionId()); @@ -17512,15 +17883,16 @@ BDLAT_DECL_SEQUENCE_WITH_BITWISEMOVEABLE_TRAITS(mqbcmd::StoragePartition) namespace mqbcmd { -// ============= -// class Tunable -// ============= + // ============= + // class Tunable + // ============= class Tunable { + // INSTANCE DATA - bsl::string d_name; - bsl::string d_description; - Value d_value; + bsl::string d_name; + bsl::string d_description; + Value d_value; // PRIVATE ACCESSORS template @@ -17529,17 +17901,19 @@ class Tunable { public: // TYPES enum { - ATTRIBUTE_ID_NAME = 0, - ATTRIBUTE_ID_VALUE = 1, - ATTRIBUTE_ID_DESCRIPTION = 2 + ATTRIBUTE_ID_NAME = 0 + , ATTRIBUTE_ID_VALUE = 1 + , ATTRIBUTE_ID_DESCRIPTION = 2 }; - enum { NUM_ATTRIBUTES = 3 }; + enum { + NUM_ATTRIBUTES = 3 + }; enum { - ATTRIBUTE_INDEX_NAME = 0, - ATTRIBUTE_INDEX_VALUE = 1, - ATTRIBUTE_INDEX_DESCRIPTION = 2 + ATTRIBUTE_INDEX_NAME = 0 + , ATTRIBUTE_INDEX_VALUE = 1 + , ATTRIBUTE_INDEX_DESCRIPTION = 2 }; // CONSTANTS @@ -17549,188 +17923,193 @@ class Tunable { 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 Tunable(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'Tunable' having the default value. Use - // the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. - - Tunable(const Tunable& original, bslma::Allocator* basicAllocator = 0); - // Create an object of type 'Tunable' 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 Tunable(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'Tunable' having the default value. Use + // the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. + + Tunable(const Tunable& original, + bslma::Allocator *basicAllocator = 0); + // Create an object of type 'Tunable' 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) Tunable(Tunable&& original) noexcept; - // Create an object of type 'Tunable' 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 'Tunable' having the value of the specified + // 'original' object. After performing this action, the 'original' + // object will be left in a valid, but unspecified state. - Tunable(Tunable&& original, bslma::Allocator* basicAllocator); - // Create an object of type 'Tunable' 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. + Tunable(Tunable&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'Tunable' 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 ~Tunable(); - // Destroy this object. + // Destroy this object. // MANIPULATORS Tunable& operator=(const Tunable& 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) Tunable& operator=(Tunable&& 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. Value& value(); - // Return a reference to the modifiable "Value" attribute of this - // object. + // Return a reference to the modifiable "Value" 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& 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. const Value& value() const; - // Return a reference offering non-modifiable access to the "Value" - // attribute of this object. + // Return a reference offering non-modifiable access to the "Value" + // 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 Tunable& lhs, const Tunable& 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.value() == rhs.value() && + return lhs.name() == rhs.name() && + lhs.value() == rhs.value() && lhs.description() == rhs.description(); } friend bool operator!=(const Tunable& lhs, const Tunable& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const Tunable& 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 Tunable& 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 'Tunable'. + // 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 'Tunable'. { object.hashAppendImpl(hashAlg); } @@ -17744,15 +18123,16 @@ BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::Tunable) namespace mqbcmd { -// ========================= -// class TunableConfirmation -// ========================= + // ========================= + // class TunableConfirmation + // ========================= class TunableConfirmation { + // INSTANCE DATA - bsl::string d_name; - Value d_oldValue; - Value d_newValue; + bsl::string d_name; + Value d_oldValue; + Value d_newValue; // PRIVATE ACCESSORS template @@ -17761,17 +18141,19 @@ class TunableConfirmation { public: // TYPES enum { - ATTRIBUTE_ID_NAME = 0, - ATTRIBUTE_ID_OLD_VALUE = 1, - ATTRIBUTE_ID_NEW_VALUE = 2 + ATTRIBUTE_ID_NAME = 0 + , ATTRIBUTE_ID_OLD_VALUE = 1 + , ATTRIBUTE_ID_NEW_VALUE = 2 }; - enum { NUM_ATTRIBUTES = 3 }; + enum { + NUM_ATTRIBUTES = 3 + }; enum { - ATTRIBUTE_INDEX_NAME = 0, - ATTRIBUTE_INDEX_OLD_VALUE = 1, - ATTRIBUTE_INDEX_NEW_VALUE = 2 + ATTRIBUTE_INDEX_NAME = 0 + , ATTRIBUTE_INDEX_OLD_VALUE = 1 + , ATTRIBUTE_INDEX_NEW_VALUE = 2 }; // CONSTANTS @@ -17781,184 +18163,187 @@ class TunableConfirmation { 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 TunableConfirmation(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'TunableConfirmation' having the default - // value. Use the optionally specified 'basicAllocator' to supply - // memory. If 'basicAllocator' is 0, the currently installed default - // allocator is used. + explicit TunableConfirmation(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'TunableConfirmation' having the default + // value. Use the optionally specified 'basicAllocator' to supply + // memory. If 'basicAllocator' is 0, the currently installed default + // allocator is used. TunableConfirmation(const TunableConfirmation& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'TunableConfirmation' 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 'TunableConfirmation' 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) TunableConfirmation(TunableConfirmation&& original) noexcept; - // Create an object of type 'TunableConfirmation' 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 'TunableConfirmation' having the value of + // the specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. TunableConfirmation(TunableConfirmation&& original, - bslma::Allocator* basicAllocator); - // Create an object of type 'TunableConfirmation' 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 'TunableConfirmation' 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 ~TunableConfirmation(); - // Destroy this object. + // Destroy this object. // MANIPULATORS TunableConfirmation& operator=(const TunableConfirmation& 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) TunableConfirmation& operator=(TunableConfirmation&& 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. Value& oldValue(); - // Return a reference to the modifiable "OldValue" attribute of this - // object. + // Return a reference to the modifiable "OldValue" attribute of this + // object. Value& newValue(); - // Return a reference to the modifiable "NewValue" attribute of this - // object. + // Return a reference to the modifiable "NewValue" 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. const Value& oldValue() const; - // Return a reference offering non-modifiable access to the "OldValue" - // attribute of this object. + // Return a reference offering non-modifiable access to the "OldValue" + // attribute of this object. const Value& newValue() const; - // Return a reference offering non-modifiable access to the "NewValue" - // attribute of this object. + // Return a reference offering non-modifiable access to the "NewValue" + // attribute of this object. // HIDDEN FRIENDS friend bool operator==(const TunableConfirmation& lhs, const TunableConfirmation& 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.oldValue() == rhs.oldValue() && + return lhs.name() == rhs.name() && + lhs.oldValue() == rhs.oldValue() && lhs.newValue() == rhs.newValue(); } friend bool operator!=(const TunableConfirmation& lhs, const TunableConfirmation& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const TunableConfirmation& 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); } @@ -17966,10 +18351,10 @@ class TunableConfirmation { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const TunableConfirmation& 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 - // 'TunableConfirmation'. + // 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 + // 'TunableConfirmation'. { object.hashAppendImpl(hashAlg); } @@ -17979,26 +18364,32 @@ class TunableConfirmation { // TRAITS -BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS( - mqbcmd::TunableConfirmation) +BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::TunableConfirmation) namespace mqbcmd { -// ================================ -// class ClusterDomainQueueStatuses -// ================================ + // ================================ + // class ClusterDomainQueueStatuses + // ================================ class ClusterDomainQueueStatuses { + // INSTANCE DATA - bdlb::NullableValue d_statuses; + bdlb::NullableValue d_statuses; public: // TYPES - enum { ATTRIBUTE_ID_STATUSES = 0 }; + enum { + ATTRIBUTE_ID_STATUSES = 0 + }; - enum { NUM_ATTRIBUTES = 1 }; + enum { + NUM_ATTRIBUTES = 1 + }; - enum { ATTRIBUTE_INDEX_STATUSES = 0 }; + enum { + ATTRIBUTE_INDEX_STATUSES = 0 + }; // CONSTANTS static const char CLASS_NAME[]; @@ -18007,169 +18398,170 @@ class ClusterDomainQueueStatuses { 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 ClusterDomainQueueStatuses(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'ClusterDomainQueueStatuses' having the - // default value. Use the optionally specified 'basicAllocator' to - // supply memory. If 'basicAllocator' is 0, the currently installed - // default allocator is used. + explicit ClusterDomainQueueStatuses(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'ClusterDomainQueueStatuses' having the + // default value. Use the optionally specified 'basicAllocator' to + // supply memory. If 'basicAllocator' is 0, the currently installed + // default allocator is used. ClusterDomainQueueStatuses(const ClusterDomainQueueStatuses& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'ClusterDomainQueueStatuses' 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 'ClusterDomainQueueStatuses' 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) ClusterDomainQueueStatuses(ClusterDomainQueueStatuses&& original) noexcept; - // Create an object of type 'ClusterDomainQueueStatuses' 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 'ClusterDomainQueueStatuses' having the + // value of the specified 'original' object. After performing this + // action, the 'original' object will be left in a valid, but + // unspecified state. ClusterDomainQueueStatuses(ClusterDomainQueueStatuses&& original, - bslma::Allocator* basicAllocator); - // Create an object of type 'ClusterDomainQueueStatuses' 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 'ClusterDomainQueueStatuses' 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 ~ClusterDomainQueueStatuses(); - // Destroy this object. + // Destroy this object. // MANIPULATORS - ClusterDomainQueueStatuses& - operator=(const ClusterDomainQueueStatuses& rhs); - // Assign to this object the value of the specified 'rhs' object. + ClusterDomainQueueStatuses& operator=(const ClusterDomainQueueStatuses& rhs); + // 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) ClusterDomainQueueStatuses& operator=(ClusterDomainQueueStatuses&& 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& statuses(); - // Return a reference to the modifiable "Statuses" attribute of this - // object. + // Return a reference to the modifiable "Statuses" 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& statuses() const; - // Return a reference offering non-modifiable access to the "Statuses" - // attribute of this object. + // Return a reference offering non-modifiable access to the "Statuses" + // attribute of this object. // HIDDEN FRIENDS friend bool operator==(const ClusterDomainQueueStatuses& lhs, const ClusterDomainQueueStatuses& 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.statuses() == rhs.statuses(); } friend bool operator!=(const ClusterDomainQueueStatuses& lhs, const ClusterDomainQueueStatuses& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const ClusterDomainQueueStatuses& 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); } @@ -18177,10 +18569,10 @@ class ClusterDomainQueueStatuses { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const ClusterDomainQueueStatuses& 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 - // 'ClusterDomainQueueStatuses'. + // 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 + // 'ClusterDomainQueueStatuses'. { using bslh::hashAppend; hashAppend(hashAlg, object.statuses()); @@ -18191,22 +18583,22 @@ class ClusterDomainQueueStatuses { // TRAITS -BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS( - mqbcmd::ClusterDomainQueueStatuses) +BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::ClusterDomainQueueStatuses) namespace mqbcmd { -// ======================== -// class ClusterProxyStatus -// ======================== + // ======================== + // class ClusterProxyStatus + // ======================== class ClusterProxyStatus { + // INSTANCE DATA - bsl::string d_description; - bdlb::NullableValue d_activeNodeDescription; - StorageContent d_queuesInfo; - NodeStatuses d_nodeStatuses; - bool d_isHealthy; + bsl::string d_description; + bdlb::NullableValue d_activeNodeDescription; + StorageContent d_queuesInfo; + NodeStatuses d_nodeStatuses; + bool d_isHealthy; // PRIVATE ACCESSORS template @@ -18217,21 +18609,23 @@ class ClusterProxyStatus { public: // TYPES enum { - ATTRIBUTE_ID_DESCRIPTION = 0, - ATTRIBUTE_ID_ACTIVE_NODE_DESCRIPTION = 1, - ATTRIBUTE_ID_IS_HEALTHY = 2, - ATTRIBUTE_ID_NODE_STATUSES = 3, - ATTRIBUTE_ID_QUEUES_INFO = 4 + ATTRIBUTE_ID_DESCRIPTION = 0 + , ATTRIBUTE_ID_ACTIVE_NODE_DESCRIPTION = 1 + , ATTRIBUTE_ID_IS_HEALTHY = 2 + , ATTRIBUTE_ID_NODE_STATUSES = 3 + , ATTRIBUTE_ID_QUEUES_INFO = 4 }; - enum { NUM_ATTRIBUTES = 5 }; + enum { + NUM_ATTRIBUTES = 5 + }; enum { - ATTRIBUTE_INDEX_DESCRIPTION = 0, - ATTRIBUTE_INDEX_ACTIVE_NODE_DESCRIPTION = 1, - ATTRIBUTE_INDEX_IS_HEALTHY = 2, - ATTRIBUTE_INDEX_NODE_STATUSES = 3, - ATTRIBUTE_INDEX_QUEUES_INFO = 4 + ATTRIBUTE_INDEX_DESCRIPTION = 0 + , ATTRIBUTE_INDEX_ACTIVE_NODE_DESCRIPTION = 1 + , ATTRIBUTE_INDEX_IS_HEALTHY = 2 + , ATTRIBUTE_INDEX_NODE_STATUSES = 3 + , ATTRIBUTE_INDEX_QUEUES_INFO = 4 }; // CONSTANTS @@ -18241,198 +18635,200 @@ class ClusterProxyStatus { 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 ClusterProxyStatus(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'ClusterProxyStatus' having the default - // value. Use the optionally specified 'basicAllocator' to supply - // memory. If 'basicAllocator' is 0, the currently installed default - // allocator is used. + explicit ClusterProxyStatus(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'ClusterProxyStatus' having the default + // value. Use the optionally specified 'basicAllocator' to supply + // memory. If 'basicAllocator' is 0, the currently installed default + // allocator is used. ClusterProxyStatus(const ClusterProxyStatus& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'ClusterProxyStatus' 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 'ClusterProxyStatus' 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) ClusterProxyStatus(ClusterProxyStatus&& original) noexcept; - // Create an object of type 'ClusterProxyStatus' 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 'ClusterProxyStatus' having the value of + // the specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. ClusterProxyStatus(ClusterProxyStatus&& original, - bslma::Allocator* basicAllocator); - // Create an object of type 'ClusterProxyStatus' 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 'ClusterProxyStatus' 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 ~ClusterProxyStatus(); - // Destroy this object. + // Destroy this object. // MANIPULATORS ClusterProxyStatus& operator=(const ClusterProxyStatus& 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) ClusterProxyStatus& operator=(ClusterProxyStatus&& 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& description(); - // Return a reference to the modifiable "Description" attribute of this - // object. + // Return a reference to the modifiable "Description" attribute of this + // object. bdlb::NullableValue& activeNodeDescription(); - // Return a reference to the modifiable "ActiveNodeDescription" - // attribute of this object. + // Return a reference to the modifiable "ActiveNodeDescription" + // attribute of this object. bool& isHealthy(); - // Return a reference to the modifiable "IsHealthy" attribute of this - // object. + // Return a reference to the modifiable "IsHealthy" attribute of this + // object. NodeStatuses& nodeStatuses(); - // Return a reference to the modifiable "NodeStatuses" attribute of - // this object. + // Return a reference to the modifiable "NodeStatuses" attribute of + // this object. StorageContent& queuesInfo(); - // Return a reference to the modifiable "QueuesInfo" attribute of this - // object. + // Return a reference to the modifiable "QueuesInfo" 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& 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. const bdlb::NullableValue& activeNodeDescription() const; - // Return a reference offering non-modifiable access to the - // "ActiveNodeDescription" attribute of this object. + // Return a reference offering non-modifiable access to the + // "ActiveNodeDescription" attribute of this object. bool isHealthy() const; - // Return the value of the "IsHealthy" attribute of this object. + // Return the value of the "IsHealthy" attribute of this object. const NodeStatuses& nodeStatuses() const; - // Return a reference offering non-modifiable access to the - // "NodeStatuses" attribute of this object. + // Return a reference offering non-modifiable access to the + // "NodeStatuses" attribute of this object. const StorageContent& queuesInfo() const; - // Return a reference offering non-modifiable access to the - // "QueuesInfo" attribute of this object. + // Return a reference offering non-modifiable access to the + // "QueuesInfo" attribute of this object. // HIDDEN FRIENDS friend bool operator==(const ClusterProxyStatus& lhs, const ClusterProxyStatus& 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 ClusterProxyStatus& lhs, const ClusterProxyStatus& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const ClusterProxyStatus& 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); } @@ -18440,10 +18836,10 @@ class ClusterProxyStatus { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const ClusterProxyStatus& 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 - // 'ClusterProxyStatus'. + // 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 + // 'ClusterProxyStatus'. { object.hashAppendImpl(hashAlg); } @@ -18453,25 +18849,26 @@ class ClusterProxyStatus { // TRAITS -BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS( - mqbcmd::ClusterProxyStatus) +BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::ClusterProxyStatus) namespace mqbcmd { -// =================== -// class DomainCommand -// =================== + // =================== + // class DomainCommand + // =================== class DomainCommand { + // INSTANCE DATA union { - bsls::ObjectBuffer d_purge; - bsls::ObjectBuffer d_info; - bsls::ObjectBuffer d_queue; + bsls::ObjectBuffer< Void > d_purge; + bsls::ObjectBuffer< Void > d_remove; + bsls::ObjectBuffer< Void > d_info; + bsls::ObjectBuffer< DomainQueue > d_queue; }; - int d_selectionId; - bslma::Allocator* d_allocator_p; + int d_selectionId; + bslma::Allocator *d_allocator_p; // PRIVATE ACCESSORS template @@ -18483,18 +18880,22 @@ class DomainCommand { // TYPES enum { - SELECTION_ID_UNDEFINED = -1, - SELECTION_ID_PURGE = 0, - SELECTION_ID_INFO = 1, - SELECTION_ID_QUEUE = 2 + SELECTION_ID_UNDEFINED = -1 + , SELECTION_ID_PURGE = 0 + , SELECTION_ID_REMOVE = 1 + , SELECTION_ID_INFO = 2 + , SELECTION_ID_QUEUE = 3 }; - enum { NUM_SELECTIONS = 3 }; + enum { + NUM_SELECTIONS = 4 + }; enum { - SELECTION_INDEX_PURGE = 0, - SELECTION_INDEX_INFO = 1, - SELECTION_INDEX_QUEUE = 2 + SELECTION_INDEX_PURGE = 0 + , SELECTION_INDEX_REMOVE = 1 + , SELECTION_INDEX_INFO = 2 + , SELECTION_INDEX_QUEUE = 3 }; // CONSTANTS @@ -18503,211 +18904,238 @@ class DomainCommand { 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 DomainCommand(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'DomainCommand' having the default value. - // Use the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit DomainCommand(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'DomainCommand' having the default value. + // Use the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. DomainCommand(const DomainCommand& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'DomainCommand' 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 'DomainCommand' 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) DomainCommand(DomainCommand&& original) noexcept; - // Create an object of type 'DomainCommand' 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 'DomainCommand' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - DomainCommand(DomainCommand&& original, bslma::Allocator* basicAllocator); - // Create an object of type 'DomainCommand' 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. + DomainCommand(DomainCommand&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'DomainCommand' 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 ~DomainCommand(); - // Destroy this object. + // Destroy this object. // MANIPULATORS DomainCommand& operator=(const DomainCommand& 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) DomainCommand& operator=(DomainCommand&& 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). Void& makePurge(); Void& makePurge(const Void& 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) Void& makePurge(Void&& value); #endif - // Set the value of this object to be a "Purge" value. Optionally - // specify the 'value' of the "Purge". If 'value' is not specified, - // the default "Purge" value is used. + // Set the value of this object to be a "Purge" value. Optionally + // specify the 'value' of the "Purge". If 'value' is not specified, + // the default "Purge" value is used. + + Void& makeRemove(); + Void& makeRemove(const Void& value); +#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \ + && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) + Void& makeRemove(Void&& value); +#endif + // Set the value of this object to be a "Remove" value. Optionally + // specify the 'value' of the "Remove". If 'value' is not specified, + // the default "Remove" value is used. Void& makeInfo(); Void& makeInfo(const Void& 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) Void& makeInfo(Void&& value); #endif - // Set the value of this object to be a "Info" value. Optionally - // specify the 'value' of the "Info". If 'value' is not specified, the - // default "Info" value is used. + // Set the value of this object to be a "Info" value. Optionally + // specify the 'value' of the "Info". If 'value' is not specified, the + // default "Info" value is used. DomainQueue& makeQueue(); DomainQueue& makeQueue(const DomainQueue& 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) DomainQueue& makeQueue(DomainQueue&& value); #endif - // Set the value of this object to be a "Queue" value. Optionally - // specify the 'value' of the "Queue". If 'value' is not specified, - // the default "Queue" value is used. + // Set the value of this object to be a "Queue" value. Optionally + // specify the 'value' of the "Queue". If 'value' is not specified, + // the default "Queue" 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. Void& purge(); - // Return a reference to the modifiable "Purge" selection of this - // object if "Purge" is the current selection. The behavior is - // undefined unless "Purge" is the selection of this object. + // Return a reference to the modifiable "Purge" selection of this + // object if "Purge" is the current selection. The behavior is + // undefined unless "Purge" is the selection of this object. + + Void& remove(); + // Return a reference to the modifiable "Remove" selection of this + // object if "Remove" is the current selection. The behavior is + // undefined unless "Remove" is the selection of this object. Void& info(); - // Return a reference to the modifiable "Info" selection of this object - // if "Info" is the current selection. The behavior is undefined - // unless "Info" is the selection of this object. + // Return a reference to the modifiable "Info" selection of this object + // if "Info" is the current selection. The behavior is undefined + // unless "Info" is the selection of this object. DomainQueue& queue(); - // Return a reference to the modifiable "Queue" selection of this - // object if "Queue" is the current selection. The behavior is - // undefined unless "Queue" is the selection of this object. + // Return a reference to the modifiable "Queue" selection of this + // object if "Queue" is the current selection. The behavior is + // undefined unless "Queue" 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 Void& purge() const; - // Return a reference to the non-modifiable "Purge" selection of this - // object if "Purge" is the current selection. The behavior is - // undefined unless "Purge" is the selection of this object. + // Return a reference to the non-modifiable "Purge" selection of this + // object if "Purge" is the current selection. The behavior is + // undefined unless "Purge" is the selection of this object. + + const Void& remove() const; + // Return a reference to the non-modifiable "Remove" selection of this + // object if "Remove" is the current selection. The behavior is + // undefined unless "Remove" is the selection of this object. const Void& info() const; - // Return a reference to the non-modifiable "Info" selection of this - // object if "Info" is the current selection. The behavior is - // undefined unless "Info" is the selection of this object. + // Return a reference to the non-modifiable "Info" selection of this + // object if "Info" is the current selection. The behavior is + // undefined unless "Info" is the selection of this object. const DomainQueue& queue() const; - // Return a reference to the non-modifiable "Queue" selection of this - // object if "Queue" is the current selection. The behavior is - // undefined unless "Queue" is the selection of this object. + // Return a reference to the non-modifiable "Queue" selection of this + // object if "Queue" is the current selection. The behavior is + // undefined unless "Queue" is the selection of this object. bool isPurgeValue() const; - // Return 'true' if the value of this object is a "Purge" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Purge" value, and + // return 'false' otherwise. + + bool isRemoveValue() const; + // Return 'true' if the value of this object is a "Remove" value, and + // return 'false' otherwise. bool isInfoValue() const; - // Return 'true' if the value of this object is a "Info" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Info" value, and + // return 'false' otherwise. bool isQueueValue() const; - // Return 'true' if the value of this object is a "Queue" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Queue" 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 DomainCommand& lhs, const DomainCommand& rhs) - // Return 'true' if the specified 'lhs' and 'rhs' objects have the same - // value, and 'false' otherwise. Two 'DomainCommand' 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 'DomainCommand' 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 DomainCommand& lhs, const DomainCommand& 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 DomainCommand& 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); } @@ -18715,10 +19143,10 @@ class DomainCommand { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const DomainCommand& 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 - // 'DomainCommand'. + // 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 + // 'DomainCommand'. { return object.hashAppendImpl(hashAlg); } @@ -18732,20 +19160,21 @@ BDLAT_DECL_CHOICE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::DomainCommand) namespace mqbcmd { -// ==================== -// class ElectorCommand -// ==================== + // ==================== + // class ElectorCommand + // ==================== class ElectorCommand { + // INSTANCE DATA union { - bsls::ObjectBuffer d_setTunable; - bsls::ObjectBuffer d_getTunable; - bsls::ObjectBuffer d_listTunables; + bsls::ObjectBuffer< SetTunable > d_setTunable; + bsls::ObjectBuffer< GetTunable > d_getTunable; + bsls::ObjectBuffer< Void > d_listTunables; }; - int d_selectionId; - bslma::Allocator* d_allocator_p; + int d_selectionId; + bslma::Allocator *d_allocator_p; // PRIVATE ACCESSORS template @@ -18757,18 +19186,20 @@ class ElectorCommand { // TYPES enum { - SELECTION_ID_UNDEFINED = -1, - SELECTION_ID_SET_TUNABLE = 0, - SELECTION_ID_GET_TUNABLE = 1, - SELECTION_ID_LIST_TUNABLES = 2 + SELECTION_ID_UNDEFINED = -1 + , SELECTION_ID_SET_TUNABLE = 0 + , SELECTION_ID_GET_TUNABLE = 1 + , SELECTION_ID_LIST_TUNABLES = 2 }; - enum { NUM_SELECTIONS = 3 }; + enum { + NUM_SELECTIONS = 3 + }; enum { - SELECTION_INDEX_SET_TUNABLE = 0, - SELECTION_INDEX_GET_TUNABLE = 1, - SELECTION_INDEX_LIST_TUNABLES = 2 + SELECTION_INDEX_SET_TUNABLE = 0 + , SELECTION_INDEX_GET_TUNABLE = 1 + , SELECTION_INDEX_LIST_TUNABLES = 2 }; // CONSTANTS @@ -18777,216 +19208,218 @@ class ElectorCommand { 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 ElectorCommand(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'ElectorCommand' having the default value. - // Use the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit ElectorCommand(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'ElectorCommand' having the default value. + // Use the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. ElectorCommand(const ElectorCommand& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'ElectorCommand' 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 'ElectorCommand' 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) ElectorCommand(ElectorCommand&& original) noexcept; - // Create an object of type 'ElectorCommand' 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 'ElectorCommand' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - ElectorCommand(ElectorCommand&& original, - bslma::Allocator* basicAllocator); - // Create an object of type 'ElectorCommand' 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. + ElectorCommand(ElectorCommand&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'ElectorCommand' 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 ~ElectorCommand(); - // Destroy this object. + // Destroy this object. // MANIPULATORS ElectorCommand& operator=(const ElectorCommand& 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) ElectorCommand& operator=(ElectorCommand&& 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). SetTunable& makeSetTunable(); SetTunable& makeSetTunable(const SetTunable& 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) SetTunable& makeSetTunable(SetTunable&& value); #endif - // Set the value of this object to be a "SetTunable" value. Optionally - // specify the 'value' of the "SetTunable". If 'value' is not - // specified, the default "SetTunable" value is used. + // Set the value of this object to be a "SetTunable" value. Optionally + // specify the 'value' of the "SetTunable". If 'value' is not + // specified, the default "SetTunable" value is used. GetTunable& makeGetTunable(); GetTunable& makeGetTunable(const GetTunable& 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) GetTunable& makeGetTunable(GetTunable&& value); #endif - // Set the value of this object to be a "GetTunable" value. Optionally - // specify the 'value' of the "GetTunable". If 'value' is not - // specified, the default "GetTunable" value is used. + // Set the value of this object to be a "GetTunable" value. Optionally + // specify the 'value' of the "GetTunable". If 'value' is not + // specified, the default "GetTunable" value is used. Void& makeListTunables(); Void& makeListTunables(const Void& 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) Void& makeListTunables(Void&& value); #endif - // Set the value of this object to be a "ListTunables" value. - // Optionally specify the 'value' of the "ListTunables". If 'value' is - // not specified, the default "ListTunables" value is used. + // Set the value of this object to be a "ListTunables" value. + // Optionally specify the 'value' of the "ListTunables". If 'value' is + // not specified, the default "ListTunables" 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. SetTunable& setTunable(); - // Return a reference to the modifiable "SetTunable" selection of this - // object if "SetTunable" is the current selection. The behavior is - // undefined unless "SetTunable" is the selection of this object. + // Return a reference to the modifiable "SetTunable" selection of this + // object if "SetTunable" is the current selection. The behavior is + // undefined unless "SetTunable" is the selection of this object. GetTunable& getTunable(); - // Return a reference to the modifiable "GetTunable" selection of this - // object if "GetTunable" is the current selection. The behavior is - // undefined unless "GetTunable" is the selection of this object. + // Return a reference to the modifiable "GetTunable" selection of this + // object if "GetTunable" is the current selection. The behavior is + // undefined unless "GetTunable" is the selection of this object. Void& listTunables(); - // Return a reference to the modifiable "ListTunables" selection of - // this object if "ListTunables" is the current selection. The - // behavior is undefined unless "ListTunables" is the selection of this - // object. + // Return a reference to the modifiable "ListTunables" selection of + // this object if "ListTunables" is the current selection. The + // behavior is undefined unless "ListTunables" 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 SetTunable& setTunable() const; - // Return a reference to the non-modifiable "SetTunable" selection of - // this object if "SetTunable" is the current selection. The behavior - // is undefined unless "SetTunable" is the selection of this object. + // Return a reference to the non-modifiable "SetTunable" selection of + // this object if "SetTunable" is the current selection. The behavior + // is undefined unless "SetTunable" is the selection of this object. const GetTunable& getTunable() const; - // Return a reference to the non-modifiable "GetTunable" selection of - // this object if "GetTunable" is the current selection. The behavior - // is undefined unless "GetTunable" is the selection of this object. + // Return a reference to the non-modifiable "GetTunable" selection of + // this object if "GetTunable" is the current selection. The behavior + // is undefined unless "GetTunable" is the selection of this object. const Void& listTunables() const; - // Return a reference to the non-modifiable "ListTunables" selection of - // this object if "ListTunables" is the current selection. The - // behavior is undefined unless "ListTunables" is the selection of this - // object. + // Return a reference to the non-modifiable "ListTunables" selection of + // this object if "ListTunables" is the current selection. The + // behavior is undefined unless "ListTunables" is the selection of this + // object. bool isSetTunableValue() const; - // Return 'true' if the value of this object is a "SetTunable" value, - // and return 'false' otherwise. + // Return 'true' if the value of this object is a "SetTunable" value, + // and return 'false' otherwise. bool isGetTunableValue() const; - // Return 'true' if the value of this object is a "GetTunable" value, - // and return 'false' otherwise. + // Return 'true' if the value of this object is a "GetTunable" value, + // and return 'false' otherwise. bool isListTunablesValue() const; - // Return 'true' if the value of this object is a "ListTunables" value, - // and return 'false' otherwise. + // Return 'true' if the value of this object is a "ListTunables" 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 ElectorCommand& lhs, const ElectorCommand& rhs) - // Return 'true' if the specified 'lhs' and 'rhs' objects have the same - // value, and 'false' otherwise. Two 'ElectorCommand' 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 'ElectorCommand' 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 ElectorCommand& lhs, const ElectorCommand& 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 ElectorCommand& 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); } @@ -18994,10 +19427,10 @@ class ElectorCommand { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const ElectorCommand& 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 - // 'ElectorCommand'. + // 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 + // 'ElectorCommand'. { return object.hashAppendImpl(hashAlg); } @@ -19011,15 +19444,16 @@ BDLAT_DECL_CHOICE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::ElectorCommand) namespace mqbcmd { -// =============== -// class FileStore -// =============== + // =============== + // class FileStore + // =============== class FileStore { + // INSTANCE DATA - FileStoreSummary d_summary; - int d_partitionId; - FileStoreState::Value d_state; + FileStoreSummary d_summary; + int d_partitionId; + FileStoreState::Value d_state; // PRIVATE ACCESSORS template @@ -19028,17 +19462,19 @@ class FileStore { public: // TYPES enum { - ATTRIBUTE_ID_PARTITION_ID = 0, - ATTRIBUTE_ID_STATE = 1, - ATTRIBUTE_ID_SUMMARY = 2 + ATTRIBUTE_ID_PARTITION_ID = 0 + , ATTRIBUTE_ID_STATE = 1 + , ATTRIBUTE_ID_SUMMARY = 2 }; - enum { NUM_ATTRIBUTES = 3 }; + enum { + NUM_ATTRIBUTES = 3 + }; enum { - ATTRIBUTE_INDEX_PARTITION_ID = 0, - ATTRIBUTE_INDEX_STATE = 1, - ATTRIBUTE_INDEX_SUMMARY = 2 + ATTRIBUTE_INDEX_PARTITION_ID = 0 + , ATTRIBUTE_INDEX_STATE = 1 + , ATTRIBUTE_INDEX_SUMMARY = 2 }; // CONSTANTS @@ -19048,186 +19484,191 @@ class FileStore { 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 FileStore(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'FileStore' having the default value. Use - // the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. - - FileStore(const FileStore& original, bslma::Allocator* basicAllocator = 0); - // Create an object of type 'FileStore' 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 FileStore(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'FileStore' having the default value. Use + // the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. + + FileStore(const FileStore& original, + bslma::Allocator *basicAllocator = 0); + // Create an object of type 'FileStore' 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) FileStore(FileStore&& original) noexcept; - // Create an object of type 'FileStore' 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 'FileStore' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - FileStore(FileStore&& original, bslma::Allocator* basicAllocator); - // Create an object of type 'FileStore' 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. + FileStore(FileStore&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'FileStore' 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 ~FileStore(); - // Destroy this object. + // Destroy this object. // MANIPULATORS FileStore& operator=(const FileStore& 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) FileStore& operator=(FileStore&& 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& partitionId(); - // Return a reference to the modifiable "PartitionId" attribute of this - // object. + // Return a reference to the modifiable "PartitionId" attribute of this + // object. FileStoreState::Value& state(); - // Return a reference to the modifiable "State" attribute of this - // object. + // Return a reference to the modifiable "State" attribute of this + // object. FileStoreSummary& summary(); - // Return a reference to the modifiable "Summary" attribute of this - // object. + // Return a reference to the modifiable "Summary" 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 partitionId() const; - // Return the value of the "PartitionId" attribute of this object. + // Return the value of the "PartitionId" attribute of this object. FileStoreState::Value state() const; - // Return the value of the "State" attribute of this object. + // Return the value of the "State" attribute of this object. const FileStoreSummary& summary() const; - // Return a reference offering non-modifiable access to the "Summary" - // attribute of this object. + // Return a reference offering non-modifiable access to the "Summary" + // attribute of this object. // HIDDEN FRIENDS friend bool operator==(const FileStore& lhs, const FileStore& 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.partitionId() == rhs.partitionId() && - lhs.state() == rhs.state() && lhs.summary() == rhs.summary(); + lhs.state() == rhs.state() && + lhs.summary() == rhs.summary(); } friend bool operator!=(const FileStore& lhs, const FileStore& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const FileStore& 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 FileStore& 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 'FileStore'. + // 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 'FileStore'. { object.hashAppendImpl(hashAlg); } @@ -19241,16 +19682,17 @@ BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::FileStore) namespace mqbcmd { -// ================= -// class QueueHandle -// ================= + // ================= + // class QueueHandle + // ================= class QueueHandle { + // INSTANCE DATA - bsl::vector d_subStreams; - bsl::string d_clientDescription; - bsl::string d_parametersJson; - bool d_isClientClusterMember; + bsl::vector d_subStreams; + bsl::string d_clientDescription; + bsl::string d_parametersJson; + bool d_isClientClusterMember; // PRIVATE ACCESSORS template @@ -19261,19 +19703,21 @@ class QueueHandle { public: // TYPES enum { - ATTRIBUTE_ID_CLIENT_DESCRIPTION = 0, - ATTRIBUTE_ID_PARAMETERS_JSON = 1, - ATTRIBUTE_ID_IS_CLIENT_CLUSTER_MEMBER = 2, - ATTRIBUTE_ID_SUB_STREAMS = 3 + ATTRIBUTE_ID_CLIENT_DESCRIPTION = 0 + , ATTRIBUTE_ID_PARAMETERS_JSON = 1 + , ATTRIBUTE_ID_IS_CLIENT_CLUSTER_MEMBER = 2 + , ATTRIBUTE_ID_SUB_STREAMS = 3 }; - enum { NUM_ATTRIBUTES = 4 }; + enum { + NUM_ATTRIBUTES = 4 + }; enum { - ATTRIBUTE_INDEX_CLIENT_DESCRIPTION = 0, - ATTRIBUTE_INDEX_PARAMETERS_JSON = 1, - ATTRIBUTE_INDEX_IS_CLIENT_CLUSTER_MEMBER = 2, - ATTRIBUTE_INDEX_SUB_STREAMS = 3 + ATTRIBUTE_INDEX_CLIENT_DESCRIPTION = 0 + , ATTRIBUTE_INDEX_PARAMETERS_JSON = 1 + , ATTRIBUTE_INDEX_IS_CLIENT_CLUSTER_MEMBER = 2 + , ATTRIBUTE_INDEX_SUB_STREAMS = 3 }; // CONSTANTS @@ -19283,188 +19727,191 @@ class QueueHandle { 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 QueueHandle(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'QueueHandle' having the default value. - // Use the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit QueueHandle(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'QueueHandle' having the default value. + // Use the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. QueueHandle(const QueueHandle& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'QueueHandle' 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 'QueueHandle' 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) QueueHandle(QueueHandle&& original) noexcept; - // Create an object of type 'QueueHandle' 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 'QueueHandle' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - QueueHandle(QueueHandle&& original, bslma::Allocator* basicAllocator); - // Create an object of type 'QueueHandle' 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. + QueueHandle(QueueHandle&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'QueueHandle' 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 ~QueueHandle(); - // Destroy this object. + // Destroy this object. // MANIPULATORS QueueHandle& operator=(const QueueHandle& 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) QueueHandle& operator=(QueueHandle&& 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& parametersJson(); - // Return a reference to the modifiable "ParametersJson" attribute of - // this object. + // Return a reference to the modifiable "ParametersJson" attribute of + // this object. bool& isClientClusterMember(); - // Return a reference to the modifiable "IsClientClusterMember" - // attribute of this object. + // Return a reference to the modifiable "IsClientClusterMember" + // attribute of this object. bsl::vector& subStreams(); - // Return a reference to the modifiable "SubStreams" attribute of this - // object. + // Return a reference to the modifiable "SubStreams" 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& parametersJson() const; - // Return a reference offering non-modifiable access to the - // "ParametersJson" attribute of this object. + // Return a reference offering non-modifiable access to the + // "ParametersJson" attribute of this object. bool isClientClusterMember() const; - // Return the value of the "IsClientClusterMember" attribute of this - // object. + // Return the value of the "IsClientClusterMember" attribute of this + // object. const bsl::vector& subStreams() const; - // Return a reference offering non-modifiable access to the - // "SubStreams" attribute of this object. + // Return a reference offering non-modifiable access to the + // "SubStreams" attribute of this object. // HIDDEN FRIENDS friend bool operator==(const QueueHandle& lhs, const QueueHandle& 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 QueueHandle& lhs, const QueueHandle& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const QueueHandle& 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); } @@ -19472,9 +19919,9 @@ class QueueHandle { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const QueueHandle& 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 'QueueHandle'. + // 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 'QueueHandle'. { object.hashAppendImpl(hashAlg); } @@ -19488,20 +19935,21 @@ BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::QueueHandle) namespace mqbcmd { -// ======================== -// class ReplicationCommand -// ======================== + // ======================== + // class ReplicationCommand + // ======================== class ReplicationCommand { + // INSTANCE DATA union { - bsls::ObjectBuffer d_setTunable; - bsls::ObjectBuffer d_getTunable; - bsls::ObjectBuffer d_listTunables; + bsls::ObjectBuffer< SetTunable > d_setTunable; + bsls::ObjectBuffer< GetTunable > d_getTunable; + bsls::ObjectBuffer< Void > d_listTunables; }; - int d_selectionId; - bslma::Allocator* d_allocator_p; + int d_selectionId; + bslma::Allocator *d_allocator_p; // PRIVATE ACCESSORS template @@ -19513,18 +19961,20 @@ class ReplicationCommand { // TYPES enum { - SELECTION_ID_UNDEFINED = -1, - SELECTION_ID_SET_TUNABLE = 0, - SELECTION_ID_GET_TUNABLE = 1, - SELECTION_ID_LIST_TUNABLES = 2 + SELECTION_ID_UNDEFINED = -1 + , SELECTION_ID_SET_TUNABLE = 0 + , SELECTION_ID_GET_TUNABLE = 1 + , SELECTION_ID_LIST_TUNABLES = 2 }; - enum { NUM_SELECTIONS = 3 }; + enum { + NUM_SELECTIONS = 3 + }; enum { - SELECTION_INDEX_SET_TUNABLE = 0, - SELECTION_INDEX_GET_TUNABLE = 1, - SELECTION_INDEX_LIST_TUNABLES = 2 + SELECTION_INDEX_SET_TUNABLE = 0 + , SELECTION_INDEX_GET_TUNABLE = 1 + , SELECTION_INDEX_LIST_TUNABLES = 2 }; // CONSTANTS @@ -19533,216 +19983,218 @@ class ReplicationCommand { 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 ReplicationCommand(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'ReplicationCommand' having the default - // value. Use the optionally specified 'basicAllocator' to supply - // memory. If 'basicAllocator' is 0, the currently installed default - // allocator is used. + explicit ReplicationCommand(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'ReplicationCommand' having the default + // value. Use the optionally specified 'basicAllocator' to supply + // memory. If 'basicAllocator' is 0, the currently installed default + // allocator is used. ReplicationCommand(const ReplicationCommand& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'ReplicationCommand' 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 'ReplicationCommand' 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) ReplicationCommand(ReplicationCommand&& original) noexcept; - // Create an object of type 'ReplicationCommand' 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 'ReplicationCommand' having the value of + // the specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. ReplicationCommand(ReplicationCommand&& original, - bslma::Allocator* basicAllocator); - // Create an object of type 'ReplicationCommand' 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 'ReplicationCommand' 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 ~ReplicationCommand(); - // Destroy this object. + // Destroy this object. // MANIPULATORS ReplicationCommand& operator=(const ReplicationCommand& 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) ReplicationCommand& operator=(ReplicationCommand&& 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). SetTunable& makeSetTunable(); SetTunable& makeSetTunable(const SetTunable& 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) SetTunable& makeSetTunable(SetTunable&& value); #endif - // Set the value of this object to be a "SetTunable" value. Optionally - // specify the 'value' of the "SetTunable". If 'value' is not - // specified, the default "SetTunable" value is used. + // Set the value of this object to be a "SetTunable" value. Optionally + // specify the 'value' of the "SetTunable". If 'value' is not + // specified, the default "SetTunable" value is used. GetTunable& makeGetTunable(); GetTunable& makeGetTunable(const GetTunable& 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) GetTunable& makeGetTunable(GetTunable&& value); #endif - // Set the value of this object to be a "GetTunable" value. Optionally - // specify the 'value' of the "GetTunable". If 'value' is not - // specified, the default "GetTunable" value is used. + // Set the value of this object to be a "GetTunable" value. Optionally + // specify the 'value' of the "GetTunable". If 'value' is not + // specified, the default "GetTunable" value is used. Void& makeListTunables(); Void& makeListTunables(const Void& 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) Void& makeListTunables(Void&& value); #endif - // Set the value of this object to be a "ListTunables" value. - // Optionally specify the 'value' of the "ListTunables". If 'value' is - // not specified, the default "ListTunables" value is used. + // Set the value of this object to be a "ListTunables" value. + // Optionally specify the 'value' of the "ListTunables". If 'value' is + // not specified, the default "ListTunables" 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. SetTunable& setTunable(); - // Return a reference to the modifiable "SetTunable" selection of this - // object if "SetTunable" is the current selection. The behavior is - // undefined unless "SetTunable" is the selection of this object. + // Return a reference to the modifiable "SetTunable" selection of this + // object if "SetTunable" is the current selection. The behavior is + // undefined unless "SetTunable" is the selection of this object. GetTunable& getTunable(); - // Return a reference to the modifiable "GetTunable" selection of this - // object if "GetTunable" is the current selection. The behavior is - // undefined unless "GetTunable" is the selection of this object. + // Return a reference to the modifiable "GetTunable" selection of this + // object if "GetTunable" is the current selection. The behavior is + // undefined unless "GetTunable" is the selection of this object. Void& listTunables(); - // Return a reference to the modifiable "ListTunables" selection of - // this object if "ListTunables" is the current selection. The - // behavior is undefined unless "ListTunables" is the selection of this - // object. + // Return a reference to the modifiable "ListTunables" selection of + // this object if "ListTunables" is the current selection. The + // behavior is undefined unless "ListTunables" 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 SetTunable& setTunable() const; - // Return a reference to the non-modifiable "SetTunable" selection of - // this object if "SetTunable" is the current selection. The behavior - // is undefined unless "SetTunable" is the selection of this object. + // Return a reference to the non-modifiable "SetTunable" selection of + // this object if "SetTunable" is the current selection. The behavior + // is undefined unless "SetTunable" is the selection of this object. const GetTunable& getTunable() const; - // Return a reference to the non-modifiable "GetTunable" selection of - // this object if "GetTunable" is the current selection. The behavior - // is undefined unless "GetTunable" is the selection of this object. + // Return a reference to the non-modifiable "GetTunable" selection of + // this object if "GetTunable" is the current selection. The behavior + // is undefined unless "GetTunable" is the selection of this object. const Void& listTunables() const; - // Return a reference to the non-modifiable "ListTunables" selection of - // this object if "ListTunables" is the current selection. The - // behavior is undefined unless "ListTunables" is the selection of this - // object. + // Return a reference to the non-modifiable "ListTunables" selection of + // this object if "ListTunables" is the current selection. The + // behavior is undefined unless "ListTunables" is the selection of this + // object. bool isSetTunableValue() const; - // Return 'true' if the value of this object is a "SetTunable" value, - // and return 'false' otherwise. + // Return 'true' if the value of this object is a "SetTunable" value, + // and return 'false' otherwise. bool isGetTunableValue() const; - // Return 'true' if the value of this object is a "GetTunable" value, - // and return 'false' otherwise. + // Return 'true' if the value of this object is a "GetTunable" value, + // and return 'false' otherwise. bool isListTunablesValue() const; - // Return 'true' if the value of this object is a "ListTunables" value, - // and return 'false' otherwise. + // Return 'true' if the value of this object is a "ListTunables" 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 ReplicationCommand& lhs, const ReplicationCommand& rhs) - // Return 'true' if the specified 'lhs' and 'rhs' objects have the same - // value, and 'false' otherwise. Two 'ReplicationCommand' 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 'ReplicationCommand' 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 ReplicationCommand& lhs, const ReplicationCommand& 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 ReplicationCommand& 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); } @@ -19750,10 +20202,10 @@ class ReplicationCommand { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const ReplicationCommand& 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 - // 'ReplicationCommand'. + // 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 + // 'ReplicationCommand'. { return object.hashAppendImpl(hashAlg); } @@ -19763,26 +20215,26 @@ class ReplicationCommand { // TRAITS -BDLAT_DECL_CHOICE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS( - mqbcmd::ReplicationCommand) +BDLAT_DECL_CHOICE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::ReplicationCommand) namespace mqbcmd { -// ================= -// class StatCommand -// ================= + // ================= + // class StatCommand + // ================= class StatCommand { + // INSTANCE DATA union { - bsls::ObjectBuffer d_show; - bsls::ObjectBuffer d_setTunable; - bsls::ObjectBuffer d_getTunable; - bsls::ObjectBuffer d_listTunables; + bsls::ObjectBuffer< Void > d_show; + bsls::ObjectBuffer< SetTunable > d_setTunable; + bsls::ObjectBuffer< bsl::string > d_getTunable; + bsls::ObjectBuffer< Void > d_listTunables; }; - int d_selectionId; - bslma::Allocator* d_allocator_p; + int d_selectionId; + bslma::Allocator *d_allocator_p; // PRIVATE ACCESSORS template @@ -19794,20 +20246,22 @@ class StatCommand { // TYPES enum { - SELECTION_ID_UNDEFINED = -1, - SELECTION_ID_SHOW = 0, - SELECTION_ID_SET_TUNABLE = 1, - SELECTION_ID_GET_TUNABLE = 2, - SELECTION_ID_LIST_TUNABLES = 3 + SELECTION_ID_UNDEFINED = -1 + , SELECTION_ID_SHOW = 0 + , SELECTION_ID_SET_TUNABLE = 1 + , SELECTION_ID_GET_TUNABLE = 2 + , SELECTION_ID_LIST_TUNABLES = 3 }; - enum { NUM_SELECTIONS = 4 }; + enum { + NUM_SELECTIONS = 4 + }; enum { - SELECTION_INDEX_SHOW = 0, - SELECTION_INDEX_SET_TUNABLE = 1, - SELECTION_INDEX_GET_TUNABLE = 2, - SELECTION_INDEX_LIST_TUNABLES = 3 + SELECTION_INDEX_SHOW = 0 + , SELECTION_INDEX_SET_TUNABLE = 1 + , SELECTION_INDEX_GET_TUNABLE = 2 + , SELECTION_INDEX_LIST_TUNABLES = 3 }; // CONSTANTS @@ -19816,237 +20270,240 @@ class StatCommand { 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 StatCommand(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'StatCommand' having the default value. - // Use the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit StatCommand(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'StatCommand' having the default value. + // Use the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. StatCommand(const StatCommand& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'StatCommand' 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 'StatCommand' 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) StatCommand(StatCommand&& original) noexcept; - // Create an object of type 'StatCommand' 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 'StatCommand' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - StatCommand(StatCommand&& original, bslma::Allocator* basicAllocator); - // Create an object of type 'StatCommand' 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. + StatCommand(StatCommand&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'StatCommand' 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 ~StatCommand(); - // Destroy this object. + // Destroy this object. // MANIPULATORS StatCommand& operator=(const StatCommand& 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) StatCommand& operator=(StatCommand&& 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). Void& makeShow(); Void& makeShow(const Void& 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) Void& makeShow(Void&& value); #endif - // Set the value of this object to be a "Show" value. Optionally - // specify the 'value' of the "Show". If 'value' is not specified, the - // default "Show" value is used. + // Set the value of this object to be a "Show" value. Optionally + // specify the 'value' of the "Show". If 'value' is not specified, the + // default "Show" value is used. SetTunable& makeSetTunable(); SetTunable& makeSetTunable(const SetTunable& 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) SetTunable& makeSetTunable(SetTunable&& value); #endif - // Set the value of this object to be a "SetTunable" value. Optionally - // specify the 'value' of the "SetTunable". If 'value' is not - // specified, the default "SetTunable" value is used. + // Set the value of this object to be a "SetTunable" value. Optionally + // specify the 'value' of the "SetTunable". If 'value' is not + // specified, the default "SetTunable" value is used. bsl::string& makeGetTunable(); bsl::string& makeGetTunable(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& makeGetTunable(bsl::string&& value); #endif - // Set the value of this object to be a "GetTunable" value. Optionally - // specify the 'value' of the "GetTunable". If 'value' is not - // specified, the default "GetTunable" value is used. + // Set the value of this object to be a "GetTunable" value. Optionally + // specify the 'value' of the "GetTunable". If 'value' is not + // specified, the default "GetTunable" value is used. Void& makeListTunables(); Void& makeListTunables(const Void& 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) Void& makeListTunables(Void&& value); #endif - // Set the value of this object to be a "ListTunables" value. - // Optionally specify the 'value' of the "ListTunables". If 'value' is - // not specified, the default "ListTunables" value is used. + // Set the value of this object to be a "ListTunables" value. + // Optionally specify the 'value' of the "ListTunables". If 'value' is + // not specified, the default "ListTunables" 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. Void& show(); - // Return a reference to the modifiable "Show" selection of this object - // if "Show" is the current selection. The behavior is undefined - // unless "Show" is the selection of this object. + // Return a reference to the modifiable "Show" selection of this object + // if "Show" is the current selection. The behavior is undefined + // unless "Show" is the selection of this object. SetTunable& setTunable(); - // Return a reference to the modifiable "SetTunable" selection of this - // object if "SetTunable" is the current selection. The behavior is - // undefined unless "SetTunable" is the selection of this object. + // Return a reference to the modifiable "SetTunable" selection of this + // object if "SetTunable" is the current selection. The behavior is + // undefined unless "SetTunable" is the selection of this object. bsl::string& getTunable(); - // Return a reference to the modifiable "GetTunable" selection of this - // object if "GetTunable" is the current selection. The behavior is - // undefined unless "GetTunable" is the selection of this object. + // Return a reference to the modifiable "GetTunable" selection of this + // object if "GetTunable" is the current selection. The behavior is + // undefined unless "GetTunable" is the selection of this object. Void& listTunables(); - // Return a reference to the modifiable "ListTunables" selection of - // this object if "ListTunables" is the current selection. The - // behavior is undefined unless "ListTunables" is the selection of this - // object. + // Return a reference to the modifiable "ListTunables" selection of + // this object if "ListTunables" is the current selection. The + // behavior is undefined unless "ListTunables" 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 Void& show() const; - // Return a reference to the non-modifiable "Show" selection of this - // object if "Show" is the current selection. The behavior is - // undefined unless "Show" is the selection of this object. + // Return a reference to the non-modifiable "Show" selection of this + // object if "Show" is the current selection. The behavior is + // undefined unless "Show" is the selection of this object. const SetTunable& setTunable() const; - // Return a reference to the non-modifiable "SetTunable" selection of - // this object if "SetTunable" is the current selection. The behavior - // is undefined unless "SetTunable" is the selection of this object. + // Return a reference to the non-modifiable "SetTunable" selection of + // this object if "SetTunable" is the current selection. The behavior + // is undefined unless "SetTunable" is the selection of this object. const bsl::string& getTunable() const; - // Return a reference to the non-modifiable "GetTunable" selection of - // this object if "GetTunable" is the current selection. The behavior - // is undefined unless "GetTunable" is the selection of this object. + // Return a reference to the non-modifiable "GetTunable" selection of + // this object if "GetTunable" is the current selection. The behavior + // is undefined unless "GetTunable" is the selection of this object. const Void& listTunables() const; - // Return a reference to the non-modifiable "ListTunables" selection of - // this object if "ListTunables" is the current selection. The - // behavior is undefined unless "ListTunables" is the selection of this - // object. + // Return a reference to the non-modifiable "ListTunables" selection of + // this object if "ListTunables" is the current selection. The + // behavior is undefined unless "ListTunables" is the selection of this + // object. bool isShowValue() const; - // Return 'true' if the value of this object is a "Show" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Show" value, and + // return 'false' otherwise. bool isSetTunableValue() const; - // Return 'true' if the value of this object is a "SetTunable" value, - // and return 'false' otherwise. + // Return 'true' if the value of this object is a "SetTunable" value, + // and return 'false' otherwise. bool isGetTunableValue() const; - // Return 'true' if the value of this object is a "GetTunable" value, - // and return 'false' otherwise. + // Return 'true' if the value of this object is a "GetTunable" value, + // and return 'false' otherwise. bool isListTunablesValue() const; - // Return 'true' if the value of this object is a "ListTunables" value, - // and return 'false' otherwise. + // Return 'true' if the value of this object is a "ListTunables" 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 StatCommand& lhs, const StatCommand& rhs) - // Return 'true' if the specified 'lhs' and 'rhs' objects have the same - // value, and 'false' otherwise. Two 'StatCommand' 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 'StatCommand' 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 StatCommand& lhs, const StatCommand& 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 StatCommand& 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); } @@ -20054,9 +20511,9 @@ class StatCommand { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const StatCommand& 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 'StatCommand'. + // 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 'StatCommand'. { return object.hashAppendImpl(hashAlg); } @@ -20070,16 +20527,17 @@ BDLAT_DECL_CHOICE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::StatCommand) namespace mqbcmd { -// ======================= -// class SubscriptionGroup -// ======================= + // ======================= + // class SubscriptionGroup + // ======================= class SubscriptionGroup { + // INSTANCE DATA - bsl::string d_expression; - bdlb::NullableValue d_priorityGroup; - unsigned int d_id; - unsigned int d_upstreamSubQueueId; + bsl::string d_expression; + bdlb::NullableValue d_priorityGroup; + unsigned int d_id; + unsigned int d_upstreamSubQueueId; // PRIVATE ACCESSORS template @@ -20090,19 +20548,21 @@ class SubscriptionGroup { public: // TYPES enum { - ATTRIBUTE_ID_ID = 0, - ATTRIBUTE_ID_EXPRESSION = 1, - ATTRIBUTE_ID_UPSTREAM_SUB_QUEUE_ID = 2, - ATTRIBUTE_ID_PRIORITY_GROUP = 3 + ATTRIBUTE_ID_ID = 0 + , ATTRIBUTE_ID_EXPRESSION = 1 + , ATTRIBUTE_ID_UPSTREAM_SUB_QUEUE_ID = 2 + , ATTRIBUTE_ID_PRIORITY_GROUP = 3 }; - enum { NUM_ATTRIBUTES = 4 }; + enum { + NUM_ATTRIBUTES = 4 + }; enum { - ATTRIBUTE_INDEX_ID = 0, - ATTRIBUTE_INDEX_EXPRESSION = 1, - ATTRIBUTE_INDEX_UPSTREAM_SUB_QUEUE_ID = 2, - ATTRIBUTE_INDEX_PRIORITY_GROUP = 3 + ATTRIBUTE_INDEX_ID = 0 + , ATTRIBUTE_INDEX_EXPRESSION = 1 + , ATTRIBUTE_INDEX_UPSTREAM_SUB_QUEUE_ID = 2 + , ATTRIBUTE_INDEX_PRIORITY_GROUP = 3 }; // CONSTANTS @@ -20112,189 +20572,191 @@ class SubscriptionGroup { 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 SubscriptionGroup(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'SubscriptionGroup' having the default - // value. Use the optionally specified 'basicAllocator' to supply - // memory. If 'basicAllocator' is 0, the currently installed default - // allocator is used. + explicit SubscriptionGroup(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'SubscriptionGroup' having the default + // value. Use the optionally specified 'basicAllocator' to supply + // memory. If 'basicAllocator' is 0, the currently installed default + // allocator is used. SubscriptionGroup(const SubscriptionGroup& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'SubscriptionGroup' 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 'SubscriptionGroup' 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) SubscriptionGroup(SubscriptionGroup&& original) noexcept; - // Create an object of type 'SubscriptionGroup' 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 'SubscriptionGroup' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. SubscriptionGroup(SubscriptionGroup&& original, - bslma::Allocator* basicAllocator); - // Create an object of type 'SubscriptionGroup' 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 'SubscriptionGroup' 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 ~SubscriptionGroup(); - // Destroy this object. + // Destroy this object. // MANIPULATORS SubscriptionGroup& operator=(const SubscriptionGroup& 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) SubscriptionGroup& operator=(SubscriptionGroup&& 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. unsigned 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& expression(); - // Return a reference to the modifiable "Expression" attribute of this - // object. + // Return a reference to the modifiable "Expression" attribute of this + // object. unsigned int& upstreamSubQueueId(); - // Return a reference to the modifiable "UpstreamSubQueueId" attribute - // of this object. + // Return a reference to the modifiable "UpstreamSubQueueId" attribute + // of this object. bdlb::NullableValue& priorityGroup(); - // Return a reference to the modifiable "PriorityGroup" attribute of - // this object. + // Return a reference to the modifiable "PriorityGroup" 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. unsigned 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& expression() const; - // Return a reference offering non-modifiable access to the - // "Expression" attribute of this object. + // Return a reference offering non-modifiable access to the + // "Expression" attribute of this object. unsigned int upstreamSubQueueId() const; - // Return the value of the "UpstreamSubQueueId" attribute of this - // object. + // Return the value of the "UpstreamSubQueueId" attribute of this + // object. const bdlb::NullableValue& priorityGroup() const; - // Return a reference offering non-modifiable access to the - // "PriorityGroup" attribute of this object. + // Return a reference offering non-modifiable access to the + // "PriorityGroup" attribute of this object. // HIDDEN FRIENDS friend bool operator==(const SubscriptionGroup& lhs, const SubscriptionGroup& 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 SubscriptionGroup& lhs, const SubscriptionGroup& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const SubscriptionGroup& 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); } @@ -20302,10 +20764,10 @@ class SubscriptionGroup { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const SubscriptionGroup& 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 - // 'SubscriptionGroup'. + // 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 + // 'SubscriptionGroup'. { object.hashAppendImpl(hashAlg); } @@ -20315,26 +20777,32 @@ class SubscriptionGroup { // TRAITS -BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS( - mqbcmd::SubscriptionGroup) +BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::SubscriptionGroup) namespace mqbcmd { -// ============== -// class Tunables -// ============== + // ============== + // class Tunables + // ============== class Tunables { + // INSTANCE DATA - bsl::vector d_tunables; + bsl::vector d_tunables; public: // TYPES - enum { ATTRIBUTE_ID_TUNABLES = 0 }; + enum { + ATTRIBUTE_ID_TUNABLES = 0 + }; - enum { NUM_ATTRIBUTES = 1 }; + enum { + NUM_ATTRIBUTES = 1 + }; - enum { ATTRIBUTE_INDEX_TUNABLES = 0 }; + enum { + ATTRIBUTE_INDEX_TUNABLES = 0 + }; // CONSTANTS static const char CLASS_NAME[]; @@ -20343,171 +20811,175 @@ class Tunables { 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 Tunables(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'Tunables' having the default value. Use - // the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. - - Tunables(const Tunables& original, bslma::Allocator* basicAllocator = 0); - // Create an object of type 'Tunables' 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 Tunables(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'Tunables' having the default value. Use + // the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. + + Tunables(const Tunables& original, + bslma::Allocator *basicAllocator = 0); + // Create an object of type 'Tunables' 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) Tunables(Tunables&& original) noexcept; - // Create an object of type 'Tunables' 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 'Tunables' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - Tunables(Tunables&& original, bslma::Allocator* basicAllocator); - // Create an object of type 'Tunables' 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. + Tunables(Tunables&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'Tunables' 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 ~Tunables(); - // Destroy this object. + // Destroy this object. // MANIPULATORS Tunables& operator=(const Tunables& 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) Tunables& operator=(Tunables&& 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::vector& tunables(); - // Return a reference to the modifiable "Tunables" attribute of this - // object. + // Return a reference to the modifiable "Tunables" 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::vector& tunables() const; - // Return a reference offering non-modifiable access to the "Tunables" - // attribute of this object. + // Return a reference offering non-modifiable access to the "Tunables" + // attribute of this object. // HIDDEN FRIENDS friend bool operator==(const Tunables& lhs, const Tunables& 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.tunables() == rhs.tunables(); } friend bool operator!=(const Tunables& lhs, const Tunables& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const Tunables& 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 Tunables& 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 'Tunables'. + // 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 'Tunables'. { using bslh::hashAppend; hashAppend(hashAlg, object.tunables()); @@ -20522,18 +20994,19 @@ BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::Tunables) namespace mqbcmd { -// ========================= -// class ClusterStateCommand -// ========================= + // ========================= + // class ClusterStateCommand + // ========================= class ClusterStateCommand { + // INSTANCE DATA union { - bsls::ObjectBuffer d_elector; + bsls::ObjectBuffer< ElectorCommand > d_elector; }; - int d_selectionId; - bslma::Allocator* d_allocator_p; + int d_selectionId; + bslma::Allocator *d_allocator_p; // PRIVATE ACCESSORS template @@ -20544,11 +21017,18 @@ class ClusterStateCommand { public: // TYPES - enum { SELECTION_ID_UNDEFINED = -1, SELECTION_ID_ELECTOR = 0 }; + enum { + SELECTION_ID_UNDEFINED = -1 + , SELECTION_ID_ELECTOR = 0 + }; - enum { NUM_SELECTIONS = 1 }; + enum { + NUM_SELECTIONS = 1 + }; - enum { SELECTION_INDEX_ELECTOR = 0 }; + enum { + SELECTION_INDEX_ELECTOR = 0 + }; // CONSTANTS static const char CLASS_NAME[]; @@ -20556,166 +21036,168 @@ class ClusterStateCommand { 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 ClusterStateCommand(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'ClusterStateCommand' having the default - // value. Use the optionally specified 'basicAllocator' to supply - // memory. If 'basicAllocator' is 0, the currently installed default - // allocator is used. + explicit ClusterStateCommand(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'ClusterStateCommand' having the default + // value. Use the optionally specified 'basicAllocator' to supply + // memory. If 'basicAllocator' is 0, the currently installed default + // allocator is used. ClusterStateCommand(const ClusterStateCommand& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'ClusterStateCommand' 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 'ClusterStateCommand' 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) ClusterStateCommand(ClusterStateCommand&& original) noexcept; - // Create an object of type 'ClusterStateCommand' 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 'ClusterStateCommand' having the value of + // the specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. ClusterStateCommand(ClusterStateCommand&& original, - bslma::Allocator* basicAllocator); - // Create an object of type 'ClusterStateCommand' 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 'ClusterStateCommand' 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 ~ClusterStateCommand(); - // Destroy this object. + // Destroy this object. // MANIPULATORS ClusterStateCommand& operator=(const ClusterStateCommand& 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) ClusterStateCommand& operator=(ClusterStateCommand&& 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). ElectorCommand& makeElector(); ElectorCommand& makeElector(const ElectorCommand& 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) ElectorCommand& makeElector(ElectorCommand&& value); #endif - // Set the value of this object to be a "Elector" value. Optionally - // specify the 'value' of the "Elector". If 'value' is not specified, - // the default "Elector" value is used. + // Set the value of this object to be a "Elector" value. Optionally + // specify the 'value' of the "Elector". If 'value' is not specified, + // the default "Elector" 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. ElectorCommand& elector(); - // Return a reference to the modifiable "Elector" selection of this - // object if "Elector" is the current selection. The behavior is - // undefined unless "Elector" is the selection of this object. + // Return a reference to the modifiable "Elector" selection of this + // object if "Elector" is the current selection. The behavior is + // undefined unless "Elector" 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 ElectorCommand& elector() const; - // Return a reference to the non-modifiable "Elector" selection of this - // object if "Elector" is the current selection. The behavior is - // undefined unless "Elector" is the selection of this object. + // Return a reference to the non-modifiable "Elector" selection of this + // object if "Elector" is the current selection. The behavior is + // undefined unless "Elector" is the selection of this object. bool isElectorValue() const; - // Return 'true' if the value of this object is a "Elector" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Elector" 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 ClusterStateCommand& lhs, const ClusterStateCommand& rhs) - // Return 'true' if the specified 'lhs' and 'rhs' objects have the same - // value, and 'false' otherwise. Two 'ClusterStateCommand' 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 'ClusterStateCommand' 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 ClusterStateCommand& lhs, const ClusterStateCommand& 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 ClusterStateCommand& 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); } @@ -20723,10 +21205,10 @@ class ClusterStateCommand { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const ClusterStateCommand& 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 - // 'ClusterStateCommand'. + // 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 + // 'ClusterStateCommand'. { return object.hashAppendImpl(hashAlg); } @@ -20736,32 +21218,34 @@ class ClusterStateCommand { // TRAITS -BDLAT_DECL_CHOICE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS( - mqbcmd::ClusterStateCommand) +BDLAT_DECL_CHOICE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::ClusterStateCommand) namespace mqbcmd { -// =========================== -// class ClusterStorageSummary -// =========================== + // =========================== + // class ClusterStorageSummary + // =========================== class ClusterStorageSummary { + // INSTANCE DATA - bsl::vector d_fileStores; - bsl::string d_clusterFileStoreLocation; + bsl::vector d_fileStores; + bsl::string d_clusterFileStoreLocation; public: // TYPES enum { - ATTRIBUTE_ID_CLUSTER_FILE_STORE_LOCATION = 0, - ATTRIBUTE_ID_FILE_STORES = 1 + ATTRIBUTE_ID_CLUSTER_FILE_STORE_LOCATION = 0 + , ATTRIBUTE_ID_FILE_STORES = 1 }; - enum { NUM_ATTRIBUTES = 2 }; + enum { + NUM_ATTRIBUTES = 2 + }; enum { - ATTRIBUTE_INDEX_CLUSTER_FILE_STORE_LOCATION = 0, - ATTRIBUTE_INDEX_FILE_STORES = 1 + ATTRIBUTE_INDEX_CLUSTER_FILE_STORE_LOCATION = 0 + , ATTRIBUTE_INDEX_FILE_STORES = 1 }; // CONSTANTS @@ -20771,177 +21255,178 @@ class ClusterStorageSummary { 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 ClusterStorageSummary(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'ClusterStorageSummary' having the default - // value. Use the optionally specified 'basicAllocator' to supply - // memory. If 'basicAllocator' is 0, the currently installed default - // allocator is used. + explicit ClusterStorageSummary(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'ClusterStorageSummary' having the default + // value. Use the optionally specified 'basicAllocator' to supply + // memory. If 'basicAllocator' is 0, the currently installed default + // allocator is used. ClusterStorageSummary(const ClusterStorageSummary& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'ClusterStorageSummary' 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 'ClusterStorageSummary' 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) ClusterStorageSummary(ClusterStorageSummary&& original) noexcept; - // Create an object of type 'ClusterStorageSummary' 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 'ClusterStorageSummary' having the value of + // the specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. ClusterStorageSummary(ClusterStorageSummary&& original, - bslma::Allocator* basicAllocator); - // Create an object of type 'ClusterStorageSummary' 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 'ClusterStorageSummary' 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 ~ClusterStorageSummary(); - // Destroy this object. + // Destroy this object. // MANIPULATORS ClusterStorageSummary& operator=(const ClusterStorageSummary& 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) ClusterStorageSummary& operator=(ClusterStorageSummary&& 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& clusterFileStoreLocation(); - // Return a reference to the modifiable "ClusterFileStoreLocation" - // attribute of this object. + // Return a reference to the modifiable "ClusterFileStoreLocation" + // attribute of this object. bsl::vector& fileStores(); - // Return a reference to the modifiable "FileStores" attribute of this - // object. + // Return a reference to the modifiable "FileStores" 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& clusterFileStoreLocation() const; - // Return a reference offering non-modifiable access to the - // "ClusterFileStoreLocation" attribute of this object. + // Return a reference offering non-modifiable access to the + // "ClusterFileStoreLocation" attribute of this object. const bsl::vector& fileStores() const; - // Return a reference offering non-modifiable access to the - // "FileStores" attribute of this object. + // Return a reference offering non-modifiable access to the + // "FileStores" attribute of this object. // HIDDEN FRIENDS friend bool operator==(const ClusterStorageSummary& lhs, const ClusterStorageSummary& 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.clusterFileStoreLocation() == - rhs.clusterFileStoreLocation() && + return lhs.clusterFileStoreLocation() == rhs.clusterFileStoreLocation() && lhs.fileStores() == rhs.fileStores(); } friend bool operator!=(const ClusterStorageSummary& lhs, const ClusterStorageSummary& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const ClusterStorageSummary& 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); } @@ -20949,10 +21434,10 @@ class ClusterStorageSummary { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const ClusterStorageSummary& 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 - // 'ClusterStorageSummary'. + // 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 + // 'ClusterStorageSummary'. { using bslh::hashAppend; hashAppend(hashAlg, object.clusterFileStoreLocation()); @@ -20964,27 +21449,35 @@ class ClusterStorageSummary { // TRAITS -BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS( - mqbcmd::ClusterStorageSummary) +BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::ClusterStorageSummary) namespace mqbcmd { -// ============ -// class Domain -// ============ + // ============ + // class Domain + // ============ class Domain { + // INSTANCE DATA - bsl::string d_name; - DomainCommand d_command; + bsl::string d_name; + DomainCommand d_command; public: // TYPES - enum { ATTRIBUTE_ID_NAME = 0, ATTRIBUTE_ID_COMMAND = 1 }; + enum { + ATTRIBUTE_ID_NAME = 0 + , ATTRIBUTE_ID_COMMAND = 1 + }; - enum { NUM_ATTRIBUTES = 2 }; + enum { + NUM_ATTRIBUTES = 2 + }; - enum { ATTRIBUTE_INDEX_NAME = 0, ATTRIBUTE_INDEX_COMMAND = 1 }; + enum { + ATTRIBUTE_INDEX_NAME = 0 + , ATTRIBUTE_INDEX_COMMAND = 1 + }; // CONSTANTS static const char CLASS_NAME[]; @@ -20993,179 +21486,184 @@ class Domain { 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 Domain(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'Domain' having the default value. Use the - // optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. - - Domain(const Domain& original, bslma::Allocator* basicAllocator = 0); - // Create an object of type 'Domain' 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 Domain(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'Domain' having the default value. Use the + // optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. + + Domain(const Domain& original, + bslma::Allocator *basicAllocator = 0); + // Create an object of type 'Domain' 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) Domain(Domain&& original) noexcept; - // Create an object of type 'Domain' 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 'Domain' having the value of the specified + // 'original' object. After performing this action, the 'original' + // object will be left in a valid, but unspecified state. - Domain(Domain&& original, bslma::Allocator* basicAllocator); - // Create an object of type 'Domain' 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. + Domain(Domain&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'Domain' 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 ~Domain(); - // Destroy this object. + // Destroy this object. // MANIPULATORS Domain& operator=(const Domain& 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) Domain& operator=(Domain&& 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. DomainCommand& command(); - // Return a reference to the modifiable "Command" attribute of this - // object. + // Return a reference to the modifiable "Command" 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. const DomainCommand& 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. // HIDDEN FRIENDS friend bool operator==(const Domain& lhs, const Domain& 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.command() == rhs.command(); + return lhs.name() == rhs.name() && + lhs.command() == rhs.command(); } friend bool operator!=(const Domain& lhs, const Domain& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const Domain& 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 Domain& 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 'Domain'. + // 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 'Domain'. { using bslh::hashAppend; hashAppend(hashAlg, object.name()); @@ -21181,21 +21679,22 @@ BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::Domain) namespace mqbcmd { -// =================== -// class ElectorResult -// =================== + // =================== + // class ElectorResult + // =================== class ElectorResult { + // INSTANCE DATA union { - bsls::ObjectBuffer d_error; - bsls::ObjectBuffer d_tunable; - bsls::ObjectBuffer d_tunables; - bsls::ObjectBuffer d_tunableConfirmation; + bsls::ObjectBuffer< Error > d_error; + bsls::ObjectBuffer< Tunable > d_tunable; + bsls::ObjectBuffer< Tunables > d_tunables; + bsls::ObjectBuffer< TunableConfirmation > d_tunableConfirmation; }; - int d_selectionId; - bslma::Allocator* d_allocator_p; + int d_selectionId; + bslma::Allocator *d_allocator_p; // PRIVATE ACCESSORS template @@ -21207,20 +21706,22 @@ class ElectorResult { // TYPES enum { - SELECTION_ID_UNDEFINED = -1, - SELECTION_ID_ERROR = 0, - SELECTION_ID_TUNABLE = 1, - SELECTION_ID_TUNABLES = 2, - SELECTION_ID_TUNABLE_CONFIRMATION = 3 + SELECTION_ID_UNDEFINED = -1 + , SELECTION_ID_ERROR = 0 + , SELECTION_ID_TUNABLE = 1 + , SELECTION_ID_TUNABLES = 2 + , SELECTION_ID_TUNABLE_CONFIRMATION = 3 }; - enum { NUM_SELECTIONS = 4 }; + enum { + NUM_SELECTIONS = 4 + }; enum { - SELECTION_INDEX_ERROR = 0, - SELECTION_INDEX_TUNABLE = 1, - SELECTION_INDEX_TUNABLES = 2, - SELECTION_INDEX_TUNABLE_CONFIRMATION = 3 + SELECTION_INDEX_ERROR = 0 + , SELECTION_INDEX_TUNABLE = 1 + , SELECTION_INDEX_TUNABLES = 2 + , SELECTION_INDEX_TUNABLE_CONFIRMATION = 3 }; // CONSTANTS @@ -21229,239 +21730,241 @@ class ElectorResult { 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 ElectorResult(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'ElectorResult' having the default value. - // Use the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit ElectorResult(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'ElectorResult' having the default value. + // Use the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. ElectorResult(const ElectorResult& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'ElectorResult' 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 'ElectorResult' 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) ElectorResult(ElectorResult&& original) noexcept; - // Create an object of type 'ElectorResult' 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 'ElectorResult' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - ElectorResult(ElectorResult&& original, bslma::Allocator* basicAllocator); - // Create an object of type 'ElectorResult' 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. + ElectorResult(ElectorResult&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'ElectorResult' 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 ~ElectorResult(); - // Destroy this object. + // Destroy this object. // MANIPULATORS ElectorResult& operator=(const ElectorResult& 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) ElectorResult& operator=(ElectorResult&& 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). Error& makeError(); Error& makeError(const Error& 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) Error& makeError(Error&& value); #endif - // Set the value of this object to be a "Error" value. Optionally - // specify the 'value' of the "Error". If 'value' is not specified, - // the default "Error" value is used. + // Set the value of this object to be a "Error" value. Optionally + // specify the 'value' of the "Error". If 'value' is not specified, + // the default "Error" value is used. Tunable& makeTunable(); Tunable& makeTunable(const Tunable& 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) Tunable& makeTunable(Tunable&& value); #endif - // Set the value of this object to be a "Tunable" value. Optionally - // specify the 'value' of the "Tunable". If 'value' is not specified, - // the default "Tunable" value is used. + // Set the value of this object to be a "Tunable" value. Optionally + // specify the 'value' of the "Tunable". If 'value' is not specified, + // the default "Tunable" value is used. Tunables& makeTunables(); Tunables& makeTunables(const Tunables& 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) Tunables& makeTunables(Tunables&& value); #endif - // Set the value of this object to be a "Tunables" value. Optionally - // specify the 'value' of the "Tunables". If 'value' is not specified, - // the default "Tunables" value is used. + // Set the value of this object to be a "Tunables" value. Optionally + // specify the 'value' of the "Tunables". If 'value' is not specified, + // the default "Tunables" value is used. TunableConfirmation& makeTunableConfirmation(); - TunableConfirmation& - makeTunableConfirmation(const TunableConfirmation& value); -#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \ - defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) + TunableConfirmation& makeTunableConfirmation(const TunableConfirmation& value); +#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \ + && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) TunableConfirmation& makeTunableConfirmation(TunableConfirmation&& value); #endif - // Set the value of this object to be a "TunableConfirmation" value. - // Optionally specify the 'value' of the "TunableConfirmation". If - // 'value' is not specified, the default "TunableConfirmation" value is - // used. + // Set the value of this object to be a "TunableConfirmation" value. + // Optionally specify the 'value' of the "TunableConfirmation". If + // 'value' is not specified, the default "TunableConfirmation" 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. Error& error(); - // Return a reference to the modifiable "Error" selection of this - // object if "Error" is the current selection. The behavior is - // undefined unless "Error" is the selection of this object. + // Return a reference to the modifiable "Error" selection of this + // object if "Error" is the current selection. The behavior is + // undefined unless "Error" is the selection of this object. Tunable& tunable(); - // Return a reference to the modifiable "Tunable" selection of this - // object if "Tunable" is the current selection. The behavior is - // undefined unless "Tunable" is the selection of this object. + // Return a reference to the modifiable "Tunable" selection of this + // object if "Tunable" is the current selection. The behavior is + // undefined unless "Tunable" is the selection of this object. Tunables& tunables(); - // Return a reference to the modifiable "Tunables" selection of this - // object if "Tunables" is the current selection. The behavior is - // undefined unless "Tunables" is the selection of this object. + // Return a reference to the modifiable "Tunables" selection of this + // object if "Tunables" is the current selection. The behavior is + // undefined unless "Tunables" is the selection of this object. TunableConfirmation& tunableConfirmation(); - // Return a reference to the modifiable "TunableConfirmation" selection - // of this object if "TunableConfirmation" is the current selection. - // The behavior is undefined unless "TunableConfirmation" is the - // selection of this object. + // Return a reference to the modifiable "TunableConfirmation" selection + // of this object if "TunableConfirmation" is the current selection. + // The behavior is undefined unless "TunableConfirmation" 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 Error& error() const; - // Return a reference to the non-modifiable "Error" selection of this - // object if "Error" is the current selection. The behavior is - // undefined unless "Error" is the selection of this object. + // Return a reference to the non-modifiable "Error" selection of this + // object if "Error" is the current selection. The behavior is + // undefined unless "Error" is the selection of this object. const Tunable& tunable() const; - // Return a reference to the non-modifiable "Tunable" selection of this - // object if "Tunable" is the current selection. The behavior is - // undefined unless "Tunable" is the selection of this object. + // Return a reference to the non-modifiable "Tunable" selection of this + // object if "Tunable" is the current selection. The behavior is + // undefined unless "Tunable" is the selection of this object. const Tunables& tunables() const; - // Return a reference to the non-modifiable "Tunables" selection of - // this object if "Tunables" is the current selection. The behavior is - // undefined unless "Tunables" is the selection of this object. + // Return a reference to the non-modifiable "Tunables" selection of + // this object if "Tunables" is the current selection. The behavior is + // undefined unless "Tunables" is the selection of this object. const TunableConfirmation& tunableConfirmation() const; - // Return a reference to the non-modifiable "TunableConfirmation" - // selection of this object if "TunableConfirmation" is the current - // selection. The behavior is undefined unless "TunableConfirmation" - // is the selection of this object. + // Return a reference to the non-modifiable "TunableConfirmation" + // selection of this object if "TunableConfirmation" is the current + // selection. The behavior is undefined unless "TunableConfirmation" + // is the selection of this object. bool isErrorValue() const; - // Return 'true' if the value of this object is a "Error" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Error" value, and + // return 'false' otherwise. bool isTunableValue() const; - // Return 'true' if the value of this object is a "Tunable" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Tunable" value, and + // return 'false' otherwise. bool isTunablesValue() const; - // Return 'true' if the value of this object is a "Tunables" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Tunables" value, and + // return 'false' otherwise. bool isTunableConfirmationValue() const; - // Return 'true' if the value of this object is a "TunableConfirmation" - // value, and return 'false' otherwise. + // Return 'true' if the value of this object is a "TunableConfirmation" + // 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 ElectorResult& lhs, const ElectorResult& rhs) - // Return 'true' if the specified 'lhs' and 'rhs' objects have the same - // value, and 'false' otherwise. Two 'ElectorResult' 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 'ElectorResult' 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 ElectorResult& lhs, const ElectorResult& 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 ElectorResult& 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); } @@ -21469,10 +21972,10 @@ class ElectorResult { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const ElectorResult& 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 - // 'ElectorResult'. + // 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 + // 'ElectorResult'. { return object.hashAppendImpl(hashAlg); } @@ -21486,21 +21989,22 @@ BDLAT_DECL_CHOICE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::ElectorResult) namespace mqbcmd { -// ================ -// class QueueState -// ================ + // ================ + // class QueueState + // ================ class QueueState { + // INSTANCE DATA - bsl::vector d_handles; - bsl::string d_uri; - bsl::string d_handleParametersJson; - bsl::string d_streamParametersJson; - bsl::string d_key; - bdlb::NullableValue d_storage; - bdlb::NullableValue d_capacityMeter; - unsigned int d_id; - int d_partitionId; + bsl::vector d_handles; + bsl::string d_uri; + bsl::string d_handleParametersJson; + bsl::string d_streamParametersJson; + bsl::string d_key; + bdlb::NullableValue d_storage; + bdlb::NullableValue d_capacityMeter; + unsigned int d_id; + int d_partitionId; // PRIVATE ACCESSORS template @@ -21511,29 +22015,31 @@ class QueueState { public: // TYPES enum { - ATTRIBUTE_ID_URI = 0, - ATTRIBUTE_ID_HANDLE_PARAMETERS_JSON = 1, - ATTRIBUTE_ID_STREAM_PARAMETERS_JSON = 2, - ATTRIBUTE_ID_ID = 3, - ATTRIBUTE_ID_KEY = 4, - ATTRIBUTE_ID_PARTITION_ID = 5, - ATTRIBUTE_ID_STORAGE = 6, - ATTRIBUTE_ID_CAPACITY_METER = 7, - ATTRIBUTE_ID_HANDLES = 8 + ATTRIBUTE_ID_URI = 0 + , ATTRIBUTE_ID_HANDLE_PARAMETERS_JSON = 1 + , ATTRIBUTE_ID_STREAM_PARAMETERS_JSON = 2 + , ATTRIBUTE_ID_ID = 3 + , ATTRIBUTE_ID_KEY = 4 + , ATTRIBUTE_ID_PARTITION_ID = 5 + , ATTRIBUTE_ID_STORAGE = 6 + , ATTRIBUTE_ID_CAPACITY_METER = 7 + , ATTRIBUTE_ID_HANDLES = 8 }; - enum { NUM_ATTRIBUTES = 9 }; + enum { + NUM_ATTRIBUTES = 9 + }; enum { - ATTRIBUTE_INDEX_URI = 0, - ATTRIBUTE_INDEX_HANDLE_PARAMETERS_JSON = 1, - ATTRIBUTE_INDEX_STREAM_PARAMETERS_JSON = 2, - ATTRIBUTE_INDEX_ID = 3, - ATTRIBUTE_INDEX_KEY = 4, - ATTRIBUTE_INDEX_PARTITION_ID = 5, - ATTRIBUTE_INDEX_STORAGE = 6, - ATTRIBUTE_INDEX_CAPACITY_METER = 7, - ATTRIBUTE_INDEX_HANDLES = 8 + ATTRIBUTE_INDEX_URI = 0 + , ATTRIBUTE_INDEX_HANDLE_PARAMETERS_JSON = 1 + , ATTRIBUTE_INDEX_STREAM_PARAMETERS_JSON = 2 + , ATTRIBUTE_INDEX_ID = 3 + , ATTRIBUTE_INDEX_KEY = 4 + , ATTRIBUTE_INDEX_PARTITION_ID = 5 + , ATTRIBUTE_INDEX_STORAGE = 6 + , ATTRIBUTE_INDEX_CAPACITY_METER = 7 + , ATTRIBUTE_INDEX_HANDLES = 8 }; // CONSTANTS @@ -21543,232 +22049,235 @@ class QueueState { 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 QueueState(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'QueueState' having the default value. Use - // the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit QueueState(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'QueueState' having the default value. Use + // the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. QueueState(const QueueState& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'QueueState' 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 'QueueState' 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) QueueState(QueueState&& original) noexcept; - // Create an object of type 'QueueState' 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 'QueueState' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - QueueState(QueueState&& original, bslma::Allocator* basicAllocator); - // Create an object of type 'QueueState' 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. + QueueState(QueueState&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'QueueState' 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 ~QueueState(); - // Destroy this object. + // Destroy this object. // MANIPULATORS QueueState& operator=(const QueueState& 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) QueueState& operator=(QueueState&& 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& uri(); - // Return a reference to the modifiable "Uri" attribute of this object. + // Return a reference to the modifiable "Uri" attribute of this object. bsl::string& handleParametersJson(); - // Return a reference to the modifiable "HandleParametersJson" - // attribute of this object. + // Return a reference to the modifiable "HandleParametersJson" + // attribute of this object. bsl::string& streamParametersJson(); - // Return a reference to the modifiable "StreamParametersJson" - // attribute of this object. + // Return a reference to the modifiable "StreamParametersJson" + // attribute of this object. unsigned 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& key(); - // Return a reference to the modifiable "Key" attribute of this object. + // Return a reference to the modifiable "Key" 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. bdlb::NullableValue& storage(); - // Return a reference to the modifiable "Storage" attribute of this - // object. + // Return a reference to the modifiable "Storage" attribute of this + // object. bdlb::NullableValue& capacityMeter(); - // Return a reference to the modifiable "CapacityMeter" attribute of - // this object. + // Return a reference to the modifiable "CapacityMeter" attribute of + // this object. bsl::vector& handles(); - // Return a reference to the modifiable "Handles" attribute of this - // object. + // Return a reference to the modifiable "Handles" 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& uri() const; - // Return a reference offering non-modifiable access to the "Uri" - // attribute of this object. + // Return a reference offering non-modifiable access to the "Uri" + // attribute of this object. const bsl::string& handleParametersJson() const; - // Return a reference offering non-modifiable access to the - // "HandleParametersJson" attribute of this object. + // Return a reference offering non-modifiable access to the + // "HandleParametersJson" attribute of this object. const bsl::string& streamParametersJson() const; - // Return a reference offering non-modifiable access to the - // "StreamParametersJson" attribute of this object. + // Return a reference offering non-modifiable access to the + // "StreamParametersJson" attribute of this object. unsigned 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& key() const; - // Return a reference offering non-modifiable access to the "Key" - // attribute of this object. + // Return a reference offering non-modifiable access to the "Key" + // 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. const bdlb::NullableValue& storage() const; - // Return a reference offering non-modifiable access to the "Storage" - // attribute of this object. + // Return a reference offering non-modifiable access to the "Storage" + // attribute of this object. const bdlb::NullableValue& capacityMeter() const; - // Return a reference offering non-modifiable access to the - // "CapacityMeter" attribute of this object. + // Return a reference offering non-modifiable access to the + // "CapacityMeter" attribute of this object. const bsl::vector& handles() const; - // Return a reference offering non-modifiable access to the "Handles" - // attribute of this object. + // Return a reference offering non-modifiable access to the "Handles" + // attribute of this object. // HIDDEN FRIENDS friend bool operator==(const QueueState& lhs, const QueueState& 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 QueueState& lhs, const QueueState& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const QueueState& 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 QueueState& 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 'QueueState'. + // 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 'QueueState'. { object.hashAppendImpl(hashAlg); } @@ -21782,21 +22291,22 @@ BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::QueueState) namespace mqbcmd { -// ======================= -// class ReplicationResult -// ======================= + // ======================= + // class ReplicationResult + // ======================= class ReplicationResult { + // INSTANCE DATA union { - bsls::ObjectBuffer d_error; - bsls::ObjectBuffer d_tunable; - bsls::ObjectBuffer d_tunables; - bsls::ObjectBuffer d_tunableConfirmation; + bsls::ObjectBuffer< Error > d_error; + bsls::ObjectBuffer< Tunable > d_tunable; + bsls::ObjectBuffer< Tunables > d_tunables; + bsls::ObjectBuffer< TunableConfirmation > d_tunableConfirmation; }; - int d_selectionId; - bslma::Allocator* d_allocator_p; + int d_selectionId; + bslma::Allocator *d_allocator_p; // PRIVATE ACCESSORS template @@ -21808,20 +22318,22 @@ class ReplicationResult { // TYPES enum { - SELECTION_ID_UNDEFINED = -1, - SELECTION_ID_ERROR = 0, - SELECTION_ID_TUNABLE = 1, - SELECTION_ID_TUNABLES = 2, - SELECTION_ID_TUNABLE_CONFIRMATION = 3 + SELECTION_ID_UNDEFINED = -1 + , SELECTION_ID_ERROR = 0 + , SELECTION_ID_TUNABLE = 1 + , SELECTION_ID_TUNABLES = 2 + , SELECTION_ID_TUNABLE_CONFIRMATION = 3 }; - enum { NUM_SELECTIONS = 4 }; + enum { + NUM_SELECTIONS = 4 + }; enum { - SELECTION_INDEX_ERROR = 0, - SELECTION_INDEX_TUNABLE = 1, - SELECTION_INDEX_TUNABLES = 2, - SELECTION_INDEX_TUNABLE_CONFIRMATION = 3 + SELECTION_INDEX_ERROR = 0 + , SELECTION_INDEX_TUNABLE = 1 + , SELECTION_INDEX_TUNABLES = 2 + , SELECTION_INDEX_TUNABLE_CONFIRMATION = 3 }; // CONSTANTS @@ -21830,242 +22342,243 @@ class ReplicationResult { 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 ReplicationResult(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'ReplicationResult' having the default - // value. Use the optionally specified 'basicAllocator' to supply - // memory. If 'basicAllocator' is 0, the currently installed default - // allocator is used. + explicit ReplicationResult(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'ReplicationResult' having the default + // value. Use the optionally specified 'basicAllocator' to supply + // memory. If 'basicAllocator' is 0, the currently installed default + // allocator is used. ReplicationResult(const ReplicationResult& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'ReplicationResult' 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 'ReplicationResult' 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) ReplicationResult(ReplicationResult&& original) noexcept; - // Create an object of type 'ReplicationResult' 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 'ReplicationResult' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. ReplicationResult(ReplicationResult&& original, - bslma::Allocator* basicAllocator); - // Create an object of type 'ReplicationResult' 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 'ReplicationResult' 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 ~ReplicationResult(); - // Destroy this object. + // Destroy this object. // MANIPULATORS ReplicationResult& operator=(const ReplicationResult& 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) ReplicationResult& operator=(ReplicationResult&& 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). Error& makeError(); Error& makeError(const Error& 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) Error& makeError(Error&& value); #endif - // Set the value of this object to be a "Error" value. Optionally - // specify the 'value' of the "Error". If 'value' is not specified, - // the default "Error" value is used. + // Set the value of this object to be a "Error" value. Optionally + // specify the 'value' of the "Error". If 'value' is not specified, + // the default "Error" value is used. Tunable& makeTunable(); Tunable& makeTunable(const Tunable& 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) Tunable& makeTunable(Tunable&& value); #endif - // Set the value of this object to be a "Tunable" value. Optionally - // specify the 'value' of the "Tunable". If 'value' is not specified, - // the default "Tunable" value is used. + // Set the value of this object to be a "Tunable" value. Optionally + // specify the 'value' of the "Tunable". If 'value' is not specified, + // the default "Tunable" value is used. Tunables& makeTunables(); Tunables& makeTunables(const Tunables& 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) Tunables& makeTunables(Tunables&& value); #endif - // Set the value of this object to be a "Tunables" value. Optionally - // specify the 'value' of the "Tunables". If 'value' is not specified, - // the default "Tunables" value is used. + // Set the value of this object to be a "Tunables" value. Optionally + // specify the 'value' of the "Tunables". If 'value' is not specified, + // the default "Tunables" value is used. TunableConfirmation& makeTunableConfirmation(); - TunableConfirmation& - makeTunableConfirmation(const TunableConfirmation& value); -#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \ - defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) + TunableConfirmation& makeTunableConfirmation(const TunableConfirmation& value); +#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \ + && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) TunableConfirmation& makeTunableConfirmation(TunableConfirmation&& value); #endif - // Set the value of this object to be a "TunableConfirmation" value. - // Optionally specify the 'value' of the "TunableConfirmation". If - // 'value' is not specified, the default "TunableConfirmation" value is - // used. + // Set the value of this object to be a "TunableConfirmation" value. + // Optionally specify the 'value' of the "TunableConfirmation". If + // 'value' is not specified, the default "TunableConfirmation" 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. Error& error(); - // Return a reference to the modifiable "Error" selection of this - // object if "Error" is the current selection. The behavior is - // undefined unless "Error" is the selection of this object. + // Return a reference to the modifiable "Error" selection of this + // object if "Error" is the current selection. The behavior is + // undefined unless "Error" is the selection of this object. Tunable& tunable(); - // Return a reference to the modifiable "Tunable" selection of this - // object if "Tunable" is the current selection. The behavior is - // undefined unless "Tunable" is the selection of this object. + // Return a reference to the modifiable "Tunable" selection of this + // object if "Tunable" is the current selection. The behavior is + // undefined unless "Tunable" is the selection of this object. Tunables& tunables(); - // Return a reference to the modifiable "Tunables" selection of this - // object if "Tunables" is the current selection. The behavior is - // undefined unless "Tunables" is the selection of this object. + // Return a reference to the modifiable "Tunables" selection of this + // object if "Tunables" is the current selection. The behavior is + // undefined unless "Tunables" is the selection of this object. TunableConfirmation& tunableConfirmation(); - // Return a reference to the modifiable "TunableConfirmation" selection - // of this object if "TunableConfirmation" is the current selection. - // The behavior is undefined unless "TunableConfirmation" is the - // selection of this object. + // Return a reference to the modifiable "TunableConfirmation" selection + // of this object if "TunableConfirmation" is the current selection. + // The behavior is undefined unless "TunableConfirmation" 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 Error& error() const; - // Return a reference to the non-modifiable "Error" selection of this - // object if "Error" is the current selection. The behavior is - // undefined unless "Error" is the selection of this object. + // Return a reference to the non-modifiable "Error" selection of this + // object if "Error" is the current selection. The behavior is + // undefined unless "Error" is the selection of this object. const Tunable& tunable() const; - // Return a reference to the non-modifiable "Tunable" selection of this - // object if "Tunable" is the current selection. The behavior is - // undefined unless "Tunable" is the selection of this object. + // Return a reference to the non-modifiable "Tunable" selection of this + // object if "Tunable" is the current selection. The behavior is + // undefined unless "Tunable" is the selection of this object. const Tunables& tunables() const; - // Return a reference to the non-modifiable "Tunables" selection of - // this object if "Tunables" is the current selection. The behavior is - // undefined unless "Tunables" is the selection of this object. + // Return a reference to the non-modifiable "Tunables" selection of + // this object if "Tunables" is the current selection. The behavior is + // undefined unless "Tunables" is the selection of this object. const TunableConfirmation& tunableConfirmation() const; - // Return a reference to the non-modifiable "TunableConfirmation" - // selection of this object if "TunableConfirmation" is the current - // selection. The behavior is undefined unless "TunableConfirmation" - // is the selection of this object. + // Return a reference to the non-modifiable "TunableConfirmation" + // selection of this object if "TunableConfirmation" is the current + // selection. The behavior is undefined unless "TunableConfirmation" + // is the selection of this object. bool isErrorValue() const; - // Return 'true' if the value of this object is a "Error" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Error" value, and + // return 'false' otherwise. bool isTunableValue() const; - // Return 'true' if the value of this object is a "Tunable" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Tunable" value, and + // return 'false' otherwise. bool isTunablesValue() const; - // Return 'true' if the value of this object is a "Tunables" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Tunables" value, and + // return 'false' otherwise. bool isTunableConfirmationValue() const; - // Return 'true' if the value of this object is a "TunableConfirmation" - // value, and return 'false' otherwise. + // Return 'true' if the value of this object is a "TunableConfirmation" + // 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 ReplicationResult& lhs, const ReplicationResult& rhs) - // Return 'true' if the specified 'lhs' and 'rhs' objects have the same - // value, and 'false' otherwise. Two 'ReplicationResult' 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 'ReplicationResult' 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 ReplicationResult& lhs, const ReplicationResult& 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 ReplicationResult& 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); } @@ -22073,10 +22586,10 @@ class ReplicationResult { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const ReplicationResult& 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 - // 'ReplicationResult'. + // 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 + // 'ReplicationResult'. { return object.hashAppendImpl(hashAlg); } @@ -22086,21 +22599,21 @@ class ReplicationResult { // TRAITS -BDLAT_DECL_CHOICE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS( - mqbcmd::ReplicationResult) +BDLAT_DECL_CHOICE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::ReplicationResult) namespace mqbcmd { -// ==================== -// class RouterConsumer -// ==================== + // ==================== + // class RouterConsumer + // ==================== class RouterConsumer { + // INSTANCE DATA - bsl::string d_expression; - QueueHandle d_queueHandle; - unsigned int d_count; - int d_priority; + bsl::string d_expression; + QueueHandle d_queueHandle; + unsigned int d_count; + int d_priority; // PRIVATE ACCESSORS template @@ -22111,19 +22624,21 @@ class RouterConsumer { public: // TYPES enum { - ATTRIBUTE_ID_PRIORITY = 0, - ATTRIBUTE_ID_QUEUE_HANDLE = 1, - ATTRIBUTE_ID_COUNT = 2, - ATTRIBUTE_ID_EXPRESSION = 3 + ATTRIBUTE_ID_PRIORITY = 0 + , ATTRIBUTE_ID_QUEUE_HANDLE = 1 + , ATTRIBUTE_ID_COUNT = 2 + , ATTRIBUTE_ID_EXPRESSION = 3 }; - enum { NUM_ATTRIBUTES = 4 }; + enum { + NUM_ATTRIBUTES = 4 + }; enum { - ATTRIBUTE_INDEX_PRIORITY = 0, - ATTRIBUTE_INDEX_QUEUE_HANDLE = 1, - ATTRIBUTE_INDEX_COUNT = 2, - ATTRIBUTE_INDEX_EXPRESSION = 3 + ATTRIBUTE_INDEX_PRIORITY = 0 + , ATTRIBUTE_INDEX_QUEUE_HANDLE = 1 + , ATTRIBUTE_INDEX_COUNT = 2 + , ATTRIBUTE_INDEX_EXPRESSION = 3 }; // CONSTANTS @@ -22133,189 +22648,191 @@ class RouterConsumer { 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 RouterConsumer(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'RouterConsumer' having the default value. - // Use the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit RouterConsumer(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'RouterConsumer' having the default value. + // Use the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. RouterConsumer(const RouterConsumer& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'RouterConsumer' 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 'RouterConsumer' 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) RouterConsumer(RouterConsumer&& original) noexcept; - // Create an object of type 'RouterConsumer' 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 'RouterConsumer' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - RouterConsumer(RouterConsumer&& original, - bslma::Allocator* basicAllocator); - // Create an object of type 'RouterConsumer' 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. + RouterConsumer(RouterConsumer&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'RouterConsumer' 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 ~RouterConsumer(); - // Destroy this object. + // Destroy this object. // MANIPULATORS RouterConsumer& operator=(const RouterConsumer& 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) RouterConsumer& operator=(RouterConsumer&& 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& priority(); - // Return a reference to the modifiable "Priority" attribute of this - // object. + // Return a reference to the modifiable "Priority" attribute of this + // object. QueueHandle& queueHandle(); - // Return a reference to the modifiable "QueueHandle" attribute of this - // object. + // Return a reference to the modifiable "QueueHandle" attribute of this + // object. unsigned int& count(); - // Return a reference to the modifiable "Count" attribute of this - // object. + // Return a reference to the modifiable "Count" attribute of this + // object. bsl::string& expression(); - // Return a reference to the modifiable "Expression" attribute of this - // object. + // Return a reference to the modifiable "Expression" 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 priority() const; - // Return the value of the "Priority" attribute of this object. + // Return the value of the "Priority" attribute of this object. const QueueHandle& queueHandle() const; - // Return a reference offering non-modifiable access to the - // "QueueHandle" attribute of this object. + // Return a reference offering non-modifiable access to the + // "QueueHandle" attribute of this object. unsigned int count() const; - // Return the value of the "Count" attribute of this object. + // Return the value of the "Count" attribute of this object. const bsl::string& expression() const; - // Return a reference offering non-modifiable access to the - // "Expression" attribute of this object. + // Return a reference offering non-modifiable access to the + // "Expression" attribute of this object. // HIDDEN FRIENDS friend bool operator==(const RouterConsumer& lhs, const RouterConsumer& 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 RouterConsumer& lhs, const RouterConsumer& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const RouterConsumer& 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); } @@ -22323,10 +22840,10 @@ class RouterConsumer { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const RouterConsumer& 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 - // 'RouterConsumer'. + // 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 + // 'RouterConsumer'. { object.hashAppendImpl(hashAlg); } @@ -22336,26 +22853,32 @@ class RouterConsumer { // TRAITS -BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS( - mqbcmd::RouterConsumer) +BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::RouterConsumer) namespace mqbcmd { -// ============= -// class Routing -// ============= + // ============= + // class Routing + // ============= class Routing { + // INSTANCE DATA - bsl::vector d_subscriptionGroups; + bsl::vector d_subscriptionGroups; public: // TYPES - enum { ATTRIBUTE_ID_SUBSCRIPTION_GROUPS = 0 }; + enum { + ATTRIBUTE_ID_SUBSCRIPTION_GROUPS = 0 + }; - enum { NUM_ATTRIBUTES = 1 }; + enum { + NUM_ATTRIBUTES = 1 + }; - enum { ATTRIBUTE_INDEX_SUBSCRIPTION_GROUPS = 0 }; + enum { + ATTRIBUTE_INDEX_SUBSCRIPTION_GROUPS = 0 + }; // CONSTANTS static const char CLASS_NAME[]; @@ -22364,171 +22887,175 @@ class Routing { 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 Routing(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'Routing' having the default value. Use - // the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. - - Routing(const Routing& original, bslma::Allocator* basicAllocator = 0); - // Create an object of type 'Routing' 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 Routing(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'Routing' having the default value. Use + // the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. + + Routing(const Routing& original, + bslma::Allocator *basicAllocator = 0); + // Create an object of type 'Routing' 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) Routing(Routing&& original) noexcept; - // Create an object of type 'Routing' 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 'Routing' having the value of the specified + // 'original' object. After performing this action, the 'original' + // object will be left in a valid, but unspecified state. - Routing(Routing&& original, bslma::Allocator* basicAllocator); - // Create an object of type 'Routing' 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. + Routing(Routing&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'Routing' 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 ~Routing(); - // Destroy this object. + // Destroy this object. // MANIPULATORS Routing& operator=(const Routing& 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) Routing& operator=(Routing&& 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::vector& subscriptionGroups(); - // Return a reference to the modifiable "SubscriptionGroups" attribute - // of this object. + // Return a reference to the modifiable "SubscriptionGroups" 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::vector& subscriptionGroups() const; - // Return a reference offering non-modifiable access to the - // "SubscriptionGroups" attribute of this object. + // Return a reference offering non-modifiable access to the + // "SubscriptionGroups" attribute of this object. // HIDDEN FRIENDS friend bool operator==(const Routing& lhs, const Routing& 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.subscriptionGroups() == rhs.subscriptionGroups(); } friend bool operator!=(const Routing& lhs, const Routing& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const Routing& 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 Routing& 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 'Routing'. + // 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 'Routing'. { using bslh::hashAppend; hashAppend(hashAlg, object.subscriptionGroups()); @@ -22543,22 +23070,23 @@ BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::Routing) namespace mqbcmd { -// ================ -// class StatResult -// ================ + // ================ + // class StatResult + // ================ class StatResult { + // INSTANCE DATA union { - bsls::ObjectBuffer d_error; - bsls::ObjectBuffer d_stats; - bsls::ObjectBuffer d_tunable; - bsls::ObjectBuffer d_tunables; - bsls::ObjectBuffer d_tunableConfirmation; + bsls::ObjectBuffer< Error > d_error; + bsls::ObjectBuffer< bsl::string > d_stats; + bsls::ObjectBuffer< Tunable > d_tunable; + bsls::ObjectBuffer< Tunables > d_tunables; + bsls::ObjectBuffer< TunableConfirmation > d_tunableConfirmation; }; - int d_selectionId; - bslma::Allocator* d_allocator_p; + int d_selectionId; + bslma::Allocator *d_allocator_p; // PRIVATE ACCESSORS template @@ -22570,22 +23098,24 @@ class StatResult { // TYPES enum { - SELECTION_ID_UNDEFINED = -1, - SELECTION_ID_ERROR = 0, - SELECTION_ID_STATS = 1, - SELECTION_ID_TUNABLE = 2, - SELECTION_ID_TUNABLES = 3, - SELECTION_ID_TUNABLE_CONFIRMATION = 4 + SELECTION_ID_UNDEFINED = -1 + , SELECTION_ID_ERROR = 0 + , SELECTION_ID_STATS = 1 + , SELECTION_ID_TUNABLE = 2 + , SELECTION_ID_TUNABLES = 3 + , SELECTION_ID_TUNABLE_CONFIRMATION = 4 }; - enum { NUM_SELECTIONS = 5 }; + enum { + NUM_SELECTIONS = 5 + }; enum { - SELECTION_INDEX_ERROR = 0, - SELECTION_INDEX_STATS = 1, - SELECTION_INDEX_TUNABLE = 2, - SELECTION_INDEX_TUNABLES = 3, - SELECTION_INDEX_TUNABLE_CONFIRMATION = 4 + SELECTION_INDEX_ERROR = 0 + , SELECTION_INDEX_STATS = 1 + , SELECTION_INDEX_TUNABLE = 2 + , SELECTION_INDEX_TUNABLES = 3 + , SELECTION_INDEX_TUNABLE_CONFIRMATION = 4 }; // CONSTANTS @@ -22594,272 +23124,274 @@ class StatResult { 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 StatResult(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'StatResult' having the default value. Use - // the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit StatResult(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'StatResult' having the default value. Use + // the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. StatResult(const StatResult& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'StatResult' 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 'StatResult' 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) StatResult(StatResult&& original) noexcept; - // Create an object of type 'StatResult' 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 'StatResult' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - StatResult(StatResult&& original, bslma::Allocator* basicAllocator); - // Create an object of type 'StatResult' 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. + StatResult(StatResult&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'StatResult' 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 ~StatResult(); - // Destroy this object. + // Destroy this object. // MANIPULATORS StatResult& operator=(const StatResult& 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) StatResult& operator=(StatResult&& 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). Error& makeError(); Error& makeError(const Error& 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) Error& makeError(Error&& value); #endif - // Set the value of this object to be a "Error" value. Optionally - // specify the 'value' of the "Error". If 'value' is not specified, - // the default "Error" value is used. + // Set the value of this object to be a "Error" value. Optionally + // specify the 'value' of the "Error". If 'value' is not specified, + // the default "Error" value is used. bsl::string& makeStats(); bsl::string& makeStats(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& makeStats(bsl::string&& value); #endif - // Set the value of this object to be a "Stats" value. Optionally - // specify the 'value' of the "Stats". If 'value' is not specified, - // the default "Stats" value is used. + // Set the value of this object to be a "Stats" value. Optionally + // specify the 'value' of the "Stats". If 'value' is not specified, + // the default "Stats" value is used. Tunable& makeTunable(); Tunable& makeTunable(const Tunable& 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) Tunable& makeTunable(Tunable&& value); #endif - // Set the value of this object to be a "Tunable" value. Optionally - // specify the 'value' of the "Tunable". If 'value' is not specified, - // the default "Tunable" value is used. + // Set the value of this object to be a "Tunable" value. Optionally + // specify the 'value' of the "Tunable". If 'value' is not specified, + // the default "Tunable" value is used. Tunables& makeTunables(); Tunables& makeTunables(const Tunables& 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) Tunables& makeTunables(Tunables&& value); #endif - // Set the value of this object to be a "Tunables" value. Optionally - // specify the 'value' of the "Tunables". If 'value' is not specified, - // the default "Tunables" value is used. + // Set the value of this object to be a "Tunables" value. Optionally + // specify the 'value' of the "Tunables". If 'value' is not specified, + // the default "Tunables" value is used. TunableConfirmation& makeTunableConfirmation(); - TunableConfirmation& - makeTunableConfirmation(const TunableConfirmation& value); -#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \ - defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) + TunableConfirmation& makeTunableConfirmation(const TunableConfirmation& value); +#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \ + && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) TunableConfirmation& makeTunableConfirmation(TunableConfirmation&& value); #endif - // Set the value of this object to be a "TunableConfirmation" value. - // Optionally specify the 'value' of the "TunableConfirmation". If - // 'value' is not specified, the default "TunableConfirmation" value is - // used. + // Set the value of this object to be a "TunableConfirmation" value. + // Optionally specify the 'value' of the "TunableConfirmation". If + // 'value' is not specified, the default "TunableConfirmation" 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. Error& error(); - // Return a reference to the modifiable "Error" selection of this - // object if "Error" is the current selection. The behavior is - // undefined unless "Error" is the selection of this object. + // Return a reference to the modifiable "Error" selection of this + // object if "Error" is the current selection. The behavior is + // undefined unless "Error" is the selection of this object. bsl::string& stats(); - // Return a reference to the modifiable "Stats" selection of this - // object if "Stats" is the current selection. The behavior is - // undefined unless "Stats" is the selection of this object. + // Return a reference to the modifiable "Stats" selection of this + // object if "Stats" is the current selection. The behavior is + // undefined unless "Stats" is the selection of this object. Tunable& tunable(); - // Return a reference to the modifiable "Tunable" selection of this - // object if "Tunable" is the current selection. The behavior is - // undefined unless "Tunable" is the selection of this object. + // Return a reference to the modifiable "Tunable" selection of this + // object if "Tunable" is the current selection. The behavior is + // undefined unless "Tunable" is the selection of this object. Tunables& tunables(); - // Return a reference to the modifiable "Tunables" selection of this - // object if "Tunables" is the current selection. The behavior is - // undefined unless "Tunables" is the selection of this object. + // Return a reference to the modifiable "Tunables" selection of this + // object if "Tunables" is the current selection. The behavior is + // undefined unless "Tunables" is the selection of this object. TunableConfirmation& tunableConfirmation(); - // Return a reference to the modifiable "TunableConfirmation" selection - // of this object if "TunableConfirmation" is the current selection. - // The behavior is undefined unless "TunableConfirmation" is the - // selection of this object. + // Return a reference to the modifiable "TunableConfirmation" selection + // of this object if "TunableConfirmation" is the current selection. + // The behavior is undefined unless "TunableConfirmation" 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 Error& error() const; - // Return a reference to the non-modifiable "Error" selection of this - // object if "Error" is the current selection. The behavior is - // undefined unless "Error" is the selection of this object. + // Return a reference to the non-modifiable "Error" selection of this + // object if "Error" is the current selection. The behavior is + // undefined unless "Error" is the selection of this object. const bsl::string& stats() const; - // Return a reference to the non-modifiable "Stats" selection of this - // object if "Stats" is the current selection. The behavior is - // undefined unless "Stats" is the selection of this object. + // Return a reference to the non-modifiable "Stats" selection of this + // object if "Stats" is the current selection. The behavior is + // undefined unless "Stats" is the selection of this object. const Tunable& tunable() const; - // Return a reference to the non-modifiable "Tunable" selection of this - // object if "Tunable" is the current selection. The behavior is - // undefined unless "Tunable" is the selection of this object. + // Return a reference to the non-modifiable "Tunable" selection of this + // object if "Tunable" is the current selection. The behavior is + // undefined unless "Tunable" is the selection of this object. const Tunables& tunables() const; - // Return a reference to the non-modifiable "Tunables" selection of - // this object if "Tunables" is the current selection. The behavior is - // undefined unless "Tunables" is the selection of this object. + // Return a reference to the non-modifiable "Tunables" selection of + // this object if "Tunables" is the current selection. The behavior is + // undefined unless "Tunables" is the selection of this object. const TunableConfirmation& tunableConfirmation() const; - // Return a reference to the non-modifiable "TunableConfirmation" - // selection of this object if "TunableConfirmation" is the current - // selection. The behavior is undefined unless "TunableConfirmation" - // is the selection of this object. + // Return a reference to the non-modifiable "TunableConfirmation" + // selection of this object if "TunableConfirmation" is the current + // selection. The behavior is undefined unless "TunableConfirmation" + // is the selection of this object. bool isErrorValue() const; - // Return 'true' if the value of this object is a "Error" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Error" value, and + // return 'false' otherwise. bool isStatsValue() const; - // Return 'true' if the value of this object is a "Stats" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Stats" value, and + // return 'false' otherwise. bool isTunableValue() const; - // Return 'true' if the value of this object is a "Tunable" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Tunable" value, and + // return 'false' otherwise. bool isTunablesValue() const; - // Return 'true' if the value of this object is a "Tunables" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Tunables" value, and + // return 'false' otherwise. bool isTunableConfirmationValue() const; - // Return 'true' if the value of this object is a "TunableConfirmation" - // value, and return 'false' otherwise. + // Return 'true' if the value of this object is a "TunableConfirmation" + // 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 StatResult& lhs, const StatResult& rhs) - // Return 'true' if the specified 'lhs' and 'rhs' objects have the same - // value, and 'false' otherwise. Two 'StatResult' 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 'StatResult' 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 StatResult& lhs, const StatResult& 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 StatResult& 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 StatResult& 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 'StatResult'. + // 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 'StatResult'. { return object.hashAppendImpl(hashAlg); } @@ -22873,22 +23405,23 @@ BDLAT_DECL_CHOICE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::StatResult) namespace mqbcmd { -// ==================== -// class StorageCommand -// ==================== + // ==================== + // class StorageCommand + // ==================== class StorageCommand { + // INSTANCE DATA union { - bsls::ObjectBuffer d_summary; - bsls::ObjectBuffer d_partition; - bsls::ObjectBuffer d_domain; - bsls::ObjectBuffer d_queue; - bsls::ObjectBuffer d_replication; + bsls::ObjectBuffer< Void > d_summary; + bsls::ObjectBuffer< StoragePartition > d_partition; + bsls::ObjectBuffer< StorageDomain > d_domain; + bsls::ObjectBuffer< StorageQueue > d_queue; + bsls::ObjectBuffer< ReplicationCommand > d_replication; }; - int d_selectionId; - bslma::Allocator* d_allocator_p; + int d_selectionId; + bslma::Allocator *d_allocator_p; // PRIVATE ACCESSORS template @@ -22900,22 +23433,24 @@ class StorageCommand { // TYPES enum { - SELECTION_ID_UNDEFINED = -1, - SELECTION_ID_SUMMARY = 0, - SELECTION_ID_PARTITION = 1, - SELECTION_ID_DOMAIN = 2, - SELECTION_ID_QUEUE = 3, - SELECTION_ID_REPLICATION = 4 + SELECTION_ID_UNDEFINED = -1 + , SELECTION_ID_SUMMARY = 0 + , SELECTION_ID_PARTITION = 1 + , SELECTION_ID_DOMAIN = 2 + , SELECTION_ID_QUEUE = 3 + , SELECTION_ID_REPLICATION = 4 }; - enum { NUM_SELECTIONS = 5 }; + enum { + NUM_SELECTIONS = 5 + }; enum { - SELECTION_INDEX_SUMMARY = 0, - SELECTION_INDEX_PARTITION = 1, - SELECTION_INDEX_DOMAIN = 2, - SELECTION_INDEX_QUEUE = 3, - SELECTION_INDEX_REPLICATION = 4 + SELECTION_INDEX_SUMMARY = 0 + , SELECTION_INDEX_PARTITION = 1 + , SELECTION_INDEX_DOMAIN = 2 + , SELECTION_INDEX_QUEUE = 3 + , SELECTION_INDEX_REPLICATION = 4 }; // CONSTANTS @@ -22924,262 +23459,264 @@ class StorageCommand { 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 StorageCommand(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'StorageCommand' having the default value. - // Use the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit StorageCommand(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'StorageCommand' having the default value. + // Use the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. StorageCommand(const StorageCommand& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'StorageCommand' 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 'StorageCommand' 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) StorageCommand(StorageCommand&& original) noexcept; - // Create an object of type 'StorageCommand' 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 'StorageCommand' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - StorageCommand(StorageCommand&& original, - bslma::Allocator* basicAllocator); - // Create an object of type 'StorageCommand' 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. + StorageCommand(StorageCommand&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'StorageCommand' 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 ~StorageCommand(); - // Destroy this object. + // Destroy this object. // MANIPULATORS StorageCommand& operator=(const StorageCommand& 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) StorageCommand& operator=(StorageCommand&& 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). Void& makeSummary(); Void& makeSummary(const Void& 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) Void& makeSummary(Void&& value); #endif - // Set the value of this object to be a "Summary" value. Optionally - // specify the 'value' of the "Summary". If 'value' is not specified, - // the default "Summary" value is used. + // Set the value of this object to be a "Summary" value. Optionally + // specify the 'value' of the "Summary". If 'value' is not specified, + // the default "Summary" value is used. StoragePartition& makePartition(); StoragePartition& makePartition(const StoragePartition& 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) StoragePartition& makePartition(StoragePartition&& value); #endif - // Set the value of this object to be a "Partition" value. Optionally - // specify the 'value' of the "Partition". If 'value' is not - // specified, the default "Partition" value is used. + // Set the value of this object to be a "Partition" value. Optionally + // specify the 'value' of the "Partition". If 'value' is not + // specified, the default "Partition" value is used. StorageDomain& makeDomain(); StorageDomain& makeDomain(const StorageDomain& 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) StorageDomain& makeDomain(StorageDomain&& 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. StorageQueue& makeQueue(); StorageQueue& makeQueue(const StorageQueue& 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) StorageQueue& makeQueue(StorageQueue&& value); #endif - // Set the value of this object to be a "Queue" value. Optionally - // specify the 'value' of the "Queue". If 'value' is not specified, - // the default "Queue" value is used. + // Set the value of this object to be a "Queue" value. Optionally + // specify the 'value' of the "Queue". If 'value' is not specified, + // the default "Queue" value is used. ReplicationCommand& makeReplication(); ReplicationCommand& makeReplication(const ReplicationCommand& 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) ReplicationCommand& makeReplication(ReplicationCommand&& value); #endif - // Set the value of this object to be a "Replication" value. - // Optionally specify the 'value' of the "Replication". If 'value' is - // not specified, the default "Replication" value is used. + // Set the value of this object to be a "Replication" value. + // Optionally specify the 'value' of the "Replication". If 'value' is + // not specified, the default "Replication" 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. Void& summary(); - // Return a reference to the modifiable "Summary" selection of this - // object if "Summary" is the current selection. The behavior is - // undefined unless "Summary" is the selection of this object. + // Return a reference to the modifiable "Summary" selection of this + // object if "Summary" is the current selection. The behavior is + // undefined unless "Summary" is the selection of this object. StoragePartition& partition(); - // Return a reference to the modifiable "Partition" selection of this - // object if "Partition" is the current selection. The behavior is - // undefined unless "Partition" is the selection of this object. + // Return a reference to the modifiable "Partition" selection of this + // object if "Partition" is the current selection. The behavior is + // undefined unless "Partition" is the selection of this object. StorageDomain& 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. StorageQueue& queue(); - // Return a reference to the modifiable "Queue" selection of this - // object if "Queue" is the current selection. The behavior is - // undefined unless "Queue" is the selection of this object. + // Return a reference to the modifiable "Queue" selection of this + // object if "Queue" is the current selection. The behavior is + // undefined unless "Queue" is the selection of this object. ReplicationCommand& replication(); - // Return a reference to the modifiable "Replication" selection of this - // object if "Replication" is the current selection. The behavior is - // undefined unless "Replication" is the selection of this object. + // Return a reference to the modifiable "Replication" selection of this + // object if "Replication" is the current selection. The behavior is + // undefined unless "Replication" 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 Void& summary() const; - // Return a reference to the non-modifiable "Summary" selection of this - // object if "Summary" is the current selection. The behavior is - // undefined unless "Summary" is the selection of this object. + // Return a reference to the non-modifiable "Summary" selection of this + // object if "Summary" is the current selection. The behavior is + // undefined unless "Summary" is the selection of this object. const StoragePartition& partition() const; - // Return a reference to the non-modifiable "Partition" selection of - // this object if "Partition" is the current selection. The behavior - // is undefined unless "Partition" is the selection of this object. + // Return a reference to the non-modifiable "Partition" selection of + // this object if "Partition" is the current selection. The behavior + // is undefined unless "Partition" is the selection of this object. const StorageDomain& 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. const StorageQueue& queue() const; - // Return a reference to the non-modifiable "Queue" selection of this - // object if "Queue" is the current selection. The behavior is - // undefined unless "Queue" is the selection of this object. + // Return a reference to the non-modifiable "Queue" selection of this + // object if "Queue" is the current selection. The behavior is + // undefined unless "Queue" is the selection of this object. const ReplicationCommand& replication() const; - // Return a reference to the non-modifiable "Replication" selection of - // this object if "Replication" is the current selection. The behavior - // is undefined unless "Replication" is the selection of this object. + // Return a reference to the non-modifiable "Replication" selection of + // this object if "Replication" is the current selection. The behavior + // is undefined unless "Replication" is the selection of this object. bool isSummaryValue() const; - // Return 'true' if the value of this object is a "Summary" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Summary" value, and + // return 'false' otherwise. bool isPartitionValue() const; - // Return 'true' if the value of this object is a "Partition" value, - // and return 'false' otherwise. + // Return 'true' if the value of this object is a "Partition" value, + // and return 'false' otherwise. 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 isQueueValue() const; - // Return 'true' if the value of this object is a "Queue" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Queue" value, and + // return 'false' otherwise. bool isReplicationValue() const; - // Return 'true' if the value of this object is a "Replication" value, - // and return 'false' otherwise. + // Return 'true' if the value of this object is a "Replication" 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 StorageCommand& lhs, const StorageCommand& rhs) - // Return 'true' if the specified 'lhs' and 'rhs' objects have the same - // value, and 'false' otherwise. Two 'StorageCommand' 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 'StorageCommand' 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 StorageCommand& lhs, const StorageCommand& 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 StorageCommand& 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); } @@ -23187,10 +23724,10 @@ class StorageCommand { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const StorageCommand& 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 - // 'StorageCommand'. + // 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 + // 'StorageCommand'. { return object.hashAppendImpl(hashAlg); } @@ -23204,22 +23741,23 @@ BDLAT_DECL_CHOICE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::StorageCommand) namespace mqbcmd { -// ==================== -// class ClusterCommand -// ==================== + // ==================== + // class ClusterCommand + // ==================== class ClusterCommand { + // INSTANCE DATA union { - bsls::ObjectBuffer d_status; - bsls::ObjectBuffer d_queueHelper; - bsls::ObjectBuffer d_forceGcQueues; - bsls::ObjectBuffer d_storage; - bsls::ObjectBuffer d_state; + bsls::ObjectBuffer< Void > d_status; + bsls::ObjectBuffer< Void > d_queueHelper; + bsls::ObjectBuffer< Void > d_forceGcQueues; + bsls::ObjectBuffer< StorageCommand > d_storage; + bsls::ObjectBuffer< ClusterStateCommand > d_state; }; - int d_selectionId; - bslma::Allocator* d_allocator_p; + int d_selectionId; + bslma::Allocator *d_allocator_p; // PRIVATE ACCESSORS template @@ -23231,22 +23769,24 @@ class ClusterCommand { // TYPES enum { - SELECTION_ID_UNDEFINED = -1, - SELECTION_ID_STATUS = 0, - SELECTION_ID_QUEUE_HELPER = 1, - SELECTION_ID_FORCE_GC_QUEUES = 2, - SELECTION_ID_STORAGE = 3, - SELECTION_ID_STATE = 4 + SELECTION_ID_UNDEFINED = -1 + , SELECTION_ID_STATUS = 0 + , SELECTION_ID_QUEUE_HELPER = 1 + , SELECTION_ID_FORCE_GC_QUEUES = 2 + , SELECTION_ID_STORAGE = 3 + , SELECTION_ID_STATE = 4 }; - enum { NUM_SELECTIONS = 5 }; + enum { + NUM_SELECTIONS = 5 + }; enum { - SELECTION_INDEX_STATUS = 0, - SELECTION_INDEX_QUEUE_HELPER = 1, - SELECTION_INDEX_FORCE_GC_QUEUES = 2, - SELECTION_INDEX_STORAGE = 3, - SELECTION_INDEX_STATE = 4 + SELECTION_INDEX_STATUS = 0 + , SELECTION_INDEX_QUEUE_HELPER = 1 + , SELECTION_INDEX_FORCE_GC_QUEUES = 2 + , SELECTION_INDEX_STORAGE = 3 + , SELECTION_INDEX_STATE = 4 }; // CONSTANTS @@ -23255,264 +23795,266 @@ class ClusterCommand { 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 ClusterCommand(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'ClusterCommand' having the default value. - // Use the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit ClusterCommand(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'ClusterCommand' having the default value. + // Use the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. ClusterCommand(const ClusterCommand& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'ClusterCommand' 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 'ClusterCommand' 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) ClusterCommand(ClusterCommand&& original) noexcept; - // Create an object of type 'ClusterCommand' 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 'ClusterCommand' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - ClusterCommand(ClusterCommand&& original, - bslma::Allocator* basicAllocator); - // Create an object of type 'ClusterCommand' 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. + ClusterCommand(ClusterCommand&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'ClusterCommand' 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 ~ClusterCommand(); - // Destroy this object. + // Destroy this object. // MANIPULATORS ClusterCommand& operator=(const ClusterCommand& 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) ClusterCommand& operator=(ClusterCommand&& 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). Void& makeStatus(); Void& makeStatus(const Void& 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) Void& makeStatus(Void&& value); #endif - // Set the value of this object to be a "Status" value. Optionally - // specify the 'value' of the "Status". If 'value' is not specified, - // the default "Status" value is used. + // Set the value of this object to be a "Status" value. Optionally + // specify the 'value' of the "Status". If 'value' is not specified, + // the default "Status" value is used. Void& makeQueueHelper(); Void& makeQueueHelper(const Void& 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) Void& makeQueueHelper(Void&& value); #endif - // Set the value of this object to be a "QueueHelper" value. - // Optionally specify the 'value' of the "QueueHelper". If 'value' is - // not specified, the default "QueueHelper" value is used. + // Set the value of this object to be a "QueueHelper" value. + // Optionally specify the 'value' of the "QueueHelper". If 'value' is + // not specified, the default "QueueHelper" value is used. Void& makeForceGcQueues(); Void& makeForceGcQueues(const Void& 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) Void& makeForceGcQueues(Void&& value); #endif - // Set the value of this object to be a "ForceGcQueues" value. - // Optionally specify the 'value' of the "ForceGcQueues". If 'value' - // is not specified, the default "ForceGcQueues" value is used. + // Set the value of this object to be a "ForceGcQueues" value. + // Optionally specify the 'value' of the "ForceGcQueues". If 'value' + // is not specified, the default "ForceGcQueues" value is used. StorageCommand& makeStorage(); StorageCommand& makeStorage(const StorageCommand& 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) StorageCommand& makeStorage(StorageCommand&& value); #endif - // Set the value of this object to be a "Storage" value. Optionally - // specify the 'value' of the "Storage". If 'value' is not specified, - // the default "Storage" value is used. + // Set the value of this object to be a "Storage" value. Optionally + // specify the 'value' of the "Storage". If 'value' is not specified, + // the default "Storage" value is used. ClusterStateCommand& makeState(); ClusterStateCommand& makeState(const ClusterStateCommand& 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) ClusterStateCommand& makeState(ClusterStateCommand&& value); #endif - // Set the value of this object to be a "State" value. Optionally - // specify the 'value' of the "State". If 'value' is not specified, - // the default "State" value is used. + // Set the value of this object to be a "State" value. Optionally + // specify the 'value' of the "State". If 'value' is not specified, + // the default "State" 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. Void& status(); - // Return a reference to the modifiable "Status" selection of this - // object if "Status" is the current selection. The behavior is - // undefined unless "Status" is the selection of this object. + // Return a reference to the modifiable "Status" selection of this + // object if "Status" is the current selection. The behavior is + // undefined unless "Status" is the selection of this object. Void& queueHelper(); - // Return a reference to the modifiable "QueueHelper" selection of this - // object if "QueueHelper" is the current selection. The behavior is - // undefined unless "QueueHelper" is the selection of this object. + // Return a reference to the modifiable "QueueHelper" selection of this + // object if "QueueHelper" is the current selection. The behavior is + // undefined unless "QueueHelper" is the selection of this object. Void& forceGcQueues(); - // Return a reference to the modifiable "ForceGcQueues" selection of - // this object if "ForceGcQueues" is the current selection. The - // behavior is undefined unless "ForceGcQueues" is the selection of - // this object. + // Return a reference to the modifiable "ForceGcQueues" selection of + // this object if "ForceGcQueues" is the current selection. The + // behavior is undefined unless "ForceGcQueues" is the selection of + // this object. StorageCommand& storage(); - // Return a reference to the modifiable "Storage" selection of this - // object if "Storage" is the current selection. The behavior is - // undefined unless "Storage" is the selection of this object. + // Return a reference to the modifiable "Storage" selection of this + // object if "Storage" is the current selection. The behavior is + // undefined unless "Storage" is the selection of this object. ClusterStateCommand& state(); - // Return a reference to the modifiable "State" selection of this - // object if "State" is the current selection. The behavior is - // undefined unless "State" is the selection of this object. + // Return a reference to the modifiable "State" selection of this + // object if "State" is the current selection. The behavior is + // undefined unless "State" 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 Void& status() const; - // Return a reference to the non-modifiable "Status" selection of this - // object if "Status" is the current selection. The behavior is - // undefined unless "Status" is the selection of this object. + // Return a reference to the non-modifiable "Status" selection of this + // object if "Status" is the current selection. The behavior is + // undefined unless "Status" is the selection of this object. const Void& queueHelper() const; - // Return a reference to the non-modifiable "QueueHelper" selection of - // this object if "QueueHelper" is the current selection. The behavior - // is undefined unless "QueueHelper" is the selection of this object. + // Return a reference to the non-modifiable "QueueHelper" selection of + // this object if "QueueHelper" is the current selection. The behavior + // is undefined unless "QueueHelper" is the selection of this object. const Void& forceGcQueues() const; - // Return a reference to the non-modifiable "ForceGcQueues" selection - // of this object if "ForceGcQueues" is the current selection. The - // behavior is undefined unless "ForceGcQueues" is the selection of - // this object. + // Return a reference to the non-modifiable "ForceGcQueues" selection + // of this object if "ForceGcQueues" is the current selection. The + // behavior is undefined unless "ForceGcQueues" is the selection of + // this object. const StorageCommand& storage() const; - // Return a reference to the non-modifiable "Storage" selection of this - // object if "Storage" is the current selection. The behavior is - // undefined unless "Storage" is the selection of this object. + // Return a reference to the non-modifiable "Storage" selection of this + // object if "Storage" is the current selection. The behavior is + // undefined unless "Storage" is the selection of this object. const ClusterStateCommand& state() const; - // Return a reference to the non-modifiable "State" selection of this - // object if "State" is the current selection. The behavior is - // undefined unless "State" is the selection of this object. + // Return a reference to the non-modifiable "State" selection of this + // object if "State" is the current selection. The behavior is + // undefined unless "State" is the selection of this object. bool isStatusValue() const; - // Return 'true' if the value of this object is a "Status" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Status" value, and + // return 'false' otherwise. bool isQueueHelperValue() const; - // Return 'true' if the value of this object is a "QueueHelper" value, - // and return 'false' otherwise. + // Return 'true' if the value of this object is a "QueueHelper" value, + // and return 'false' otherwise. bool isForceGcQueuesValue() const; - // Return 'true' if the value of this object is a "ForceGcQueues" - // value, and return 'false' otherwise. + // Return 'true' if the value of this object is a "ForceGcQueues" + // value, and return 'false' otherwise. bool isStorageValue() const; - // Return 'true' if the value of this object is a "Storage" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Storage" value, and + // return 'false' otherwise. bool isStateValue() const; - // Return 'true' if the value of this object is a "State" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "State" 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 ClusterCommand& lhs, const ClusterCommand& rhs) - // Return 'true' if the specified 'lhs' and 'rhs' objects have the same - // value, and 'false' otherwise. Two 'ClusterCommand' 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 'ClusterCommand' 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 ClusterCommand& lhs, const ClusterCommand& 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 ClusterCommand& 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); } @@ -23520,10 +24062,10 @@ class ClusterCommand { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const ClusterCommand& 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 - // 'ClusterCommand'. + // 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 + // 'ClusterCommand'. { return object.hashAppendImpl(hashAlg); } @@ -23537,21 +24079,22 @@ BDLAT_DECL_CHOICE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::ClusterCommand) namespace mqbcmd { -// =================== -// class ClusterStatus -// =================== + // =================== + // class ClusterStatus + // =================== class ClusterStatus { + // INSTANCE DATA - bsl::string d_name; - bsl::string d_description; - bsl::string d_selfNodeDescription; - StorageContent d_queuesInfo; - PartitionsInfo d_partitionsInfo; - NodeStatuses d_nodeStatuses; - ElectorInfo d_electorInfo; - ClusterStorageSummary d_clusterStorageSummary; - bool d_isHealthy; + bsl::string d_name; + bsl::string d_description; + bsl::string d_selfNodeDescription; + StorageContent d_queuesInfo; + PartitionsInfo d_partitionsInfo; + NodeStatuses d_nodeStatuses; + ElectorInfo d_electorInfo; + ClusterStorageSummary d_clusterStorageSummary; + bool d_isHealthy; // PRIVATE ACCESSORS template @@ -23562,29 +24105,31 @@ class ClusterStatus { public: // TYPES enum { - ATTRIBUTE_ID_NAME = 0, - ATTRIBUTE_ID_DESCRIPTION = 1, - ATTRIBUTE_ID_SELF_NODE_DESCRIPTION = 2, - ATTRIBUTE_ID_IS_HEALTHY = 3, - ATTRIBUTE_ID_NODE_STATUSES = 4, - ATTRIBUTE_ID_ELECTOR_INFO = 5, - ATTRIBUTE_ID_PARTITIONS_INFO = 6, - ATTRIBUTE_ID_QUEUES_INFO = 7, - ATTRIBUTE_ID_CLUSTER_STORAGE_SUMMARY = 8 + ATTRIBUTE_ID_NAME = 0 + , ATTRIBUTE_ID_DESCRIPTION = 1 + , ATTRIBUTE_ID_SELF_NODE_DESCRIPTION = 2 + , ATTRIBUTE_ID_IS_HEALTHY = 3 + , ATTRIBUTE_ID_NODE_STATUSES = 4 + , ATTRIBUTE_ID_ELECTOR_INFO = 5 + , ATTRIBUTE_ID_PARTITIONS_INFO = 6 + , ATTRIBUTE_ID_QUEUES_INFO = 7 + , ATTRIBUTE_ID_CLUSTER_STORAGE_SUMMARY = 8 }; - enum { NUM_ATTRIBUTES = 9 }; + enum { + NUM_ATTRIBUTES = 9 + }; enum { - ATTRIBUTE_INDEX_NAME = 0, - ATTRIBUTE_INDEX_DESCRIPTION = 1, - ATTRIBUTE_INDEX_SELF_NODE_DESCRIPTION = 2, - ATTRIBUTE_INDEX_IS_HEALTHY = 3, - ATTRIBUTE_INDEX_NODE_STATUSES = 4, - ATTRIBUTE_INDEX_ELECTOR_INFO = 5, - ATTRIBUTE_INDEX_PARTITIONS_INFO = 6, - ATTRIBUTE_INDEX_QUEUES_INFO = 7, - ATTRIBUTE_INDEX_CLUSTER_STORAGE_SUMMARY = 8 + ATTRIBUTE_INDEX_NAME = 0 + , ATTRIBUTE_INDEX_DESCRIPTION = 1 + , ATTRIBUTE_INDEX_SELF_NODE_DESCRIPTION = 2 + , ATTRIBUTE_INDEX_IS_HEALTHY = 3 + , ATTRIBUTE_INDEX_NODE_STATUSES = 4 + , ATTRIBUTE_INDEX_ELECTOR_INFO = 5 + , ATTRIBUTE_INDEX_PARTITIONS_INFO = 6 + , ATTRIBUTE_INDEX_QUEUES_INFO = 7 + , ATTRIBUTE_INDEX_CLUSTER_STORAGE_SUMMARY = 8 }; // CONSTANTS @@ -23594,227 +24139,230 @@ class ClusterStatus { 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 ClusterStatus(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'ClusterStatus' having the default value. - // Use the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit ClusterStatus(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'ClusterStatus' having the default value. + // Use the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. ClusterStatus(const ClusterStatus& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'ClusterStatus' 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 'ClusterStatus' 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) ClusterStatus(ClusterStatus&& original) noexcept; - // Create an object of type 'ClusterStatus' 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 'ClusterStatus' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - ClusterStatus(ClusterStatus&& original, bslma::Allocator* basicAllocator); - // Create an object of type 'ClusterStatus' 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. + ClusterStatus(ClusterStatus&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'ClusterStatus' 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 ~ClusterStatus(); - // Destroy this object. + // Destroy this object. // MANIPULATORS ClusterStatus& operator=(const ClusterStatus& 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) ClusterStatus& operator=(ClusterStatus&& 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. 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. bsl::string& selfNodeDescription(); - // Return a reference to the modifiable "SelfNodeDescription" attribute - // of this object. + // Return a reference to the modifiable "SelfNodeDescription" attribute + // of this object. bool& isHealthy(); - // Return a reference to the modifiable "IsHealthy" attribute of this - // object. + // Return a reference to the modifiable "IsHealthy" attribute of this + // object. NodeStatuses& nodeStatuses(); - // Return a reference to the modifiable "NodeStatuses" attribute of - // this object. + // Return a reference to the modifiable "NodeStatuses" attribute of + // this object. ElectorInfo& electorInfo(); - // Return a reference to the modifiable "ElectorInfo" attribute of this - // object. + // Return a reference to the modifiable "ElectorInfo" attribute of this + // object. PartitionsInfo& partitionsInfo(); - // Return a reference to the modifiable "PartitionsInfo" attribute of - // this object. + // Return a reference to the modifiable "PartitionsInfo" attribute of + // this object. StorageContent& queuesInfo(); - // Return a reference to the modifiable "QueuesInfo" attribute of this - // object. + // Return a reference to the modifiable "QueuesInfo" attribute of this + // object. ClusterStorageSummary& clusterStorageSummary(); - // Return a reference to the modifiable "ClusterStorageSummary" - // attribute of this object. + // Return a reference to the modifiable "ClusterStorageSummary" + // 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. 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. const bsl::string& selfNodeDescription() const; - // Return a reference offering non-modifiable access to the - // "SelfNodeDescription" attribute of this object. + // Return a reference offering non-modifiable access to the + // "SelfNodeDescription" attribute of this object. bool isHealthy() const; - // Return the value of the "IsHealthy" attribute of this object. + // Return the value of the "IsHealthy" attribute of this object. const NodeStatuses& nodeStatuses() const; - // Return a reference offering non-modifiable access to the - // "NodeStatuses" attribute of this object. + // Return a reference offering non-modifiable access to the + // "NodeStatuses" attribute of this object. const ElectorInfo& electorInfo() const; - // Return a reference offering non-modifiable access to the - // "ElectorInfo" attribute of this object. + // Return a reference offering non-modifiable access to the + // "ElectorInfo" attribute of this object. const PartitionsInfo& partitionsInfo() const; - // Return a reference offering non-modifiable access to the - // "PartitionsInfo" attribute of this object. + // Return a reference offering non-modifiable access to the + // "PartitionsInfo" attribute of this object. const StorageContent& queuesInfo() const; - // Return a reference offering non-modifiable access to the - // "QueuesInfo" attribute of this object. + // Return a reference offering non-modifiable access to the + // "QueuesInfo" attribute of this object. const ClusterStorageSummary& clusterStorageSummary() const; - // Return a reference offering non-modifiable access to the - // "ClusterStorageSummary" attribute of this object. + // Return a reference offering non-modifiable access to the + // "ClusterStorageSummary" attribute of this object. // HIDDEN FRIENDS friend bool operator==(const ClusterStatus& lhs, const ClusterStatus& 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 ClusterStatus& lhs, const ClusterStatus& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const ClusterStatus& 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); } @@ -23822,10 +24370,10 @@ class ClusterStatus { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const ClusterStatus& 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 - // 'ClusterStatus'. + // 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 + // 'ClusterStatus'. { object.hashAppendImpl(hashAlg); } @@ -23835,25 +24383,25 @@ class ClusterStatus { // TRAITS -BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS( - mqbcmd::ClusterStatus) +BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::ClusterStatus) namespace mqbcmd { -// ==================== -// class DomainsCommand -// ==================== + // ==================== + // class DomainsCommand + // ==================== class DomainsCommand { + // INSTANCE DATA union { - bsls::ObjectBuffer d_domain; - bsls::ObjectBuffer d_resolver; - bsls::ObjectBuffer d_reconfigure; + bsls::ObjectBuffer< Domain > d_domain; + bsls::ObjectBuffer< DomainResolverCommand > d_resolver; + bsls::ObjectBuffer< DomainReconfigure > d_reconfigure; }; - int d_selectionId; - bslma::Allocator* d_allocator_p; + int d_selectionId; + bslma::Allocator *d_allocator_p; // PRIVATE ACCESSORS template @@ -23865,18 +24413,20 @@ class DomainsCommand { // TYPES enum { - SELECTION_ID_UNDEFINED = -1, - SELECTION_ID_DOMAIN = 0, - SELECTION_ID_RESOLVER = 1, - SELECTION_ID_RECONFIGURE = 2 + SELECTION_ID_UNDEFINED = -1 + , SELECTION_ID_DOMAIN = 0 + , SELECTION_ID_RESOLVER = 1 + , SELECTION_ID_RECONFIGURE = 2 }; - enum { NUM_SELECTIONS = 3 }; + enum { + NUM_SELECTIONS = 3 + }; enum { - SELECTION_INDEX_DOMAIN = 0, - SELECTION_INDEX_RESOLVER = 1, - SELECTION_INDEX_RECONFIGURE = 2 + SELECTION_INDEX_DOMAIN = 0 + , SELECTION_INDEX_RESOLVER = 1 + , SELECTION_INDEX_RECONFIGURE = 2 }; // CONSTANTS @@ -23885,214 +24435,216 @@ class DomainsCommand { 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 DomainsCommand(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'DomainsCommand' having the default value. - // Use the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit DomainsCommand(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'DomainsCommand' having the default value. + // Use the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. DomainsCommand(const DomainsCommand& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'DomainsCommand' 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 'DomainsCommand' 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) DomainsCommand(DomainsCommand&& original) noexcept; - // Create an object of type 'DomainsCommand' 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 'DomainsCommand' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - DomainsCommand(DomainsCommand&& original, - bslma::Allocator* basicAllocator); - // Create an object of type 'DomainsCommand' 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. + DomainsCommand(DomainsCommand&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'DomainsCommand' 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 ~DomainsCommand(); - // Destroy this object. + // Destroy this object. // MANIPULATORS DomainsCommand& operator=(const DomainsCommand& 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) DomainsCommand& operator=(DomainsCommand&& 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). Domain& makeDomain(); Domain& makeDomain(const Domain& 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) Domain& makeDomain(Domain&& 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. DomainResolverCommand& makeResolver(); DomainResolverCommand& makeResolver(const DomainResolverCommand& 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) DomainResolverCommand& makeResolver(DomainResolverCommand&& value); #endif - // Set the value of this object to be a "Resolver" value. Optionally - // specify the 'value' of the "Resolver". If 'value' is not specified, - // the default "Resolver" value is used. + // Set the value of this object to be a "Resolver" value. Optionally + // specify the 'value' of the "Resolver". If 'value' is not specified, + // the default "Resolver" value is used. DomainReconfigure& makeReconfigure(); DomainReconfigure& makeReconfigure(const DomainReconfigure& 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) DomainReconfigure& makeReconfigure(DomainReconfigure&& value); #endif - // Set the value of this object to be a "Reconfigure" value. - // Optionally specify the 'value' of the "Reconfigure". If 'value' is - // not specified, the default "Reconfigure" value is used. + // Set the value of this object to be a "Reconfigure" value. + // Optionally specify the 'value' of the "Reconfigure". If 'value' is + // not specified, the default "Reconfigure" 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. Domain& 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. DomainResolverCommand& resolver(); - // Return a reference to the modifiable "Resolver" selection of this - // object if "Resolver" is the current selection. The behavior is - // undefined unless "Resolver" is the selection of this object. + // Return a reference to the modifiable "Resolver" selection of this + // object if "Resolver" is the current selection. The behavior is + // undefined unless "Resolver" is the selection of this object. DomainReconfigure& reconfigure(); - // Return a reference to the modifiable "Reconfigure" selection of this - // object if "Reconfigure" is the current selection. The behavior is - // undefined unless "Reconfigure" is the selection of this object. + // Return a reference to the modifiable "Reconfigure" selection of this + // object if "Reconfigure" is the current selection. The behavior is + // undefined unless "Reconfigure" 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 Domain& 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. const DomainResolverCommand& resolver() const; - // Return a reference to the non-modifiable "Resolver" selection of - // this object if "Resolver" is the current selection. The behavior is - // undefined unless "Resolver" is the selection of this object. + // Return a reference to the non-modifiable "Resolver" selection of + // this object if "Resolver" is the current selection. The behavior is + // undefined unless "Resolver" is the selection of this object. const DomainReconfigure& reconfigure() const; - // Return a reference to the non-modifiable "Reconfigure" selection of - // this object if "Reconfigure" is the current selection. The behavior - // is undefined unless "Reconfigure" is the selection of this object. + // Return a reference to the non-modifiable "Reconfigure" selection of + // this object if "Reconfigure" is the current selection. The behavior + // is undefined unless "Reconfigure" 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 isResolverValue() const; - // Return 'true' if the value of this object is a "Resolver" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Resolver" value, and + // return 'false' otherwise. bool isReconfigureValue() const; - // Return 'true' if the value of this object is a "Reconfigure" value, - // and return 'false' otherwise. + // Return 'true' if the value of this object is a "Reconfigure" 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 DomainsCommand& lhs, const DomainsCommand& rhs) - // Return 'true' if the specified 'lhs' and 'rhs' objects have the same - // value, and 'false' otherwise. Two 'DomainsCommand' 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 'DomainsCommand' 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 DomainsCommand& lhs, const DomainsCommand& 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 DomainsCommand& 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); } @@ -24100,10 +24652,10 @@ class DomainsCommand { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const DomainsCommand& 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 - // 'DomainsCommand'. + // 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 + // 'DomainsCommand'. { return object.hashAppendImpl(hashAlg); } @@ -24117,21 +24669,28 @@ BDLAT_DECL_CHOICE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::DomainsCommand) namespace mqbcmd { -// ====================== -// class RoundRobinRouter -// ====================== + // ====================== + // class RoundRobinRouter + // ====================== class RoundRobinRouter { + // INSTANCE DATA - bsl::vector d_consumers; + bsl::vector d_consumers; public: // TYPES - enum { ATTRIBUTE_ID_CONSUMERS = 0 }; + enum { + ATTRIBUTE_ID_CONSUMERS = 0 + }; - enum { NUM_ATTRIBUTES = 1 }; + enum { + NUM_ATTRIBUTES = 1 + }; - enum { ATTRIBUTE_INDEX_CONSUMERS = 0 }; + enum { + ATTRIBUTE_INDEX_CONSUMERS = 0 + }; // CONSTANTS static const char CLASS_NAME[]; @@ -24140,167 +24699,169 @@ class RoundRobinRouter { 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 RoundRobinRouter(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'RoundRobinRouter' having the default - // value. Use the optionally specified 'basicAllocator' to supply - // memory. If 'basicAllocator' is 0, the currently installed default - // allocator is used. + explicit RoundRobinRouter(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'RoundRobinRouter' having the default + // value. Use the optionally specified 'basicAllocator' to supply + // memory. If 'basicAllocator' is 0, the currently installed default + // allocator is used. RoundRobinRouter(const RoundRobinRouter& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'RoundRobinRouter' 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 'RoundRobinRouter' 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) RoundRobinRouter(RoundRobinRouter&& original) noexcept; - // Create an object of type 'RoundRobinRouter' 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 'RoundRobinRouter' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. RoundRobinRouter(RoundRobinRouter&& original, - bslma::Allocator* basicAllocator); - // Create an object of type 'RoundRobinRouter' 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 'RoundRobinRouter' 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 ~RoundRobinRouter(); - // Destroy this object. + // Destroy this object. // MANIPULATORS RoundRobinRouter& operator=(const RoundRobinRouter& 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) RoundRobinRouter& operator=(RoundRobinRouter&& 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::vector& consumers(); - // Return a reference to the modifiable "Consumers" attribute of this - // object. + // Return a reference to the modifiable "Consumers" 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::vector& consumers() const; - // Return a reference offering non-modifiable access to the "Consumers" - // attribute of this object. + // Return a reference offering non-modifiable access to the "Consumers" + // attribute of this object. // HIDDEN FRIENDS friend bool operator==(const RoundRobinRouter& lhs, const RoundRobinRouter& 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.consumers() == rhs.consumers(); } friend bool operator!=(const RoundRobinRouter& lhs, const RoundRobinRouter& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const RoundRobinRouter& 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); } @@ -24308,10 +24869,10 @@ class RoundRobinRouter { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const RoundRobinRouter& 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 - // 'RoundRobinRouter'. + // 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 + // 'RoundRobinRouter'. { using bslh::hashAppend; hashAppend(hashAlg, object.consumers()); @@ -24322,28 +24883,28 @@ class RoundRobinRouter { // TRAITS -BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS( - mqbcmd::RoundRobinRouter) +BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::RoundRobinRouter) namespace mqbcmd { -// =================== -// class StorageResult -// =================== + // =================== + // class StorageResult + // =================== class StorageResult { + // INSTANCE DATA union { - bsls::ObjectBuffer d_success; - bsls::ObjectBuffer d_error; - bsls::ObjectBuffer d_storageContent; - bsls::ObjectBuffer d_clusterStorageSummary; - bsls::ObjectBuffer d_replicationResult; - bsls::ObjectBuffer d_purgedQueues; + bsls::ObjectBuffer< Void > d_success; + bsls::ObjectBuffer< Error > d_error; + bsls::ObjectBuffer< StorageContent > d_storageContent; + bsls::ObjectBuffer< ClusterStorageSummary > d_clusterStorageSummary; + bsls::ObjectBuffer< ReplicationResult > d_replicationResult; + bsls::ObjectBuffer< PurgedQueues > d_purgedQueues; }; - int d_selectionId; - bslma::Allocator* d_allocator_p; + int d_selectionId; + bslma::Allocator *d_allocator_p; // PRIVATE ACCESSORS template @@ -24355,24 +24916,26 @@ class StorageResult { // TYPES enum { - SELECTION_ID_UNDEFINED = -1, - SELECTION_ID_SUCCESS = 0, - SELECTION_ID_ERROR = 1, - SELECTION_ID_STORAGE_CONTENT = 2, - SELECTION_ID_CLUSTER_STORAGE_SUMMARY = 3, - SELECTION_ID_REPLICATION_RESULT = 4, - SELECTION_ID_PURGED_QUEUES = 5 + SELECTION_ID_UNDEFINED = -1 + , SELECTION_ID_SUCCESS = 0 + , SELECTION_ID_ERROR = 1 + , SELECTION_ID_STORAGE_CONTENT = 2 + , SELECTION_ID_CLUSTER_STORAGE_SUMMARY = 3 + , SELECTION_ID_REPLICATION_RESULT = 4 + , SELECTION_ID_PURGED_QUEUES = 5 }; - enum { NUM_SELECTIONS = 6 }; + enum { + NUM_SELECTIONS = 6 + }; enum { - SELECTION_INDEX_SUCCESS = 0, - SELECTION_INDEX_ERROR = 1, - SELECTION_INDEX_STORAGE_CONTENT = 2, - SELECTION_INDEX_CLUSTER_STORAGE_SUMMARY = 3, - SELECTION_INDEX_REPLICATION_RESULT = 4, - SELECTION_INDEX_PURGED_QUEUES = 5 + SELECTION_INDEX_SUCCESS = 0 + , SELECTION_INDEX_ERROR = 1 + , SELECTION_INDEX_STORAGE_CONTENT = 2 + , SELECTION_INDEX_CLUSTER_STORAGE_SUMMARY = 3 + , SELECTION_INDEX_REPLICATION_RESULT = 4 + , SELECTION_INDEX_PURGED_QUEUES = 5 }; // CONSTANTS @@ -24381,295 +24944,296 @@ class StorageResult { 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 StorageResult(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'StorageResult' having the default value. - // Use the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit StorageResult(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'StorageResult' having the default value. + // Use the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. StorageResult(const StorageResult& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'StorageResult' 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 'StorageResult' 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) StorageResult(StorageResult&& original) noexcept; - // Create an object of type 'StorageResult' 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 'StorageResult' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - StorageResult(StorageResult&& original, bslma::Allocator* basicAllocator); - // Create an object of type 'StorageResult' 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. + StorageResult(StorageResult&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'StorageResult' 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 ~StorageResult(); - // Destroy this object. + // Destroy this object. // MANIPULATORS StorageResult& operator=(const StorageResult& 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) StorageResult& operator=(StorageResult&& 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). Void& makeSuccess(); Void& makeSuccess(const Void& 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) Void& makeSuccess(Void&& value); #endif - // Set the value of this object to be a "Success" value. Optionally - // specify the 'value' of the "Success". If 'value' is not specified, - // the default "Success" value is used. + // Set the value of this object to be a "Success" value. Optionally + // specify the 'value' of the "Success". If 'value' is not specified, + // the default "Success" value is used. Error& makeError(); Error& makeError(const Error& 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) Error& makeError(Error&& value); #endif - // Set the value of this object to be a "Error" value. Optionally - // specify the 'value' of the "Error". If 'value' is not specified, - // the default "Error" value is used. + // Set the value of this object to be a "Error" value. Optionally + // specify the 'value' of the "Error". If 'value' is not specified, + // the default "Error" value is used. StorageContent& makeStorageContent(); StorageContent& makeStorageContent(const StorageContent& 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) StorageContent& makeStorageContent(StorageContent&& value); #endif - // Set the value of this object to be a "StorageContent" value. - // Optionally specify the 'value' of the "StorageContent". If 'value' - // is not specified, the default "StorageContent" value is used. + // Set the value of this object to be a "StorageContent" value. + // Optionally specify the 'value' of the "StorageContent". If 'value' + // is not specified, the default "StorageContent" value is used. ClusterStorageSummary& makeClusterStorageSummary(); - ClusterStorageSummary& - makeClusterStorageSummary(const ClusterStorageSummary& value); -#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \ - defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) - ClusterStorageSummary& - makeClusterStorageSummary(ClusterStorageSummary&& value); -#endif - // Set the value of this object to be a "ClusterStorageSummary" value. - // Optionally specify the 'value' of the "ClusterStorageSummary". If - // 'value' is not specified, the default "ClusterStorageSummary" value - // is used. + ClusterStorageSummary& makeClusterStorageSummary(const ClusterStorageSummary& value); +#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \ + && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) + ClusterStorageSummary& makeClusterStorageSummary(ClusterStorageSummary&& value); +#endif + // Set the value of this object to be a "ClusterStorageSummary" value. + // Optionally specify the 'value' of the "ClusterStorageSummary". If + // 'value' is not specified, the default "ClusterStorageSummary" value + // is used. ReplicationResult& makeReplicationResult(); ReplicationResult& makeReplicationResult(const ReplicationResult& 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) ReplicationResult& makeReplicationResult(ReplicationResult&& value); #endif - // Set the value of this object to be a "ReplicationResult" value. - // Optionally specify the 'value' of the "ReplicationResult". If - // 'value' is not specified, the default "ReplicationResult" value is - // used. + // Set the value of this object to be a "ReplicationResult" value. + // Optionally specify the 'value' of the "ReplicationResult". If + // 'value' is not specified, the default "ReplicationResult" value is + // used. PurgedQueues& makePurgedQueues(); PurgedQueues& makePurgedQueues(const PurgedQueues& 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) PurgedQueues& makePurgedQueues(PurgedQueues&& value); #endif - // Set the value of this object to be a "PurgedQueues" value. - // Optionally specify the 'value' of the "PurgedQueues". If 'value' is - // not specified, the default "PurgedQueues" value is used. + // Set the value of this object to be a "PurgedQueues" value. + // Optionally specify the 'value' of the "PurgedQueues". If 'value' is + // not specified, the default "PurgedQueues" 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. Void& success(); - // Return a reference to the modifiable "Success" selection of this - // object if "Success" is the current selection. The behavior is - // undefined unless "Success" is the selection of this object. + // Return a reference to the modifiable "Success" selection of this + // object if "Success" is the current selection. The behavior is + // undefined unless "Success" is the selection of this object. Error& error(); - // Return a reference to the modifiable "Error" selection of this - // object if "Error" is the current selection. The behavior is - // undefined unless "Error" is the selection of this object. + // Return a reference to the modifiable "Error" selection of this + // object if "Error" is the current selection. The behavior is + // undefined unless "Error" is the selection of this object. StorageContent& storageContent(); - // Return a reference to the modifiable "StorageContent" selection of - // this object if "StorageContent" is the current selection. The - // behavior is undefined unless "StorageContent" is the selection of - // this object. + // Return a reference to the modifiable "StorageContent" selection of + // this object if "StorageContent" is the current selection. The + // behavior is undefined unless "StorageContent" is the selection of + // this object. ClusterStorageSummary& clusterStorageSummary(); - // Return a reference to the modifiable "ClusterStorageSummary" - // selection of this object if "ClusterStorageSummary" is the current - // selection. The behavior is undefined unless "ClusterStorageSummary" - // is the selection of this object. + // Return a reference to the modifiable "ClusterStorageSummary" + // selection of this object if "ClusterStorageSummary" is the current + // selection. The behavior is undefined unless "ClusterStorageSummary" + // is the selection of this object. ReplicationResult& replicationResult(); - // Return a reference to the modifiable "ReplicationResult" selection - // of this object if "ReplicationResult" is the current selection. The - // behavior is undefined unless "ReplicationResult" is the selection of - // this object. + // Return a reference to the modifiable "ReplicationResult" selection + // of this object if "ReplicationResult" is the current selection. The + // behavior is undefined unless "ReplicationResult" is the selection of + // this object. PurgedQueues& purgedQueues(); - // Return a reference to the modifiable "PurgedQueues" selection of - // this object if "PurgedQueues" is the current selection. The - // behavior is undefined unless "PurgedQueues" is the selection of this - // object. + // Return a reference to the modifiable "PurgedQueues" selection of + // this object if "PurgedQueues" is the current selection. The + // behavior is undefined unless "PurgedQueues" 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 Void& success() const; - // Return a reference to the non-modifiable "Success" selection of this - // object if "Success" is the current selection. The behavior is - // undefined unless "Success" is the selection of this object. + // Return a reference to the non-modifiable "Success" selection of this + // object if "Success" is the current selection. The behavior is + // undefined unless "Success" is the selection of this object. const Error& error() const; - // Return a reference to the non-modifiable "Error" selection of this - // object if "Error" is the current selection. The behavior is - // undefined unless "Error" is the selection of this object. + // Return a reference to the non-modifiable "Error" selection of this + // object if "Error" is the current selection. The behavior is + // undefined unless "Error" is the selection of this object. const StorageContent& storageContent() const; - // Return a reference to the non-modifiable "StorageContent" selection - // of this object if "StorageContent" is the current selection. The - // behavior is undefined unless "StorageContent" is the selection of - // this object. + // Return a reference to the non-modifiable "StorageContent" selection + // of this object if "StorageContent" is the current selection. The + // behavior is undefined unless "StorageContent" is the selection of + // this object. const ClusterStorageSummary& clusterStorageSummary() const; - // Return a reference to the non-modifiable "ClusterStorageSummary" - // selection of this object if "ClusterStorageSummary" is the current - // selection. The behavior is undefined unless "ClusterStorageSummary" - // is the selection of this object. + // Return a reference to the non-modifiable "ClusterStorageSummary" + // selection of this object if "ClusterStorageSummary" is the current + // selection. The behavior is undefined unless "ClusterStorageSummary" + // is the selection of this object. const ReplicationResult& replicationResult() const; - // Return a reference to the non-modifiable "ReplicationResult" - // selection of this object if "ReplicationResult" is the current - // selection. The behavior is undefined unless "ReplicationResult" is - // the selection of this object. + // Return a reference to the non-modifiable "ReplicationResult" + // selection of this object if "ReplicationResult" is the current + // selection. The behavior is undefined unless "ReplicationResult" is + // the selection of this object. const PurgedQueues& purgedQueues() const; - // Return a reference to the non-modifiable "PurgedQueues" selection of - // this object if "PurgedQueues" is the current selection. The - // behavior is undefined unless "PurgedQueues" is the selection of this - // object. + // Return a reference to the non-modifiable "PurgedQueues" selection of + // this object if "PurgedQueues" is the current selection. The + // behavior is undefined unless "PurgedQueues" is the selection of this + // object. bool isSuccessValue() const; - // Return 'true' if the value of this object is a "Success" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Success" value, and + // return 'false' otherwise. bool isErrorValue() const; - // Return 'true' if the value of this object is a "Error" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Error" value, and + // return 'false' otherwise. bool isStorageContentValue() const; - // Return 'true' if the value of this object is a "StorageContent" - // value, and return 'false' otherwise. + // Return 'true' if the value of this object is a "StorageContent" + // value, and return 'false' otherwise. bool isClusterStorageSummaryValue() const; - // Return 'true' if the value of this object is a - // "ClusterStorageSummary" value, and return 'false' otherwise. + // Return 'true' if the value of this object is a + // "ClusterStorageSummary" value, and return 'false' otherwise. bool isReplicationResultValue() const; - // Return 'true' if the value of this object is a "ReplicationResult" - // value, and return 'false' otherwise. + // Return 'true' if the value of this object is a "ReplicationResult" + // value, and return 'false' otherwise. bool isPurgedQueuesValue() const; - // Return 'true' if the value of this object is a "PurgedQueues" value, - // and return 'false' otherwise. + // Return 'true' if the value of this object is a "PurgedQueues" 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 StorageResult& lhs, const StorageResult& rhs) - // Return 'true' if the specified 'lhs' and 'rhs' objects have the same - // value, and 'false' otherwise. Two 'StorageResult' 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 'StorageResult' 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 StorageResult& lhs, const StorageResult& 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 StorageResult& 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); } @@ -24677,10 +25241,10 @@ class StorageResult { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const StorageResult& 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 - // 'StorageResult'. + // 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 + // 'StorageResult'. { return object.hashAppendImpl(hashAlg); } @@ -24694,16 +25258,17 @@ BDLAT_DECL_CHOICE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::StorageResult) namespace mqbcmd { -// ============== -// class AppState -// ============== + // ============== + // class AppState + // ============== class AppState { + // INSTANCE DATA - bsls::Types::Int64 d_redeliveryListLength; - bsl::string d_appId; - RoundRobinRouter d_roundRobinRouter; - unsigned int d_numConsumers; + bsls::Types::Int64 d_redeliveryListLength; + bsl::string d_appId; + RoundRobinRouter d_roundRobinRouter; + unsigned int d_numConsumers; // PRIVATE ACCESSORS template @@ -24714,19 +25279,21 @@ class AppState { public: // TYPES enum { - ATTRIBUTE_ID_APP_ID = 0, - ATTRIBUTE_ID_NUM_CONSUMERS = 1, - ATTRIBUTE_ID_REDELIVERY_LIST_LENGTH = 2, - ATTRIBUTE_ID_ROUND_ROBIN_ROUTER = 3 + ATTRIBUTE_ID_APP_ID = 0 + , ATTRIBUTE_ID_NUM_CONSUMERS = 1 + , ATTRIBUTE_ID_REDELIVERY_LIST_LENGTH = 2 + , ATTRIBUTE_ID_ROUND_ROBIN_ROUTER = 3 }; - enum { NUM_ATTRIBUTES = 4 }; + enum { + NUM_ATTRIBUTES = 4 + }; enum { - ATTRIBUTE_INDEX_APP_ID = 0, - ATTRIBUTE_INDEX_NUM_CONSUMERS = 1, - ATTRIBUTE_INDEX_REDELIVERY_LIST_LENGTH = 2, - ATTRIBUTE_INDEX_ROUND_ROBIN_ROUTER = 3 + ATTRIBUTE_INDEX_APP_ID = 0 + , ATTRIBUTE_INDEX_NUM_CONSUMERS = 1 + , ATTRIBUTE_INDEX_REDELIVERY_LIST_LENGTH = 2 + , ATTRIBUTE_INDEX_ROUND_ROBIN_ROUTER = 3 }; // CONSTANTS @@ -24736,194 +25303,198 @@ class AppState { 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 AppState(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'AppState' having the default value. Use - // the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. - - AppState(const AppState& original, bslma::Allocator* basicAllocator = 0); - // Create an object of type 'AppState' 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 AppState(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'AppState' having the default value. Use + // the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. + + AppState(const AppState& original, + bslma::Allocator *basicAllocator = 0); + // Create an object of type 'AppState' 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) AppState(AppState&& original) noexcept; - // Create an object of type 'AppState' 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 'AppState' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - AppState(AppState&& original, bslma::Allocator* basicAllocator); - // Create an object of type 'AppState' 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. + AppState(AppState&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'AppState' 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 ~AppState(); - // Destroy this object. + // Destroy this object. // MANIPULATORS AppState& operator=(const AppState& 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) AppState& operator=(AppState&& 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. unsigned int& numConsumers(); - // Return a reference to the modifiable "NumConsumers" attribute of - // this object. + // Return a reference to the modifiable "NumConsumers" attribute of + // this object. bsls::Types::Int64& redeliveryListLength(); - // Return a reference to the modifiable "RedeliveryListLength" - // attribute of this object. + // Return a reference to the modifiable "RedeliveryListLength" + // attribute of this object. RoundRobinRouter& roundRobinRouter(); - // Return a reference to the modifiable "RoundRobinRouter" attribute of - // this object. + // Return a reference to the modifiable "RoundRobinRouter" 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. unsigned int numConsumers() const; - // Return the value of the "NumConsumers" attribute of this object. + // Return the value of the "NumConsumers" attribute of this object. bsls::Types::Int64 redeliveryListLength() const; - // Return the value of the "RedeliveryListLength" attribute of this - // object. + // Return the value of the "RedeliveryListLength" attribute of this + // object. const RoundRobinRouter& roundRobinRouter() const; - // Return a reference offering non-modifiable access to the - // "RoundRobinRouter" attribute of this object. + // Return a reference offering non-modifiable access to the + // "RoundRobinRouter" attribute of this object. // HIDDEN FRIENDS friend bool operator==(const AppState& lhs, const AppState& 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 AppState& lhs, const AppState& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const AppState& 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 AppState& 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 'AppState'. + // 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 'AppState'. { object.hashAppendImpl(hashAlg); } @@ -24937,22 +25508,31 @@ BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::AppState) namespace mqbcmd { -// ============= -// class Cluster -// ============= + // ============= + // class Cluster + // ============= class Cluster { + // INSTANCE DATA - bsl::string d_name; - ClusterCommand d_command; + bsl::string d_name; + ClusterCommand d_command; public: // TYPES - enum { ATTRIBUTE_ID_NAME = 0, ATTRIBUTE_ID_COMMAND = 1 }; + enum { + ATTRIBUTE_ID_NAME = 0 + , ATTRIBUTE_ID_COMMAND = 1 + }; - enum { NUM_ATTRIBUTES = 2 }; + enum { + NUM_ATTRIBUTES = 2 + }; - enum { ATTRIBUTE_INDEX_NAME = 0, ATTRIBUTE_INDEX_COMMAND = 1 }; + enum { + ATTRIBUTE_INDEX_NAME = 0 + , ATTRIBUTE_INDEX_COMMAND = 1 + }; // CONSTANTS static const char CLASS_NAME[]; @@ -24961,179 +25541,184 @@ class Cluster { 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 Cluster(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'Cluster' having the default value. Use - // the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. - - Cluster(const Cluster& original, bslma::Allocator* basicAllocator = 0); - // Create an object of type 'Cluster' 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 Cluster(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'Cluster' having the default value. Use + // the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. + + Cluster(const Cluster& original, + bslma::Allocator *basicAllocator = 0); + // Create an object of type 'Cluster' 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) Cluster(Cluster&& original) noexcept; - // Create an object of type 'Cluster' 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 'Cluster' having the value of the specified + // 'original' object. After performing this action, the 'original' + // object will be left in a valid, but unspecified state. - Cluster(Cluster&& original, bslma::Allocator* basicAllocator); - // Create an object of type 'Cluster' 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. + Cluster(Cluster&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'Cluster' 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 ~Cluster(); - // Destroy this object. + // Destroy this object. // MANIPULATORS Cluster& operator=(const Cluster& 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) Cluster& operator=(Cluster&& 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. ClusterCommand& command(); - // Return a reference to the modifiable "Command" attribute of this - // object. + // Return a reference to the modifiable "Command" 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. const ClusterCommand& 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. // HIDDEN FRIENDS friend bool operator==(const Cluster& lhs, const Cluster& 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.command() == rhs.command(); + return lhs.name() == rhs.name() && + lhs.command() == rhs.command(); } friend bool operator!=(const Cluster& lhs, const Cluster& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const Cluster& 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 Cluster& 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 'Cluster'. + // 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 'Cluster'. { using bslh::hashAppend; hashAppend(hashAlg, object.name()); @@ -25149,24 +25734,25 @@ BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::Cluster) namespace mqbcmd { -// =================== -// class ClusterResult -// =================== + // =================== + // class ClusterResult + // =================== class ClusterResult { + // INSTANCE DATA union { - bsls::ObjectBuffer d_error; - bsls::ObjectBuffer d_success; - bsls::ObjectBuffer d_electorResult; - bsls::ObjectBuffer d_storageResult; - bsls::ObjectBuffer d_clusterQueueHelper; - bsls::ObjectBuffer d_clusterStatus; - bsls::ObjectBuffer d_clusterProxyStatus; + bsls::ObjectBuffer< Error > d_error; + bsls::ObjectBuffer< Void > d_success; + bsls::ObjectBuffer< ElectorResult > d_electorResult; + bsls::ObjectBuffer< StorageResult > d_storageResult; + bsls::ObjectBuffer< ClusterQueueHelper > d_clusterQueueHelper; + bsls::ObjectBuffer< ClusterStatus > d_clusterStatus; + bsls::ObjectBuffer< ClusterProxyStatus > d_clusterProxyStatus; }; - int d_selectionId; - bslma::Allocator* d_allocator_p; + int d_selectionId; + bslma::Allocator *d_allocator_p; // PRIVATE ACCESSORS template @@ -25178,26 +25764,28 @@ class ClusterResult { // TYPES enum { - SELECTION_ID_UNDEFINED = -1, - SELECTION_ID_ERROR = 0, - SELECTION_ID_SUCCESS = 1, - SELECTION_ID_ELECTOR_RESULT = 2, - SELECTION_ID_STORAGE_RESULT = 3, - SELECTION_ID_CLUSTER_QUEUE_HELPER = 4, - SELECTION_ID_CLUSTER_STATUS = 5, - SELECTION_ID_CLUSTER_PROXY_STATUS = 6 + SELECTION_ID_UNDEFINED = -1 + , SELECTION_ID_ERROR = 0 + , SELECTION_ID_SUCCESS = 1 + , SELECTION_ID_ELECTOR_RESULT = 2 + , SELECTION_ID_STORAGE_RESULT = 3 + , SELECTION_ID_CLUSTER_QUEUE_HELPER = 4 + , SELECTION_ID_CLUSTER_STATUS = 5 + , SELECTION_ID_CLUSTER_PROXY_STATUS = 6 }; - enum { NUM_SELECTIONS = 7 }; + enum { + NUM_SELECTIONS = 7 + }; enum { - SELECTION_INDEX_ERROR = 0, - SELECTION_INDEX_SUCCESS = 1, - SELECTION_INDEX_ELECTOR_RESULT = 2, - SELECTION_INDEX_STORAGE_RESULT = 3, - SELECTION_INDEX_CLUSTER_QUEUE_HELPER = 4, - SELECTION_INDEX_CLUSTER_STATUS = 5, - SELECTION_INDEX_CLUSTER_PROXY_STATUS = 6 + SELECTION_INDEX_ERROR = 0 + , SELECTION_INDEX_SUCCESS = 1 + , SELECTION_INDEX_ELECTOR_RESULT = 2 + , SELECTION_INDEX_STORAGE_RESULT = 3 + , SELECTION_INDEX_CLUSTER_QUEUE_HELPER = 4 + , SELECTION_INDEX_CLUSTER_STATUS = 5 + , SELECTION_INDEX_CLUSTER_PROXY_STATUS = 6 }; // CONSTANTS @@ -25206,321 +25794,322 @@ class ClusterResult { 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 ClusterResult(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'ClusterResult' having the default value. - // Use the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit ClusterResult(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'ClusterResult' having the default value. + // Use the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. ClusterResult(const ClusterResult& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'ClusterResult' 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 'ClusterResult' 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) ClusterResult(ClusterResult&& original) noexcept; - // Create an object of type 'ClusterResult' 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 'ClusterResult' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - ClusterResult(ClusterResult&& original, bslma::Allocator* basicAllocator); - // Create an object of type 'ClusterResult' 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. + ClusterResult(ClusterResult&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'ClusterResult' 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 ~ClusterResult(); - // Destroy this object. + // Destroy this object. // MANIPULATORS ClusterResult& operator=(const ClusterResult& 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) ClusterResult& operator=(ClusterResult&& 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). Error& makeError(); Error& makeError(const Error& 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) Error& makeError(Error&& value); #endif - // Set the value of this object to be a "Error" value. Optionally - // specify the 'value' of the "Error". If 'value' is not specified, - // the default "Error" value is used. + // Set the value of this object to be a "Error" value. Optionally + // specify the 'value' of the "Error". If 'value' is not specified, + // the default "Error" value is used. Void& makeSuccess(); Void& makeSuccess(const Void& 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) Void& makeSuccess(Void&& value); #endif - // Set the value of this object to be a "Success" value. Optionally - // specify the 'value' of the "Success". If 'value' is not specified, - // the default "Success" value is used. + // Set the value of this object to be a "Success" value. Optionally + // specify the 'value' of the "Success". If 'value' is not specified, + // the default "Success" value is used. ElectorResult& makeElectorResult(); ElectorResult& makeElectorResult(const ElectorResult& 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) ElectorResult& makeElectorResult(ElectorResult&& value); #endif - // Set the value of this object to be a "ElectorResult" value. - // Optionally specify the 'value' of the "ElectorResult". If 'value' - // is not specified, the default "ElectorResult" value is used. + // Set the value of this object to be a "ElectorResult" value. + // Optionally specify the 'value' of the "ElectorResult". If 'value' + // is not specified, the default "ElectorResult" value is used. StorageResult& makeStorageResult(); StorageResult& makeStorageResult(const StorageResult& 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) StorageResult& makeStorageResult(StorageResult&& value); #endif - // Set the value of this object to be a "StorageResult" value. - // Optionally specify the 'value' of the "StorageResult". If 'value' - // is not specified, the default "StorageResult" value is used. + // Set the value of this object to be a "StorageResult" value. + // Optionally specify the 'value' of the "StorageResult". If 'value' + // is not specified, the default "StorageResult" value is used. ClusterQueueHelper& makeClusterQueueHelper(); - ClusterQueueHelper& - makeClusterQueueHelper(const ClusterQueueHelper& value); -#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \ - defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) + ClusterQueueHelper& makeClusterQueueHelper(const ClusterQueueHelper& value); +#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \ + && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) ClusterQueueHelper& makeClusterQueueHelper(ClusterQueueHelper&& value); #endif - // Set the value of this object to be a "ClusterQueueHelper" value. - // Optionally specify the 'value' of the "ClusterQueueHelper". If - // 'value' is not specified, the default "ClusterQueueHelper" value is - // used. + // Set the value of this object to be a "ClusterQueueHelper" value. + // Optionally specify the 'value' of the "ClusterQueueHelper". If + // 'value' is not specified, the default "ClusterQueueHelper" value is + // used. ClusterStatus& makeClusterStatus(); ClusterStatus& makeClusterStatus(const ClusterStatus& 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) ClusterStatus& makeClusterStatus(ClusterStatus&& value); #endif - // Set the value of this object to be a "ClusterStatus" value. - // Optionally specify the 'value' of the "ClusterStatus". If 'value' - // is not specified, the default "ClusterStatus" value is used. + // Set the value of this object to be a "ClusterStatus" value. + // Optionally specify the 'value' of the "ClusterStatus". If 'value' + // is not specified, the default "ClusterStatus" value is used. ClusterProxyStatus& makeClusterProxyStatus(); - ClusterProxyStatus& - makeClusterProxyStatus(const ClusterProxyStatus& value); -#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \ - defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) + ClusterProxyStatus& makeClusterProxyStatus(const ClusterProxyStatus& value); +#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \ + && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) ClusterProxyStatus& makeClusterProxyStatus(ClusterProxyStatus&& value); #endif - // Set the value of this object to be a "ClusterProxyStatus" value. - // Optionally specify the 'value' of the "ClusterProxyStatus". If - // 'value' is not specified, the default "ClusterProxyStatus" value is - // used. + // Set the value of this object to be a "ClusterProxyStatus" value. + // Optionally specify the 'value' of the "ClusterProxyStatus". If + // 'value' is not specified, the default "ClusterProxyStatus" 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. Error& error(); - // Return a reference to the modifiable "Error" selection of this - // object if "Error" is the current selection. The behavior is - // undefined unless "Error" is the selection of this object. + // Return a reference to the modifiable "Error" selection of this + // object if "Error" is the current selection. The behavior is + // undefined unless "Error" is the selection of this object. Void& success(); - // Return a reference to the modifiable "Success" selection of this - // object if "Success" is the current selection. The behavior is - // undefined unless "Success" is the selection of this object. + // Return a reference to the modifiable "Success" selection of this + // object if "Success" is the current selection. The behavior is + // undefined unless "Success" is the selection of this object. ElectorResult& electorResult(); - // Return a reference to the modifiable "ElectorResult" selection of - // this object if "ElectorResult" is the current selection. The - // behavior is undefined unless "ElectorResult" is the selection of - // this object. + // Return a reference to the modifiable "ElectorResult" selection of + // this object if "ElectorResult" is the current selection. The + // behavior is undefined unless "ElectorResult" is the selection of + // this object. StorageResult& storageResult(); - // Return a reference to the modifiable "StorageResult" selection of - // this object if "StorageResult" is the current selection. The - // behavior is undefined unless "StorageResult" is the selection of - // this object. + // Return a reference to the modifiable "StorageResult" selection of + // this object if "StorageResult" is the current selection. The + // behavior is undefined unless "StorageResult" is the selection of + // this object. ClusterQueueHelper& clusterQueueHelper(); - // Return a reference to the modifiable "ClusterQueueHelper" selection - // of this object if "ClusterQueueHelper" is the current selection. - // The behavior is undefined unless "ClusterQueueHelper" is the - // selection of this object. + // Return a reference to the modifiable "ClusterQueueHelper" selection + // of this object if "ClusterQueueHelper" is the current selection. + // The behavior is undefined unless "ClusterQueueHelper" is the + // selection of this object. ClusterStatus& clusterStatus(); - // Return a reference to the modifiable "ClusterStatus" selection of - // this object if "ClusterStatus" is the current selection. The - // behavior is undefined unless "ClusterStatus" is the selection of - // this object. + // Return a reference to the modifiable "ClusterStatus" selection of + // this object if "ClusterStatus" is the current selection. The + // behavior is undefined unless "ClusterStatus" is the selection of + // this object. ClusterProxyStatus& clusterProxyStatus(); - // Return a reference to the modifiable "ClusterProxyStatus" selection - // of this object if "ClusterProxyStatus" is the current selection. - // The behavior is undefined unless "ClusterProxyStatus" is the - // selection of this object. + // Return a reference to the modifiable "ClusterProxyStatus" selection + // of this object if "ClusterProxyStatus" is the current selection. + // The behavior is undefined unless "ClusterProxyStatus" 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 Error& error() const; - // Return a reference to the non-modifiable "Error" selection of this - // object if "Error" is the current selection. The behavior is - // undefined unless "Error" is the selection of this object. + // Return a reference to the non-modifiable "Error" selection of this + // object if "Error" is the current selection. The behavior is + // undefined unless "Error" is the selection of this object. const Void& success() const; - // Return a reference to the non-modifiable "Success" selection of this - // object if "Success" is the current selection. The behavior is - // undefined unless "Success" is the selection of this object. + // Return a reference to the non-modifiable "Success" selection of this + // object if "Success" is the current selection. The behavior is + // undefined unless "Success" is the selection of this object. const ElectorResult& electorResult() const; - // Return a reference to the non-modifiable "ElectorResult" selection - // of this object if "ElectorResult" is the current selection. The - // behavior is undefined unless "ElectorResult" is the selection of - // this object. + // Return a reference to the non-modifiable "ElectorResult" selection + // of this object if "ElectorResult" is the current selection. The + // behavior is undefined unless "ElectorResult" is the selection of + // this object. const StorageResult& storageResult() const; - // Return a reference to the non-modifiable "StorageResult" selection - // of this object if "StorageResult" is the current selection. The - // behavior is undefined unless "StorageResult" is the selection of - // this object. + // Return a reference to the non-modifiable "StorageResult" selection + // of this object if "StorageResult" is the current selection. The + // behavior is undefined unless "StorageResult" is the selection of + // this object. const ClusterQueueHelper& clusterQueueHelper() const; - // Return a reference to the non-modifiable "ClusterQueueHelper" - // selection of this object if "ClusterQueueHelper" is the current - // selection. The behavior is undefined unless "ClusterQueueHelper" is - // the selection of this object. + // Return a reference to the non-modifiable "ClusterQueueHelper" + // selection of this object if "ClusterQueueHelper" is the current + // selection. The behavior is undefined unless "ClusterQueueHelper" is + // the selection of this object. const ClusterStatus& clusterStatus() const; - // Return a reference to the non-modifiable "ClusterStatus" selection - // of this object if "ClusterStatus" is the current selection. The - // behavior is undefined unless "ClusterStatus" is the selection of - // this object. + // Return a reference to the non-modifiable "ClusterStatus" selection + // of this object if "ClusterStatus" is the current selection. The + // behavior is undefined unless "ClusterStatus" is the selection of + // this object. const ClusterProxyStatus& clusterProxyStatus() const; - // Return a reference to the non-modifiable "ClusterProxyStatus" - // selection of this object if "ClusterProxyStatus" is the current - // selection. The behavior is undefined unless "ClusterProxyStatus" is - // the selection of this object. + // Return a reference to the non-modifiable "ClusterProxyStatus" + // selection of this object if "ClusterProxyStatus" is the current + // selection. The behavior is undefined unless "ClusterProxyStatus" is + // the selection of this object. bool isErrorValue() const; - // Return 'true' if the value of this object is a "Error" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Error" value, and + // return 'false' otherwise. bool isSuccessValue() const; - // Return 'true' if the value of this object is a "Success" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Success" value, and + // return 'false' otherwise. bool isElectorResultValue() const; - // Return 'true' if the value of this object is a "ElectorResult" - // value, and return 'false' otherwise. + // Return 'true' if the value of this object is a "ElectorResult" + // value, and return 'false' otherwise. bool isStorageResultValue() const; - // Return 'true' if the value of this object is a "StorageResult" - // value, and return 'false' otherwise. + // Return 'true' if the value of this object is a "StorageResult" + // value, and return 'false' otherwise. bool isClusterQueueHelperValue() const; - // Return 'true' if the value of this object is a "ClusterQueueHelper" - // value, and return 'false' otherwise. + // Return 'true' if the value of this object is a "ClusterQueueHelper" + // value, and return 'false' otherwise. bool isClusterStatusValue() const; - // Return 'true' if the value of this object is a "ClusterStatus" - // value, and return 'false' otherwise. + // Return 'true' if the value of this object is a "ClusterStatus" + // value, and return 'false' otherwise. bool isClusterProxyStatusValue() const; - // Return 'true' if the value of this object is a "ClusterProxyStatus" - // value, and return 'false' otherwise. + // Return 'true' if the value of this object is a "ClusterProxyStatus" + // 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 ClusterResult& lhs, const ClusterResult& rhs) - // Return 'true' if the specified 'lhs' and 'rhs' objects have the same - // value, and 'false' otherwise. Two 'ClusterResult' 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 'ClusterResult' 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 ClusterResult& lhs, const ClusterResult& 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 ClusterResult& 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); } @@ -25528,10 +26117,10 @@ class ClusterResult { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const ClusterResult& 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 - // 'ClusterResult'. + // 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 + // 'ClusterResult'. { return object.hashAppendImpl(hashAlg); } @@ -25545,20 +26134,21 @@ BDLAT_DECL_CHOICE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::ClusterResult) namespace mqbcmd { -// ===================== -// class ClustersCommand -// ===================== + // ===================== + // class ClustersCommand + // ===================== class ClustersCommand { + // INSTANCE DATA union { - bsls::ObjectBuffer d_list; - bsls::ObjectBuffer d_addReverseProxy; - bsls::ObjectBuffer d_cluster; + bsls::ObjectBuffer< Void > d_list; + bsls::ObjectBuffer< AddReverseProxy > d_addReverseProxy; + bsls::ObjectBuffer< Cluster > d_cluster; }; - int d_selectionId; - bslma::Allocator* d_allocator_p; + int d_selectionId; + bslma::Allocator *d_allocator_p; // PRIVATE ACCESSORS template @@ -25570,18 +26160,20 @@ class ClustersCommand { // TYPES enum { - SELECTION_ID_UNDEFINED = -1, - SELECTION_ID_LIST = 0, - SELECTION_ID_ADD_REVERSE_PROXY = 1, - SELECTION_ID_CLUSTER = 2 + SELECTION_ID_UNDEFINED = -1 + , SELECTION_ID_LIST = 0 + , SELECTION_ID_ADD_REVERSE_PROXY = 1 + , SELECTION_ID_CLUSTER = 2 }; - enum { NUM_SELECTIONS = 3 }; + enum { + NUM_SELECTIONS = 3 + }; enum { - SELECTION_INDEX_LIST = 0, - SELECTION_INDEX_ADD_REVERSE_PROXY = 1, - SELECTION_INDEX_CLUSTER = 2 + SELECTION_INDEX_LIST = 0 + , SELECTION_INDEX_ADD_REVERSE_PROXY = 1 + , SELECTION_INDEX_CLUSTER = 2 }; // CONSTANTS @@ -25590,216 +26182,218 @@ class ClustersCommand { 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 ClustersCommand(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'ClustersCommand' having the default value. - // Use the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit ClustersCommand(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'ClustersCommand' having the default value. + // Use the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. ClustersCommand(const ClustersCommand& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'ClustersCommand' 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 'ClustersCommand' 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) ClustersCommand(ClustersCommand&& original) noexcept; - // Create an object of type 'ClustersCommand' 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 'ClustersCommand' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. ClustersCommand(ClustersCommand&& original, - bslma::Allocator* basicAllocator); - // Create an object of type 'ClustersCommand' 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 'ClustersCommand' 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 ~ClustersCommand(); - // Destroy this object. + // Destroy this object. // MANIPULATORS ClustersCommand& operator=(const ClustersCommand& 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) ClustersCommand& operator=(ClustersCommand&& 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). Void& makeList(); Void& makeList(const Void& 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) Void& makeList(Void&& value); #endif - // Set the value of this object to be a "List" value. Optionally - // specify the 'value' of the "List". If 'value' is not specified, the - // default "List" value is used. + // Set the value of this object to be a "List" value. Optionally + // specify the 'value' of the "List". If 'value' is not specified, the + // default "List" value is used. AddReverseProxy& makeAddReverseProxy(); AddReverseProxy& makeAddReverseProxy(const AddReverseProxy& 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) AddReverseProxy& makeAddReverseProxy(AddReverseProxy&& value); #endif - // Set the value of this object to be a "AddReverseProxy" value. - // Optionally specify the 'value' of the "AddReverseProxy". If 'value' - // is not specified, the default "AddReverseProxy" value is used. + // Set the value of this object to be a "AddReverseProxy" value. + // Optionally specify the 'value' of the "AddReverseProxy". If 'value' + // is not specified, the default "AddReverseProxy" value is used. Cluster& makeCluster(); Cluster& makeCluster(const Cluster& 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) Cluster& makeCluster(Cluster&& value); #endif - // Set the value of this object to be a "Cluster" value. Optionally - // specify the 'value' of the "Cluster". If 'value' is not specified, - // the default "Cluster" value is used. + // Set the value of this object to be a "Cluster" value. Optionally + // specify the 'value' of the "Cluster". If 'value' is not specified, + // the default "Cluster" 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. Void& list(); - // Return a reference to the modifiable "List" selection of this object - // if "List" is the current selection. The behavior is undefined - // unless "List" is the selection of this object. + // Return a reference to the modifiable "List" selection of this object + // if "List" is the current selection. The behavior is undefined + // unless "List" is the selection of this object. AddReverseProxy& addReverseProxy(); - // Return a reference to the modifiable "AddReverseProxy" selection of - // this object if "AddReverseProxy" is the current selection. The - // behavior is undefined unless "AddReverseProxy" is the selection of - // this object. + // Return a reference to the modifiable "AddReverseProxy" selection of + // this object if "AddReverseProxy" is the current selection. The + // behavior is undefined unless "AddReverseProxy" is the selection of + // this object. Cluster& cluster(); - // Return a reference to the modifiable "Cluster" selection of this - // object if "Cluster" is the current selection. The behavior is - // undefined unless "Cluster" is the selection of this object. + // Return a reference to the modifiable "Cluster" selection of this + // object if "Cluster" is the current selection. The behavior is + // undefined unless "Cluster" 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 Void& list() const; - // Return a reference to the non-modifiable "List" selection of this - // object if "List" is the current selection. The behavior is - // undefined unless "List" is the selection of this object. + // Return a reference to the non-modifiable "List" selection of this + // object if "List" is the current selection. The behavior is + // undefined unless "List" is the selection of this object. const AddReverseProxy& addReverseProxy() const; - // Return a reference to the non-modifiable "AddReverseProxy" selection - // of this object if "AddReverseProxy" is the current selection. The - // behavior is undefined unless "AddReverseProxy" is the selection of - // this object. + // Return a reference to the non-modifiable "AddReverseProxy" selection + // of this object if "AddReverseProxy" is the current selection. The + // behavior is undefined unless "AddReverseProxy" is the selection of + // this object. const Cluster& cluster() const; - // Return a reference to the non-modifiable "Cluster" selection of this - // object if "Cluster" is the current selection. The behavior is - // undefined unless "Cluster" is the selection of this object. + // Return a reference to the non-modifiable "Cluster" selection of this + // object if "Cluster" is the current selection. The behavior is + // undefined unless "Cluster" is the selection of this object. bool isListValue() const; - // Return 'true' if the value of this object is a "List" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "List" value, and + // return 'false' otherwise. bool isAddReverseProxyValue() const; - // Return 'true' if the value of this object is a "AddReverseProxy" - // value, and return 'false' otherwise. + // Return 'true' if the value of this object is a "AddReverseProxy" + // value, and return 'false' otherwise. bool isClusterValue() const; - // Return 'true' if the value of this object is a "Cluster" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Cluster" 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 ClustersCommand& lhs, const ClustersCommand& rhs) - // Return 'true' if the specified 'lhs' and 'rhs' objects have the same - // value, and 'false' otherwise. Two 'ClustersCommand' 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 'ClustersCommand' 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 ClustersCommand& lhs, const ClustersCommand& 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 ClustersCommand& 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); } @@ -25807,10 +26401,10 @@ class ClustersCommand { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const ClustersCommand& 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 - // 'ClustersCommand'. + // 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 + // 'ClustersCommand'. { return object.hashAppendImpl(hashAlg); } @@ -25820,26 +26414,26 @@ class ClustersCommand { // TRAITS -BDLAT_DECL_CHOICE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS( - mqbcmd::ClustersCommand) +BDLAT_DECL_CHOICE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::ClustersCommand) namespace mqbcmd { -// ==================== -// class ClustersResult -// ==================== + // ==================== + // class ClustersResult + // ==================== class ClustersResult { + // INSTANCE DATA union { - bsls::ObjectBuffer d_error; - bsls::ObjectBuffer d_success; - bsls::ObjectBuffer d_clusterList; - bsls::ObjectBuffer d_clusterResult; + bsls::ObjectBuffer< Error > d_error; + bsls::ObjectBuffer< Void > d_success; + bsls::ObjectBuffer< ClusterList > d_clusterList; + bsls::ObjectBuffer< ClusterResult > d_clusterResult; }; - int d_selectionId; - bslma::Allocator* d_allocator_p; + int d_selectionId; + bslma::Allocator *d_allocator_p; // PRIVATE ACCESSORS template @@ -25851,20 +26445,22 @@ class ClustersResult { // TYPES enum { - SELECTION_ID_UNDEFINED = -1, - SELECTION_ID_ERROR = 0, - SELECTION_ID_SUCCESS = 1, - SELECTION_ID_CLUSTER_LIST = 2, - SELECTION_ID_CLUSTER_RESULT = 3 + SELECTION_ID_UNDEFINED = -1 + , SELECTION_ID_ERROR = 0 + , SELECTION_ID_SUCCESS = 1 + , SELECTION_ID_CLUSTER_LIST = 2 + , SELECTION_ID_CLUSTER_RESULT = 3 }; - enum { NUM_SELECTIONS = 4 }; + enum { + NUM_SELECTIONS = 4 + }; enum { - SELECTION_INDEX_ERROR = 0, - SELECTION_INDEX_SUCCESS = 1, - SELECTION_INDEX_CLUSTER_LIST = 2, - SELECTION_INDEX_CLUSTER_RESULT = 3 + SELECTION_INDEX_ERROR = 0 + , SELECTION_INDEX_SUCCESS = 1 + , SELECTION_INDEX_CLUSTER_LIST = 2 + , SELECTION_INDEX_CLUSTER_RESULT = 3 }; // CONSTANTS @@ -25873,240 +26469,242 @@ class ClustersResult { 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 ClustersResult(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'ClustersResult' having the default value. - // Use the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit ClustersResult(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'ClustersResult' having the default value. + // Use the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. ClustersResult(const ClustersResult& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'ClustersResult' 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 'ClustersResult' 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) ClustersResult(ClustersResult&& original) noexcept; - // Create an object of type 'ClustersResult' 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 'ClustersResult' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - ClustersResult(ClustersResult&& original, - bslma::Allocator* basicAllocator); - // Create an object of type 'ClustersResult' 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. + ClustersResult(ClustersResult&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'ClustersResult' 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 ~ClustersResult(); - // Destroy this object. + // Destroy this object. // MANIPULATORS ClustersResult& operator=(const ClustersResult& 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) ClustersResult& operator=(ClustersResult&& 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). Error& makeError(); Error& makeError(const Error& 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) Error& makeError(Error&& value); #endif - // Set the value of this object to be a "Error" value. Optionally - // specify the 'value' of the "Error". If 'value' is not specified, - // the default "Error" value is used. + // Set the value of this object to be a "Error" value. Optionally + // specify the 'value' of the "Error". If 'value' is not specified, + // the default "Error" value is used. Void& makeSuccess(); Void& makeSuccess(const Void& 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) Void& makeSuccess(Void&& value); #endif - // Set the value of this object to be a "Success" value. Optionally - // specify the 'value' of the "Success". If 'value' is not specified, - // the default "Success" value is used. + // Set the value of this object to be a "Success" value. Optionally + // specify the 'value' of the "Success". If 'value' is not specified, + // the default "Success" value is used. ClusterList& makeClusterList(); ClusterList& makeClusterList(const ClusterList& 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) ClusterList& makeClusterList(ClusterList&& value); #endif - // Set the value of this object to be a "ClusterList" value. - // Optionally specify the 'value' of the "ClusterList". If 'value' is - // not specified, the default "ClusterList" value is used. + // Set the value of this object to be a "ClusterList" value. + // Optionally specify the 'value' of the "ClusterList". If 'value' is + // not specified, the default "ClusterList" value is used. ClusterResult& makeClusterResult(); ClusterResult& makeClusterResult(const ClusterResult& 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) ClusterResult& makeClusterResult(ClusterResult&& value); #endif - // Set the value of this object to be a "ClusterResult" value. - // Optionally specify the 'value' of the "ClusterResult". If 'value' - // is not specified, the default "ClusterResult" value is used. + // Set the value of this object to be a "ClusterResult" value. + // Optionally specify the 'value' of the "ClusterResult". If 'value' + // is not specified, the default "ClusterResult" 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. Error& error(); - // Return a reference to the modifiable "Error" selection of this - // object if "Error" is the current selection. The behavior is - // undefined unless "Error" is the selection of this object. + // Return a reference to the modifiable "Error" selection of this + // object if "Error" is the current selection. The behavior is + // undefined unless "Error" is the selection of this object. Void& success(); - // Return a reference to the modifiable "Success" selection of this - // object if "Success" is the current selection. The behavior is - // undefined unless "Success" is the selection of this object. + // Return a reference to the modifiable "Success" selection of this + // object if "Success" is the current selection. The behavior is + // undefined unless "Success" is the selection of this object. ClusterList& clusterList(); - // Return a reference to the modifiable "ClusterList" selection of this - // object if "ClusterList" is the current selection. The behavior is - // undefined unless "ClusterList" is the selection of this object. + // Return a reference to the modifiable "ClusterList" selection of this + // object if "ClusterList" is the current selection. The behavior is + // undefined unless "ClusterList" is the selection of this object. ClusterResult& clusterResult(); - // Return a reference to the modifiable "ClusterResult" selection of - // this object if "ClusterResult" is the current selection. The - // behavior is undefined unless "ClusterResult" is the selection of - // this object. + // Return a reference to the modifiable "ClusterResult" selection of + // this object if "ClusterResult" is the current selection. The + // behavior is undefined unless "ClusterResult" 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 Error& error() const; - // Return a reference to the non-modifiable "Error" selection of this - // object if "Error" is the current selection. The behavior is - // undefined unless "Error" is the selection of this object. + // Return a reference to the non-modifiable "Error" selection of this + // object if "Error" is the current selection. The behavior is + // undefined unless "Error" is the selection of this object. const Void& success() const; - // Return a reference to the non-modifiable "Success" selection of this - // object if "Success" is the current selection. The behavior is - // undefined unless "Success" is the selection of this object. + // Return a reference to the non-modifiable "Success" selection of this + // object if "Success" is the current selection. The behavior is + // undefined unless "Success" is the selection of this object. const ClusterList& clusterList() const; - // Return a reference to the non-modifiable "ClusterList" selection of - // this object if "ClusterList" is the current selection. The behavior - // is undefined unless "ClusterList" is the selection of this object. + // Return a reference to the non-modifiable "ClusterList" selection of + // this object if "ClusterList" is the current selection. The behavior + // is undefined unless "ClusterList" is the selection of this object. const ClusterResult& clusterResult() const; - // Return a reference to the non-modifiable "ClusterResult" selection - // of this object if "ClusterResult" is the current selection. The - // behavior is undefined unless "ClusterResult" is the selection of - // this object. + // Return a reference to the non-modifiable "ClusterResult" selection + // of this object if "ClusterResult" is the current selection. The + // behavior is undefined unless "ClusterResult" is the selection of + // this object. bool isErrorValue() const; - // Return 'true' if the value of this object is a "Error" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Error" value, and + // return 'false' otherwise. bool isSuccessValue() const; - // Return 'true' if the value of this object is a "Success" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Success" value, and + // return 'false' otherwise. bool isClusterListValue() const; - // Return 'true' if the value of this object is a "ClusterList" value, - // and return 'false' otherwise. + // Return 'true' if the value of this object is a "ClusterList" value, + // and return 'false' otherwise. bool isClusterResultValue() const; - // Return 'true' if the value of this object is a "ClusterResult" - // value, and return 'false' otherwise. + // Return 'true' if the value of this object is a "ClusterResult" + // 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 ClustersResult& lhs, const ClustersResult& rhs) - // Return 'true' if the specified 'lhs' and 'rhs' objects have the same - // value, and 'false' otherwise. Two 'ClustersResult' 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 'ClustersResult' 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 ClustersResult& lhs, const ClustersResult& 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 ClustersResult& 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); } @@ -26114,10 +26712,10 @@ class ClustersResult { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const ClustersResult& 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 - // 'ClustersResult'. + // 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 + // 'ClustersResult'. { return object.hashAppendImpl(hashAlg); } @@ -26131,16 +26729,17 @@ BDLAT_DECL_CHOICE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::ClustersResult) namespace mqbcmd { -// =================== -// class ConsumerState -// =================== + // =================== + // class ConsumerState + // =================== class ConsumerState { + // INSTANCE DATA - bsl::string d_appId; - AppState d_appState; - ConsumerStatus::Value d_status; - bdlb::NullableValue d_isAtEndOfStorage; + bsl::string d_appId; + AppState d_appState; + ConsumerStatus::Value d_status; + bdlb::NullableValue d_isAtEndOfStorage; // PRIVATE ACCESSORS template @@ -26151,19 +26750,21 @@ class ConsumerState { public: // TYPES enum { - ATTRIBUTE_ID_APP_ID = 0, - ATTRIBUTE_ID_STATUS = 1, - ATTRIBUTE_ID_IS_AT_END_OF_STORAGE = 2, - ATTRIBUTE_ID_APP_STATE = 3 + ATTRIBUTE_ID_APP_ID = 0 + , ATTRIBUTE_ID_STATUS = 1 + , ATTRIBUTE_ID_IS_AT_END_OF_STORAGE = 2 + , ATTRIBUTE_ID_APP_STATE = 3 }; - enum { NUM_ATTRIBUTES = 4 }; + enum { + NUM_ATTRIBUTES = 4 + }; enum { - ATTRIBUTE_INDEX_APP_ID = 0, - ATTRIBUTE_INDEX_STATUS = 1, - ATTRIBUTE_INDEX_IS_AT_END_OF_STORAGE = 2, - ATTRIBUTE_INDEX_APP_STATE = 3 + ATTRIBUTE_INDEX_APP_ID = 0 + , ATTRIBUTE_INDEX_STATUS = 1 + , ATTRIBUTE_INDEX_IS_AT_END_OF_STORAGE = 2 + , ATTRIBUTE_INDEX_APP_STATE = 3 }; // CONSTANTS @@ -26173,187 +26774,190 @@ class ConsumerState { 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 ConsumerState(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'ConsumerState' having the default value. - // Use the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit ConsumerState(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'ConsumerState' having the default value. + // Use the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. ConsumerState(const ConsumerState& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'ConsumerState' 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 'ConsumerState' 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) ConsumerState(ConsumerState&& original) noexcept; - // Create an object of type 'ConsumerState' 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 'ConsumerState' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - ConsumerState(ConsumerState&& original, bslma::Allocator* basicAllocator); - // Create an object of type 'ConsumerState' 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. + ConsumerState(ConsumerState&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'ConsumerState' 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 ~ConsumerState(); - // Destroy this object. + // Destroy this object. // MANIPULATORS ConsumerState& operator=(const ConsumerState& 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) ConsumerState& operator=(ConsumerState&& 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. ConsumerStatus::Value& status(); - // Return a reference to the modifiable "Status" attribute of this - // object. + // Return a reference to the modifiable "Status" attribute of this + // object. bdlb::NullableValue& isAtEndOfStorage(); - // Return a reference to the modifiable "IsAtEndOfStorage" attribute of - // this object. + // Return a reference to the modifiable "IsAtEndOfStorage" attribute of + // this object. AppState& appState(); - // Return a reference to the modifiable "AppState" attribute of this - // object. + // Return a reference to the modifiable "AppState" 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. ConsumerStatus::Value status() const; - // Return the value of the "Status" attribute of this object. + // Return the value of the "Status" attribute of this object. const bdlb::NullableValue& isAtEndOfStorage() const; - // Return a reference offering non-modifiable access to the - // "IsAtEndOfStorage" attribute of this object. + // Return a reference offering non-modifiable access to the + // "IsAtEndOfStorage" attribute of this object. const AppState& appState() const; - // Return a reference offering non-modifiable access to the "AppState" - // attribute of this object. + // Return a reference offering non-modifiable access to the "AppState" + // attribute of this object. // HIDDEN FRIENDS friend bool operator==(const ConsumerState& lhs, const ConsumerState& 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 ConsumerState& lhs, const ConsumerState& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const ConsumerState& 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); } @@ -26361,10 +26965,10 @@ class ConsumerState { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const ConsumerState& 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 - // 'ConsumerState'. + // 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 + // 'ConsumerState'. { object.hashAppendImpl(hashAlg); } @@ -26374,21 +26978,21 @@ class ConsumerState { // TRAITS -BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS( - mqbcmd::ConsumerState) +BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::ConsumerState) namespace mqbcmd { -// ====================== -// class RelayQueueEngine -// ====================== + // ====================== + // class RelayQueueEngine + // ====================== class RelayQueueEngine { + // INSTANCE DATA - bsl::vector d_subStreams; - bsl::vector d_appStates; - Routing d_routing; - unsigned int d_numSubstreams; + bsl::vector d_subStreams; + bsl::vector d_appStates; + Routing d_routing; + unsigned int d_numSubstreams; // PRIVATE ACCESSORS template @@ -26399,19 +27003,21 @@ class RelayQueueEngine { public: // TYPES enum { - ATTRIBUTE_ID_NUM_SUBSTREAMS = 0, - ATTRIBUTE_ID_SUB_STREAMS = 1, - ATTRIBUTE_ID_APP_STATES = 2, - ATTRIBUTE_ID_ROUTING = 3 + ATTRIBUTE_ID_NUM_SUBSTREAMS = 0 + , ATTRIBUTE_ID_SUB_STREAMS = 1 + , ATTRIBUTE_ID_APP_STATES = 2 + , ATTRIBUTE_ID_ROUTING = 3 }; - enum { NUM_ATTRIBUTES = 4 }; + enum { + NUM_ATTRIBUTES = 4 + }; enum { - ATTRIBUTE_INDEX_NUM_SUBSTREAMS = 0, - ATTRIBUTE_INDEX_SUB_STREAMS = 1, - ATTRIBUTE_INDEX_APP_STATES = 2, - ATTRIBUTE_INDEX_ROUTING = 3 + ATTRIBUTE_INDEX_NUM_SUBSTREAMS = 0 + , ATTRIBUTE_INDEX_SUB_STREAMS = 1 + , ATTRIBUTE_INDEX_APP_STATES = 2 + , ATTRIBUTE_INDEX_ROUTING = 3 }; // CONSTANTS @@ -26421,190 +27027,192 @@ class RelayQueueEngine { 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 RelayQueueEngine(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'RelayQueueEngine' having the default - // value. Use the optionally specified 'basicAllocator' to supply - // memory. If 'basicAllocator' is 0, the currently installed default - // allocator is used. + explicit RelayQueueEngine(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'RelayQueueEngine' having the default + // value. Use the optionally specified 'basicAllocator' to supply + // memory. If 'basicAllocator' is 0, the currently installed default + // allocator is used. RelayQueueEngine(const RelayQueueEngine& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'RelayQueueEngine' 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 'RelayQueueEngine' 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) RelayQueueEngine(RelayQueueEngine&& original) noexcept; - // Create an object of type 'RelayQueueEngine' 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 'RelayQueueEngine' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. RelayQueueEngine(RelayQueueEngine&& original, - bslma::Allocator* basicAllocator); - // Create an object of type 'RelayQueueEngine' 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 'RelayQueueEngine' 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 ~RelayQueueEngine(); - // Destroy this object. + // Destroy this object. // MANIPULATORS RelayQueueEngine& operator=(const RelayQueueEngine& 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) RelayQueueEngine& operator=(RelayQueueEngine&& 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. unsigned int& numSubstreams(); - // Return a reference to the modifiable "NumSubstreams" attribute of - // this object. + // Return a reference to the modifiable "NumSubstreams" attribute of + // this object. bsl::vector& subStreams(); - // Return a reference to the modifiable "SubStreams" attribute of this - // object. + // Return a reference to the modifiable "SubStreams" attribute of this + // object. bsl::vector& appStates(); - // Return a reference to the modifiable "AppStates" attribute of this - // object. + // Return a reference to the modifiable "AppStates" attribute of this + // object. Routing& routing(); - // Return a reference to the modifiable "Routing" attribute of this - // object. + // Return a reference to the modifiable "Routing" 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. unsigned int numSubstreams() const; - // Return the value of the "NumSubstreams" attribute of this object. + // Return the value of the "NumSubstreams" attribute of this object. const bsl::vector& subStreams() const; - // Return a reference offering non-modifiable access to the - // "SubStreams" attribute of this object. + // Return a reference offering non-modifiable access to the + // "SubStreams" attribute of this object. const bsl::vector& appStates() const; - // Return a reference offering non-modifiable access to the "AppStates" - // attribute of this object. + // Return a reference offering non-modifiable access to the "AppStates" + // attribute of this object. const Routing& routing() const; - // Return a reference offering non-modifiable access to the "Routing" - // attribute of this object. + // Return a reference offering non-modifiable access to the "Routing" + // attribute of this object. // HIDDEN FRIENDS friend bool operator==(const RelayQueueEngine& lhs, const RelayQueueEngine& 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 RelayQueueEngine& lhs, const RelayQueueEngine& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const RelayQueueEngine& 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); } @@ -26612,10 +27220,10 @@ class RelayQueueEngine { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const RelayQueueEngine& 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 - // 'RelayQueueEngine'. + // 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 + // 'RelayQueueEngine'. { object.hashAppendImpl(hashAlg); } @@ -26625,29 +27233,29 @@ class RelayQueueEngine { // TRAITS -BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS( - mqbcmd::RelayQueueEngine) +BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::RelayQueueEngine) namespace mqbcmd { -// =================== -// class CommandChoice -// =================== + // =================== + // class CommandChoice + // =================== class CommandChoice { + // INSTANCE DATA union { - bsls::ObjectBuffer d_help; - bsls::ObjectBuffer d_domains; - bsls::ObjectBuffer d_configProvider; - bsls::ObjectBuffer d_stat; - bsls::ObjectBuffer d_clusters; - bsls::ObjectBuffer d_danger; - bsls::ObjectBuffer d_brokerConfig; + bsls::ObjectBuffer< HelpCommand > d_help; + bsls::ObjectBuffer< DomainsCommand > d_domains; + bsls::ObjectBuffer< ConfigProviderCommand > d_configProvider; + bsls::ObjectBuffer< StatCommand > d_stat; + bsls::ObjectBuffer< ClustersCommand > d_clusters; + bsls::ObjectBuffer< DangerCommand > d_danger; + bsls::ObjectBuffer< BrokerConfigCommand > d_brokerConfig; }; - int d_selectionId; - bslma::Allocator* d_allocator_p; + int d_selectionId; + bslma::Allocator *d_allocator_p; // PRIVATE ACCESSORS template @@ -26659,26 +27267,28 @@ class CommandChoice { // TYPES enum { - SELECTION_ID_UNDEFINED = -1, - SELECTION_ID_HELP = 0, - SELECTION_ID_DOMAINS = 1, - SELECTION_ID_CONFIG_PROVIDER = 2, - SELECTION_ID_STAT = 3, - SELECTION_ID_CLUSTERS = 4, - SELECTION_ID_DANGER = 5, - SELECTION_ID_BROKER_CONFIG = 6 + SELECTION_ID_UNDEFINED = -1 + , SELECTION_ID_HELP = 0 + , SELECTION_ID_DOMAINS = 1 + , SELECTION_ID_CONFIG_PROVIDER = 2 + , SELECTION_ID_STAT = 3 + , SELECTION_ID_CLUSTERS = 4 + , SELECTION_ID_DANGER = 5 + , SELECTION_ID_BROKER_CONFIG = 6 }; - enum { NUM_SELECTIONS = 7 }; + enum { + NUM_SELECTIONS = 7 + }; enum { - SELECTION_INDEX_HELP = 0, - SELECTION_INDEX_DOMAINS = 1, - SELECTION_INDEX_CONFIG_PROVIDER = 2, - SELECTION_INDEX_STAT = 3, - SELECTION_INDEX_CLUSTERS = 4, - SELECTION_INDEX_DANGER = 5, - SELECTION_INDEX_BROKER_CONFIG = 6 + SELECTION_INDEX_HELP = 0 + , SELECTION_INDEX_DOMAINS = 1 + , SELECTION_INDEX_CONFIG_PROVIDER = 2 + , SELECTION_INDEX_STAT = 3 + , SELECTION_INDEX_CLUSTERS = 4 + , SELECTION_INDEX_DANGER = 5 + , SELECTION_INDEX_BROKER_CONFIG = 6 }; // CONSTANTS @@ -26687,312 +27297,314 @@ class CommandChoice { 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 CommandChoice(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'CommandChoice' having the default value. - // Use the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit CommandChoice(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'CommandChoice' having the default value. + // Use the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. CommandChoice(const CommandChoice& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'CommandChoice' 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 'CommandChoice' 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) CommandChoice(CommandChoice&& original) noexcept; - // Create an object of type 'CommandChoice' 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 'CommandChoice' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - CommandChoice(CommandChoice&& original, bslma::Allocator* basicAllocator); - // Create an object of type 'CommandChoice' 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. + CommandChoice(CommandChoice&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'CommandChoice' 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 ~CommandChoice(); - // Destroy this object. + // Destroy this object. // MANIPULATORS CommandChoice& operator=(const CommandChoice& 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) CommandChoice& operator=(CommandChoice&& 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). HelpCommand& makeHelp(); HelpCommand& makeHelp(const HelpCommand& 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) HelpCommand& makeHelp(HelpCommand&& value); #endif - // Set the value of this object to be a "Help" value. Optionally - // specify the 'value' of the "Help". If 'value' is not specified, the - // default "Help" value is used. + // Set the value of this object to be a "Help" value. Optionally + // specify the 'value' of the "Help". If 'value' is not specified, the + // default "Help" value is used. DomainsCommand& makeDomains(); DomainsCommand& makeDomains(const DomainsCommand& 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) DomainsCommand& makeDomains(DomainsCommand&& value); #endif - // Set the value of this object to be a "Domains" value. Optionally - // specify the 'value' of the "Domains". If 'value' is not specified, - // the default "Domains" value is used. + // Set the value of this object to be a "Domains" value. Optionally + // specify the 'value' of the "Domains". If 'value' is not specified, + // the default "Domains" value is used. ConfigProviderCommand& makeConfigProvider(); - ConfigProviderCommand& - makeConfigProvider(const ConfigProviderCommand& value); -#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \ - defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) + ConfigProviderCommand& makeConfigProvider(const ConfigProviderCommand& value); +#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \ + && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) ConfigProviderCommand& makeConfigProvider(ConfigProviderCommand&& value); #endif - // Set the value of this object to be a "ConfigProvider" value. - // Optionally specify the 'value' of the "ConfigProvider". If 'value' - // is not specified, the default "ConfigProvider" value is used. + // Set the value of this object to be a "ConfigProvider" value. + // Optionally specify the 'value' of the "ConfigProvider". If 'value' + // is not specified, the default "ConfigProvider" value is used. StatCommand& makeStat(); StatCommand& makeStat(const StatCommand& 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) StatCommand& makeStat(StatCommand&& value); #endif - // Set the value of this object to be a "Stat" value. Optionally - // specify the 'value' of the "Stat". If 'value' is not specified, the - // default "Stat" value is used. + // Set the value of this object to be a "Stat" value. Optionally + // specify the 'value' of the "Stat". If 'value' is not specified, the + // default "Stat" value is used. ClustersCommand& makeClusters(); ClustersCommand& makeClusters(const ClustersCommand& 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) ClustersCommand& makeClusters(ClustersCommand&& value); #endif - // Set the value of this object to be a "Clusters" value. Optionally - // specify the 'value' of the "Clusters". If 'value' is not specified, - // the default "Clusters" value is used. + // Set the value of this object to be a "Clusters" value. Optionally + // specify the 'value' of the "Clusters". If 'value' is not specified, + // the default "Clusters" value is used. DangerCommand& makeDanger(); DangerCommand& makeDanger(const DangerCommand& 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) DangerCommand& makeDanger(DangerCommand&& value); #endif - // Set the value of this object to be a "Danger" value. Optionally - // specify the 'value' of the "Danger". If 'value' is not specified, - // the default "Danger" value is used. + // Set the value of this object to be a "Danger" value. Optionally + // specify the 'value' of the "Danger". If 'value' is not specified, + // the default "Danger" value is used. BrokerConfigCommand& makeBrokerConfig(); BrokerConfigCommand& makeBrokerConfig(const BrokerConfigCommand& 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) BrokerConfigCommand& makeBrokerConfig(BrokerConfigCommand&& value); #endif - // Set the value of this object to be a "BrokerConfig" value. - // Optionally specify the 'value' of the "BrokerConfig". If 'value' is - // not specified, the default "BrokerConfig" value is used. + // Set the value of this object to be a "BrokerConfig" value. + // Optionally specify the 'value' of the "BrokerConfig". If 'value' is + // not specified, the default "BrokerConfig" 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. HelpCommand& help(); - // Return a reference to the modifiable "Help" selection of this object - // if "Help" is the current selection. The behavior is undefined - // unless "Help" is the selection of this object. + // Return a reference to the modifiable "Help" selection of this object + // if "Help" is the current selection. The behavior is undefined + // unless "Help" is the selection of this object. DomainsCommand& domains(); - // Return a reference to the modifiable "Domains" selection of this - // object if "Domains" is the current selection. The behavior is - // undefined unless "Domains" is the selection of this object. + // Return a reference to the modifiable "Domains" selection of this + // object if "Domains" is the current selection. The behavior is + // undefined unless "Domains" is the selection of this object. ConfigProviderCommand& configProvider(); - // Return a reference to the modifiable "ConfigProvider" selection of - // this object if "ConfigProvider" is the current selection. The - // behavior is undefined unless "ConfigProvider" is the selection of - // this object. + // Return a reference to the modifiable "ConfigProvider" selection of + // this object if "ConfigProvider" is the current selection. The + // behavior is undefined unless "ConfigProvider" is the selection of + // this object. StatCommand& stat(); - // Return a reference to the modifiable "Stat" selection of this object - // if "Stat" is the current selection. The behavior is undefined - // unless "Stat" is the selection of this object. + // Return a reference to the modifiable "Stat" selection of this object + // if "Stat" is the current selection. The behavior is undefined + // unless "Stat" is the selection of this object. ClustersCommand& clusters(); - // Return a reference to the modifiable "Clusters" selection of this - // object if "Clusters" is the current selection. The behavior is - // undefined unless "Clusters" is the selection of this object. + // Return a reference to the modifiable "Clusters" selection of this + // object if "Clusters" is the current selection. The behavior is + // undefined unless "Clusters" is the selection of this object. DangerCommand& danger(); - // Return a reference to the modifiable "Danger" selection of this - // object if "Danger" is the current selection. The behavior is - // undefined unless "Danger" is the selection of this object. + // Return a reference to the modifiable "Danger" selection of this + // object if "Danger" is the current selection. The behavior is + // undefined unless "Danger" is the selection of this object. BrokerConfigCommand& brokerConfig(); - // Return a reference to the modifiable "BrokerConfig" selection of - // this object if "BrokerConfig" is the current selection. The - // behavior is undefined unless "BrokerConfig" is the selection of this - // object. + // Return a reference to the modifiable "BrokerConfig" selection of + // this object if "BrokerConfig" is the current selection. The + // behavior is undefined unless "BrokerConfig" 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 HelpCommand& help() const; - // Return a reference to the non-modifiable "Help" selection of this - // object if "Help" is the current selection. The behavior is - // undefined unless "Help" is the selection of this object. + // Return a reference to the non-modifiable "Help" selection of this + // object if "Help" is the current selection. The behavior is + // undefined unless "Help" is the selection of this object. const DomainsCommand& domains() const; - // Return a reference to the non-modifiable "Domains" selection of this - // object if "Domains" is the current selection. The behavior is - // undefined unless "Domains" is the selection of this object. + // Return a reference to the non-modifiable "Domains" selection of this + // object if "Domains" is the current selection. The behavior is + // undefined unless "Domains" is the selection of this object. const ConfigProviderCommand& configProvider() const; - // Return a reference to the non-modifiable "ConfigProvider" selection - // of this object if "ConfigProvider" is the current selection. The - // behavior is undefined unless "ConfigProvider" is the selection of - // this object. + // Return a reference to the non-modifiable "ConfigProvider" selection + // of this object if "ConfigProvider" is the current selection. The + // behavior is undefined unless "ConfigProvider" is the selection of + // this object. const StatCommand& stat() const; - // Return a reference to the non-modifiable "Stat" selection of this - // object if "Stat" is the current selection. The behavior is - // undefined unless "Stat" is the selection of this object. + // Return a reference to the non-modifiable "Stat" selection of this + // object if "Stat" is the current selection. The behavior is + // undefined unless "Stat" is the selection of this object. const ClustersCommand& clusters() const; - // Return a reference to the non-modifiable "Clusters" selection of - // this object if "Clusters" is the current selection. The behavior is - // undefined unless "Clusters" is the selection of this object. + // Return a reference to the non-modifiable "Clusters" selection of + // this object if "Clusters" is the current selection. The behavior is + // undefined unless "Clusters" is the selection of this object. const DangerCommand& danger() const; - // Return a reference to the non-modifiable "Danger" selection of this - // object if "Danger" is the current selection. The behavior is - // undefined unless "Danger" is the selection of this object. + // Return a reference to the non-modifiable "Danger" selection of this + // object if "Danger" is the current selection. The behavior is + // undefined unless "Danger" is the selection of this object. const BrokerConfigCommand& brokerConfig() const; - // Return a reference to the non-modifiable "BrokerConfig" selection of - // this object if "BrokerConfig" is the current selection. The - // behavior is undefined unless "BrokerConfig" is the selection of this - // object. + // Return a reference to the non-modifiable "BrokerConfig" selection of + // this object if "BrokerConfig" is the current selection. The + // behavior is undefined unless "BrokerConfig" is the selection of this + // object. bool isHelpValue() const; - // Return 'true' if the value of this object is a "Help" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Help" value, and + // return 'false' otherwise. bool isDomainsValue() const; - // Return 'true' if the value of this object is a "Domains" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Domains" value, and + // return 'false' otherwise. bool isConfigProviderValue() const; - // Return 'true' if the value of this object is a "ConfigProvider" - // value, and return 'false' otherwise. + // Return 'true' if the value of this object is a "ConfigProvider" + // value, and return 'false' otherwise. bool isStatValue() const; - // Return 'true' if the value of this object is a "Stat" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Stat" value, and + // return 'false' otherwise. bool isClustersValue() const; - // Return 'true' if the value of this object is a "Clusters" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Clusters" value, and + // return 'false' otherwise. bool isDangerValue() const; - // Return 'true' if the value of this object is a "Danger" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Danger" value, and + // return 'false' otherwise. bool isBrokerConfigValue() const; - // Return 'true' if the value of this object is a "BrokerConfig" value, - // and return 'false' otherwise. + // Return 'true' if the value of this object is a "BrokerConfig" 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 CommandChoice& lhs, const CommandChoice& rhs) - // Return 'true' if the specified 'lhs' and 'rhs' objects have the same - // value, and 'false' otherwise. Two 'CommandChoice' 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 'CommandChoice' 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 CommandChoice& lhs, const CommandChoice& 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 CommandChoice& 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); } @@ -27000,10 +27612,10 @@ class CommandChoice { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const CommandChoice& 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 - // 'CommandChoice'. + // 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 + // 'CommandChoice'. { return object.hashAppendImpl(hashAlg); } @@ -27017,16 +27629,17 @@ BDLAT_DECL_CHOICE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::CommandChoice) namespace mqbcmd { -// ======================= -// class FanoutQueueEngine -// ======================= + // ======================= + // class FanoutQueueEngine + // ======================= class FanoutQueueEngine { + // INSTANCE DATA - bsl::vector d_consumerStates; - bsl::string d_mode; - Routing d_routing; - unsigned int d_maxConsumers; + bsl::vector d_consumerStates; + bsl::string d_mode; + Routing d_routing; + unsigned int d_maxConsumers; // PRIVATE ACCESSORS template @@ -27037,19 +27650,21 @@ class FanoutQueueEngine { public: // TYPES enum { - ATTRIBUTE_ID_MAX_CONSUMERS = 0, - ATTRIBUTE_ID_MODE = 1, - ATTRIBUTE_ID_CONSUMER_STATES = 2, - ATTRIBUTE_ID_ROUTING = 3 + ATTRIBUTE_ID_MAX_CONSUMERS = 0 + , ATTRIBUTE_ID_MODE = 1 + , ATTRIBUTE_ID_CONSUMER_STATES = 2 + , ATTRIBUTE_ID_ROUTING = 3 }; - enum { NUM_ATTRIBUTES = 4 }; + enum { + NUM_ATTRIBUTES = 4 + }; enum { - ATTRIBUTE_INDEX_MAX_CONSUMERS = 0, - ATTRIBUTE_INDEX_MODE = 1, - ATTRIBUTE_INDEX_CONSUMER_STATES = 2, - ATTRIBUTE_INDEX_ROUTING = 3 + ATTRIBUTE_INDEX_MAX_CONSUMERS = 0 + , ATTRIBUTE_INDEX_MODE = 1 + , ATTRIBUTE_INDEX_CONSUMER_STATES = 2 + , ATTRIBUTE_INDEX_ROUTING = 3 }; // CONSTANTS @@ -27059,190 +27674,192 @@ class FanoutQueueEngine { 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 FanoutQueueEngine(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'FanoutQueueEngine' having the default - // value. Use the optionally specified 'basicAllocator' to supply - // memory. If 'basicAllocator' is 0, the currently installed default - // allocator is used. + explicit FanoutQueueEngine(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'FanoutQueueEngine' having the default + // value. Use the optionally specified 'basicAllocator' to supply + // memory. If 'basicAllocator' is 0, the currently installed default + // allocator is used. FanoutQueueEngine(const FanoutQueueEngine& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'FanoutQueueEngine' 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 'FanoutQueueEngine' 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) FanoutQueueEngine(FanoutQueueEngine&& original) noexcept; - // Create an object of type 'FanoutQueueEngine' 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 'FanoutQueueEngine' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. FanoutQueueEngine(FanoutQueueEngine&& original, - bslma::Allocator* basicAllocator); - // Create an object of type 'FanoutQueueEngine' 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 'FanoutQueueEngine' 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 ~FanoutQueueEngine(); - // Destroy this object. + // Destroy this object. // MANIPULATORS FanoutQueueEngine& operator=(const FanoutQueueEngine& 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) FanoutQueueEngine& operator=(FanoutQueueEngine&& 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. unsigned int& maxConsumers(); - // Return a reference to the modifiable "MaxConsumers" attribute of - // this object. + // Return a reference to the modifiable "MaxConsumers" attribute of + // this object. bsl::string& mode(); - // Return a reference to the modifiable "Mode" attribute of this - // object. + // Return a reference to the modifiable "Mode" attribute of this + // object. bsl::vector& consumerStates(); - // Return a reference to the modifiable "ConsumerStates" attribute of - // this object. + // Return a reference to the modifiable "ConsumerStates" attribute of + // this object. Routing& routing(); - // Return a reference to the modifiable "Routing" attribute of this - // object. + // Return a reference to the modifiable "Routing" 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. unsigned int maxConsumers() const; - // Return the value of the "MaxConsumers" attribute of this object. + // Return the value of the "MaxConsumers" attribute of this object. const bsl::string& mode() const; - // Return a reference offering non-modifiable access to the "Mode" - // attribute of this object. + // Return a reference offering non-modifiable access to the "Mode" + // attribute of this object. const bsl::vector& consumerStates() const; - // Return a reference offering non-modifiable access to the - // "ConsumerStates" attribute of this object. + // Return a reference offering non-modifiable access to the + // "ConsumerStates" attribute of this object. const Routing& routing() const; - // Return a reference offering non-modifiable access to the "Routing" - // attribute of this object. + // Return a reference offering non-modifiable access to the "Routing" + // attribute of this object. // HIDDEN FRIENDS friend bool operator==(const FanoutQueueEngine& lhs, const FanoutQueueEngine& 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 FanoutQueueEngine& lhs, const FanoutQueueEngine& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const FanoutQueueEngine& 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); } @@ -27250,10 +27867,10 @@ class FanoutQueueEngine { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const FanoutQueueEngine& 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 - // 'FanoutQueueEngine'. + // 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 + // 'FanoutQueueEngine'. { object.hashAppendImpl(hashAlg); } @@ -27263,14 +27880,13 @@ class FanoutQueueEngine { // TRAITS -BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS( - mqbcmd::FanoutQueueEngine) +BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::FanoutQueueEngine) namespace mqbcmd { -// ============= -// class Command -// ============= + // ============= + // class Command + // ============= class Command { // The type represents a variant representing Command with options common @@ -27279,16 +27895,24 @@ class Command { // format of this command output. // INSTANCE DATA - CommandChoice d_choice; - EncodingFormat::Value d_encoding; + CommandChoice d_choice; + EncodingFormat::Value d_encoding; public: // TYPES - enum { ATTRIBUTE_ID_CHOICE = 0, ATTRIBUTE_ID_ENCODING = 1 }; + enum { + ATTRIBUTE_ID_CHOICE = 0 + , ATTRIBUTE_ID_ENCODING = 1 + }; - enum { NUM_ATTRIBUTES = 2 }; + enum { + NUM_ATTRIBUTES = 2 + }; - enum { ATTRIBUTE_INDEX_CHOICE = 0, ATTRIBUTE_INDEX_ENCODING = 1 }; + enum { + ATTRIBUTE_INDEX_CHOICE = 0 + , ATTRIBUTE_INDEX_ENCODING = 1 + }; // CONSTANTS static const char CLASS_NAME[]; @@ -27299,179 +27923,183 @@ class Command { 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 Command(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'Command' having the default value. Use - // the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. - - Command(const Command& original, bslma::Allocator* basicAllocator = 0); - // Create an object of type 'Command' 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 Command(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'Command' having the default value. Use + // the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. + + Command(const Command& original, + bslma::Allocator *basicAllocator = 0); + // Create an object of type 'Command' 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) Command(Command&& original) noexcept; - // Create an object of type 'Command' 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 'Command' having the value of the specified + // 'original' object. After performing this action, the 'original' + // object will be left in a valid, but unspecified state. - Command(Command&& original, bslma::Allocator* basicAllocator); - // Create an object of type 'Command' 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. + Command(Command&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'Command' 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 ~Command(); - // Destroy this object. + // Destroy this object. // MANIPULATORS Command& operator=(const Command& 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) Command& operator=(Command&& 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. CommandChoice& choice(); - // Return a reference to the modifiable "Choice" attribute of this - // object. + // Return a reference to the modifiable "Choice" attribute of this + // object. EncodingFormat::Value& encoding(); - // Return a reference to the modifiable "Encoding" attribute of this - // object. + // Return a reference to the modifiable "Encoding" 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 CommandChoice& choice() const; - // Return a reference offering non-modifiable access to the "Choice" - // attribute of this object. + // Return a reference offering non-modifiable access to the "Choice" + // attribute of this object. EncodingFormat::Value encoding() const; - // Return the value of the "Encoding" attribute of this object. + // Return the value of the "Encoding" attribute of this object. // HIDDEN FRIENDS friend bool operator==(const Command& lhs, const Command& 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.choice() == rhs.choice() && lhs.encoding() == rhs.encoding(); } friend bool operator!=(const Command& lhs, const Command& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const Command& 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 Command& 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 'Command'. + // 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 'Command'. { using bslh::hashAppend; hashAppend(hashAlg, object.choice()); @@ -27487,19 +28115,20 @@ BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::Command) namespace mqbcmd { -// ================= -// class QueueEngine -// ================= + // ================= + // class QueueEngine + // ================= class QueueEngine { + // INSTANCE DATA union { - bsls::ObjectBuffer d_fanout; - bsls::ObjectBuffer d_relay; + bsls::ObjectBuffer< FanoutQueueEngine > d_fanout; + bsls::ObjectBuffer< RelayQueueEngine > d_relay; }; - int d_selectionId; - bslma::Allocator* d_allocator_p; + int d_selectionId; + bslma::Allocator *d_allocator_p; // PRIVATE ACCESSORS template @@ -27511,14 +28140,19 @@ class QueueEngine { // TYPES enum { - SELECTION_ID_UNDEFINED = -1, - SELECTION_ID_FANOUT = 0, - SELECTION_ID_RELAY = 1 + SELECTION_ID_UNDEFINED = -1 + , SELECTION_ID_FANOUT = 0 + , SELECTION_ID_RELAY = 1 }; - enum { NUM_SELECTIONS = 2 }; + enum { + NUM_SELECTIONS = 2 + }; - enum { SELECTION_INDEX_FANOUT = 0, SELECTION_INDEX_RELAY = 1 }; + enum { + SELECTION_INDEX_FANOUT = 0 + , SELECTION_INDEX_RELAY = 1 + }; // CONSTANTS static const char CLASS_NAME[]; @@ -27526,187 +28160,190 @@ class QueueEngine { 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 QueueEngine(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'QueueEngine' having the default value. - // Use the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit QueueEngine(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'QueueEngine' having the default value. + // Use the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. QueueEngine(const QueueEngine& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'QueueEngine' 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 'QueueEngine' 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) QueueEngine(QueueEngine&& original) noexcept; - // Create an object of type 'QueueEngine' 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 'QueueEngine' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - QueueEngine(QueueEngine&& original, bslma::Allocator* basicAllocator); - // Create an object of type 'QueueEngine' 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. + QueueEngine(QueueEngine&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'QueueEngine' 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 ~QueueEngine(); - // Destroy this object. + // Destroy this object. // MANIPULATORS QueueEngine& operator=(const QueueEngine& 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) QueueEngine& operator=(QueueEngine&& 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). FanoutQueueEngine& makeFanout(); FanoutQueueEngine& makeFanout(const FanoutQueueEngine& 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) FanoutQueueEngine& makeFanout(FanoutQueueEngine&& value); #endif - // Set the value of this object to be a "Fanout" value. Optionally - // specify the 'value' of the "Fanout". If 'value' is not specified, - // the default "Fanout" value is used. + // Set the value of this object to be a "Fanout" value. Optionally + // specify the 'value' of the "Fanout". If 'value' is not specified, + // the default "Fanout" value is used. RelayQueueEngine& makeRelay(); RelayQueueEngine& makeRelay(const RelayQueueEngine& 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) RelayQueueEngine& makeRelay(RelayQueueEngine&& value); #endif - // Set the value of this object to be a "Relay" value. Optionally - // specify the 'value' of the "Relay". If 'value' is not specified, - // the default "Relay" value is used. + // Set the value of this object to be a "Relay" value. Optionally + // specify the 'value' of the "Relay". If 'value' is not specified, + // the default "Relay" 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. FanoutQueueEngine& fanout(); - // Return a reference to the modifiable "Fanout" selection of this - // object if "Fanout" is the current selection. The behavior is - // undefined unless "Fanout" is the selection of this object. + // Return a reference to the modifiable "Fanout" selection of this + // object if "Fanout" is the current selection. The behavior is + // undefined unless "Fanout" is the selection of this object. RelayQueueEngine& relay(); - // Return a reference to the modifiable "Relay" selection of this - // object if "Relay" is the current selection. The behavior is - // undefined unless "Relay" is the selection of this object. + // Return a reference to the modifiable "Relay" selection of this + // object if "Relay" is the current selection. The behavior is + // undefined unless "Relay" 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 FanoutQueueEngine& fanout() const; - // Return a reference to the non-modifiable "Fanout" selection of this - // object if "Fanout" is the current selection. The behavior is - // undefined unless "Fanout" is the selection of this object. + // Return a reference to the non-modifiable "Fanout" selection of this + // object if "Fanout" is the current selection. The behavior is + // undefined unless "Fanout" is the selection of this object. const RelayQueueEngine& relay() const; - // Return a reference to the non-modifiable "Relay" selection of this - // object if "Relay" is the current selection. The behavior is - // undefined unless "Relay" is the selection of this object. + // Return a reference to the non-modifiable "Relay" selection of this + // object if "Relay" is the current selection. The behavior is + // undefined unless "Relay" is the selection of this object. bool isFanoutValue() const; - // Return 'true' if the value of this object is a "Fanout" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Fanout" value, and + // return 'false' otherwise. bool isRelayValue() const; - // Return 'true' if the value of this object is a "Relay" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Relay" 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 QueueEngine& lhs, const QueueEngine& rhs) - // Return 'true' if the specified 'lhs' and 'rhs' objects have the same - // value, and 'false' otherwise. Two 'QueueEngine' 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 'QueueEngine' 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 QueueEngine& lhs, const QueueEngine& 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 QueueEngine& 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); } @@ -27714,9 +28351,9 @@ class QueueEngine { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const QueueEngine& 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 'QueueEngine'. + // 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 'QueueEngine'. { return object.hashAppendImpl(hashAlg); } @@ -27730,21 +28367,28 @@ BDLAT_DECL_CHOICE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::QueueEngine) namespace mqbcmd { -// ================ -// class LocalQueue -// ================ + // ================ + // class LocalQueue + // ================ class LocalQueue { + // INSTANCE DATA - QueueEngine d_queueEngine; + QueueEngine d_queueEngine; public: // TYPES - enum { ATTRIBUTE_ID_QUEUE_ENGINE = 0 }; + enum { + ATTRIBUTE_ID_QUEUE_ENGINE = 0 + }; - enum { NUM_ATTRIBUTES = 1 }; + enum { + NUM_ATTRIBUTES = 1 + }; - enum { ATTRIBUTE_INDEX_QUEUE_ENGINE = 0 }; + enum { + ATTRIBUTE_INDEX_QUEUE_ENGINE = 0 + }; // CONSTANTS static const char CLASS_NAME[]; @@ -27753,173 +28397,176 @@ class LocalQueue { 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 LocalQueue(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'LocalQueue' having the default value. Use - // the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit LocalQueue(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'LocalQueue' having the default value. Use + // the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. LocalQueue(const LocalQueue& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'LocalQueue' 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 'LocalQueue' 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) LocalQueue(LocalQueue&& original) noexcept; - // Create an object of type 'LocalQueue' 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 'LocalQueue' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - LocalQueue(LocalQueue&& original, bslma::Allocator* basicAllocator); - // Create an object of type 'LocalQueue' 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. + LocalQueue(LocalQueue&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'LocalQueue' 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 ~LocalQueue(); - // Destroy this object. + // Destroy this object. // MANIPULATORS LocalQueue& operator=(const LocalQueue& 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) LocalQueue& operator=(LocalQueue&& 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. QueueEngine& queueEngine(); - // Return a reference to the modifiable "QueueEngine" attribute of this - // object. + // Return a reference to the modifiable "QueueEngine" 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 QueueEngine& queueEngine() const; - // Return a reference offering non-modifiable access to the - // "QueueEngine" attribute of this object. + // Return a reference offering non-modifiable access to the + // "QueueEngine" attribute of this object. // HIDDEN FRIENDS friend bool operator==(const LocalQueue& lhs, const LocalQueue& 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.queueEngine() == rhs.queueEngine(); } friend bool operator!=(const LocalQueue& lhs, const LocalQueue& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const LocalQueue& 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 LocalQueue& 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 'LocalQueue'. + // 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 'LocalQueue'. { using bslh::hashAppend; hashAppend(hashAlg, object.queueEngine()); @@ -27934,18 +28581,19 @@ BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::LocalQueue) namespace mqbcmd { -// ================= -// class RemoteQueue -// ================= + // ================= + // class RemoteQueue + // ================= class RemoteQueue { + // INSTANCE DATA - bsls::Types::Int64 d_numPendingPuts; - bsls::Types::Int64 d_numPendingConfirms; - bsl::vector d_streams; - QueueEngine d_queueEngine; - unsigned int d_numUpstreamGeneration; - bool d_isPushExpirationTimerScheduled; + bsls::Types::Int64 d_numPendingPuts; + bsls::Types::Int64 d_numPendingConfirms; + bsl::vector d_streams; + QueueEngine d_queueEngine; + unsigned int d_numUpstreamGeneration; + bool d_isPushExpirationTimerScheduled; // PRIVATE ACCESSORS template @@ -27956,23 +28604,25 @@ class RemoteQueue { public: // TYPES enum { - ATTRIBUTE_ID_NUM_PENDING_PUTS = 0, - ATTRIBUTE_ID_NUM_PENDING_CONFIRMS = 1, - ATTRIBUTE_ID_IS_PUSH_EXPIRATION_TIMER_SCHEDULED = 2, - ATTRIBUTE_ID_NUM_UPSTREAM_GENERATION = 3, - ATTRIBUTE_ID_STREAMS = 4, - ATTRIBUTE_ID_QUEUE_ENGINE = 5 + ATTRIBUTE_ID_NUM_PENDING_PUTS = 0 + , ATTRIBUTE_ID_NUM_PENDING_CONFIRMS = 1 + , ATTRIBUTE_ID_IS_PUSH_EXPIRATION_TIMER_SCHEDULED = 2 + , ATTRIBUTE_ID_NUM_UPSTREAM_GENERATION = 3 + , ATTRIBUTE_ID_STREAMS = 4 + , ATTRIBUTE_ID_QUEUE_ENGINE = 5 }; - enum { NUM_ATTRIBUTES = 6 }; + enum { + NUM_ATTRIBUTES = 6 + }; enum { - ATTRIBUTE_INDEX_NUM_PENDING_PUTS = 0, - ATTRIBUTE_INDEX_NUM_PENDING_CONFIRMS = 1, - ATTRIBUTE_INDEX_IS_PUSH_EXPIRATION_TIMER_SCHEDULED = 2, - ATTRIBUTE_INDEX_NUM_UPSTREAM_GENERATION = 3, - ATTRIBUTE_INDEX_STREAMS = 4, - ATTRIBUTE_INDEX_QUEUE_ENGINE = 5 + ATTRIBUTE_INDEX_NUM_PENDING_PUTS = 0 + , ATTRIBUTE_INDEX_NUM_PENDING_CONFIRMS = 1 + , ATTRIBUTE_INDEX_IS_PUSH_EXPIRATION_TIMER_SCHEDULED = 2 + , ATTRIBUTE_INDEX_NUM_UPSTREAM_GENERATION = 3 + , ATTRIBUTE_INDEX_STREAMS = 4 + , ATTRIBUTE_INDEX_QUEUE_ENGINE = 5 }; // CONSTANTS @@ -27982,203 +28632,206 @@ class RemoteQueue { 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 RemoteQueue(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'RemoteQueue' having the default value. - // Use the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit RemoteQueue(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'RemoteQueue' having the default value. + // Use the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. RemoteQueue(const RemoteQueue& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'RemoteQueue' 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 'RemoteQueue' 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) RemoteQueue(RemoteQueue&& original) noexcept; - // Create an object of type 'RemoteQueue' 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 'RemoteQueue' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - RemoteQueue(RemoteQueue&& original, bslma::Allocator* basicAllocator); - // Create an object of type 'RemoteQueue' 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. + RemoteQueue(RemoteQueue&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'RemoteQueue' 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 ~RemoteQueue(); - // Destroy this object. + // Destroy this object. // MANIPULATORS RemoteQueue& operator=(const RemoteQueue& 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) RemoteQueue& operator=(RemoteQueue&& 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. bsls::Types::Int64& numPendingPuts(); - // Return a reference to the modifiable "NumPendingPuts" attribute of - // this object. + // Return a reference to the modifiable "NumPendingPuts" attribute of + // this object. bsls::Types::Int64& numPendingConfirms(); - // Return a reference to the modifiable "NumPendingConfirms" attribute - // of this object. + // Return a reference to the modifiable "NumPendingConfirms" attribute + // of this object. bool& isPushExpirationTimerScheduled(); - // Return a reference to the modifiable - // "IsPushExpirationTimerScheduled" attribute of this object. + // Return a reference to the modifiable + // "IsPushExpirationTimerScheduled" attribute of this object. unsigned int& numUpstreamGeneration(); - // Return a reference to the modifiable "NumUpstreamGeneration" - // attribute of this object. + // Return a reference to the modifiable "NumUpstreamGeneration" + // attribute of this object. bsl::vector& streams(); - // Return a reference to the modifiable "Streams" attribute of this - // object. + // Return a reference to the modifiable "Streams" attribute of this + // object. QueueEngine& queueEngine(); - // Return a reference to the modifiable "QueueEngine" attribute of this - // object. + // Return a reference to the modifiable "QueueEngine" 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 numPendingPuts() const; - // Return the value of the "NumPendingPuts" attribute of this object. + // Return the value of the "NumPendingPuts" attribute of this object. bsls::Types::Int64 numPendingConfirms() const; - // Return the value of the "NumPendingConfirms" attribute of this - // object. + // Return the value of the "NumPendingConfirms" attribute of this + // object. bool isPushExpirationTimerScheduled() const; - // Return the value of the "IsPushExpirationTimerScheduled" attribute - // of this object. + // Return the value of the "IsPushExpirationTimerScheduled" attribute + // of this object. unsigned int numUpstreamGeneration() const; - // Return the value of the "NumUpstreamGeneration" attribute of this - // object. + // Return the value of the "NumUpstreamGeneration" attribute of this + // object. const bsl::vector& streams() const; - // Return a reference offering non-modifiable access to the "Streams" - // attribute of this object. + // Return a reference offering non-modifiable access to the "Streams" + // attribute of this object. const QueueEngine& queueEngine() const; - // Return a reference offering non-modifiable access to the - // "QueueEngine" attribute of this object. + // Return a reference offering non-modifiable access to the + // "QueueEngine" attribute of this object. // HIDDEN FRIENDS friend bool operator==(const RemoteQueue& lhs, const RemoteQueue& 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 RemoteQueue& lhs, const RemoteQueue& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const RemoteQueue& 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); } @@ -28186,9 +28839,9 @@ class RemoteQueue { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const RemoteQueue& 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 'RemoteQueue'. + // 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 'RemoteQueue'. { object.hashAppendImpl(hashAlg); } @@ -28202,20 +28855,21 @@ BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::RemoteQueue) namespace mqbcmd { -// =========== -// class Queue -// =========== + // =========== + // class Queue + // =========== class Queue { + // INSTANCE DATA union { - bsls::ObjectBuffer d_localQueue; - bsls::ObjectBuffer d_remoteQueue; - bsls::ObjectBuffer d_uninitializedQueue; + bsls::ObjectBuffer< LocalQueue > d_localQueue; + bsls::ObjectBuffer< RemoteQueue > d_remoteQueue; + bsls::ObjectBuffer< UninitializedQueue > d_uninitializedQueue; }; - int d_selectionId; - bslma::Allocator* d_allocator_p; + int d_selectionId; + bslma::Allocator *d_allocator_p; // PRIVATE ACCESSORS template @@ -28227,18 +28881,20 @@ class Queue { // TYPES enum { - SELECTION_ID_UNDEFINED = -1, - SELECTION_ID_LOCAL_QUEUE = 0, - SELECTION_ID_REMOTE_QUEUE = 1, - SELECTION_ID_UNINITIALIZED_QUEUE = 2 + SELECTION_ID_UNDEFINED = -1 + , SELECTION_ID_LOCAL_QUEUE = 0 + , SELECTION_ID_REMOTE_QUEUE = 1 + , SELECTION_ID_UNINITIALIZED_QUEUE = 2 }; - enum { NUM_SELECTIONS = 3 }; + enum { + NUM_SELECTIONS = 3 + }; enum { - SELECTION_INDEX_LOCAL_QUEUE = 0, - SELECTION_INDEX_REMOTE_QUEUE = 1, - SELECTION_INDEX_UNINITIALIZED_QUEUE = 2 + SELECTION_INDEX_LOCAL_QUEUE = 0 + , SELECTION_INDEX_REMOTE_QUEUE = 1 + , SELECTION_INDEX_UNINITIALIZED_QUEUE = 2 }; // CONSTANTS @@ -28247,222 +28903,225 @@ class Queue { 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 Queue(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'Queue' having the default value. Use the - // optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. - - Queue(const Queue& original, bslma::Allocator* basicAllocator = 0); - // Create an object of type 'Queue' 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 Queue(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'Queue' having the default value. Use the + // optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. + + Queue(const Queue& original, + bslma::Allocator *basicAllocator = 0); + // Create an object of type 'Queue' 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) Queue(Queue&& original) noexcept; - // Create an object of type 'Queue' 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 'Queue' having the value of the specified + // 'original' object. After performing this action, the 'original' + // object will be left in a valid, but unspecified state. - Queue(Queue&& original, bslma::Allocator* basicAllocator); - // Create an object of type 'Queue' 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. + Queue(Queue&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'Queue' 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 ~Queue(); - // Destroy this object. + // Destroy this object. // MANIPULATORS Queue& operator=(const Queue& 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) Queue& operator=(Queue&& 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). LocalQueue& makeLocalQueue(); LocalQueue& makeLocalQueue(const LocalQueue& 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) LocalQueue& makeLocalQueue(LocalQueue&& value); #endif - // Set the value of this object to be a "LocalQueue" value. Optionally - // specify the 'value' of the "LocalQueue". If 'value' is not - // specified, the default "LocalQueue" value is used. + // Set the value of this object to be a "LocalQueue" value. Optionally + // specify the 'value' of the "LocalQueue". If 'value' is not + // specified, the default "LocalQueue" value is used. RemoteQueue& makeRemoteQueue(); RemoteQueue& makeRemoteQueue(const RemoteQueue& 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) RemoteQueue& makeRemoteQueue(RemoteQueue&& value); #endif - // Set the value of this object to be a "RemoteQueue" value. - // Optionally specify the 'value' of the "RemoteQueue". If 'value' is - // not specified, the default "RemoteQueue" value is used. + // Set the value of this object to be a "RemoteQueue" value. + // Optionally specify the 'value' of the "RemoteQueue". If 'value' is + // not specified, the default "RemoteQueue" value is used. UninitializedQueue& makeUninitializedQueue(); - UninitializedQueue& - makeUninitializedQueue(const UninitializedQueue& value); -#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \ - defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) + UninitializedQueue& makeUninitializedQueue(const UninitializedQueue& value); +#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \ + && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) UninitializedQueue& makeUninitializedQueue(UninitializedQueue&& value); #endif - // Set the value of this object to be a "UninitializedQueue" value. - // Optionally specify the 'value' of the "UninitializedQueue". If - // 'value' is not specified, the default "UninitializedQueue" value is - // used. + // Set the value of this object to be a "UninitializedQueue" value. + // Optionally specify the 'value' of the "UninitializedQueue". If + // 'value' is not specified, the default "UninitializedQueue" 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. LocalQueue& localQueue(); - // Return a reference to the modifiable "LocalQueue" selection of this - // object if "LocalQueue" is the current selection. The behavior is - // undefined unless "LocalQueue" is the selection of this object. + // Return a reference to the modifiable "LocalQueue" selection of this + // object if "LocalQueue" is the current selection. The behavior is + // undefined unless "LocalQueue" is the selection of this object. RemoteQueue& remoteQueue(); - // Return a reference to the modifiable "RemoteQueue" selection of this - // object if "RemoteQueue" is the current selection. The behavior is - // undefined unless "RemoteQueue" is the selection of this object. + // Return a reference to the modifiable "RemoteQueue" selection of this + // object if "RemoteQueue" is the current selection. The behavior is + // undefined unless "RemoteQueue" is the selection of this object. UninitializedQueue& uninitializedQueue(); - // Return a reference to the modifiable "UninitializedQueue" selection - // of this object if "UninitializedQueue" is the current selection. - // The behavior is undefined unless "UninitializedQueue" is the - // selection of this object. + // Return a reference to the modifiable "UninitializedQueue" selection + // of this object if "UninitializedQueue" is the current selection. + // The behavior is undefined unless "UninitializedQueue" 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 LocalQueue& localQueue() const; - // Return a reference to the non-modifiable "LocalQueue" selection of - // this object if "LocalQueue" is the current selection. The behavior - // is undefined unless "LocalQueue" is the selection of this object. + // Return a reference to the non-modifiable "LocalQueue" selection of + // this object if "LocalQueue" is the current selection. The behavior + // is undefined unless "LocalQueue" is the selection of this object. const RemoteQueue& remoteQueue() const; - // Return a reference to the non-modifiable "RemoteQueue" selection of - // this object if "RemoteQueue" is the current selection. The behavior - // is undefined unless "RemoteQueue" is the selection of this object. + // Return a reference to the non-modifiable "RemoteQueue" selection of + // this object if "RemoteQueue" is the current selection. The behavior + // is undefined unless "RemoteQueue" is the selection of this object. const UninitializedQueue& uninitializedQueue() const; - // Return a reference to the non-modifiable "UninitializedQueue" - // selection of this object if "UninitializedQueue" is the current - // selection. The behavior is undefined unless "UninitializedQueue" is - // the selection of this object. + // Return a reference to the non-modifiable "UninitializedQueue" + // selection of this object if "UninitializedQueue" is the current + // selection. The behavior is undefined unless "UninitializedQueue" is + // the selection of this object. bool isLocalQueueValue() const; - // Return 'true' if the value of this object is a "LocalQueue" value, - // and return 'false' otherwise. + // Return 'true' if the value of this object is a "LocalQueue" value, + // and return 'false' otherwise. bool isRemoteQueueValue() const; - // Return 'true' if the value of this object is a "RemoteQueue" value, - // and return 'false' otherwise. + // Return 'true' if the value of this object is a "RemoteQueue" value, + // and return 'false' otherwise. bool isUninitializedQueueValue() const; - // Return 'true' if the value of this object is a "UninitializedQueue" - // value, and return 'false' otherwise. + // Return 'true' if the value of this object is a "UninitializedQueue" + // 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 Queue& lhs, const Queue& rhs) - // Return 'true' if the specified 'lhs' and 'rhs' objects have the same - // value, and 'false' otherwise. Two 'Queue' 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 'Queue' 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 Queue& lhs, const Queue& 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 Queue& 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 Queue& 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 'Queue'. + // 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 'Queue'. { return object.hashAppendImpl(hashAlg); } @@ -28476,22 +29135,31 @@ BDLAT_DECL_CHOICE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::Queue) namespace mqbcmd { -// ==================== -// class QueueInternals -// ==================== + // ==================== + // class QueueInternals + // ==================== class QueueInternals { + // INSTANCE DATA - QueueState d_state; - Queue d_queue; + QueueState d_state; + Queue d_queue; public: // TYPES - enum { ATTRIBUTE_ID_STATE = 0, ATTRIBUTE_ID_QUEUE = 1 }; + enum { + ATTRIBUTE_ID_STATE = 0 + , ATTRIBUTE_ID_QUEUE = 1 + }; - enum { NUM_ATTRIBUTES = 2 }; + enum { + NUM_ATTRIBUTES = 2 + }; - enum { ATTRIBUTE_INDEX_STATE = 0, ATTRIBUTE_INDEX_QUEUE = 1 }; + enum { + ATTRIBUTE_INDEX_STATE = 0 + , ATTRIBUTE_INDEX_QUEUE = 1 + }; // CONSTANTS static const char CLASS_NAME[]; @@ -28500,175 +29168,178 @@ class QueueInternals { 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 QueueInternals(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'QueueInternals' having the default value. - // Use the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit QueueInternals(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'QueueInternals' having the default value. + // Use the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. QueueInternals(const QueueInternals& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'QueueInternals' 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 'QueueInternals' 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) QueueInternals(QueueInternals&& original) noexcept; - // Create an object of type 'QueueInternals' 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 'QueueInternals' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - QueueInternals(QueueInternals&& original, - bslma::Allocator* basicAllocator); - // Create an object of type 'QueueInternals' 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. + QueueInternals(QueueInternals&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'QueueInternals' 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 ~QueueInternals(); - // Destroy this object. + // Destroy this object. // MANIPULATORS QueueInternals& operator=(const QueueInternals& 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) QueueInternals& operator=(QueueInternals&& 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. QueueState& state(); - // Return a reference to the modifiable "State" attribute of this - // object. + // Return a reference to the modifiable "State" attribute of this + // object. Queue& queue(); - // Return a reference to the modifiable "Queue" attribute of this - // object. + // Return a reference to the modifiable "Queue" 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 QueueState& 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. const Queue& queue() const; - // Return a reference offering non-modifiable access to the "Queue" - // attribute of this object. + // Return a reference offering non-modifiable access to the "Queue" + // attribute of this object. // HIDDEN FRIENDS friend bool operator==(const QueueInternals& lhs, const QueueInternals& 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.state() == rhs.state() && lhs.queue() == rhs.queue(); + return lhs.state() == rhs.state() && + lhs.queue() == rhs.queue(); } friend bool operator!=(const QueueInternals& lhs, const QueueInternals& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const QueueInternals& 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); } @@ -28676,10 +29347,10 @@ class QueueInternals { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const QueueInternals& 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 - // 'QueueInternals'. + // 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 + // 'QueueInternals'. { using bslh::hashAppend; hashAppend(hashAlg, object.state()); @@ -28691,26 +29362,26 @@ class QueueInternals { // TRAITS -BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS( - mqbcmd::QueueInternals) +BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::QueueInternals) namespace mqbcmd { -// ================= -// class QueueResult -// ================= + // ================= + // class QueueResult + // ================= class QueueResult { + // INSTANCE DATA union { - bsls::ObjectBuffer d_error; - bsls::ObjectBuffer d_purgedQueues; - bsls::ObjectBuffer d_queueContents; - bsls::ObjectBuffer d_queueInternals; + bsls::ObjectBuffer< Error > d_error; + bsls::ObjectBuffer< PurgedQueues > d_purgedQueues; + bsls::ObjectBuffer< QueueContents > d_queueContents; + bsls::ObjectBuffer< QueueInternals > d_queueInternals; }; - int d_selectionId; - bslma::Allocator* d_allocator_p; + int d_selectionId; + bslma::Allocator *d_allocator_p; // PRIVATE ACCESSORS template @@ -28722,20 +29393,22 @@ class QueueResult { // TYPES enum { - SELECTION_ID_UNDEFINED = -1, - SELECTION_ID_ERROR = 0, - SELECTION_ID_PURGED_QUEUES = 1, - SELECTION_ID_QUEUE_CONTENTS = 2, - SELECTION_ID_QUEUE_INTERNALS = 3 + SELECTION_ID_UNDEFINED = -1 + , SELECTION_ID_ERROR = 0 + , SELECTION_ID_PURGED_QUEUES = 1 + , SELECTION_ID_QUEUE_CONTENTS = 2 + , SELECTION_ID_QUEUE_INTERNALS = 3 }; - enum { NUM_SELECTIONS = 4 }; + enum { + NUM_SELECTIONS = 4 + }; enum { - SELECTION_INDEX_ERROR = 0, - SELECTION_INDEX_PURGED_QUEUES = 1, - SELECTION_INDEX_QUEUE_CONTENTS = 2, - SELECTION_INDEX_QUEUE_INTERNALS = 3 + SELECTION_INDEX_ERROR = 0 + , SELECTION_INDEX_PURGED_QUEUES = 1 + , SELECTION_INDEX_QUEUE_CONTENTS = 2 + , SELECTION_INDEX_QUEUE_INTERNALS = 3 }; // CONSTANTS @@ -28744,241 +29417,244 @@ class QueueResult { 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 QueueResult(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'QueueResult' having the default value. - // Use the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit QueueResult(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'QueueResult' having the default value. + // Use the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. QueueResult(const QueueResult& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'QueueResult' 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 'QueueResult' 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) QueueResult(QueueResult&& original) noexcept; - // Create an object of type 'QueueResult' 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 'QueueResult' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - QueueResult(QueueResult&& original, bslma::Allocator* basicAllocator); - // Create an object of type 'QueueResult' 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. + QueueResult(QueueResult&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'QueueResult' 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 ~QueueResult(); - // Destroy this object. + // Destroy this object. // MANIPULATORS QueueResult& operator=(const QueueResult& 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) QueueResult& operator=(QueueResult&& 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). Error& makeError(); Error& makeError(const Error& 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) Error& makeError(Error&& value); #endif - // Set the value of this object to be a "Error" value. Optionally - // specify the 'value' of the "Error". If 'value' is not specified, - // the default "Error" value is used. + // Set the value of this object to be a "Error" value. Optionally + // specify the 'value' of the "Error". If 'value' is not specified, + // the default "Error" value is used. PurgedQueues& makePurgedQueues(); PurgedQueues& makePurgedQueues(const PurgedQueues& 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) PurgedQueues& makePurgedQueues(PurgedQueues&& value); #endif - // Set the value of this object to be a "PurgedQueues" value. - // Optionally specify the 'value' of the "PurgedQueues". If 'value' is - // not specified, the default "PurgedQueues" value is used. + // Set the value of this object to be a "PurgedQueues" value. + // Optionally specify the 'value' of the "PurgedQueues". If 'value' is + // not specified, the default "PurgedQueues" value is used. QueueContents& makeQueueContents(); QueueContents& makeQueueContents(const QueueContents& 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) QueueContents& makeQueueContents(QueueContents&& value); #endif - // Set the value of this object to be a "QueueContents" value. - // Optionally specify the 'value' of the "QueueContents". If 'value' - // is not specified, the default "QueueContents" value is used. + // Set the value of this object to be a "QueueContents" value. + // Optionally specify the 'value' of the "QueueContents". If 'value' + // is not specified, the default "QueueContents" value is used. QueueInternals& makeQueueInternals(); QueueInternals& makeQueueInternals(const QueueInternals& 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) QueueInternals& makeQueueInternals(QueueInternals&& value); #endif - // Set the value of this object to be a "QueueInternals" value. - // Optionally specify the 'value' of the "QueueInternals". If 'value' - // is not specified, the default "QueueInternals" value is used. + // Set the value of this object to be a "QueueInternals" value. + // Optionally specify the 'value' of the "QueueInternals". If 'value' + // is not specified, the default "QueueInternals" 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. Error& error(); - // Return a reference to the modifiable "Error" selection of this - // object if "Error" is the current selection. The behavior is - // undefined unless "Error" is the selection of this object. + // Return a reference to the modifiable "Error" selection of this + // object if "Error" is the current selection. The behavior is + // undefined unless "Error" is the selection of this object. PurgedQueues& purgedQueues(); - // Return a reference to the modifiable "PurgedQueues" selection of - // this object if "PurgedQueues" is the current selection. The - // behavior is undefined unless "PurgedQueues" is the selection of this - // object. + // Return a reference to the modifiable "PurgedQueues" selection of + // this object if "PurgedQueues" is the current selection. The + // behavior is undefined unless "PurgedQueues" is the selection of this + // object. QueueContents& queueContents(); - // Return a reference to the modifiable "QueueContents" selection of - // this object if "QueueContents" is the current selection. The - // behavior is undefined unless "QueueContents" is the selection of - // this object. + // Return a reference to the modifiable "QueueContents" selection of + // this object if "QueueContents" is the current selection. The + // behavior is undefined unless "QueueContents" is the selection of + // this object. QueueInternals& queueInternals(); - // Return a reference to the modifiable "QueueInternals" selection of - // this object if "QueueInternals" is the current selection. The - // behavior is undefined unless "QueueInternals" is the selection of - // this object. + // Return a reference to the modifiable "QueueInternals" selection of + // this object if "QueueInternals" is the current selection. The + // behavior is undefined unless "QueueInternals" 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 Error& error() const; - // Return a reference to the non-modifiable "Error" selection of this - // object if "Error" is the current selection. The behavior is - // undefined unless "Error" is the selection of this object. + // Return a reference to the non-modifiable "Error" selection of this + // object if "Error" is the current selection. The behavior is + // undefined unless "Error" is the selection of this object. const PurgedQueues& purgedQueues() const; - // Return a reference to the non-modifiable "PurgedQueues" selection of - // this object if "PurgedQueues" is the current selection. The - // behavior is undefined unless "PurgedQueues" is the selection of this - // object. + // Return a reference to the non-modifiable "PurgedQueues" selection of + // this object if "PurgedQueues" is the current selection. The + // behavior is undefined unless "PurgedQueues" is the selection of this + // object. const QueueContents& queueContents() const; - // Return a reference to the non-modifiable "QueueContents" selection - // of this object if "QueueContents" is the current selection. The - // behavior is undefined unless "QueueContents" is the selection of - // this object. + // Return a reference to the non-modifiable "QueueContents" selection + // of this object if "QueueContents" is the current selection. The + // behavior is undefined unless "QueueContents" is the selection of + // this object. const QueueInternals& queueInternals() const; - // Return a reference to the non-modifiable "QueueInternals" selection - // of this object if "QueueInternals" is the current selection. The - // behavior is undefined unless "QueueInternals" is the selection of - // this object. + // Return a reference to the non-modifiable "QueueInternals" selection + // of this object if "QueueInternals" is the current selection. The + // behavior is undefined unless "QueueInternals" is the selection of + // this object. bool isErrorValue() const; - // Return 'true' if the value of this object is a "Error" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Error" value, and + // return 'false' otherwise. bool isPurgedQueuesValue() const; - // Return 'true' if the value of this object is a "PurgedQueues" value, - // and return 'false' otherwise. + // Return 'true' if the value of this object is a "PurgedQueues" value, + // and return 'false' otherwise. bool isQueueContentsValue() const; - // Return 'true' if the value of this object is a "QueueContents" - // value, and return 'false' otherwise. + // Return 'true' if the value of this object is a "QueueContents" + // value, and return 'false' otherwise. bool isQueueInternalsValue() const; - // Return 'true' if the value of this object is a "QueueInternals" - // value, and return 'false' otherwise. + // Return 'true' if the value of this object is a "QueueInternals" + // 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 QueueResult& lhs, const QueueResult& rhs) - // Return 'true' if the specified 'lhs' and 'rhs' objects have the same - // value, and 'false' otherwise. Two 'QueueResult' 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 'QueueResult' 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 QueueResult& lhs, const QueueResult& 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 QueueResult& 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); } @@ -28986,9 +29662,9 @@ class QueueResult { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const QueueResult& 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 'QueueResult'. + // 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 'QueueResult'. { return object.hashAppendImpl(hashAlg); } @@ -29002,9 +29678,9 @@ BDLAT_DECL_CHOICE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::QueueResult) namespace mqbcmd { -// ============ -// class Result -// ============ + // ============ + // class Result + // ============ class Result { // The type represents a command execution result flattened for a calling @@ -29013,36 +29689,35 @@ class Result { // INSTANCE DATA union { - bsls::ObjectBuffer d_error; - bsls::ObjectBuffer d_success; - bsls::ObjectBuffer d_value; - bsls::ObjectBuffer d_tunable; - bsls::ObjectBuffer d_tunables; - bsls::ObjectBuffer d_tunableConfirmation; - bsls::ObjectBuffer d_help; - bsls::ObjectBuffer d_domainInfo; - bsls::ObjectBuffer d_purgedQueues; - bsls::ObjectBuffer d_queueInternals; - bsls::ObjectBuffer d_messageGroupIdHelper; - bsls::ObjectBuffer d_queueContents; - bsls::ObjectBuffer d_message; - bsls::ObjectBuffer d_stats; - bsls::ObjectBuffer d_clusterList; - bsls::ObjectBuffer d_clusterStatus; - bsls::ObjectBuffer d_clusterProxyStatus; - bsls::ObjectBuffer d_nodeStatuses; - bsls::ObjectBuffer d_electorInfo; - bsls::ObjectBuffer d_partitionsInfo; - bsls::ObjectBuffer d_clusterQueueHelper; - bsls::ObjectBuffer d_storageContent; - bsls::ObjectBuffer d_clusterStorageSummary; - bsls::ObjectBuffer - d_clusterDomainQueueStatuses; - bsls::ObjectBuffer d_brokerConfig; - }; - - int d_selectionId; - bslma::Allocator* d_allocator_p; + bsls::ObjectBuffer< Error > d_error; + bsls::ObjectBuffer< Void > d_success; + bsls::ObjectBuffer< Value > d_value; + bsls::ObjectBuffer< Tunable > d_tunable; + bsls::ObjectBuffer< Tunables > d_tunables; + bsls::ObjectBuffer< TunableConfirmation > d_tunableConfirmation; + bsls::ObjectBuffer< Help > d_help; + bsls::ObjectBuffer< DomainInfo > d_domainInfo; + bsls::ObjectBuffer< PurgedQueues > d_purgedQueues; + bsls::ObjectBuffer< QueueInternals > d_queueInternals; + bsls::ObjectBuffer< MessageGroupIdHelper > d_messageGroupIdHelper; + bsls::ObjectBuffer< QueueContents > d_queueContents; + bsls::ObjectBuffer< Message > d_message; + bsls::ObjectBuffer< bsl::string > d_stats; + bsls::ObjectBuffer< ClusterList > d_clusterList; + bsls::ObjectBuffer< ClusterStatus > d_clusterStatus; + bsls::ObjectBuffer< ClusterProxyStatus > d_clusterProxyStatus; + bsls::ObjectBuffer< NodeStatuses > d_nodeStatuses; + bsls::ObjectBuffer< ElectorInfo > d_electorInfo; + bsls::ObjectBuffer< PartitionsInfo > d_partitionsInfo; + bsls::ObjectBuffer< ClusterQueueHelper > d_clusterQueueHelper; + bsls::ObjectBuffer< StorageContent > d_storageContent; + bsls::ObjectBuffer< ClusterStorageSummary > d_clusterStorageSummary; + bsls::ObjectBuffer< ClusterDomainQueueStatuses > d_clusterDomainQueueStatuses; + bsls::ObjectBuffer< BrokerConfig > d_brokerConfig; + }; + + int d_selectionId; + bslma::Allocator *d_allocator_p; // PRIVATE ACCESSORS template @@ -29054,62 +29729,64 @@ class Result { // TYPES enum { - SELECTION_ID_UNDEFINED = -1, - SELECTION_ID_ERROR = 0, - SELECTION_ID_SUCCESS = 1, - SELECTION_ID_VALUE = 2, - SELECTION_ID_TUNABLE = 3, - SELECTION_ID_TUNABLES = 4, - SELECTION_ID_TUNABLE_CONFIRMATION = 5, - SELECTION_ID_HELP = 6, - SELECTION_ID_DOMAIN_INFO = 7, - SELECTION_ID_PURGED_QUEUES = 8, - SELECTION_ID_QUEUE_INTERNALS = 9, - SELECTION_ID_MESSAGE_GROUP_ID_HELPER = 10, - SELECTION_ID_QUEUE_CONTENTS = 11, - SELECTION_ID_MESSAGE = 12, - SELECTION_ID_STATS = 13, - SELECTION_ID_CLUSTER_LIST = 14, - SELECTION_ID_CLUSTER_STATUS = 15, - SELECTION_ID_CLUSTER_PROXY_STATUS = 16, - SELECTION_ID_NODE_STATUSES = 17, - SELECTION_ID_ELECTOR_INFO = 18, - SELECTION_ID_PARTITIONS_INFO = 19, - SELECTION_ID_CLUSTER_QUEUE_HELPER = 20, - SELECTION_ID_STORAGE_CONTENT = 21, - SELECTION_ID_CLUSTER_STORAGE_SUMMARY = 22, - SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES = 23, - SELECTION_ID_BROKER_CONFIG = 24 - }; - - enum { NUM_SELECTIONS = 25 }; - - enum { - SELECTION_INDEX_ERROR = 0, - SELECTION_INDEX_SUCCESS = 1, - SELECTION_INDEX_VALUE = 2, - SELECTION_INDEX_TUNABLE = 3, - SELECTION_INDEX_TUNABLES = 4, - SELECTION_INDEX_TUNABLE_CONFIRMATION = 5, - SELECTION_INDEX_HELP = 6, - SELECTION_INDEX_DOMAIN_INFO = 7, - SELECTION_INDEX_PURGED_QUEUES = 8, - SELECTION_INDEX_QUEUE_INTERNALS = 9, - SELECTION_INDEX_MESSAGE_GROUP_ID_HELPER = 10, - SELECTION_INDEX_QUEUE_CONTENTS = 11, - SELECTION_INDEX_MESSAGE = 12, - SELECTION_INDEX_STATS = 13, - SELECTION_INDEX_CLUSTER_LIST = 14, - SELECTION_INDEX_CLUSTER_STATUS = 15, - SELECTION_INDEX_CLUSTER_PROXY_STATUS = 16, - SELECTION_INDEX_NODE_STATUSES = 17, - SELECTION_INDEX_ELECTOR_INFO = 18, - SELECTION_INDEX_PARTITIONS_INFO = 19, - SELECTION_INDEX_CLUSTER_QUEUE_HELPER = 20, - SELECTION_INDEX_STORAGE_CONTENT = 21, - SELECTION_INDEX_CLUSTER_STORAGE_SUMMARY = 22, - SELECTION_INDEX_CLUSTER_DOMAIN_QUEUE_STATUSES = 23, - SELECTION_INDEX_BROKER_CONFIG = 24 + SELECTION_ID_UNDEFINED = -1 + , SELECTION_ID_ERROR = 0 + , SELECTION_ID_SUCCESS = 1 + , SELECTION_ID_VALUE = 2 + , SELECTION_ID_TUNABLE = 3 + , SELECTION_ID_TUNABLES = 4 + , SELECTION_ID_TUNABLE_CONFIRMATION = 5 + , SELECTION_ID_HELP = 6 + , SELECTION_ID_DOMAIN_INFO = 7 + , SELECTION_ID_PURGED_QUEUES = 8 + , SELECTION_ID_QUEUE_INTERNALS = 9 + , SELECTION_ID_MESSAGE_GROUP_ID_HELPER = 10 + , SELECTION_ID_QUEUE_CONTENTS = 11 + , SELECTION_ID_MESSAGE = 12 + , SELECTION_ID_STATS = 13 + , SELECTION_ID_CLUSTER_LIST = 14 + , SELECTION_ID_CLUSTER_STATUS = 15 + , SELECTION_ID_CLUSTER_PROXY_STATUS = 16 + , SELECTION_ID_NODE_STATUSES = 17 + , SELECTION_ID_ELECTOR_INFO = 18 + , SELECTION_ID_PARTITIONS_INFO = 19 + , SELECTION_ID_CLUSTER_QUEUE_HELPER = 20 + , SELECTION_ID_STORAGE_CONTENT = 21 + , SELECTION_ID_CLUSTER_STORAGE_SUMMARY = 22 + , SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES = 23 + , SELECTION_ID_BROKER_CONFIG = 24 + }; + + enum { + NUM_SELECTIONS = 25 + }; + + enum { + SELECTION_INDEX_ERROR = 0 + , SELECTION_INDEX_SUCCESS = 1 + , SELECTION_INDEX_VALUE = 2 + , SELECTION_INDEX_TUNABLE = 3 + , SELECTION_INDEX_TUNABLES = 4 + , SELECTION_INDEX_TUNABLE_CONFIRMATION = 5 + , SELECTION_INDEX_HELP = 6 + , SELECTION_INDEX_DOMAIN_INFO = 7 + , SELECTION_INDEX_PURGED_QUEUES = 8 + , SELECTION_INDEX_QUEUE_INTERNALS = 9 + , SELECTION_INDEX_MESSAGE_GROUP_ID_HELPER = 10 + , SELECTION_INDEX_QUEUE_CONTENTS = 11 + , SELECTION_INDEX_MESSAGE = 12 + , SELECTION_INDEX_STATS = 13 + , SELECTION_INDEX_CLUSTER_LIST = 14 + , SELECTION_INDEX_CLUSTER_STATUS = 15 + , SELECTION_INDEX_CLUSTER_PROXY_STATUS = 16 + , SELECTION_INDEX_NODE_STATUSES = 17 + , SELECTION_INDEX_ELECTOR_INFO = 18 + , SELECTION_INDEX_PARTITIONS_INFO = 19 + , SELECTION_INDEX_CLUSTER_QUEUE_HELPER = 20 + , SELECTION_INDEX_STORAGE_CONTENT = 21 + , SELECTION_INDEX_CLUSTER_STORAGE_SUMMARY = 22 + , SELECTION_INDEX_CLUSTER_DOMAIN_QUEUE_STATUSES = 23 + , SELECTION_INDEX_BROKER_CONFIG = 24 }; // CONSTANTS @@ -29118,790 +29795,785 @@ class Result { 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 Result(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'Result' having the default value. Use the - // optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. - - Result(const Result& original, bslma::Allocator* basicAllocator = 0); - // Create an object of type 'Result' 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 Result(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'Result' having the default value. Use the + // optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. + + Result(const Result& original, + bslma::Allocator *basicAllocator = 0); + // Create an object of type 'Result' 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) Result(Result&& original) noexcept; - // Create an object of type 'Result' 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 'Result' having the value of the specified + // 'original' object. After performing this action, the 'original' + // object will be left in a valid, but unspecified state. - Result(Result&& original, bslma::Allocator* basicAllocator); - // Create an object of type 'Result' 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. + Result(Result&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'Result' 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 ~Result(); - // Destroy this object. + // Destroy this object. // MANIPULATORS Result& operator=(const Result& 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) Result& operator=(Result&& 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). Error& makeError(); Error& makeError(const Error& 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) Error& makeError(Error&& value); #endif - // Set the value of this object to be a "Error" value. Optionally - // specify the 'value' of the "Error". If 'value' is not specified, - // the default "Error" value is used. + // Set the value of this object to be a "Error" value. Optionally + // specify the 'value' of the "Error". If 'value' is not specified, + // the default "Error" value is used. Void& makeSuccess(); Void& makeSuccess(const Void& 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) Void& makeSuccess(Void&& value); #endif - // Set the value of this object to be a "Success" value. Optionally - // specify the 'value' of the "Success". If 'value' is not specified, - // the default "Success" value is used. + // Set the value of this object to be a "Success" value. Optionally + // specify the 'value' of the "Success". If 'value' is not specified, + // the default "Success" value is used. Value& makeValue(); Value& makeValue(const Value& 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) Value& makeValue(Value&& value); #endif - // Set the value of this object to be a "Value" value. Optionally - // specify the 'value' of the "Value". If 'value' is not specified, - // the default "Value" value is used. + // Set the value of this object to be a "Value" value. Optionally + // specify the 'value' of the "Value". If 'value' is not specified, + // the default "Value" value is used. Tunable& makeTunable(); Tunable& makeTunable(const Tunable& 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) Tunable& makeTunable(Tunable&& value); #endif - // Set the value of this object to be a "Tunable" value. Optionally - // specify the 'value' of the "Tunable". If 'value' is not specified, - // the default "Tunable" value is used. + // Set the value of this object to be a "Tunable" value. Optionally + // specify the 'value' of the "Tunable". If 'value' is not specified, + // the default "Tunable" value is used. Tunables& makeTunables(); Tunables& makeTunables(const Tunables& 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) Tunables& makeTunables(Tunables&& value); #endif - // Set the value of this object to be a "Tunables" value. Optionally - // specify the 'value' of the "Tunables". If 'value' is not specified, - // the default "Tunables" value is used. + // Set the value of this object to be a "Tunables" value. Optionally + // specify the 'value' of the "Tunables". If 'value' is not specified, + // the default "Tunables" value is used. TunableConfirmation& makeTunableConfirmation(); - TunableConfirmation& - makeTunableConfirmation(const TunableConfirmation& value); -#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \ - defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) + TunableConfirmation& makeTunableConfirmation(const TunableConfirmation& value); +#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \ + && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) TunableConfirmation& makeTunableConfirmation(TunableConfirmation&& value); #endif - // Set the value of this object to be a "TunableConfirmation" value. - // Optionally specify the 'value' of the "TunableConfirmation". If - // 'value' is not specified, the default "TunableConfirmation" value is - // used. + // Set the value of this object to be a "TunableConfirmation" value. + // Optionally specify the 'value' of the "TunableConfirmation". If + // 'value' is not specified, the default "TunableConfirmation" value is + // used. Help& makeHelp(); Help& makeHelp(const Help& 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) Help& makeHelp(Help&& value); #endif - // Set the value of this object to be a "Help" value. Optionally - // specify the 'value' of the "Help". If 'value' is not specified, the - // default "Help" value is used. + // Set the value of this object to be a "Help" value. Optionally + // specify the 'value' of the "Help". If 'value' is not specified, the + // default "Help" value is used. DomainInfo& makeDomainInfo(); DomainInfo& makeDomainInfo(const DomainInfo& 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) DomainInfo& makeDomainInfo(DomainInfo&& value); #endif - // Set the value of this object to be a "DomainInfo" value. Optionally - // specify the 'value' of the "DomainInfo". If 'value' is not - // specified, the default "DomainInfo" value is used. + // Set the value of this object to be a "DomainInfo" value. Optionally + // specify the 'value' of the "DomainInfo". If 'value' is not + // specified, the default "DomainInfo" value is used. PurgedQueues& makePurgedQueues(); PurgedQueues& makePurgedQueues(const PurgedQueues& 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) PurgedQueues& makePurgedQueues(PurgedQueues&& value); #endif - // Set the value of this object to be a "PurgedQueues" value. - // Optionally specify the 'value' of the "PurgedQueues". If 'value' is - // not specified, the default "PurgedQueues" value is used. + // Set the value of this object to be a "PurgedQueues" value. + // Optionally specify the 'value' of the "PurgedQueues". If 'value' is + // not specified, the default "PurgedQueues" value is used. QueueInternals& makeQueueInternals(); QueueInternals& makeQueueInternals(const QueueInternals& 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) QueueInternals& makeQueueInternals(QueueInternals&& value); #endif - // Set the value of this object to be a "QueueInternals" value. - // Optionally specify the 'value' of the "QueueInternals". If 'value' - // is not specified, the default "QueueInternals" value is used. + // Set the value of this object to be a "QueueInternals" value. + // Optionally specify the 'value' of the "QueueInternals". If 'value' + // is not specified, the default "QueueInternals" value is used. MessageGroupIdHelper& makeMessageGroupIdHelper(); - MessageGroupIdHelper& - makeMessageGroupIdHelper(const MessageGroupIdHelper& value); -#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \ - defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) - MessageGroupIdHelper& - makeMessageGroupIdHelper(MessageGroupIdHelper&& value); -#endif - // Set the value of this object to be a "MessageGroupIdHelper" value. - // Optionally specify the 'value' of the "MessageGroupIdHelper". If - // 'value' is not specified, the default "MessageGroupIdHelper" value - // is used. + MessageGroupIdHelper& makeMessageGroupIdHelper(const MessageGroupIdHelper& value); +#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \ + && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) + MessageGroupIdHelper& makeMessageGroupIdHelper(MessageGroupIdHelper&& value); +#endif + // Set the value of this object to be a "MessageGroupIdHelper" value. + // Optionally specify the 'value' of the "MessageGroupIdHelper". If + // 'value' is not specified, the default "MessageGroupIdHelper" value + // is used. QueueContents& makeQueueContents(); QueueContents& makeQueueContents(const QueueContents& 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) QueueContents& makeQueueContents(QueueContents&& value); #endif - // Set the value of this object to be a "QueueContents" value. - // Optionally specify the 'value' of the "QueueContents". If 'value' - // is not specified, the default "QueueContents" value is used. + // Set the value of this object to be a "QueueContents" value. + // Optionally specify the 'value' of the "QueueContents". If 'value' + // is not specified, the default "QueueContents" value is used. Message& makeMessage(); Message& makeMessage(const Message& 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) Message& makeMessage(Message&& value); #endif - // Set the value of this object to be a "Message" value. Optionally - // specify the 'value' of the "Message". If 'value' is not specified, - // the default "Message" value is used. + // Set the value of this object to be a "Message" value. Optionally + // specify the 'value' of the "Message". If 'value' is not specified, + // the default "Message" value is used. bsl::string& makeStats(); bsl::string& makeStats(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& makeStats(bsl::string&& value); #endif - // Set the value of this object to be a "Stats" value. Optionally - // specify the 'value' of the "Stats". If 'value' is not specified, - // the default "Stats" value is used. + // Set the value of this object to be a "Stats" value. Optionally + // specify the 'value' of the "Stats". If 'value' is not specified, + // the default "Stats" value is used. ClusterList& makeClusterList(); ClusterList& makeClusterList(const ClusterList& 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) ClusterList& makeClusterList(ClusterList&& value); #endif - // Set the value of this object to be a "ClusterList" value. - // Optionally specify the 'value' of the "ClusterList". If 'value' is - // not specified, the default "ClusterList" value is used. + // Set the value of this object to be a "ClusterList" value. + // Optionally specify the 'value' of the "ClusterList". If 'value' is + // not specified, the default "ClusterList" value is used. ClusterStatus& makeClusterStatus(); ClusterStatus& makeClusterStatus(const ClusterStatus& 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) ClusterStatus& makeClusterStatus(ClusterStatus&& value); #endif - // Set the value of this object to be a "ClusterStatus" value. - // Optionally specify the 'value' of the "ClusterStatus". If 'value' - // is not specified, the default "ClusterStatus" value is used. + // Set the value of this object to be a "ClusterStatus" value. + // Optionally specify the 'value' of the "ClusterStatus". If 'value' + // is not specified, the default "ClusterStatus" value is used. ClusterProxyStatus& makeClusterProxyStatus(); - ClusterProxyStatus& - makeClusterProxyStatus(const ClusterProxyStatus& value); -#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \ - defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) + ClusterProxyStatus& makeClusterProxyStatus(const ClusterProxyStatus& value); +#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \ + && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) ClusterProxyStatus& makeClusterProxyStatus(ClusterProxyStatus&& value); #endif - // Set the value of this object to be a "ClusterProxyStatus" value. - // Optionally specify the 'value' of the "ClusterProxyStatus". If - // 'value' is not specified, the default "ClusterProxyStatus" value is - // used. + // Set the value of this object to be a "ClusterProxyStatus" value. + // Optionally specify the 'value' of the "ClusterProxyStatus". If + // 'value' is not specified, the default "ClusterProxyStatus" value is + // used. NodeStatuses& makeNodeStatuses(); NodeStatuses& makeNodeStatuses(const NodeStatuses& 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) NodeStatuses& makeNodeStatuses(NodeStatuses&& value); #endif - // Set the value of this object to be a "NodeStatuses" value. - // Optionally specify the 'value' of the "NodeStatuses". If 'value' is - // not specified, the default "NodeStatuses" value is used. + // Set the value of this object to be a "NodeStatuses" value. + // Optionally specify the 'value' of the "NodeStatuses". If 'value' is + // not specified, the default "NodeStatuses" value is used. ElectorInfo& makeElectorInfo(); ElectorInfo& makeElectorInfo(const ElectorInfo& 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) ElectorInfo& makeElectorInfo(ElectorInfo&& value); #endif - // Set the value of this object to be a "ElectorInfo" value. - // Optionally specify the 'value' of the "ElectorInfo". If 'value' is - // not specified, the default "ElectorInfo" value is used. + // Set the value of this object to be a "ElectorInfo" value. + // Optionally specify the 'value' of the "ElectorInfo". If 'value' is + // not specified, the default "ElectorInfo" value is used. PartitionsInfo& makePartitionsInfo(); PartitionsInfo& makePartitionsInfo(const PartitionsInfo& 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) PartitionsInfo& makePartitionsInfo(PartitionsInfo&& value); #endif - // Set the value of this object to be a "PartitionsInfo" value. - // Optionally specify the 'value' of the "PartitionsInfo". If 'value' - // is not specified, the default "PartitionsInfo" value is used. + // Set the value of this object to be a "PartitionsInfo" value. + // Optionally specify the 'value' of the "PartitionsInfo". If 'value' + // is not specified, the default "PartitionsInfo" value is used. ClusterQueueHelper& makeClusterQueueHelper(); - ClusterQueueHelper& - makeClusterQueueHelper(const ClusterQueueHelper& value); -#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \ - defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) + ClusterQueueHelper& makeClusterQueueHelper(const ClusterQueueHelper& value); +#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \ + && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) ClusterQueueHelper& makeClusterQueueHelper(ClusterQueueHelper&& value); #endif - // Set the value of this object to be a "ClusterQueueHelper" value. - // Optionally specify the 'value' of the "ClusterQueueHelper". If - // 'value' is not specified, the default "ClusterQueueHelper" value is - // used. + // Set the value of this object to be a "ClusterQueueHelper" value. + // Optionally specify the 'value' of the "ClusterQueueHelper". If + // 'value' is not specified, the default "ClusterQueueHelper" value is + // used. StorageContent& makeStorageContent(); StorageContent& makeStorageContent(const StorageContent& 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) StorageContent& makeStorageContent(StorageContent&& value); #endif - // Set the value of this object to be a "StorageContent" value. - // Optionally specify the 'value' of the "StorageContent". If 'value' - // is not specified, the default "StorageContent" value is used. + // Set the value of this object to be a "StorageContent" value. + // Optionally specify the 'value' of the "StorageContent". If 'value' + // is not specified, the default "StorageContent" value is used. ClusterStorageSummary& makeClusterStorageSummary(); - ClusterStorageSummary& - makeClusterStorageSummary(const ClusterStorageSummary& value); -#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \ - defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) - ClusterStorageSummary& - makeClusterStorageSummary(ClusterStorageSummary&& value); -#endif - // Set the value of this object to be a "ClusterStorageSummary" value. - // Optionally specify the 'value' of the "ClusterStorageSummary". If - // 'value' is not specified, the default "ClusterStorageSummary" value - // is used. + ClusterStorageSummary& makeClusterStorageSummary(const ClusterStorageSummary& value); +#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \ + && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) + ClusterStorageSummary& makeClusterStorageSummary(ClusterStorageSummary&& value); +#endif + // Set the value of this object to be a "ClusterStorageSummary" value. + // Optionally specify the 'value' of the "ClusterStorageSummary". If + // 'value' is not specified, the default "ClusterStorageSummary" value + // is used. ClusterDomainQueueStatuses& makeClusterDomainQueueStatuses(); - ClusterDomainQueueStatuses& - makeClusterDomainQueueStatuses(const ClusterDomainQueueStatuses& value); -#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \ - defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) - ClusterDomainQueueStatuses& - makeClusterDomainQueueStatuses(ClusterDomainQueueStatuses&& value); -#endif - // Set the value of this object to be a "ClusterDomainQueueStatuses" - // value. Optionally specify the 'value' of the - // "ClusterDomainQueueStatuses". If 'value' is not specified, the - // default "ClusterDomainQueueStatuses" value is used. + ClusterDomainQueueStatuses& makeClusterDomainQueueStatuses(const ClusterDomainQueueStatuses& value); +#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \ + && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) + ClusterDomainQueueStatuses& makeClusterDomainQueueStatuses(ClusterDomainQueueStatuses&& value); +#endif + // Set the value of this object to be a "ClusterDomainQueueStatuses" + // value. Optionally specify the 'value' of the + // "ClusterDomainQueueStatuses". If 'value' is not specified, the + // default "ClusterDomainQueueStatuses" value is used. BrokerConfig& makeBrokerConfig(); BrokerConfig& makeBrokerConfig(const BrokerConfig& 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) BrokerConfig& makeBrokerConfig(BrokerConfig&& value); #endif - // Set the value of this object to be a "BrokerConfig" value. - // Optionally specify the 'value' of the "BrokerConfig". If 'value' is - // not specified, the default "BrokerConfig" value is used. + // Set the value of this object to be a "BrokerConfig" value. + // Optionally specify the 'value' of the "BrokerConfig". If 'value' is + // not specified, the default "BrokerConfig" 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. Error& error(); - // Return a reference to the modifiable "Error" selection of this - // object if "Error" is the current selection. The behavior is - // undefined unless "Error" is the selection of this object. + // Return a reference to the modifiable "Error" selection of this + // object if "Error" is the current selection. The behavior is + // undefined unless "Error" is the selection of this object. Void& success(); - // Return a reference to the modifiable "Success" selection of this - // object if "Success" is the current selection. The behavior is - // undefined unless "Success" is the selection of this object. + // Return a reference to the modifiable "Success" selection of this + // object if "Success" is the current selection. The behavior is + // undefined unless "Success" is the selection of this object. Value& value(); - // Return a reference to the modifiable "Value" selection of this - // object if "Value" is the current selection. The behavior is - // undefined unless "Value" is the selection of this object. + // Return a reference to the modifiable "Value" selection of this + // object if "Value" is the current selection. The behavior is + // undefined unless "Value" is the selection of this object. Tunable& tunable(); - // Return a reference to the modifiable "Tunable" selection of this - // object if "Tunable" is the current selection. The behavior is - // undefined unless "Tunable" is the selection of this object. + // Return a reference to the modifiable "Tunable" selection of this + // object if "Tunable" is the current selection. The behavior is + // undefined unless "Tunable" is the selection of this object. Tunables& tunables(); - // Return a reference to the modifiable "Tunables" selection of this - // object if "Tunables" is the current selection. The behavior is - // undefined unless "Tunables" is the selection of this object. + // Return a reference to the modifiable "Tunables" selection of this + // object if "Tunables" is the current selection. The behavior is + // undefined unless "Tunables" is the selection of this object. TunableConfirmation& tunableConfirmation(); - // Return a reference to the modifiable "TunableConfirmation" selection - // of this object if "TunableConfirmation" is the current selection. - // The behavior is undefined unless "TunableConfirmation" is the - // selection of this object. + // Return a reference to the modifiable "TunableConfirmation" selection + // of this object if "TunableConfirmation" is the current selection. + // The behavior is undefined unless "TunableConfirmation" is the + // selection of this object. Help& help(); - // Return a reference to the modifiable "Help" selection of this object - // if "Help" is the current selection. The behavior is undefined - // unless "Help" is the selection of this object. + // Return a reference to the modifiable "Help" selection of this object + // if "Help" is the current selection. The behavior is undefined + // unless "Help" is the selection of this object. DomainInfo& domainInfo(); - // Return a reference to the modifiable "DomainInfo" selection of this - // object if "DomainInfo" is the current selection. The behavior is - // undefined unless "DomainInfo" is the selection of this object. + // Return a reference to the modifiable "DomainInfo" selection of this + // object if "DomainInfo" is the current selection. The behavior is + // undefined unless "DomainInfo" is the selection of this object. PurgedQueues& purgedQueues(); - // Return a reference to the modifiable "PurgedQueues" selection of - // this object if "PurgedQueues" is the current selection. The - // behavior is undefined unless "PurgedQueues" is the selection of this - // object. + // Return a reference to the modifiable "PurgedQueues" selection of + // this object if "PurgedQueues" is the current selection. The + // behavior is undefined unless "PurgedQueues" is the selection of this + // object. QueueInternals& queueInternals(); - // Return a reference to the modifiable "QueueInternals" selection of - // this object if "QueueInternals" is the current selection. The - // behavior is undefined unless "QueueInternals" is the selection of - // this object. + // Return a reference to the modifiable "QueueInternals" selection of + // this object if "QueueInternals" is the current selection. The + // behavior is undefined unless "QueueInternals" is the selection of + // this object. MessageGroupIdHelper& messageGroupIdHelper(); - // Return a reference to the modifiable "MessageGroupIdHelper" - // selection of this object if "MessageGroupIdHelper" is the current - // selection. The behavior is undefined unless "MessageGroupIdHelper" - // is the selection of this object. + // Return a reference to the modifiable "MessageGroupIdHelper" + // selection of this object if "MessageGroupIdHelper" is the current + // selection. The behavior is undefined unless "MessageGroupIdHelper" + // is the selection of this object. QueueContents& queueContents(); - // Return a reference to the modifiable "QueueContents" selection of - // this object if "QueueContents" is the current selection. The - // behavior is undefined unless "QueueContents" is the selection of - // this object. + // Return a reference to the modifiable "QueueContents" selection of + // this object if "QueueContents" is the current selection. The + // behavior is undefined unless "QueueContents" is the selection of + // this object. Message& message(); - // Return a reference to the modifiable "Message" selection of this - // object if "Message" is the current selection. The behavior is - // undefined unless "Message" is the selection of this object. + // Return a reference to the modifiable "Message" selection of this + // object if "Message" is the current selection. The behavior is + // undefined unless "Message" is the selection of this object. bsl::string& stats(); - // Return a reference to the modifiable "Stats" selection of this - // object if "Stats" is the current selection. The behavior is - // undefined unless "Stats" is the selection of this object. + // Return a reference to the modifiable "Stats" selection of this + // object if "Stats" is the current selection. The behavior is + // undefined unless "Stats" is the selection of this object. ClusterList& clusterList(); - // Return a reference to the modifiable "ClusterList" selection of this - // object if "ClusterList" is the current selection. The behavior is - // undefined unless "ClusterList" is the selection of this object. + // Return a reference to the modifiable "ClusterList" selection of this + // object if "ClusterList" is the current selection. The behavior is + // undefined unless "ClusterList" is the selection of this object. ClusterStatus& clusterStatus(); - // Return a reference to the modifiable "ClusterStatus" selection of - // this object if "ClusterStatus" is the current selection. The - // behavior is undefined unless "ClusterStatus" is the selection of - // this object. + // Return a reference to the modifiable "ClusterStatus" selection of + // this object if "ClusterStatus" is the current selection. The + // behavior is undefined unless "ClusterStatus" is the selection of + // this object. ClusterProxyStatus& clusterProxyStatus(); - // Return a reference to the modifiable "ClusterProxyStatus" selection - // of this object if "ClusterProxyStatus" is the current selection. - // The behavior is undefined unless "ClusterProxyStatus" is the - // selection of this object. + // Return a reference to the modifiable "ClusterProxyStatus" selection + // of this object if "ClusterProxyStatus" is the current selection. + // The behavior is undefined unless "ClusterProxyStatus" is the + // selection of this object. NodeStatuses& nodeStatuses(); - // Return a reference to the modifiable "NodeStatuses" selection of - // this object if "NodeStatuses" is the current selection. The - // behavior is undefined unless "NodeStatuses" is the selection of this - // object. + // Return a reference to the modifiable "NodeStatuses" selection of + // this object if "NodeStatuses" is the current selection. The + // behavior is undefined unless "NodeStatuses" is the selection of this + // object. ElectorInfo& electorInfo(); - // Return a reference to the modifiable "ElectorInfo" selection of this - // object if "ElectorInfo" is the current selection. The behavior is - // undefined unless "ElectorInfo" is the selection of this object. + // Return a reference to the modifiable "ElectorInfo" selection of this + // object if "ElectorInfo" is the current selection. The behavior is + // undefined unless "ElectorInfo" is the selection of this object. PartitionsInfo& partitionsInfo(); - // Return a reference to the modifiable "PartitionsInfo" selection of - // this object if "PartitionsInfo" is the current selection. The - // behavior is undefined unless "PartitionsInfo" is the selection of - // this object. + // Return a reference to the modifiable "PartitionsInfo" selection of + // this object if "PartitionsInfo" is the current selection. The + // behavior is undefined unless "PartitionsInfo" is the selection of + // this object. ClusterQueueHelper& clusterQueueHelper(); - // Return a reference to the modifiable "ClusterQueueHelper" selection - // of this object if "ClusterQueueHelper" is the current selection. - // The behavior is undefined unless "ClusterQueueHelper" is the - // selection of this object. + // Return a reference to the modifiable "ClusterQueueHelper" selection + // of this object if "ClusterQueueHelper" is the current selection. + // The behavior is undefined unless "ClusterQueueHelper" is the + // selection of this object. StorageContent& storageContent(); - // Return a reference to the modifiable "StorageContent" selection of - // this object if "StorageContent" is the current selection. The - // behavior is undefined unless "StorageContent" is the selection of - // this object. + // Return a reference to the modifiable "StorageContent" selection of + // this object if "StorageContent" is the current selection. The + // behavior is undefined unless "StorageContent" is the selection of + // this object. ClusterStorageSummary& clusterStorageSummary(); - // Return a reference to the modifiable "ClusterStorageSummary" - // selection of this object if "ClusterStorageSummary" is the current - // selection. The behavior is undefined unless "ClusterStorageSummary" - // is the selection of this object. + // Return a reference to the modifiable "ClusterStorageSummary" + // selection of this object if "ClusterStorageSummary" is the current + // selection. The behavior is undefined unless "ClusterStorageSummary" + // is the selection of this object. ClusterDomainQueueStatuses& clusterDomainQueueStatuses(); - // Return a reference to the modifiable "ClusterDomainQueueStatuses" - // selection of this object if "ClusterDomainQueueStatuses" is the - // current selection. The behavior is undefined unless - // "ClusterDomainQueueStatuses" is the selection of this object. + // Return a reference to the modifiable "ClusterDomainQueueStatuses" + // selection of this object if "ClusterDomainQueueStatuses" is the + // current selection. The behavior is undefined unless + // "ClusterDomainQueueStatuses" is the selection of this object. BrokerConfig& brokerConfig(); - // Return a reference to the modifiable "BrokerConfig" selection of - // this object if "BrokerConfig" is the current selection. The - // behavior is undefined unless "BrokerConfig" is the selection of this - // object. + // Return a reference to the modifiable "BrokerConfig" selection of + // this object if "BrokerConfig" is the current selection. The + // behavior is undefined unless "BrokerConfig" 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 Error& error() const; - // Return a reference to the non-modifiable "Error" selection of this - // object if "Error" is the current selection. The behavior is - // undefined unless "Error" is the selection of this object. + // Return a reference to the non-modifiable "Error" selection of this + // object if "Error" is the current selection. The behavior is + // undefined unless "Error" is the selection of this object. const Void& success() const; - // Return a reference to the non-modifiable "Success" selection of this - // object if "Success" is the current selection. The behavior is - // undefined unless "Success" is the selection of this object. + // Return a reference to the non-modifiable "Success" selection of this + // object if "Success" is the current selection. The behavior is + // undefined unless "Success" is the selection of this object. const Value& value() const; - // Return a reference to the non-modifiable "Value" selection of this - // object if "Value" is the current selection. The behavior is - // undefined unless "Value" is the selection of this object. + // Return a reference to the non-modifiable "Value" selection of this + // object if "Value" is the current selection. The behavior is + // undefined unless "Value" is the selection of this object. const Tunable& tunable() const; - // Return a reference to the non-modifiable "Tunable" selection of this - // object if "Tunable" is the current selection. The behavior is - // undefined unless "Tunable" is the selection of this object. + // Return a reference to the non-modifiable "Tunable" selection of this + // object if "Tunable" is the current selection. The behavior is + // undefined unless "Tunable" is the selection of this object. const Tunables& tunables() const; - // Return a reference to the non-modifiable "Tunables" selection of - // this object if "Tunables" is the current selection. The behavior is - // undefined unless "Tunables" is the selection of this object. + // Return a reference to the non-modifiable "Tunables" selection of + // this object if "Tunables" is the current selection. The behavior is + // undefined unless "Tunables" is the selection of this object. const TunableConfirmation& tunableConfirmation() const; - // Return a reference to the non-modifiable "TunableConfirmation" - // selection of this object if "TunableConfirmation" is the current - // selection. The behavior is undefined unless "TunableConfirmation" - // is the selection of this object. + // Return a reference to the non-modifiable "TunableConfirmation" + // selection of this object if "TunableConfirmation" is the current + // selection. The behavior is undefined unless "TunableConfirmation" + // is the selection of this object. const Help& help() const; - // Return a reference to the non-modifiable "Help" selection of this - // object if "Help" is the current selection. The behavior is - // undefined unless "Help" is the selection of this object. + // Return a reference to the non-modifiable "Help" selection of this + // object if "Help" is the current selection. The behavior is + // undefined unless "Help" is the selection of this object. const DomainInfo& domainInfo() const; - // Return a reference to the non-modifiable "DomainInfo" selection of - // this object if "DomainInfo" is the current selection. The behavior - // is undefined unless "DomainInfo" is the selection of this object. + // Return a reference to the non-modifiable "DomainInfo" selection of + // this object if "DomainInfo" is the current selection. The behavior + // is undefined unless "DomainInfo" is the selection of this object. const PurgedQueues& purgedQueues() const; - // Return a reference to the non-modifiable "PurgedQueues" selection of - // this object if "PurgedQueues" is the current selection. The - // behavior is undefined unless "PurgedQueues" is the selection of this - // object. + // Return a reference to the non-modifiable "PurgedQueues" selection of + // this object if "PurgedQueues" is the current selection. The + // behavior is undefined unless "PurgedQueues" is the selection of this + // object. const QueueInternals& queueInternals() const; - // Return a reference to the non-modifiable "QueueInternals" selection - // of this object if "QueueInternals" is the current selection. The - // behavior is undefined unless "QueueInternals" is the selection of - // this object. + // Return a reference to the non-modifiable "QueueInternals" selection + // of this object if "QueueInternals" is the current selection. The + // behavior is undefined unless "QueueInternals" is the selection of + // this object. const MessageGroupIdHelper& messageGroupIdHelper() const; - // Return a reference to the non-modifiable "MessageGroupIdHelper" - // selection of this object if "MessageGroupIdHelper" is the current - // selection. The behavior is undefined unless "MessageGroupIdHelper" - // is the selection of this object. + // Return a reference to the non-modifiable "MessageGroupIdHelper" + // selection of this object if "MessageGroupIdHelper" is the current + // selection. The behavior is undefined unless "MessageGroupIdHelper" + // is the selection of this object. const QueueContents& queueContents() const; - // Return a reference to the non-modifiable "QueueContents" selection - // of this object if "QueueContents" is the current selection. The - // behavior is undefined unless "QueueContents" is the selection of - // this object. + // Return a reference to the non-modifiable "QueueContents" selection + // of this object if "QueueContents" is the current selection. The + // behavior is undefined unless "QueueContents" is the selection of + // this object. const Message& message() const; - // Return a reference to the non-modifiable "Message" selection of this - // object if "Message" is the current selection. The behavior is - // undefined unless "Message" is the selection of this object. + // Return a reference to the non-modifiable "Message" selection of this + // object if "Message" is the current selection. The behavior is + // undefined unless "Message" is the selection of this object. const bsl::string& stats() const; - // Return a reference to the non-modifiable "Stats" selection of this - // object if "Stats" is the current selection. The behavior is - // undefined unless "Stats" is the selection of this object. + // Return a reference to the non-modifiable "Stats" selection of this + // object if "Stats" is the current selection. The behavior is + // undefined unless "Stats" is the selection of this object. const ClusterList& clusterList() const; - // Return a reference to the non-modifiable "ClusterList" selection of - // this object if "ClusterList" is the current selection. The behavior - // is undefined unless "ClusterList" is the selection of this object. + // Return a reference to the non-modifiable "ClusterList" selection of + // this object if "ClusterList" is the current selection. The behavior + // is undefined unless "ClusterList" is the selection of this object. const ClusterStatus& clusterStatus() const; - // Return a reference to the non-modifiable "ClusterStatus" selection - // of this object if "ClusterStatus" is the current selection. The - // behavior is undefined unless "ClusterStatus" is the selection of - // this object. + // Return a reference to the non-modifiable "ClusterStatus" selection + // of this object if "ClusterStatus" is the current selection. The + // behavior is undefined unless "ClusterStatus" is the selection of + // this object. const ClusterProxyStatus& clusterProxyStatus() const; - // Return a reference to the non-modifiable "ClusterProxyStatus" - // selection of this object if "ClusterProxyStatus" is the current - // selection. The behavior is undefined unless "ClusterProxyStatus" is - // the selection of this object. + // Return a reference to the non-modifiable "ClusterProxyStatus" + // selection of this object if "ClusterProxyStatus" is the current + // selection. The behavior is undefined unless "ClusterProxyStatus" is + // the selection of this object. const NodeStatuses& nodeStatuses() const; - // Return a reference to the non-modifiable "NodeStatuses" selection of - // this object if "NodeStatuses" is the current selection. The - // behavior is undefined unless "NodeStatuses" is the selection of this - // object. + // Return a reference to the non-modifiable "NodeStatuses" selection of + // this object if "NodeStatuses" is the current selection. The + // behavior is undefined unless "NodeStatuses" is the selection of this + // object. const ElectorInfo& electorInfo() const; - // Return a reference to the non-modifiable "ElectorInfo" selection of - // this object if "ElectorInfo" is the current selection. The behavior - // is undefined unless "ElectorInfo" is the selection of this object. + // Return a reference to the non-modifiable "ElectorInfo" selection of + // this object if "ElectorInfo" is the current selection. The behavior + // is undefined unless "ElectorInfo" is the selection of this object. const PartitionsInfo& partitionsInfo() const; - // Return a reference to the non-modifiable "PartitionsInfo" selection - // of this object if "PartitionsInfo" is the current selection. The - // behavior is undefined unless "PartitionsInfo" is the selection of - // this object. + // Return a reference to the non-modifiable "PartitionsInfo" selection + // of this object if "PartitionsInfo" is the current selection. The + // behavior is undefined unless "PartitionsInfo" is the selection of + // this object. const ClusterQueueHelper& clusterQueueHelper() const; - // Return a reference to the non-modifiable "ClusterQueueHelper" - // selection of this object if "ClusterQueueHelper" is the current - // selection. The behavior is undefined unless "ClusterQueueHelper" is - // the selection of this object. + // Return a reference to the non-modifiable "ClusterQueueHelper" + // selection of this object if "ClusterQueueHelper" is the current + // selection. The behavior is undefined unless "ClusterQueueHelper" is + // the selection of this object. const StorageContent& storageContent() const; - // Return a reference to the non-modifiable "StorageContent" selection - // of this object if "StorageContent" is the current selection. The - // behavior is undefined unless "StorageContent" is the selection of - // this object. + // Return a reference to the non-modifiable "StorageContent" selection + // of this object if "StorageContent" is the current selection. The + // behavior is undefined unless "StorageContent" is the selection of + // this object. const ClusterStorageSummary& clusterStorageSummary() const; - // Return a reference to the non-modifiable "ClusterStorageSummary" - // selection of this object if "ClusterStorageSummary" is the current - // selection. The behavior is undefined unless "ClusterStorageSummary" - // is the selection of this object. + // Return a reference to the non-modifiable "ClusterStorageSummary" + // selection of this object if "ClusterStorageSummary" is the current + // selection. The behavior is undefined unless "ClusterStorageSummary" + // is the selection of this object. const ClusterDomainQueueStatuses& clusterDomainQueueStatuses() const; - // Return a reference to the non-modifiable - // "ClusterDomainQueueStatuses" selection of this object if - // "ClusterDomainQueueStatuses" is the current selection. The behavior - // is undefined unless "ClusterDomainQueueStatuses" is the selection of - // this object. + // Return a reference to the non-modifiable + // "ClusterDomainQueueStatuses" selection of this object if + // "ClusterDomainQueueStatuses" is the current selection. The behavior + // is undefined unless "ClusterDomainQueueStatuses" is the selection of + // this object. const BrokerConfig& brokerConfig() const; - // Return a reference to the non-modifiable "BrokerConfig" selection of - // this object if "BrokerConfig" is the current selection. The - // behavior is undefined unless "BrokerConfig" is the selection of this - // object. + // Return a reference to the non-modifiable "BrokerConfig" selection of + // this object if "BrokerConfig" is the current selection. The + // behavior is undefined unless "BrokerConfig" is the selection of this + // object. bool isErrorValue() const; - // Return 'true' if the value of this object is a "Error" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Error" value, and + // return 'false' otherwise. bool isSuccessValue() const; - // Return 'true' if the value of this object is a "Success" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Success" value, and + // return 'false' otherwise. bool isValueValue() const; - // Return 'true' if the value of this object is a "Value" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Value" value, and + // return 'false' otherwise. bool isTunableValue() const; - // Return 'true' if the value of this object is a "Tunable" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Tunable" value, and + // return 'false' otherwise. bool isTunablesValue() const; - // Return 'true' if the value of this object is a "Tunables" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Tunables" value, and + // return 'false' otherwise. bool isTunableConfirmationValue() const; - // Return 'true' if the value of this object is a "TunableConfirmation" - // value, and return 'false' otherwise. + // Return 'true' if the value of this object is a "TunableConfirmation" + // value, and return 'false' otherwise. bool isHelpValue() const; - // Return 'true' if the value of this object is a "Help" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Help" value, and + // return 'false' otherwise. bool isDomainInfoValue() const; - // Return 'true' if the value of this object is a "DomainInfo" value, - // and return 'false' otherwise. + // Return 'true' if the value of this object is a "DomainInfo" value, + // and return 'false' otherwise. bool isPurgedQueuesValue() const; - // Return 'true' if the value of this object is a "PurgedQueues" value, - // and return 'false' otherwise. + // Return 'true' if the value of this object is a "PurgedQueues" value, + // and return 'false' otherwise. bool isQueueInternalsValue() const; - // Return 'true' if the value of this object is a "QueueInternals" - // value, and return 'false' otherwise. + // Return 'true' if the value of this object is a "QueueInternals" + // value, and return 'false' otherwise. bool isMessageGroupIdHelperValue() const; - // Return 'true' if the value of this object is a - // "MessageGroupIdHelper" value, and return 'false' otherwise. + // Return 'true' if the value of this object is a + // "MessageGroupIdHelper" value, and return 'false' otherwise. bool isQueueContentsValue() const; - // Return 'true' if the value of this object is a "QueueContents" - // value, and return 'false' otherwise. + // Return 'true' if the value of this object is a "QueueContents" + // value, and return 'false' otherwise. bool isMessageValue() const; - // Return 'true' if the value of this object is a "Message" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Message" value, and + // return 'false' otherwise. bool isStatsValue() const; - // Return 'true' if the value of this object is a "Stats" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Stats" value, and + // return 'false' otherwise. bool isClusterListValue() const; - // Return 'true' if the value of this object is a "ClusterList" value, - // and return 'false' otherwise. + // Return 'true' if the value of this object is a "ClusterList" value, + // and return 'false' otherwise. bool isClusterStatusValue() const; - // Return 'true' if the value of this object is a "ClusterStatus" - // value, and return 'false' otherwise. + // Return 'true' if the value of this object is a "ClusterStatus" + // value, and return 'false' otherwise. bool isClusterProxyStatusValue() const; - // Return 'true' if the value of this object is a "ClusterProxyStatus" - // value, and return 'false' otherwise. + // Return 'true' if the value of this object is a "ClusterProxyStatus" + // value, and return 'false' otherwise. bool isNodeStatusesValue() const; - // Return 'true' if the value of this object is a "NodeStatuses" value, - // and return 'false' otherwise. + // Return 'true' if the value of this object is a "NodeStatuses" value, + // and return 'false' otherwise. bool isElectorInfoValue() const; - // Return 'true' if the value of this object is a "ElectorInfo" value, - // and return 'false' otherwise. + // Return 'true' if the value of this object is a "ElectorInfo" value, + // and return 'false' otherwise. bool isPartitionsInfoValue() const; - // Return 'true' if the value of this object is a "PartitionsInfo" - // value, and return 'false' otherwise. + // Return 'true' if the value of this object is a "PartitionsInfo" + // value, and return 'false' otherwise. bool isClusterQueueHelperValue() const; - // Return 'true' if the value of this object is a "ClusterQueueHelper" - // value, and return 'false' otherwise. + // Return 'true' if the value of this object is a "ClusterQueueHelper" + // value, and return 'false' otherwise. bool isStorageContentValue() const; - // Return 'true' if the value of this object is a "StorageContent" - // value, and return 'false' otherwise. + // Return 'true' if the value of this object is a "StorageContent" + // value, and return 'false' otherwise. bool isClusterStorageSummaryValue() const; - // Return 'true' if the value of this object is a - // "ClusterStorageSummary" value, and return 'false' otherwise. + // Return 'true' if the value of this object is a + // "ClusterStorageSummary" value, and return 'false' otherwise. bool isClusterDomainQueueStatusesValue() const; - // Return 'true' if the value of this object is a - // "ClusterDomainQueueStatuses" value, and return 'false' otherwise. + // Return 'true' if the value of this object is a + // "ClusterDomainQueueStatuses" value, and return 'false' otherwise. bool isBrokerConfigValue() const; - // Return 'true' if the value of this object is a "BrokerConfig" value, - // and return 'false' otherwise. + // Return 'true' if the value of this object is a "BrokerConfig" 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 Result& lhs, const Result& rhs) - // Return 'true' if the specified 'lhs' and 'rhs' objects have the same - // value, and 'false' otherwise. Two 'Result' 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 'Result' 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 Result& lhs, const Result& 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 Result& 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 Result& 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 'Result'. + // 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 'Result'. { return object.hashAppendImpl(hashAlg); } @@ -29915,22 +30587,23 @@ BDLAT_DECL_CHOICE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::Result) namespace mqbcmd { -// ================== -// class DomainResult -// ================== + // ================== + // class DomainResult + // ================== class DomainResult { + // INSTANCE DATA union { - bsls::ObjectBuffer d_success; - bsls::ObjectBuffer d_error; - bsls::ObjectBuffer d_domainInfo; - bsls::ObjectBuffer d_purgedQueues; - bsls::ObjectBuffer d_queueResult; + bsls::ObjectBuffer< Void > d_success; + bsls::ObjectBuffer< Error > d_error; + bsls::ObjectBuffer< DomainInfo > d_domainInfo; + bsls::ObjectBuffer< PurgedQueues > d_purgedQueues; + bsls::ObjectBuffer< QueueResult > d_queueResult; }; - int d_selectionId; - bslma::Allocator* d_allocator_p; + int d_selectionId; + bslma::Allocator *d_allocator_p; // PRIVATE ACCESSORS template @@ -29942,22 +30615,24 @@ class DomainResult { // TYPES enum { - SELECTION_ID_UNDEFINED = -1, - SELECTION_ID_SUCCESS = 0, - SELECTION_ID_ERROR = 1, - SELECTION_ID_DOMAIN_INFO = 2, - SELECTION_ID_PURGED_QUEUES = 3, - SELECTION_ID_QUEUE_RESULT = 4 + SELECTION_ID_UNDEFINED = -1 + , SELECTION_ID_SUCCESS = 0 + , SELECTION_ID_ERROR = 1 + , SELECTION_ID_DOMAIN_INFO = 2 + , SELECTION_ID_PURGED_QUEUES = 3 + , SELECTION_ID_QUEUE_RESULT = 4 }; - enum { NUM_SELECTIONS = 5 }; + enum { + NUM_SELECTIONS = 5 + }; enum { - SELECTION_INDEX_SUCCESS = 0, - SELECTION_INDEX_ERROR = 1, - SELECTION_INDEX_DOMAIN_INFO = 2, - SELECTION_INDEX_PURGED_QUEUES = 3, - SELECTION_INDEX_QUEUE_RESULT = 4 + SELECTION_INDEX_SUCCESS = 0 + , SELECTION_INDEX_ERROR = 1 + , SELECTION_INDEX_DOMAIN_INFO = 2 + , SELECTION_INDEX_PURGED_QUEUES = 3 + , SELECTION_INDEX_QUEUE_RESULT = 4 }; // CONSTANTS @@ -29966,261 +30641,264 @@ class DomainResult { 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 DomainResult(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'DomainResult' having the default value. - // Use the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit DomainResult(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'DomainResult' having the default value. + // Use the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. DomainResult(const DomainResult& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'DomainResult' 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 'DomainResult' 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) DomainResult(DomainResult&& original) noexcept; - // Create an object of type 'DomainResult' 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 'DomainResult' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - DomainResult(DomainResult&& original, bslma::Allocator* basicAllocator); - // Create an object of type 'DomainResult' 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. + DomainResult(DomainResult&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'DomainResult' 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 ~DomainResult(); - // Destroy this object. + // Destroy this object. // MANIPULATORS DomainResult& operator=(const DomainResult& 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) DomainResult& operator=(DomainResult&& 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). Void& makeSuccess(); Void& makeSuccess(const Void& 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) Void& makeSuccess(Void&& value); #endif - // Set the value of this object to be a "Success" value. Optionally - // specify the 'value' of the "Success". If 'value' is not specified, - // the default "Success" value is used. + // Set the value of this object to be a "Success" value. Optionally + // specify the 'value' of the "Success". If 'value' is not specified, + // the default "Success" value is used. Error& makeError(); Error& makeError(const Error& 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) Error& makeError(Error&& value); #endif - // Set the value of this object to be a "Error" value. Optionally - // specify the 'value' of the "Error". If 'value' is not specified, - // the default "Error" value is used. + // Set the value of this object to be a "Error" value. Optionally + // specify the 'value' of the "Error". If 'value' is not specified, + // the default "Error" value is used. DomainInfo& makeDomainInfo(); DomainInfo& makeDomainInfo(const DomainInfo& 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) DomainInfo& makeDomainInfo(DomainInfo&& value); #endif - // Set the value of this object to be a "DomainInfo" value. Optionally - // specify the 'value' of the "DomainInfo". If 'value' is not - // specified, the default "DomainInfo" value is used. + // Set the value of this object to be a "DomainInfo" value. Optionally + // specify the 'value' of the "DomainInfo". If 'value' is not + // specified, the default "DomainInfo" value is used. PurgedQueues& makePurgedQueues(); PurgedQueues& makePurgedQueues(const PurgedQueues& 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) PurgedQueues& makePurgedQueues(PurgedQueues&& value); #endif - // Set the value of this object to be a "PurgedQueues" value. - // Optionally specify the 'value' of the "PurgedQueues". If 'value' is - // not specified, the default "PurgedQueues" value is used. + // Set the value of this object to be a "PurgedQueues" value. + // Optionally specify the 'value' of the "PurgedQueues". If 'value' is + // not specified, the default "PurgedQueues" value is used. QueueResult& makeQueueResult(); QueueResult& makeQueueResult(const QueueResult& 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) QueueResult& makeQueueResult(QueueResult&& value); #endif - // Set the value of this object to be a "QueueResult" value. - // Optionally specify the 'value' of the "QueueResult". If 'value' is - // not specified, the default "QueueResult" value is used. + // Set the value of this object to be a "QueueResult" value. + // Optionally specify the 'value' of the "QueueResult". If 'value' is + // not specified, the default "QueueResult" 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. Void& success(); - // Return a reference to the modifiable "Success" selection of this - // object if "Success" is the current selection. The behavior is - // undefined unless "Success" is the selection of this object. + // Return a reference to the modifiable "Success" selection of this + // object if "Success" is the current selection. The behavior is + // undefined unless "Success" is the selection of this object. Error& error(); - // Return a reference to the modifiable "Error" selection of this - // object if "Error" is the current selection. The behavior is - // undefined unless "Error" is the selection of this object. + // Return a reference to the modifiable "Error" selection of this + // object if "Error" is the current selection. The behavior is + // undefined unless "Error" is the selection of this object. DomainInfo& domainInfo(); - // Return a reference to the modifiable "DomainInfo" selection of this - // object if "DomainInfo" is the current selection. The behavior is - // undefined unless "DomainInfo" is the selection of this object. + // Return a reference to the modifiable "DomainInfo" selection of this + // object if "DomainInfo" is the current selection. The behavior is + // undefined unless "DomainInfo" is the selection of this object. PurgedQueues& purgedQueues(); - // Return a reference to the modifiable "PurgedQueues" selection of - // this object if "PurgedQueues" is the current selection. The - // behavior is undefined unless "PurgedQueues" is the selection of this - // object. + // Return a reference to the modifiable "PurgedQueues" selection of + // this object if "PurgedQueues" is the current selection. The + // behavior is undefined unless "PurgedQueues" is the selection of this + // object. QueueResult& queueResult(); - // Return a reference to the modifiable "QueueResult" selection of this - // object if "QueueResult" is the current selection. The behavior is - // undefined unless "QueueResult" is the selection of this object. + // Return a reference to the modifiable "QueueResult" selection of this + // object if "QueueResult" is the current selection. The behavior is + // undefined unless "QueueResult" 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 Void& success() const; - // Return a reference to the non-modifiable "Success" selection of this - // object if "Success" is the current selection. The behavior is - // undefined unless "Success" is the selection of this object. + // Return a reference to the non-modifiable "Success" selection of this + // object if "Success" is the current selection. The behavior is + // undefined unless "Success" is the selection of this object. const Error& error() const; - // Return a reference to the non-modifiable "Error" selection of this - // object if "Error" is the current selection. The behavior is - // undefined unless "Error" is the selection of this object. + // Return a reference to the non-modifiable "Error" selection of this + // object if "Error" is the current selection. The behavior is + // undefined unless "Error" is the selection of this object. const DomainInfo& domainInfo() const; - // Return a reference to the non-modifiable "DomainInfo" selection of - // this object if "DomainInfo" is the current selection. The behavior - // is undefined unless "DomainInfo" is the selection of this object. + // Return a reference to the non-modifiable "DomainInfo" selection of + // this object if "DomainInfo" is the current selection. The behavior + // is undefined unless "DomainInfo" is the selection of this object. const PurgedQueues& purgedQueues() const; - // Return a reference to the non-modifiable "PurgedQueues" selection of - // this object if "PurgedQueues" is the current selection. The - // behavior is undefined unless "PurgedQueues" is the selection of this - // object. + // Return a reference to the non-modifiable "PurgedQueues" selection of + // this object if "PurgedQueues" is the current selection. The + // behavior is undefined unless "PurgedQueues" is the selection of this + // object. const QueueResult& queueResult() const; - // Return a reference to the non-modifiable "QueueResult" selection of - // this object if "QueueResult" is the current selection. The behavior - // is undefined unless "QueueResult" is the selection of this object. + // Return a reference to the non-modifiable "QueueResult" selection of + // this object if "QueueResult" is the current selection. The behavior + // is undefined unless "QueueResult" is the selection of this object. bool isSuccessValue() const; - // Return 'true' if the value of this object is a "Success" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Success" value, and + // return 'false' otherwise. bool isErrorValue() const; - // Return 'true' if the value of this object is a "Error" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Error" value, and + // return 'false' otherwise. bool isDomainInfoValue() const; - // Return 'true' if the value of this object is a "DomainInfo" value, - // and return 'false' otherwise. + // Return 'true' if the value of this object is a "DomainInfo" value, + // and return 'false' otherwise. bool isPurgedQueuesValue() const; - // Return 'true' if the value of this object is a "PurgedQueues" value, - // and return 'false' otherwise. + // Return 'true' if the value of this object is a "PurgedQueues" value, + // and return 'false' otherwise. bool isQueueResultValue() const; - // Return 'true' if the value of this object is a "QueueResult" value, - // and return 'false' otherwise. + // Return 'true' if the value of this object is a "QueueResult" 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 DomainResult& lhs, const DomainResult& rhs) - // Return 'true' if the specified 'lhs' and 'rhs' objects have the same - // value, and 'false' otherwise. Two 'DomainResult' 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 'DomainResult' 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 DomainResult& lhs, const DomainResult& 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 DomainResult& 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); } @@ -30228,10 +30906,10 @@ class DomainResult { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const DomainResult& 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 - // 'DomainResult'. + // 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 + // 'DomainResult'. { return object.hashAppendImpl(hashAlg); } @@ -30245,26 +30923,31 @@ BDLAT_DECL_CHOICE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::DomainResult) namespace mqbcmd { -// ========================= -// class RouteResponseResult -// ========================= + // ========================= + // class RouteResponseResult + // ========================= class RouteResponseResult { // A response from a routed command containing the decoded result. // INSTANCE DATA - bsl::string d_sourceNodeDescription; - Result d_result; + bsl::string d_sourceNodeDescription; + Result d_result; public: // TYPES - enum { ATTRIBUTE_ID_SOURCE_NODE_DESCRIPTION = 0, ATTRIBUTE_ID_RESULT = 1 }; + enum { + ATTRIBUTE_ID_SOURCE_NODE_DESCRIPTION = 0 + , ATTRIBUTE_ID_RESULT = 1 + }; - enum { NUM_ATTRIBUTES = 2 }; + enum { + NUM_ATTRIBUTES = 2 + }; enum { - ATTRIBUTE_INDEX_SOURCE_NODE_DESCRIPTION = 0, - ATTRIBUTE_INDEX_RESULT = 1 + ATTRIBUTE_INDEX_SOURCE_NODE_DESCRIPTION = 0 + , ATTRIBUTE_INDEX_RESULT = 1 }; // CONSTANTS @@ -30274,160 +30957,162 @@ class RouteResponseResult { 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 RouteResponseResult(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'RouteResponseResult' having the default - // value. Use the optionally specified 'basicAllocator' to supply - // memory. If 'basicAllocator' is 0, the currently installed default - // allocator is used. + explicit RouteResponseResult(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'RouteResponseResult' having the default + // value. Use the optionally specified 'basicAllocator' to supply + // memory. If 'basicAllocator' is 0, the currently installed default + // allocator is used. RouteResponseResult(const RouteResponseResult& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'RouteResponseResult' 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 'RouteResponseResult' 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) RouteResponseResult(RouteResponseResult&& original) noexcept; - // Create an object of type 'RouteResponseResult' 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 'RouteResponseResult' having the value of + // the specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. RouteResponseResult(RouteResponseResult&& original, - bslma::Allocator* basicAllocator); - // Create an object of type 'RouteResponseResult' 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 'RouteResponseResult' 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 ~RouteResponseResult(); - // Destroy this object. + // Destroy this object. // MANIPULATORS RouteResponseResult& operator=(const RouteResponseResult& 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) RouteResponseResult& operator=(RouteResponseResult&& 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. Result& result(); - // Return a reference to the modifiable "Result" attribute of this - // object. + // Return a reference to the modifiable "Result" 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 Result& result() const; - // Return a reference offering non-modifiable access to the "Result" - // attribute of this object. + // Return a reference offering non-modifiable access to the "Result" + // attribute of this object. // HIDDEN FRIENDS friend bool operator==(const RouteResponseResult& lhs, const RouteResponseResult& 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.result() == rhs.result(); @@ -30435,15 +31120,15 @@ class RouteResponseResult { friend bool operator!=(const RouteResponseResult& lhs, const RouteResponseResult& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const RouteResponseResult& 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); } @@ -30451,10 +31136,10 @@ class RouteResponseResult { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const RouteResponseResult& 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 - // 'RouteResponseResult'. + // 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 + // 'RouteResponseResult'. { using bslh::hashAppend; hashAppend(hashAlg, object.sourceNodeDescription()); @@ -30466,25 +31151,25 @@ class RouteResponseResult { // TRAITS -BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS( - mqbcmd::RouteResponseResult) +BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::RouteResponseResult) namespace mqbcmd { -// =================== -// class DomainsResult -// =================== + // =================== + // class DomainsResult + // =================== class DomainsResult { + // INSTANCE DATA union { - bsls::ObjectBuffer d_success; - bsls::ObjectBuffer d_error; - bsls::ObjectBuffer d_domainResult; + bsls::ObjectBuffer< Void > d_success; + bsls::ObjectBuffer< Error > d_error; + bsls::ObjectBuffer< DomainResult > d_domainResult; }; - int d_selectionId; - bslma::Allocator* d_allocator_p; + int d_selectionId; + bslma::Allocator *d_allocator_p; // PRIVATE ACCESSORS template @@ -30496,18 +31181,20 @@ class DomainsResult { // TYPES enum { - SELECTION_ID_UNDEFINED = -1, - SELECTION_ID_SUCCESS = 0, - SELECTION_ID_ERROR = 1, - SELECTION_ID_DOMAIN_RESULT = 2 + SELECTION_ID_UNDEFINED = -1 + , SELECTION_ID_SUCCESS = 0 + , SELECTION_ID_ERROR = 1 + , SELECTION_ID_DOMAIN_RESULT = 2 }; - enum { NUM_SELECTIONS = 3 }; + enum { + NUM_SELECTIONS = 3 + }; enum { - SELECTION_INDEX_SUCCESS = 0, - SELECTION_INDEX_ERROR = 1, - SELECTION_INDEX_DOMAIN_RESULT = 2 + SELECTION_INDEX_SUCCESS = 0 + , SELECTION_INDEX_ERROR = 1 + , SELECTION_INDEX_DOMAIN_RESULT = 2 }; // CONSTANTS @@ -30516,213 +31203,216 @@ class DomainsResult { 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 DomainsResult(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'DomainsResult' having the default value. - // Use the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit DomainsResult(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'DomainsResult' having the default value. + // Use the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. DomainsResult(const DomainsResult& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'DomainsResult' 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 'DomainsResult' 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) DomainsResult(DomainsResult&& original) noexcept; - // Create an object of type 'DomainsResult' 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 'DomainsResult' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - DomainsResult(DomainsResult&& original, bslma::Allocator* basicAllocator); - // Create an object of type 'DomainsResult' 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. + DomainsResult(DomainsResult&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'DomainsResult' 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 ~DomainsResult(); - // Destroy this object. + // Destroy this object. // MANIPULATORS DomainsResult& operator=(const DomainsResult& 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) DomainsResult& operator=(DomainsResult&& 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). Void& makeSuccess(); Void& makeSuccess(const Void& 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) Void& makeSuccess(Void&& value); #endif - // Set the value of this object to be a "Success" value. Optionally - // specify the 'value' of the "Success". If 'value' is not specified, - // the default "Success" value is used. + // Set the value of this object to be a "Success" value. Optionally + // specify the 'value' of the "Success". If 'value' is not specified, + // the default "Success" value is used. Error& makeError(); Error& makeError(const Error& 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) Error& makeError(Error&& value); #endif - // Set the value of this object to be a "Error" value. Optionally - // specify the 'value' of the "Error". If 'value' is not specified, - // the default "Error" value is used. + // Set the value of this object to be a "Error" value. Optionally + // specify the 'value' of the "Error". If 'value' is not specified, + // the default "Error" value is used. DomainResult& makeDomainResult(); DomainResult& makeDomainResult(const DomainResult& 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) DomainResult& makeDomainResult(DomainResult&& value); #endif - // Set the value of this object to be a "DomainResult" value. - // Optionally specify the 'value' of the "DomainResult". If 'value' is - // not specified, the default "DomainResult" value is used. + // Set the value of this object to be a "DomainResult" value. + // Optionally specify the 'value' of the "DomainResult". If 'value' is + // not specified, the default "DomainResult" 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. Void& success(); - // Return a reference to the modifiable "Success" selection of this - // object if "Success" is the current selection. The behavior is - // undefined unless "Success" is the selection of this object. + // Return a reference to the modifiable "Success" selection of this + // object if "Success" is the current selection. The behavior is + // undefined unless "Success" is the selection of this object. Error& error(); - // Return a reference to the modifiable "Error" selection of this - // object if "Error" is the current selection. The behavior is - // undefined unless "Error" is the selection of this object. + // Return a reference to the modifiable "Error" selection of this + // object if "Error" is the current selection. The behavior is + // undefined unless "Error" is the selection of this object. DomainResult& domainResult(); - // Return a reference to the modifiable "DomainResult" selection of - // this object if "DomainResult" is the current selection. The - // behavior is undefined unless "DomainResult" is the selection of this - // object. + // Return a reference to the modifiable "DomainResult" selection of + // this object if "DomainResult" is the current selection. The + // behavior is undefined unless "DomainResult" 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 Void& success() const; - // Return a reference to the non-modifiable "Success" selection of this - // object if "Success" is the current selection. The behavior is - // undefined unless "Success" is the selection of this object. + // Return a reference to the non-modifiable "Success" selection of this + // object if "Success" is the current selection. The behavior is + // undefined unless "Success" is the selection of this object. const Error& error() const; - // Return a reference to the non-modifiable "Error" selection of this - // object if "Error" is the current selection. The behavior is - // undefined unless "Error" is the selection of this object. + // Return a reference to the non-modifiable "Error" selection of this + // object if "Error" is the current selection. The behavior is + // undefined unless "Error" is the selection of this object. const DomainResult& domainResult() const; - // Return a reference to the non-modifiable "DomainResult" selection of - // this object if "DomainResult" is the current selection. The - // behavior is undefined unless "DomainResult" is the selection of this - // object. + // Return a reference to the non-modifiable "DomainResult" selection of + // this object if "DomainResult" is the current selection. The + // behavior is undefined unless "DomainResult" is the selection of this + // object. bool isSuccessValue() const; - // Return 'true' if the value of this object is a "Success" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Success" value, and + // return 'false' otherwise. bool isErrorValue() const; - // Return 'true' if the value of this object is a "Error" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Error" value, and + // return 'false' otherwise. bool isDomainResultValue() const; - // Return 'true' if the value of this object is a "DomainResult" value, - // and return 'false' otherwise. + // Return 'true' if the value of this object is a "DomainResult" 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 DomainsResult& lhs, const DomainsResult& rhs) - // Return 'true' if the specified 'lhs' and 'rhs' objects have the same - // value, and 'false' otherwise. Two 'DomainsResult' 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 'DomainsResult' 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 DomainsResult& lhs, const DomainsResult& 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 DomainsResult& 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); } @@ -30730,10 +31420,10 @@ class DomainsResult { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const DomainsResult& 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 - // 'DomainsResult'. + // 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 + // 'DomainsResult'. { return object.hashAppendImpl(hashAlg); } @@ -30747,23 +31437,29 @@ BDLAT_DECL_CHOICE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::DomainsResult) namespace mqbcmd { -// ============================= -// class RouteResponseResultList -// ============================= + // ============================= + // class RouteResponseResultList + // ============================= class RouteResponseResultList { // A list of responses containing decoded results. // INSTANCE DATA - bsl::vector d_responses; + bsl::vector d_responses; public: // TYPES - enum { ATTRIBUTE_ID_RESPONSES = 0 }; + enum { + ATTRIBUTE_ID_RESPONSES = 0 + }; - enum { NUM_ATTRIBUTES = 1 }; + enum { + NUM_ATTRIBUTES = 1 + }; - enum { ATTRIBUTE_INDEX_RESPONSES = 0 }; + enum { + ATTRIBUTE_INDEX_RESPONSES = 0 + }; // CONSTANTS static const char CLASS_NAME[]; @@ -30772,168 +31468,170 @@ class RouteResponseResultList { 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 RouteResponseResultList(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'RouteResponseResultList' having the - // default value. Use the optionally specified 'basicAllocator' to - // supply memory. If 'basicAllocator' is 0, the currently installed - // default allocator is used. + explicit RouteResponseResultList(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'RouteResponseResultList' having the + // default value. Use the optionally specified 'basicAllocator' to + // supply memory. If 'basicAllocator' is 0, the currently installed + // default allocator is used. RouteResponseResultList(const RouteResponseResultList& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'RouteResponseResultList' 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 'RouteResponseResultList' 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) RouteResponseResultList(RouteResponseResultList&& original) noexcept; - // Create an object of type 'RouteResponseResultList' 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 'RouteResponseResultList' having the value + // of the specified 'original' object. After performing this action, + // the 'original' object will be left in a valid, but unspecified + // state. RouteResponseResultList(RouteResponseResultList&& original, - bslma::Allocator* basicAllocator); - // Create an object of type 'RouteResponseResultList' 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 'RouteResponseResultList' 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 ~RouteResponseResultList(); - // Destroy this object. + // Destroy this object. // MANIPULATORS RouteResponseResultList& operator=(const RouteResponseResultList& 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) RouteResponseResultList& operator=(RouteResponseResultList&& 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::vector& responses(); - // Return a reference to the modifiable "Responses" attribute of this - // object. + // Return a reference to the modifiable "Responses" 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::vector& responses() const; - // Return a reference offering non-modifiable access to the "Responses" - // attribute of this object. + // Return a reference offering non-modifiable access to the "Responses" + // attribute of this object. // HIDDEN FRIENDS friend bool operator==(const RouteResponseResultList& lhs, const RouteResponseResultList& 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.responses() == rhs.responses(); } friend bool operator!=(const RouteResponseResultList& lhs, const RouteResponseResultList& rhs) - // Returns '!(lhs == rhs)' + // Returns '!(lhs == rhs)' { return !(lhs == rhs); } friend bsl::ostream& operator<<(bsl::ostream& stream, const RouteResponseResultList& 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); } @@ -30941,10 +31639,10 @@ class RouteResponseResultList { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const RouteResponseResultList& 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 - // 'RouteResponseResultList'. + // 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 + // 'RouteResponseResultList'. { using bslh::hashAppend; hashAppend(hashAlg, object.responses()); @@ -30955,14 +31653,13 @@ class RouteResponseResultList { // TRAITS -BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS( - mqbcmd::RouteResponseResultList) +BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::RouteResponseResultList) namespace mqbcmd { -// ==================== -// class InternalResult -// ==================== + // ==================== + // class InternalResult + // ==================== class InternalResult { // The type represents a command execution result with all intermediate @@ -30970,23 +31667,22 @@ class InternalResult { // INSTANCE DATA union { - bsls::ObjectBuffer d_error; - bsls::ObjectBuffer d_success; - bsls::ObjectBuffer d_domainsResult; - bsls::ObjectBuffer d_clustersResult; - bsls::ObjectBuffer d_help; - bsls::ObjectBuffer d_queueInternals; - bsls::ObjectBuffer d_statResult; - bsls::ObjectBuffer d_clusterList; - bsls::ObjectBuffer d_clusterQueueHelper; - bsls::ObjectBuffer d_clusterStorageSummary; - bsls::ObjectBuffer - d_clusterDomainQueueStatuses; - bsls::ObjectBuffer d_brokerConfig; - }; - - int d_selectionId; - bslma::Allocator* d_allocator_p; + bsls::ObjectBuffer< Error > d_error; + bsls::ObjectBuffer< Void > d_success; + bsls::ObjectBuffer< DomainsResult > d_domainsResult; + bsls::ObjectBuffer< ClustersResult > d_clustersResult; + bsls::ObjectBuffer< Help > d_help; + bsls::ObjectBuffer< QueueInternals > d_queueInternals; + bsls::ObjectBuffer< StatResult > d_statResult; + bsls::ObjectBuffer< ClusterList > d_clusterList; + bsls::ObjectBuffer< ClusterQueueHelper > d_clusterQueueHelper; + bsls::ObjectBuffer< ClusterStorageSummary > d_clusterStorageSummary; + bsls::ObjectBuffer< ClusterDomainQueueStatuses > d_clusterDomainQueueStatuses; + bsls::ObjectBuffer< BrokerConfig > d_brokerConfig; + }; + + int d_selectionId; + bslma::Allocator *d_allocator_p; // PRIVATE ACCESSORS template @@ -30998,36 +31694,38 @@ class InternalResult { // TYPES enum { - SELECTION_ID_UNDEFINED = -1, - SELECTION_ID_ERROR = 0, - SELECTION_ID_SUCCESS = 1, - SELECTION_ID_DOMAINS_RESULT = 2, - SELECTION_ID_CLUSTERS_RESULT = 3, - SELECTION_ID_HELP = 4, - SELECTION_ID_QUEUE_INTERNALS = 5, - SELECTION_ID_STAT_RESULT = 6, - SELECTION_ID_CLUSTER_LIST = 7, - SELECTION_ID_CLUSTER_QUEUE_HELPER = 8, - SELECTION_ID_CLUSTER_STORAGE_SUMMARY = 9, - SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES = 10, - SELECTION_ID_BROKER_CONFIG = 11 + SELECTION_ID_UNDEFINED = -1 + , SELECTION_ID_ERROR = 0 + , SELECTION_ID_SUCCESS = 1 + , SELECTION_ID_DOMAINS_RESULT = 2 + , SELECTION_ID_CLUSTERS_RESULT = 3 + , SELECTION_ID_HELP = 4 + , SELECTION_ID_QUEUE_INTERNALS = 5 + , SELECTION_ID_STAT_RESULT = 6 + , SELECTION_ID_CLUSTER_LIST = 7 + , SELECTION_ID_CLUSTER_QUEUE_HELPER = 8 + , SELECTION_ID_CLUSTER_STORAGE_SUMMARY = 9 + , SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES = 10 + , SELECTION_ID_BROKER_CONFIG = 11 }; - enum { NUM_SELECTIONS = 12 }; + enum { + NUM_SELECTIONS = 12 + }; enum { - SELECTION_INDEX_ERROR = 0, - SELECTION_INDEX_SUCCESS = 1, - SELECTION_INDEX_DOMAINS_RESULT = 2, - SELECTION_INDEX_CLUSTERS_RESULT = 3, - SELECTION_INDEX_HELP = 4, - SELECTION_INDEX_QUEUE_INTERNALS = 5, - SELECTION_INDEX_STAT_RESULT = 6, - SELECTION_INDEX_CLUSTER_LIST = 7, - SELECTION_INDEX_CLUSTER_QUEUE_HELPER = 8, - SELECTION_INDEX_CLUSTER_STORAGE_SUMMARY = 9, - SELECTION_INDEX_CLUSTER_DOMAIN_QUEUE_STATUSES = 10, - SELECTION_INDEX_BROKER_CONFIG = 11 + SELECTION_INDEX_ERROR = 0 + , SELECTION_INDEX_SUCCESS = 1 + , SELECTION_INDEX_DOMAINS_RESULT = 2 + , SELECTION_INDEX_CLUSTERS_RESULT = 3 + , SELECTION_INDEX_HELP = 4 + , SELECTION_INDEX_QUEUE_INTERNALS = 5 + , SELECTION_INDEX_STAT_RESULT = 6 + , SELECTION_INDEX_CLUSTER_LIST = 7 + , SELECTION_INDEX_CLUSTER_QUEUE_HELPER = 8 + , SELECTION_INDEX_CLUSTER_STORAGE_SUMMARY = 9 + , SELECTION_INDEX_CLUSTER_DOMAIN_QUEUE_STATUSES = 10 + , SELECTION_INDEX_BROKER_CONFIG = 11 }; // CONSTANTS @@ -31036,453 +31734,450 @@ class InternalResult { 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 InternalResult(bslma::Allocator* basicAllocator = 0); - // Create an object of type 'InternalResult' having the default value. - // Use the optionally specified 'basicAllocator' to supply memory. If - // 'basicAllocator' is 0, the currently installed default allocator is - // used. + explicit InternalResult(bslma::Allocator *basicAllocator = 0); + // Create an object of type 'InternalResult' having the default value. + // Use the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. InternalResult(const InternalResult& original, - bslma::Allocator* basicAllocator = 0); - // Create an object of type 'InternalResult' 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 'InternalResult' 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) InternalResult(InternalResult&& original) noexcept; - // Create an object of type 'InternalResult' 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 'InternalResult' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. - InternalResult(InternalResult&& original, - bslma::Allocator* basicAllocator); - // Create an object of type 'InternalResult' 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. + InternalResult(InternalResult&& original, + bslma::Allocator *basicAllocator); + // Create an object of type 'InternalResult' 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 ~InternalResult(); - // Destroy this object. + // Destroy this object. // MANIPULATORS InternalResult& operator=(const InternalResult& 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) InternalResult& operator=(InternalResult&& 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). Error& makeError(); Error& makeError(const Error& 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) Error& makeError(Error&& value); #endif - // Set the value of this object to be a "Error" value. Optionally - // specify the 'value' of the "Error". If 'value' is not specified, - // the default "Error" value is used. + // Set the value of this object to be a "Error" value. Optionally + // specify the 'value' of the "Error". If 'value' is not specified, + // the default "Error" value is used. Void& makeSuccess(); Void& makeSuccess(const Void& 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) Void& makeSuccess(Void&& value); #endif - // Set the value of this object to be a "Success" value. Optionally - // specify the 'value' of the "Success". If 'value' is not specified, - // the default "Success" value is used. + // Set the value of this object to be a "Success" value. Optionally + // specify the 'value' of the "Success". If 'value' is not specified, + // the default "Success" value is used. DomainsResult& makeDomainsResult(); DomainsResult& makeDomainsResult(const DomainsResult& 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) DomainsResult& makeDomainsResult(DomainsResult&& value); #endif - // Set the value of this object to be a "DomainsResult" value. - // Optionally specify the 'value' of the "DomainsResult". If 'value' - // is not specified, the default "DomainsResult" value is used. + // Set the value of this object to be a "DomainsResult" value. + // Optionally specify the 'value' of the "DomainsResult". If 'value' + // is not specified, the default "DomainsResult" value is used. ClustersResult& makeClustersResult(); ClustersResult& makeClustersResult(const ClustersResult& 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) ClustersResult& makeClustersResult(ClustersResult&& value); #endif - // Set the value of this object to be a "ClustersResult" value. - // Optionally specify the 'value' of the "ClustersResult". If 'value' - // is not specified, the default "ClustersResult" value is used. + // Set the value of this object to be a "ClustersResult" value. + // Optionally specify the 'value' of the "ClustersResult". If 'value' + // is not specified, the default "ClustersResult" value is used. Help& makeHelp(); Help& makeHelp(const Help& 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) Help& makeHelp(Help&& value); #endif - // Set the value of this object to be a "Help" value. Optionally - // specify the 'value' of the "Help". If 'value' is not specified, the - // default "Help" value is used. + // Set the value of this object to be a "Help" value. Optionally + // specify the 'value' of the "Help". If 'value' is not specified, the + // default "Help" value is used. QueueInternals& makeQueueInternals(); QueueInternals& makeQueueInternals(const QueueInternals& 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) QueueInternals& makeQueueInternals(QueueInternals&& value); #endif - // Set the value of this object to be a "QueueInternals" value. - // Optionally specify the 'value' of the "QueueInternals". If 'value' - // is not specified, the default "QueueInternals" value is used. + // Set the value of this object to be a "QueueInternals" value. + // Optionally specify the 'value' of the "QueueInternals". If 'value' + // is not specified, the default "QueueInternals" value is used. StatResult& makeStatResult(); StatResult& makeStatResult(const StatResult& 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) StatResult& makeStatResult(StatResult&& value); #endif - // Set the value of this object to be a "StatResult" value. Optionally - // specify the 'value' of the "StatResult". If 'value' is not - // specified, the default "StatResult" value is used. + // Set the value of this object to be a "StatResult" value. Optionally + // specify the 'value' of the "StatResult". If 'value' is not + // specified, the default "StatResult" value is used. ClusterList& makeClusterList(); ClusterList& makeClusterList(const ClusterList& 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) ClusterList& makeClusterList(ClusterList&& value); #endif - // Set the value of this object to be a "ClusterList" value. - // Optionally specify the 'value' of the "ClusterList". If 'value' is - // not specified, the default "ClusterList" value is used. + // Set the value of this object to be a "ClusterList" value. + // Optionally specify the 'value' of the "ClusterList". If 'value' is + // not specified, the default "ClusterList" value is used. ClusterQueueHelper& makeClusterQueueHelper(); - ClusterQueueHelper& - makeClusterQueueHelper(const ClusterQueueHelper& value); -#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \ - defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) + ClusterQueueHelper& makeClusterQueueHelper(const ClusterQueueHelper& value); +#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \ + && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) ClusterQueueHelper& makeClusterQueueHelper(ClusterQueueHelper&& value); #endif - // Set the value of this object to be a "ClusterQueueHelper" value. - // Optionally specify the 'value' of the "ClusterQueueHelper". If - // 'value' is not specified, the default "ClusterQueueHelper" value is - // used. + // Set the value of this object to be a "ClusterQueueHelper" value. + // Optionally specify the 'value' of the "ClusterQueueHelper". If + // 'value' is not specified, the default "ClusterQueueHelper" value is + // used. ClusterStorageSummary& makeClusterStorageSummary(); - ClusterStorageSummary& - makeClusterStorageSummary(const ClusterStorageSummary& value); -#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \ - defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) - ClusterStorageSummary& - makeClusterStorageSummary(ClusterStorageSummary&& value); -#endif - // Set the value of this object to be a "ClusterStorageSummary" value. - // Optionally specify the 'value' of the "ClusterStorageSummary". If - // 'value' is not specified, the default "ClusterStorageSummary" value - // is used. + ClusterStorageSummary& makeClusterStorageSummary(const ClusterStorageSummary& value); +#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \ + && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) + ClusterStorageSummary& makeClusterStorageSummary(ClusterStorageSummary&& value); +#endif + // Set the value of this object to be a "ClusterStorageSummary" value. + // Optionally specify the 'value' of the "ClusterStorageSummary". If + // 'value' is not specified, the default "ClusterStorageSummary" value + // is used. ClusterDomainQueueStatuses& makeClusterDomainQueueStatuses(); - ClusterDomainQueueStatuses& - makeClusterDomainQueueStatuses(const ClusterDomainQueueStatuses& value); -#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \ - defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) - ClusterDomainQueueStatuses& - makeClusterDomainQueueStatuses(ClusterDomainQueueStatuses&& value); -#endif - // Set the value of this object to be a "ClusterDomainQueueStatuses" - // value. Optionally specify the 'value' of the - // "ClusterDomainQueueStatuses". If 'value' is not specified, the - // default "ClusterDomainQueueStatuses" value is used. + ClusterDomainQueueStatuses& makeClusterDomainQueueStatuses(const ClusterDomainQueueStatuses& value); +#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) \ + && defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) + ClusterDomainQueueStatuses& makeClusterDomainQueueStatuses(ClusterDomainQueueStatuses&& value); +#endif + // Set the value of this object to be a "ClusterDomainQueueStatuses" + // value. Optionally specify the 'value' of the + // "ClusterDomainQueueStatuses". If 'value' is not specified, the + // default "ClusterDomainQueueStatuses" value is used. BrokerConfig& makeBrokerConfig(); BrokerConfig& makeBrokerConfig(const BrokerConfig& 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) BrokerConfig& makeBrokerConfig(BrokerConfig&& value); #endif - // Set the value of this object to be a "BrokerConfig" value. - // Optionally specify the 'value' of the "BrokerConfig". If 'value' is - // not specified, the default "BrokerConfig" value is used. + // Set the value of this object to be a "BrokerConfig" value. + // Optionally specify the 'value' of the "BrokerConfig". If 'value' is + // not specified, the default "BrokerConfig" 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. Error& error(); - // Return a reference to the modifiable "Error" selection of this - // object if "Error" is the current selection. The behavior is - // undefined unless "Error" is the selection of this object. + // Return a reference to the modifiable "Error" selection of this + // object if "Error" is the current selection. The behavior is + // undefined unless "Error" is the selection of this object. Void& success(); - // Return a reference to the modifiable "Success" selection of this - // object if "Success" is the current selection. The behavior is - // undefined unless "Success" is the selection of this object. + // Return a reference to the modifiable "Success" selection of this + // object if "Success" is the current selection. The behavior is + // undefined unless "Success" is the selection of this object. DomainsResult& domainsResult(); - // Return a reference to the modifiable "DomainsResult" selection of - // this object if "DomainsResult" is the current selection. The - // behavior is undefined unless "DomainsResult" is the selection of - // this object. + // Return a reference to the modifiable "DomainsResult" selection of + // this object if "DomainsResult" is the current selection. The + // behavior is undefined unless "DomainsResult" is the selection of + // this object. ClustersResult& clustersResult(); - // Return a reference to the modifiable "ClustersResult" selection of - // this object if "ClustersResult" is the current selection. The - // behavior is undefined unless "ClustersResult" is the selection of - // this object. + // Return a reference to the modifiable "ClustersResult" selection of + // this object if "ClustersResult" is the current selection. The + // behavior is undefined unless "ClustersResult" is the selection of + // this object. Help& help(); - // Return a reference to the modifiable "Help" selection of this object - // if "Help" is the current selection. The behavior is undefined - // unless "Help" is the selection of this object. + // Return a reference to the modifiable "Help" selection of this object + // if "Help" is the current selection. The behavior is undefined + // unless "Help" is the selection of this object. QueueInternals& queueInternals(); - // Return a reference to the modifiable "QueueInternals" selection of - // this object if "QueueInternals" is the current selection. The - // behavior is undefined unless "QueueInternals" is the selection of - // this object. + // Return a reference to the modifiable "QueueInternals" selection of + // this object if "QueueInternals" is the current selection. The + // behavior is undefined unless "QueueInternals" is the selection of + // this object. StatResult& statResult(); - // Return a reference to the modifiable "StatResult" selection of this - // object if "StatResult" is the current selection. The behavior is - // undefined unless "StatResult" is the selection of this object. + // Return a reference to the modifiable "StatResult" selection of this + // object if "StatResult" is the current selection. The behavior is + // undefined unless "StatResult" is the selection of this object. ClusterList& clusterList(); - // Return a reference to the modifiable "ClusterList" selection of this - // object if "ClusterList" is the current selection. The behavior is - // undefined unless "ClusterList" is the selection of this object. + // Return a reference to the modifiable "ClusterList" selection of this + // object if "ClusterList" is the current selection. The behavior is + // undefined unless "ClusterList" is the selection of this object. ClusterQueueHelper& clusterQueueHelper(); - // Return a reference to the modifiable "ClusterQueueHelper" selection - // of this object if "ClusterQueueHelper" is the current selection. - // The behavior is undefined unless "ClusterQueueHelper" is the - // selection of this object. + // Return a reference to the modifiable "ClusterQueueHelper" selection + // of this object if "ClusterQueueHelper" is the current selection. + // The behavior is undefined unless "ClusterQueueHelper" is the + // selection of this object. ClusterStorageSummary& clusterStorageSummary(); - // Return a reference to the modifiable "ClusterStorageSummary" - // selection of this object if "ClusterStorageSummary" is the current - // selection. The behavior is undefined unless "ClusterStorageSummary" - // is the selection of this object. + // Return a reference to the modifiable "ClusterStorageSummary" + // selection of this object if "ClusterStorageSummary" is the current + // selection. The behavior is undefined unless "ClusterStorageSummary" + // is the selection of this object. ClusterDomainQueueStatuses& clusterDomainQueueStatuses(); - // Return a reference to the modifiable "ClusterDomainQueueStatuses" - // selection of this object if "ClusterDomainQueueStatuses" is the - // current selection. The behavior is undefined unless - // "ClusterDomainQueueStatuses" is the selection of this object. + // Return a reference to the modifiable "ClusterDomainQueueStatuses" + // selection of this object if "ClusterDomainQueueStatuses" is the + // current selection. The behavior is undefined unless + // "ClusterDomainQueueStatuses" is the selection of this object. BrokerConfig& brokerConfig(); - // Return a reference to the modifiable "BrokerConfig" selection of - // this object if "BrokerConfig" is the current selection. The - // behavior is undefined unless "BrokerConfig" is the selection of this - // object. + // Return a reference to the modifiable "BrokerConfig" selection of + // this object if "BrokerConfig" is the current selection. The + // behavior is undefined unless "BrokerConfig" 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 Error& error() const; - // Return a reference to the non-modifiable "Error" selection of this - // object if "Error" is the current selection. The behavior is - // undefined unless "Error" is the selection of this object. + // Return a reference to the non-modifiable "Error" selection of this + // object if "Error" is the current selection. The behavior is + // undefined unless "Error" is the selection of this object. const Void& success() const; - // Return a reference to the non-modifiable "Success" selection of this - // object if "Success" is the current selection. The behavior is - // undefined unless "Success" is the selection of this object. + // Return a reference to the non-modifiable "Success" selection of this + // object if "Success" is the current selection. The behavior is + // undefined unless "Success" is the selection of this object. const DomainsResult& domainsResult() const; - // Return a reference to the non-modifiable "DomainsResult" selection - // of this object if "DomainsResult" is the current selection. The - // behavior is undefined unless "DomainsResult" is the selection of - // this object. + // Return a reference to the non-modifiable "DomainsResult" selection + // of this object if "DomainsResult" is the current selection. The + // behavior is undefined unless "DomainsResult" is the selection of + // this object. const ClustersResult& clustersResult() const; - // Return a reference to the non-modifiable "ClustersResult" selection - // of this object if "ClustersResult" is the current selection. The - // behavior is undefined unless "ClustersResult" is the selection of - // this object. + // Return a reference to the non-modifiable "ClustersResult" selection + // of this object if "ClustersResult" is the current selection. The + // behavior is undefined unless "ClustersResult" is the selection of + // this object. const Help& help() const; - // Return a reference to the non-modifiable "Help" selection of this - // object if "Help" is the current selection. The behavior is - // undefined unless "Help" is the selection of this object. + // Return a reference to the non-modifiable "Help" selection of this + // object if "Help" is the current selection. The behavior is + // undefined unless "Help" is the selection of this object. const QueueInternals& queueInternals() const; - // Return a reference to the non-modifiable "QueueInternals" selection - // of this object if "QueueInternals" is the current selection. The - // behavior is undefined unless "QueueInternals" is the selection of - // this object. + // Return a reference to the non-modifiable "QueueInternals" selection + // of this object if "QueueInternals" is the current selection. The + // behavior is undefined unless "QueueInternals" is the selection of + // this object. const StatResult& statResult() const; - // Return a reference to the non-modifiable "StatResult" selection of - // this object if "StatResult" is the current selection. The behavior - // is undefined unless "StatResult" is the selection of this object. + // Return a reference to the non-modifiable "StatResult" selection of + // this object if "StatResult" is the current selection. The behavior + // is undefined unless "StatResult" is the selection of this object. const ClusterList& clusterList() const; - // Return a reference to the non-modifiable "ClusterList" selection of - // this object if "ClusterList" is the current selection. The behavior - // is undefined unless "ClusterList" is the selection of this object. + // Return a reference to the non-modifiable "ClusterList" selection of + // this object if "ClusterList" is the current selection. The behavior + // is undefined unless "ClusterList" is the selection of this object. const ClusterQueueHelper& clusterQueueHelper() const; - // Return a reference to the non-modifiable "ClusterQueueHelper" - // selection of this object if "ClusterQueueHelper" is the current - // selection. The behavior is undefined unless "ClusterQueueHelper" is - // the selection of this object. + // Return a reference to the non-modifiable "ClusterQueueHelper" + // selection of this object if "ClusterQueueHelper" is the current + // selection. The behavior is undefined unless "ClusterQueueHelper" is + // the selection of this object. const ClusterStorageSummary& clusterStorageSummary() const; - // Return a reference to the non-modifiable "ClusterStorageSummary" - // selection of this object if "ClusterStorageSummary" is the current - // selection. The behavior is undefined unless "ClusterStorageSummary" - // is the selection of this object. + // Return a reference to the non-modifiable "ClusterStorageSummary" + // selection of this object if "ClusterStorageSummary" is the current + // selection. The behavior is undefined unless "ClusterStorageSummary" + // is the selection of this object. const ClusterDomainQueueStatuses& clusterDomainQueueStatuses() const; - // Return a reference to the non-modifiable - // "ClusterDomainQueueStatuses" selection of this object if - // "ClusterDomainQueueStatuses" is the current selection. The behavior - // is undefined unless "ClusterDomainQueueStatuses" is the selection of - // this object. + // Return a reference to the non-modifiable + // "ClusterDomainQueueStatuses" selection of this object if + // "ClusterDomainQueueStatuses" is the current selection. The behavior + // is undefined unless "ClusterDomainQueueStatuses" is the selection of + // this object. const BrokerConfig& brokerConfig() const; - // Return a reference to the non-modifiable "BrokerConfig" selection of - // this object if "BrokerConfig" is the current selection. The - // behavior is undefined unless "BrokerConfig" is the selection of this - // object. + // Return a reference to the non-modifiable "BrokerConfig" selection of + // this object if "BrokerConfig" is the current selection. The + // behavior is undefined unless "BrokerConfig" is the selection of this + // object. bool isErrorValue() const; - // Return 'true' if the value of this object is a "Error" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Error" value, and + // return 'false' otherwise. bool isSuccessValue() const; - // Return 'true' if the value of this object is a "Success" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Success" value, and + // return 'false' otherwise. bool isDomainsResultValue() const; - // Return 'true' if the value of this object is a "DomainsResult" - // value, and return 'false' otherwise. + // Return 'true' if the value of this object is a "DomainsResult" + // value, and return 'false' otherwise. bool isClustersResultValue() const; - // Return 'true' if the value of this object is a "ClustersResult" - // value, and return 'false' otherwise. + // Return 'true' if the value of this object is a "ClustersResult" + // value, and return 'false' otherwise. bool isHelpValue() const; - // Return 'true' if the value of this object is a "Help" value, and - // return 'false' otherwise. + // Return 'true' if the value of this object is a "Help" value, and + // return 'false' otherwise. bool isQueueInternalsValue() const; - // Return 'true' if the value of this object is a "QueueInternals" - // value, and return 'false' otherwise. + // Return 'true' if the value of this object is a "QueueInternals" + // value, and return 'false' otherwise. bool isStatResultValue() const; - // Return 'true' if the value of this object is a "StatResult" value, - // and return 'false' otherwise. + // Return 'true' if the value of this object is a "StatResult" value, + // and return 'false' otherwise. bool isClusterListValue() const; - // Return 'true' if the value of this object is a "ClusterList" value, - // and return 'false' otherwise. + // Return 'true' if the value of this object is a "ClusterList" value, + // and return 'false' otherwise. bool isClusterQueueHelperValue() const; - // Return 'true' if the value of this object is a "ClusterQueueHelper" - // value, and return 'false' otherwise. + // Return 'true' if the value of this object is a "ClusterQueueHelper" + // value, and return 'false' otherwise. bool isClusterStorageSummaryValue() const; - // Return 'true' if the value of this object is a - // "ClusterStorageSummary" value, and return 'false' otherwise. + // Return 'true' if the value of this object is a + // "ClusterStorageSummary" value, and return 'false' otherwise. bool isClusterDomainQueueStatusesValue() const; - // Return 'true' if the value of this object is a - // "ClusterDomainQueueStatuses" value, and return 'false' otherwise. + // Return 'true' if the value of this object is a + // "ClusterDomainQueueStatuses" value, and return 'false' otherwise. bool isBrokerConfigValue() const; - // Return 'true' if the value of this object is a "BrokerConfig" value, - // and return 'false' otherwise. + // Return 'true' if the value of this object is a "BrokerConfig" 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 InternalResult& lhs, const InternalResult& rhs) - // Return 'true' if the specified 'lhs' and 'rhs' objects have the same - // value, and 'false' otherwise. Two 'InternalResult' 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 'InternalResult' 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 InternalResult& lhs, const InternalResult& 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 InternalResult& 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); } @@ -31490,10 +32185,10 @@ class InternalResult { template friend void hashAppend(t_HASH_ALGORITHM& hashAlg, const InternalResult& 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 - // 'InternalResult'. + // 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 + // 'InternalResult'. { return object.hashAppendImpl(hashAlg); } @@ -31511,9 +32206,9 @@ BDLAT_DECL_CHOICE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS(mqbcmd::InternalResult) namespace mqbcmd { -// --------------------- -// class AddReverseProxy -// --------------------- + // --------------------- + // class AddReverseProxy + // --------------------- // CLASS METHODS // MANIPULATORS @@ -31522,14 +32217,12 @@ int AddReverseProxy::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator(&d_clusterName, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTER_NAME]); + ret = manipulator(&d_clusterName, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTER_NAME]); if (ret) { return ret; } - ret = manipulator(&d_remotePeer, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_REMOTE_PEER]); + ret = manipulator(&d_remotePeer, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_REMOTE_PEER]); if (ret) { return ret; } @@ -31543,27 +32236,27 @@ int AddReverseProxy::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_CLUSTER_NAME: { - return manipulator(&d_clusterName, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTER_NAME]); - } - case ATTRIBUTE_ID_REMOTE_PEER: { - return manipulator(&d_remotePeer, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_REMOTE_PEER]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_CLUSTER_NAME: { + return manipulator(&d_clusterName, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTER_NAME]); + } + case ATTRIBUTE_ID_REMOTE_PEER: { + return manipulator(&d_remotePeer, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_REMOTE_PEER]); + } + default: + return NOT_FOUND; } } template -int AddReverseProxy::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int AddReverseProxy::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -31571,12 +32264,14 @@ int AddReverseProxy::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::string& AddReverseProxy::clusterName() +inline +bsl::string& AddReverseProxy::clusterName() { return d_clusterName; } -inline bsl::string& AddReverseProxy::remotePeer() +inline +bsl::string& AddReverseProxy::remotePeer() { return d_remotePeer; } @@ -31587,14 +32282,12 @@ int AddReverseProxy::accessAttributes(t_ACCESSOR& accessor) const { int ret; - ret = accessor(d_clusterName, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTER_NAME]); + ret = accessor(d_clusterName, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTER_NAME]); if (ret) { return ret; } - ret = accessor(d_remotePeer, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_REMOTE_PEER]); + ret = accessor(d_remotePeer, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_REMOTE_PEER]); if (ret) { return ret; } @@ -31608,47 +32301,51 @@ int AddReverseProxy::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_CLUSTER_NAME: { - return accessor(d_clusterName, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTER_NAME]); - } - case ATTRIBUTE_ID_REMOTE_PEER: { - return accessor(d_remotePeer, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_REMOTE_PEER]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_CLUSTER_NAME: { + return accessor(d_clusterName, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTER_NAME]); + } + case ATTRIBUTE_ID_REMOTE_PEER: { + return accessor(d_remotePeer, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_REMOTE_PEER]); + } + default: + return NOT_FOUND; } } template -int AddReverseProxy::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int AddReverseProxy::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::string& AddReverseProxy::clusterName() const +inline +const bsl::string& AddReverseProxy::clusterName() const { return d_clusterName; } -inline const bsl::string& AddReverseProxy::remotePeer() const +inline +const bsl::string& AddReverseProxy::remotePeer() const { return d_remotePeer; } -// ------------------ -// class BrokerConfig -// ------------------ + + + // ------------------ + // class BrokerConfig + // ------------------ // CLASS METHODS // MANIPULATORS @@ -31657,8 +32354,7 @@ int BrokerConfig::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator(&d_asJSON, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_AS_J_S_O_N]); + ret = manipulator(&d_asJSON, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_AS_J_S_O_N]); if (ret) { return ret; } @@ -31672,23 +32368,24 @@ int BrokerConfig::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_AS_J_S_O_N: { - return manipulator(&d_asJSON, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_AS_J_S_O_N]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_AS_J_S_O_N: { + return manipulator(&d_asJSON, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_AS_J_S_O_N]); + } + default: + return NOT_FOUND; } } template -int BrokerConfig::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int BrokerConfig::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -31696,7 +32393,8 @@ int BrokerConfig::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::string& BrokerConfig::asJSON() +inline +bsl::string& BrokerConfig::asJSON() { return d_asJSON; } @@ -31721,38 +32419,42 @@ int BrokerConfig::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_AS_J_S_O_N: { - return accessor(d_asJSON, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_AS_J_S_O_N]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_AS_J_S_O_N: { + return accessor(d_asJSON, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_AS_J_S_O_N]); + } + default: + return NOT_FOUND; } } template -int BrokerConfig::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int BrokerConfig::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::string& BrokerConfig::asJSON() const +inline +const bsl::string& BrokerConfig::asJSON() const { return d_asJSON; } -// ------------------- -// class CapacityMeter -// ------------------- + + + // ------------------- + // class CapacityMeter + // ------------------- // PRIVATE ACCESSORS template @@ -31770,7 +32472,8 @@ void CapacityMeter::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const hashAppend(hashAlgorithm, this->parent()); } -inline bool CapacityMeter::isEqualTo(const CapacityMeter& rhs) const +inline +bool CapacityMeter::isEqualTo(const CapacityMeter& rhs) const { return this->name() == rhs.name() && this->isDisabled() == rhs.isDisabled() && @@ -31795,46 +32498,37 @@ int CapacityMeter::manipulateAttributes(t_MANIPULATOR& manipulator) return ret; } - ret = manipulator(&d_isDisabled, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_DISABLED]); + ret = manipulator(&d_isDisabled, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_DISABLED]); if (ret) { return ret; } - ret = manipulator(&d_numMessages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES]); + ret = manipulator(&d_numMessages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES]); if (ret) { return ret; } - ret = manipulator(&d_messageCapacity, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGE_CAPACITY]); + ret = manipulator(&d_messageCapacity, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGE_CAPACITY]); if (ret) { return ret; } - ret = manipulator( - &d_numMessagesReserved, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES_RESERVED]); + ret = manipulator(&d_numMessagesReserved, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES_RESERVED]); if (ret) { return ret; } - ret = manipulator(&d_numBytes, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES]); + ret = manipulator(&d_numBytes, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES]); if (ret) { return ret; } - ret = manipulator(&d_byteCapacity, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BYTE_CAPACITY]); + ret = manipulator(&d_byteCapacity, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BYTE_CAPACITY]); if (ret) { return ret; } - ret = manipulator( - &d_numBytesReserved, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES_RESERVED]); + ret = manipulator(&d_numBytesReserved, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES_RESERVED]); if (ret) { return ret; } @@ -31853,59 +32547,48 @@ int CapacityMeter::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_NAME: { - return manipulator(&d_name, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]); - } - case ATTRIBUTE_ID_IS_DISABLED: { - return manipulator(&d_isDisabled, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_DISABLED]); - } - case ATTRIBUTE_ID_NUM_MESSAGES: { - return manipulator(&d_numMessages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES]); - } - case ATTRIBUTE_ID_MESSAGE_CAPACITY: { - return manipulator( - &d_messageCapacity, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGE_CAPACITY]); - } - case ATTRIBUTE_ID_NUM_MESSAGES_RESERVED: { - return manipulator( - &d_numMessagesReserved, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES_RESERVED]); - } - case ATTRIBUTE_ID_NUM_BYTES: { - return manipulator(&d_numBytes, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES]); - } - case ATTRIBUTE_ID_BYTE_CAPACITY: { - return manipulator( - &d_byteCapacity, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BYTE_CAPACITY]); - } - case ATTRIBUTE_ID_NUM_BYTES_RESERVED: { - return manipulator( - &d_numBytesReserved, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES_RESERVED]); - } - case ATTRIBUTE_ID_PARENT: { - return manipulator(&d_parent, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARENT]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_NAME: { + return manipulator(&d_name, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]); + } + case ATTRIBUTE_ID_IS_DISABLED: { + return manipulator(&d_isDisabled, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_DISABLED]); + } + case ATTRIBUTE_ID_NUM_MESSAGES: { + return manipulator(&d_numMessages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES]); + } + case ATTRIBUTE_ID_MESSAGE_CAPACITY: { + return manipulator(&d_messageCapacity, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGE_CAPACITY]); + } + case ATTRIBUTE_ID_NUM_MESSAGES_RESERVED: { + return manipulator(&d_numMessagesReserved, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES_RESERVED]); + } + case ATTRIBUTE_ID_NUM_BYTES: { + return manipulator(&d_numBytes, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES]); + } + case ATTRIBUTE_ID_BYTE_CAPACITY: { + return manipulator(&d_byteCapacity, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BYTE_CAPACITY]); + } + case ATTRIBUTE_ID_NUM_BYTES_RESERVED: { + return manipulator(&d_numBytesReserved, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES_RESERVED]); + } + case ATTRIBUTE_ID_PARENT: { + return manipulator(&d_parent, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARENT]); + } + default: + return NOT_FOUND; } } template -int CapacityMeter::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int CapacityMeter::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -31913,47 +32596,56 @@ int CapacityMeter::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::string& CapacityMeter::name() +inline +bsl::string& CapacityMeter::name() { return d_name; } -inline bool& CapacityMeter::isDisabled() +inline +bool& CapacityMeter::isDisabled() { return d_isDisabled; } -inline bsls::Types::Int64& CapacityMeter::numMessages() +inline +bsls::Types::Int64& CapacityMeter::numMessages() { return d_numMessages; } -inline bsls::Types::Int64& CapacityMeter::messageCapacity() +inline +bsls::Types::Int64& CapacityMeter::messageCapacity() { return d_messageCapacity; } -inline bsls::Types::Int64& CapacityMeter::numMessagesReserved() +inline +bsls::Types::Int64& CapacityMeter::numMessagesReserved() { return d_numMessagesReserved; } -inline bsls::Types::Int64& CapacityMeter::numBytes() +inline +bsls::Types::Int64& CapacityMeter::numBytes() { return d_numBytes; } -inline bsls::Types::Int64& CapacityMeter::byteCapacity() +inline +bsls::Types::Int64& CapacityMeter::byteCapacity() { return d_byteCapacity; } -inline bsls::Types::Int64& CapacityMeter::numBytesReserved() +inline +bsls::Types::Int64& CapacityMeter::numBytesReserved() { return d_numBytesReserved; } -inline bdlb::NullableAllocatedValue& CapacityMeter::parent() +inline +bdlb::NullableAllocatedValue& CapacityMeter::parent() { return d_parent; } @@ -31969,45 +32661,37 @@ int CapacityMeter::accessAttributes(t_ACCESSOR& accessor) const return ret; } - ret = accessor(d_isDisabled, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_DISABLED]); + ret = accessor(d_isDisabled, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_DISABLED]); if (ret) { return ret; } - ret = accessor(d_numMessages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES]); + ret = accessor(d_numMessages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES]); if (ret) { return ret; } - ret = accessor(d_messageCapacity, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGE_CAPACITY]); + ret = accessor(d_messageCapacity, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGE_CAPACITY]); if (ret) { return ret; } - ret = accessor( - d_numMessagesReserved, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES_RESERVED]); + ret = accessor(d_numMessagesReserved, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES_RESERVED]); if (ret) { return ret; } - ret = accessor(d_numBytes, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES]); + ret = accessor(d_numBytes, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES]); if (ret) { return ret; } - ret = accessor(d_byteCapacity, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BYTE_CAPACITY]); + ret = accessor(d_byteCapacity, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BYTE_CAPACITY]); if (ret) { return ret; } - ret = accessor(d_numBytesReserved, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES_RESERVED]); + ret = accessor(d_numBytesReserved, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES_RESERVED]); if (ret) { return ret; } @@ -32023,116 +32707,117 @@ int CapacityMeter::accessAttributes(t_ACCESSOR& accessor) const template int CapacityMeter::accessAttribute(t_ACCESSOR& accessor, int id) const { - enum { NOT_FOUND = -1 }; - - switch (id) { - case ATTRIBUTE_ID_NAME: { - return accessor(d_name, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]); - } - case ATTRIBUTE_ID_IS_DISABLED: { - return accessor(d_isDisabled, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_DISABLED]); - } - case ATTRIBUTE_ID_NUM_MESSAGES: { - return accessor(d_numMessages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES]); - } - case ATTRIBUTE_ID_MESSAGE_CAPACITY: { - return accessor( - d_messageCapacity, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGE_CAPACITY]); - } - case ATTRIBUTE_ID_NUM_MESSAGES_RESERVED: { - return accessor( - d_numMessagesReserved, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES_RESERVED]); - } - case ATTRIBUTE_ID_NUM_BYTES: { - return accessor(d_numBytes, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES]); - } - case ATTRIBUTE_ID_BYTE_CAPACITY: { - return accessor(d_byteCapacity, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BYTE_CAPACITY]); - } - case ATTRIBUTE_ID_NUM_BYTES_RESERVED: { - return accessor( - d_numBytesReserved, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES_RESERVED]); - } - case ATTRIBUTE_ID_PARENT: { - return accessor(d_parent, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARENT]); - } - default: return NOT_FOUND; + enum { NOT_FOUND = -1 }; + + switch (id) { + case ATTRIBUTE_ID_NAME: { + return accessor(d_name, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]); + } + case ATTRIBUTE_ID_IS_DISABLED: { + return accessor(d_isDisabled, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_DISABLED]); + } + case ATTRIBUTE_ID_NUM_MESSAGES: { + return accessor(d_numMessages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES]); + } + case ATTRIBUTE_ID_MESSAGE_CAPACITY: { + return accessor(d_messageCapacity, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGE_CAPACITY]); + } + case ATTRIBUTE_ID_NUM_MESSAGES_RESERVED: { + return accessor(d_numMessagesReserved, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES_RESERVED]); + } + case ATTRIBUTE_ID_NUM_BYTES: { + return accessor(d_numBytes, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES]); + } + case ATTRIBUTE_ID_BYTE_CAPACITY: { + return accessor(d_byteCapacity, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BYTE_CAPACITY]); + } + case ATTRIBUTE_ID_NUM_BYTES_RESERVED: { + return accessor(d_numBytesReserved, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES_RESERVED]); + } + case ATTRIBUTE_ID_PARENT: { + return accessor(d_parent, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARENT]); + } + default: + return NOT_FOUND; } } template -int CapacityMeter::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int CapacityMeter::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::string& CapacityMeter::name() const +inline +const bsl::string& CapacityMeter::name() const { return d_name; } -inline bool CapacityMeter::isDisabled() const +inline +bool CapacityMeter::isDisabled() const { return d_isDisabled; } -inline bsls::Types::Int64 CapacityMeter::numMessages() const +inline +bsls::Types::Int64 CapacityMeter::numMessages() const { return d_numMessages; } -inline bsls::Types::Int64 CapacityMeter::messageCapacity() const +inline +bsls::Types::Int64 CapacityMeter::messageCapacity() const { return d_messageCapacity; } -inline bsls::Types::Int64 CapacityMeter::numMessagesReserved() const +inline +bsls::Types::Int64 CapacityMeter::numMessagesReserved() const { return d_numMessagesReserved; } -inline bsls::Types::Int64 CapacityMeter::numBytes() const +inline +bsls::Types::Int64 CapacityMeter::numBytes() const { return d_numBytes; } -inline bsls::Types::Int64 CapacityMeter::byteCapacity() const +inline +bsls::Types::Int64 CapacityMeter::byteCapacity() const { return d_byteCapacity; } -inline bsls::Types::Int64 CapacityMeter::numBytesReserved() const +inline +bsls::Types::Int64 CapacityMeter::numBytesReserved() const { return d_numBytesReserved; } -inline const bdlb::NullableAllocatedValue& -CapacityMeter::parent() const +inline +const bdlb::NullableAllocatedValue& CapacityMeter::parent() const { return d_parent; } -// -------------------------- -// class ClientMsgGroupsCount -// -------------------------- + + + // -------------------------- + // class ClientMsgGroupsCount + // -------------------------- // CLASS METHODS // MANIPULATORS @@ -32141,15 +32826,12 @@ int ClientMsgGroupsCount::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator( - &d_clientDescription, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLIENT_DESCRIPTION]); + ret = manipulator(&d_clientDescription, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLIENT_DESCRIPTION]); if (ret) { return ret; } - ret = manipulator(&d_numMsgGroupIds, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MSG_GROUP_IDS]); + ret = manipulator(&d_numMsgGroupIds, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MSG_GROUP_IDS]); if (ret) { return ret; } @@ -32158,35 +32840,32 @@ int ClientMsgGroupsCount::manipulateAttributes(t_MANIPULATOR& manipulator) } template -int ClientMsgGroupsCount::manipulateAttribute(t_MANIPULATOR& manipulator, - int id) +int ClientMsgGroupsCount::manipulateAttribute(t_MANIPULATOR& manipulator, int id) { enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_CLIENT_DESCRIPTION: { - return manipulator( - &d_clientDescription, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLIENT_DESCRIPTION]); - } - case ATTRIBUTE_ID_NUM_MSG_GROUP_IDS: { - return manipulator( - &d_numMsgGroupIds, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MSG_GROUP_IDS]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_CLIENT_DESCRIPTION: { + return manipulator(&d_clientDescription, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLIENT_DESCRIPTION]); + } + case ATTRIBUTE_ID_NUM_MSG_GROUP_IDS: { + return manipulator(&d_numMsgGroupIds, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MSG_GROUP_IDS]); + } + default: + return NOT_FOUND; } } template -int ClientMsgGroupsCount::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int ClientMsgGroupsCount::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -32194,12 +32873,14 @@ int ClientMsgGroupsCount::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::string& ClientMsgGroupsCount::clientDescription() +inline +bsl::string& ClientMsgGroupsCount::clientDescription() { return d_clientDescription; } -inline unsigned int& ClientMsgGroupsCount::numMsgGroupIds() +inline +unsigned int& ClientMsgGroupsCount::numMsgGroupIds() { return d_numMsgGroupIds; } @@ -32210,14 +32891,12 @@ int ClientMsgGroupsCount::accessAttributes(t_ACCESSOR& accessor) const { int ret; - ret = accessor(d_clientDescription, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLIENT_DESCRIPTION]); + ret = accessor(d_clientDescription, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLIENT_DESCRIPTION]); if (ret) { return ret; } - ret = accessor(d_numMsgGroupIds, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MSG_GROUP_IDS]); + ret = accessor(d_numMsgGroupIds, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MSG_GROUP_IDS]); if (ret) { return ret; } @@ -32231,49 +32910,51 @@ int ClientMsgGroupsCount::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_CLIENT_DESCRIPTION: { - return accessor( - d_clientDescription, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLIENT_DESCRIPTION]); - } - case ATTRIBUTE_ID_NUM_MSG_GROUP_IDS: { - return accessor( - d_numMsgGroupIds, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MSG_GROUP_IDS]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_CLIENT_DESCRIPTION: { + return accessor(d_clientDescription, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLIENT_DESCRIPTION]); + } + case ATTRIBUTE_ID_NUM_MSG_GROUP_IDS: { + return accessor(d_numMsgGroupIds, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MSG_GROUP_IDS]); + } + default: + return NOT_FOUND; } } template -int ClientMsgGroupsCount::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int ClientMsgGroupsCount::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::string& ClientMsgGroupsCount::clientDescription() const +inline +const bsl::string& ClientMsgGroupsCount::clientDescription() const { return d_clientDescription; } -inline unsigned int ClientMsgGroupsCount::numMsgGroupIds() const +inline +unsigned int ClientMsgGroupsCount::numMsgGroupIds() const { return d_numMsgGroupIds; } -// ------------------- -// class ClusterDomain -// ------------------- + + + // ------------------- + // class ClusterDomain + // ------------------- // PRIVATE ACCESSORS template @@ -32297,9 +32978,7 @@ int ClusterDomain::manipulateAttributes(t_MANIPULATOR& manipulator) return ret; } - ret = manipulator( - &d_numAssignedQueues, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_ASSIGNED_QUEUES]); + ret = manipulator(&d_numAssignedQueues, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_ASSIGNED_QUEUES]); if (ret) { return ret; } @@ -32318,32 +32997,30 @@ int ClusterDomain::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_NAME: { - return manipulator(&d_name, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]); - } - case ATTRIBUTE_ID_NUM_ASSIGNED_QUEUES: { - return manipulator( - &d_numAssignedQueues, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_ASSIGNED_QUEUES]); - } - case ATTRIBUTE_ID_LOADED: { - return manipulator(&d_loaded, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LOADED]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_NAME: { + return manipulator(&d_name, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]); + } + case ATTRIBUTE_ID_NUM_ASSIGNED_QUEUES: { + return manipulator(&d_numAssignedQueues, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_ASSIGNED_QUEUES]); + } + case ATTRIBUTE_ID_LOADED: { + return manipulator(&d_loaded, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LOADED]); + } + default: + return NOT_FOUND; } } template -int ClusterDomain::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int ClusterDomain::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -32351,17 +33028,20 @@ int ClusterDomain::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::string& ClusterDomain::name() +inline +bsl::string& ClusterDomain::name() { return d_name; } -inline unsigned int& ClusterDomain::numAssignedQueues() +inline +unsigned int& ClusterDomain::numAssignedQueues() { return d_numAssignedQueues; } -inline bool& ClusterDomain::loaded() +inline +bool& ClusterDomain::loaded() { return d_loaded; } @@ -32377,8 +33057,7 @@ int ClusterDomain::accessAttributes(t_ACCESSOR& accessor) const return ret; } - ret = accessor(d_numAssignedQueues, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_ASSIGNED_QUEUES]); + ret = accessor(d_numAssignedQueues, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_ASSIGNED_QUEUES]); if (ret) { return ret; } @@ -32397,56 +33076,60 @@ int ClusterDomain::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_NAME: { + case ATTRIBUTE_ID_NAME: { return accessor(d_name, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]); - } - case ATTRIBUTE_ID_NUM_ASSIGNED_QUEUES: { - return accessor( - d_numAssignedQueues, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_ASSIGNED_QUEUES]); - } - case ATTRIBUTE_ID_LOADED: { - return accessor(d_loaded, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LOADED]); - } - default: return NOT_FOUND; + } + case ATTRIBUTE_ID_NUM_ASSIGNED_QUEUES: { + return accessor(d_numAssignedQueues, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_ASSIGNED_QUEUES]); + } + case ATTRIBUTE_ID_LOADED: { + return accessor(d_loaded, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LOADED]); + } + default: + return NOT_FOUND; } } template -int ClusterDomain::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int ClusterDomain::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::string& ClusterDomain::name() const +inline +const bsl::string& ClusterDomain::name() const { return d_name; } -inline unsigned int ClusterDomain::numAssignedQueues() const +inline +unsigned int ClusterDomain::numAssignedQueues() const { return d_numAssignedQueues; } -inline bool ClusterDomain::loaded() const +inline +bool ClusterDomain::loaded() const { return d_loaded; } -// ----------------- -// class ClusterNode -// ----------------- + + + // ----------------- + // class ClusterNode + // ----------------- // PRIVATE ACCESSORS template @@ -32465,20 +33148,17 @@ int ClusterNode::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator(&d_hostName, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_HOST_NAME]); + ret = manipulator(&d_hostName, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_HOST_NAME]); if (ret) { return ret; } - ret = manipulator(&d_nodeId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NODE_ID]); + ret = manipulator(&d_nodeId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NODE_ID]); if (ret) { return ret; } - ret = manipulator(&d_dataCenter, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DATA_CENTER]); + ret = manipulator(&d_dataCenter, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DATA_CENTER]); if (ret) { return ret; } @@ -32492,31 +33172,30 @@ int ClusterNode::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_HOST_NAME: { - return manipulator(&d_hostName, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_HOST_NAME]); - } - case ATTRIBUTE_ID_NODE_ID: { - return manipulator(&d_nodeId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NODE_ID]); - } - case ATTRIBUTE_ID_DATA_CENTER: { - return manipulator(&d_dataCenter, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DATA_CENTER]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_HOST_NAME: { + return manipulator(&d_hostName, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_HOST_NAME]); + } + case ATTRIBUTE_ID_NODE_ID: { + return manipulator(&d_nodeId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NODE_ID]); + } + case ATTRIBUTE_ID_DATA_CENTER: { + return manipulator(&d_dataCenter, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DATA_CENTER]); + } + default: + return NOT_FOUND; } } template -int ClusterNode::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int ClusterNode::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -32524,17 +33203,20 @@ int ClusterNode::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::string& ClusterNode::hostName() +inline +bsl::string& ClusterNode::hostName() { return d_hostName; } -inline int& ClusterNode::nodeId() +inline +int& ClusterNode::nodeId() { return d_nodeId; } -inline bsl::string& ClusterNode::dataCenter() +inline +bsl::string& ClusterNode::dataCenter() { return d_dataCenter; } @@ -32545,8 +33227,7 @@ int ClusterNode::accessAttributes(t_ACCESSOR& accessor) const { int ret; - ret = accessor(d_hostName, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_HOST_NAME]); + ret = accessor(d_hostName, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_HOST_NAME]); if (ret) { return ret; } @@ -32556,8 +33237,7 @@ int ClusterNode::accessAttributes(t_ACCESSOR& accessor) const return ret; } - ret = accessor(d_dataCenter, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DATA_CENTER]); + ret = accessor(d_dataCenter, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DATA_CENTER]); if (ret) { return ret; } @@ -32571,56 +33251,60 @@ int ClusterNode::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_HOST_NAME: { - return accessor(d_hostName, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_HOST_NAME]); - } - case ATTRIBUTE_ID_NODE_ID: { - return accessor(d_nodeId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NODE_ID]); - } - case ATTRIBUTE_ID_DATA_CENTER: { - return accessor(d_dataCenter, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DATA_CENTER]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_HOST_NAME: { + return accessor(d_hostName, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_HOST_NAME]); + } + case ATTRIBUTE_ID_NODE_ID: { + return accessor(d_nodeId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NODE_ID]); + } + case ATTRIBUTE_ID_DATA_CENTER: { + return accessor(d_dataCenter, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DATA_CENTER]); + } + default: + return NOT_FOUND; } } template -int ClusterNode::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int ClusterNode::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::string& ClusterNode::hostName() const +inline +const bsl::string& ClusterNode::hostName() const { return d_hostName; } -inline int ClusterNode::nodeId() const +inline +int ClusterNode::nodeId() const { return d_nodeId; } -inline const bsl::string& ClusterNode::dataCenter() const +inline +const bsl::string& ClusterNode::dataCenter() const { return d_dataCenter; } -// ----------------- -// class CommandSpec -// ----------------- + + + // ----------------- + // class CommandSpec + // ----------------- // CLASS METHODS // MANIPULATORS @@ -32629,14 +33313,12 @@ int CommandSpec::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator(&d_command, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND]); + ret = manipulator(&d_command, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND]); if (ret) { return ret; } - ret = manipulator(&d_description, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DESCRIPTION]); + ret = manipulator(&d_description, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DESCRIPTION]); if (ret) { return ret; } @@ -32650,27 +33332,27 @@ int CommandSpec::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_COMMAND: { - return manipulator(&d_command, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND]); - } - case ATTRIBUTE_ID_DESCRIPTION: { - return manipulator(&d_description, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DESCRIPTION]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_COMMAND: { + return manipulator(&d_command, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND]); + } + case ATTRIBUTE_ID_DESCRIPTION: { + return manipulator(&d_description, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DESCRIPTION]); + } + default: + return NOT_FOUND; } } template -int CommandSpec::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int CommandSpec::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -32678,12 +33360,14 @@ int CommandSpec::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::string& CommandSpec::command() +inline +bsl::string& CommandSpec::command() { return d_command; } -inline bsl::string& CommandSpec::description() +inline +bsl::string& CommandSpec::description() { return d_description; } @@ -32699,8 +33383,7 @@ int CommandSpec::accessAttributes(t_ACCESSOR& accessor) const return ret; } - ret = accessor(d_description, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DESCRIPTION]); + ret = accessor(d_description, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DESCRIPTION]); if (ret) { return ret; } @@ -32714,47 +33397,51 @@ int CommandSpec::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_COMMAND: { - return accessor(d_command, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND]); - } - case ATTRIBUTE_ID_DESCRIPTION: { - return accessor(d_description, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DESCRIPTION]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_COMMAND: { + return accessor(d_command, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND]); + } + case ATTRIBUTE_ID_DESCRIPTION: { + return accessor(d_description, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DESCRIPTION]); + } + default: + return NOT_FOUND; } } template -int CommandSpec::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int CommandSpec::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::string& CommandSpec::command() const +inline +const bsl::string& CommandSpec::command() const { return d_command; } -inline const bsl::string& CommandSpec::description() const +inline +const bsl::string& CommandSpec::description() const { return d_description; } -// ------------------ -// class ConsumerInfo -// ------------------ + + + // ------------------ + // class ConsumerInfo + // ------------------ // PRIVATE ACCESSORS template @@ -32767,7 +33454,8 @@ void ConsumerInfo::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const hashAppend(hashAlgorithm, this->consumerPriorityCount()); } -inline bool ConsumerInfo::isEqualTo(const ConsumerInfo& rhs) const +inline +bool ConsumerInfo::isEqualTo(const ConsumerInfo& rhs) const { return this->maxUnconfirmedMessages() == rhs.maxUnconfirmedMessages() && this->maxUnconfirmedBytes() == rhs.maxUnconfirmedBytes() && @@ -32782,29 +33470,22 @@ int ConsumerInfo::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator( - &d_maxUnconfirmedMessages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MAX_UNCONFIRMED_MESSAGES]); + ret = manipulator(&d_maxUnconfirmedMessages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MAX_UNCONFIRMED_MESSAGES]); if (ret) { return ret; } - ret = manipulator( - &d_maxUnconfirmedBytes, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MAX_UNCONFIRMED_BYTES]); + ret = manipulator(&d_maxUnconfirmedBytes, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MAX_UNCONFIRMED_BYTES]); if (ret) { return ret; } - ret = manipulator(&d_consumerPriority, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONSUMER_PRIORITY]); + ret = manipulator(&d_consumerPriority, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONSUMER_PRIORITY]); if (ret) { return ret; } - ret = manipulator( - &d_consumerPriorityCount, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONSUMER_PRIORITY_COUNT]); + ret = manipulator(&d_consumerPriorityCount, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONSUMER_PRIORITY_COUNT]); if (ret) { return ret; } @@ -32818,39 +33499,33 @@ int ConsumerInfo::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_MAX_UNCONFIRMED_MESSAGES: { - return manipulator( - &d_maxUnconfirmedMessages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MAX_UNCONFIRMED_MESSAGES]); - } - case ATTRIBUTE_ID_MAX_UNCONFIRMED_BYTES: { - return manipulator( - &d_maxUnconfirmedBytes, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MAX_UNCONFIRMED_BYTES]); - } - case ATTRIBUTE_ID_CONSUMER_PRIORITY: { - return manipulator( - &d_consumerPriority, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONSUMER_PRIORITY]); - } - case ATTRIBUTE_ID_CONSUMER_PRIORITY_COUNT: { - return manipulator( - &d_consumerPriorityCount, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONSUMER_PRIORITY_COUNT]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_MAX_UNCONFIRMED_MESSAGES: { + return manipulator(&d_maxUnconfirmedMessages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MAX_UNCONFIRMED_MESSAGES]); + } + case ATTRIBUTE_ID_MAX_UNCONFIRMED_BYTES: { + return manipulator(&d_maxUnconfirmedBytes, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MAX_UNCONFIRMED_BYTES]); + } + case ATTRIBUTE_ID_CONSUMER_PRIORITY: { + return manipulator(&d_consumerPriority, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONSUMER_PRIORITY]); + } + case ATTRIBUTE_ID_CONSUMER_PRIORITY_COUNT: { + return manipulator(&d_consumerPriorityCount, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONSUMER_PRIORITY_COUNT]); + } + default: + return NOT_FOUND; } } template -int ConsumerInfo::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int ConsumerInfo::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -32858,22 +33533,26 @@ int ConsumerInfo::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsls::Types::Int64& ConsumerInfo::maxUnconfirmedMessages() +inline +bsls::Types::Int64& ConsumerInfo::maxUnconfirmedMessages() { return d_maxUnconfirmedMessages; } -inline bsls::Types::Int64& ConsumerInfo::maxUnconfirmedBytes() +inline +bsls::Types::Int64& ConsumerInfo::maxUnconfirmedBytes() { return d_maxUnconfirmedBytes; } -inline int& ConsumerInfo::consumerPriority() +inline +int& ConsumerInfo::consumerPriority() { return d_consumerPriority; } -inline int& ConsumerInfo::consumerPriorityCount() +inline +int& ConsumerInfo::consumerPriorityCount() { return d_consumerPriorityCount; } @@ -32884,29 +33563,22 @@ int ConsumerInfo::accessAttributes(t_ACCESSOR& accessor) const { int ret; - ret = accessor( - d_maxUnconfirmedMessages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MAX_UNCONFIRMED_MESSAGES]); + ret = accessor(d_maxUnconfirmedMessages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MAX_UNCONFIRMED_MESSAGES]); if (ret) { return ret; } - ret = accessor( - d_maxUnconfirmedBytes, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MAX_UNCONFIRMED_BYTES]); + ret = accessor(d_maxUnconfirmedBytes, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MAX_UNCONFIRMED_BYTES]); if (ret) { return ret; } - ret = accessor(d_consumerPriority, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONSUMER_PRIORITY]); + ret = accessor(d_consumerPriority, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONSUMER_PRIORITY]); if (ret) { return ret; } - ret = accessor( - d_consumerPriorityCount, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONSUMER_PRIORITY_COUNT]); + ret = accessor(d_consumerPriorityCount, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONSUMER_PRIORITY_COUNT]); if (ret) { return ret; } @@ -32920,87 +33592,89 @@ int ConsumerInfo::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_MAX_UNCONFIRMED_MESSAGES: { - return accessor( - d_maxUnconfirmedMessages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MAX_UNCONFIRMED_MESSAGES]); - } - case ATTRIBUTE_ID_MAX_UNCONFIRMED_BYTES: { - return accessor( - d_maxUnconfirmedBytes, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MAX_UNCONFIRMED_BYTES]); - } - case ATTRIBUTE_ID_CONSUMER_PRIORITY: { - return accessor( - d_consumerPriority, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONSUMER_PRIORITY]); - } - case ATTRIBUTE_ID_CONSUMER_PRIORITY_COUNT: { - return accessor( - d_consumerPriorityCount, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONSUMER_PRIORITY_COUNT]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_MAX_UNCONFIRMED_MESSAGES: { + return accessor(d_maxUnconfirmedMessages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MAX_UNCONFIRMED_MESSAGES]); + } + case ATTRIBUTE_ID_MAX_UNCONFIRMED_BYTES: { + return accessor(d_maxUnconfirmedBytes, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MAX_UNCONFIRMED_BYTES]); + } + case ATTRIBUTE_ID_CONSUMER_PRIORITY: { + return accessor(d_consumerPriority, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONSUMER_PRIORITY]); + } + case ATTRIBUTE_ID_CONSUMER_PRIORITY_COUNT: { + return accessor(d_consumerPriorityCount, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONSUMER_PRIORITY_COUNT]); + } + default: + return NOT_FOUND; } } template -int ConsumerInfo::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int ConsumerInfo::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline bsls::Types::Int64 ConsumerInfo::maxUnconfirmedMessages() const +inline +bsls::Types::Int64 ConsumerInfo::maxUnconfirmedMessages() const { return d_maxUnconfirmedMessages; } -inline bsls::Types::Int64 ConsumerInfo::maxUnconfirmedBytes() const +inline +bsls::Types::Int64 ConsumerInfo::maxUnconfirmedBytes() const { return d_maxUnconfirmedBytes; } -inline int ConsumerInfo::consumerPriority() const +inline +int ConsumerInfo::consumerPriority() const { return d_consumerPriority; } -inline int ConsumerInfo::consumerPriorityCount() const +inline +int ConsumerInfo::consumerPriorityCount() const { return d_consumerPriorityCount; } -// -------------------- -// class ConsumerStatus -// -------------------- + + + // -------------------- + // class ConsumerStatus + // -------------------- // CLASS METHODS -inline int ConsumerStatus::fromString(Value* result, const bsl::string& string) +inline +int ConsumerStatus::fromString(Value *result, const bsl::string& string) { - return fromString(result, - string.c_str(), - static_cast(string.length())); + return fromString(result, string.c_str(), static_cast(string.length())); } -inline bsl::ostream& ConsumerStatus::print(bsl::ostream& stream, - ConsumerStatus::Value value) +inline +bsl::ostream& ConsumerStatus::print(bsl::ostream& stream, + ConsumerStatus::Value value) { return stream << toString(value); } -// ------------- -// class Context -// ------------- + + + // ------------- + // class Context + // ------------- // CLASS METHODS // MANIPULATORS @@ -33009,9 +33683,7 @@ int Context::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator( - &d_queueHandleParametersJson, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_HANDLE_PARAMETERS_JSON]); + ret = manipulator(&d_queueHandleParametersJson, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_HANDLE_PARAMETERS_JSON]); if (ret) { return ret; } @@ -33025,24 +33697,24 @@ int Context::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_QUEUE_HANDLE_PARAMETERS_JSON: { - return manipulator(&d_queueHandleParametersJson, - ATTRIBUTE_INFO_ARRAY - [ATTRIBUTE_INDEX_QUEUE_HANDLE_PARAMETERS_JSON]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_QUEUE_HANDLE_PARAMETERS_JSON: { + return manipulator(&d_queueHandleParametersJson, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_HANDLE_PARAMETERS_JSON]); + } + default: + return NOT_FOUND; } } template -int Context::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int Context::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -33050,7 +33722,8 @@ int Context::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::string& Context::queueHandleParametersJson() +inline +bsl::string& Context::queueHandleParametersJson() { return d_queueHandleParametersJson; } @@ -33061,9 +33734,7 @@ int Context::accessAttributes(t_ACCESSOR& accessor) const { int ret; - ret = accessor( - d_queueHandleParametersJson, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_HANDLE_PARAMETERS_JSON]); + ret = accessor(d_queueHandleParametersJson, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_HANDLE_PARAMETERS_JSON]); if (ret) { return ret; } @@ -33077,39 +33748,42 @@ int Context::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_QUEUE_HANDLE_PARAMETERS_JSON: { - return accessor(d_queueHandleParametersJson, - ATTRIBUTE_INFO_ARRAY - [ATTRIBUTE_INDEX_QUEUE_HANDLE_PARAMETERS_JSON]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_QUEUE_HANDLE_PARAMETERS_JSON: { + return accessor(d_queueHandleParametersJson, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_HANDLE_PARAMETERS_JSON]); + } + default: + return NOT_FOUND; } } template -int Context::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int Context::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::string& Context::queueHandleParametersJson() const +inline +const bsl::string& Context::queueHandleParametersJson() const { return d_queueHandleParametersJson; } -// ----------------------- -// class DomainReconfigure -// ----------------------- + + + // ----------------------- + // class DomainReconfigure + // ----------------------- // CLASS METHODS // PRIVATE ACCESSORS @@ -33120,20 +33794,23 @@ void DomainReconfigure::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const using bslh::hashAppend; hashAppend(hashAlgorithm, this->selectionId()); switch (this->selectionId()) { - case Class::SELECTION_ID_DOMAIN: + case Class::SELECTION_ID_DOMAIN: hashAppend(hashAlgorithm, this->domain()); break; - default: BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); + default: + BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); } } -inline bool DomainReconfigure::isEqualTo(const DomainReconfigure& rhs) const +inline +bool DomainReconfigure::isEqualTo(const DomainReconfigure& rhs) const { typedef DomainReconfigure Class; if (this->selectionId() == rhs.selectionId()) { switch (rhs.selectionId()) { - case Class::SELECTION_ID_DOMAIN: return this->domain() == rhs.domain(); - default: + case Class::SELECTION_ID_DOMAIN: + return this->domain() == rhs.domain(); + default: BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId()); return true; } @@ -33144,13 +33821,15 @@ inline bool DomainReconfigure::isEqualTo(const DomainReconfigure& rhs) const } // CREATORS -inline DomainReconfigure::DomainReconfigure(bslma::Allocator* basicAllocator) +inline +DomainReconfigure::DomainReconfigure(bslma::Allocator *basicAllocator) : d_selectionId(SELECTION_ID_UNDEFINED) , d_allocator_p(bslma::Default::allocator(basicAllocator)) { } -inline DomainReconfigure::~DomainReconfigure() +inline +DomainReconfigure::~DomainReconfigure() { reset(); } @@ -33160,24 +33839,25 @@ template int DomainReconfigure::manipulateSelection(t_MANIPULATOR& manipulator) { switch (d_selectionId) { - case DomainReconfigure::SELECTION_ID_DOMAIN: + case DomainReconfigure::SELECTION_ID_DOMAIN: return manipulator(&d_domain.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAIN]); - default: - BSLS_ASSERT(DomainReconfigure::SELECTION_ID_UNDEFINED == - d_selectionId); + SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAIN]); + default: + BSLS_ASSERT(DomainReconfigure::SELECTION_ID_UNDEFINED == d_selectionId); return -1; } } -inline bsl::string& DomainReconfigure::domain() +inline +bsl::string& DomainReconfigure::domain() { BSLS_ASSERT(SELECTION_ID_DOMAIN == d_selectionId); return d_domain.object(); } // ACCESSORS -inline int DomainReconfigure::selectionId() const +inline +int DomainReconfigure::selectionId() const { return d_selectionId; } @@ -33186,68 +33866,78 @@ template int DomainReconfigure::accessSelection(t_ACCESSOR& accessor) const { switch (d_selectionId) { - case SELECTION_ID_DOMAIN: + case SELECTION_ID_DOMAIN: return accessor(d_domain.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAIN]); - default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); return -1; + SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAIN]); + default: + BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); + return -1; } } -inline const bsl::string& DomainReconfigure::domain() const +inline +const bsl::string& DomainReconfigure::domain() const { BSLS_ASSERT(SELECTION_ID_DOMAIN == d_selectionId); return d_domain.object(); } -inline bool DomainReconfigure::isDomainValue() const +inline +bool DomainReconfigure::isDomainValue() const { return SELECTION_ID_DOMAIN == d_selectionId; } -inline bool DomainReconfigure::isUndefinedValue() const +inline +bool DomainReconfigure::isUndefinedValue() const { return SELECTION_ID_UNDEFINED == d_selectionId; } -// ------------------ -// class ElectorState -// ------------------ + + // ------------------ + // class ElectorState + // ------------------ // CLASS METHODS -inline int ElectorState::fromString(Value* result, const bsl::string& string) +inline +int ElectorState::fromString(Value *result, const bsl::string& string) { - return fromString(result, - string.c_str(), - static_cast(string.length())); + return fromString(result, string.c_str(), static_cast(string.length())); } -inline bsl::ostream& ElectorState::print(bsl::ostream& stream, - ElectorState::Value value) +inline +bsl::ostream& ElectorState::print(bsl::ostream& stream, + ElectorState::Value value) { return stream << toString(value); } -// -------------------- -// class EncodingFormat -// -------------------- + + + // -------------------- + // class EncodingFormat + // -------------------- // CLASS METHODS -inline int EncodingFormat::fromString(Value* result, const bsl::string& string) +inline +int EncodingFormat::fromString(Value *result, const bsl::string& string) { - return fromString(result, - string.c_str(), - static_cast(string.length())); + return fromString(result, string.c_str(), static_cast(string.length())); } -inline bsl::ostream& EncodingFormat::print(bsl::ostream& stream, - EncodingFormat::Value value) +inline +bsl::ostream& EncodingFormat::print(bsl::ostream& stream, + EncodingFormat::Value value) { return stream << toString(value); } -// ----------- -// class Error -// ----------- + + + // ----------- + // class Error + // ----------- // CLASS METHODS // MANIPULATORS @@ -33256,8 +33946,7 @@ int Error::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator(&d_message, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGE]); + ret = manipulator(&d_message, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGE]); if (ret) { return ret; } @@ -33271,23 +33960,24 @@ int Error::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_MESSAGE: { - return manipulator(&d_message, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGE]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_MESSAGE: { + return manipulator(&d_message, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGE]); + } + default: + return NOT_FOUND; } } template -int Error::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int Error::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -33295,7 +33985,8 @@ int Error::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::string& Error::message() +inline +bsl::string& Error::message() { return d_message; } @@ -33320,38 +34011,42 @@ int Error::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_MESSAGE: { - return accessor(d_message, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGE]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_MESSAGE: { + return accessor(d_message, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGE]); + } + default: + return NOT_FOUND; } } template -int Error::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int Error::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::string& Error::message() const +inline +const bsl::string& Error::message() const { return d_message; } -// -------------- -// class FileInfo -// -------------- + + + // -------------- + // class FileInfo + // -------------- // PRIVATE ACCESSORS template @@ -33370,20 +34065,17 @@ int FileInfo::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator(&d_positionBytes, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_POSITION_BYTES]); + ret = manipulator(&d_positionBytes, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_POSITION_BYTES]); if (ret) { return ret; } - ret = manipulator(&d_sizeBytes, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SIZE_BYTES]); + ret = manipulator(&d_sizeBytes, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SIZE_BYTES]); if (ret) { return ret; } - ret = manipulator(&d_outstandingBytes, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_OUTSTANDING_BYTES]); + ret = manipulator(&d_outstandingBytes, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_OUTSTANDING_BYTES]); if (ret) { return ret; } @@ -33397,33 +34089,30 @@ int FileInfo::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_POSITION_BYTES: { - return manipulator( - &d_positionBytes, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_POSITION_BYTES]); - } - case ATTRIBUTE_ID_SIZE_BYTES: { - return manipulator(&d_sizeBytes, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SIZE_BYTES]); - } - case ATTRIBUTE_ID_OUTSTANDING_BYTES: { - return manipulator( - &d_outstandingBytes, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_OUTSTANDING_BYTES]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_POSITION_BYTES: { + return manipulator(&d_positionBytes, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_POSITION_BYTES]); + } + case ATTRIBUTE_ID_SIZE_BYTES: { + return manipulator(&d_sizeBytes, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SIZE_BYTES]); + } + case ATTRIBUTE_ID_OUTSTANDING_BYTES: { + return manipulator(&d_outstandingBytes, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_OUTSTANDING_BYTES]); + } + default: + return NOT_FOUND; } } template -int FileInfo::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int FileInfo::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -33431,17 +34120,20 @@ int FileInfo::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsls::Types::Uint64& FileInfo::positionBytes() +inline +bsls::Types::Uint64& FileInfo::positionBytes() { return d_positionBytes; } -inline bsls::Types::Uint64& FileInfo::sizeBytes() +inline +bsls::Types::Uint64& FileInfo::sizeBytes() { return d_sizeBytes; } -inline bsls::Types::Uint64& FileInfo::outstandingBytes() +inline +bsls::Types::Uint64& FileInfo::outstandingBytes() { return d_outstandingBytes; } @@ -33452,20 +34144,17 @@ int FileInfo::accessAttributes(t_ACCESSOR& accessor) const { int ret; - ret = accessor(d_positionBytes, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_POSITION_BYTES]); + ret = accessor(d_positionBytes, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_POSITION_BYTES]); if (ret) { return ret; } - ret = accessor(d_sizeBytes, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SIZE_BYTES]); + ret = accessor(d_sizeBytes, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SIZE_BYTES]); if (ret) { return ret; } - ret = accessor(d_outstandingBytes, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_OUTSTANDING_BYTES]); + ret = accessor(d_outstandingBytes, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_OUTSTANDING_BYTES]); if (ret) { return ret; } @@ -33479,57 +34168,60 @@ int FileInfo::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_POSITION_BYTES: { - return accessor(d_positionBytes, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_POSITION_BYTES]); - } - case ATTRIBUTE_ID_SIZE_BYTES: { - return accessor(d_sizeBytes, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SIZE_BYTES]); - } - case ATTRIBUTE_ID_OUTSTANDING_BYTES: { - return accessor( - d_outstandingBytes, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_OUTSTANDING_BYTES]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_POSITION_BYTES: { + return accessor(d_positionBytes, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_POSITION_BYTES]); + } + case ATTRIBUTE_ID_SIZE_BYTES: { + return accessor(d_sizeBytes, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SIZE_BYTES]); + } + case ATTRIBUTE_ID_OUTSTANDING_BYTES: { + return accessor(d_outstandingBytes, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_OUTSTANDING_BYTES]); + } + default: + return NOT_FOUND; } } template -int FileInfo::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int FileInfo::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline bsls::Types::Uint64 FileInfo::positionBytes() const +inline +bsls::Types::Uint64 FileInfo::positionBytes() const { return d_positionBytes; } -inline bsls::Types::Uint64 FileInfo::sizeBytes() const +inline +bsls::Types::Uint64 FileInfo::sizeBytes() const { return d_sizeBytes; } -inline bsls::Types::Uint64 FileInfo::outstandingBytes() const +inline +bsls::Types::Uint64 FileInfo::outstandingBytes() const { return d_outstandingBytes; } -// ------------- -// class FileSet -// ------------- + + + // ------------- + // class FileSet + // ------------- // CLASS METHODS // MANIPULATORS @@ -33538,15 +34230,12 @@ int FileSet::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator(&d_dataFileName, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DATA_FILE_NAME]); + ret = manipulator(&d_dataFileName, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DATA_FILE_NAME]); if (ret) { return ret; } - ret = manipulator( - &d_aliasedBlobBufferCount, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ALIASED_BLOB_BUFFER_COUNT]); + ret = manipulator(&d_aliasedBlobBufferCount, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ALIASED_BLOB_BUFFER_COUNT]); if (ret) { return ret; } @@ -33560,29 +34249,27 @@ int FileSet::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_DATA_FILE_NAME: { - return manipulator( - &d_dataFileName, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DATA_FILE_NAME]); - } - case ATTRIBUTE_ID_ALIASED_BLOB_BUFFER_COUNT: { - return manipulator( - &d_aliasedBlobBufferCount, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ALIASED_BLOB_BUFFER_COUNT]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_DATA_FILE_NAME: { + return manipulator(&d_dataFileName, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DATA_FILE_NAME]); + } + case ATTRIBUTE_ID_ALIASED_BLOB_BUFFER_COUNT: { + return manipulator(&d_aliasedBlobBufferCount, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ALIASED_BLOB_BUFFER_COUNT]); + } + default: + return NOT_FOUND; } } template -int FileSet::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int FileSet::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -33590,12 +34277,14 @@ int FileSet::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::string& FileSet::dataFileName() +inline +bsl::string& FileSet::dataFileName() { return d_dataFileName; } -inline bsls::Types::Uint64& FileSet::aliasedBlobBufferCount() +inline +bsls::Types::Uint64& FileSet::aliasedBlobBufferCount() { return d_aliasedBlobBufferCount; } @@ -33606,15 +34295,12 @@ int FileSet::accessAttributes(t_ACCESSOR& accessor) const { int ret; - ret = accessor(d_dataFileName, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DATA_FILE_NAME]); + ret = accessor(d_dataFileName, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DATA_FILE_NAME]); if (ret) { return ret; } - ret = accessor( - d_aliasedBlobBufferCount, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ALIASED_BLOB_BUFFER_COUNT]); + ret = accessor(d_aliasedBlobBufferCount, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ALIASED_BLOB_BUFFER_COUNT]); if (ret) { return ret; } @@ -33628,66 +34314,71 @@ int FileSet::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_DATA_FILE_NAME: { - return accessor(d_dataFileName, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DATA_FILE_NAME]); - } - case ATTRIBUTE_ID_ALIASED_BLOB_BUFFER_COUNT: { - return accessor( - d_aliasedBlobBufferCount, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ALIASED_BLOB_BUFFER_COUNT]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_DATA_FILE_NAME: { + return accessor(d_dataFileName, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DATA_FILE_NAME]); + } + case ATTRIBUTE_ID_ALIASED_BLOB_BUFFER_COUNT: { + return accessor(d_aliasedBlobBufferCount, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ALIASED_BLOB_BUFFER_COUNT]); + } + default: + return NOT_FOUND; } } template -int FileSet::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int FileSet::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::string& FileSet::dataFileName() const +inline +const bsl::string& FileSet::dataFileName() const { return d_dataFileName; } -inline bsls::Types::Uint64 FileSet::aliasedBlobBufferCount() const +inline +bsls::Types::Uint64 FileSet::aliasedBlobBufferCount() const { return d_aliasedBlobBufferCount; } -// -------------------- -// class FileStoreState -// -------------------- + + + // -------------------- + // class FileStoreState + // -------------------- // CLASS METHODS -inline int FileStoreState::fromString(Value* result, const bsl::string& string) +inline +int FileStoreState::fromString(Value *result, const bsl::string& string) { - return fromString(result, - string.c_str(), - static_cast(string.length())); + return fromString(result, string.c_str(), static_cast(string.length())); } -inline bsl::ostream& FileStoreState::print(bsl::ostream& stream, - FileStoreState::Value value) +inline +bsl::ostream& FileStoreState::print(bsl::ostream& stream, + FileStoreState::Value value) { return stream << toString(value); } -// ----------------- -// class HelpCommand -// ----------------- + + + // ----------------- + // class HelpCommand + // ----------------- // CLASS METHODS // MANIPULATORS @@ -33696,8 +34387,7 @@ int HelpCommand::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator(&d_plumbing, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PLUMBING]); + ret = manipulator(&d_plumbing, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PLUMBING]); if (ret) { return ret; } @@ -33711,23 +34401,24 @@ int HelpCommand::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_PLUMBING: { - return manipulator(&d_plumbing, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PLUMBING]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_PLUMBING: { + return manipulator(&d_plumbing, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PLUMBING]); + } + default: + return NOT_FOUND; } } template -int HelpCommand::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int HelpCommand::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -33735,7 +34426,8 @@ int HelpCommand::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bool& HelpCommand::plumbing() +inline +bool& HelpCommand::plumbing() { return d_plumbing; } @@ -33760,38 +34452,42 @@ int HelpCommand::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_PLUMBING: { - return accessor(d_plumbing, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PLUMBING]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_PLUMBING: { + return accessor(d_plumbing, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PLUMBING]); + } + default: + return NOT_FOUND; } } template -int HelpCommand::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int HelpCommand::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline bool HelpCommand::plumbing() const +inline +bool HelpCommand::plumbing() const { return d_plumbing; } -// --------------------------- -// class LeaderMessageSequence -// --------------------------- + + + // --------------------------- + // class LeaderMessageSequence + // --------------------------- // CLASS METHODS // MANIPULATORS @@ -33800,14 +34496,12 @@ int LeaderMessageSequence::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator(&d_electorTerm, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ELECTOR_TERM]); + ret = manipulator(&d_electorTerm, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ELECTOR_TERM]); if (ret) { return ret; } - ret = manipulator(&d_sequenceNumber, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SEQUENCE_NUMBER]); + ret = manipulator(&d_sequenceNumber, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SEQUENCE_NUMBER]); if (ret) { return ret; } @@ -33816,34 +34510,32 @@ int LeaderMessageSequence::manipulateAttributes(t_MANIPULATOR& manipulator) } template -int LeaderMessageSequence::manipulateAttribute(t_MANIPULATOR& manipulator, - int id) +int LeaderMessageSequence::manipulateAttribute(t_MANIPULATOR& manipulator, int id) { enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_ELECTOR_TERM: { - return manipulator(&d_electorTerm, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ELECTOR_TERM]); - } - case ATTRIBUTE_ID_SEQUENCE_NUMBER: { - return manipulator( - &d_sequenceNumber, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SEQUENCE_NUMBER]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_ELECTOR_TERM: { + return manipulator(&d_electorTerm, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ELECTOR_TERM]); + } + case ATTRIBUTE_ID_SEQUENCE_NUMBER: { + return manipulator(&d_sequenceNumber, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SEQUENCE_NUMBER]); + } + default: + return NOT_FOUND; } } template -int LeaderMessageSequence::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int LeaderMessageSequence::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -33851,12 +34543,14 @@ int LeaderMessageSequence::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsls::Types::Uint64& LeaderMessageSequence::electorTerm() +inline +bsls::Types::Uint64& LeaderMessageSequence::electorTerm() { return d_electorTerm; } -inline bsls::Types::Uint64& LeaderMessageSequence::sequenceNumber() +inline +bsls::Types::Uint64& LeaderMessageSequence::sequenceNumber() { return d_sequenceNumber; } @@ -33867,14 +34561,12 @@ int LeaderMessageSequence::accessAttributes(t_ACCESSOR& accessor) const { int ret; - ret = accessor(d_electorTerm, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ELECTOR_TERM]); + ret = accessor(d_electorTerm, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ELECTOR_TERM]); if (ret) { return ret; } - ret = accessor(d_sequenceNumber, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SEQUENCE_NUMBER]); + ret = accessor(d_sequenceNumber, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SEQUENCE_NUMBER]); if (ret) { return ret; } @@ -33888,70 +34580,75 @@ int LeaderMessageSequence::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_ELECTOR_TERM: { - return accessor(d_electorTerm, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ELECTOR_TERM]); - } - case ATTRIBUTE_ID_SEQUENCE_NUMBER: { - return accessor(d_sequenceNumber, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SEQUENCE_NUMBER]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_ELECTOR_TERM: { + return accessor(d_electorTerm, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ELECTOR_TERM]); + } + case ATTRIBUTE_ID_SEQUENCE_NUMBER: { + return accessor(d_sequenceNumber, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SEQUENCE_NUMBER]); + } + default: + return NOT_FOUND; } } template -int LeaderMessageSequence::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int LeaderMessageSequence::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline bsls::Types::Uint64 LeaderMessageSequence::electorTerm() const +inline +bsls::Types::Uint64 LeaderMessageSequence::electorTerm() const { return d_electorTerm; } -inline bsls::Types::Uint64 LeaderMessageSequence::sequenceNumber() const +inline +bsls::Types::Uint64 LeaderMessageSequence::sequenceNumber() const { return d_sequenceNumber; } -// ------------------ -// class LeaderStatus -// ------------------ + + + // ------------------ + // class LeaderStatus + // ------------------ // CLASS METHODS -inline int LeaderStatus::fromString(Value* result, const bsl::string& string) +inline +int LeaderStatus::fromString(Value *result, const bsl::string& string) { - return fromString(result, - string.c_str(), - static_cast(string.length())); + return fromString(result, string.c_str(), static_cast(string.length())); } -inline bsl::ostream& LeaderStatus::print(bsl::ostream& stream, - LeaderStatus::Value value) +inline +bsl::ostream& LeaderStatus::print(bsl::ostream& stream, + LeaderStatus::Value value) { return stream << toString(value); } -// ------------------------------ -// class LeastRecentlyUsedGroupId -// ------------------------------ + + + // ------------------------------ + // class LeastRecentlyUsedGroupId + // ------------------------------ // PRIVATE ACCESSORS template -void LeastRecentlyUsedGroupId::hashAppendImpl( - t_HASH_ALGORITHM& hashAlgorithm) const +void LeastRecentlyUsedGroupId::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const { using bslh::hashAppend; hashAppend(hashAlgorithm, this->clientDescription()); @@ -33966,22 +34663,17 @@ int LeastRecentlyUsedGroupId::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator( - &d_clientDescription, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLIENT_DESCRIPTION]); + ret = manipulator(&d_clientDescription, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLIENT_DESCRIPTION]); if (ret) { return ret; } - ret = manipulator(&d_msgGroupId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MSG_GROUP_ID]); + ret = manipulator(&d_msgGroupId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MSG_GROUP_ID]); if (ret) { return ret; } - ret = manipulator( - &d_lastSeenDeltaNanoseconds, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LAST_SEEN_DELTA_NANOSECONDS]); + ret = manipulator(&d_lastSeenDeltaNanoseconds, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LAST_SEEN_DELTA_NANOSECONDS]); if (ret) { return ret; } @@ -33990,39 +34682,35 @@ int LeastRecentlyUsedGroupId::manipulateAttributes(t_MANIPULATOR& manipulator) } template -int LeastRecentlyUsedGroupId::manipulateAttribute(t_MANIPULATOR& manipulator, - int id) +int LeastRecentlyUsedGroupId::manipulateAttribute(t_MANIPULATOR& manipulator, int id) { enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_CLIENT_DESCRIPTION: { - return manipulator( - &d_clientDescription, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLIENT_DESCRIPTION]); - } - case ATTRIBUTE_ID_MSG_GROUP_ID: { - return manipulator(&d_msgGroupId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MSG_GROUP_ID]); - } - case ATTRIBUTE_ID_LAST_SEEN_DELTA_NANOSECONDS: { - return manipulator( - &d_lastSeenDeltaNanoseconds, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LAST_SEEN_DELTA_NANOSECONDS]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_CLIENT_DESCRIPTION: { + return manipulator(&d_clientDescription, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLIENT_DESCRIPTION]); + } + case ATTRIBUTE_ID_MSG_GROUP_ID: { + return manipulator(&d_msgGroupId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MSG_GROUP_ID]); + } + case ATTRIBUTE_ID_LAST_SEEN_DELTA_NANOSECONDS: { + return manipulator(&d_lastSeenDeltaNanoseconds, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LAST_SEEN_DELTA_NANOSECONDS]); + } + default: + return NOT_FOUND; } } template -int LeastRecentlyUsedGroupId::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int LeastRecentlyUsedGroupId::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -34030,17 +34718,20 @@ int LeastRecentlyUsedGroupId::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::string& LeastRecentlyUsedGroupId::clientDescription() +inline +bsl::string& LeastRecentlyUsedGroupId::clientDescription() { return d_clientDescription; } -inline bsl::string& LeastRecentlyUsedGroupId::msgGroupId() +inline +bsl::string& LeastRecentlyUsedGroupId::msgGroupId() { return d_msgGroupId; } -inline bsls::Types::Int64& LeastRecentlyUsedGroupId::lastSeenDeltaNanoseconds() +inline +bsls::Types::Int64& LeastRecentlyUsedGroupId::lastSeenDeltaNanoseconds() { return d_lastSeenDeltaNanoseconds; } @@ -34051,21 +34742,17 @@ int LeastRecentlyUsedGroupId::accessAttributes(t_ACCESSOR& accessor) const { int ret; - ret = accessor(d_clientDescription, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLIENT_DESCRIPTION]); + ret = accessor(d_clientDescription, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLIENT_DESCRIPTION]); if (ret) { return ret; } - ret = accessor(d_msgGroupId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MSG_GROUP_ID]); + ret = accessor(d_msgGroupId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MSG_GROUP_ID]); if (ret) { return ret; } - ret = accessor( - d_lastSeenDeltaNanoseconds, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LAST_SEEN_DELTA_NANOSECONDS]); + ret = accessor(d_lastSeenDeltaNanoseconds, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LAST_SEEN_DELTA_NANOSECONDS]); if (ret) { return ret; } @@ -34074,65 +34761,65 @@ int LeastRecentlyUsedGroupId::accessAttributes(t_ACCESSOR& accessor) const } template -int LeastRecentlyUsedGroupId::accessAttribute(t_ACCESSOR& accessor, - int id) const +int LeastRecentlyUsedGroupId::accessAttribute(t_ACCESSOR& accessor, int id) const { enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_CLIENT_DESCRIPTION: { - return accessor( - d_clientDescription, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLIENT_DESCRIPTION]); - } - case ATTRIBUTE_ID_MSG_GROUP_ID: { - return accessor(d_msgGroupId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MSG_GROUP_ID]); - } - case ATTRIBUTE_ID_LAST_SEEN_DELTA_NANOSECONDS: { - return accessor( - d_lastSeenDeltaNanoseconds, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LAST_SEEN_DELTA_NANOSECONDS]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_CLIENT_DESCRIPTION: { + return accessor(d_clientDescription, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLIENT_DESCRIPTION]); + } + case ATTRIBUTE_ID_MSG_GROUP_ID: { + return accessor(d_msgGroupId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MSG_GROUP_ID]); + } + case ATTRIBUTE_ID_LAST_SEEN_DELTA_NANOSECONDS: { + return accessor(d_lastSeenDeltaNanoseconds, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LAST_SEEN_DELTA_NANOSECONDS]); + } + default: + return NOT_FOUND; } } template -int LeastRecentlyUsedGroupId::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int LeastRecentlyUsedGroupId::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::string& LeastRecentlyUsedGroupId::clientDescription() const +inline +const bsl::string& LeastRecentlyUsedGroupId::clientDescription() const { return d_clientDescription; } -inline const bsl::string& LeastRecentlyUsedGroupId::msgGroupId() const +inline +const bsl::string& LeastRecentlyUsedGroupId::msgGroupId() const { return d_msgGroupId; } -inline bsls::Types::Int64 -LeastRecentlyUsedGroupId::lastSeenDeltaNanoseconds() const +inline +bsls::Types::Int64 LeastRecentlyUsedGroupId::lastSeenDeltaNanoseconds() const { return d_lastSeenDeltaNanoseconds; } -// ------------------ -// class ListMessages -// ------------------ + + + // ------------------ + // class ListMessages + // ------------------ // PRIVATE ACCESSORS template @@ -34175,31 +34862,30 @@ int ListMessages::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_APP_ID: { - return manipulator(&d_appId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_ID]); - } - case ATTRIBUTE_ID_OFFSET: { - return manipulator(&d_offset, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_OFFSET]); - } - case ATTRIBUTE_ID_COUNT: { - return manipulator(&d_count, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COUNT]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_APP_ID: { + return manipulator(&d_appId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_ID]); + } + case ATTRIBUTE_ID_OFFSET: { + return manipulator(&d_offset, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_OFFSET]); + } + case ATTRIBUTE_ID_COUNT: { + return manipulator(&d_count, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COUNT]); + } + default: + return NOT_FOUND; } } template -int ListMessages::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int ListMessages::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -34207,17 +34893,20 @@ int ListMessages::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bdlb::NullableValue& ListMessages::appId() +inline +bdlb::NullableValue& ListMessages::appId() { return d_appId; } -inline int& ListMessages::offset() +inline +int& ListMessages::offset() { return d_offset; } -inline int& ListMessages::count() +inline +int& ListMessages::count() { return d_count; } @@ -34252,72 +34941,80 @@ int ListMessages::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_APP_ID: { + case ATTRIBUTE_ID_APP_ID: { return accessor(d_appId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_ID]); - } - case ATTRIBUTE_ID_OFFSET: { - return accessor(d_offset, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_OFFSET]); - } - case ATTRIBUTE_ID_COUNT: { + } + case ATTRIBUTE_ID_OFFSET: { + return accessor(d_offset, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_OFFSET]); + } + case ATTRIBUTE_ID_COUNT: { return accessor(d_count, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COUNT]); - } - default: return NOT_FOUND; + } + default: + return NOT_FOUND; } } template -int ListMessages::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int ListMessages::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bdlb::NullableValue& ListMessages::appId() const +inline +const bdlb::NullableValue& ListMessages::appId() const { return d_appId; } -inline int ListMessages::offset() const +inline +int ListMessages::offset() const { return d_offset; } -inline int ListMessages::count() const +inline +int ListMessages::count() const { return d_count; } -// -------------- -// class Locality -// -------------- + + + // -------------- + // class Locality + // -------------- // CLASS METHODS -inline int Locality::fromString(Value* result, const bsl::string& string) +inline +int Locality::fromString(Value *result, const bsl::string& string) { - return fromString(result, - string.c_str(), - static_cast(string.length())); + return fromString(result, string.c_str(), static_cast(string.length())); } -inline bsl::ostream& Locality::print(bsl::ostream& stream, - Locality::Value value) +inline +bsl::ostream& Locality::print(bsl::ostream& stream, + Locality::Value value) { return stream << toString(value); } -// ------------- -// class Message -// ------------- + + + // ------------- + // class Message + // ------------- // PRIVATE ACCESSORS template @@ -34341,14 +35038,12 @@ int Message::manipulateAttributes(t_MANIPULATOR& manipulator) return ret; } - ret = manipulator(&d_sizeBytes, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SIZE_BYTES]); + ret = manipulator(&d_sizeBytes, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SIZE_BYTES]); if (ret) { return ret; } - ret = manipulator(&d_arrivalTimestamp, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ARRIVAL_TIMESTAMP]); + ret = manipulator(&d_arrivalTimestamp, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ARRIVAL_TIMESTAMP]); if (ret) { return ret; } @@ -34362,32 +35057,30 @@ int Message::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_GUID: { - return manipulator(&d_guid, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_GUID]); - } - case ATTRIBUTE_ID_SIZE_BYTES: { - return manipulator(&d_sizeBytes, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SIZE_BYTES]); - } - case ATTRIBUTE_ID_ARRIVAL_TIMESTAMP: { - return manipulator( - &d_arrivalTimestamp, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ARRIVAL_TIMESTAMP]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_GUID: { + return manipulator(&d_guid, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_GUID]); + } + case ATTRIBUTE_ID_SIZE_BYTES: { + return manipulator(&d_sizeBytes, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SIZE_BYTES]); + } + case ATTRIBUTE_ID_ARRIVAL_TIMESTAMP: { + return manipulator(&d_arrivalTimestamp, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ARRIVAL_TIMESTAMP]); + } + default: + return NOT_FOUND; } } template -int Message::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int Message::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -34395,17 +35088,20 @@ int Message::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::string& Message::guid() +inline +bsl::string& Message::guid() { return d_guid; } -inline bsls::Types::Int64& Message::sizeBytes() +inline +bsls::Types::Int64& Message::sizeBytes() { return d_sizeBytes; } -inline bdlt::DatetimeTz& Message::arrivalTimestamp() +inline +bdlt::DatetimeTz& Message::arrivalTimestamp() { return d_arrivalTimestamp; } @@ -34421,14 +35117,12 @@ int Message::accessAttributes(t_ACCESSOR& accessor) const return ret; } - ret = accessor(d_sizeBytes, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SIZE_BYTES]); + ret = accessor(d_sizeBytes, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SIZE_BYTES]); if (ret) { return ret; } - ret = accessor(d_arrivalTimestamp, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ARRIVAL_TIMESTAMP]); + ret = accessor(d_arrivalTimestamp, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ARRIVAL_TIMESTAMP]); if (ret) { return ret; } @@ -34442,92 +35136,100 @@ int Message::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_GUID: { + case ATTRIBUTE_ID_GUID: { return accessor(d_guid, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_GUID]); - } - case ATTRIBUTE_ID_SIZE_BYTES: { - return accessor(d_sizeBytes, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SIZE_BYTES]); - } - case ATTRIBUTE_ID_ARRIVAL_TIMESTAMP: { - return accessor( - d_arrivalTimestamp, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ARRIVAL_TIMESTAMP]); - } - default: return NOT_FOUND; + } + case ATTRIBUTE_ID_SIZE_BYTES: { + return accessor(d_sizeBytes, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SIZE_BYTES]); + } + case ATTRIBUTE_ID_ARRIVAL_TIMESTAMP: { + return accessor(d_arrivalTimestamp, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ARRIVAL_TIMESTAMP]); + } + default: + return NOT_FOUND; } } template -int Message::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int Message::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::string& Message::guid() const +inline +const bsl::string& Message::guid() const { return d_guid; } -inline bsls::Types::Int64 Message::sizeBytes() const +inline +bsls::Types::Int64 Message::sizeBytes() const { return d_sizeBytes; } -inline const bdlt::DatetimeTz& Message::arrivalTimestamp() const +inline +const bdlt::DatetimeTz& Message::arrivalTimestamp() const { return d_arrivalTimestamp; } -// ---------------- -// class NodeStatus -// ---------------- + + + // ---------------- + // class NodeStatus + // ---------------- // CLASS METHODS -inline int NodeStatus::fromString(Value* result, const bsl::string& string) +inline +int NodeStatus::fromString(Value *result, const bsl::string& string) { - return fromString(result, - string.c_str(), - static_cast(string.length())); + return fromString(result, string.c_str(), static_cast(string.length())); } -inline bsl::ostream& NodeStatus::print(bsl::ostream& stream, - NodeStatus::Value value) +inline +bsl::ostream& NodeStatus::print(bsl::ostream& stream, + NodeStatus::Value value) { return stream << toString(value); } -// ------------------- -// class PrimaryStatus -// ------------------- + + + // ------------------- + // class PrimaryStatus + // ------------------- // CLASS METHODS -inline int PrimaryStatus::fromString(Value* result, const bsl::string& string) +inline +int PrimaryStatus::fromString(Value *result, const bsl::string& string) { - return fromString(result, - string.c_str(), - static_cast(string.length())); + return fromString(result, string.c_str(), static_cast(string.length())); } -inline bsl::ostream& PrimaryStatus::print(bsl::ostream& stream, - PrimaryStatus::Value value) +inline +bsl::ostream& PrimaryStatus::print(bsl::ostream& stream, + PrimaryStatus::Value value) { return stream << toString(value); } -// ------------------------ -// class PurgedQueueDetails -// ------------------------ + + + // ------------------------ + // class PurgedQueueDetails + // ------------------------ // PRIVATE ACCESSORS template @@ -34541,10 +35243,12 @@ void PurgedQueueDetails::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const hashAppend(hashAlgorithm, this->numBytesPurged()); } -inline bool PurgedQueueDetails::isEqualTo(const PurgedQueueDetails& rhs) const +inline +bool PurgedQueueDetails::isEqualTo(const PurgedQueueDetails& rhs) const { return this->queueUri() == rhs.queueUri() && - this->appId() == rhs.appId() && this->appKey() == rhs.appKey() && + this->appId() == rhs.appId() && + this->appKey() == rhs.appKey() && this->numMessagesPurged() == rhs.numMessagesPurged() && this->numBytesPurged() == rhs.numBytesPurged(); } @@ -34556,8 +35260,7 @@ int PurgedQueueDetails::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator(&d_queueUri, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_URI]); + ret = manipulator(&d_queueUri, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_URI]); if (ret) { return ret; } @@ -34567,21 +35270,17 @@ int PurgedQueueDetails::manipulateAttributes(t_MANIPULATOR& manipulator) return ret; } - ret = manipulator(&d_appKey, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_KEY]); + ret = manipulator(&d_appKey, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_KEY]); if (ret) { return ret; } - ret = manipulator( - &d_numMessagesPurged, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES_PURGED]); + ret = manipulator(&d_numMessagesPurged, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES_PURGED]); if (ret) { return ret; } - ret = manipulator(&d_numBytesPurged, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES_PURGED]); + ret = manipulator(&d_numBytesPurged, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES_PURGED]); if (ret) { return ret; } @@ -34595,41 +35294,36 @@ int PurgedQueueDetails::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_QUEUE_URI: { - return manipulator(&d_queueUri, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_URI]); - } - case ATTRIBUTE_ID_APP_ID: { - return manipulator(&d_appId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_ID]); - } - case ATTRIBUTE_ID_APP_KEY: { - return manipulator(&d_appKey, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_KEY]); - } - case ATTRIBUTE_ID_NUM_MESSAGES_PURGED: { - return manipulator( - &d_numMessagesPurged, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES_PURGED]); - } - case ATTRIBUTE_ID_NUM_BYTES_PURGED: { - return manipulator( - &d_numBytesPurged, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES_PURGED]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_QUEUE_URI: { + return manipulator(&d_queueUri, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_URI]); + } + case ATTRIBUTE_ID_APP_ID: { + return manipulator(&d_appId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_ID]); + } + case ATTRIBUTE_ID_APP_KEY: { + return manipulator(&d_appKey, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_KEY]); + } + case ATTRIBUTE_ID_NUM_MESSAGES_PURGED: { + return manipulator(&d_numMessagesPurged, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES_PURGED]); + } + case ATTRIBUTE_ID_NUM_BYTES_PURGED: { + return manipulator(&d_numBytesPurged, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES_PURGED]); + } + default: + return NOT_FOUND; } } template -int PurgedQueueDetails::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int PurgedQueueDetails::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -34637,27 +35331,32 @@ int PurgedQueueDetails::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::string& PurgedQueueDetails::queueUri() +inline +bsl::string& PurgedQueueDetails::queueUri() { return d_queueUri; } -inline bsl::string& PurgedQueueDetails::appId() +inline +bsl::string& PurgedQueueDetails::appId() { return d_appId; } -inline bsl::string& PurgedQueueDetails::appKey() +inline +bsl::string& PurgedQueueDetails::appKey() { return d_appKey; } -inline bsls::Types::Int64& PurgedQueueDetails::numMessagesPurged() +inline +bsls::Types::Int64& PurgedQueueDetails::numMessagesPurged() { return d_numMessagesPurged; } -inline bsls::Types::Int64& PurgedQueueDetails::numBytesPurged() +inline +bsls::Types::Int64& PurgedQueueDetails::numBytesPurged() { return d_numBytesPurged; } @@ -34668,8 +35367,7 @@ int PurgedQueueDetails::accessAttributes(t_ACCESSOR& accessor) const { int ret; - ret = accessor(d_queueUri, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_URI]); + ret = accessor(d_queueUri, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_URI]); if (ret) { return ret; } @@ -34684,14 +35382,12 @@ int PurgedQueueDetails::accessAttributes(t_ACCESSOR& accessor) const return ret; } - ret = accessor(d_numMessagesPurged, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES_PURGED]); + ret = accessor(d_numMessagesPurged, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES_PURGED]); if (ret) { return ret; } - ret = accessor(d_numBytesPurged, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES_PURGED]); + ret = accessor(d_numBytesPurged, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES_PURGED]); if (ret) { return ret; } @@ -34705,80 +35401,82 @@ int PurgedQueueDetails::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_QUEUE_URI: { - return accessor(d_queueUri, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_URI]); - } - case ATTRIBUTE_ID_APP_ID: { + case ATTRIBUTE_ID_QUEUE_URI: { + return accessor(d_queueUri, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_URI]); + } + case ATTRIBUTE_ID_APP_ID: { return accessor(d_appId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_ID]); - } - case ATTRIBUTE_ID_APP_KEY: { - return accessor(d_appKey, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_KEY]); - } - case ATTRIBUTE_ID_NUM_MESSAGES_PURGED: { - return accessor( - d_numMessagesPurged, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES_PURGED]); - } - case ATTRIBUTE_ID_NUM_BYTES_PURGED: { - return accessor( - d_numBytesPurged, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES_PURGED]); - } - default: return NOT_FOUND; + } + case ATTRIBUTE_ID_APP_KEY: { + return accessor(d_appKey, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_KEY]); + } + case ATTRIBUTE_ID_NUM_MESSAGES_PURGED: { + return accessor(d_numMessagesPurged, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES_PURGED]); + } + case ATTRIBUTE_ID_NUM_BYTES_PURGED: { + return accessor(d_numBytesPurged, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES_PURGED]); + } + default: + return NOT_FOUND; } } template -int PurgedQueueDetails::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int PurgedQueueDetails::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::string& PurgedQueueDetails::queueUri() const +inline +const bsl::string& PurgedQueueDetails::queueUri() const { return d_queueUri; } -inline const bsl::string& PurgedQueueDetails::appId() const +inline +const bsl::string& PurgedQueueDetails::appId() const { return d_appId; } -inline const bsl::string& PurgedQueueDetails::appKey() const +inline +const bsl::string& PurgedQueueDetails::appKey() const { return d_appKey; } -inline bsls::Types::Int64 PurgedQueueDetails::numMessagesPurged() const +inline +bsls::Types::Int64 PurgedQueueDetails::numMessagesPurged() const { return d_numMessagesPurged; } -inline bsls::Types::Int64 PurgedQueueDetails::numBytesPurged() const +inline +bsls::Types::Int64 PurgedQueueDetails::numBytesPurged() const { return d_numBytesPurged; } -// ------------------------------- -// class RelayQueueEngineSubStream -// ------------------------------- + + + // ------------------------------- + // class RelayQueueEngineSubStream + // ------------------------------- // PRIVATE ACCESSORS template -void RelayQueueEngineSubStream::hashAppendImpl( - t_HASH_ALGORITHM& hashAlgorithm) const +void RelayQueueEngineSubStream::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const { using bslh::hashAppend; hashAppend(hashAlgorithm, this->appId()); @@ -34798,14 +35496,12 @@ int RelayQueueEngineSubStream::manipulateAttributes(t_MANIPULATOR& manipulator) return ret; } - ret = manipulator(&d_appKey, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_KEY]); + ret = manipulator(&d_appKey, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_KEY]); if (ret) { return ret; } - ret = manipulator(&d_numMessages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES]); + ret = manipulator(&d_numMessages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES]); if (ret) { return ret; } @@ -34814,37 +35510,35 @@ int RelayQueueEngineSubStream::manipulateAttributes(t_MANIPULATOR& manipulator) } template -int RelayQueueEngineSubStream::manipulateAttribute(t_MANIPULATOR& manipulator, - int id) +int RelayQueueEngineSubStream::manipulateAttribute(t_MANIPULATOR& manipulator, int id) { enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_APP_ID: { - return manipulator(&d_appId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_ID]); - } - case ATTRIBUTE_ID_APP_KEY: { - return manipulator(&d_appKey, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_KEY]); - } - case ATTRIBUTE_ID_NUM_MESSAGES: { - return manipulator(&d_numMessages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_APP_ID: { + return manipulator(&d_appId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_ID]); + } + case ATTRIBUTE_ID_APP_KEY: { + return manipulator(&d_appKey, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_KEY]); + } + case ATTRIBUTE_ID_NUM_MESSAGES: { + return manipulator(&d_numMessages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES]); + } + default: + return NOT_FOUND; } } template -int RelayQueueEngineSubStream::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int RelayQueueEngineSubStream::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -34852,17 +35546,20 @@ int RelayQueueEngineSubStream::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::string& RelayQueueEngineSubStream::appId() +inline +bsl::string& RelayQueueEngineSubStream::appId() { return d_appId; } -inline bsl::string& RelayQueueEngineSubStream::appKey() +inline +bsl::string& RelayQueueEngineSubStream::appKey() { return d_appKey; } -inline unsigned int& RelayQueueEngineSubStream::numMessages() +inline +unsigned int& RelayQueueEngineSubStream::numMessages() { return d_numMessages; } @@ -34883,8 +35580,7 @@ int RelayQueueEngineSubStream::accessAttributes(t_ACCESSOR& accessor) const return ret; } - ret = accessor(d_numMessages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES]); + ret = accessor(d_numMessages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES]); if (ret) { return ret; } @@ -34893,61 +35589,65 @@ int RelayQueueEngineSubStream::accessAttributes(t_ACCESSOR& accessor) const } template -int RelayQueueEngineSubStream::accessAttribute(t_ACCESSOR& accessor, - int id) const +int RelayQueueEngineSubStream::accessAttribute(t_ACCESSOR& accessor, int id) const { enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_APP_ID: { + case ATTRIBUTE_ID_APP_ID: { return accessor(d_appId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_ID]); - } - case ATTRIBUTE_ID_APP_KEY: { - return accessor(d_appKey, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_KEY]); - } - case ATTRIBUTE_ID_NUM_MESSAGES: { - return accessor(d_numMessages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES]); - } - default: return NOT_FOUND; + } + case ATTRIBUTE_ID_APP_KEY: { + return accessor(d_appKey, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_KEY]); + } + case ATTRIBUTE_ID_NUM_MESSAGES: { + return accessor(d_numMessages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES]); + } + default: + return NOT_FOUND; } } template -int RelayQueueEngineSubStream::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int RelayQueueEngineSubStream::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::string& RelayQueueEngineSubStream::appId() const +inline +const bsl::string& RelayQueueEngineSubStream::appId() const { return d_appId; } -inline const bsl::string& RelayQueueEngineSubStream::appKey() const +inline +const bsl::string& RelayQueueEngineSubStream::appKey() const { return d_appKey; } -inline unsigned int RelayQueueEngineSubStream::numMessages() const +inline +unsigned int RelayQueueEngineSubStream::numMessages() const { return d_numMessages; } -// ---------------------- -// class RemoteStreamInfo -// ---------------------- + + + // ---------------------- + // class RemoteStreamInfo + // ---------------------- // PRIVATE ACCESSORS template @@ -34976,8 +35676,7 @@ int RemoteStreamInfo::manipulateAttributes(t_MANIPULATOR& manipulator) return ret; } - ret = manipulator(&d_genCount, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_GEN_COUNT]); + ret = manipulator(&d_genCount, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_GEN_COUNT]); if (ret) { return ret; } @@ -34991,30 +35690,30 @@ int RemoteStreamInfo::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_ID: { + case ATTRIBUTE_ID_ID: { return manipulator(&d_id, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ID]); - } - case ATTRIBUTE_ID_STATE: { - return manipulator(&d_state, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STATE]); - } - case ATTRIBUTE_ID_GEN_COUNT: { - return manipulator(&d_genCount, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_GEN_COUNT]); - } - default: return NOT_FOUND; + } + case ATTRIBUTE_ID_STATE: { + return manipulator(&d_state, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STATE]); + } + case ATTRIBUTE_ID_GEN_COUNT: { + return manipulator(&d_genCount, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_GEN_COUNT]); + } + default: + return NOT_FOUND; } } template -int RemoteStreamInfo::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int RemoteStreamInfo::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -35022,17 +35721,20 @@ int RemoteStreamInfo::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline int& RemoteStreamInfo::id() +inline +int& RemoteStreamInfo::id() { return d_id; } -inline bsl::string& RemoteStreamInfo::state() +inline +bsl::string& RemoteStreamInfo::state() { return d_state; } -inline bsls::Types::Int64& RemoteStreamInfo::genCount() +inline +bsls::Types::Int64& RemoteStreamInfo::genCount() { return d_genCount; } @@ -35053,8 +35755,7 @@ int RemoteStreamInfo::accessAttributes(t_ACCESSOR& accessor) const return ret; } - ret = accessor(d_genCount, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_GEN_COUNT]); + ret = accessor(d_genCount, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_GEN_COUNT]); if (ret) { return ret; } @@ -35068,74 +35769,80 @@ int RemoteStreamInfo::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_ID: { + case ATTRIBUTE_ID_ID: { return accessor(d_id, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ID]); - } - case ATTRIBUTE_ID_STATE: { + } + case ATTRIBUTE_ID_STATE: { return accessor(d_state, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STATE]); - } - case ATTRIBUTE_ID_GEN_COUNT: { - return accessor(d_genCount, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_GEN_COUNT]); - } - default: return NOT_FOUND; + } + case ATTRIBUTE_ID_GEN_COUNT: { + return accessor(d_genCount, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_GEN_COUNT]); + } + default: + return NOT_FOUND; } } template -int RemoteStreamInfo::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int RemoteStreamInfo::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline int RemoteStreamInfo::id() const +inline +int RemoteStreamInfo::id() const { return d_id; } -inline const bsl::string& RemoteStreamInfo::state() const +inline +const bsl::string& RemoteStreamInfo::state() const { return d_state; } -inline bsls::Types::Int64 RemoteStreamInfo::genCount() const +inline +bsls::Types::Int64 RemoteStreamInfo::genCount() const { return d_genCount; } -// ------------------------------- -// class ResourceUsageMonitorState -// ------------------------------- + + + // ------------------------------- + // class ResourceUsageMonitorState + // ------------------------------- // CLASS METHODS -inline int ResourceUsageMonitorState::fromString(Value* result, - const bsl::string& string) +inline +int ResourceUsageMonitorState::fromString(Value *result, const bsl::string& string) { - return fromString(result, - string.c_str(), - static_cast(string.length())); + return fromString(result, string.c_str(), static_cast(string.length())); } -inline bsl::ostream& -ResourceUsageMonitorState::print(bsl::ostream& stream, +inline +bsl::ostream& ResourceUsageMonitorState::print(bsl::ostream& stream, ResourceUsageMonitorState::Value value) { return stream << toString(value); } -// ------------------- -// class RouteResponse -// ------------------- + + + // ------------------- + // class RouteResponse + // ------------------- // CLASS METHODS // MANIPULATORS @@ -35144,15 +35851,12 @@ int RouteResponse::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator( - &d_sourceNodeDescription, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SOURCE_NODE_DESCRIPTION]); + ret = manipulator(&d_sourceNodeDescription, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SOURCE_NODE_DESCRIPTION]); if (ret) { return ret; } - ret = manipulator(&d_response, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_RESPONSE]); + ret = manipulator(&d_response, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_RESPONSE]); if (ret) { return ret; } @@ -35166,28 +35870,27 @@ int RouteResponse::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_SOURCE_NODE_DESCRIPTION: { - return manipulator( - &d_sourceNodeDescription, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SOURCE_NODE_DESCRIPTION]); - } - case ATTRIBUTE_ID_RESPONSE: { - return manipulator(&d_response, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_RESPONSE]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_SOURCE_NODE_DESCRIPTION: { + return manipulator(&d_sourceNodeDescription, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SOURCE_NODE_DESCRIPTION]); + } + case ATTRIBUTE_ID_RESPONSE: { + return manipulator(&d_response, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_RESPONSE]); + } + default: + return NOT_FOUND; } } template -int RouteResponse::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int RouteResponse::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -35195,12 +35898,14 @@ int RouteResponse::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::string& RouteResponse::sourceNodeDescription() +inline +bsl::string& RouteResponse::sourceNodeDescription() { return d_sourceNodeDescription; } -inline bsl::string& RouteResponse::response() +inline +bsl::string& RouteResponse::response() { return d_response; } @@ -35211,9 +35916,7 @@ int RouteResponse::accessAttributes(t_ACCESSOR& accessor) const { int ret; - ret = accessor( - d_sourceNodeDescription, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SOURCE_NODE_DESCRIPTION]); + ret = accessor(d_sourceNodeDescription, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SOURCE_NODE_DESCRIPTION]); if (ret) { return ret; } @@ -35232,48 +35935,51 @@ int RouteResponse::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_SOURCE_NODE_DESCRIPTION: { - return accessor( - d_sourceNodeDescription, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SOURCE_NODE_DESCRIPTION]); - } - case ATTRIBUTE_ID_RESPONSE: { - return accessor(d_response, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_RESPONSE]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_SOURCE_NODE_DESCRIPTION: { + return accessor(d_sourceNodeDescription, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SOURCE_NODE_DESCRIPTION]); + } + case ATTRIBUTE_ID_RESPONSE: { + return accessor(d_response, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_RESPONSE]); + } + default: + return NOT_FOUND; } } template -int RouteResponse::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int RouteResponse::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::string& RouteResponse::sourceNodeDescription() const +inline +const bsl::string& RouteResponse::sourceNodeDescription() const { return d_sourceNodeDescription; } -inline const bsl::string& RouteResponse::response() const +inline +const bsl::string& RouteResponse::response() const { return d_response; } -// ------------------------- -// class StorageQueueCommand -// ------------------------- + + + // ------------------------- + // class StorageQueueCommand + // ------------------------- // CLASS METHODS // PRIVATE ACCESSORS @@ -35284,22 +35990,23 @@ void StorageQueueCommand::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const using bslh::hashAppend; hashAppend(hashAlgorithm, this->selectionId()); switch (this->selectionId()) { - case Class::SELECTION_ID_PURGE_APP_ID: + case Class::SELECTION_ID_PURGE_APP_ID: hashAppend(hashAlgorithm, this->purgeAppId()); break; - default: BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); + default: + BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); } } -inline bool -StorageQueueCommand::isEqualTo(const StorageQueueCommand& rhs) const +inline +bool StorageQueueCommand::isEqualTo(const StorageQueueCommand& rhs) const { typedef StorageQueueCommand Class; if (this->selectionId() == rhs.selectionId()) { switch (rhs.selectionId()) { - case Class::SELECTION_ID_PURGE_APP_ID: + case Class::SELECTION_ID_PURGE_APP_ID: return this->purgeAppId() == rhs.purgeAppId(); - default: + default: BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId()); return true; } @@ -35310,14 +36017,15 @@ StorageQueueCommand::isEqualTo(const StorageQueueCommand& rhs) const } // CREATORS -inline StorageQueueCommand::StorageQueueCommand( - bslma::Allocator* basicAllocator) +inline +StorageQueueCommand::StorageQueueCommand(bslma::Allocator *basicAllocator) : d_selectionId(SELECTION_ID_UNDEFINED) , d_allocator_p(bslma::Default::allocator(basicAllocator)) { } -inline StorageQueueCommand::~StorageQueueCommand() +inline +StorageQueueCommand::~StorageQueueCommand() { reset(); } @@ -35327,24 +36035,25 @@ template int StorageQueueCommand::manipulateSelection(t_MANIPULATOR& manipulator) { switch (d_selectionId) { - case StorageQueueCommand::SELECTION_ID_PURGE_APP_ID: + case StorageQueueCommand::SELECTION_ID_PURGE_APP_ID: return manipulator(&d_purgeAppId.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_PURGE_APP_ID]); - default: - BSLS_ASSERT(StorageQueueCommand::SELECTION_ID_UNDEFINED == - d_selectionId); + SELECTION_INFO_ARRAY[SELECTION_INDEX_PURGE_APP_ID]); + default: + BSLS_ASSERT(StorageQueueCommand::SELECTION_ID_UNDEFINED == d_selectionId); return -1; } } -inline bsl::string& StorageQueueCommand::purgeAppId() +inline +bsl::string& StorageQueueCommand::purgeAppId() { BSLS_ASSERT(SELECTION_ID_PURGE_APP_ID == d_selectionId); return d_purgeAppId.object(); } // ACCESSORS -inline int StorageQueueCommand::selectionId() const +inline +int StorageQueueCommand::selectionId() const { return d_selectionId; } @@ -35353,32 +36062,38 @@ template int StorageQueueCommand::accessSelection(t_ACCESSOR& accessor) const { switch (d_selectionId) { - case SELECTION_ID_PURGE_APP_ID: + case SELECTION_ID_PURGE_APP_ID: return accessor(d_purgeAppId.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_PURGE_APP_ID]); - default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); return -1; + SELECTION_INFO_ARRAY[SELECTION_INDEX_PURGE_APP_ID]); + default: + BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); + return -1; } } -inline const bsl::string& StorageQueueCommand::purgeAppId() const +inline +const bsl::string& StorageQueueCommand::purgeAppId() const { BSLS_ASSERT(SELECTION_ID_PURGE_APP_ID == d_selectionId); return d_purgeAppId.object(); } -inline bool StorageQueueCommand::isPurgeAppIdValue() const +inline +bool StorageQueueCommand::isPurgeAppIdValue() const { return SELECTION_ID_PURGE_APP_ID == d_selectionId; } -inline bool StorageQueueCommand::isUndefinedValue() const +inline +bool StorageQueueCommand::isUndefinedValue() const { return SELECTION_ID_UNDEFINED == d_selectionId; } -// ---------------------- -// class StorageQueueInfo -// ---------------------- + + // ---------------------- + // class StorageQueueInfo + // ---------------------- // PRIVATE ACCESSORS template @@ -35394,7 +36109,8 @@ void StorageQueueInfo::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const hashAppend(hashAlgorithm, this->internalQueueId()); } -inline bool StorageQueueInfo::isEqualTo(const StorageQueueInfo& rhs) const +inline +bool StorageQueueInfo::isEqualTo(const StorageQueueInfo& rhs) const { return this->queueUri() == rhs.queueUri() && this->queueKey() == rhs.queueKey() && @@ -35412,44 +36128,37 @@ int StorageQueueInfo::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator(&d_queueUri, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_URI]); + ret = manipulator(&d_queueUri, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_URI]); if (ret) { return ret; } - ret = manipulator(&d_queueKey, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_KEY]); + ret = manipulator(&d_queueKey, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_KEY]); if (ret) { return ret; } - ret = manipulator(&d_partitionId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITION_ID]); + ret = manipulator(&d_partitionId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITION_ID]); if (ret) { return ret; } - ret = manipulator(&d_numMessages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES]); + ret = manipulator(&d_numMessages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES]); if (ret) { return ret; } - ret = manipulator(&d_numBytes, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES]); + ret = manipulator(&d_numBytes, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES]); if (ret) { return ret; } - ret = manipulator(&d_isPersistent, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_PERSISTENT]); + ret = manipulator(&d_isPersistent, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_PERSISTENT]); if (ret) { return ret; } - ret = manipulator(&d_internalQueueId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_INTERNAL_QUEUE_ID]); + ret = manipulator(&d_internalQueueId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_INTERNAL_QUEUE_ID]); if (ret) { return ret; } @@ -35463,49 +36172,42 @@ int StorageQueueInfo::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_QUEUE_URI: { - return manipulator(&d_queueUri, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_URI]); - } - case ATTRIBUTE_ID_QUEUE_KEY: { - return manipulator(&d_queueKey, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_KEY]); - } - case ATTRIBUTE_ID_PARTITION_ID: { - return manipulator(&d_partitionId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITION_ID]); - } - case ATTRIBUTE_ID_NUM_MESSAGES: { - return manipulator(&d_numMessages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES]); - } - case ATTRIBUTE_ID_NUM_BYTES: { - return manipulator(&d_numBytes, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES]); - } - case ATTRIBUTE_ID_IS_PERSISTENT: { - return manipulator( - &d_isPersistent, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_PERSISTENT]); - } - case ATTRIBUTE_ID_INTERNAL_QUEUE_ID: { - return manipulator( - &d_internalQueueId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_INTERNAL_QUEUE_ID]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_QUEUE_URI: { + return manipulator(&d_queueUri, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_URI]); + } + case ATTRIBUTE_ID_QUEUE_KEY: { + return manipulator(&d_queueKey, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_KEY]); + } + case ATTRIBUTE_ID_PARTITION_ID: { + return manipulator(&d_partitionId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITION_ID]); + } + case ATTRIBUTE_ID_NUM_MESSAGES: { + return manipulator(&d_numMessages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES]); + } + case ATTRIBUTE_ID_NUM_BYTES: { + return manipulator(&d_numBytes, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES]); + } + case ATTRIBUTE_ID_IS_PERSISTENT: { + return manipulator(&d_isPersistent, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_PERSISTENT]); + } + case ATTRIBUTE_ID_INTERNAL_QUEUE_ID: { + return manipulator(&d_internalQueueId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_INTERNAL_QUEUE_ID]); + } + default: + return NOT_FOUND; } } template -int StorageQueueInfo::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int StorageQueueInfo::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -35513,37 +36215,44 @@ int StorageQueueInfo::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::string& StorageQueueInfo::queueUri() +inline +bsl::string& StorageQueueInfo::queueUri() { return d_queueUri; } -inline bsl::string& StorageQueueInfo::queueKey() +inline +bsl::string& StorageQueueInfo::queueKey() { return d_queueKey; } -inline int& StorageQueueInfo::partitionId() +inline +int& StorageQueueInfo::partitionId() { return d_partitionId; } -inline bsls::Types::Int64& StorageQueueInfo::numMessages() +inline +bsls::Types::Int64& StorageQueueInfo::numMessages() { return d_numMessages; } -inline bsls::Types::Int64& StorageQueueInfo::numBytes() +inline +bsls::Types::Int64& StorageQueueInfo::numBytes() { return d_numBytes; } -inline bool& StorageQueueInfo::isPersistent() +inline +bool& StorageQueueInfo::isPersistent() { return d_isPersistent; } -inline unsigned int& StorageQueueInfo::internalQueueId() +inline +unsigned int& StorageQueueInfo::internalQueueId() { return d_internalQueueId; } @@ -35554,44 +36263,37 @@ int StorageQueueInfo::accessAttributes(t_ACCESSOR& accessor) const { int ret; - ret = accessor(d_queueUri, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_URI]); + ret = accessor(d_queueUri, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_URI]); if (ret) { return ret; } - ret = accessor(d_queueKey, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_KEY]); + ret = accessor(d_queueKey, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_KEY]); if (ret) { return ret; } - ret = accessor(d_partitionId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITION_ID]); + ret = accessor(d_partitionId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITION_ID]); if (ret) { return ret; } - ret = accessor(d_numMessages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES]); + ret = accessor(d_numMessages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES]); if (ret) { return ret; } - ret = accessor(d_numBytes, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES]); + ret = accessor(d_numBytes, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES]); if (ret) { return ret; } - ret = accessor(d_isPersistent, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_PERSISTENT]); + ret = accessor(d_isPersistent, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_PERSISTENT]); if (ret) { return ret; } - ret = accessor(d_internalQueueId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_INTERNAL_QUEUE_ID]); + ret = accessor(d_internalQueueId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_INTERNAL_QUEUE_ID]); if (ret) { return ret; } @@ -35605,93 +36307,96 @@ int StorageQueueInfo::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_QUEUE_URI: { - return accessor(d_queueUri, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_URI]); - } - case ATTRIBUTE_ID_QUEUE_KEY: { - return accessor(d_queueKey, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_KEY]); - } - case ATTRIBUTE_ID_PARTITION_ID: { - return accessor(d_partitionId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITION_ID]); - } - case ATTRIBUTE_ID_NUM_MESSAGES: { - return accessor(d_numMessages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES]); - } - case ATTRIBUTE_ID_NUM_BYTES: { - return accessor(d_numBytes, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES]); - } - case ATTRIBUTE_ID_IS_PERSISTENT: { - return accessor(d_isPersistent, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_PERSISTENT]); - } - case ATTRIBUTE_ID_INTERNAL_QUEUE_ID: { - return accessor( - d_internalQueueId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_INTERNAL_QUEUE_ID]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_QUEUE_URI: { + return accessor(d_queueUri, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_URI]); + } + case ATTRIBUTE_ID_QUEUE_KEY: { + return accessor(d_queueKey, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_KEY]); + } + case ATTRIBUTE_ID_PARTITION_ID: { + return accessor(d_partitionId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITION_ID]); + } + case ATTRIBUTE_ID_NUM_MESSAGES: { + return accessor(d_numMessages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES]); + } + case ATTRIBUTE_ID_NUM_BYTES: { + return accessor(d_numBytes, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES]); + } + case ATTRIBUTE_ID_IS_PERSISTENT: { + return accessor(d_isPersistent, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_PERSISTENT]); + } + case ATTRIBUTE_ID_INTERNAL_QUEUE_ID: { + return accessor(d_internalQueueId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_INTERNAL_QUEUE_ID]); + } + default: + return NOT_FOUND; } } template -int StorageQueueInfo::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int StorageQueueInfo::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::string& StorageQueueInfo::queueUri() const +inline +const bsl::string& StorageQueueInfo::queueUri() const { return d_queueUri; } -inline const bsl::string& StorageQueueInfo::queueKey() const +inline +const bsl::string& StorageQueueInfo::queueKey() const { return d_queueKey; } -inline int StorageQueueInfo::partitionId() const +inline +int StorageQueueInfo::partitionId() const { return d_partitionId; } -inline bsls::Types::Int64 StorageQueueInfo::numMessages() const +inline +bsls::Types::Int64 StorageQueueInfo::numMessages() const { return d_numMessages; } -inline bsls::Types::Int64 StorageQueueInfo::numBytes() const +inline +bsls::Types::Int64 StorageQueueInfo::numBytes() const { return d_numBytes; } -inline bool StorageQueueInfo::isPersistent() const +inline +bool StorageQueueInfo::isPersistent() const { return d_isPersistent; } -inline unsigned int StorageQueueInfo::internalQueueId() const +inline +unsigned int StorageQueueInfo::internalQueueId() const { return d_internalQueueId; } -// ----------- -// class SubId -// ----------- + + + // ----------- + // class SubId + // ----------- // CLASS METHODS // MANIPULATORS @@ -35719,27 +36424,27 @@ int SubId::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_SUB_ID: { - return manipulator(&d_subId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUB_ID]); - } - case ATTRIBUTE_ID_APP_ID: { - return manipulator(&d_appId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_ID]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_SUB_ID: { + return manipulator(&d_subId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUB_ID]); + } + case ATTRIBUTE_ID_APP_ID: { + return manipulator(&d_appId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_ID]); + } + default: + return NOT_FOUND; } } template -int SubId::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int SubId::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -35747,12 +36452,14 @@ int SubId::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline unsigned int& SubId::subId() +inline +unsigned int& SubId::subId() { return d_subId; } -inline bsl::string& SubId::appId() +inline +bsl::string& SubId::appId() { return d_appId; } @@ -35782,45 +36489,51 @@ int SubId::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_SUB_ID: { + case ATTRIBUTE_ID_SUB_ID: { return accessor(d_subId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUB_ID]); - } - case ATTRIBUTE_ID_APP_ID: { + } + case ATTRIBUTE_ID_APP_ID: { return accessor(d_appId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_ID]); - } - default: return NOT_FOUND; + } + default: + return NOT_FOUND; } } template -int SubId::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int SubId::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline unsigned int SubId::subId() const +inline +unsigned int SubId::subId() const { return d_subId; } -inline const bsl::string& SubId::appId() const +inline +const bsl::string& SubId::appId() const { return d_appId; } -// ---------------- -// class Subscriber -// ---------------- + + + // ---------------- + // class Subscriber + // ---------------- // CLASS METHODS // MANIPULATORS @@ -35829,9 +36542,7 @@ int Subscriber::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator( - &d_downstreamSubQueueId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DOWNSTREAM_SUB_QUEUE_ID]); + ret = manipulator(&d_downstreamSubQueueId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DOWNSTREAM_SUB_QUEUE_ID]); if (ret) { return ret; } @@ -35845,24 +36556,24 @@ int Subscriber::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_DOWNSTREAM_SUB_QUEUE_ID: { - return manipulator( - &d_downstreamSubQueueId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DOWNSTREAM_SUB_QUEUE_ID]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_DOWNSTREAM_SUB_QUEUE_ID: { + return manipulator(&d_downstreamSubQueueId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DOWNSTREAM_SUB_QUEUE_ID]); + } + default: + return NOT_FOUND; } } template -int Subscriber::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int Subscriber::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -35870,7 +36581,8 @@ int Subscriber::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsls::Types::Int64& Subscriber::downstreamSubQueueId() +inline +bsls::Types::Int64& Subscriber::downstreamSubQueueId() { return d_downstreamSubQueueId; } @@ -35881,9 +36593,7 @@ int Subscriber::accessAttributes(t_ACCESSOR& accessor) const { int ret; - ret = accessor( - d_downstreamSubQueueId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DOWNSTREAM_SUB_QUEUE_ID]); + ret = accessor(d_downstreamSubQueueId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DOWNSTREAM_SUB_QUEUE_ID]); if (ret) { return ret; } @@ -35897,39 +36607,42 @@ int Subscriber::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_DOWNSTREAM_SUB_QUEUE_ID: { - return accessor( - d_downstreamSubQueueId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DOWNSTREAM_SUB_QUEUE_ID]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_DOWNSTREAM_SUB_QUEUE_ID: { + return accessor(d_downstreamSubQueueId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DOWNSTREAM_SUB_QUEUE_ID]); + } + default: + return NOT_FOUND; } } template -int Subscriber::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int Subscriber::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline bsls::Types::Int64 Subscriber::downstreamSubQueueId() const +inline +bsls::Types::Int64 Subscriber::downstreamSubQueueId() const { return d_downstreamSubQueueId; } -// ------------------------ -// class UninitializedQueue -// ------------------------ + + + // ------------------------ + // class UninitializedQueue + // ------------------------ // CLASS METHODS // MANIPULATORS @@ -35947,19 +36660,21 @@ int UninitializedQueue::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - default: return NOT_FOUND; + default: + return NOT_FOUND; } } template -int UninitializedQueue::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int UninitializedQueue::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -35982,29 +36697,33 @@ int UninitializedQueue::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - default: return NOT_FOUND; + default: + return NOT_FOUND; } } template -int UninitializedQueue::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int UninitializedQueue::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -// -------------------- -// class VirtualStorage -// -------------------- + + + // -------------------- + // class VirtualStorage + // -------------------- // PRIVATE ACCESSORS template @@ -36028,14 +36747,12 @@ int VirtualStorage::manipulateAttributes(t_MANIPULATOR& manipulator) return ret; } - ret = manipulator(&d_appKey, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_KEY]); + ret = manipulator(&d_appKey, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_KEY]); if (ret) { return ret; } - ret = manipulator(&d_numMessages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES]); + ret = manipulator(&d_numMessages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES]); if (ret) { return ret; } @@ -36049,31 +36766,30 @@ int VirtualStorage::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_APP_ID: { - return manipulator(&d_appId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_ID]); - } - case ATTRIBUTE_ID_APP_KEY: { - return manipulator(&d_appKey, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_KEY]); - } - case ATTRIBUTE_ID_NUM_MESSAGES: { - return manipulator(&d_numMessages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_APP_ID: { + return manipulator(&d_appId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_ID]); + } + case ATTRIBUTE_ID_APP_KEY: { + return manipulator(&d_appKey, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_KEY]); + } + case ATTRIBUTE_ID_NUM_MESSAGES: { + return manipulator(&d_numMessages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES]); + } + default: + return NOT_FOUND; } } template -int VirtualStorage::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int VirtualStorage::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -36081,17 +36797,20 @@ int VirtualStorage::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::string& VirtualStorage::appId() +inline +bsl::string& VirtualStorage::appId() { return d_appId; } -inline bsl::string& VirtualStorage::appKey() +inline +bsl::string& VirtualStorage::appKey() { return d_appKey; } -inline unsigned int& VirtualStorage::numMessages() +inline +unsigned int& VirtualStorage::numMessages() { return d_numMessages; } @@ -36112,8 +36831,7 @@ int VirtualStorage::accessAttributes(t_ACCESSOR& accessor) const return ret; } - ret = accessor(d_numMessages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES]); + ret = accessor(d_numMessages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES]); if (ret) { return ret; } @@ -36127,55 +36845,60 @@ int VirtualStorage::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_APP_ID: { + case ATTRIBUTE_ID_APP_ID: { return accessor(d_appId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_ID]); - } - case ATTRIBUTE_ID_APP_KEY: { - return accessor(d_appKey, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_KEY]); - } - case ATTRIBUTE_ID_NUM_MESSAGES: { - return accessor(d_numMessages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES]); - } - default: return NOT_FOUND; + } + case ATTRIBUTE_ID_APP_KEY: { + return accessor(d_appKey, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_KEY]); + } + case ATTRIBUTE_ID_NUM_MESSAGES: { + return accessor(d_numMessages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES]); + } + default: + return NOT_FOUND; } } template -int VirtualStorage::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int VirtualStorage::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::string& VirtualStorage::appId() const +inline +const bsl::string& VirtualStorage::appId() const { return d_appId; } -inline const bsl::string& VirtualStorage::appKey() const +inline +const bsl::string& VirtualStorage::appKey() const { return d_appKey; } -inline unsigned int VirtualStorage::numMessages() const +inline +unsigned int VirtualStorage::numMessages() const { return d_numMessages; } -// ---------- -// class Void -// ---------- + + + // ---------- + // class Void + // ---------- // CLASS METHODS // MANIPULATORS @@ -36193,19 +36916,21 @@ int Void::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - default: return NOT_FOUND; + default: + return NOT_FOUND; } } template -int Void::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int Void::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -36228,29 +36953,33 @@ int Void::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - default: return NOT_FOUND; + default: + return NOT_FOUND; } } template -int Void::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int Void::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -// ------------------- -// class ActiveFileSet -// ------------------- + + + // ------------------- + // class ActiveFileSet + // ------------------- // PRIVATE ACCESSORS template @@ -36269,20 +36998,17 @@ int ActiveFileSet::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator(&d_dataFile, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DATA_FILE]); + ret = manipulator(&d_dataFile, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DATA_FILE]); if (ret) { return ret; } - ret = manipulator(&d_journalFile, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_JOURNAL_FILE]); + ret = manipulator(&d_journalFile, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_JOURNAL_FILE]); if (ret) { return ret; } - ret = manipulator(&d_qlistFile, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QLIST_FILE]); + ret = manipulator(&d_qlistFile, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QLIST_FILE]); if (ret) { return ret; } @@ -36296,31 +37022,30 @@ int ActiveFileSet::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_DATA_FILE: { - return manipulator(&d_dataFile, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DATA_FILE]); - } - case ATTRIBUTE_ID_JOURNAL_FILE: { - return manipulator(&d_journalFile, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_JOURNAL_FILE]); - } - case ATTRIBUTE_ID_QLIST_FILE: { - return manipulator(&d_qlistFile, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QLIST_FILE]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_DATA_FILE: { + return manipulator(&d_dataFile, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DATA_FILE]); + } + case ATTRIBUTE_ID_JOURNAL_FILE: { + return manipulator(&d_journalFile, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_JOURNAL_FILE]); + } + case ATTRIBUTE_ID_QLIST_FILE: { + return manipulator(&d_qlistFile, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QLIST_FILE]); + } + default: + return NOT_FOUND; } } template -int ActiveFileSet::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int ActiveFileSet::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -36328,17 +37053,20 @@ int ActiveFileSet::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline FileInfo& ActiveFileSet::dataFile() +inline +FileInfo& ActiveFileSet::dataFile() { return d_dataFile; } -inline FileInfo& ActiveFileSet::journalFile() +inline +FileInfo& ActiveFileSet::journalFile() { return d_journalFile; } -inline FileInfo& ActiveFileSet::qlistFile() +inline +FileInfo& ActiveFileSet::qlistFile() { return d_qlistFile; } @@ -36349,20 +37077,17 @@ int ActiveFileSet::accessAttributes(t_ACCESSOR& accessor) const { int ret; - ret = accessor(d_dataFile, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DATA_FILE]); + ret = accessor(d_dataFile, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DATA_FILE]); if (ret) { return ret; } - ret = accessor(d_journalFile, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_JOURNAL_FILE]); + ret = accessor(d_journalFile, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_JOURNAL_FILE]); if (ret) { return ret; } - ret = accessor(d_qlistFile, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QLIST_FILE]); + ret = accessor(d_qlistFile, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QLIST_FILE]); if (ret) { return ret; } @@ -36376,56 +37101,60 @@ int ActiveFileSet::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_DATA_FILE: { - return accessor(d_dataFile, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DATA_FILE]); - } - case ATTRIBUTE_ID_JOURNAL_FILE: { - return accessor(d_journalFile, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_JOURNAL_FILE]); - } - case ATTRIBUTE_ID_QLIST_FILE: { - return accessor(d_qlistFile, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QLIST_FILE]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_DATA_FILE: { + return accessor(d_dataFile, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DATA_FILE]); + } + case ATTRIBUTE_ID_JOURNAL_FILE: { + return accessor(d_journalFile, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_JOURNAL_FILE]); + } + case ATTRIBUTE_ID_QLIST_FILE: { + return accessor(d_qlistFile, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QLIST_FILE]); + } + default: + return NOT_FOUND; } } template -int ActiveFileSet::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int ActiveFileSet::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const FileInfo& ActiveFileSet::dataFile() const +inline +const FileInfo& ActiveFileSet::dataFile() const { return d_dataFile; } -inline const FileInfo& ActiveFileSet::journalFile() const +inline +const FileInfo& ActiveFileSet::journalFile() const { return d_journalFile; } -inline const FileInfo& ActiveFileSet::qlistFile() const +inline +const FileInfo& ActiveFileSet::qlistFile() const { return d_qlistFile; } -// ------------------------- -// class BrokerConfigCommand -// ------------------------- + + + // ------------------------- + // class BrokerConfigCommand + // ------------------------- // CLASS METHODS // PRIVATE ACCESSORS @@ -36436,21 +37165,23 @@ void BrokerConfigCommand::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const using bslh::hashAppend; hashAppend(hashAlgorithm, this->selectionId()); switch (this->selectionId()) { - case Class::SELECTION_ID_DUMP: + case Class::SELECTION_ID_DUMP: hashAppend(hashAlgorithm, this->dump()); break; - default: BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); + default: + BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); } } -inline bool -BrokerConfigCommand::isEqualTo(const BrokerConfigCommand& rhs) const +inline +bool BrokerConfigCommand::isEqualTo(const BrokerConfigCommand& rhs) const { typedef BrokerConfigCommand Class; if (this->selectionId() == rhs.selectionId()) { switch (rhs.selectionId()) { - case Class::SELECTION_ID_DUMP: return this->dump() == rhs.dump(); - default: + case Class::SELECTION_ID_DUMP: + return this->dump() == rhs.dump(); + default: BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId()); return true; } @@ -36461,12 +37192,14 @@ BrokerConfigCommand::isEqualTo(const BrokerConfigCommand& rhs) const } // CREATORS -inline BrokerConfigCommand::BrokerConfigCommand() +inline +BrokerConfigCommand::BrokerConfigCommand() : d_selectionId(SELECTION_ID_UNDEFINED) { } -inline BrokerConfigCommand::~BrokerConfigCommand() +inline +BrokerConfigCommand::~BrokerConfigCommand() { reset(); } @@ -36476,24 +37209,25 @@ template int BrokerConfigCommand::manipulateSelection(t_MANIPULATOR& manipulator) { switch (d_selectionId) { - case BrokerConfigCommand::SELECTION_ID_DUMP: + case BrokerConfigCommand::SELECTION_ID_DUMP: return manipulator(&d_dump.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_DUMP]); - default: - BSLS_ASSERT(BrokerConfigCommand::SELECTION_ID_UNDEFINED == - d_selectionId); + SELECTION_INFO_ARRAY[SELECTION_INDEX_DUMP]); + default: + BSLS_ASSERT(BrokerConfigCommand::SELECTION_ID_UNDEFINED == d_selectionId); return -1; } } -inline Void& BrokerConfigCommand::dump() +inline +Void& BrokerConfigCommand::dump() { BSLS_ASSERT(SELECTION_ID_DUMP == d_selectionId); return d_dump.object(); } // ACCESSORS -inline int BrokerConfigCommand::selectionId() const +inline +int BrokerConfigCommand::selectionId() const { return d_selectionId; } @@ -36502,32 +37236,38 @@ template int BrokerConfigCommand::accessSelection(t_ACCESSOR& accessor) const { switch (d_selectionId) { - case SELECTION_ID_DUMP: + case SELECTION_ID_DUMP: return accessor(d_dump.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_DUMP]); - default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); return -1; + SELECTION_INFO_ARRAY[SELECTION_INDEX_DUMP]); + default: + BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); + return -1; } } -inline const Void& BrokerConfigCommand::dump() const +inline +const Void& BrokerConfigCommand::dump() const { BSLS_ASSERT(SELECTION_ID_DUMP == d_selectionId); return d_dump.object(); } -inline bool BrokerConfigCommand::isDumpValue() const +inline +bool BrokerConfigCommand::isDumpValue() const { return SELECTION_ID_DUMP == d_selectionId; } -inline bool BrokerConfigCommand::isUndefinedValue() const +inline +bool BrokerConfigCommand::isUndefinedValue() const { return SELECTION_ID_UNDEFINED == d_selectionId; } -// ---------------- -// class ClearCache -// ---------------- + + // ---------------- + // class ClearCache + // ---------------- // CLASS METHODS // PRIVATE ACCESSORS @@ -36538,24 +37278,28 @@ void ClearCache::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const using bslh::hashAppend; hashAppend(hashAlgorithm, this->selectionId()); switch (this->selectionId()) { - case Class::SELECTION_ID_DOMAIN: + case Class::SELECTION_ID_DOMAIN: hashAppend(hashAlgorithm, this->domain()); break; - case Class::SELECTION_ID_ALL: + case Class::SELECTION_ID_ALL: hashAppend(hashAlgorithm, this->all()); break; - default: BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); + default: + BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); } } -inline bool ClearCache::isEqualTo(const ClearCache& rhs) const +inline +bool ClearCache::isEqualTo(const ClearCache& rhs) const { typedef ClearCache Class; if (this->selectionId() == rhs.selectionId()) { switch (rhs.selectionId()) { - case Class::SELECTION_ID_DOMAIN: return this->domain() == rhs.domain(); - case Class::SELECTION_ID_ALL: return this->all() == rhs.all(); - default: + case Class::SELECTION_ID_DOMAIN: + return this->domain() == rhs.domain(); + case Class::SELECTION_ID_ALL: + return this->all() == rhs.all(); + default: BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId()); return true; } @@ -36566,13 +37310,15 @@ inline bool ClearCache::isEqualTo(const ClearCache& rhs) const } // CREATORS -inline ClearCache::ClearCache(bslma::Allocator* basicAllocator) +inline +ClearCache::ClearCache(bslma::Allocator *basicAllocator) : d_selectionId(SELECTION_ID_UNDEFINED) , d_allocator_p(bslma::Default::allocator(basicAllocator)) { } -inline ClearCache::~ClearCache() +inline +ClearCache::~ClearCache() { reset(); } @@ -36582,32 +37328,35 @@ template int ClearCache::manipulateSelection(t_MANIPULATOR& manipulator) { switch (d_selectionId) { - case ClearCache::SELECTION_ID_DOMAIN: + case ClearCache::SELECTION_ID_DOMAIN: return manipulator(&d_domain.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAIN]); - case ClearCache::SELECTION_ID_ALL: + SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAIN]); + case ClearCache::SELECTION_ID_ALL: return manipulator(&d_all.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_ALL]); - default: + SELECTION_INFO_ARRAY[SELECTION_INDEX_ALL]); + default: BSLS_ASSERT(ClearCache::SELECTION_ID_UNDEFINED == d_selectionId); return -1; } } -inline bsl::string& ClearCache::domain() +inline +bsl::string& ClearCache::domain() { BSLS_ASSERT(SELECTION_ID_DOMAIN == d_selectionId); return d_domain.object(); } -inline Void& ClearCache::all() +inline +Void& ClearCache::all() { BSLS_ASSERT(SELECTION_ID_ALL == d_selectionId); return d_all.object(); } // ACCESSORS -inline int ClearCache::selectionId() const +inline +int ClearCache::selectionId() const { return d_selectionId; } @@ -36616,46 +37365,54 @@ template int ClearCache::accessSelection(t_ACCESSOR& accessor) const { switch (d_selectionId) { - case SELECTION_ID_DOMAIN: + case SELECTION_ID_DOMAIN: return accessor(d_domain.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAIN]); - case SELECTION_ID_ALL: + SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAIN]); + case SELECTION_ID_ALL: return accessor(d_all.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_ALL]); - default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); return -1; + SELECTION_INFO_ARRAY[SELECTION_INDEX_ALL]); + default: + BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); + return -1; } } -inline const bsl::string& ClearCache::domain() const +inline +const bsl::string& ClearCache::domain() const { BSLS_ASSERT(SELECTION_ID_DOMAIN == d_selectionId); return d_domain.object(); } -inline const Void& ClearCache::all() const +inline +const Void& ClearCache::all() const { BSLS_ASSERT(SELECTION_ID_ALL == d_selectionId); return d_all.object(); } -inline bool ClearCache::isDomainValue() const +inline +bool ClearCache::isDomainValue() const { return SELECTION_ID_DOMAIN == d_selectionId; } -inline bool ClearCache::isAllValue() const +inline +bool ClearCache::isAllValue() const { return SELECTION_ID_ALL == d_selectionId; } -inline bool ClearCache::isUndefinedValue() const +inline +bool ClearCache::isUndefinedValue() const { return SELECTION_ID_UNDEFINED == d_selectionId; } -// ----------------- -// class ClusterInfo -// ----------------- + + // ----------------- + // class ClusterInfo + // ----------------- // PRIVATE ACCESSORS template @@ -36674,8 +37431,7 @@ int ClusterInfo::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator(&d_locality, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LOCALITY]); + ret = manipulator(&d_locality, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LOCALITY]); if (ret) { return ret; } @@ -36699,31 +37455,30 @@ int ClusterInfo::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_LOCALITY: { - return manipulator(&d_locality, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LOCALITY]); - } - case ATTRIBUTE_ID_NAME: { - return manipulator(&d_name, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]); - } - case ATTRIBUTE_ID_NODES: { - return manipulator(&d_nodes, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NODES]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_LOCALITY: { + return manipulator(&d_locality, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LOCALITY]); + } + case ATTRIBUTE_ID_NAME: { + return manipulator(&d_name, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]); + } + case ATTRIBUTE_ID_NODES: { + return manipulator(&d_nodes, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NODES]); + } + default: + return NOT_FOUND; } } template -int ClusterInfo::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int ClusterInfo::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -36731,17 +37486,20 @@ int ClusterInfo::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline Locality::Value& ClusterInfo::locality() +inline +Locality::Value& ClusterInfo::locality() { return d_locality; } -inline bsl::string& ClusterInfo::name() +inline +bsl::string& ClusterInfo::name() { return d_name; } -inline bsl::vector& ClusterInfo::nodes() +inline +bsl::vector& ClusterInfo::nodes() { return d_nodes; } @@ -36776,54 +37534,60 @@ int ClusterInfo::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_LOCALITY: { - return accessor(d_locality, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LOCALITY]); - } - case ATTRIBUTE_ID_NAME: { + case ATTRIBUTE_ID_LOCALITY: { + return accessor(d_locality, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LOCALITY]); + } + case ATTRIBUTE_ID_NAME: { return accessor(d_name, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]); - } - case ATTRIBUTE_ID_NODES: { + } + case ATTRIBUTE_ID_NODES: { return accessor(d_nodes, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NODES]); - } - default: return NOT_FOUND; + } + default: + return NOT_FOUND; } } template -int ClusterInfo::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int ClusterInfo::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline Locality::Value ClusterInfo::locality() const +inline +Locality::Value ClusterInfo::locality() const { return d_locality; } -inline const bsl::string& ClusterInfo::name() const +inline +const bsl::string& ClusterInfo::name() const { return d_name; } -inline const bsl::vector& ClusterInfo::nodes() const +inline +const bsl::vector& ClusterInfo::nodes() const { return d_nodes; } -// --------------------- -// class ClusterNodeInfo -// --------------------- + + + // --------------------- + // class ClusterNodeInfo + // --------------------- // PRIVATE ACCESSORS template @@ -36836,7 +37600,8 @@ void ClusterNodeInfo::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const hashAppend(hashAlgorithm, this->primaryForPartitionIds()); } -inline bool ClusterNodeInfo::isEqualTo(const ClusterNodeInfo& rhs) const +inline +bool ClusterNodeInfo::isEqualTo(const ClusterNodeInfo& rhs) const { return this->description() == rhs.description() && this->isAvailable() == rhs.isAvailable() && @@ -36851,14 +37616,12 @@ int ClusterNodeInfo::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator(&d_description, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DESCRIPTION]); + ret = manipulator(&d_description, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DESCRIPTION]); if (ret) { return ret; } - ret = manipulator(&d_isAvailable, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_AVAILABLE]); + ret = manipulator(&d_isAvailable, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_AVAILABLE]); if (ret) { return ret; } @@ -36868,9 +37631,7 @@ int ClusterNodeInfo::manipulateAttributes(t_MANIPULATOR& manipulator) return ret; } - ret = manipulator( - &d_primaryForPartitionIds, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_FOR_PARTITION_IDS]); + ret = manipulator(&d_primaryForPartitionIds, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_FOR_PARTITION_IDS]); if (ret) { return ret; } @@ -36884,36 +37645,33 @@ int ClusterNodeInfo::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_DESCRIPTION: { - return manipulator(&d_description, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DESCRIPTION]); - } - case ATTRIBUTE_ID_IS_AVAILABLE: { - return manipulator(&d_isAvailable, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_AVAILABLE]); - } - case ATTRIBUTE_ID_STATUS: { - return manipulator(&d_status, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STATUS]); - } - case ATTRIBUTE_ID_PRIMARY_FOR_PARTITION_IDS: { - return manipulator( - &d_primaryForPartitionIds, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_FOR_PARTITION_IDS]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_DESCRIPTION: { + return manipulator(&d_description, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DESCRIPTION]); + } + case ATTRIBUTE_ID_IS_AVAILABLE: { + return manipulator(&d_isAvailable, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_AVAILABLE]); + } + case ATTRIBUTE_ID_STATUS: { + return manipulator(&d_status, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STATUS]); + } + case ATTRIBUTE_ID_PRIMARY_FOR_PARTITION_IDS: { + return manipulator(&d_primaryForPartitionIds, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_FOR_PARTITION_IDS]); + } + default: + return NOT_FOUND; } } template -int ClusterNodeInfo::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int ClusterNodeInfo::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -36921,22 +37679,26 @@ int ClusterNodeInfo::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::string& ClusterNodeInfo::description() +inline +bsl::string& ClusterNodeInfo::description() { return d_description; } -inline bdlb::NullableValue& ClusterNodeInfo::isAvailable() +inline +bdlb::NullableValue& ClusterNodeInfo::isAvailable() { return d_isAvailable; } -inline NodeStatus::Value& ClusterNodeInfo::status() +inline +NodeStatus::Value& ClusterNodeInfo::status() { return d_status; } -inline bsl::vector& ClusterNodeInfo::primaryForPartitionIds() +inline +bsl::vector& ClusterNodeInfo::primaryForPartitionIds() { return d_primaryForPartitionIds; } @@ -36947,14 +37709,12 @@ int ClusterNodeInfo::accessAttributes(t_ACCESSOR& accessor) const { int ret; - ret = accessor(d_description, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DESCRIPTION]); + ret = accessor(d_description, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DESCRIPTION]); if (ret) { return ret; } - ret = accessor(d_isAvailable, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_AVAILABLE]); + ret = accessor(d_isAvailable, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_AVAILABLE]); if (ret) { return ret; } @@ -36964,9 +37724,7 @@ int ClusterNodeInfo::accessAttributes(t_ACCESSOR& accessor) const return ret; } - ret = accessor( - d_primaryForPartitionIds, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_FOR_PARTITION_IDS]); + ret = accessor(d_primaryForPartitionIds, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_FOR_PARTITION_IDS]); if (ret) { return ret; } @@ -36980,66 +37738,69 @@ int ClusterNodeInfo::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_DESCRIPTION: { - return accessor(d_description, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DESCRIPTION]); - } - case ATTRIBUTE_ID_IS_AVAILABLE: { - return accessor(d_isAvailable, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_AVAILABLE]); - } - case ATTRIBUTE_ID_STATUS: { - return accessor(d_status, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STATUS]); - } - case ATTRIBUTE_ID_PRIMARY_FOR_PARTITION_IDS: { - return accessor( - d_primaryForPartitionIds, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_FOR_PARTITION_IDS]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_DESCRIPTION: { + return accessor(d_description, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DESCRIPTION]); + } + case ATTRIBUTE_ID_IS_AVAILABLE: { + return accessor(d_isAvailable, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_AVAILABLE]); + } + case ATTRIBUTE_ID_STATUS: { + return accessor(d_status, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STATUS]); + } + case ATTRIBUTE_ID_PRIMARY_FOR_PARTITION_IDS: { + return accessor(d_primaryForPartitionIds, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_FOR_PARTITION_IDS]); + } + default: + return NOT_FOUND; } } template -int ClusterNodeInfo::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int ClusterNodeInfo::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::string& ClusterNodeInfo::description() const +inline +const bsl::string& ClusterNodeInfo::description() const { return d_description; } -inline const bdlb::NullableValue& ClusterNodeInfo::isAvailable() const +inline +const bdlb::NullableValue& ClusterNodeInfo::isAvailable() const { return d_isAvailable; } -inline NodeStatus::Value ClusterNodeInfo::status() const +inline +NodeStatus::Value ClusterNodeInfo::status() const { return d_status; } -inline const bsl::vector& ClusterNodeInfo::primaryForPartitionIds() const +inline +const bsl::vector& ClusterNodeInfo::primaryForPartitionIds() const { return d_primaryForPartitionIds; } -// ------------------ -// class ClusterQueue -// ------------------ + + + // ------------------ + // class ClusterQueue + // ------------------ // PRIVATE ACCESSORS template @@ -37059,16 +37820,19 @@ void ClusterQueue::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const hashAppend(hashAlgorithm, this->contexts()); } -inline bool ClusterQueue::isEqualTo(const ClusterQueue& rhs) const +inline +bool ClusterQueue::isEqualTo(const ClusterQueue& rhs) const { return this->uri() == rhs.uri() && this->numInFlightContexts() == rhs.numInFlightContexts() && this->isAssigned() == rhs.isAssigned() && this->isPrimaryAvailable() == rhs.isPrimaryAvailable() && - this->id() == rhs.id() && this->subIds() == rhs.subIds() && + this->id() == rhs.id() && + this->subIds() == rhs.subIds() && this->partitionId() == rhs.partitionId() && this->primaryNodeDescription() == rhs.primaryNodeDescription() && - this->key() == rhs.key() && this->isCreated() == rhs.isCreated() && + this->key() == rhs.key() && + this->isCreated() == rhs.isCreated() && this->contexts() == rhs.contexts(); } @@ -37084,22 +37848,17 @@ int ClusterQueue::manipulateAttributes(t_MANIPULATOR& manipulator) return ret; } - ret = manipulator( - &d_numInFlightContexts, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_IN_FLIGHT_CONTEXTS]); + ret = manipulator(&d_numInFlightContexts, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_IN_FLIGHT_CONTEXTS]); if (ret) { return ret; } - ret = manipulator(&d_isAssigned, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_ASSIGNED]); + ret = manipulator(&d_isAssigned, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_ASSIGNED]); if (ret) { return ret; } - ret = manipulator( - &d_isPrimaryAvailable, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_PRIMARY_AVAILABLE]); + ret = manipulator(&d_isPrimaryAvailable, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_PRIMARY_AVAILABLE]); if (ret) { return ret; } @@ -37109,21 +37868,17 @@ int ClusterQueue::manipulateAttributes(t_MANIPULATOR& manipulator) return ret; } - ret = manipulator(&d_subIds, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUB_IDS]); + ret = manipulator(&d_subIds, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUB_IDS]); if (ret) { return ret; } - ret = manipulator(&d_partitionId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITION_ID]); + ret = manipulator(&d_partitionId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITION_ID]); if (ret) { return ret; } - ret = manipulator( - &d_primaryNodeDescription, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_NODE_DESCRIPTION]); + ret = manipulator(&d_primaryNodeDescription, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_NODE_DESCRIPTION]); if (ret) { return ret; } @@ -37133,14 +37888,12 @@ int ClusterQueue::manipulateAttributes(t_MANIPULATOR& manipulator) return ret; } - ret = manipulator(&d_isCreated, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_CREATED]); + ret = manipulator(&d_isCreated, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_CREATED]); if (ret) { return ret; } - ret = manipulator(&d_contexts, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONTEXTS]); + ret = manipulator(&d_contexts, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONTEXTS]); if (ret) { return ret; } @@ -37154,63 +37907,54 @@ int ClusterQueue::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_URI: { + case ATTRIBUTE_ID_URI: { return manipulator(&d_uri, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_URI]); - } - case ATTRIBUTE_ID_NUM_IN_FLIGHT_CONTEXTS: { - return manipulator( - &d_numInFlightContexts, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_IN_FLIGHT_CONTEXTS]); - } - case ATTRIBUTE_ID_IS_ASSIGNED: { - return manipulator(&d_isAssigned, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_ASSIGNED]); - } - case ATTRIBUTE_ID_IS_PRIMARY_AVAILABLE: { - return manipulator( - &d_isPrimaryAvailable, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_PRIMARY_AVAILABLE]); - } - case ATTRIBUTE_ID_ID: { + } + case ATTRIBUTE_ID_NUM_IN_FLIGHT_CONTEXTS: { + return manipulator(&d_numInFlightContexts, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_IN_FLIGHT_CONTEXTS]); + } + case ATTRIBUTE_ID_IS_ASSIGNED: { + return manipulator(&d_isAssigned, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_ASSIGNED]); + } + case ATTRIBUTE_ID_IS_PRIMARY_AVAILABLE: { + return manipulator(&d_isPrimaryAvailable, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_PRIMARY_AVAILABLE]); + } + case ATTRIBUTE_ID_ID: { return manipulator(&d_id, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ID]); - } - case ATTRIBUTE_ID_SUB_IDS: { - return manipulator(&d_subIds, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUB_IDS]); - } - case ATTRIBUTE_ID_PARTITION_ID: { - return manipulator(&d_partitionId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITION_ID]); - } - case ATTRIBUTE_ID_PRIMARY_NODE_DESCRIPTION: { - return manipulator( - &d_primaryNodeDescription, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_NODE_DESCRIPTION]); - } - case ATTRIBUTE_ID_KEY: { + } + case ATTRIBUTE_ID_SUB_IDS: { + return manipulator(&d_subIds, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUB_IDS]); + } + case ATTRIBUTE_ID_PARTITION_ID: { + return manipulator(&d_partitionId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITION_ID]); + } + case ATTRIBUTE_ID_PRIMARY_NODE_DESCRIPTION: { + return manipulator(&d_primaryNodeDescription, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_NODE_DESCRIPTION]); + } + case ATTRIBUTE_ID_KEY: { return manipulator(&d_key, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_KEY]); - } - case ATTRIBUTE_ID_IS_CREATED: { - return manipulator(&d_isCreated, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_CREATED]); - } - case ATTRIBUTE_ID_CONTEXTS: { - return manipulator(&d_contexts, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONTEXTS]); - } - default: return NOT_FOUND; + } + case ATTRIBUTE_ID_IS_CREATED: { + return manipulator(&d_isCreated, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_CREATED]); + } + case ATTRIBUTE_ID_CONTEXTS: { + return manipulator(&d_contexts, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONTEXTS]); + } + default: + return NOT_FOUND; } } template -int ClusterQueue::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int ClusterQueue::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -37218,57 +37962,68 @@ int ClusterQueue::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::string& ClusterQueue::uri() +inline +bsl::string& ClusterQueue::uri() { return d_uri; } -inline unsigned int& ClusterQueue::numInFlightContexts() +inline +unsigned int& ClusterQueue::numInFlightContexts() { return d_numInFlightContexts; } -inline bool& ClusterQueue::isAssigned() +inline +bool& ClusterQueue::isAssigned() { return d_isAssigned; } -inline bool& ClusterQueue::isPrimaryAvailable() +inline +bool& ClusterQueue::isPrimaryAvailable() { return d_isPrimaryAvailable; } -inline unsigned int& ClusterQueue::id() +inline +unsigned int& ClusterQueue::id() { return d_id; } -inline bsl::vector& ClusterQueue::subIds() +inline +bsl::vector& ClusterQueue::subIds() { return d_subIds; } -inline int& ClusterQueue::partitionId() +inline +int& ClusterQueue::partitionId() { return d_partitionId; } -inline bdlb::NullableValue& ClusterQueue::primaryNodeDescription() +inline +bdlb::NullableValue& ClusterQueue::primaryNodeDescription() { return d_primaryNodeDescription; } -inline bsl::string& ClusterQueue::key() +inline +bsl::string& ClusterQueue::key() { return d_key; } -inline bool& ClusterQueue::isCreated() +inline +bool& ClusterQueue::isCreated() { return d_isCreated; } -inline bsl::vector& ClusterQueue::contexts() +inline +bsl::vector& ClusterQueue::contexts() { return d_contexts; } @@ -37284,21 +38039,17 @@ int ClusterQueue::accessAttributes(t_ACCESSOR& accessor) const return ret; } - ret = accessor( - d_numInFlightContexts, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_IN_FLIGHT_CONTEXTS]); + ret = accessor(d_numInFlightContexts, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_IN_FLIGHT_CONTEXTS]); if (ret) { return ret; } - ret = accessor(d_isAssigned, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_ASSIGNED]); + ret = accessor(d_isAssigned, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_ASSIGNED]); if (ret) { return ret; } - ret = accessor(d_isPrimaryAvailable, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_PRIMARY_AVAILABLE]); + ret = accessor(d_isPrimaryAvailable, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_PRIMARY_AVAILABLE]); if (ret) { return ret; } @@ -37313,15 +38064,12 @@ int ClusterQueue::accessAttributes(t_ACCESSOR& accessor) const return ret; } - ret = accessor(d_partitionId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITION_ID]); + ret = accessor(d_partitionId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITION_ID]); if (ret) { return ret; } - ret = accessor( - d_primaryNodeDescription, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_NODE_DESCRIPTION]); + ret = accessor(d_primaryNodeDescription, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_NODE_DESCRIPTION]); if (ret) { return ret; } @@ -37331,8 +38079,7 @@ int ClusterQueue::accessAttributes(t_ACCESSOR& accessor) const return ret; } - ret = accessor(d_isCreated, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_CREATED]); + ret = accessor(d_isCreated, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_CREATED]); if (ret) { return ret; } @@ -37351,129 +38098,132 @@ int ClusterQueue::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_URI: { + case ATTRIBUTE_ID_URI: { return accessor(d_uri, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_URI]); - } - case ATTRIBUTE_ID_NUM_IN_FLIGHT_CONTEXTS: { - return accessor( - d_numInFlightContexts, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_IN_FLIGHT_CONTEXTS]); - } - case ATTRIBUTE_ID_IS_ASSIGNED: { - return accessor(d_isAssigned, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_ASSIGNED]); - } - case ATTRIBUTE_ID_IS_PRIMARY_AVAILABLE: { - return accessor( - d_isPrimaryAvailable, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_PRIMARY_AVAILABLE]); - } - case ATTRIBUTE_ID_ID: { + } + case ATTRIBUTE_ID_NUM_IN_FLIGHT_CONTEXTS: { + return accessor(d_numInFlightContexts, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_IN_FLIGHT_CONTEXTS]); + } + case ATTRIBUTE_ID_IS_ASSIGNED: { + return accessor(d_isAssigned, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_ASSIGNED]); + } + case ATTRIBUTE_ID_IS_PRIMARY_AVAILABLE: { + return accessor(d_isPrimaryAvailable, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_PRIMARY_AVAILABLE]); + } + case ATTRIBUTE_ID_ID: { return accessor(d_id, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ID]); - } - case ATTRIBUTE_ID_SUB_IDS: { - return accessor(d_subIds, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUB_IDS]); - } - case ATTRIBUTE_ID_PARTITION_ID: { - return accessor(d_partitionId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITION_ID]); - } - case ATTRIBUTE_ID_PRIMARY_NODE_DESCRIPTION: { - return accessor( - d_primaryNodeDescription, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_NODE_DESCRIPTION]); - } - case ATTRIBUTE_ID_KEY: { + } + case ATTRIBUTE_ID_SUB_IDS: { + return accessor(d_subIds, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUB_IDS]); + } + case ATTRIBUTE_ID_PARTITION_ID: { + return accessor(d_partitionId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITION_ID]); + } + case ATTRIBUTE_ID_PRIMARY_NODE_DESCRIPTION: { + return accessor(d_primaryNodeDescription, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_NODE_DESCRIPTION]); + } + case ATTRIBUTE_ID_KEY: { return accessor(d_key, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_KEY]); - } - case ATTRIBUTE_ID_IS_CREATED: { - return accessor(d_isCreated, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_CREATED]); - } - case ATTRIBUTE_ID_CONTEXTS: { - return accessor(d_contexts, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONTEXTS]); - } - default: return NOT_FOUND; + } + case ATTRIBUTE_ID_IS_CREATED: { + return accessor(d_isCreated, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_CREATED]); + } + case ATTRIBUTE_ID_CONTEXTS: { + return accessor(d_contexts, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONTEXTS]); + } + default: + return NOT_FOUND; } } template -int ClusterQueue::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int ClusterQueue::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::string& ClusterQueue::uri() const +inline +const bsl::string& ClusterQueue::uri() const { return d_uri; } -inline unsigned int ClusterQueue::numInFlightContexts() const +inline +unsigned int ClusterQueue::numInFlightContexts() const { return d_numInFlightContexts; } -inline bool ClusterQueue::isAssigned() const +inline +bool ClusterQueue::isAssigned() const { return d_isAssigned; } -inline bool ClusterQueue::isPrimaryAvailable() const +inline +bool ClusterQueue::isPrimaryAvailable() const { return d_isPrimaryAvailable; } -inline unsigned int ClusterQueue::id() const +inline +unsigned int ClusterQueue::id() const { return d_id; } -inline const bsl::vector& ClusterQueue::subIds() const +inline +const bsl::vector& ClusterQueue::subIds() const { return d_subIds; } -inline int ClusterQueue::partitionId() const +inline +int ClusterQueue::partitionId() const { return d_partitionId; } -inline const bdlb::NullableValue& -ClusterQueue::primaryNodeDescription() const +inline +const bdlb::NullableValue& ClusterQueue::primaryNodeDescription() const { return d_primaryNodeDescription; } -inline const bsl::string& ClusterQueue::key() const +inline +const bsl::string& ClusterQueue::key() const { return d_key; } -inline bool ClusterQueue::isCreated() const +inline +bool ClusterQueue::isCreated() const { return d_isCreated; } -inline const bsl::vector& ClusterQueue::contexts() const +inline +const bsl::vector& ClusterQueue::contexts() const { return d_contexts; } -// ------------------- -// class DangerCommand -// ------------------- + + + // ------------------- + // class DangerCommand + // ------------------- // CLASS METHODS // PRIVATE ACCESSORS @@ -37484,26 +38234,28 @@ void DangerCommand::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const using bslh::hashAppend; hashAppend(hashAlgorithm, this->selectionId()); switch (this->selectionId()) { - case Class::SELECTION_ID_SHUTDOWN: + case Class::SELECTION_ID_SHUTDOWN: hashAppend(hashAlgorithm, this->shutdown()); break; - case Class::SELECTION_ID_TERMINATE: + case Class::SELECTION_ID_TERMINATE: hashAppend(hashAlgorithm, this->terminate()); break; - default: BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); + default: + BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); } } -inline bool DangerCommand::isEqualTo(const DangerCommand& rhs) const +inline +bool DangerCommand::isEqualTo(const DangerCommand& rhs) const { typedef DangerCommand Class; if (this->selectionId() == rhs.selectionId()) { switch (rhs.selectionId()) { - case Class::SELECTION_ID_SHUTDOWN: + case Class::SELECTION_ID_SHUTDOWN: return this->shutdown() == rhs.shutdown(); - case Class::SELECTION_ID_TERMINATE: + case Class::SELECTION_ID_TERMINATE: return this->terminate() == rhs.terminate(); - default: + default: BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId()); return true; } @@ -37514,12 +38266,14 @@ inline bool DangerCommand::isEqualTo(const DangerCommand& rhs) const } // CREATORS -inline DangerCommand::DangerCommand() +inline +DangerCommand::DangerCommand() : d_selectionId(SELECTION_ID_UNDEFINED) { } -inline DangerCommand::~DangerCommand() +inline +DangerCommand::~DangerCommand() { reset(); } @@ -37529,32 +38283,35 @@ template int DangerCommand::manipulateSelection(t_MANIPULATOR& manipulator) { switch (d_selectionId) { - case DangerCommand::SELECTION_ID_SHUTDOWN: + case DangerCommand::SELECTION_ID_SHUTDOWN: return manipulator(&d_shutdown.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_SHUTDOWN]); - case DangerCommand::SELECTION_ID_TERMINATE: + SELECTION_INFO_ARRAY[SELECTION_INDEX_SHUTDOWN]); + case DangerCommand::SELECTION_ID_TERMINATE: return manipulator(&d_terminate.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_TERMINATE]); - default: + SELECTION_INFO_ARRAY[SELECTION_INDEX_TERMINATE]); + default: BSLS_ASSERT(DangerCommand::SELECTION_ID_UNDEFINED == d_selectionId); return -1; } } -inline Void& DangerCommand::shutdown() +inline +Void& DangerCommand::shutdown() { BSLS_ASSERT(SELECTION_ID_SHUTDOWN == d_selectionId); return d_shutdown.object(); } -inline Void& DangerCommand::terminate() +inline +Void& DangerCommand::terminate() { BSLS_ASSERT(SELECTION_ID_TERMINATE == d_selectionId); return d_terminate.object(); } // ACCESSORS -inline int DangerCommand::selectionId() const +inline +int DangerCommand::selectionId() const { return d_selectionId; } @@ -37563,46 +38320,54 @@ template int DangerCommand::accessSelection(t_ACCESSOR& accessor) const { switch (d_selectionId) { - case SELECTION_ID_SHUTDOWN: + case SELECTION_ID_SHUTDOWN: return accessor(d_shutdown.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_SHUTDOWN]); - case SELECTION_ID_TERMINATE: + SELECTION_INFO_ARRAY[SELECTION_INDEX_SHUTDOWN]); + case SELECTION_ID_TERMINATE: return accessor(d_terminate.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_TERMINATE]); - default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); return -1; + SELECTION_INFO_ARRAY[SELECTION_INDEX_TERMINATE]); + default: + BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); + return -1; } } -inline const Void& DangerCommand::shutdown() const +inline +const Void& DangerCommand::shutdown() const { BSLS_ASSERT(SELECTION_ID_SHUTDOWN == d_selectionId); return d_shutdown.object(); } -inline const Void& DangerCommand::terminate() const +inline +const Void& DangerCommand::terminate() const { BSLS_ASSERT(SELECTION_ID_TERMINATE == d_selectionId); return d_terminate.object(); } -inline bool DangerCommand::isShutdownValue() const +inline +bool DangerCommand::isShutdownValue() const { return SELECTION_ID_SHUTDOWN == d_selectionId; } -inline bool DangerCommand::isTerminateValue() const +inline +bool DangerCommand::isTerminateValue() const { return SELECTION_ID_TERMINATE == d_selectionId; } -inline bool DangerCommand::isUndefinedValue() const +inline +bool DangerCommand::isUndefinedValue() const { return SELECTION_ID_UNDEFINED == d_selectionId; } -// ----------------- -// class ElectorInfo -// ----------------- + + // ----------------- + // class ElectorInfo + // ----------------- // PRIVATE ACCESSORS template @@ -37615,7 +38380,8 @@ void ElectorInfo::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const hashAppend(hashAlgorithm, this->leaderStatus()); } -inline bool ElectorInfo::isEqualTo(const ElectorInfo& rhs) const +inline +bool ElectorInfo::isEqualTo(const ElectorInfo& rhs) const { return this->electorState() == rhs.electorState() && this->leaderNode() == rhs.leaderNode() && @@ -37630,27 +38396,22 @@ int ElectorInfo::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator(&d_electorState, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ELECTOR_STATE]); + ret = manipulator(&d_electorState, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ELECTOR_STATE]); if (ret) { return ret; } - ret = manipulator(&d_leaderNode, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LEADER_NODE]); + ret = manipulator(&d_leaderNode, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LEADER_NODE]); if (ret) { return ret; } - ret = manipulator( - &d_leaderMessageSequence, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LEADER_MESSAGE_SEQUENCE]); + ret = manipulator(&d_leaderMessageSequence, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LEADER_MESSAGE_SEQUENCE]); if (ret) { return ret; } - ret = manipulator(&d_leaderStatus, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LEADER_STATUS]); + ret = manipulator(&d_leaderStatus, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LEADER_STATUS]); if (ret) { return ret; } @@ -37664,38 +38425,33 @@ int ElectorInfo::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_ELECTOR_STATE: { - return manipulator( - &d_electorState, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ELECTOR_STATE]); - } - case ATTRIBUTE_ID_LEADER_NODE: { - return manipulator(&d_leaderNode, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LEADER_NODE]); - } - case ATTRIBUTE_ID_LEADER_MESSAGE_SEQUENCE: { - return manipulator( - &d_leaderMessageSequence, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LEADER_MESSAGE_SEQUENCE]); - } - case ATTRIBUTE_ID_LEADER_STATUS: { - return manipulator( - &d_leaderStatus, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LEADER_STATUS]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_ELECTOR_STATE: { + return manipulator(&d_electorState, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ELECTOR_STATE]); + } + case ATTRIBUTE_ID_LEADER_NODE: { + return manipulator(&d_leaderNode, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LEADER_NODE]); + } + case ATTRIBUTE_ID_LEADER_MESSAGE_SEQUENCE: { + return manipulator(&d_leaderMessageSequence, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LEADER_MESSAGE_SEQUENCE]); + } + case ATTRIBUTE_ID_LEADER_STATUS: { + return manipulator(&d_leaderStatus, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LEADER_STATUS]); + } + default: + return NOT_FOUND; } } template -int ElectorInfo::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int ElectorInfo::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -37703,22 +38459,26 @@ int ElectorInfo::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline ElectorState::Value& ElectorInfo::electorState() +inline +ElectorState::Value& ElectorInfo::electorState() { return d_electorState; } -inline bsl::string& ElectorInfo::leaderNode() +inline +bsl::string& ElectorInfo::leaderNode() { return d_leaderNode; } -inline LeaderMessageSequence& ElectorInfo::leaderMessageSequence() +inline +LeaderMessageSequence& ElectorInfo::leaderMessageSequence() { return d_leaderMessageSequence; } -inline LeaderStatus::Value& ElectorInfo::leaderStatus() +inline +LeaderStatus::Value& ElectorInfo::leaderStatus() { return d_leaderStatus; } @@ -37729,27 +38489,22 @@ int ElectorInfo::accessAttributes(t_ACCESSOR& accessor) const { int ret; - ret = accessor(d_electorState, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ELECTOR_STATE]); + ret = accessor(d_electorState, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ELECTOR_STATE]); if (ret) { return ret; } - ret = accessor(d_leaderNode, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LEADER_NODE]); + ret = accessor(d_leaderNode, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LEADER_NODE]); if (ret) { return ret; } - ret = accessor( - d_leaderMessageSequence, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LEADER_MESSAGE_SEQUENCE]); + ret = accessor(d_leaderMessageSequence, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LEADER_MESSAGE_SEQUENCE]); if (ret) { return ret; } - ret = accessor(d_leaderStatus, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LEADER_STATUS]); + ret = accessor(d_leaderStatus, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LEADER_STATUS]); if (ret) { return ret; } @@ -37763,66 +38518,69 @@ int ElectorInfo::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_ELECTOR_STATE: { - return accessor(d_electorState, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ELECTOR_STATE]); - } - case ATTRIBUTE_ID_LEADER_NODE: { - return accessor(d_leaderNode, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LEADER_NODE]); - } - case ATTRIBUTE_ID_LEADER_MESSAGE_SEQUENCE: { - return accessor( - d_leaderMessageSequence, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LEADER_MESSAGE_SEQUENCE]); - } - case ATTRIBUTE_ID_LEADER_STATUS: { - return accessor(d_leaderStatus, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LEADER_STATUS]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_ELECTOR_STATE: { + return accessor(d_electorState, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ELECTOR_STATE]); + } + case ATTRIBUTE_ID_LEADER_NODE: { + return accessor(d_leaderNode, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LEADER_NODE]); + } + case ATTRIBUTE_ID_LEADER_MESSAGE_SEQUENCE: { + return accessor(d_leaderMessageSequence, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LEADER_MESSAGE_SEQUENCE]); + } + case ATTRIBUTE_ID_LEADER_STATUS: { + return accessor(d_leaderStatus, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LEADER_STATUS]); + } + default: + return NOT_FOUND; } } template -int ElectorInfo::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int ElectorInfo::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline ElectorState::Value ElectorInfo::electorState() const +inline +ElectorState::Value ElectorInfo::electorState() const { return d_electorState; } -inline const bsl::string& ElectorInfo::leaderNode() const +inline +const bsl::string& ElectorInfo::leaderNode() const { return d_leaderNode; } -inline const LeaderMessageSequence& ElectorInfo::leaderMessageSequence() const +inline +const LeaderMessageSequence& ElectorInfo::leaderMessageSequence() const { return d_leaderMessageSequence; } -inline LeaderStatus::Value ElectorInfo::leaderStatus() const +inline +LeaderStatus::Value ElectorInfo::leaderStatus() const { return d_leaderStatus; } -// ---------------------- -// class GetTunableChoice -// ---------------------- + + + // ---------------------- + // class GetTunableChoice + // ---------------------- // CLASS METHODS // PRIVATE ACCESSORS @@ -37833,24 +38591,28 @@ void GetTunableChoice::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const using bslh::hashAppend; hashAppend(hashAlgorithm, this->selectionId()); switch (this->selectionId()) { - case Class::SELECTION_ID_ALL: + case Class::SELECTION_ID_ALL: hashAppend(hashAlgorithm, this->all()); break; - case Class::SELECTION_ID_SELF: + case Class::SELECTION_ID_SELF: hashAppend(hashAlgorithm, this->self()); break; - default: BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); + default: + BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); } } -inline bool GetTunableChoice::isEqualTo(const GetTunableChoice& rhs) const +inline +bool GetTunableChoice::isEqualTo(const GetTunableChoice& rhs) const { typedef GetTunableChoice Class; if (this->selectionId() == rhs.selectionId()) { switch (rhs.selectionId()) { - case Class::SELECTION_ID_ALL: return this->all() == rhs.all(); - case Class::SELECTION_ID_SELF: return this->self() == rhs.self(); - default: + case Class::SELECTION_ID_ALL: + return this->all() == rhs.all(); + case Class::SELECTION_ID_SELF: + return this->self() == rhs.self(); + default: BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId()); return true; } @@ -37861,12 +38623,14 @@ inline bool GetTunableChoice::isEqualTo(const GetTunableChoice& rhs) const } // CREATORS -inline GetTunableChoice::GetTunableChoice() +inline +GetTunableChoice::GetTunableChoice() : d_selectionId(SELECTION_ID_UNDEFINED) { } -inline GetTunableChoice::~GetTunableChoice() +inline +GetTunableChoice::~GetTunableChoice() { reset(); } @@ -37876,32 +38640,35 @@ template int GetTunableChoice::manipulateSelection(t_MANIPULATOR& manipulator) { switch (d_selectionId) { - case GetTunableChoice::SELECTION_ID_ALL: + case GetTunableChoice::SELECTION_ID_ALL: return manipulator(&d_all.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_ALL]); - case GetTunableChoice::SELECTION_ID_SELF: + SELECTION_INFO_ARRAY[SELECTION_INDEX_ALL]); + case GetTunableChoice::SELECTION_ID_SELF: return manipulator(&d_self.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_SELF]); - default: + SELECTION_INFO_ARRAY[SELECTION_INDEX_SELF]); + default: BSLS_ASSERT(GetTunableChoice::SELECTION_ID_UNDEFINED == d_selectionId); return -1; } } -inline Void& GetTunableChoice::all() +inline +Void& GetTunableChoice::all() { BSLS_ASSERT(SELECTION_ID_ALL == d_selectionId); return d_all.object(); } -inline Void& GetTunableChoice::self() +inline +Void& GetTunableChoice::self() { BSLS_ASSERT(SELECTION_ID_SELF == d_selectionId); return d_self.object(); } // ACCESSORS -inline int GetTunableChoice::selectionId() const +inline +int GetTunableChoice::selectionId() const { return d_selectionId; } @@ -37910,46 +38677,54 @@ template int GetTunableChoice::accessSelection(t_ACCESSOR& accessor) const { switch (d_selectionId) { - case SELECTION_ID_ALL: + case SELECTION_ID_ALL: return accessor(d_all.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_ALL]); - case SELECTION_ID_SELF: + SELECTION_INFO_ARRAY[SELECTION_INDEX_ALL]); + case SELECTION_ID_SELF: return accessor(d_self.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_SELF]); - default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); return -1; + SELECTION_INFO_ARRAY[SELECTION_INDEX_SELF]); + default: + BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); + return -1; } } -inline const Void& GetTunableChoice::all() const +inline +const Void& GetTunableChoice::all() const { BSLS_ASSERT(SELECTION_ID_ALL == d_selectionId); return d_all.object(); } -inline const Void& GetTunableChoice::self() const +inline +const Void& GetTunableChoice::self() const { BSLS_ASSERT(SELECTION_ID_SELF == d_selectionId); return d_self.object(); } -inline bool GetTunableChoice::isAllValue() const +inline +bool GetTunableChoice::isAllValue() const { return SELECTION_ID_ALL == d_selectionId; } -inline bool GetTunableChoice::isSelfValue() const +inline +bool GetTunableChoice::isSelfValue() const { return SELECTION_ID_SELF == d_selectionId; } -inline bool GetTunableChoice::isUndefinedValue() const +inline +bool GetTunableChoice::isUndefinedValue() const { return SELECTION_ID_UNDEFINED == d_selectionId; } -// ---------- -// class Help -// ---------- + + // ---------- + // class Help + // ---------- // CLASS METHODS // MANIPULATORS @@ -37958,14 +38733,12 @@ int Help::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator(&d_commands, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMANDS]); + ret = manipulator(&d_commands, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMANDS]); if (ret) { return ret; } - ret = manipulator(&d_isPlumbing, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_PLUMBING]); + ret = manipulator(&d_isPlumbing, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_PLUMBING]); if (ret) { return ret; } @@ -37979,27 +38752,27 @@ int Help::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_COMMANDS: { - return manipulator(&d_commands, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMANDS]); - } - case ATTRIBUTE_ID_IS_PLUMBING: { - return manipulator(&d_isPlumbing, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_PLUMBING]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_COMMANDS: { + return manipulator(&d_commands, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMANDS]); + } + case ATTRIBUTE_ID_IS_PLUMBING: { + return manipulator(&d_isPlumbing, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_PLUMBING]); + } + default: + return NOT_FOUND; } } template -int Help::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int Help::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -38007,12 +38780,14 @@ int Help::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::vector& Help::commands() +inline +bsl::vector& Help::commands() { return d_commands; } -inline bool& Help::isPlumbing() +inline +bool& Help::isPlumbing() { return d_isPlumbing; } @@ -38028,8 +38803,7 @@ int Help::accessAttributes(t_ACCESSOR& accessor) const return ret; } - ret = accessor(d_isPlumbing, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_PLUMBING]); + ret = accessor(d_isPlumbing, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_PLUMBING]); if (ret) { return ret; } @@ -38043,66 +38817,65 @@ int Help::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_COMMANDS: { - return accessor(d_commands, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMANDS]); - } - case ATTRIBUTE_ID_IS_PLUMBING: { - return accessor(d_isPlumbing, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_PLUMBING]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_COMMANDS: { + return accessor(d_commands, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMANDS]); + } + case ATTRIBUTE_ID_IS_PLUMBING: { + return accessor(d_isPlumbing, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_PLUMBING]); + } + default: + return NOT_FOUND; } } template -int Help::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int Help::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::vector& Help::commands() const +inline +const bsl::vector& Help::commands() const { return d_commands; } -inline bool Help::isPlumbing() const +inline +bool Help::isPlumbing() const { return d_isPlumbing; } -// -------------------------------- -// class MessageGroupIdManagerIndex -// -------------------------------- + + + // -------------------------------- + // class MessageGroupIdManagerIndex + // -------------------------------- // CLASS METHODS // MANIPULATORS template -int MessageGroupIdManagerIndex::manipulateAttributes( - t_MANIPULATOR& manipulator) +int MessageGroupIdManagerIndex::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator( - &d_leastRecentlyUsedGroupIds, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LEAST_RECENTLY_USED_GROUP_IDS]); + ret = manipulator(&d_leastRecentlyUsedGroupIds, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LEAST_RECENTLY_USED_GROUP_IDS]); if (ret) { return ret; } - ret = manipulator( - &d_numMsgGroupsPerClient, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MSG_GROUPS_PER_CLIENT]); + ret = manipulator(&d_numMsgGroupsPerClient, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MSG_GROUPS_PER_CLIENT]); if (ret) { return ret; } @@ -38111,36 +38884,32 @@ int MessageGroupIdManagerIndex::manipulateAttributes( } template -int MessageGroupIdManagerIndex::manipulateAttribute(t_MANIPULATOR& manipulator, - int id) +int MessageGroupIdManagerIndex::manipulateAttribute(t_MANIPULATOR& manipulator, int id) { enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_LEAST_RECENTLY_USED_GROUP_IDS: { - return manipulator( - &d_leastRecentlyUsedGroupIds, - ATTRIBUTE_INFO_ARRAY - [ATTRIBUTE_INDEX_LEAST_RECENTLY_USED_GROUP_IDS]); - } - case ATTRIBUTE_ID_NUM_MSG_GROUPS_PER_CLIENT: { - return manipulator( - &d_numMsgGroupsPerClient, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MSG_GROUPS_PER_CLIENT]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_LEAST_RECENTLY_USED_GROUP_IDS: { + return manipulator(&d_leastRecentlyUsedGroupIds, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LEAST_RECENTLY_USED_GROUP_IDS]); + } + case ATTRIBUTE_ID_NUM_MSG_GROUPS_PER_CLIENT: { + return manipulator(&d_numMsgGroupsPerClient, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MSG_GROUPS_PER_CLIENT]); + } + default: + return NOT_FOUND; } } template -int MessageGroupIdManagerIndex::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int MessageGroupIdManagerIndex::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -38148,14 +38917,14 @@ int MessageGroupIdManagerIndex::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::vector& -MessageGroupIdManagerIndex::leastRecentlyUsedGroupIds() +inline +bsl::vector& MessageGroupIdManagerIndex::leastRecentlyUsedGroupIds() { return d_leastRecentlyUsedGroupIds; } -inline bsl::vector& -MessageGroupIdManagerIndex::numMsgGroupsPerClient() +inline +bsl::vector& MessageGroupIdManagerIndex::numMsgGroupsPerClient() { return d_numMsgGroupsPerClient; } @@ -38166,16 +38935,12 @@ int MessageGroupIdManagerIndex::accessAttributes(t_ACCESSOR& accessor) const { int ret; - ret = accessor( - d_leastRecentlyUsedGroupIds, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LEAST_RECENTLY_USED_GROUP_IDS]); + ret = accessor(d_leastRecentlyUsedGroupIds, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LEAST_RECENTLY_USED_GROUP_IDS]); if (ret) { return ret; } - ret = accessor( - d_numMsgGroupsPerClient, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MSG_GROUPS_PER_CLIENT]); + ret = accessor(d_numMsgGroupsPerClient, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MSG_GROUPS_PER_CLIENT]); if (ret) { return ret; } @@ -38184,57 +38949,56 @@ int MessageGroupIdManagerIndex::accessAttributes(t_ACCESSOR& accessor) const } template -int MessageGroupIdManagerIndex::accessAttribute(t_ACCESSOR& accessor, - int id) const +int MessageGroupIdManagerIndex::accessAttribute(t_ACCESSOR& accessor, int id) const { enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_LEAST_RECENTLY_USED_GROUP_IDS: { - return accessor(d_leastRecentlyUsedGroupIds, - ATTRIBUTE_INFO_ARRAY - [ATTRIBUTE_INDEX_LEAST_RECENTLY_USED_GROUP_IDS]); - } - case ATTRIBUTE_ID_NUM_MSG_GROUPS_PER_CLIENT: { - return accessor( - d_numMsgGroupsPerClient, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MSG_GROUPS_PER_CLIENT]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_LEAST_RECENTLY_USED_GROUP_IDS: { + return accessor(d_leastRecentlyUsedGroupIds, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LEAST_RECENTLY_USED_GROUP_IDS]); + } + case ATTRIBUTE_ID_NUM_MSG_GROUPS_PER_CLIENT: { + return accessor(d_numMsgGroupsPerClient, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MSG_GROUPS_PER_CLIENT]); + } + default: + return NOT_FOUND; } } template -int MessageGroupIdManagerIndex::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int MessageGroupIdManagerIndex::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::vector& -MessageGroupIdManagerIndex::leastRecentlyUsedGroupIds() const +inline +const bsl::vector& MessageGroupIdManagerIndex::leastRecentlyUsedGroupIds() const { return d_leastRecentlyUsedGroupIds; } -inline const bsl::vector& -MessageGroupIdManagerIndex::numMsgGroupsPerClient() const +inline +const bsl::vector& MessageGroupIdManagerIndex::numMsgGroupsPerClient() const { return d_numMsgGroupsPerClient; } -// ------------------- -// class PartitionInfo -// ------------------- + + + // ------------------- + // class PartitionInfo + // ------------------- // PRIVATE ACCESSORS template @@ -38248,7 +39012,8 @@ void PartitionInfo::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const hashAppend(hashAlgorithm, this->primaryStatus()); } -inline bool PartitionInfo::isEqualTo(const PartitionInfo& rhs) const +inline +bool PartitionInfo::isEqualTo(const PartitionInfo& rhs) const { return this->numQueuesMapped() == rhs.numQueuesMapped() && this->numActiveQueues() == rhs.numActiveQueues() && @@ -38264,32 +39029,27 @@ int PartitionInfo::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator(&d_numQueuesMapped, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_QUEUES_MAPPED]); + ret = manipulator(&d_numQueuesMapped, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_QUEUES_MAPPED]); if (ret) { return ret; } - ret = manipulator(&d_numActiveQueues, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_ACTIVE_QUEUES]); + ret = manipulator(&d_numActiveQueues, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_ACTIVE_QUEUES]); if (ret) { return ret; } - ret = manipulator(&d_primaryNode, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_NODE]); + ret = manipulator(&d_primaryNode, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_NODE]); if (ret) { return ret; } - ret = manipulator(&d_primaryLeaseId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_LEASE_ID]); + ret = manipulator(&d_primaryLeaseId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_LEASE_ID]); if (ret) { return ret; } - ret = manipulator(&d_primaryStatus, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_STATUS]); + ret = manipulator(&d_primaryStatus, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_STATUS]); if (ret) { return ret; } @@ -38303,43 +39063,36 @@ int PartitionInfo::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_NUM_QUEUES_MAPPED: { - return manipulator( - &d_numQueuesMapped, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_QUEUES_MAPPED]); - } - case ATTRIBUTE_ID_NUM_ACTIVE_QUEUES: { - return manipulator( - &d_numActiveQueues, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_ACTIVE_QUEUES]); - } - case ATTRIBUTE_ID_PRIMARY_NODE: { - return manipulator(&d_primaryNode, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_NODE]); - } - case ATTRIBUTE_ID_PRIMARY_LEASE_ID: { - return manipulator( - &d_primaryLeaseId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_LEASE_ID]); - } - case ATTRIBUTE_ID_PRIMARY_STATUS: { - return manipulator( - &d_primaryStatus, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_STATUS]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_NUM_QUEUES_MAPPED: { + return manipulator(&d_numQueuesMapped, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_QUEUES_MAPPED]); + } + case ATTRIBUTE_ID_NUM_ACTIVE_QUEUES: { + return manipulator(&d_numActiveQueues, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_ACTIVE_QUEUES]); + } + case ATTRIBUTE_ID_PRIMARY_NODE: { + return manipulator(&d_primaryNode, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_NODE]); + } + case ATTRIBUTE_ID_PRIMARY_LEASE_ID: { + return manipulator(&d_primaryLeaseId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_LEASE_ID]); + } + case ATTRIBUTE_ID_PRIMARY_STATUS: { + return manipulator(&d_primaryStatus, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_STATUS]); + } + default: + return NOT_FOUND; } } template -int PartitionInfo::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int PartitionInfo::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -38347,27 +39100,32 @@ int PartitionInfo::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline int& PartitionInfo::numQueuesMapped() +inline +int& PartitionInfo::numQueuesMapped() { return d_numQueuesMapped; } -inline int& PartitionInfo::numActiveQueues() +inline +int& PartitionInfo::numActiveQueues() { return d_numActiveQueues; } -inline bdlb::NullableValue& PartitionInfo::primaryNode() +inline +bdlb::NullableValue& PartitionInfo::primaryNode() { return d_primaryNode; } -inline unsigned int& PartitionInfo::primaryLeaseId() +inline +unsigned int& PartitionInfo::primaryLeaseId() { return d_primaryLeaseId; } -inline PrimaryStatus::Value& PartitionInfo::primaryStatus() +inline +PrimaryStatus::Value& PartitionInfo::primaryStatus() { return d_primaryStatus; } @@ -38378,32 +39136,27 @@ int PartitionInfo::accessAttributes(t_ACCESSOR& accessor) const { int ret; - ret = accessor(d_numQueuesMapped, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_QUEUES_MAPPED]); + ret = accessor(d_numQueuesMapped, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_QUEUES_MAPPED]); if (ret) { return ret; } - ret = accessor(d_numActiveQueues, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_ACTIVE_QUEUES]); + ret = accessor(d_numActiveQueues, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_ACTIVE_QUEUES]); if (ret) { return ret; } - ret = accessor(d_primaryNode, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_NODE]); + ret = accessor(d_primaryNode, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_NODE]); if (ret) { return ret; } - ret = accessor(d_primaryLeaseId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_LEASE_ID]); + ret = accessor(d_primaryLeaseId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_LEASE_ID]); if (ret) { return ret; } - ret = accessor(d_primaryStatus, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_STATUS]); + ret = accessor(d_primaryStatus, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_STATUS]); if (ret) { return ret; } @@ -38417,78 +39170,78 @@ int PartitionInfo::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_NUM_QUEUES_MAPPED: { - return accessor( - d_numQueuesMapped, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_QUEUES_MAPPED]); - } - case ATTRIBUTE_ID_NUM_ACTIVE_QUEUES: { - return accessor( - d_numActiveQueues, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_ACTIVE_QUEUES]); - } - case ATTRIBUTE_ID_PRIMARY_NODE: { - return accessor(d_primaryNode, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_NODE]); - } - case ATTRIBUTE_ID_PRIMARY_LEASE_ID: { - return accessor( - d_primaryLeaseId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_LEASE_ID]); - } - case ATTRIBUTE_ID_PRIMARY_STATUS: { - return accessor(d_primaryStatus, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_STATUS]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_NUM_QUEUES_MAPPED: { + return accessor(d_numQueuesMapped, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_QUEUES_MAPPED]); + } + case ATTRIBUTE_ID_NUM_ACTIVE_QUEUES: { + return accessor(d_numActiveQueues, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_ACTIVE_QUEUES]); + } + case ATTRIBUTE_ID_PRIMARY_NODE: { + return accessor(d_primaryNode, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_NODE]); + } + case ATTRIBUTE_ID_PRIMARY_LEASE_ID: { + return accessor(d_primaryLeaseId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_LEASE_ID]); + } + case ATTRIBUTE_ID_PRIMARY_STATUS: { + return accessor(d_primaryStatus, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_STATUS]); + } + default: + return NOT_FOUND; } } template -int PartitionInfo::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int PartitionInfo::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline int PartitionInfo::numQueuesMapped() const +inline +int PartitionInfo::numQueuesMapped() const { return d_numQueuesMapped; } -inline int PartitionInfo::numActiveQueues() const +inline +int PartitionInfo::numActiveQueues() const { return d_numActiveQueues; } -inline const bdlb::NullableValue& -PartitionInfo::primaryNode() const +inline +const bdlb::NullableValue& PartitionInfo::primaryNode() const { return d_primaryNode; } -inline unsigned int PartitionInfo::primaryLeaseId() const +inline +unsigned int PartitionInfo::primaryLeaseId() const { return d_primaryLeaseId; } -inline PrimaryStatus::Value PartitionInfo::primaryStatus() const +inline +PrimaryStatus::Value PartitionInfo::primaryStatus() const { return d_primaryStatus; } -// ---------------------- -// class PurgeQueueResult -// ---------------------- + + + // ---------------------- + // class PurgeQueueResult + // ---------------------- // CLASS METHODS // PRIVATE ACCESSORS @@ -38499,24 +39252,28 @@ void PurgeQueueResult::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const using bslh::hashAppend; hashAppend(hashAlgorithm, this->selectionId()); switch (this->selectionId()) { - case Class::SELECTION_ID_ERROR: + case Class::SELECTION_ID_ERROR: hashAppend(hashAlgorithm, this->error()); break; - case Class::SELECTION_ID_QUEUE: + case Class::SELECTION_ID_QUEUE: hashAppend(hashAlgorithm, this->queue()); break; - default: BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); + default: + BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); } } -inline bool PurgeQueueResult::isEqualTo(const PurgeQueueResult& rhs) const +inline +bool PurgeQueueResult::isEqualTo(const PurgeQueueResult& rhs) const { typedef PurgeQueueResult Class; if (this->selectionId() == rhs.selectionId()) { switch (rhs.selectionId()) { - case Class::SELECTION_ID_ERROR: return this->error() == rhs.error(); - case Class::SELECTION_ID_QUEUE: return this->queue() == rhs.queue(); - default: + case Class::SELECTION_ID_ERROR: + return this->error() == rhs.error(); + case Class::SELECTION_ID_QUEUE: + return this->queue() == rhs.queue(); + default: BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId()); return true; } @@ -38527,13 +39284,15 @@ inline bool PurgeQueueResult::isEqualTo(const PurgeQueueResult& rhs) const } // CREATORS -inline PurgeQueueResult::PurgeQueueResult(bslma::Allocator* basicAllocator) +inline +PurgeQueueResult::PurgeQueueResult(bslma::Allocator *basicAllocator) : d_selectionId(SELECTION_ID_UNDEFINED) , d_allocator_p(bslma::Default::allocator(basicAllocator)) { } -inline PurgeQueueResult::~PurgeQueueResult() +inline +PurgeQueueResult::~PurgeQueueResult() { reset(); } @@ -38543,32 +39302,35 @@ template int PurgeQueueResult::manipulateSelection(t_MANIPULATOR& manipulator) { switch (d_selectionId) { - case PurgeQueueResult::SELECTION_ID_ERROR: + case PurgeQueueResult::SELECTION_ID_ERROR: return manipulator(&d_error.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR]); - case PurgeQueueResult::SELECTION_ID_QUEUE: + SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR]); + case PurgeQueueResult::SELECTION_ID_QUEUE: return manipulator(&d_queue.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE]); - default: + SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE]); + default: BSLS_ASSERT(PurgeQueueResult::SELECTION_ID_UNDEFINED == d_selectionId); return -1; } } -inline Error& PurgeQueueResult::error() +inline +Error& PurgeQueueResult::error() { BSLS_ASSERT(SELECTION_ID_ERROR == d_selectionId); return d_error.object(); } -inline PurgedQueueDetails& PurgeQueueResult::queue() +inline +PurgedQueueDetails& PurgeQueueResult::queue() { BSLS_ASSERT(SELECTION_ID_QUEUE == d_selectionId); return d_queue.object(); } // ACCESSORS -inline int PurgeQueueResult::selectionId() const +inline +int PurgeQueueResult::selectionId() const { return d_selectionId; } @@ -38577,46 +39339,54 @@ template int PurgeQueueResult::accessSelection(t_ACCESSOR& accessor) const { switch (d_selectionId) { - case SELECTION_ID_ERROR: + case SELECTION_ID_ERROR: return accessor(d_error.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR]); - case SELECTION_ID_QUEUE: + SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR]); + case SELECTION_ID_QUEUE: return accessor(d_queue.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE]); - default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); return -1; + SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE]); + default: + BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); + return -1; } } -inline const Error& PurgeQueueResult::error() const +inline +const Error& PurgeQueueResult::error() const { BSLS_ASSERT(SELECTION_ID_ERROR == d_selectionId); return d_error.object(); } -inline const PurgedQueueDetails& PurgeQueueResult::queue() const +inline +const PurgedQueueDetails& PurgeQueueResult::queue() const { BSLS_ASSERT(SELECTION_ID_QUEUE == d_selectionId); return d_queue.object(); } -inline bool PurgeQueueResult::isErrorValue() const +inline +bool PurgeQueueResult::isErrorValue() const { return SELECTION_ID_ERROR == d_selectionId; } -inline bool PurgeQueueResult::isQueueValue() const +inline +bool PurgeQueueResult::isQueueValue() const { return SELECTION_ID_QUEUE == d_selectionId; } -inline bool PurgeQueueResult::isUndefinedValue() const +inline +bool PurgeQueueResult::isUndefinedValue() const { return SELECTION_ID_UNDEFINED == d_selectionId; } -// ------------------ -// class QueueCommand -// ------------------ + + // ------------------ + // class QueueCommand + // ------------------ // CLASS METHODS // PRIVATE ACCESSORS @@ -38627,31 +39397,33 @@ void QueueCommand::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const using bslh::hashAppend; hashAppend(hashAlgorithm, this->selectionId()); switch (this->selectionId()) { - case Class::SELECTION_ID_PURGE_APP_ID: + case Class::SELECTION_ID_PURGE_APP_ID: hashAppend(hashAlgorithm, this->purgeAppId()); break; - case Class::SELECTION_ID_INTERNALS: + case Class::SELECTION_ID_INTERNALS: hashAppend(hashAlgorithm, this->internals()); break; - case Class::SELECTION_ID_MESSAGES: + case Class::SELECTION_ID_MESSAGES: hashAppend(hashAlgorithm, this->messages()); break; - default: BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); + default: + BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); } } -inline bool QueueCommand::isEqualTo(const QueueCommand& rhs) const +inline +bool QueueCommand::isEqualTo(const QueueCommand& rhs) const { typedef QueueCommand Class; if (this->selectionId() == rhs.selectionId()) { switch (rhs.selectionId()) { - case Class::SELECTION_ID_PURGE_APP_ID: + case Class::SELECTION_ID_PURGE_APP_ID: return this->purgeAppId() == rhs.purgeAppId(); - case Class::SELECTION_ID_INTERNALS: + case Class::SELECTION_ID_INTERNALS: return this->internals() == rhs.internals(); - case Class::SELECTION_ID_MESSAGES: + case Class::SELECTION_ID_MESSAGES: return this->messages() == rhs.messages(); - default: + default: BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId()); return true; } @@ -38662,13 +39434,15 @@ inline bool QueueCommand::isEqualTo(const QueueCommand& rhs) const } // CREATORS -inline QueueCommand::QueueCommand(bslma::Allocator* basicAllocator) +inline +QueueCommand::QueueCommand(bslma::Allocator *basicAllocator) : d_selectionId(SELECTION_ID_UNDEFINED) , d_allocator_p(bslma::Default::allocator(basicAllocator)) { } -inline QueueCommand::~QueueCommand() +inline +QueueCommand::~QueueCommand() { reset(); } @@ -38678,41 +39452,45 @@ template int QueueCommand::manipulateSelection(t_MANIPULATOR& manipulator) { switch (d_selectionId) { - case QueueCommand::SELECTION_ID_PURGE_APP_ID: + case QueueCommand::SELECTION_ID_PURGE_APP_ID: return manipulator(&d_purgeAppId.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_PURGE_APP_ID]); - case QueueCommand::SELECTION_ID_INTERNALS: + SELECTION_INFO_ARRAY[SELECTION_INDEX_PURGE_APP_ID]); + case QueueCommand::SELECTION_ID_INTERNALS: return manipulator(&d_internals.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_INTERNALS]); - case QueueCommand::SELECTION_ID_MESSAGES: + SELECTION_INFO_ARRAY[SELECTION_INDEX_INTERNALS]); + case QueueCommand::SELECTION_ID_MESSAGES: return manipulator(&d_messages.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_MESSAGES]); - default: + SELECTION_INFO_ARRAY[SELECTION_INDEX_MESSAGES]); + default: BSLS_ASSERT(QueueCommand::SELECTION_ID_UNDEFINED == d_selectionId); return -1; } } -inline bsl::string& QueueCommand::purgeAppId() +inline +bsl::string& QueueCommand::purgeAppId() { BSLS_ASSERT(SELECTION_ID_PURGE_APP_ID == d_selectionId); return d_purgeAppId.object(); } -inline Void& QueueCommand::internals() +inline +Void& QueueCommand::internals() { BSLS_ASSERT(SELECTION_ID_INTERNALS == d_selectionId); return d_internals.object(); } -inline ListMessages& QueueCommand::messages() +inline +ListMessages& QueueCommand::messages() { BSLS_ASSERT(SELECTION_ID_MESSAGES == d_selectionId); return d_messages.object(); } // ACCESSORS -inline int QueueCommand::selectionId() const +inline +int QueueCommand::selectionId() const { return d_selectionId; } @@ -38721,60 +39499,70 @@ template int QueueCommand::accessSelection(t_ACCESSOR& accessor) const { switch (d_selectionId) { - case SELECTION_ID_PURGE_APP_ID: + case SELECTION_ID_PURGE_APP_ID: return accessor(d_purgeAppId.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_PURGE_APP_ID]); - case SELECTION_ID_INTERNALS: + SELECTION_INFO_ARRAY[SELECTION_INDEX_PURGE_APP_ID]); + case SELECTION_ID_INTERNALS: return accessor(d_internals.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_INTERNALS]); - case SELECTION_ID_MESSAGES: + SELECTION_INFO_ARRAY[SELECTION_INDEX_INTERNALS]); + case SELECTION_ID_MESSAGES: return accessor(d_messages.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_MESSAGES]); - default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); return -1; + SELECTION_INFO_ARRAY[SELECTION_INDEX_MESSAGES]); + default: + BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); + return -1; } } -inline const bsl::string& QueueCommand::purgeAppId() const +inline +const bsl::string& QueueCommand::purgeAppId() const { BSLS_ASSERT(SELECTION_ID_PURGE_APP_ID == d_selectionId); return d_purgeAppId.object(); } -inline const Void& QueueCommand::internals() const +inline +const Void& QueueCommand::internals() const { BSLS_ASSERT(SELECTION_ID_INTERNALS == d_selectionId); return d_internals.object(); } -inline const ListMessages& QueueCommand::messages() const +inline +const ListMessages& QueueCommand::messages() const { BSLS_ASSERT(SELECTION_ID_MESSAGES == d_selectionId); return d_messages.object(); } -inline bool QueueCommand::isPurgeAppIdValue() const +inline +bool QueueCommand::isPurgeAppIdValue() const { return SELECTION_ID_PURGE_APP_ID == d_selectionId; } -inline bool QueueCommand::isInternalsValue() const +inline +bool QueueCommand::isInternalsValue() const { return SELECTION_ID_INTERNALS == d_selectionId; } -inline bool QueueCommand::isMessagesValue() const +inline +bool QueueCommand::isMessagesValue() const { return SELECTION_ID_MESSAGES == d_selectionId; } -inline bool QueueCommand::isUndefinedValue() const +inline +bool QueueCommand::isUndefinedValue() const { return SELECTION_ID_UNDEFINED == d_selectionId; } -// ------------------- -// class QueueContents -// ------------------- + + // ------------------- + // class QueueContents + // ------------------- // PRIVATE ACCESSORS template @@ -38793,8 +39581,7 @@ int QueueContents::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator(&d_messages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGES]); + ret = manipulator(&d_messages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGES]); if (ret) { return ret; } @@ -38804,9 +39591,7 @@ int QueueContents::manipulateAttributes(t_MANIPULATOR& manipulator) return ret; } - ret = manipulator( - &d_totalQueueMessages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_TOTAL_QUEUE_MESSAGES]); + ret = manipulator(&d_totalQueueMessages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_TOTAL_QUEUE_MESSAGES]); if (ret) { return ret; } @@ -38820,32 +39605,30 @@ int QueueContents::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_MESSAGES: { - return manipulator(&d_messages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGES]); - } - case ATTRIBUTE_ID_OFFSET: { - return manipulator(&d_offset, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_OFFSET]); - } - case ATTRIBUTE_ID_TOTAL_QUEUE_MESSAGES: { - return manipulator( - &d_totalQueueMessages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_TOTAL_QUEUE_MESSAGES]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_MESSAGES: { + return manipulator(&d_messages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGES]); + } + case ATTRIBUTE_ID_OFFSET: { + return manipulator(&d_offset, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_OFFSET]); + } + case ATTRIBUTE_ID_TOTAL_QUEUE_MESSAGES: { + return manipulator(&d_totalQueueMessages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_TOTAL_QUEUE_MESSAGES]); + } + default: + return NOT_FOUND; } } template -int QueueContents::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int QueueContents::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -38853,17 +39636,20 @@ int QueueContents::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::vector& QueueContents::messages() +inline +bsl::vector& QueueContents::messages() { return d_messages; } -inline bsls::Types::Int64& QueueContents::offset() +inline +bsls::Types::Int64& QueueContents::offset() { return d_offset; } -inline bsls::Types::Int64& QueueContents::totalQueueMessages() +inline +bsls::Types::Int64& QueueContents::totalQueueMessages() { return d_totalQueueMessages; } @@ -38884,8 +39670,7 @@ int QueueContents::accessAttributes(t_ACCESSOR& accessor) const return ret; } - ret = accessor(d_totalQueueMessages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_TOTAL_QUEUE_MESSAGES]); + ret = accessor(d_totalQueueMessages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_TOTAL_QUEUE_MESSAGES]); if (ret) { return ret; } @@ -38899,57 +39684,60 @@ int QueueContents::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_MESSAGES: { - return accessor(d_messages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGES]); - } - case ATTRIBUTE_ID_OFFSET: { - return accessor(d_offset, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_OFFSET]); - } - case ATTRIBUTE_ID_TOTAL_QUEUE_MESSAGES: { - return accessor( - d_totalQueueMessages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_TOTAL_QUEUE_MESSAGES]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_MESSAGES: { + return accessor(d_messages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGES]); + } + case ATTRIBUTE_ID_OFFSET: { + return accessor(d_offset, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_OFFSET]); + } + case ATTRIBUTE_ID_TOTAL_QUEUE_MESSAGES: { + return accessor(d_totalQueueMessages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_TOTAL_QUEUE_MESSAGES]); + } + default: + return NOT_FOUND; } } template -int QueueContents::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int QueueContents::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::vector& QueueContents::messages() const +inline +const bsl::vector& QueueContents::messages() const { return d_messages; } -inline bsls::Types::Int64 QueueContents::offset() const +inline +bsls::Types::Int64 QueueContents::offset() const { return d_offset; } -inline bsls::Types::Int64 QueueContents::totalQueueMessages() const +inline +bsls::Types::Int64 QueueContents::totalQueueMessages() const { return d_totalQueueMessages; } -// ------------------ -// class QueueStorage -// ------------------ + + + // ------------------ + // class QueueStorage + // ------------------ // PRIVATE ACCESSORS template @@ -38968,20 +39756,17 @@ int QueueStorage::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator(&d_numMessages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES]); + ret = manipulator(&d_numMessages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES]); if (ret) { return ret; } - ret = manipulator(&d_numBytes, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES]); + ret = manipulator(&d_numBytes, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES]); if (ret) { return ret; } - ret = manipulator(&d_virtualStorages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_VIRTUAL_STORAGES]); + ret = manipulator(&d_virtualStorages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_VIRTUAL_STORAGES]); if (ret) { return ret; } @@ -38995,32 +39780,30 @@ int QueueStorage::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_NUM_MESSAGES: { - return manipulator(&d_numMessages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES]); - } - case ATTRIBUTE_ID_NUM_BYTES: { - return manipulator(&d_numBytes, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES]); - } - case ATTRIBUTE_ID_VIRTUAL_STORAGES: { - return manipulator( - &d_virtualStorages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_VIRTUAL_STORAGES]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_NUM_MESSAGES: { + return manipulator(&d_numMessages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES]); + } + case ATTRIBUTE_ID_NUM_BYTES: { + return manipulator(&d_numBytes, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES]); + } + case ATTRIBUTE_ID_VIRTUAL_STORAGES: { + return manipulator(&d_virtualStorages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_VIRTUAL_STORAGES]); + } + default: + return NOT_FOUND; } } template -int QueueStorage::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int QueueStorage::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -39028,17 +39811,20 @@ int QueueStorage::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline unsigned int& QueueStorage::numMessages() +inline +unsigned int& QueueStorage::numMessages() { return d_numMessages; } -inline unsigned int& QueueStorage::numBytes() +inline +unsigned int& QueueStorage::numBytes() { return d_numBytes; } -inline bsl::vector& QueueStorage::virtualStorages() +inline +bsl::vector& QueueStorage::virtualStorages() { return d_virtualStorages; } @@ -39049,20 +39835,17 @@ int QueueStorage::accessAttributes(t_ACCESSOR& accessor) const { int ret; - ret = accessor(d_numMessages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES]); + ret = accessor(d_numMessages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES]); if (ret) { return ret; } - ret = accessor(d_numBytes, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES]); + ret = accessor(d_numBytes, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES]); if (ret) { return ret; } - ret = accessor(d_virtualStorages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_VIRTUAL_STORAGES]); + ret = accessor(d_virtualStorages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_VIRTUAL_STORAGES]); if (ret) { return ret; } @@ -39076,62 +39859,64 @@ int QueueStorage::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_NUM_MESSAGES: { - return accessor(d_numMessages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES]); - } - case ATTRIBUTE_ID_NUM_BYTES: { - return accessor(d_numBytes, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES]); - } - case ATTRIBUTE_ID_VIRTUAL_STORAGES: { - return accessor( - d_virtualStorages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_VIRTUAL_STORAGES]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_NUM_MESSAGES: { + return accessor(d_numMessages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES]); + } + case ATTRIBUTE_ID_NUM_BYTES: { + return accessor(d_numBytes, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES]); + } + case ATTRIBUTE_ID_VIRTUAL_STORAGES: { + return accessor(d_virtualStorages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_VIRTUAL_STORAGES]); + } + default: + return NOT_FOUND; } } template -int QueueStorage::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int QueueStorage::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline unsigned int QueueStorage::numMessages() const +inline +unsigned int QueueStorage::numMessages() const { return d_numMessages; } -inline unsigned int QueueStorage::numBytes() const +inline +unsigned int QueueStorage::numBytes() const { return d_numBytes; } -inline const bsl::vector& QueueStorage::virtualStorages() const +inline +const bsl::vector& QueueStorage::virtualStorages() const { return d_virtualStorages; } -// -------------------------- -// class ResourceUsageMonitor -// -------------------------- + + + // -------------------------- + // class ResourceUsageMonitor + // -------------------------- // PRIVATE ACCESSORS template -void ResourceUsageMonitor::hashAppendImpl( - t_HASH_ALGORITHM& hashAlgorithm) const +void ResourceUsageMonitor::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const { using bslh::hashAppend; hashAppend(hashAlgorithm, this->state()); @@ -39147,16 +39932,14 @@ void ResourceUsageMonitor::hashAppendImpl( hashAppend(hashAlgorithm, this->bytesCapacity()); } -inline bool -ResourceUsageMonitor::isEqualTo(const ResourceUsageMonitor& rhs) const +inline +bool ResourceUsageMonitor::isEqualTo(const ResourceUsageMonitor& rhs) const { return this->state() == rhs.state() && this->messagesState() == rhs.messagesState() && this->numMessages() == rhs.numMessages() && - this->messagesLowWatermarkRatio() == - rhs.messagesLowWatermarkRatio() && - this->messagesHighWatermarkRatio() == - rhs.messagesHighWatermarkRatio() && + this->messagesLowWatermarkRatio() == rhs.messagesLowWatermarkRatio() && + this->messagesHighWatermarkRatio() == rhs.messagesHighWatermarkRatio() && this->messagesCapacity() == rhs.messagesCapacity() && this->bytesState() == rhs.bytesState() && this->numBytes() == rhs.numBytes() && @@ -39177,66 +39960,52 @@ int ResourceUsageMonitor::manipulateAttributes(t_MANIPULATOR& manipulator) return ret; } - ret = manipulator(&d_messagesState, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGES_STATE]); + ret = manipulator(&d_messagesState, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGES_STATE]); if (ret) { return ret; } - ret = manipulator(&d_numMessages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES]); + ret = manipulator(&d_numMessages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES]); if (ret) { return ret; } - ret = manipulator( - &d_messagesLowWatermarkRatio, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGES_LOW_WATERMARK_RATIO]); + ret = manipulator(&d_messagesLowWatermarkRatio, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGES_LOW_WATERMARK_RATIO]); if (ret) { return ret; } - ret = manipulator( - &d_messagesHighWatermarkRatio, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGES_HIGH_WATERMARK_RATIO]); + ret = manipulator(&d_messagesHighWatermarkRatio, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGES_HIGH_WATERMARK_RATIO]); if (ret) { return ret; } - ret = manipulator(&d_messagesCapacity, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGES_CAPACITY]); + ret = manipulator(&d_messagesCapacity, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGES_CAPACITY]); if (ret) { return ret; } - ret = manipulator(&d_bytesState, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BYTES_STATE]); + ret = manipulator(&d_bytesState, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BYTES_STATE]); if (ret) { return ret; } - ret = manipulator(&d_numBytes, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES]); + ret = manipulator(&d_numBytes, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES]); if (ret) { return ret; } - ret = manipulator( - &d_bytesLowWatermarkRatio, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BYTES_LOW_WATERMARK_RATIO]); + ret = manipulator(&d_bytesLowWatermarkRatio, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BYTES_LOW_WATERMARK_RATIO]); if (ret) { return ret; } - ret = manipulator( - &d_bytesHighWatermarkRatio, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BYTES_HIGH_WATERMARK_RATIO]); + ret = manipulator(&d_bytesHighWatermarkRatio, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BYTES_HIGH_WATERMARK_RATIO]); if (ret) { return ret; } - ret = manipulator(&d_bytesCapacity, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BYTES_CAPACITY]); + ret = manipulator(&d_bytesCapacity, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BYTES_CAPACITY]); if (ret) { return ret; } @@ -39245,77 +40014,59 @@ int ResourceUsageMonitor::manipulateAttributes(t_MANIPULATOR& manipulator) } template -int ResourceUsageMonitor::manipulateAttribute(t_MANIPULATOR& manipulator, - int id) +int ResourceUsageMonitor::manipulateAttribute(t_MANIPULATOR& manipulator, int id) { enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_STATE: { - return manipulator(&d_state, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STATE]); - } - case ATTRIBUTE_ID_MESSAGES_STATE: { - return manipulator( - &d_messagesState, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGES_STATE]); - } - case ATTRIBUTE_ID_NUM_MESSAGES: { - return manipulator(&d_numMessages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES]); - } - case ATTRIBUTE_ID_MESSAGES_LOW_WATERMARK_RATIO: { - return manipulator(&d_messagesLowWatermarkRatio, - ATTRIBUTE_INFO_ARRAY - [ATTRIBUTE_INDEX_MESSAGES_LOW_WATERMARK_RATIO]); - } - case ATTRIBUTE_ID_MESSAGES_HIGH_WATERMARK_RATIO: { - return manipulator( - &d_messagesHighWatermarkRatio, - ATTRIBUTE_INFO_ARRAY - [ATTRIBUTE_INDEX_MESSAGES_HIGH_WATERMARK_RATIO]); - } - case ATTRIBUTE_ID_MESSAGES_CAPACITY: { - return manipulator( - &d_messagesCapacity, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGES_CAPACITY]); - } - case ATTRIBUTE_ID_BYTES_STATE: { - return manipulator(&d_bytesState, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BYTES_STATE]); - } - case ATTRIBUTE_ID_NUM_BYTES: { - return manipulator(&d_numBytes, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES]); - } - case ATTRIBUTE_ID_BYTES_LOW_WATERMARK_RATIO: { - return manipulator( - &d_bytesLowWatermarkRatio, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BYTES_LOW_WATERMARK_RATIO]); - } - case ATTRIBUTE_ID_BYTES_HIGH_WATERMARK_RATIO: { - return manipulator( - &d_bytesHighWatermarkRatio, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BYTES_HIGH_WATERMARK_RATIO]); - } - case ATTRIBUTE_ID_BYTES_CAPACITY: { - return manipulator( - &d_bytesCapacity, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BYTES_CAPACITY]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_STATE: { + return manipulator(&d_state, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STATE]); + } + case ATTRIBUTE_ID_MESSAGES_STATE: { + return manipulator(&d_messagesState, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGES_STATE]); + } + case ATTRIBUTE_ID_NUM_MESSAGES: { + return manipulator(&d_numMessages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES]); + } + case ATTRIBUTE_ID_MESSAGES_LOW_WATERMARK_RATIO: { + return manipulator(&d_messagesLowWatermarkRatio, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGES_LOW_WATERMARK_RATIO]); + } + case ATTRIBUTE_ID_MESSAGES_HIGH_WATERMARK_RATIO: { + return manipulator(&d_messagesHighWatermarkRatio, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGES_HIGH_WATERMARK_RATIO]); + } + case ATTRIBUTE_ID_MESSAGES_CAPACITY: { + return manipulator(&d_messagesCapacity, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGES_CAPACITY]); + } + case ATTRIBUTE_ID_BYTES_STATE: { + return manipulator(&d_bytesState, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BYTES_STATE]); + } + case ATTRIBUTE_ID_NUM_BYTES: { + return manipulator(&d_numBytes, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES]); + } + case ATTRIBUTE_ID_BYTES_LOW_WATERMARK_RATIO: { + return manipulator(&d_bytesLowWatermarkRatio, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BYTES_LOW_WATERMARK_RATIO]); + } + case ATTRIBUTE_ID_BYTES_HIGH_WATERMARK_RATIO: { + return manipulator(&d_bytesHighWatermarkRatio, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BYTES_HIGH_WATERMARK_RATIO]); + } + case ATTRIBUTE_ID_BYTES_CAPACITY: { + return manipulator(&d_bytesCapacity, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BYTES_CAPACITY]); + } + default: + return NOT_FOUND; } } template -int ResourceUsageMonitor::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int ResourceUsageMonitor::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -39323,57 +40074,68 @@ int ResourceUsageMonitor::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline ResourceUsageMonitorState::Value& ResourceUsageMonitor::state() +inline +ResourceUsageMonitorState::Value& ResourceUsageMonitor::state() { return d_state; } -inline ResourceUsageMonitorState::Value& ResourceUsageMonitor::messagesState() +inline +ResourceUsageMonitorState::Value& ResourceUsageMonitor::messagesState() { return d_messagesState; } -inline bsls::Types::Int64& ResourceUsageMonitor::numMessages() +inline +bsls::Types::Int64& ResourceUsageMonitor::numMessages() { return d_numMessages; } -inline bsls::Types::Int64& ResourceUsageMonitor::messagesLowWatermarkRatio() +inline +bsls::Types::Int64& ResourceUsageMonitor::messagesLowWatermarkRatio() { return d_messagesLowWatermarkRatio; } -inline bsls::Types::Int64& ResourceUsageMonitor::messagesHighWatermarkRatio() +inline +bsls::Types::Int64& ResourceUsageMonitor::messagesHighWatermarkRatio() { return d_messagesHighWatermarkRatio; } -inline bsls::Types::Int64& ResourceUsageMonitor::messagesCapacity() +inline +bsls::Types::Int64& ResourceUsageMonitor::messagesCapacity() { return d_messagesCapacity; } -inline ResourceUsageMonitorState::Value& ResourceUsageMonitor::bytesState() +inline +ResourceUsageMonitorState::Value& ResourceUsageMonitor::bytesState() { return d_bytesState; } -inline bsls::Types::Int64& ResourceUsageMonitor::numBytes() +inline +bsls::Types::Int64& ResourceUsageMonitor::numBytes() { return d_numBytes; } -inline bsls::Types::Int64& ResourceUsageMonitor::bytesLowWatermarkRatio() +inline +bsls::Types::Int64& ResourceUsageMonitor::bytesLowWatermarkRatio() { return d_bytesLowWatermarkRatio; } -inline bsls::Types::Int64& ResourceUsageMonitor::bytesHighWatermarkRatio() +inline +bsls::Types::Int64& ResourceUsageMonitor::bytesHighWatermarkRatio() { return d_bytesHighWatermarkRatio; } -inline bsls::Types::Int64& ResourceUsageMonitor::bytesCapacity() +inline +bsls::Types::Int64& ResourceUsageMonitor::bytesCapacity() { return d_bytesCapacity; } @@ -39389,66 +40151,52 @@ int ResourceUsageMonitor::accessAttributes(t_ACCESSOR& accessor) const return ret; } - ret = accessor(d_messagesState, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGES_STATE]); + ret = accessor(d_messagesState, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGES_STATE]); if (ret) { return ret; } - ret = accessor(d_numMessages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES]); + ret = accessor(d_numMessages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES]); if (ret) { return ret; } - ret = accessor( - d_messagesLowWatermarkRatio, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGES_LOW_WATERMARK_RATIO]); + ret = accessor(d_messagesLowWatermarkRatio, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGES_LOW_WATERMARK_RATIO]); if (ret) { return ret; } - ret = accessor( - d_messagesHighWatermarkRatio, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGES_HIGH_WATERMARK_RATIO]); + ret = accessor(d_messagesHighWatermarkRatio, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGES_HIGH_WATERMARK_RATIO]); if (ret) { return ret; } - ret = accessor(d_messagesCapacity, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGES_CAPACITY]); + ret = accessor(d_messagesCapacity, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGES_CAPACITY]); if (ret) { return ret; } - ret = accessor(d_bytesState, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BYTES_STATE]); + ret = accessor(d_bytesState, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BYTES_STATE]); if (ret) { return ret; } - ret = accessor(d_numBytes, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES]); + ret = accessor(d_numBytes, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES]); if (ret) { return ret; } - ret = accessor( - d_bytesLowWatermarkRatio, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BYTES_LOW_WATERMARK_RATIO]); + ret = accessor(d_bytesLowWatermarkRatio, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BYTES_LOW_WATERMARK_RATIO]); if (ret) { return ret; } - ret = accessor( - d_bytesHighWatermarkRatio, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BYTES_HIGH_WATERMARK_RATIO]); + ret = accessor(d_bytesHighWatermarkRatio, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BYTES_HIGH_WATERMARK_RATIO]); if (ret) { return ret; } - ret = accessor(d_bytesCapacity, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BYTES_CAPACITY]); + ret = accessor(d_bytesCapacity, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BYTES_CAPACITY]); if (ret) { return ret; } @@ -39462,136 +40210,132 @@ int ResourceUsageMonitor::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_STATE: { + case ATTRIBUTE_ID_STATE: { return accessor(d_state, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STATE]); - } - case ATTRIBUTE_ID_MESSAGES_STATE: { - return accessor(d_messagesState, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGES_STATE]); - } - case ATTRIBUTE_ID_NUM_MESSAGES: { - return accessor(d_numMessages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES]); - } - case ATTRIBUTE_ID_MESSAGES_LOW_WATERMARK_RATIO: { - return accessor(d_messagesLowWatermarkRatio, - ATTRIBUTE_INFO_ARRAY - [ATTRIBUTE_INDEX_MESSAGES_LOW_WATERMARK_RATIO]); - } - case ATTRIBUTE_ID_MESSAGES_HIGH_WATERMARK_RATIO: { - return accessor(d_messagesHighWatermarkRatio, - ATTRIBUTE_INFO_ARRAY - [ATTRIBUTE_INDEX_MESSAGES_HIGH_WATERMARK_RATIO]); - } - case ATTRIBUTE_ID_MESSAGES_CAPACITY: { - return accessor( - d_messagesCapacity, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGES_CAPACITY]); - } - case ATTRIBUTE_ID_BYTES_STATE: { - return accessor(d_bytesState, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BYTES_STATE]); - } - case ATTRIBUTE_ID_NUM_BYTES: { - return accessor(d_numBytes, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES]); - } - case ATTRIBUTE_ID_BYTES_LOW_WATERMARK_RATIO: { - return accessor( - d_bytesLowWatermarkRatio, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BYTES_LOW_WATERMARK_RATIO]); - } - case ATTRIBUTE_ID_BYTES_HIGH_WATERMARK_RATIO: { - return accessor( - d_bytesHighWatermarkRatio, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BYTES_HIGH_WATERMARK_RATIO]); - } - case ATTRIBUTE_ID_BYTES_CAPACITY: { - return accessor(d_bytesCapacity, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BYTES_CAPACITY]); - } - default: return NOT_FOUND; + } + case ATTRIBUTE_ID_MESSAGES_STATE: { + return accessor(d_messagesState, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGES_STATE]); + } + case ATTRIBUTE_ID_NUM_MESSAGES: { + return accessor(d_numMessages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_MESSAGES]); + } + case ATTRIBUTE_ID_MESSAGES_LOW_WATERMARK_RATIO: { + return accessor(d_messagesLowWatermarkRatio, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGES_LOW_WATERMARK_RATIO]); + } + case ATTRIBUTE_ID_MESSAGES_HIGH_WATERMARK_RATIO: { + return accessor(d_messagesHighWatermarkRatio, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGES_HIGH_WATERMARK_RATIO]); + } + case ATTRIBUTE_ID_MESSAGES_CAPACITY: { + return accessor(d_messagesCapacity, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MESSAGES_CAPACITY]); + } + case ATTRIBUTE_ID_BYTES_STATE: { + return accessor(d_bytesState, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BYTES_STATE]); + } + case ATTRIBUTE_ID_NUM_BYTES: { + return accessor(d_numBytes, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_BYTES]); + } + case ATTRIBUTE_ID_BYTES_LOW_WATERMARK_RATIO: { + return accessor(d_bytesLowWatermarkRatio, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BYTES_LOW_WATERMARK_RATIO]); + } + case ATTRIBUTE_ID_BYTES_HIGH_WATERMARK_RATIO: { + return accessor(d_bytesHighWatermarkRatio, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BYTES_HIGH_WATERMARK_RATIO]); + } + case ATTRIBUTE_ID_BYTES_CAPACITY: { + return accessor(d_bytesCapacity, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_BYTES_CAPACITY]); + } + default: + return NOT_FOUND; } } template -int ResourceUsageMonitor::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int ResourceUsageMonitor::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline ResourceUsageMonitorState::Value ResourceUsageMonitor::state() const +inline +ResourceUsageMonitorState::Value ResourceUsageMonitor::state() const { return d_state; } -inline ResourceUsageMonitorState::Value -ResourceUsageMonitor::messagesState() const +inline +ResourceUsageMonitorState::Value ResourceUsageMonitor::messagesState() const { return d_messagesState; } -inline bsls::Types::Int64 ResourceUsageMonitor::numMessages() const +inline +bsls::Types::Int64 ResourceUsageMonitor::numMessages() const { return d_numMessages; } -inline bsls::Types::Int64 -ResourceUsageMonitor::messagesLowWatermarkRatio() const +inline +bsls::Types::Int64 ResourceUsageMonitor::messagesLowWatermarkRatio() const { return d_messagesLowWatermarkRatio; } -inline bsls::Types::Int64 -ResourceUsageMonitor::messagesHighWatermarkRatio() const +inline +bsls::Types::Int64 ResourceUsageMonitor::messagesHighWatermarkRatio() const { return d_messagesHighWatermarkRatio; } -inline bsls::Types::Int64 ResourceUsageMonitor::messagesCapacity() const +inline +bsls::Types::Int64 ResourceUsageMonitor::messagesCapacity() const { return d_messagesCapacity; } -inline ResourceUsageMonitorState::Value -ResourceUsageMonitor::bytesState() const +inline +ResourceUsageMonitorState::Value ResourceUsageMonitor::bytesState() const { return d_bytesState; } -inline bsls::Types::Int64 ResourceUsageMonitor::numBytes() const +inline +bsls::Types::Int64 ResourceUsageMonitor::numBytes() const { return d_numBytes; } -inline bsls::Types::Int64 ResourceUsageMonitor::bytesLowWatermarkRatio() const +inline +bsls::Types::Int64 ResourceUsageMonitor::bytesLowWatermarkRatio() const { return d_bytesLowWatermarkRatio; } -inline bsls::Types::Int64 ResourceUsageMonitor::bytesHighWatermarkRatio() const +inline +bsls::Types::Int64 ResourceUsageMonitor::bytesHighWatermarkRatio() const { return d_bytesHighWatermarkRatio; } -inline bsls::Types::Int64 ResourceUsageMonitor::bytesCapacity() const +inline +bsls::Types::Int64 ResourceUsageMonitor::bytesCapacity() const { return d_bytesCapacity; } -// ----------------------- -// class RouteResponseList -// ----------------------- + + + // ----------------------- + // class RouteResponseList + // ----------------------- // CLASS METHODS // MANIPULATORS @@ -39600,8 +40344,7 @@ int RouteResponseList::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator(&d_responses, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_RESPONSES]); + ret = manipulator(&d_responses, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_RESPONSES]); if (ret) { return ret; } @@ -39615,23 +40358,24 @@ int RouteResponseList::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_RESPONSES: { - return manipulator(&d_responses, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_RESPONSES]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_RESPONSES: { + return manipulator(&d_responses, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_RESPONSES]); + } + default: + return NOT_FOUND; } } template -int RouteResponseList::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int RouteResponseList::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -39639,7 +40383,8 @@ int RouteResponseList::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::vector& RouteResponseList::responses() +inline +bsl::vector& RouteResponseList::responses() { return d_responses; } @@ -39650,8 +40395,7 @@ int RouteResponseList::accessAttributes(t_ACCESSOR& accessor) const { int ret; - ret = accessor(d_responses, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_RESPONSES]); + ret = accessor(d_responses, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_RESPONSES]); if (ret) { return ret; } @@ -39665,38 +40409,42 @@ int RouteResponseList::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_RESPONSES: { - return accessor(d_responses, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_RESPONSES]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_RESPONSES: { + return accessor(d_responses, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_RESPONSES]); + } + default: + return NOT_FOUND; } } template -int RouteResponseList::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int RouteResponseList::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::vector& RouteResponseList::responses() const +inline +const bsl::vector& RouteResponseList::responses() const { return d_responses; } -// ---------------------- -// class SetTunableChoice -// ---------------------- + + + // ---------------------- + // class SetTunableChoice + // ---------------------- // CLASS METHODS // PRIVATE ACCESSORS @@ -39707,24 +40455,28 @@ void SetTunableChoice::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const using bslh::hashAppend; hashAppend(hashAlgorithm, this->selectionId()); switch (this->selectionId()) { - case Class::SELECTION_ID_ALL: + case Class::SELECTION_ID_ALL: hashAppend(hashAlgorithm, this->all()); break; - case Class::SELECTION_ID_SELF: + case Class::SELECTION_ID_SELF: hashAppend(hashAlgorithm, this->self()); break; - default: BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); + default: + BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); } } -inline bool SetTunableChoice::isEqualTo(const SetTunableChoice& rhs) const +inline +bool SetTunableChoice::isEqualTo(const SetTunableChoice& rhs) const { typedef SetTunableChoice Class; if (this->selectionId() == rhs.selectionId()) { switch (rhs.selectionId()) { - case Class::SELECTION_ID_ALL: return this->all() == rhs.all(); - case Class::SELECTION_ID_SELF: return this->self() == rhs.self(); - default: + case Class::SELECTION_ID_ALL: + return this->all() == rhs.all(); + case Class::SELECTION_ID_SELF: + return this->self() == rhs.self(); + default: BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId()); return true; } @@ -39735,12 +40487,14 @@ inline bool SetTunableChoice::isEqualTo(const SetTunableChoice& rhs) const } // CREATORS -inline SetTunableChoice::SetTunableChoice() +inline +SetTunableChoice::SetTunableChoice() : d_selectionId(SELECTION_ID_UNDEFINED) { } -inline SetTunableChoice::~SetTunableChoice() +inline +SetTunableChoice::~SetTunableChoice() { reset(); } @@ -39750,32 +40504,35 @@ template int SetTunableChoice::manipulateSelection(t_MANIPULATOR& manipulator) { switch (d_selectionId) { - case SetTunableChoice::SELECTION_ID_ALL: + case SetTunableChoice::SELECTION_ID_ALL: return manipulator(&d_all.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_ALL]); - case SetTunableChoice::SELECTION_ID_SELF: + SELECTION_INFO_ARRAY[SELECTION_INDEX_ALL]); + case SetTunableChoice::SELECTION_ID_SELF: return manipulator(&d_self.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_SELF]); - default: + SELECTION_INFO_ARRAY[SELECTION_INDEX_SELF]); + default: BSLS_ASSERT(SetTunableChoice::SELECTION_ID_UNDEFINED == d_selectionId); return -1; } } -inline Void& SetTunableChoice::all() +inline +Void& SetTunableChoice::all() { BSLS_ASSERT(SELECTION_ID_ALL == d_selectionId); return d_all.object(); } -inline Void& SetTunableChoice::self() +inline +Void& SetTunableChoice::self() { BSLS_ASSERT(SELECTION_ID_SELF == d_selectionId); return d_self.object(); } // ACCESSORS -inline int SetTunableChoice::selectionId() const +inline +int SetTunableChoice::selectionId() const { return d_selectionId; } @@ -39784,46 +40541,54 @@ template int SetTunableChoice::accessSelection(t_ACCESSOR& accessor) const { switch (d_selectionId) { - case SELECTION_ID_ALL: + case SELECTION_ID_ALL: return accessor(d_all.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_ALL]); - case SELECTION_ID_SELF: + SELECTION_INFO_ARRAY[SELECTION_INDEX_ALL]); + case SELECTION_ID_SELF: return accessor(d_self.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_SELF]); - default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); return -1; + SELECTION_INFO_ARRAY[SELECTION_INDEX_SELF]); + default: + BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); + return -1; } } -inline const Void& SetTunableChoice::all() const +inline +const Void& SetTunableChoice::all() const { BSLS_ASSERT(SELECTION_ID_ALL == d_selectionId); return d_all.object(); } -inline const Void& SetTunableChoice::self() const +inline +const Void& SetTunableChoice::self() const { BSLS_ASSERT(SELECTION_ID_SELF == d_selectionId); return d_self.object(); } -inline bool SetTunableChoice::isAllValue() const +inline +bool SetTunableChoice::isAllValue() const { return SELECTION_ID_ALL == d_selectionId; } -inline bool SetTunableChoice::isSelfValue() const +inline +bool SetTunableChoice::isSelfValue() const { return SELECTION_ID_SELF == d_selectionId; } -inline bool SetTunableChoice::isUndefinedValue() const +inline +bool SetTunableChoice::isUndefinedValue() const { return SELECTION_ID_UNDEFINED == d_selectionId; } -// -------------------- -// class StorageContent -// -------------------- + + // -------------------- + // class StorageContent + // -------------------- // CLASS METHODS // MANIPULATORS @@ -39832,8 +40597,7 @@ int StorageContent::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator(&d_storages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STORAGES]); + ret = manipulator(&d_storages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STORAGES]); if (ret) { return ret; } @@ -39847,23 +40611,24 @@ int StorageContent::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_STORAGES: { - return manipulator(&d_storages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STORAGES]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_STORAGES: { + return manipulator(&d_storages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STORAGES]); + } + default: + return NOT_FOUND; } } template -int StorageContent::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int StorageContent::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -39871,7 +40636,8 @@ int StorageContent::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::vector& StorageContent::storages() +inline +bsl::vector& StorageContent::storages() { return d_storages; } @@ -39896,69 +40662,74 @@ int StorageContent::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_STORAGES: { - return accessor(d_storages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STORAGES]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_STORAGES: { + return accessor(d_storages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STORAGES]); + } + default: + return NOT_FOUND; } } template -int StorageContent::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int StorageContent::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::vector& StorageContent::storages() const +inline +const bsl::vector& StorageContent::storages() const { return d_storages; } -// -------------------------- -// class StorageDomainCommand -// -------------------------- + + + // -------------------------- + // class StorageDomainCommand + // -------------------------- // CLASS METHODS // PRIVATE ACCESSORS template -void StorageDomainCommand::hashAppendImpl( - t_HASH_ALGORITHM& hashAlgorithm) const +void StorageDomainCommand::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const { typedef StorageDomainCommand Class; using bslh::hashAppend; hashAppend(hashAlgorithm, this->selectionId()); switch (this->selectionId()) { - case Class::SELECTION_ID_QUEUE_STATUS: + case Class::SELECTION_ID_QUEUE_STATUS: hashAppend(hashAlgorithm, this->queueStatus()); break; - case Class::SELECTION_ID_PURGE: + case Class::SELECTION_ID_PURGE: hashAppend(hashAlgorithm, this->purge()); break; - default: BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); + default: + BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); } } -inline bool -StorageDomainCommand::isEqualTo(const StorageDomainCommand& rhs) const +inline +bool StorageDomainCommand::isEqualTo(const StorageDomainCommand& rhs) const { typedef StorageDomainCommand Class; if (this->selectionId() == rhs.selectionId()) { switch (rhs.selectionId()) { - case Class::SELECTION_ID_QUEUE_STATUS: + case Class::SELECTION_ID_QUEUE_STATUS: return this->queueStatus() == rhs.queueStatus(); - case Class::SELECTION_ID_PURGE: return this->purge() == rhs.purge(); - default: + case Class::SELECTION_ID_PURGE: + return this->purge() == rhs.purge(); + default: BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId()); return true; } @@ -39969,12 +40740,14 @@ StorageDomainCommand::isEqualTo(const StorageDomainCommand& rhs) const } // CREATORS -inline StorageDomainCommand::StorageDomainCommand() +inline +StorageDomainCommand::StorageDomainCommand() : d_selectionId(SELECTION_ID_UNDEFINED) { } -inline StorageDomainCommand::~StorageDomainCommand() +inline +StorageDomainCommand::~StorageDomainCommand() { reset(); } @@ -39984,33 +40757,35 @@ template int StorageDomainCommand::manipulateSelection(t_MANIPULATOR& manipulator) { switch (d_selectionId) { - case StorageDomainCommand::SELECTION_ID_QUEUE_STATUS: + case StorageDomainCommand::SELECTION_ID_QUEUE_STATUS: return manipulator(&d_queueStatus.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE_STATUS]); - case StorageDomainCommand::SELECTION_ID_PURGE: + SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE_STATUS]); + case StorageDomainCommand::SELECTION_ID_PURGE: return manipulator(&d_purge.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_PURGE]); - default: - BSLS_ASSERT(StorageDomainCommand::SELECTION_ID_UNDEFINED == - d_selectionId); + SELECTION_INFO_ARRAY[SELECTION_INDEX_PURGE]); + default: + BSLS_ASSERT(StorageDomainCommand::SELECTION_ID_UNDEFINED == d_selectionId); return -1; } } -inline Void& StorageDomainCommand::queueStatus() +inline +Void& StorageDomainCommand::queueStatus() { BSLS_ASSERT(SELECTION_ID_QUEUE_STATUS == d_selectionId); return d_queueStatus.object(); } -inline Void& StorageDomainCommand::purge() +inline +Void& StorageDomainCommand::purge() { BSLS_ASSERT(SELECTION_ID_PURGE == d_selectionId); return d_purge.object(); } // ACCESSORS -inline int StorageDomainCommand::selectionId() const +inline +int StorageDomainCommand::selectionId() const { return d_selectionId; } @@ -40019,82 +40794,91 @@ template int StorageDomainCommand::accessSelection(t_ACCESSOR& accessor) const { switch (d_selectionId) { - case SELECTION_ID_QUEUE_STATUS: + case SELECTION_ID_QUEUE_STATUS: return accessor(d_queueStatus.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE_STATUS]); - case SELECTION_ID_PURGE: + SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE_STATUS]); + case SELECTION_ID_PURGE: return accessor(d_purge.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_PURGE]); - default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); return -1; + SELECTION_INFO_ARRAY[SELECTION_INDEX_PURGE]); + default: + BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); + return -1; } } -inline const Void& StorageDomainCommand::queueStatus() const +inline +const Void& StorageDomainCommand::queueStatus() const { BSLS_ASSERT(SELECTION_ID_QUEUE_STATUS == d_selectionId); return d_queueStatus.object(); } -inline const Void& StorageDomainCommand::purge() const +inline +const Void& StorageDomainCommand::purge() const { BSLS_ASSERT(SELECTION_ID_PURGE == d_selectionId); return d_purge.object(); } -inline bool StorageDomainCommand::isQueueStatusValue() const +inline +bool StorageDomainCommand::isQueueStatusValue() const { return SELECTION_ID_QUEUE_STATUS == d_selectionId; } -inline bool StorageDomainCommand::isPurgeValue() const +inline +bool StorageDomainCommand::isPurgeValue() const { return SELECTION_ID_PURGE == d_selectionId; } -inline bool StorageDomainCommand::isUndefinedValue() const +inline +bool StorageDomainCommand::isUndefinedValue() const { return SELECTION_ID_UNDEFINED == d_selectionId; } -// ----------------------------- -// class StoragePartitionCommand -// ----------------------------- + + // ----------------------------- + // class StoragePartitionCommand + // ----------------------------- // CLASS METHODS // PRIVATE ACCESSORS template -void StoragePartitionCommand::hashAppendImpl( - t_HASH_ALGORITHM& hashAlgorithm) const +void StoragePartitionCommand::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const { typedef StoragePartitionCommand Class; using bslh::hashAppend; hashAppend(hashAlgorithm, this->selectionId()); switch (this->selectionId()) { - case Class::SELECTION_ID_ENABLE: + case Class::SELECTION_ID_ENABLE: hashAppend(hashAlgorithm, this->enable()); break; - case Class::SELECTION_ID_DISABLE: + case Class::SELECTION_ID_DISABLE: hashAppend(hashAlgorithm, this->disable()); break; - case Class::SELECTION_ID_SUMMARY: + case Class::SELECTION_ID_SUMMARY: hashAppend(hashAlgorithm, this->summary()); break; - default: BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); + default: + BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); } } -inline bool -StoragePartitionCommand::isEqualTo(const StoragePartitionCommand& rhs) const +inline +bool StoragePartitionCommand::isEqualTo(const StoragePartitionCommand& rhs) const { typedef StoragePartitionCommand Class; if (this->selectionId() == rhs.selectionId()) { switch (rhs.selectionId()) { - case Class::SELECTION_ID_ENABLE: return this->enable() == rhs.enable(); - case Class::SELECTION_ID_DISABLE: + case Class::SELECTION_ID_ENABLE: + return this->enable() == rhs.enable(); + case Class::SELECTION_ID_DISABLE: return this->disable() == rhs.disable(); - case Class::SELECTION_ID_SUMMARY: + case Class::SELECTION_ID_SUMMARY: return this->summary() == rhs.summary(); - default: + default: BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId()); return true; } @@ -40105,12 +40889,14 @@ StoragePartitionCommand::isEqualTo(const StoragePartitionCommand& rhs) const } // CREATORS -inline StoragePartitionCommand::StoragePartitionCommand() +inline +StoragePartitionCommand::StoragePartitionCommand() : d_selectionId(SELECTION_ID_UNDEFINED) { } -inline StoragePartitionCommand::~StoragePartitionCommand() +inline +StoragePartitionCommand::~StoragePartitionCommand() { reset(); } @@ -40120,42 +40906,45 @@ template int StoragePartitionCommand::manipulateSelection(t_MANIPULATOR& manipulator) { switch (d_selectionId) { - case StoragePartitionCommand::SELECTION_ID_ENABLE: + case StoragePartitionCommand::SELECTION_ID_ENABLE: return manipulator(&d_enable.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_ENABLE]); - case StoragePartitionCommand::SELECTION_ID_DISABLE: + SELECTION_INFO_ARRAY[SELECTION_INDEX_ENABLE]); + case StoragePartitionCommand::SELECTION_ID_DISABLE: return manipulator(&d_disable.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_DISABLE]); - case StoragePartitionCommand::SELECTION_ID_SUMMARY: + SELECTION_INFO_ARRAY[SELECTION_INDEX_DISABLE]); + case StoragePartitionCommand::SELECTION_ID_SUMMARY: return manipulator(&d_summary.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_SUMMARY]); - default: - BSLS_ASSERT(StoragePartitionCommand::SELECTION_ID_UNDEFINED == - d_selectionId); + SELECTION_INFO_ARRAY[SELECTION_INDEX_SUMMARY]); + default: + BSLS_ASSERT(StoragePartitionCommand::SELECTION_ID_UNDEFINED == d_selectionId); return -1; } } -inline Void& StoragePartitionCommand::enable() +inline +Void& StoragePartitionCommand::enable() { BSLS_ASSERT(SELECTION_ID_ENABLE == d_selectionId); return d_enable.object(); } -inline Void& StoragePartitionCommand::disable() +inline +Void& StoragePartitionCommand::disable() { BSLS_ASSERT(SELECTION_ID_DISABLE == d_selectionId); return d_disable.object(); } -inline Void& StoragePartitionCommand::summary() +inline +Void& StoragePartitionCommand::summary() { BSLS_ASSERT(SELECTION_ID_SUMMARY == d_selectionId); return d_summary.object(); } // ACCESSORS -inline int StoragePartitionCommand::selectionId() const +inline +int StoragePartitionCommand::selectionId() const { return d_selectionId; } @@ -40164,60 +40953,70 @@ template int StoragePartitionCommand::accessSelection(t_ACCESSOR& accessor) const { switch (d_selectionId) { - case SELECTION_ID_ENABLE: + case SELECTION_ID_ENABLE: return accessor(d_enable.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_ENABLE]); - case SELECTION_ID_DISABLE: + SELECTION_INFO_ARRAY[SELECTION_INDEX_ENABLE]); + case SELECTION_ID_DISABLE: return accessor(d_disable.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_DISABLE]); - case SELECTION_ID_SUMMARY: + SELECTION_INFO_ARRAY[SELECTION_INDEX_DISABLE]); + case SELECTION_ID_SUMMARY: return accessor(d_summary.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_SUMMARY]); - default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); return -1; + SELECTION_INFO_ARRAY[SELECTION_INDEX_SUMMARY]); + default: + BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); + return -1; } } -inline const Void& StoragePartitionCommand::enable() const +inline +const Void& StoragePartitionCommand::enable() const { BSLS_ASSERT(SELECTION_ID_ENABLE == d_selectionId); return d_enable.object(); } -inline const Void& StoragePartitionCommand::disable() const +inline +const Void& StoragePartitionCommand::disable() const { BSLS_ASSERT(SELECTION_ID_DISABLE == d_selectionId); return d_disable.object(); } -inline const Void& StoragePartitionCommand::summary() const +inline +const Void& StoragePartitionCommand::summary() const { BSLS_ASSERT(SELECTION_ID_SUMMARY == d_selectionId); return d_summary.object(); } -inline bool StoragePartitionCommand::isEnableValue() const +inline +bool StoragePartitionCommand::isEnableValue() const { return SELECTION_ID_ENABLE == d_selectionId; } -inline bool StoragePartitionCommand::isDisableValue() const +inline +bool StoragePartitionCommand::isDisableValue() const { return SELECTION_ID_DISABLE == d_selectionId; } -inline bool StoragePartitionCommand::isSummaryValue() const +inline +bool StoragePartitionCommand::isSummaryValue() const { return SELECTION_ID_SUMMARY == d_selectionId; } -inline bool StoragePartitionCommand::isUndefinedValue() const +inline +bool StoragePartitionCommand::isUndefinedValue() const { return SELECTION_ID_UNDEFINED == d_selectionId; } -// ------------------ -// class StorageQueue -// ------------------ + + // ------------------ + // class StorageQueue + // ------------------ // CLASS METHODS // MANIPULATORS @@ -40226,14 +41025,12 @@ int StorageQueue::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator(&d_canonicalUri, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CANONICAL_URI]); + ret = manipulator(&d_canonicalUri, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CANONICAL_URI]); if (ret) { return ret; } - ret = manipulator(&d_command, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND]); + ret = manipulator(&d_command, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND]); if (ret) { return ret; } @@ -40247,28 +41044,27 @@ int StorageQueue::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_CANONICAL_URI: { - return manipulator( - &d_canonicalUri, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CANONICAL_URI]); - } - case ATTRIBUTE_ID_COMMAND: { - return manipulator(&d_command, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_CANONICAL_URI: { + return manipulator(&d_canonicalUri, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CANONICAL_URI]); + } + case ATTRIBUTE_ID_COMMAND: { + return manipulator(&d_command, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND]); + } + default: + return NOT_FOUND; } } template -int StorageQueue::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int StorageQueue::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -40276,12 +41072,14 @@ int StorageQueue::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::string& StorageQueue::canonicalUri() +inline +bsl::string& StorageQueue::canonicalUri() { return d_canonicalUri; } -inline StorageQueueCommand& StorageQueue::command() +inline +StorageQueueCommand& StorageQueue::command() { return d_command; } @@ -40292,8 +41090,7 @@ int StorageQueue::accessAttributes(t_ACCESSOR& accessor) const { int ret; - ret = accessor(d_canonicalUri, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CANONICAL_URI]); + ret = accessor(d_canonicalUri, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CANONICAL_URI]); if (ret) { return ret; } @@ -40312,47 +41109,51 @@ int StorageQueue::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_CANONICAL_URI: { - return accessor(d_canonicalUri, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CANONICAL_URI]); - } - case ATTRIBUTE_ID_COMMAND: { - return accessor(d_command, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_CANONICAL_URI: { + return accessor(d_canonicalUri, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CANONICAL_URI]); + } + case ATTRIBUTE_ID_COMMAND: { + return accessor(d_command, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND]); + } + default: + return NOT_FOUND; } } template -int StorageQueue::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int StorageQueue::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::string& StorageQueue::canonicalUri() const +inline +const bsl::string& StorageQueue::canonicalUri() const { return d_canonicalUri; } -inline const StorageQueueCommand& StorageQueue::command() const +inline +const StorageQueueCommand& StorageQueue::command() const { return d_command; } -// ------------------ -// class Subscription -// ------------------ + + + // ------------------ + // class Subscription + // ------------------ // PRIVATE ACCESSORS template @@ -40371,21 +41172,17 @@ int Subscription::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator( - &d_downstreamSubscriptionId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DOWNSTREAM_SUBSCRIPTION_ID]); + ret = manipulator(&d_downstreamSubscriptionId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DOWNSTREAM_SUBSCRIPTION_ID]); if (ret) { return ret; } - ret = manipulator(&d_consumer, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONSUMER]); + ret = manipulator(&d_consumer, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONSUMER]); if (ret) { return ret; } - ret = manipulator(&d_subscriber, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUBSCRIBER]); + ret = manipulator(&d_subscriber, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUBSCRIBER]); if (ret) { return ret; } @@ -40399,32 +41196,30 @@ int Subscription::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_DOWNSTREAM_SUBSCRIPTION_ID: { - return manipulator( - &d_downstreamSubscriptionId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DOWNSTREAM_SUBSCRIPTION_ID]); - } - case ATTRIBUTE_ID_CONSUMER: { - return manipulator(&d_consumer, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONSUMER]); - } - case ATTRIBUTE_ID_SUBSCRIBER: { - return manipulator(&d_subscriber, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUBSCRIBER]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_DOWNSTREAM_SUBSCRIPTION_ID: { + return manipulator(&d_downstreamSubscriptionId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DOWNSTREAM_SUBSCRIPTION_ID]); + } + case ATTRIBUTE_ID_CONSUMER: { + return manipulator(&d_consumer, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONSUMER]); + } + case ATTRIBUTE_ID_SUBSCRIBER: { + return manipulator(&d_subscriber, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUBSCRIBER]); + } + default: + return NOT_FOUND; } } template -int Subscription::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int Subscription::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -40432,17 +41227,20 @@ int Subscription::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline unsigned int& Subscription::downstreamSubscriptionId() +inline +unsigned int& Subscription::downstreamSubscriptionId() { return d_downstreamSubscriptionId; } -inline ConsumerInfo& Subscription::consumer() +inline +ConsumerInfo& Subscription::consumer() { return d_consumer; } -inline Subscriber& Subscription::subscriber() +inline +Subscriber& Subscription::subscriber() { return d_subscriber; } @@ -40453,9 +41251,7 @@ int Subscription::accessAttributes(t_ACCESSOR& accessor) const { int ret; - ret = accessor( - d_downstreamSubscriptionId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DOWNSTREAM_SUBSCRIPTION_ID]); + ret = accessor(d_downstreamSubscriptionId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DOWNSTREAM_SUBSCRIPTION_ID]); if (ret) { return ret; } @@ -40465,8 +41261,7 @@ int Subscription::accessAttributes(t_ACCESSOR& accessor) const return ret; } - ret = accessor(d_subscriber, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUBSCRIBER]); + ret = accessor(d_subscriber, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUBSCRIBER]); if (ret) { return ret; } @@ -40480,57 +41275,60 @@ int Subscription::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_DOWNSTREAM_SUBSCRIPTION_ID: { - return accessor( - d_downstreamSubscriptionId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DOWNSTREAM_SUBSCRIPTION_ID]); - } - case ATTRIBUTE_ID_CONSUMER: { - return accessor(d_consumer, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONSUMER]); - } - case ATTRIBUTE_ID_SUBSCRIBER: { - return accessor(d_subscriber, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUBSCRIBER]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_DOWNSTREAM_SUBSCRIPTION_ID: { + return accessor(d_downstreamSubscriptionId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DOWNSTREAM_SUBSCRIPTION_ID]); + } + case ATTRIBUTE_ID_CONSUMER: { + return accessor(d_consumer, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONSUMER]); + } + case ATTRIBUTE_ID_SUBSCRIBER: { + return accessor(d_subscriber, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUBSCRIBER]); + } + default: + return NOT_FOUND; } } template -int Subscription::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int Subscription::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline unsigned int Subscription::downstreamSubscriptionId() const +inline +unsigned int Subscription::downstreamSubscriptionId() const { return d_downstreamSubscriptionId; } -inline const ConsumerInfo& Subscription::consumer() const +inline +const ConsumerInfo& Subscription::consumer() const { return d_consumer; } -inline const Subscriber& Subscription::subscriber() const +inline +const Subscriber& Subscription::subscriber() const { return d_subscriber; } -// ----------- -// class Value -// ----------- + + + // ----------- + // class Value + // ----------- // CLASS METHODS // PRIVATE ACCESSORS @@ -40541,56 +41339,58 @@ void Value::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const using bslh::hashAppend; hashAppend(hashAlgorithm, this->selectionId()); switch (this->selectionId()) { - case Class::SELECTION_ID_THE_NULL: + case Class::SELECTION_ID_THE_NULL: hashAppend(hashAlgorithm, this->theNull()); break; - case Class::SELECTION_ID_THE_BOOL: + case Class::SELECTION_ID_THE_BOOL: hashAppend(hashAlgorithm, this->theBool()); break; - case Class::SELECTION_ID_THE_INTEGER: + case Class::SELECTION_ID_THE_INTEGER: hashAppend(hashAlgorithm, this->theInteger()); break; - case Class::SELECTION_ID_THE_DOUBLE: + case Class::SELECTION_ID_THE_DOUBLE: hashAppend(hashAlgorithm, this->theDouble()); break; - case Class::SELECTION_ID_THE_DATE: + case Class::SELECTION_ID_THE_DATE: hashAppend(hashAlgorithm, this->theDate()); break; - case Class::SELECTION_ID_THE_TIME: + case Class::SELECTION_ID_THE_TIME: hashAppend(hashAlgorithm, this->theTime()); break; - case Class::SELECTION_ID_THE_DATETIME: + case Class::SELECTION_ID_THE_DATETIME: hashAppend(hashAlgorithm, this->theDatetime()); break; - case Class::SELECTION_ID_THE_STRING: + case Class::SELECTION_ID_THE_STRING: hashAppend(hashAlgorithm, this->theString()); break; - default: BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); + default: + BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); } } -inline bool Value::isEqualTo(const Value& rhs) const +inline +bool Value::isEqualTo(const Value& rhs) const { typedef Value Class; if (this->selectionId() == rhs.selectionId()) { switch (rhs.selectionId()) { - case Class::SELECTION_ID_THE_NULL: + case Class::SELECTION_ID_THE_NULL: return this->theNull() == rhs.theNull(); - case Class::SELECTION_ID_THE_BOOL: + case Class::SELECTION_ID_THE_BOOL: return this->theBool() == rhs.theBool(); - case Class::SELECTION_ID_THE_INTEGER: + case Class::SELECTION_ID_THE_INTEGER: return this->theInteger() == rhs.theInteger(); - case Class::SELECTION_ID_THE_DOUBLE: + case Class::SELECTION_ID_THE_DOUBLE: return this->theDouble() == rhs.theDouble(); - case Class::SELECTION_ID_THE_DATE: + case Class::SELECTION_ID_THE_DATE: return this->theDate() == rhs.theDate(); - case Class::SELECTION_ID_THE_TIME: + case Class::SELECTION_ID_THE_TIME: return this->theTime() == rhs.theTime(); - case Class::SELECTION_ID_THE_DATETIME: + case Class::SELECTION_ID_THE_DATETIME: return this->theDatetime() == rhs.theDatetime(); - case Class::SELECTION_ID_THE_STRING: + case Class::SELECTION_ID_THE_STRING: return this->theString() == rhs.theString(); - default: + default: BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId()); return true; } @@ -40601,13 +41401,15 @@ inline bool Value::isEqualTo(const Value& rhs) const } // CREATORS -inline Value::Value(bslma::Allocator* basicAllocator) +inline +Value::Value(bslma::Allocator *basicAllocator) : d_selectionId(SELECTION_ID_UNDEFINED) , d_allocator_p(bslma::Default::allocator(basicAllocator)) { } -inline Value::~Value() +inline +Value::~Value() { reset(); } @@ -40617,86 +41419,95 @@ template int Value::manipulateSelection(t_MANIPULATOR& manipulator) { switch (d_selectionId) { - case Value::SELECTION_ID_THE_NULL: + case Value::SELECTION_ID_THE_NULL: return manipulator(&d_theNull.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_THE_NULL]); - case Value::SELECTION_ID_THE_BOOL: + SELECTION_INFO_ARRAY[SELECTION_INDEX_THE_NULL]); + case Value::SELECTION_ID_THE_BOOL: return manipulator(&d_theBool.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_THE_BOOL]); - case Value::SELECTION_ID_THE_INTEGER: + SELECTION_INFO_ARRAY[SELECTION_INDEX_THE_BOOL]); + case Value::SELECTION_ID_THE_INTEGER: return manipulator(&d_theInteger.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_THE_INTEGER]); - case Value::SELECTION_ID_THE_DOUBLE: + SELECTION_INFO_ARRAY[SELECTION_INDEX_THE_INTEGER]); + case Value::SELECTION_ID_THE_DOUBLE: return manipulator(&d_theDouble.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_THE_DOUBLE]); - case Value::SELECTION_ID_THE_DATE: + SELECTION_INFO_ARRAY[SELECTION_INDEX_THE_DOUBLE]); + case Value::SELECTION_ID_THE_DATE: return manipulator(&d_theDate.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_THE_DATE]); - case Value::SELECTION_ID_THE_TIME: + SELECTION_INFO_ARRAY[SELECTION_INDEX_THE_DATE]); + case Value::SELECTION_ID_THE_TIME: return manipulator(&d_theTime.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_THE_TIME]); - case Value::SELECTION_ID_THE_DATETIME: + SELECTION_INFO_ARRAY[SELECTION_INDEX_THE_TIME]); + case Value::SELECTION_ID_THE_DATETIME: return manipulator(&d_theDatetime.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_THE_DATETIME]); - case Value::SELECTION_ID_THE_STRING: + SELECTION_INFO_ARRAY[SELECTION_INDEX_THE_DATETIME]); + case Value::SELECTION_ID_THE_STRING: return manipulator(&d_theString.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_THE_STRING]); - default: + SELECTION_INFO_ARRAY[SELECTION_INDEX_THE_STRING]); + default: BSLS_ASSERT(Value::SELECTION_ID_UNDEFINED == d_selectionId); return -1; } } -inline Void& Value::theNull() +inline +Void& Value::theNull() { BSLS_ASSERT(SELECTION_ID_THE_NULL == d_selectionId); return d_theNull.object(); } -inline bool& Value::theBool() +inline +bool& Value::theBool() { BSLS_ASSERT(SELECTION_ID_THE_BOOL == d_selectionId); return d_theBool.object(); } -inline bsls::Types::Int64& Value::theInteger() +inline +bsls::Types::Int64& Value::theInteger() { BSLS_ASSERT(SELECTION_ID_THE_INTEGER == d_selectionId); return d_theInteger.object(); } -inline double& Value::theDouble() +inline +double& Value::theDouble() { BSLS_ASSERT(SELECTION_ID_THE_DOUBLE == d_selectionId); return d_theDouble.object(); } -inline bdlt::DateTz& Value::theDate() +inline +bdlt::DateTz& Value::theDate() { BSLS_ASSERT(SELECTION_ID_THE_DATE == d_selectionId); return d_theDate.object(); } -inline bdlt::TimeTz& Value::theTime() +inline +bdlt::TimeTz& Value::theTime() { BSLS_ASSERT(SELECTION_ID_THE_TIME == d_selectionId); return d_theTime.object(); } -inline bdlt::DatetimeTz& Value::theDatetime() +inline +bdlt::DatetimeTz& Value::theDatetime() { BSLS_ASSERT(SELECTION_ID_THE_DATETIME == d_selectionId); return d_theDatetime.object(); } -inline bsl::string& Value::theString() +inline +bsl::string& Value::theString() { BSLS_ASSERT(SELECTION_ID_THE_STRING == d_selectionId); return d_theString.object(); } // ACCESSORS -inline int Value::selectionId() const +inline +int Value::selectionId() const { return d_selectionId; } @@ -40705,130 +41516,150 @@ template int Value::accessSelection(t_ACCESSOR& accessor) const { switch (d_selectionId) { - case SELECTION_ID_THE_NULL: + case SELECTION_ID_THE_NULL: return accessor(d_theNull.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_THE_NULL]); - case SELECTION_ID_THE_BOOL: + SELECTION_INFO_ARRAY[SELECTION_INDEX_THE_NULL]); + case SELECTION_ID_THE_BOOL: return accessor(d_theBool.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_THE_BOOL]); - case SELECTION_ID_THE_INTEGER: + SELECTION_INFO_ARRAY[SELECTION_INDEX_THE_BOOL]); + case SELECTION_ID_THE_INTEGER: return accessor(d_theInteger.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_THE_INTEGER]); - case SELECTION_ID_THE_DOUBLE: + SELECTION_INFO_ARRAY[SELECTION_INDEX_THE_INTEGER]); + case SELECTION_ID_THE_DOUBLE: return accessor(d_theDouble.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_THE_DOUBLE]); - case SELECTION_ID_THE_DATE: + SELECTION_INFO_ARRAY[SELECTION_INDEX_THE_DOUBLE]); + case SELECTION_ID_THE_DATE: return accessor(d_theDate.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_THE_DATE]); - case SELECTION_ID_THE_TIME: + SELECTION_INFO_ARRAY[SELECTION_INDEX_THE_DATE]); + case SELECTION_ID_THE_TIME: return accessor(d_theTime.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_THE_TIME]); - case SELECTION_ID_THE_DATETIME: + SELECTION_INFO_ARRAY[SELECTION_INDEX_THE_TIME]); + case SELECTION_ID_THE_DATETIME: return accessor(d_theDatetime.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_THE_DATETIME]); - case SELECTION_ID_THE_STRING: + SELECTION_INFO_ARRAY[SELECTION_INDEX_THE_DATETIME]); + case SELECTION_ID_THE_STRING: return accessor(d_theString.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_THE_STRING]); - default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); return -1; + SELECTION_INFO_ARRAY[SELECTION_INDEX_THE_STRING]); + default: + BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); + return -1; } } -inline const Void& Value::theNull() const +inline +const Void& Value::theNull() const { BSLS_ASSERT(SELECTION_ID_THE_NULL == d_selectionId); return d_theNull.object(); } -inline const bool& Value::theBool() const +inline +const bool& Value::theBool() const { BSLS_ASSERT(SELECTION_ID_THE_BOOL == d_selectionId); return d_theBool.object(); } -inline const bsls::Types::Int64& Value::theInteger() const +inline +const bsls::Types::Int64& Value::theInteger() const { BSLS_ASSERT(SELECTION_ID_THE_INTEGER == d_selectionId); return d_theInteger.object(); } -inline const double& Value::theDouble() const +inline +const double& Value::theDouble() const { BSLS_ASSERT(SELECTION_ID_THE_DOUBLE == d_selectionId); return d_theDouble.object(); } -inline const bdlt::DateTz& Value::theDate() const +inline +const bdlt::DateTz& Value::theDate() const { BSLS_ASSERT(SELECTION_ID_THE_DATE == d_selectionId); return d_theDate.object(); } -inline const bdlt::TimeTz& Value::theTime() const +inline +const bdlt::TimeTz& Value::theTime() const { BSLS_ASSERT(SELECTION_ID_THE_TIME == d_selectionId); return d_theTime.object(); } -inline const bdlt::DatetimeTz& Value::theDatetime() const +inline +const bdlt::DatetimeTz& Value::theDatetime() const { BSLS_ASSERT(SELECTION_ID_THE_DATETIME == d_selectionId); return d_theDatetime.object(); } -inline const bsl::string& Value::theString() const +inline +const bsl::string& Value::theString() const { BSLS_ASSERT(SELECTION_ID_THE_STRING == d_selectionId); return d_theString.object(); } -inline bool Value::isTheNullValue() const +inline +bool Value::isTheNullValue() const { return SELECTION_ID_THE_NULL == d_selectionId; } -inline bool Value::isTheBoolValue() const +inline +bool Value::isTheBoolValue() const { return SELECTION_ID_THE_BOOL == d_selectionId; } -inline bool Value::isTheIntegerValue() const +inline +bool Value::isTheIntegerValue() const { return SELECTION_ID_THE_INTEGER == d_selectionId; } -inline bool Value::isTheDoubleValue() const +inline +bool Value::isTheDoubleValue() const { return SELECTION_ID_THE_DOUBLE == d_selectionId; } -inline bool Value::isTheDateValue() const +inline +bool Value::isTheDateValue() const { return SELECTION_ID_THE_DATE == d_selectionId; } -inline bool Value::isTheTimeValue() const +inline +bool Value::isTheTimeValue() const { return SELECTION_ID_THE_TIME == d_selectionId; } -inline bool Value::isTheDatetimeValue() const +inline +bool Value::isTheDatetimeValue() const { return SELECTION_ID_THE_DATETIME == d_selectionId; } -inline bool Value::isTheStringValue() const +inline +bool Value::isTheStringValue() const { return SELECTION_ID_THE_STRING == d_selectionId; } -inline bool Value::isUndefinedValue() const +inline +bool Value::isUndefinedValue() const { return SELECTION_ID_UNDEFINED == d_selectionId; } -// ----------------- -// class ClusterList -// ----------------- + + // ----------------- + // class ClusterList + // ----------------- // CLASS METHODS // MANIPULATORS @@ -40837,8 +41668,7 @@ int ClusterList::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator(&d_clusters, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTERS]); + ret = manipulator(&d_clusters, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTERS]); if (ret) { return ret; } @@ -40852,23 +41682,24 @@ int ClusterList::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_CLUSTERS: { - return manipulator(&d_clusters, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTERS]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_CLUSTERS: { + return manipulator(&d_clusters, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTERS]); + } + default: + return NOT_FOUND; } } template -int ClusterList::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int ClusterList::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -40876,7 +41707,8 @@ int ClusterList::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::vector& ClusterList::clusters() +inline +bsl::vector& ClusterList::clusters() { return d_clusters; } @@ -40901,38 +41733,42 @@ int ClusterList::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_CLUSTERS: { - return accessor(d_clusters, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTERS]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_CLUSTERS: { + return accessor(d_clusters, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTERS]); + } + default: + return NOT_FOUND; } } template -int ClusterList::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int ClusterList::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::vector& ClusterList::clusters() const +inline +const bsl::vector& ClusterList::clusters() const { return d_clusters; } -// ------------------------ -// class ClusterQueueHelper -// ------------------------ + + + // ------------------------ + // class ClusterQueueHelper + // ------------------------ // PRIVATE ACCESSORS template @@ -40948,15 +41784,16 @@ void ClusterQueueHelper::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const hashAppend(hashAlgorithm, this->queues()); } -inline bool ClusterQueueHelper::isEqualTo(const ClusterQueueHelper& rhs) const +inline +bool ClusterQueueHelper::isEqualTo(const ClusterQueueHelper& rhs) const { return this->clusterName() == rhs.clusterName() && this->locality() == rhs.locality() && this->numQueues() == rhs.numQueues() && this->numQueueKeys() == rhs.numQueueKeys() && - this->numPendingReopenQueueRequests() == - rhs.numPendingReopenQueueRequests() && - this->domains() == rhs.domains() && this->queues() == rhs.queues(); + this->numPendingReopenQueueRequests() == rhs.numPendingReopenQueueRequests() && + this->domains() == rhs.domains() && + this->queues() == rhs.queues(); } // CLASS METHODS @@ -40966,39 +41803,32 @@ int ClusterQueueHelper::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator(&d_clusterName, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTER_NAME]); + ret = manipulator(&d_clusterName, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTER_NAME]); if (ret) { return ret; } - ret = manipulator(&d_locality, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LOCALITY]); + ret = manipulator(&d_locality, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LOCALITY]); if (ret) { return ret; } - ret = manipulator(&d_numQueues, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_QUEUES]); + ret = manipulator(&d_numQueues, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_QUEUES]); if (ret) { return ret; } - ret = manipulator(&d_numQueueKeys, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_QUEUE_KEYS]); + ret = manipulator(&d_numQueueKeys, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_QUEUE_KEYS]); if (ret) { return ret; } - ret = manipulator(&d_numPendingReopenQueueRequests, - ATTRIBUTE_INFO_ARRAY - [ATTRIBUTE_INDEX_NUM_PENDING_REOPEN_QUEUE_REQUESTS]); + ret = manipulator(&d_numPendingReopenQueueRequests, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_PENDING_REOPEN_QUEUE_REQUESTS]); if (ret) { return ret; } - ret = manipulator(&d_domains, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DOMAINS]); + ret = manipulator(&d_domains, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DOMAINS]); if (ret) { return ret; } @@ -41017,50 +41847,42 @@ int ClusterQueueHelper::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_CLUSTER_NAME: { - return manipulator(&d_clusterName, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTER_NAME]); - } - case ATTRIBUTE_ID_LOCALITY: { - return manipulator(&d_locality, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LOCALITY]); - } - case ATTRIBUTE_ID_NUM_QUEUES: { - return manipulator(&d_numQueues, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_QUEUES]); - } - case ATTRIBUTE_ID_NUM_QUEUE_KEYS: { - return manipulator( - &d_numQueueKeys, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_QUEUE_KEYS]); - } - case ATTRIBUTE_ID_NUM_PENDING_REOPEN_QUEUE_REQUESTS: { - return manipulator( - &d_numPendingReopenQueueRequests, - ATTRIBUTE_INFO_ARRAY - [ATTRIBUTE_INDEX_NUM_PENDING_REOPEN_QUEUE_REQUESTS]); - } - case ATTRIBUTE_ID_DOMAINS: { - return manipulator(&d_domains, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DOMAINS]); - } - case ATTRIBUTE_ID_QUEUES: { - return manipulator(&d_queues, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUES]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_CLUSTER_NAME: { + return manipulator(&d_clusterName, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTER_NAME]); + } + case ATTRIBUTE_ID_LOCALITY: { + return manipulator(&d_locality, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LOCALITY]); + } + case ATTRIBUTE_ID_NUM_QUEUES: { + return manipulator(&d_numQueues, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_QUEUES]); + } + case ATTRIBUTE_ID_NUM_QUEUE_KEYS: { + return manipulator(&d_numQueueKeys, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_QUEUE_KEYS]); + } + case ATTRIBUTE_ID_NUM_PENDING_REOPEN_QUEUE_REQUESTS: { + return manipulator(&d_numPendingReopenQueueRequests, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_PENDING_REOPEN_QUEUE_REQUESTS]); + } + case ATTRIBUTE_ID_DOMAINS: { + return manipulator(&d_domains, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DOMAINS]); + } + case ATTRIBUTE_ID_QUEUES: { + return manipulator(&d_queues, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUES]); + } + default: + return NOT_FOUND; } } template -int ClusterQueueHelper::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int ClusterQueueHelper::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -41068,37 +41890,44 @@ int ClusterQueueHelper::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::string& ClusterQueueHelper::clusterName() +inline +bsl::string& ClusterQueueHelper::clusterName() { return d_clusterName; } -inline Locality::Value& ClusterQueueHelper::locality() +inline +Locality::Value& ClusterQueueHelper::locality() { return d_locality; } -inline unsigned int& ClusterQueueHelper::numQueues() +inline +unsigned int& ClusterQueueHelper::numQueues() { return d_numQueues; } -inline unsigned int& ClusterQueueHelper::numQueueKeys() +inline +unsigned int& ClusterQueueHelper::numQueueKeys() { return d_numQueueKeys; } -inline unsigned int& ClusterQueueHelper::numPendingReopenQueueRequests() +inline +unsigned int& ClusterQueueHelper::numPendingReopenQueueRequests() { return d_numPendingReopenQueueRequests; } -inline bsl::vector& ClusterQueueHelper::domains() +inline +bsl::vector& ClusterQueueHelper::domains() { return d_domains; } -inline bsl::vector& ClusterQueueHelper::queues() +inline +bsl::vector& ClusterQueueHelper::queues() { return d_queues; } @@ -41109,8 +41938,7 @@ int ClusterQueueHelper::accessAttributes(t_ACCESSOR& accessor) const { int ret; - ret = accessor(d_clusterName, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTER_NAME]); + ret = accessor(d_clusterName, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTER_NAME]); if (ret) { return ret; } @@ -41120,21 +41948,17 @@ int ClusterQueueHelper::accessAttributes(t_ACCESSOR& accessor) const return ret; } - ret = accessor(d_numQueues, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_QUEUES]); + ret = accessor(d_numQueues, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_QUEUES]); if (ret) { return ret; } - ret = accessor(d_numQueueKeys, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_QUEUE_KEYS]); + ret = accessor(d_numQueueKeys, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_QUEUE_KEYS]); if (ret) { return ret; } - ret = accessor(d_numPendingReopenQueueRequests, - ATTRIBUTE_INFO_ARRAY - [ATTRIBUTE_INDEX_NUM_PENDING_REOPEN_QUEUE_REQUESTS]); + ret = accessor(d_numPendingReopenQueueRequests, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_PENDING_REOPEN_QUEUE_REQUESTS]); if (ret) { return ret; } @@ -41158,121 +41982,123 @@ int ClusterQueueHelper::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_CLUSTER_NAME: { - return accessor(d_clusterName, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTER_NAME]); - } - case ATTRIBUTE_ID_LOCALITY: { - return accessor(d_locality, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LOCALITY]); - } - case ATTRIBUTE_ID_NUM_QUEUES: { - return accessor(d_numQueues, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_QUEUES]); - } - case ATTRIBUTE_ID_NUM_QUEUE_KEYS: { - return accessor(d_numQueueKeys, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_QUEUE_KEYS]); - } - case ATTRIBUTE_ID_NUM_PENDING_REOPEN_QUEUE_REQUESTS: { - return accessor( - d_numPendingReopenQueueRequests, - ATTRIBUTE_INFO_ARRAY - [ATTRIBUTE_INDEX_NUM_PENDING_REOPEN_QUEUE_REQUESTS]); - } - case ATTRIBUTE_ID_DOMAINS: { - return accessor(d_domains, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DOMAINS]); - } - case ATTRIBUTE_ID_QUEUES: { - return accessor(d_queues, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUES]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_CLUSTER_NAME: { + return accessor(d_clusterName, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTER_NAME]); + } + case ATTRIBUTE_ID_LOCALITY: { + return accessor(d_locality, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LOCALITY]); + } + case ATTRIBUTE_ID_NUM_QUEUES: { + return accessor(d_numQueues, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_QUEUES]); + } + case ATTRIBUTE_ID_NUM_QUEUE_KEYS: { + return accessor(d_numQueueKeys, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_QUEUE_KEYS]); + } + case ATTRIBUTE_ID_NUM_PENDING_REOPEN_QUEUE_REQUESTS: { + return accessor(d_numPendingReopenQueueRequests, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_PENDING_REOPEN_QUEUE_REQUESTS]); + } + case ATTRIBUTE_ID_DOMAINS: { + return accessor(d_domains, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DOMAINS]); + } + case ATTRIBUTE_ID_QUEUES: { + return accessor(d_queues, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUES]); + } + default: + return NOT_FOUND; } } template -int ClusterQueueHelper::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int ClusterQueueHelper::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::string& ClusterQueueHelper::clusterName() const +inline +const bsl::string& ClusterQueueHelper::clusterName() const { return d_clusterName; } -inline Locality::Value ClusterQueueHelper::locality() const +inline +Locality::Value ClusterQueueHelper::locality() const { return d_locality; } -inline unsigned int ClusterQueueHelper::numQueues() const +inline +unsigned int ClusterQueueHelper::numQueues() const { return d_numQueues; } -inline unsigned int ClusterQueueHelper::numQueueKeys() const +inline +unsigned int ClusterQueueHelper::numQueueKeys() const { return d_numQueueKeys; } -inline unsigned int ClusterQueueHelper::numPendingReopenQueueRequests() const +inline +unsigned int ClusterQueueHelper::numPendingReopenQueueRequests() const { return d_numPendingReopenQueueRequests; } -inline const bsl::vector& ClusterQueueHelper::domains() const +inline +const bsl::vector& ClusterQueueHelper::domains() const { return d_domains; } -inline const bsl::vector& ClusterQueueHelper::queues() const +inline +const bsl::vector& ClusterQueueHelper::queues() const { return d_queues; } -// --------------------------- -// class ConfigProviderCommand -// --------------------------- + + + // --------------------------- + // class ConfigProviderCommand + // --------------------------- // CLASS METHODS // PRIVATE ACCESSORS template -void ConfigProviderCommand::hashAppendImpl( - t_HASH_ALGORITHM& hashAlgorithm) const +void ConfigProviderCommand::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const { typedef ConfigProviderCommand Class; using bslh::hashAppend; hashAppend(hashAlgorithm, this->selectionId()); switch (this->selectionId()) { - case Class::SELECTION_ID_CLEAR_CACHE: + case Class::SELECTION_ID_CLEAR_CACHE: hashAppend(hashAlgorithm, this->clearCache()); break; - default: BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); + default: + BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); } } -inline bool -ConfigProviderCommand::isEqualTo(const ConfigProviderCommand& rhs) const +inline +bool ConfigProviderCommand::isEqualTo(const ConfigProviderCommand& rhs) const { typedef ConfigProviderCommand Class; if (this->selectionId() == rhs.selectionId()) { switch (rhs.selectionId()) { - case Class::SELECTION_ID_CLEAR_CACHE: + case Class::SELECTION_ID_CLEAR_CACHE: return this->clearCache() == rhs.clearCache(); - default: + default: BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId()); return true; } @@ -41283,14 +42109,15 @@ ConfigProviderCommand::isEqualTo(const ConfigProviderCommand& rhs) const } // CREATORS -inline ConfigProviderCommand::ConfigProviderCommand( - bslma::Allocator* basicAllocator) +inline +ConfigProviderCommand::ConfigProviderCommand(bslma::Allocator *basicAllocator) : d_selectionId(SELECTION_ID_UNDEFINED) , d_allocator_p(bslma::Default::allocator(basicAllocator)) { } -inline ConfigProviderCommand::~ConfigProviderCommand() +inline +ConfigProviderCommand::~ConfigProviderCommand() { reset(); } @@ -41300,24 +42127,25 @@ template int ConfigProviderCommand::manipulateSelection(t_MANIPULATOR& manipulator) { switch (d_selectionId) { - case ConfigProviderCommand::SELECTION_ID_CLEAR_CACHE: + case ConfigProviderCommand::SELECTION_ID_CLEAR_CACHE: return manipulator(&d_clearCache.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_CLEAR_CACHE]); - default: - BSLS_ASSERT(ConfigProviderCommand::SELECTION_ID_UNDEFINED == - d_selectionId); + SELECTION_INFO_ARRAY[SELECTION_INDEX_CLEAR_CACHE]); + default: + BSLS_ASSERT(ConfigProviderCommand::SELECTION_ID_UNDEFINED == d_selectionId); return -1; } } -inline ClearCache& ConfigProviderCommand::clearCache() +inline +ClearCache& ConfigProviderCommand::clearCache() { BSLS_ASSERT(SELECTION_ID_CLEAR_CACHE == d_selectionId); return d_clearCache.object(); } // ACCESSORS -inline int ConfigProviderCommand::selectionId() const +inline +int ConfigProviderCommand::selectionId() const { return d_selectionId; } @@ -41326,32 +42154,38 @@ template int ConfigProviderCommand::accessSelection(t_ACCESSOR& accessor) const { switch (d_selectionId) { - case SELECTION_ID_CLEAR_CACHE: + case SELECTION_ID_CLEAR_CACHE: return accessor(d_clearCache.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_CLEAR_CACHE]); - default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); return -1; + SELECTION_INFO_ARRAY[SELECTION_INDEX_CLEAR_CACHE]); + default: + BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); + return -1; } } -inline const ClearCache& ConfigProviderCommand::clearCache() const +inline +const ClearCache& ConfigProviderCommand::clearCache() const { BSLS_ASSERT(SELECTION_ID_CLEAR_CACHE == d_selectionId); return d_clearCache.object(); } -inline bool ConfigProviderCommand::isClearCacheValue() const +inline +bool ConfigProviderCommand::isClearCacheValue() const { return SELECTION_ID_CLEAR_CACHE == d_selectionId; } -inline bool ConfigProviderCommand::isUndefinedValue() const +inline +bool ConfigProviderCommand::isUndefinedValue() const { return SELECTION_ID_UNDEFINED == d_selectionId; } -// ---------------- -// class DomainInfo -// ---------------- + + // ---------------- + // class DomainInfo + // ---------------- // PRIVATE ACCESSORS template @@ -41366,7 +42200,8 @@ void DomainInfo::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const hashAppend(hashAlgorithm, this->storageContent()); } -inline bool DomainInfo::isEqualTo(const DomainInfo& rhs) const +inline +bool DomainInfo::isEqualTo(const DomainInfo& rhs) const { return this->name() == rhs.name() && this->configJson() == rhs.configJson() && @@ -41388,33 +42223,28 @@ int DomainInfo::manipulateAttributes(t_MANIPULATOR& manipulator) return ret; } - ret = manipulator(&d_configJson, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONFIG_JSON]); + ret = manipulator(&d_configJson, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONFIG_JSON]); if (ret) { return ret; } - ret = manipulator(&d_clusterName, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTER_NAME]); + ret = manipulator(&d_clusterName, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTER_NAME]); if (ret) { return ret; } BSLS_ASSERT(d_capacityMeter); - ret = manipulator(d_capacityMeter, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CAPACITY_METER]); + ret = manipulator(d_capacityMeter, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CAPACITY_METER]); if (ret) { return ret; } - ret = manipulator(&d_queueUris, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_URIS]); + ret = manipulator(&d_queueUris, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_URIS]); if (ret) { return ret; } - ret = manipulator(&d_storageContent, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STORAGE_CONTENT]); + ret = manipulator(&d_storageContent, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STORAGE_CONTENT]); if (ret) { return ret; } @@ -41426,48 +42256,42 @@ template int DomainInfo::manipulateAttribute(t_MANIPULATOR& manipulator, int id) { enum { NOT_FOUND = -1 }; - - switch (id) { - case ATTRIBUTE_ID_NAME: { - return manipulator(&d_name, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]); - } - case ATTRIBUTE_ID_CONFIG_JSON: { - return manipulator(&d_configJson, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONFIG_JSON]); - } - case ATTRIBUTE_ID_CLUSTER_NAME: { - return manipulator(&d_clusterName, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTER_NAME]); - } - case ATTRIBUTE_ID_CAPACITY_METER: { + + switch (id) { + case ATTRIBUTE_ID_NAME: { + return manipulator(&d_name, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]); + } + case ATTRIBUTE_ID_CONFIG_JSON: { + return manipulator(&d_configJson, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONFIG_JSON]); + } + case ATTRIBUTE_ID_CLUSTER_NAME: { + return manipulator(&d_clusterName, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTER_NAME]); + } + case ATTRIBUTE_ID_CAPACITY_METER: { BSLS_ASSERT(d_capacityMeter); - return manipulator( - d_capacityMeter, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CAPACITY_METER]); - } - case ATTRIBUTE_ID_QUEUE_URIS: { - return manipulator(&d_queueUris, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_URIS]); - } - case ATTRIBUTE_ID_STORAGE_CONTENT: { - return manipulator( - &d_storageContent, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STORAGE_CONTENT]); - } - default: return NOT_FOUND; + return manipulator(d_capacityMeter, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CAPACITY_METER]); + } + case ATTRIBUTE_ID_QUEUE_URIS: { + return manipulator(&d_queueUris, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_URIS]); + } + case ATTRIBUTE_ID_STORAGE_CONTENT: { + return manipulator(&d_storageContent, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STORAGE_CONTENT]); + } + default: + return NOT_FOUND; } } template -int DomainInfo::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int DomainInfo::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -41475,33 +42299,39 @@ int DomainInfo::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::string& DomainInfo::name() +inline +bsl::string& DomainInfo::name() { return d_name; } -inline bsl::string& DomainInfo::configJson() +inline +bsl::string& DomainInfo::configJson() { return d_configJson; } -inline bsl::string& DomainInfo::clusterName() +inline +bsl::string& DomainInfo::clusterName() { return d_clusterName; } -inline CapacityMeter& DomainInfo::capacityMeter() +inline +CapacityMeter& DomainInfo::capacityMeter() { BSLS_ASSERT(d_capacityMeter); return *d_capacityMeter; } -inline bsl::vector& DomainInfo::queueUris() +inline +bsl::vector& DomainInfo::queueUris() { return d_queueUris; } -inline StorageContent& DomainInfo::storageContent() +inline +StorageContent& DomainInfo::storageContent() { return d_storageContent; } @@ -41517,33 +42347,28 @@ int DomainInfo::accessAttributes(t_ACCESSOR& accessor) const return ret; } - ret = accessor(d_configJson, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONFIG_JSON]); + ret = accessor(d_configJson, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONFIG_JSON]); if (ret) { return ret; } - ret = accessor(d_clusterName, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTER_NAME]); + ret = accessor(d_clusterName, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTER_NAME]); if (ret) { return ret; } BSLS_ASSERT(d_capacityMeter); - ret = accessor(*d_capacityMeter, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CAPACITY_METER]); + ret = accessor(*d_capacityMeter, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CAPACITY_METER]); if (ret) { return ret; } - ret = accessor(d_queueUris, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_URIS]); + ret = accessor(d_queueUris, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_URIS]); if (ret) { return ret; } - ret = accessor(d_storageContent, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STORAGE_CONTENT]); + ret = accessor(d_storageContent, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STORAGE_CONTENT]); if (ret) { return ret; } @@ -41557,84 +42382,89 @@ int DomainInfo::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_NAME: { + case ATTRIBUTE_ID_NAME: { return accessor(d_name, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]); - } - case ATTRIBUTE_ID_CONFIG_JSON: { - return accessor(d_configJson, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONFIG_JSON]); - } - case ATTRIBUTE_ID_CLUSTER_NAME: { - return accessor(d_clusterName, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTER_NAME]); - } - case ATTRIBUTE_ID_CAPACITY_METER: { + } + case ATTRIBUTE_ID_CONFIG_JSON: { + return accessor(d_configJson, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONFIG_JSON]); + } + case ATTRIBUTE_ID_CLUSTER_NAME: { + return accessor(d_clusterName, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTER_NAME]); + } + case ATTRIBUTE_ID_CAPACITY_METER: { BSLS_ASSERT(d_capacityMeter); - return accessor(*d_capacityMeter, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CAPACITY_METER]); - } - case ATTRIBUTE_ID_QUEUE_URIS: { - return accessor(d_queueUris, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_URIS]); - } - case ATTRIBUTE_ID_STORAGE_CONTENT: { - return accessor(d_storageContent, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STORAGE_CONTENT]); - } - default: return NOT_FOUND; + return accessor(*d_capacityMeter, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CAPACITY_METER]); + } + case ATTRIBUTE_ID_QUEUE_URIS: { + return accessor(d_queueUris, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_URIS]); + } + case ATTRIBUTE_ID_STORAGE_CONTENT: { + return accessor(d_storageContent, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STORAGE_CONTENT]); + } + default: + return NOT_FOUND; } } template -int DomainInfo::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int DomainInfo::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::string& DomainInfo::name() const +inline +const bsl::string& DomainInfo::name() const { return d_name; } -inline const bsl::string& DomainInfo::configJson() const +inline +const bsl::string& DomainInfo::configJson() const { return d_configJson; } -inline const bsl::string& DomainInfo::clusterName() const +inline +const bsl::string& DomainInfo::clusterName() const { return d_clusterName; } -inline const CapacityMeter& DomainInfo::capacityMeter() const +inline +const CapacityMeter& DomainInfo::capacityMeter() const { BSLS_ASSERT(d_capacityMeter); return *d_capacityMeter; } -inline const bsl::vector& DomainInfo::queueUris() const +inline +const bsl::vector& DomainInfo::queueUris() const { return d_queueUris; } -inline const StorageContent& DomainInfo::storageContent() const +inline +const StorageContent& DomainInfo::storageContent() const { return d_storageContent; } -// ----------------- -// class DomainQueue -// ----------------- + + + // ----------------- + // class DomainQueue + // ----------------- // CLASS METHODS // MANIPULATORS @@ -41648,8 +42478,7 @@ int DomainQueue::manipulateAttributes(t_MANIPULATOR& manipulator) return ret; } - ret = manipulator(&d_command, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND]); + ret = manipulator(&d_command, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND]); if (ret) { return ret; } @@ -41663,27 +42492,27 @@ int DomainQueue::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_NAME: { - return manipulator(&d_name, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]); - } - case ATTRIBUTE_ID_COMMAND: { - return manipulator(&d_command, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_NAME: { + return manipulator(&d_name, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]); + } + case ATTRIBUTE_ID_COMMAND: { + return manipulator(&d_command, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND]); + } + default: + return NOT_FOUND; } } template -int DomainQueue::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int DomainQueue::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -41691,12 +42520,14 @@ int DomainQueue::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::string& DomainQueue::name() +inline +bsl::string& DomainQueue::name() { return d_name; } -inline QueueCommand& DomainQueue::command() +inline +QueueCommand& DomainQueue::command() { return d_command; } @@ -41726,73 +42557,78 @@ int DomainQueue::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_NAME: { + case ATTRIBUTE_ID_NAME: { return accessor(d_name, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]); - } - case ATTRIBUTE_ID_COMMAND: { - return accessor(d_command, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND]); - } - default: return NOT_FOUND; + } + case ATTRIBUTE_ID_COMMAND: { + return accessor(d_command, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND]); + } + default: + return NOT_FOUND; } } template -int DomainQueue::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int DomainQueue::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::string& DomainQueue::name() const +inline +const bsl::string& DomainQueue::name() const { return d_name; } -inline const QueueCommand& DomainQueue::command() const +inline +const QueueCommand& DomainQueue::command() const { return d_command; } -// --------------------------- -// class DomainResolverCommand -// --------------------------- + + + // --------------------------- + // class DomainResolverCommand + // --------------------------- // CLASS METHODS // PRIVATE ACCESSORS template -void DomainResolverCommand::hashAppendImpl( - t_HASH_ALGORITHM& hashAlgorithm) const +void DomainResolverCommand::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const { typedef DomainResolverCommand Class; using bslh::hashAppend; hashAppend(hashAlgorithm, this->selectionId()); switch (this->selectionId()) { - case Class::SELECTION_ID_CLEAR_CACHE: + case Class::SELECTION_ID_CLEAR_CACHE: hashAppend(hashAlgorithm, this->clearCache()); break; - default: BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); + default: + BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); } } -inline bool -DomainResolverCommand::isEqualTo(const DomainResolverCommand& rhs) const +inline +bool DomainResolverCommand::isEqualTo(const DomainResolverCommand& rhs) const { typedef DomainResolverCommand Class; if (this->selectionId() == rhs.selectionId()) { switch (rhs.selectionId()) { - case Class::SELECTION_ID_CLEAR_CACHE: + case Class::SELECTION_ID_CLEAR_CACHE: return this->clearCache() == rhs.clearCache(); - default: + default: BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId()); return true; } @@ -41803,14 +42639,15 @@ DomainResolverCommand::isEqualTo(const DomainResolverCommand& rhs) const } // CREATORS -inline DomainResolverCommand::DomainResolverCommand( - bslma::Allocator* basicAllocator) +inline +DomainResolverCommand::DomainResolverCommand(bslma::Allocator *basicAllocator) : d_selectionId(SELECTION_ID_UNDEFINED) , d_allocator_p(bslma::Default::allocator(basicAllocator)) { } -inline DomainResolverCommand::~DomainResolverCommand() +inline +DomainResolverCommand::~DomainResolverCommand() { reset(); } @@ -41820,24 +42657,25 @@ template int DomainResolverCommand::manipulateSelection(t_MANIPULATOR& manipulator) { switch (d_selectionId) { - case DomainResolverCommand::SELECTION_ID_CLEAR_CACHE: + case DomainResolverCommand::SELECTION_ID_CLEAR_CACHE: return manipulator(&d_clearCache.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_CLEAR_CACHE]); - default: - BSLS_ASSERT(DomainResolverCommand::SELECTION_ID_UNDEFINED == - d_selectionId); + SELECTION_INFO_ARRAY[SELECTION_INDEX_CLEAR_CACHE]); + default: + BSLS_ASSERT(DomainResolverCommand::SELECTION_ID_UNDEFINED == d_selectionId); return -1; } } -inline ClearCache& DomainResolverCommand::clearCache() +inline +ClearCache& DomainResolverCommand::clearCache() { BSLS_ASSERT(SELECTION_ID_CLEAR_CACHE == d_selectionId); return d_clearCache.object(); } // ACCESSORS -inline int DomainResolverCommand::selectionId() const +inline +int DomainResolverCommand::selectionId() const { return d_selectionId; } @@ -41846,32 +42684,38 @@ template int DomainResolverCommand::accessSelection(t_ACCESSOR& accessor) const { switch (d_selectionId) { - case SELECTION_ID_CLEAR_CACHE: + case SELECTION_ID_CLEAR_CACHE: return accessor(d_clearCache.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_CLEAR_CACHE]); - default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); return -1; + SELECTION_INFO_ARRAY[SELECTION_INDEX_CLEAR_CACHE]); + default: + BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); + return -1; } } -inline const ClearCache& DomainResolverCommand::clearCache() const +inline +const ClearCache& DomainResolverCommand::clearCache() const { BSLS_ASSERT(SELECTION_ID_CLEAR_CACHE == d_selectionId); return d_clearCache.object(); } -inline bool DomainResolverCommand::isClearCacheValue() const +inline +bool DomainResolverCommand::isClearCacheValue() const { return SELECTION_ID_CLEAR_CACHE == d_selectionId; } -inline bool DomainResolverCommand::isUndefinedValue() const +inline +bool DomainResolverCommand::isUndefinedValue() const { return SELECTION_ID_UNDEFINED == d_selectionId; } -// ---------------------- -// class FileStoreSummary -// ---------------------- + + // ---------------------- + // class FileStoreSummary + // ---------------------- // PRIVATE ACCESSORS template @@ -41891,7 +42735,8 @@ void FileStoreSummary::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const hashAppend(hashAlgorithm, this->storageContent()); } -inline bool FileStoreSummary::isEqualTo(const FileStoreSummary& rhs) const +inline +bool FileStoreSummary::isEqualTo(const FileStoreSummary& rhs) const { return this->primaryNodeDescription() == rhs.primaryNodeDescription() && this->primaryLeaseId() == rhs.primaryLeaseId() && @@ -41913,73 +42758,57 @@ int FileStoreSummary::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator( - &d_primaryNodeDescription, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_NODE_DESCRIPTION]); + ret = manipulator(&d_primaryNodeDescription, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_NODE_DESCRIPTION]); if (ret) { return ret; } - ret = manipulator(&d_primaryLeaseId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_LEASE_ID]); + ret = manipulator(&d_primaryLeaseId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_LEASE_ID]); if (ret) { return ret; } - ret = manipulator(&d_sequenceNum, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SEQUENCE_NUM]); + ret = manipulator(&d_sequenceNum, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SEQUENCE_NUM]); if (ret) { return ret; } - ret = manipulator(&d_isAvailable, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_AVAILABLE]); + ret = manipulator(&d_isAvailable, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_AVAILABLE]); if (ret) { return ret; } - ret = manipulator(&d_fileSets, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_FILE_SETS]); + ret = manipulator(&d_fileSets, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_FILE_SETS]); if (ret) { return ret; } - ret = manipulator(&d_activeFileSet, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ACTIVE_FILE_SET]); + ret = manipulator(&d_activeFileSet, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ACTIVE_FILE_SET]); if (ret) { return ret; } - ret = manipulator( - &d_totalMappedBytes, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_TOTAL_MAPPED_BYTES]); + ret = manipulator(&d_totalMappedBytes, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_TOTAL_MAPPED_BYTES]); if (ret) { return ret; } - ret = manipulator( - &d_numOutstandingRecords, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_OUTSTANDING_RECORDS]); + ret = manipulator(&d_numOutstandingRecords, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_OUTSTANDING_RECORDS]); if (ret) { return ret; } - ret = manipulator( - &d_numUnreceiptedMessages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_UNRECEIPTED_MESSAGES]); + ret = manipulator(&d_numUnreceiptedMessages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_UNRECEIPTED_MESSAGES]); if (ret) { return ret; } - ret = manipulator( - &d_naglePacketCount, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAGLE_PACKET_COUNT]); + ret = manipulator(&d_naglePacketCount, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAGLE_PACKET_COUNT]); if (ret) { return ret; } - ret = manipulator(&d_storageContent, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STORAGE_CONTENT]); + ret = manipulator(&d_storageContent, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STORAGE_CONTENT]); if (ret) { return ret; } @@ -41993,71 +42822,54 @@ int FileStoreSummary::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_PRIMARY_NODE_DESCRIPTION: { - return manipulator( - &d_primaryNodeDescription, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_NODE_DESCRIPTION]); - } - case ATTRIBUTE_ID_PRIMARY_LEASE_ID: { - return manipulator( - &d_primaryLeaseId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_LEASE_ID]); - } - case ATTRIBUTE_ID_SEQUENCE_NUM: { - return manipulator(&d_sequenceNum, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SEQUENCE_NUM]); - } - case ATTRIBUTE_ID_IS_AVAILABLE: { - return manipulator(&d_isAvailable, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_AVAILABLE]); - } - case ATTRIBUTE_ID_FILE_SETS: { - return manipulator(&d_fileSets, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_FILE_SETS]); - } - case ATTRIBUTE_ID_ACTIVE_FILE_SET: { - return manipulator( - &d_activeFileSet, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ACTIVE_FILE_SET]); - } - case ATTRIBUTE_ID_TOTAL_MAPPED_BYTES: { - return manipulator( - &d_totalMappedBytes, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_TOTAL_MAPPED_BYTES]); - } - case ATTRIBUTE_ID_NUM_OUTSTANDING_RECORDS: { - return manipulator( - &d_numOutstandingRecords, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_OUTSTANDING_RECORDS]); - } - case ATTRIBUTE_ID_NUM_UNRECEIPTED_MESSAGES: { - return manipulator( - &d_numUnreceiptedMessages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_UNRECEIPTED_MESSAGES]); - } - case ATTRIBUTE_ID_NAGLE_PACKET_COUNT: { - return manipulator( - &d_naglePacketCount, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAGLE_PACKET_COUNT]); - } - case ATTRIBUTE_ID_STORAGE_CONTENT: { - return manipulator( - &d_storageContent, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STORAGE_CONTENT]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_PRIMARY_NODE_DESCRIPTION: { + return manipulator(&d_primaryNodeDescription, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_NODE_DESCRIPTION]); + } + case ATTRIBUTE_ID_PRIMARY_LEASE_ID: { + return manipulator(&d_primaryLeaseId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_LEASE_ID]); + } + case ATTRIBUTE_ID_SEQUENCE_NUM: { + return manipulator(&d_sequenceNum, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SEQUENCE_NUM]); + } + case ATTRIBUTE_ID_IS_AVAILABLE: { + return manipulator(&d_isAvailable, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_AVAILABLE]); + } + case ATTRIBUTE_ID_FILE_SETS: { + return manipulator(&d_fileSets, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_FILE_SETS]); + } + case ATTRIBUTE_ID_ACTIVE_FILE_SET: { + return manipulator(&d_activeFileSet, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ACTIVE_FILE_SET]); + } + case ATTRIBUTE_ID_TOTAL_MAPPED_BYTES: { + return manipulator(&d_totalMappedBytes, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_TOTAL_MAPPED_BYTES]); + } + case ATTRIBUTE_ID_NUM_OUTSTANDING_RECORDS: { + return manipulator(&d_numOutstandingRecords, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_OUTSTANDING_RECORDS]); + } + case ATTRIBUTE_ID_NUM_UNRECEIPTED_MESSAGES: { + return manipulator(&d_numUnreceiptedMessages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_UNRECEIPTED_MESSAGES]); + } + case ATTRIBUTE_ID_NAGLE_PACKET_COUNT: { + return manipulator(&d_naglePacketCount, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAGLE_PACKET_COUNT]); + } + case ATTRIBUTE_ID_STORAGE_CONTENT: { + return manipulator(&d_storageContent, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STORAGE_CONTENT]); + } + default: + return NOT_FOUND; } } template -int FileStoreSummary::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int FileStoreSummary::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -42065,57 +42877,68 @@ int FileStoreSummary::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::string& FileStoreSummary::primaryNodeDescription() +inline +bsl::string& FileStoreSummary::primaryNodeDescription() { return d_primaryNodeDescription; } -inline unsigned int& FileStoreSummary::primaryLeaseId() +inline +unsigned int& FileStoreSummary::primaryLeaseId() { return d_primaryLeaseId; } -inline bsls::Types::Uint64& FileStoreSummary::sequenceNum() +inline +bsls::Types::Uint64& FileStoreSummary::sequenceNum() { return d_sequenceNum; } -inline bool& FileStoreSummary::isAvailable() +inline +bool& FileStoreSummary::isAvailable() { return d_isAvailable; } -inline bsl::vector& FileStoreSummary::fileSets() +inline +bsl::vector& FileStoreSummary::fileSets() { return d_fileSets; } -inline ActiveFileSet& FileStoreSummary::activeFileSet() +inline +ActiveFileSet& FileStoreSummary::activeFileSet() { return d_activeFileSet; } -inline bsls::Types::Uint64& FileStoreSummary::totalMappedBytes() +inline +bsls::Types::Uint64& FileStoreSummary::totalMappedBytes() { return d_totalMappedBytes; } -inline unsigned int& FileStoreSummary::numOutstandingRecords() +inline +unsigned int& FileStoreSummary::numOutstandingRecords() { return d_numOutstandingRecords; } -inline unsigned int& FileStoreSummary::numUnreceiptedMessages() +inline +unsigned int& FileStoreSummary::numUnreceiptedMessages() { return d_numUnreceiptedMessages; } -inline unsigned int& FileStoreSummary::naglePacketCount() +inline +unsigned int& FileStoreSummary::naglePacketCount() { return d_naglePacketCount; } -inline StorageContent& FileStoreSummary::storageContent() +inline +StorageContent& FileStoreSummary::storageContent() { return d_storageContent; } @@ -42126,71 +42949,57 @@ int FileStoreSummary::accessAttributes(t_ACCESSOR& accessor) const { int ret; - ret = accessor( - d_primaryNodeDescription, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_NODE_DESCRIPTION]); + ret = accessor(d_primaryNodeDescription, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_NODE_DESCRIPTION]); if (ret) { return ret; } - ret = accessor(d_primaryLeaseId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_LEASE_ID]); + ret = accessor(d_primaryLeaseId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_LEASE_ID]); if (ret) { return ret; } - ret = accessor(d_sequenceNum, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SEQUENCE_NUM]); + ret = accessor(d_sequenceNum, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SEQUENCE_NUM]); if (ret) { return ret; } - ret = accessor(d_isAvailable, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_AVAILABLE]); + ret = accessor(d_isAvailable, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_AVAILABLE]); if (ret) { return ret; } - ret = accessor(d_fileSets, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_FILE_SETS]); + ret = accessor(d_fileSets, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_FILE_SETS]); if (ret) { return ret; } - ret = accessor(d_activeFileSet, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ACTIVE_FILE_SET]); + ret = accessor(d_activeFileSet, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ACTIVE_FILE_SET]); if (ret) { return ret; } - ret = accessor(d_totalMappedBytes, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_TOTAL_MAPPED_BYTES]); + ret = accessor(d_totalMappedBytes, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_TOTAL_MAPPED_BYTES]); if (ret) { return ret; } - ret = accessor( - d_numOutstandingRecords, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_OUTSTANDING_RECORDS]); + ret = accessor(d_numOutstandingRecords, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_OUTSTANDING_RECORDS]); if (ret) { return ret; } - ret = accessor( - d_numUnreceiptedMessages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_UNRECEIPTED_MESSAGES]); + ret = accessor(d_numUnreceiptedMessages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_UNRECEIPTED_MESSAGES]); if (ret) { return ret; } - ret = accessor(d_naglePacketCount, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAGLE_PACKET_COUNT]); + ret = accessor(d_naglePacketCount, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAGLE_PACKET_COUNT]); if (ret) { return ret; } - ret = accessor(d_storageContent, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STORAGE_CONTENT]); + ret = accessor(d_storageContent, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STORAGE_CONTENT]); if (ret) { return ret; } @@ -42204,134 +43013,132 @@ int FileStoreSummary::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_PRIMARY_NODE_DESCRIPTION: { - return accessor( - d_primaryNodeDescription, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_NODE_DESCRIPTION]); - } - case ATTRIBUTE_ID_PRIMARY_LEASE_ID: { - return accessor( - d_primaryLeaseId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_LEASE_ID]); - } - case ATTRIBUTE_ID_SEQUENCE_NUM: { - return accessor(d_sequenceNum, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SEQUENCE_NUM]); - } - case ATTRIBUTE_ID_IS_AVAILABLE: { - return accessor(d_isAvailable, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_AVAILABLE]); - } - case ATTRIBUTE_ID_FILE_SETS: { - return accessor(d_fileSets, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_FILE_SETS]); - } - case ATTRIBUTE_ID_ACTIVE_FILE_SET: { - return accessor(d_activeFileSet, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ACTIVE_FILE_SET]); - } - case ATTRIBUTE_ID_TOTAL_MAPPED_BYTES: { - return accessor( - d_totalMappedBytes, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_TOTAL_MAPPED_BYTES]); - } - case ATTRIBUTE_ID_NUM_OUTSTANDING_RECORDS: { - return accessor( - d_numOutstandingRecords, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_OUTSTANDING_RECORDS]); - } - case ATTRIBUTE_ID_NUM_UNRECEIPTED_MESSAGES: { - return accessor( - d_numUnreceiptedMessages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_UNRECEIPTED_MESSAGES]); - } - case ATTRIBUTE_ID_NAGLE_PACKET_COUNT: { - return accessor( - d_naglePacketCount, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAGLE_PACKET_COUNT]); - } - case ATTRIBUTE_ID_STORAGE_CONTENT: { - return accessor(d_storageContent, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STORAGE_CONTENT]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_PRIMARY_NODE_DESCRIPTION: { + return accessor(d_primaryNodeDescription, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_NODE_DESCRIPTION]); + } + case ATTRIBUTE_ID_PRIMARY_LEASE_ID: { + return accessor(d_primaryLeaseId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIMARY_LEASE_ID]); + } + case ATTRIBUTE_ID_SEQUENCE_NUM: { + return accessor(d_sequenceNum, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SEQUENCE_NUM]); + } + case ATTRIBUTE_ID_IS_AVAILABLE: { + return accessor(d_isAvailable, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_AVAILABLE]); + } + case ATTRIBUTE_ID_FILE_SETS: { + return accessor(d_fileSets, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_FILE_SETS]); + } + case ATTRIBUTE_ID_ACTIVE_FILE_SET: { + return accessor(d_activeFileSet, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ACTIVE_FILE_SET]); + } + case ATTRIBUTE_ID_TOTAL_MAPPED_BYTES: { + return accessor(d_totalMappedBytes, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_TOTAL_MAPPED_BYTES]); + } + case ATTRIBUTE_ID_NUM_OUTSTANDING_RECORDS: { + return accessor(d_numOutstandingRecords, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_OUTSTANDING_RECORDS]); + } + case ATTRIBUTE_ID_NUM_UNRECEIPTED_MESSAGES: { + return accessor(d_numUnreceiptedMessages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_UNRECEIPTED_MESSAGES]); + } + case ATTRIBUTE_ID_NAGLE_PACKET_COUNT: { + return accessor(d_naglePacketCount, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAGLE_PACKET_COUNT]); + } + case ATTRIBUTE_ID_STORAGE_CONTENT: { + return accessor(d_storageContent, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STORAGE_CONTENT]); + } + default: + return NOT_FOUND; } } template -int FileStoreSummary::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int FileStoreSummary::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::string& FileStoreSummary::primaryNodeDescription() const +inline +const bsl::string& FileStoreSummary::primaryNodeDescription() const { return d_primaryNodeDescription; } -inline unsigned int FileStoreSummary::primaryLeaseId() const +inline +unsigned int FileStoreSummary::primaryLeaseId() const { return d_primaryLeaseId; } -inline bsls::Types::Uint64 FileStoreSummary::sequenceNum() const +inline +bsls::Types::Uint64 FileStoreSummary::sequenceNum() const { return d_sequenceNum; } -inline bool FileStoreSummary::isAvailable() const +inline +bool FileStoreSummary::isAvailable() const { return d_isAvailable; } -inline const bsl::vector& FileStoreSummary::fileSets() const +inline +const bsl::vector& FileStoreSummary::fileSets() const { return d_fileSets; } -inline const ActiveFileSet& FileStoreSummary::activeFileSet() const +inline +const ActiveFileSet& FileStoreSummary::activeFileSet() const { return d_activeFileSet; } -inline bsls::Types::Uint64 FileStoreSummary::totalMappedBytes() const +inline +bsls::Types::Uint64 FileStoreSummary::totalMappedBytes() const { return d_totalMappedBytes; } -inline unsigned int FileStoreSummary::numOutstandingRecords() const +inline +unsigned int FileStoreSummary::numOutstandingRecords() const { return d_numOutstandingRecords; } -inline unsigned int FileStoreSummary::numUnreceiptedMessages() const +inline +unsigned int FileStoreSummary::numUnreceiptedMessages() const { return d_numUnreceiptedMessages; } -inline unsigned int FileStoreSummary::naglePacketCount() const +inline +unsigned int FileStoreSummary::naglePacketCount() const { return d_naglePacketCount; } -inline const StorageContent& FileStoreSummary::storageContent() const +inline +const StorageContent& FileStoreSummary::storageContent() const { return d_storageContent; } -// ---------------- -// class GetTunable -// ---------------- + + + // ---------------- + // class GetTunable + // ---------------- // CLASS METHODS // MANIPULATORS @@ -42359,27 +43166,27 @@ int GetTunable::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_NAME: { - return manipulator(&d_name, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]); - } - case ATTRIBUTE_ID_CHOICE: { - return manipulator(&d_choice, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_NAME: { + return manipulator(&d_name, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]); + } + case ATTRIBUTE_ID_CHOICE: { + return manipulator(&d_choice, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE]); + } + default: + return NOT_FOUND; } } template -int GetTunable::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int GetTunable::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -42387,12 +43194,14 @@ int GetTunable::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::string& GetTunable::name() +inline +bsl::string& GetTunable::name() { return d_name; } -inline GetTunableChoice& GetTunable::choice() +inline +GetTunableChoice& GetTunable::choice() { return d_choice; } @@ -42422,51 +43231,55 @@ int GetTunable::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_NAME: { + case ATTRIBUTE_ID_NAME: { return accessor(d_name, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]); - } - case ATTRIBUTE_ID_CHOICE: { - return accessor(d_choice, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE]); - } - default: return NOT_FOUND; + } + case ATTRIBUTE_ID_CHOICE: { + return accessor(d_choice, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE]); + } + default: + return NOT_FOUND; } } template -int GetTunable::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int GetTunable::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::string& GetTunable::name() const +inline +const bsl::string& GetTunable::name() const { return d_name; } -inline const GetTunableChoice& GetTunable::choice() const +inline +const GetTunableChoice& GetTunable::choice() const { return d_choice; } -// -------------------------- -// class MessageGroupIdHelper -// -------------------------- + + + // -------------------------- + // class MessageGroupIdHelper + // -------------------------- // PRIVATE ACCESSORS template -void MessageGroupIdHelper::hashAppendImpl( - t_HASH_ALGORITHM& hashAlgorithm) const +void MessageGroupIdHelper::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const { using bslh::hashAppend; hashAppend(hashAlgorithm, this->timeoutNanoseconds()); @@ -42475,8 +43288,8 @@ void MessageGroupIdHelper::hashAppendImpl( hashAppend(hashAlgorithm, this->status()); } -inline bool -MessageGroupIdHelper::isEqualTo(const MessageGroupIdHelper& rhs) const +inline +bool MessageGroupIdHelper::isEqualTo(const MessageGroupIdHelper& rhs) const { return this->timeoutNanoseconds() == rhs.timeoutNanoseconds() && this->maxMsgGroupIds() == rhs.maxMsgGroupIds() && @@ -42491,21 +43304,17 @@ int MessageGroupIdHelper::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator( - &d_timeoutNanoseconds, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_TIMEOUT_NANOSECONDS]); + ret = manipulator(&d_timeoutNanoseconds, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_TIMEOUT_NANOSECONDS]); if (ret) { return ret; } - ret = manipulator(&d_maxMsgGroupIds, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MAX_MSG_GROUP_IDS]); + ret = manipulator(&d_maxMsgGroupIds, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MAX_MSG_GROUP_IDS]); if (ret) { return ret; } - ret = manipulator(&d_isRebalanceOn, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_REBALANCE_ON]); + ret = manipulator(&d_isRebalanceOn, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_REBALANCE_ON]); if (ret) { return ret; } @@ -42519,44 +43328,38 @@ int MessageGroupIdHelper::manipulateAttributes(t_MANIPULATOR& manipulator) } template -int MessageGroupIdHelper::manipulateAttribute(t_MANIPULATOR& manipulator, - int id) +int MessageGroupIdHelper::manipulateAttribute(t_MANIPULATOR& manipulator, int id) { enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_TIMEOUT_NANOSECONDS: { - return manipulator( - &d_timeoutNanoseconds, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_TIMEOUT_NANOSECONDS]); - } - case ATTRIBUTE_ID_MAX_MSG_GROUP_IDS: { - return manipulator( - &d_maxMsgGroupIds, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MAX_MSG_GROUP_IDS]); - } - case ATTRIBUTE_ID_IS_REBALANCE_ON: { - return manipulator( - &d_isRebalanceOn, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_REBALANCE_ON]); - } - case ATTRIBUTE_ID_STATUS: { - return manipulator(&d_status, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STATUS]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_TIMEOUT_NANOSECONDS: { + return manipulator(&d_timeoutNanoseconds, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_TIMEOUT_NANOSECONDS]); + } + case ATTRIBUTE_ID_MAX_MSG_GROUP_IDS: { + return manipulator(&d_maxMsgGroupIds, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MAX_MSG_GROUP_IDS]); + } + case ATTRIBUTE_ID_IS_REBALANCE_ON: { + return manipulator(&d_isRebalanceOn, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_REBALANCE_ON]); + } + case ATTRIBUTE_ID_STATUS: { + return manipulator(&d_status, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STATUS]); + } + default: + return NOT_FOUND; } } template -int MessageGroupIdHelper::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int MessageGroupIdHelper::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -42564,22 +43367,26 @@ int MessageGroupIdHelper::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsls::Types::Int64& MessageGroupIdHelper::timeoutNanoseconds() +inline +bsls::Types::Int64& MessageGroupIdHelper::timeoutNanoseconds() { return d_timeoutNanoseconds; } -inline int& MessageGroupIdHelper::maxMsgGroupIds() +inline +int& MessageGroupIdHelper::maxMsgGroupIds() { return d_maxMsgGroupIds; } -inline bool& MessageGroupIdHelper::isRebalanceOn() +inline +bool& MessageGroupIdHelper::isRebalanceOn() { return d_isRebalanceOn; } -inline MessageGroupIdManagerIndex& MessageGroupIdHelper::status() +inline +MessageGroupIdManagerIndex& MessageGroupIdHelper::status() { return d_status; } @@ -42590,20 +43397,17 @@ int MessageGroupIdHelper::accessAttributes(t_ACCESSOR& accessor) const { int ret; - ret = accessor(d_timeoutNanoseconds, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_TIMEOUT_NANOSECONDS]); + ret = accessor(d_timeoutNanoseconds, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_TIMEOUT_NANOSECONDS]); if (ret) { return ret; } - ret = accessor(d_maxMsgGroupIds, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MAX_MSG_GROUP_IDS]); + ret = accessor(d_maxMsgGroupIds, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MAX_MSG_GROUP_IDS]); if (ret) { return ret; } - ret = accessor(d_isRebalanceOn, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_REBALANCE_ON]); + ret = accessor(d_isRebalanceOn, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_REBALANCE_ON]); if (ret) { return ret; } @@ -42622,67 +43426,69 @@ int MessageGroupIdHelper::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_TIMEOUT_NANOSECONDS: { - return accessor( - d_timeoutNanoseconds, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_TIMEOUT_NANOSECONDS]); - } - case ATTRIBUTE_ID_MAX_MSG_GROUP_IDS: { - return accessor( - d_maxMsgGroupIds, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MAX_MSG_GROUP_IDS]); - } - case ATTRIBUTE_ID_IS_REBALANCE_ON: { - return accessor(d_isRebalanceOn, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_REBALANCE_ON]); - } - case ATTRIBUTE_ID_STATUS: { - return accessor(d_status, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STATUS]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_TIMEOUT_NANOSECONDS: { + return accessor(d_timeoutNanoseconds, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_TIMEOUT_NANOSECONDS]); + } + case ATTRIBUTE_ID_MAX_MSG_GROUP_IDS: { + return accessor(d_maxMsgGroupIds, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MAX_MSG_GROUP_IDS]); + } + case ATTRIBUTE_ID_IS_REBALANCE_ON: { + return accessor(d_isRebalanceOn, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_REBALANCE_ON]); + } + case ATTRIBUTE_ID_STATUS: { + return accessor(d_status, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STATUS]); + } + default: + return NOT_FOUND; } } template -int MessageGroupIdHelper::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int MessageGroupIdHelper::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline bsls::Types::Int64 MessageGroupIdHelper::timeoutNanoseconds() const +inline +bsls::Types::Int64 MessageGroupIdHelper::timeoutNanoseconds() const { return d_timeoutNanoseconds; } -inline int MessageGroupIdHelper::maxMsgGroupIds() const +inline +int MessageGroupIdHelper::maxMsgGroupIds() const { return d_maxMsgGroupIds; } -inline bool MessageGroupIdHelper::isRebalanceOn() const +inline +bool MessageGroupIdHelper::isRebalanceOn() const { return d_isRebalanceOn; } -inline const MessageGroupIdManagerIndex& MessageGroupIdHelper::status() const +inline +const MessageGroupIdManagerIndex& MessageGroupIdHelper::status() const { return d_status; } -// ------------------ -// class NodeStatuses -// ------------------ + + + // ------------------ + // class NodeStatuses + // ------------------ // CLASS METHODS // MANIPULATORS @@ -42705,23 +43511,24 @@ int NodeStatuses::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_NODES: { - return manipulator(&d_nodes, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NODES]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_NODES: { + return manipulator(&d_nodes, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NODES]); + } + default: + return NOT_FOUND; } } template -int NodeStatuses::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int NodeStatuses::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -42729,7 +43536,8 @@ int NodeStatuses::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::vector& NodeStatuses::nodes() +inline +bsl::vector& NodeStatuses::nodes() { return d_nodes; } @@ -42754,37 +43562,42 @@ int NodeStatuses::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_NODES: { + case ATTRIBUTE_ID_NODES: { return accessor(d_nodes, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NODES]); - } - default: return NOT_FOUND; + } + default: + return NOT_FOUND; } } template -int NodeStatuses::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int NodeStatuses::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::vector& NodeStatuses::nodes() const +inline +const bsl::vector& NodeStatuses::nodes() const { return d_nodes; } -// -------------------- -// class PartitionsInfo -// -------------------- + + + // -------------------- + // class PartitionsInfo + // -------------------- // CLASS METHODS // MANIPULATORS @@ -42793,8 +43606,7 @@ int PartitionsInfo::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator(&d_partitions, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITIONS]); + ret = manipulator(&d_partitions, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITIONS]); if (ret) { return ret; } @@ -42808,23 +43620,24 @@ int PartitionsInfo::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_PARTITIONS: { - return manipulator(&d_partitions, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITIONS]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_PARTITIONS: { + return manipulator(&d_partitions, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITIONS]); + } + default: + return NOT_FOUND; } } template -int PartitionsInfo::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int PartitionsInfo::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -42832,7 +43645,8 @@ int PartitionsInfo::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::vector& PartitionsInfo::partitions() +inline +bsl::vector& PartitionsInfo::partitions() { return d_partitions; } @@ -42843,8 +43657,7 @@ int PartitionsInfo::accessAttributes(t_ACCESSOR& accessor) const { int ret; - ret = accessor(d_partitions, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITIONS]); + ret = accessor(d_partitions, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITIONS]); if (ret) { return ret; } @@ -42858,38 +43671,42 @@ int PartitionsInfo::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_PARTITIONS: { - return accessor(d_partitions, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITIONS]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_PARTITIONS: { + return accessor(d_partitions, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITIONS]); + } + default: + return NOT_FOUND; } } template -int PartitionsInfo::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int PartitionsInfo::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::vector& PartitionsInfo::partitions() const +inline +const bsl::vector& PartitionsInfo::partitions() const { return d_partitions; } -// ------------------- -// class PriorityGroup -// ------------------- + + + // ------------------- + // class PriorityGroup + // ------------------- // CLASS METHODS // MANIPULATORS @@ -42903,9 +43720,7 @@ int PriorityGroup::manipulateAttributes(t_MANIPULATOR& manipulator) return ret; } - ret = manipulator( - &d_highestSubscriptions, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_HIGHEST_SUBSCRIPTIONS]); + ret = manipulator(&d_highestSubscriptions, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_HIGHEST_SUBSCRIPTIONS]); if (ret) { return ret; } @@ -42919,27 +43734,27 @@ int PriorityGroup::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_ID: { + case ATTRIBUTE_ID_ID: { return manipulator(&d_id, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ID]); - } - case ATTRIBUTE_ID_HIGHEST_SUBSCRIPTIONS: { - return manipulator( - &d_highestSubscriptions, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_HIGHEST_SUBSCRIPTIONS]); - } - default: return NOT_FOUND; + } + case ATTRIBUTE_ID_HIGHEST_SUBSCRIPTIONS: { + return manipulator(&d_highestSubscriptions, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_HIGHEST_SUBSCRIPTIONS]); + } + default: + return NOT_FOUND; } } template -int PriorityGroup::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int PriorityGroup::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -42947,12 +43762,14 @@ int PriorityGroup::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline unsigned int& PriorityGroup::id() +inline +unsigned int& PriorityGroup::id() { return d_id; } -inline bsl::vector& PriorityGroup::highestSubscriptions() +inline +bsl::vector& PriorityGroup::highestSubscriptions() { return d_highestSubscriptions; } @@ -42968,9 +43785,7 @@ int PriorityGroup::accessAttributes(t_ACCESSOR& accessor) const return ret; } - ret = accessor( - d_highestSubscriptions, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_HIGHEST_SUBSCRIPTIONS]); + ret = accessor(d_highestSubscriptions, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_HIGHEST_SUBSCRIPTIONS]); if (ret) { return ret; } @@ -42984,48 +43799,51 @@ int PriorityGroup::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_ID: { + case ATTRIBUTE_ID_ID: { return accessor(d_id, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ID]); - } - case ATTRIBUTE_ID_HIGHEST_SUBSCRIPTIONS: { - return accessor( - d_highestSubscriptions, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_HIGHEST_SUBSCRIPTIONS]); - } - default: return NOT_FOUND; + } + case ATTRIBUTE_ID_HIGHEST_SUBSCRIPTIONS: { + return accessor(d_highestSubscriptions, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_HIGHEST_SUBSCRIPTIONS]); + } + default: + return NOT_FOUND; } } template -int PriorityGroup::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int PriorityGroup::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline unsigned int PriorityGroup::id() const +inline +unsigned int PriorityGroup::id() const { return d_id; } -inline const bsl::vector& -PriorityGroup::highestSubscriptions() const +inline +const bsl::vector& PriorityGroup::highestSubscriptions() const { return d_highestSubscriptions; } -// ------------------ -// class PurgedQueues -// ------------------ + + + // ------------------ + // class PurgedQueues + // ------------------ // CLASS METHODS // MANIPULATORS @@ -43048,23 +43866,24 @@ int PurgedQueues::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_QUEUES: { - return manipulator(&d_queues, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUES]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_QUEUES: { + return manipulator(&d_queues, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUES]); + } + default: + return NOT_FOUND; } } template -int PurgedQueues::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int PurgedQueues::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -43072,7 +43891,8 @@ int PurgedQueues::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::vector& PurgedQueues::queues() +inline +bsl::vector& PurgedQueues::queues() { return d_queues; } @@ -43097,43 +43917,46 @@ int PurgedQueues::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_QUEUES: { - return accessor(d_queues, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUES]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_QUEUES: { + return accessor(d_queues, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUES]); + } + default: + return NOT_FOUND; } } template -int PurgedQueues::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int PurgedQueues::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::vector& PurgedQueues::queues() const +inline +const bsl::vector& PurgedQueues::queues() const { return d_queues; } -// -------------------------- -// class QueueHandleSubStream -// -------------------------- + + + // -------------------------- + // class QueueHandleSubStream + // -------------------------- // PRIVATE ACCESSORS template -void QueueHandleSubStream::hashAppendImpl( - t_HASH_ALGORITHM& hashAlgorithm) const +void QueueHandleSubStream::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const { using bslh::hashAppend; hashAppend(hashAlgorithm, this->subId()); @@ -43143,10 +43966,11 @@ void QueueHandleSubStream::hashAppendImpl( hashAppend(hashAlgorithm, this->numUnconfirmedMessages()); } -inline bool -QueueHandleSubStream::isEqualTo(const QueueHandleSubStream& rhs) const +inline +bool QueueHandleSubStream::isEqualTo(const QueueHandleSubStream& rhs) const { - return this->subId() == rhs.subId() && this->appId() == rhs.appId() && + return this->subId() == rhs.subId() && + this->appId() == rhs.appId() && this->parametersJson() == rhs.parametersJson() && this->unconfirmedMonitors() == rhs.unconfirmedMonitors() && this->numUnconfirmedMessages() == rhs.numUnconfirmedMessages(); @@ -43169,22 +43993,17 @@ int QueueHandleSubStream::manipulateAttributes(t_MANIPULATOR& manipulator) return ret; } - ret = manipulator(&d_parametersJson, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARAMETERS_JSON]); + ret = manipulator(&d_parametersJson, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARAMETERS_JSON]); if (ret) { return ret; } - ret = manipulator( - &d_unconfirmedMonitors, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_UNCONFIRMED_MONITORS]); + ret = manipulator(&d_unconfirmedMonitors, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_UNCONFIRMED_MONITORS]); if (ret) { return ret; } - ret = manipulator( - &d_numUnconfirmedMessages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_UNCONFIRMED_MESSAGES]); + ret = manipulator(&d_numUnconfirmedMessages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_UNCONFIRMED_MESSAGES]); if (ret) { return ret; } @@ -43193,48 +44012,41 @@ int QueueHandleSubStream::manipulateAttributes(t_MANIPULATOR& manipulator) } template -int QueueHandleSubStream::manipulateAttribute(t_MANIPULATOR& manipulator, - int id) +int QueueHandleSubStream::manipulateAttribute(t_MANIPULATOR& manipulator, int id) { enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_SUB_ID: { - return manipulator(&d_subId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUB_ID]); - } - case ATTRIBUTE_ID_APP_ID: { - return manipulator(&d_appId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_ID]); - } - case ATTRIBUTE_ID_PARAMETERS_JSON: { - return manipulator( - &d_parametersJson, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARAMETERS_JSON]); - } - case ATTRIBUTE_ID_UNCONFIRMED_MONITORS: { - return manipulator( - &d_unconfirmedMonitors, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_UNCONFIRMED_MONITORS]); - } - case ATTRIBUTE_ID_NUM_UNCONFIRMED_MESSAGES: { - return manipulator( - &d_numUnconfirmedMessages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_UNCONFIRMED_MESSAGES]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_SUB_ID: { + return manipulator(&d_subId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUB_ID]); + } + case ATTRIBUTE_ID_APP_ID: { + return manipulator(&d_appId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_ID]); + } + case ATTRIBUTE_ID_PARAMETERS_JSON: { + return manipulator(&d_parametersJson, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARAMETERS_JSON]); + } + case ATTRIBUTE_ID_UNCONFIRMED_MONITORS: { + return manipulator(&d_unconfirmedMonitors, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_UNCONFIRMED_MONITORS]); + } + case ATTRIBUTE_ID_NUM_UNCONFIRMED_MESSAGES: { + return manipulator(&d_numUnconfirmedMessages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_UNCONFIRMED_MESSAGES]); + } + default: + return NOT_FOUND; } } template -int QueueHandleSubStream::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int QueueHandleSubStream::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -43242,29 +44054,32 @@ int QueueHandleSubStream::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline unsigned int& QueueHandleSubStream::subId() +inline +unsigned int& QueueHandleSubStream::subId() { return d_subId; } -inline bdlb::NullableValue& QueueHandleSubStream::appId() +inline +bdlb::NullableValue& QueueHandleSubStream::appId() { return d_appId; } -inline bsl::string& QueueHandleSubStream::parametersJson() +inline +bsl::string& QueueHandleSubStream::parametersJson() { return d_parametersJson; } -inline bsl::vector& -QueueHandleSubStream::unconfirmedMonitors() +inline +bsl::vector& QueueHandleSubStream::unconfirmedMonitors() { return d_unconfirmedMonitors; } -inline bdlb::NullableValue& -QueueHandleSubStream::numUnconfirmedMessages() +inline +bdlb::NullableValue& QueueHandleSubStream::numUnconfirmedMessages() { return d_numUnconfirmedMessages; } @@ -43285,21 +44100,17 @@ int QueueHandleSubStream::accessAttributes(t_ACCESSOR& accessor) const return ret; } - ret = accessor(d_parametersJson, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARAMETERS_JSON]); + ret = accessor(d_parametersJson, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARAMETERS_JSON]); if (ret) { return ret; } - ret = accessor(d_unconfirmedMonitors, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_UNCONFIRMED_MONITORS]); + ret = accessor(d_unconfirmedMonitors, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_UNCONFIRMED_MONITORS]); if (ret) { return ret; } - ret = accessor( - d_numUnconfirmedMessages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_UNCONFIRMED_MESSAGES]); + ret = accessor(d_numUnconfirmedMessages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_UNCONFIRMED_MESSAGES]); if (ret) { return ret; } @@ -43313,77 +44124,78 @@ int QueueHandleSubStream::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_SUB_ID: { + case ATTRIBUTE_ID_SUB_ID: { return accessor(d_subId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUB_ID]); - } - case ATTRIBUTE_ID_APP_ID: { + } + case ATTRIBUTE_ID_APP_ID: { return accessor(d_appId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_ID]); - } - case ATTRIBUTE_ID_PARAMETERS_JSON: { - return accessor(d_parametersJson, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARAMETERS_JSON]); - } - case ATTRIBUTE_ID_UNCONFIRMED_MONITORS: { - return accessor( - d_unconfirmedMonitors, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_UNCONFIRMED_MONITORS]); - } - case ATTRIBUTE_ID_NUM_UNCONFIRMED_MESSAGES: { - return accessor( - d_numUnconfirmedMessages, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_UNCONFIRMED_MESSAGES]); - } - default: return NOT_FOUND; + } + case ATTRIBUTE_ID_PARAMETERS_JSON: { + return accessor(d_parametersJson, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARAMETERS_JSON]); + } + case ATTRIBUTE_ID_UNCONFIRMED_MONITORS: { + return accessor(d_unconfirmedMonitors, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_UNCONFIRMED_MONITORS]); + } + case ATTRIBUTE_ID_NUM_UNCONFIRMED_MESSAGES: { + return accessor(d_numUnconfirmedMessages, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_UNCONFIRMED_MESSAGES]); + } + default: + return NOT_FOUND; } } template -int QueueHandleSubStream::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int QueueHandleSubStream::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline unsigned int QueueHandleSubStream::subId() const +inline +unsigned int QueueHandleSubStream::subId() const { return d_subId; } -inline const bdlb::NullableValue& -QueueHandleSubStream::appId() const +inline +const bdlb::NullableValue& QueueHandleSubStream::appId() const { return d_appId; } -inline const bsl::string& QueueHandleSubStream::parametersJson() const +inline +const bsl::string& QueueHandleSubStream::parametersJson() const { return d_parametersJson; } -inline const bsl::vector& -QueueHandleSubStream::unconfirmedMonitors() const +inline +const bsl::vector& QueueHandleSubStream::unconfirmedMonitors() const { return d_unconfirmedMonitors; } -inline const bdlb::NullableValue& -QueueHandleSubStream::numUnconfirmedMessages() const +inline +const bdlb::NullableValue& QueueHandleSubStream::numUnconfirmedMessages() const { return d_numUnconfirmedMessages; } -// ------------------- -// class QueueStatuses -// ------------------- + + + // ------------------- + // class QueueStatuses + // ------------------- // CLASS METHODS // MANIPULATORS @@ -43392,8 +44204,7 @@ int QueueStatuses::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator(&d_queueStatuses, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_STATUSES]); + ret = manipulator(&d_queueStatuses, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_STATUSES]); if (ret) { return ret; } @@ -43407,24 +44218,24 @@ int QueueStatuses::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_QUEUE_STATUSES: { - return manipulator( - &d_queueStatuses, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_STATUSES]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_QUEUE_STATUSES: { + return manipulator(&d_queueStatuses, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_STATUSES]); + } + default: + return NOT_FOUND; } } template -int QueueStatuses::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int QueueStatuses::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -43432,7 +44243,8 @@ int QueueStatuses::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::vector& QueueStatuses::queueStatuses() +inline +bsl::vector& QueueStatuses::queueStatuses() { return d_queueStatuses; } @@ -43443,8 +44255,7 @@ int QueueStatuses::accessAttributes(t_ACCESSOR& accessor) const { int ret; - ret = accessor(d_queueStatuses, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_STATUSES]); + ret = accessor(d_queueStatuses, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_STATUSES]); if (ret) { return ret; } @@ -43458,38 +44269,42 @@ int QueueStatuses::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_QUEUE_STATUSES: { - return accessor(d_queueStatuses, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_STATUSES]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_QUEUE_STATUSES: { + return accessor(d_queueStatuses, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_STATUSES]); + } + default: + return NOT_FOUND; } } template -int QueueStatuses::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int QueueStatuses::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::vector& QueueStatuses::queueStatuses() const +inline +const bsl::vector& QueueStatuses::queueStatuses() const { return d_queueStatuses; } -// ---------------- -// class SetTunable -// ---------------- + + + // ---------------- + // class SetTunable + // ---------------- // PRIVATE ACCESSORS template @@ -43532,31 +44347,30 @@ int SetTunable::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_NAME: { - return manipulator(&d_name, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]); - } - case ATTRIBUTE_ID_VALUE: { - return manipulator(&d_value, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_VALUE]); - } - case ATTRIBUTE_ID_CHOICE: { - return manipulator(&d_choice, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_NAME: { + return manipulator(&d_name, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]); + } + case ATTRIBUTE_ID_VALUE: { + return manipulator(&d_value, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_VALUE]); + } + case ATTRIBUTE_ID_CHOICE: { + return manipulator(&d_choice, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE]); + } + default: + return NOT_FOUND; } } template -int SetTunable::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int SetTunable::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -43564,17 +44378,20 @@ int SetTunable::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::string& SetTunable::name() +inline +bsl::string& SetTunable::name() { return d_name; } -inline Value& SetTunable::value() +inline +Value& SetTunable::value() { return d_value; } -inline SetTunableChoice& SetTunable::choice() +inline +SetTunableChoice& SetTunable::choice() { return d_choice; } @@ -43609,54 +44426,60 @@ int SetTunable::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_NAME: { + case ATTRIBUTE_ID_NAME: { return accessor(d_name, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]); - } - case ATTRIBUTE_ID_VALUE: { + } + case ATTRIBUTE_ID_VALUE: { return accessor(d_value, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_VALUE]); - } - case ATTRIBUTE_ID_CHOICE: { - return accessor(d_choice, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE]); - } - default: return NOT_FOUND; + } + case ATTRIBUTE_ID_CHOICE: { + return accessor(d_choice, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE]); + } + default: + return NOT_FOUND; } } template -int SetTunable::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int SetTunable::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::string& SetTunable::name() const +inline +const bsl::string& SetTunable::name() const { return d_name; } -inline const Value& SetTunable::value() const +inline +const Value& SetTunable::value() const { return d_value; } -inline const SetTunableChoice& SetTunable::choice() const +inline +const SetTunableChoice& SetTunable::choice() const { return d_choice; } -// ------------------- -// class StorageDomain -// ------------------- + + + // ------------------- + // class StorageDomain + // ------------------- // CLASS METHODS // MANIPULATORS @@ -43670,8 +44493,7 @@ int StorageDomain::manipulateAttributes(t_MANIPULATOR& manipulator) return ret; } - ret = manipulator(&d_command, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND]); + ret = manipulator(&d_command, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND]); if (ret) { return ret; } @@ -43685,27 +44507,27 @@ int StorageDomain::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_NAME: { - return manipulator(&d_name, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]); - } - case ATTRIBUTE_ID_COMMAND: { - return manipulator(&d_command, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_NAME: { + return manipulator(&d_name, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]); + } + case ATTRIBUTE_ID_COMMAND: { + return manipulator(&d_command, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND]); + } + default: + return NOT_FOUND; } } template -int StorageDomain::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int StorageDomain::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -43713,12 +44535,14 @@ int StorageDomain::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::string& StorageDomain::name() +inline +bsl::string& StorageDomain::name() { return d_name; } -inline StorageDomainCommand& StorageDomain::command() +inline +StorageDomainCommand& StorageDomain::command() { return d_command; } @@ -43748,46 +44572,51 @@ int StorageDomain::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_NAME: { + case ATTRIBUTE_ID_NAME: { return accessor(d_name, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]); - } - case ATTRIBUTE_ID_COMMAND: { - return accessor(d_command, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND]); - } - default: return NOT_FOUND; + } + case ATTRIBUTE_ID_COMMAND: { + return accessor(d_command, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND]); + } + default: + return NOT_FOUND; } } template -int StorageDomain::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int StorageDomain::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::string& StorageDomain::name() const +inline +const bsl::string& StorageDomain::name() const { return d_name; } -inline const StorageDomainCommand& StorageDomain::command() const +inline +const StorageDomainCommand& StorageDomain::command() const { return d_command; } -// ---------------------- -// class StoragePartition -// ---------------------- + + + // ---------------------- + // class StoragePartition + // ---------------------- // CLASS METHODS // MANIPULATORS @@ -43796,14 +44625,12 @@ int StoragePartition::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator(&d_partitionId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITION_ID]); + ret = manipulator(&d_partitionId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITION_ID]); if (ret) { return ret; } - ret = manipulator(&d_command, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND]); + ret = manipulator(&d_command, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND]); if (ret) { return ret; } @@ -43817,27 +44644,27 @@ int StoragePartition::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_PARTITION_ID: { - return manipulator(&d_partitionId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITION_ID]); - } - case ATTRIBUTE_ID_COMMAND: { - return manipulator(&d_command, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_PARTITION_ID: { + return manipulator(&d_partitionId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITION_ID]); + } + case ATTRIBUTE_ID_COMMAND: { + return manipulator(&d_command, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND]); + } + default: + return NOT_FOUND; } } template -int StoragePartition::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int StoragePartition::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -43845,12 +44672,14 @@ int StoragePartition::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline int& StoragePartition::partitionId() +inline +int& StoragePartition::partitionId() { return d_partitionId; } -inline StoragePartitionCommand& StoragePartition::command() +inline +StoragePartitionCommand& StoragePartition::command() { return d_command; } @@ -43861,8 +44690,7 @@ int StoragePartition::accessAttributes(t_ACCESSOR& accessor) const { int ret; - ret = accessor(d_partitionId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITION_ID]); + ret = accessor(d_partitionId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITION_ID]); if (ret) { return ret; } @@ -43881,47 +44709,51 @@ int StoragePartition::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_PARTITION_ID: { - return accessor(d_partitionId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITION_ID]); - } - case ATTRIBUTE_ID_COMMAND: { - return accessor(d_command, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_PARTITION_ID: { + return accessor(d_partitionId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITION_ID]); + } + case ATTRIBUTE_ID_COMMAND: { + return accessor(d_command, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND]); + } + default: + return NOT_FOUND; } } template -int StoragePartition::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int StoragePartition::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline int StoragePartition::partitionId() const +inline +int StoragePartition::partitionId() const { return d_partitionId; } -inline const StoragePartitionCommand& StoragePartition::command() const +inline +const StoragePartitionCommand& StoragePartition::command() const { return d_command; } -// ------------- -// class Tunable -// ------------- + + + // ------------- + // class Tunable + // ------------- // PRIVATE ACCESSORS template @@ -43950,8 +44782,7 @@ int Tunable::manipulateAttributes(t_MANIPULATOR& manipulator) return ret; } - ret = manipulator(&d_description, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DESCRIPTION]); + ret = manipulator(&d_description, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DESCRIPTION]); if (ret) { return ret; } @@ -43965,31 +44796,30 @@ int Tunable::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_NAME: { - return manipulator(&d_name, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]); - } - case ATTRIBUTE_ID_VALUE: { - return manipulator(&d_value, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_VALUE]); - } - case ATTRIBUTE_ID_DESCRIPTION: { - return manipulator(&d_description, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DESCRIPTION]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_NAME: { + return manipulator(&d_name, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]); + } + case ATTRIBUTE_ID_VALUE: { + return manipulator(&d_value, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_VALUE]); + } + case ATTRIBUTE_ID_DESCRIPTION: { + return manipulator(&d_description, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DESCRIPTION]); + } + default: + return NOT_FOUND; } } template -int Tunable::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int Tunable::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -43997,17 +44827,20 @@ int Tunable::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::string& Tunable::name() +inline +bsl::string& Tunable::name() { return d_name; } -inline Value& Tunable::value() +inline +Value& Tunable::value() { return d_value; } -inline bsl::string& Tunable::description() +inline +bsl::string& Tunable::description() { return d_description; } @@ -44028,8 +44861,7 @@ int Tunable::accessAttributes(t_ACCESSOR& accessor) const return ret; } - ret = accessor(d_description, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DESCRIPTION]); + ret = accessor(d_description, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DESCRIPTION]); if (ret) { return ret; } @@ -44043,54 +44875,60 @@ int Tunable::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_NAME: { + case ATTRIBUTE_ID_NAME: { return accessor(d_name, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]); - } - case ATTRIBUTE_ID_VALUE: { + } + case ATTRIBUTE_ID_VALUE: { return accessor(d_value, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_VALUE]); - } - case ATTRIBUTE_ID_DESCRIPTION: { - return accessor(d_description, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DESCRIPTION]); - } - default: return NOT_FOUND; + } + case ATTRIBUTE_ID_DESCRIPTION: { + return accessor(d_description, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DESCRIPTION]); + } + default: + return NOT_FOUND; } } template -int Tunable::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int Tunable::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::string& Tunable::name() const +inline +const bsl::string& Tunable::name() const { return d_name; } -inline const Value& Tunable::value() const +inline +const Value& Tunable::value() const { return d_value; } -inline const bsl::string& Tunable::description() const +inline +const bsl::string& Tunable::description() const { return d_description; } -// ------------------------- -// class TunableConfirmation -// ------------------------- + + + // ------------------------- + // class TunableConfirmation + // ------------------------- // PRIVATE ACCESSORS template @@ -44114,14 +44952,12 @@ int TunableConfirmation::manipulateAttributes(t_MANIPULATOR& manipulator) return ret; } - ret = manipulator(&d_oldValue, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_OLD_VALUE]); + ret = manipulator(&d_oldValue, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_OLD_VALUE]); if (ret) { return ret; } - ret = manipulator(&d_newValue, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NEW_VALUE]); + ret = manipulator(&d_newValue, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NEW_VALUE]); if (ret) { return ret; } @@ -44130,37 +44966,35 @@ int TunableConfirmation::manipulateAttributes(t_MANIPULATOR& manipulator) } template -int TunableConfirmation::manipulateAttribute(t_MANIPULATOR& manipulator, - int id) +int TunableConfirmation::manipulateAttribute(t_MANIPULATOR& manipulator, int id) { enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_NAME: { - return manipulator(&d_name, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]); - } - case ATTRIBUTE_ID_OLD_VALUE: { - return manipulator(&d_oldValue, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_OLD_VALUE]); - } - case ATTRIBUTE_ID_NEW_VALUE: { - return manipulator(&d_newValue, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NEW_VALUE]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_NAME: { + return manipulator(&d_name, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]); + } + case ATTRIBUTE_ID_OLD_VALUE: { + return manipulator(&d_oldValue, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_OLD_VALUE]); + } + case ATTRIBUTE_ID_NEW_VALUE: { + return manipulator(&d_newValue, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NEW_VALUE]); + } + default: + return NOT_FOUND; } } template -int TunableConfirmation::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int TunableConfirmation::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -44168,17 +45002,20 @@ int TunableConfirmation::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::string& TunableConfirmation::name() +inline +bsl::string& TunableConfirmation::name() { return d_name; } -inline Value& TunableConfirmation::oldValue() +inline +Value& TunableConfirmation::oldValue() { return d_oldValue; } -inline Value& TunableConfirmation::newValue() +inline +Value& TunableConfirmation::newValue() { return d_newValue; } @@ -44194,14 +45031,12 @@ int TunableConfirmation::accessAttributes(t_ACCESSOR& accessor) const return ret; } - ret = accessor(d_oldValue, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_OLD_VALUE]); + ret = accessor(d_oldValue, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_OLD_VALUE]); if (ret) { return ret; } - ret = accessor(d_newValue, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NEW_VALUE]); + ret = accessor(d_newValue, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NEW_VALUE]); if (ret) { return ret; } @@ -44215,66 +45050,69 @@ int TunableConfirmation::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_NAME: { + case ATTRIBUTE_ID_NAME: { return accessor(d_name, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]); - } - case ATTRIBUTE_ID_OLD_VALUE: { - return accessor(d_oldValue, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_OLD_VALUE]); - } - case ATTRIBUTE_ID_NEW_VALUE: { - return accessor(d_newValue, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NEW_VALUE]); - } - default: return NOT_FOUND; + } + case ATTRIBUTE_ID_OLD_VALUE: { + return accessor(d_oldValue, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_OLD_VALUE]); + } + case ATTRIBUTE_ID_NEW_VALUE: { + return accessor(d_newValue, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NEW_VALUE]); + } + default: + return NOT_FOUND; } } template -int TunableConfirmation::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int TunableConfirmation::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::string& TunableConfirmation::name() const +inline +const bsl::string& TunableConfirmation::name() const { return d_name; } -inline const Value& TunableConfirmation::oldValue() const +inline +const Value& TunableConfirmation::oldValue() const { return d_oldValue; } -inline const Value& TunableConfirmation::newValue() const +inline +const Value& TunableConfirmation::newValue() const { return d_newValue; } -// -------------------------------- -// class ClusterDomainQueueStatuses -// -------------------------------- + + + // -------------------------------- + // class ClusterDomainQueueStatuses + // -------------------------------- // CLASS METHODS // MANIPULATORS template -int ClusterDomainQueueStatuses::manipulateAttributes( - t_MANIPULATOR& manipulator) +int ClusterDomainQueueStatuses::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator(&d_statuses, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STATUSES]); + ret = manipulator(&d_statuses, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STATUSES]); if (ret) { return ret; } @@ -44283,29 +45121,29 @@ int ClusterDomainQueueStatuses::manipulateAttributes( } template -int ClusterDomainQueueStatuses::manipulateAttribute(t_MANIPULATOR& manipulator, - int id) +int ClusterDomainQueueStatuses::manipulateAttribute(t_MANIPULATOR& manipulator, int id) { enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_STATUSES: { - return manipulator(&d_statuses, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STATUSES]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_STATUSES: { + return manipulator(&d_statuses, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STATUSES]); + } + default: + return NOT_FOUND; } } template -int ClusterDomainQueueStatuses::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int ClusterDomainQueueStatuses::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -44313,8 +45151,8 @@ int ClusterDomainQueueStatuses::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bdlb::NullableValue& -ClusterDomainQueueStatuses::statuses() +inline +bdlb::NullableValue& ClusterDomainQueueStatuses::statuses() { return d_statuses; } @@ -44334,45 +45172,47 @@ int ClusterDomainQueueStatuses::accessAttributes(t_ACCESSOR& accessor) const } template -int ClusterDomainQueueStatuses::accessAttribute(t_ACCESSOR& accessor, - int id) const +int ClusterDomainQueueStatuses::accessAttribute(t_ACCESSOR& accessor, int id) const { enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_STATUSES: { - return accessor(d_statuses, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STATUSES]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_STATUSES: { + return accessor(d_statuses, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STATUSES]); + } + default: + return NOT_FOUND; } } template -int ClusterDomainQueueStatuses::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int ClusterDomainQueueStatuses::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bdlb::NullableValue& -ClusterDomainQueueStatuses::statuses() const +inline +const bdlb::NullableValue& ClusterDomainQueueStatuses::statuses() const { return d_statuses; } -// ------------------------ -// class ClusterProxyStatus -// ------------------------ + + + // ------------------------ + // class ClusterProxyStatus + // ------------------------ // PRIVATE ACCESSORS template @@ -44386,7 +45226,8 @@ void ClusterProxyStatus::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const hashAppend(hashAlgorithm, this->queuesInfo()); } -inline bool ClusterProxyStatus::isEqualTo(const ClusterProxyStatus& rhs) const +inline +bool ClusterProxyStatus::isEqualTo(const ClusterProxyStatus& rhs) const { return this->description() == rhs.description() && this->activeNodeDescription() == rhs.activeNodeDescription() && @@ -44402,33 +45243,27 @@ int ClusterProxyStatus::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator(&d_description, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DESCRIPTION]); + ret = manipulator(&d_description, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DESCRIPTION]); if (ret) { return ret; } - ret = manipulator( - &d_activeNodeDescription, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ACTIVE_NODE_DESCRIPTION]); + ret = manipulator(&d_activeNodeDescription, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ACTIVE_NODE_DESCRIPTION]); if (ret) { return ret; } - ret = manipulator(&d_isHealthy, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_HEALTHY]); + ret = manipulator(&d_isHealthy, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_HEALTHY]); if (ret) { return ret; } - ret = manipulator(&d_nodeStatuses, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NODE_STATUSES]); + ret = manipulator(&d_nodeStatuses, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NODE_STATUSES]); if (ret) { return ret; } - ret = manipulator(&d_queuesInfo, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUES_INFO]); + ret = manipulator(&d_queuesInfo, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUES_INFO]); if (ret) { return ret; } @@ -44442,41 +45277,36 @@ int ClusterProxyStatus::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_DESCRIPTION: { - return manipulator(&d_description, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DESCRIPTION]); - } - case ATTRIBUTE_ID_ACTIVE_NODE_DESCRIPTION: { - return manipulator( - &d_activeNodeDescription, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ACTIVE_NODE_DESCRIPTION]); - } - case ATTRIBUTE_ID_IS_HEALTHY: { - return manipulator(&d_isHealthy, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_HEALTHY]); - } - case ATTRIBUTE_ID_NODE_STATUSES: { - return manipulator( - &d_nodeStatuses, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NODE_STATUSES]); - } - case ATTRIBUTE_ID_QUEUES_INFO: { - return manipulator(&d_queuesInfo, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUES_INFO]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_DESCRIPTION: { + return manipulator(&d_description, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DESCRIPTION]); + } + case ATTRIBUTE_ID_ACTIVE_NODE_DESCRIPTION: { + return manipulator(&d_activeNodeDescription, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ACTIVE_NODE_DESCRIPTION]); + } + case ATTRIBUTE_ID_IS_HEALTHY: { + return manipulator(&d_isHealthy, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_HEALTHY]); + } + case ATTRIBUTE_ID_NODE_STATUSES: { + return manipulator(&d_nodeStatuses, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NODE_STATUSES]); + } + case ATTRIBUTE_ID_QUEUES_INFO: { + return manipulator(&d_queuesInfo, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUES_INFO]); + } + default: + return NOT_FOUND; } } template -int ClusterProxyStatus::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int ClusterProxyStatus::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -44484,28 +45314,32 @@ int ClusterProxyStatus::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::string& ClusterProxyStatus::description() +inline +bsl::string& ClusterProxyStatus::description() { return d_description; } -inline bdlb::NullableValue& -ClusterProxyStatus::activeNodeDescription() +inline +bdlb::NullableValue& ClusterProxyStatus::activeNodeDescription() { return d_activeNodeDescription; } -inline bool& ClusterProxyStatus::isHealthy() +inline +bool& ClusterProxyStatus::isHealthy() { return d_isHealthy; } -inline NodeStatuses& ClusterProxyStatus::nodeStatuses() +inline +NodeStatuses& ClusterProxyStatus::nodeStatuses() { return d_nodeStatuses; } -inline StorageContent& ClusterProxyStatus::queuesInfo() +inline +StorageContent& ClusterProxyStatus::queuesInfo() { return d_queuesInfo; } @@ -44516,33 +45350,27 @@ int ClusterProxyStatus::accessAttributes(t_ACCESSOR& accessor) const { int ret; - ret = accessor(d_description, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DESCRIPTION]); + ret = accessor(d_description, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DESCRIPTION]); if (ret) { return ret; } - ret = accessor( - d_activeNodeDescription, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ACTIVE_NODE_DESCRIPTION]); + ret = accessor(d_activeNodeDescription, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ACTIVE_NODE_DESCRIPTION]); if (ret) { return ret; } - ret = accessor(d_isHealthy, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_HEALTHY]); + ret = accessor(d_isHealthy, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_HEALTHY]); if (ret) { return ret; } - ret = accessor(d_nodeStatuses, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NODE_STATUSES]); + ret = accessor(d_nodeStatuses, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NODE_STATUSES]); if (ret) { return ret; } - ret = accessor(d_queuesInfo, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUES_INFO]); + ret = accessor(d_queuesInfo, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUES_INFO]); if (ret) { return ret; } @@ -44556,76 +45384,78 @@ int ClusterProxyStatus::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_DESCRIPTION: { - return accessor(d_description, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DESCRIPTION]); - } - case ATTRIBUTE_ID_ACTIVE_NODE_DESCRIPTION: { - return accessor( - d_activeNodeDescription, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ACTIVE_NODE_DESCRIPTION]); - } - case ATTRIBUTE_ID_IS_HEALTHY: { - return accessor(d_isHealthy, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_HEALTHY]); - } - case ATTRIBUTE_ID_NODE_STATUSES: { - return accessor(d_nodeStatuses, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NODE_STATUSES]); - } - case ATTRIBUTE_ID_QUEUES_INFO: { - return accessor(d_queuesInfo, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUES_INFO]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_DESCRIPTION: { + return accessor(d_description, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DESCRIPTION]); + } + case ATTRIBUTE_ID_ACTIVE_NODE_DESCRIPTION: { + return accessor(d_activeNodeDescription, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ACTIVE_NODE_DESCRIPTION]); + } + case ATTRIBUTE_ID_IS_HEALTHY: { + return accessor(d_isHealthy, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_HEALTHY]); + } + case ATTRIBUTE_ID_NODE_STATUSES: { + return accessor(d_nodeStatuses, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NODE_STATUSES]); + } + case ATTRIBUTE_ID_QUEUES_INFO: { + return accessor(d_queuesInfo, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUES_INFO]); + } + default: + return NOT_FOUND; } } template -int ClusterProxyStatus::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int ClusterProxyStatus::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::string& ClusterProxyStatus::description() const +inline +const bsl::string& ClusterProxyStatus::description() const { return d_description; } -inline const bdlb::NullableValue& -ClusterProxyStatus::activeNodeDescription() const +inline +const bdlb::NullableValue& ClusterProxyStatus::activeNodeDescription() const { return d_activeNodeDescription; } -inline bool ClusterProxyStatus::isHealthy() const +inline +bool ClusterProxyStatus::isHealthy() const { return d_isHealthy; } -inline const NodeStatuses& ClusterProxyStatus::nodeStatuses() const +inline +const NodeStatuses& ClusterProxyStatus::nodeStatuses() const { return d_nodeStatuses; } -inline const StorageContent& ClusterProxyStatus::queuesInfo() const +inline +const StorageContent& ClusterProxyStatus::queuesInfo() const { return d_queuesInfo; } -// ------------------- -// class DomainCommand -// ------------------- + + + // ------------------- + // class DomainCommand + // ------------------- // CLASS METHODS // PRIVATE ACCESSORS @@ -44636,28 +45466,38 @@ void DomainCommand::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const using bslh::hashAppend; hashAppend(hashAlgorithm, this->selectionId()); switch (this->selectionId()) { - case Class::SELECTION_ID_PURGE: + case Class::SELECTION_ID_PURGE: hashAppend(hashAlgorithm, this->purge()); break; - case Class::SELECTION_ID_INFO: + case Class::SELECTION_ID_REMOVE: + hashAppend(hashAlgorithm, this->remove()); + break; + case Class::SELECTION_ID_INFO: hashAppend(hashAlgorithm, this->info()); break; - case Class::SELECTION_ID_QUEUE: + case Class::SELECTION_ID_QUEUE: hashAppend(hashAlgorithm, this->queue()); break; - default: BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); + default: + BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); } } -inline bool DomainCommand::isEqualTo(const DomainCommand& rhs) const +inline +bool DomainCommand::isEqualTo(const DomainCommand& rhs) const { typedef DomainCommand Class; if (this->selectionId() == rhs.selectionId()) { switch (rhs.selectionId()) { - case Class::SELECTION_ID_PURGE: return this->purge() == rhs.purge(); - case Class::SELECTION_ID_INFO: return this->info() == rhs.info(); - case Class::SELECTION_ID_QUEUE: return this->queue() == rhs.queue(); - default: + case Class::SELECTION_ID_PURGE: + return this->purge() == rhs.purge(); + case Class::SELECTION_ID_REMOVE: + return this->remove() == rhs.remove(); + case Class::SELECTION_ID_INFO: + return this->info() == rhs.info(); + case Class::SELECTION_ID_QUEUE: + return this->queue() == rhs.queue(); + default: BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId()); return true; } @@ -44668,13 +45508,15 @@ inline bool DomainCommand::isEqualTo(const DomainCommand& rhs) const } // CREATORS -inline DomainCommand::DomainCommand(bslma::Allocator* basicAllocator) +inline +DomainCommand::DomainCommand(bslma::Allocator *basicAllocator) : d_selectionId(SELECTION_ID_UNDEFINED) , d_allocator_p(bslma::Default::allocator(basicAllocator)) { } -inline DomainCommand::~DomainCommand() +inline +DomainCommand::~DomainCommand() { reset(); } @@ -44684,41 +45526,55 @@ template int DomainCommand::manipulateSelection(t_MANIPULATOR& manipulator) { switch (d_selectionId) { - case DomainCommand::SELECTION_ID_PURGE: + case DomainCommand::SELECTION_ID_PURGE: return manipulator(&d_purge.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_PURGE]); - case DomainCommand::SELECTION_ID_INFO: + SELECTION_INFO_ARRAY[SELECTION_INDEX_PURGE]); + case DomainCommand::SELECTION_ID_REMOVE: + return manipulator(&d_remove.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_REMOVE]); + case DomainCommand::SELECTION_ID_INFO: return manipulator(&d_info.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_INFO]); - case DomainCommand::SELECTION_ID_QUEUE: + SELECTION_INFO_ARRAY[SELECTION_INDEX_INFO]); + case DomainCommand::SELECTION_ID_QUEUE: return manipulator(&d_queue.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE]); - default: + SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE]); + default: BSLS_ASSERT(DomainCommand::SELECTION_ID_UNDEFINED == d_selectionId); return -1; } } -inline Void& DomainCommand::purge() +inline +Void& DomainCommand::purge() { BSLS_ASSERT(SELECTION_ID_PURGE == d_selectionId); return d_purge.object(); } -inline Void& DomainCommand::info() +inline +Void& DomainCommand::remove() +{ + BSLS_ASSERT(SELECTION_ID_REMOVE == d_selectionId); + return d_remove.object(); +} + +inline +Void& DomainCommand::info() { BSLS_ASSERT(SELECTION_ID_INFO == d_selectionId); return d_info.object(); } -inline DomainQueue& DomainCommand::queue() +inline +DomainQueue& DomainCommand::queue() { BSLS_ASSERT(SELECTION_ID_QUEUE == d_selectionId); return d_queue.object(); } // ACCESSORS -inline int DomainCommand::selectionId() const +inline +int DomainCommand::selectionId() const { return d_selectionId; } @@ -44727,60 +45583,86 @@ template int DomainCommand::accessSelection(t_ACCESSOR& accessor) const { switch (d_selectionId) { - case SELECTION_ID_PURGE: + case SELECTION_ID_PURGE: return accessor(d_purge.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_PURGE]); - case SELECTION_ID_INFO: + SELECTION_INFO_ARRAY[SELECTION_INDEX_PURGE]); + case SELECTION_ID_REMOVE: + return accessor(d_remove.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_REMOVE]); + case SELECTION_ID_INFO: return accessor(d_info.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_INFO]); - case SELECTION_ID_QUEUE: + SELECTION_INFO_ARRAY[SELECTION_INDEX_INFO]); + case SELECTION_ID_QUEUE: return accessor(d_queue.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE]); - default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); return -1; + SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE]); + default: + BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); + return -1; } } -inline const Void& DomainCommand::purge() const +inline +const Void& DomainCommand::purge() const { BSLS_ASSERT(SELECTION_ID_PURGE == d_selectionId); return d_purge.object(); } -inline const Void& DomainCommand::info() const +inline +const Void& DomainCommand::remove() const +{ + BSLS_ASSERT(SELECTION_ID_REMOVE == d_selectionId); + return d_remove.object(); +} + +inline +const Void& DomainCommand::info() const { BSLS_ASSERT(SELECTION_ID_INFO == d_selectionId); return d_info.object(); } -inline const DomainQueue& DomainCommand::queue() const +inline +const DomainQueue& DomainCommand::queue() const { BSLS_ASSERT(SELECTION_ID_QUEUE == d_selectionId); return d_queue.object(); } -inline bool DomainCommand::isPurgeValue() const +inline +bool DomainCommand::isPurgeValue() const { return SELECTION_ID_PURGE == d_selectionId; } -inline bool DomainCommand::isInfoValue() const +inline +bool DomainCommand::isRemoveValue() const +{ + return SELECTION_ID_REMOVE == d_selectionId; +} + +inline +bool DomainCommand::isInfoValue() const { return SELECTION_ID_INFO == d_selectionId; } -inline bool DomainCommand::isQueueValue() const +inline +bool DomainCommand::isQueueValue() const { return SELECTION_ID_QUEUE == d_selectionId; } -inline bool DomainCommand::isUndefinedValue() const +inline +bool DomainCommand::isUndefinedValue() const { return SELECTION_ID_UNDEFINED == d_selectionId; } -// -------------------- -// class ElectorCommand -// -------------------- + + // -------------------- + // class ElectorCommand + // -------------------- // CLASS METHODS // PRIVATE ACCESSORS @@ -44791,31 +45673,33 @@ void ElectorCommand::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const using bslh::hashAppend; hashAppend(hashAlgorithm, this->selectionId()); switch (this->selectionId()) { - case Class::SELECTION_ID_SET_TUNABLE: + case Class::SELECTION_ID_SET_TUNABLE: hashAppend(hashAlgorithm, this->setTunable()); break; - case Class::SELECTION_ID_GET_TUNABLE: + case Class::SELECTION_ID_GET_TUNABLE: hashAppend(hashAlgorithm, this->getTunable()); break; - case Class::SELECTION_ID_LIST_TUNABLES: + case Class::SELECTION_ID_LIST_TUNABLES: hashAppend(hashAlgorithm, this->listTunables()); break; - default: BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); + default: + BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); } } -inline bool ElectorCommand::isEqualTo(const ElectorCommand& rhs) const +inline +bool ElectorCommand::isEqualTo(const ElectorCommand& rhs) const { typedef ElectorCommand Class; if (this->selectionId() == rhs.selectionId()) { switch (rhs.selectionId()) { - case Class::SELECTION_ID_SET_TUNABLE: + case Class::SELECTION_ID_SET_TUNABLE: return this->setTunable() == rhs.setTunable(); - case Class::SELECTION_ID_GET_TUNABLE: + case Class::SELECTION_ID_GET_TUNABLE: return this->getTunable() == rhs.getTunable(); - case Class::SELECTION_ID_LIST_TUNABLES: + case Class::SELECTION_ID_LIST_TUNABLES: return this->listTunables() == rhs.listTunables(); - default: + default: BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId()); return true; } @@ -44826,13 +45710,15 @@ inline bool ElectorCommand::isEqualTo(const ElectorCommand& rhs) const } // CREATORS -inline ElectorCommand::ElectorCommand(bslma::Allocator* basicAllocator) +inline +ElectorCommand::ElectorCommand(bslma::Allocator *basicAllocator) : d_selectionId(SELECTION_ID_UNDEFINED) , d_allocator_p(bslma::Default::allocator(basicAllocator)) { } -inline ElectorCommand::~ElectorCommand() +inline +ElectorCommand::~ElectorCommand() { reset(); } @@ -44842,42 +45728,45 @@ template int ElectorCommand::manipulateSelection(t_MANIPULATOR& manipulator) { switch (d_selectionId) { - case ElectorCommand::SELECTION_ID_SET_TUNABLE: + case ElectorCommand::SELECTION_ID_SET_TUNABLE: return manipulator(&d_setTunable.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_SET_TUNABLE]); - case ElectorCommand::SELECTION_ID_GET_TUNABLE: + SELECTION_INFO_ARRAY[SELECTION_INDEX_SET_TUNABLE]); + case ElectorCommand::SELECTION_ID_GET_TUNABLE: return manipulator(&d_getTunable.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_GET_TUNABLE]); - case ElectorCommand::SELECTION_ID_LIST_TUNABLES: - return manipulator( - &d_listTunables.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_LIST_TUNABLES]); - default: + SELECTION_INFO_ARRAY[SELECTION_INDEX_GET_TUNABLE]); + case ElectorCommand::SELECTION_ID_LIST_TUNABLES: + return manipulator(&d_listTunables.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_LIST_TUNABLES]); + default: BSLS_ASSERT(ElectorCommand::SELECTION_ID_UNDEFINED == d_selectionId); return -1; } } -inline SetTunable& ElectorCommand::setTunable() +inline +SetTunable& ElectorCommand::setTunable() { BSLS_ASSERT(SELECTION_ID_SET_TUNABLE == d_selectionId); return d_setTunable.object(); } -inline GetTunable& ElectorCommand::getTunable() +inline +GetTunable& ElectorCommand::getTunable() { BSLS_ASSERT(SELECTION_ID_GET_TUNABLE == d_selectionId); return d_getTunable.object(); } -inline Void& ElectorCommand::listTunables() +inline +Void& ElectorCommand::listTunables() { BSLS_ASSERT(SELECTION_ID_LIST_TUNABLES == d_selectionId); return d_listTunables.object(); } // ACCESSORS -inline int ElectorCommand::selectionId() const +inline +int ElectorCommand::selectionId() const { return d_selectionId; } @@ -44886,60 +45775,70 @@ template int ElectorCommand::accessSelection(t_ACCESSOR& accessor) const { switch (d_selectionId) { - case SELECTION_ID_SET_TUNABLE: + case SELECTION_ID_SET_TUNABLE: return accessor(d_setTunable.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_SET_TUNABLE]); - case SELECTION_ID_GET_TUNABLE: + SELECTION_INFO_ARRAY[SELECTION_INDEX_SET_TUNABLE]); + case SELECTION_ID_GET_TUNABLE: return accessor(d_getTunable.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_GET_TUNABLE]); - case SELECTION_ID_LIST_TUNABLES: + SELECTION_INFO_ARRAY[SELECTION_INDEX_GET_TUNABLE]); + case SELECTION_ID_LIST_TUNABLES: return accessor(d_listTunables.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_LIST_TUNABLES]); - default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); return -1; + SELECTION_INFO_ARRAY[SELECTION_INDEX_LIST_TUNABLES]); + default: + BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); + return -1; } } -inline const SetTunable& ElectorCommand::setTunable() const +inline +const SetTunable& ElectorCommand::setTunable() const { BSLS_ASSERT(SELECTION_ID_SET_TUNABLE == d_selectionId); return d_setTunable.object(); } -inline const GetTunable& ElectorCommand::getTunable() const +inline +const GetTunable& ElectorCommand::getTunable() const { BSLS_ASSERT(SELECTION_ID_GET_TUNABLE == d_selectionId); return d_getTunable.object(); } -inline const Void& ElectorCommand::listTunables() const +inline +const Void& ElectorCommand::listTunables() const { BSLS_ASSERT(SELECTION_ID_LIST_TUNABLES == d_selectionId); return d_listTunables.object(); } -inline bool ElectorCommand::isSetTunableValue() const +inline +bool ElectorCommand::isSetTunableValue() const { return SELECTION_ID_SET_TUNABLE == d_selectionId; } -inline bool ElectorCommand::isGetTunableValue() const +inline +bool ElectorCommand::isGetTunableValue() const { return SELECTION_ID_GET_TUNABLE == d_selectionId; } -inline bool ElectorCommand::isListTunablesValue() const +inline +bool ElectorCommand::isListTunablesValue() const { return SELECTION_ID_LIST_TUNABLES == d_selectionId; } -inline bool ElectorCommand::isUndefinedValue() const +inline +bool ElectorCommand::isUndefinedValue() const { return SELECTION_ID_UNDEFINED == d_selectionId; } -// --------------- -// class FileStore -// --------------- + + // --------------- + // class FileStore + // --------------- // PRIVATE ACCESSORS template @@ -44958,8 +45857,7 @@ int FileStore::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator(&d_partitionId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITION_ID]); + ret = manipulator(&d_partitionId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITION_ID]); if (ret) { return ret; } @@ -44969,8 +45867,7 @@ int FileStore::manipulateAttributes(t_MANIPULATOR& manipulator) return ret; } - ret = manipulator(&d_summary, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUMMARY]); + ret = manipulator(&d_summary, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUMMARY]); if (ret) { return ret; } @@ -44984,31 +45881,30 @@ int FileStore::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_PARTITION_ID: { - return manipulator(&d_partitionId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITION_ID]); - } - case ATTRIBUTE_ID_STATE: { - return manipulator(&d_state, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STATE]); - } - case ATTRIBUTE_ID_SUMMARY: { - return manipulator(&d_summary, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUMMARY]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_PARTITION_ID: { + return manipulator(&d_partitionId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITION_ID]); + } + case ATTRIBUTE_ID_STATE: { + return manipulator(&d_state, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STATE]); + } + case ATTRIBUTE_ID_SUMMARY: { + return manipulator(&d_summary, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUMMARY]); + } + default: + return NOT_FOUND; } } template -int FileStore::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int FileStore::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -45016,17 +45912,20 @@ int FileStore::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline int& FileStore::partitionId() +inline +int& FileStore::partitionId() { return d_partitionId; } -inline FileStoreState::Value& FileStore::state() +inline +FileStoreState::Value& FileStore::state() { return d_state; } -inline FileStoreSummary& FileStore::summary() +inline +FileStoreSummary& FileStore::summary() { return d_summary; } @@ -45037,8 +45936,7 @@ int FileStore::accessAttributes(t_ACCESSOR& accessor) const { int ret; - ret = accessor(d_partitionId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITION_ID]); + ret = accessor(d_partitionId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITION_ID]); if (ret) { return ret; } @@ -45062,55 +45960,60 @@ int FileStore::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_PARTITION_ID: { - return accessor(d_partitionId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITION_ID]); - } - case ATTRIBUTE_ID_STATE: { + case ATTRIBUTE_ID_PARTITION_ID: { + return accessor(d_partitionId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITION_ID]); + } + case ATTRIBUTE_ID_STATE: { return accessor(d_state, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STATE]); - } - case ATTRIBUTE_ID_SUMMARY: { - return accessor(d_summary, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUMMARY]); - } - default: return NOT_FOUND; + } + case ATTRIBUTE_ID_SUMMARY: { + return accessor(d_summary, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUMMARY]); + } + default: + return NOT_FOUND; } } template -int FileStore::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int FileStore::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline int FileStore::partitionId() const +inline +int FileStore::partitionId() const { return d_partitionId; } -inline FileStoreState::Value FileStore::state() const +inline +FileStoreState::Value FileStore::state() const { return d_state; } -inline const FileStoreSummary& FileStore::summary() const +inline +const FileStoreSummary& FileStore::summary() const { return d_summary; } -// ----------------- -// class QueueHandle -// ----------------- + + + // ----------------- + // class QueueHandle + // ----------------- // PRIVATE ACCESSORS template @@ -45123,7 +46026,8 @@ void QueueHandle::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const hashAppend(hashAlgorithm, this->subStreams()); } -inline bool QueueHandle::isEqualTo(const QueueHandle& rhs) const +inline +bool QueueHandle::isEqualTo(const QueueHandle& rhs) const { return this->clientDescription() == rhs.clientDescription() && this->parametersJson() == rhs.parametersJson() && @@ -45138,28 +46042,22 @@ int QueueHandle::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator( - &d_clientDescription, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLIENT_DESCRIPTION]); + ret = manipulator(&d_clientDescription, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLIENT_DESCRIPTION]); if (ret) { return ret; } - ret = manipulator(&d_parametersJson, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARAMETERS_JSON]); + ret = manipulator(&d_parametersJson, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARAMETERS_JSON]); if (ret) { return ret; } - ret = manipulator( - &d_isClientClusterMember, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_CLIENT_CLUSTER_MEMBER]); + ret = manipulator(&d_isClientClusterMember, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_CLIENT_CLUSTER_MEMBER]); if (ret) { return ret; } - ret = manipulator(&d_subStreams, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUB_STREAMS]); + ret = manipulator(&d_subStreams, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUB_STREAMS]); if (ret) { return ret; } @@ -45173,38 +46071,33 @@ int QueueHandle::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_CLIENT_DESCRIPTION: { - return manipulator( - &d_clientDescription, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLIENT_DESCRIPTION]); - } - case ATTRIBUTE_ID_PARAMETERS_JSON: { - return manipulator( - &d_parametersJson, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARAMETERS_JSON]); - } - case ATTRIBUTE_ID_IS_CLIENT_CLUSTER_MEMBER: { - return manipulator( - &d_isClientClusterMember, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_CLIENT_CLUSTER_MEMBER]); - } - case ATTRIBUTE_ID_SUB_STREAMS: { - return manipulator(&d_subStreams, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUB_STREAMS]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_CLIENT_DESCRIPTION: { + return manipulator(&d_clientDescription, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLIENT_DESCRIPTION]); + } + case ATTRIBUTE_ID_PARAMETERS_JSON: { + return manipulator(&d_parametersJson, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARAMETERS_JSON]); + } + case ATTRIBUTE_ID_IS_CLIENT_CLUSTER_MEMBER: { + return manipulator(&d_isClientClusterMember, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_CLIENT_CLUSTER_MEMBER]); + } + case ATTRIBUTE_ID_SUB_STREAMS: { + return manipulator(&d_subStreams, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUB_STREAMS]); + } + default: + return NOT_FOUND; } } template -int QueueHandle::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int QueueHandle::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -45212,22 +46105,26 @@ int QueueHandle::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::string& QueueHandle::clientDescription() +inline +bsl::string& QueueHandle::clientDescription() { return d_clientDescription; } -inline bsl::string& QueueHandle::parametersJson() +inline +bsl::string& QueueHandle::parametersJson() { return d_parametersJson; } -inline bool& QueueHandle::isClientClusterMember() +inline +bool& QueueHandle::isClientClusterMember() { return d_isClientClusterMember; } -inline bsl::vector& QueueHandle::subStreams() +inline +bsl::vector& QueueHandle::subStreams() { return d_subStreams; } @@ -45238,27 +46135,22 @@ int QueueHandle::accessAttributes(t_ACCESSOR& accessor) const { int ret; - ret = accessor(d_clientDescription, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLIENT_DESCRIPTION]); + ret = accessor(d_clientDescription, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLIENT_DESCRIPTION]); if (ret) { return ret; } - ret = accessor(d_parametersJson, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARAMETERS_JSON]); + ret = accessor(d_parametersJson, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARAMETERS_JSON]); if (ret) { return ret; } - ret = accessor( - d_isClientClusterMember, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_CLIENT_CLUSTER_MEMBER]); + ret = accessor(d_isClientClusterMember, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_CLIENT_CLUSTER_MEMBER]); if (ret) { return ret; } - ret = accessor(d_subStreams, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUB_STREAMS]); + ret = accessor(d_subStreams, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUB_STREAMS]); if (ret) { return ret; } @@ -45272,67 +46164,69 @@ int QueueHandle::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_CLIENT_DESCRIPTION: { - return accessor( - d_clientDescription, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLIENT_DESCRIPTION]); - } - case ATTRIBUTE_ID_PARAMETERS_JSON: { - return accessor(d_parametersJson, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARAMETERS_JSON]); - } - case ATTRIBUTE_ID_IS_CLIENT_CLUSTER_MEMBER: { - return accessor( - d_isClientClusterMember, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_CLIENT_CLUSTER_MEMBER]); - } - case ATTRIBUTE_ID_SUB_STREAMS: { - return accessor(d_subStreams, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUB_STREAMS]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_CLIENT_DESCRIPTION: { + return accessor(d_clientDescription, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLIENT_DESCRIPTION]); + } + case ATTRIBUTE_ID_PARAMETERS_JSON: { + return accessor(d_parametersJson, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARAMETERS_JSON]); + } + case ATTRIBUTE_ID_IS_CLIENT_CLUSTER_MEMBER: { + return accessor(d_isClientClusterMember, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_CLIENT_CLUSTER_MEMBER]); + } + case ATTRIBUTE_ID_SUB_STREAMS: { + return accessor(d_subStreams, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUB_STREAMS]); + } + default: + return NOT_FOUND; } } template -int QueueHandle::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int QueueHandle::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::string& QueueHandle::clientDescription() const +inline +const bsl::string& QueueHandle::clientDescription() const { return d_clientDescription; } -inline const bsl::string& QueueHandle::parametersJson() const +inline +const bsl::string& QueueHandle::parametersJson() const { return d_parametersJson; } -inline bool QueueHandle::isClientClusterMember() const +inline +bool QueueHandle::isClientClusterMember() const { return d_isClientClusterMember; } -inline const bsl::vector& QueueHandle::subStreams() const +inline +const bsl::vector& QueueHandle::subStreams() const { return d_subStreams; } -// ------------------------ -// class ReplicationCommand -// ------------------------ + + + // ------------------------ + // class ReplicationCommand + // ------------------------ // CLASS METHODS // PRIVATE ACCESSORS @@ -45343,31 +46237,33 @@ void ReplicationCommand::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const using bslh::hashAppend; hashAppend(hashAlgorithm, this->selectionId()); switch (this->selectionId()) { - case Class::SELECTION_ID_SET_TUNABLE: + case Class::SELECTION_ID_SET_TUNABLE: hashAppend(hashAlgorithm, this->setTunable()); break; - case Class::SELECTION_ID_GET_TUNABLE: + case Class::SELECTION_ID_GET_TUNABLE: hashAppend(hashAlgorithm, this->getTunable()); break; - case Class::SELECTION_ID_LIST_TUNABLES: + case Class::SELECTION_ID_LIST_TUNABLES: hashAppend(hashAlgorithm, this->listTunables()); break; - default: BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); + default: + BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); } } -inline bool ReplicationCommand::isEqualTo(const ReplicationCommand& rhs) const +inline +bool ReplicationCommand::isEqualTo(const ReplicationCommand& rhs) const { typedef ReplicationCommand Class; if (this->selectionId() == rhs.selectionId()) { switch (rhs.selectionId()) { - case Class::SELECTION_ID_SET_TUNABLE: + case Class::SELECTION_ID_SET_TUNABLE: return this->setTunable() == rhs.setTunable(); - case Class::SELECTION_ID_GET_TUNABLE: + case Class::SELECTION_ID_GET_TUNABLE: return this->getTunable() == rhs.getTunable(); - case Class::SELECTION_ID_LIST_TUNABLES: + case Class::SELECTION_ID_LIST_TUNABLES: return this->listTunables() == rhs.listTunables(); - default: + default: BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId()); return true; } @@ -45378,13 +46274,15 @@ inline bool ReplicationCommand::isEqualTo(const ReplicationCommand& rhs) const } // CREATORS -inline ReplicationCommand::ReplicationCommand(bslma::Allocator* basicAllocator) +inline +ReplicationCommand::ReplicationCommand(bslma::Allocator *basicAllocator) : d_selectionId(SELECTION_ID_UNDEFINED) , d_allocator_p(bslma::Default::allocator(basicAllocator)) { } -inline ReplicationCommand::~ReplicationCommand() +inline +ReplicationCommand::~ReplicationCommand() { reset(); } @@ -45394,43 +46292,45 @@ template int ReplicationCommand::manipulateSelection(t_MANIPULATOR& manipulator) { switch (d_selectionId) { - case ReplicationCommand::SELECTION_ID_SET_TUNABLE: + case ReplicationCommand::SELECTION_ID_SET_TUNABLE: return manipulator(&d_setTunable.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_SET_TUNABLE]); - case ReplicationCommand::SELECTION_ID_GET_TUNABLE: + SELECTION_INFO_ARRAY[SELECTION_INDEX_SET_TUNABLE]); + case ReplicationCommand::SELECTION_ID_GET_TUNABLE: return manipulator(&d_getTunable.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_GET_TUNABLE]); - case ReplicationCommand::SELECTION_ID_LIST_TUNABLES: - return manipulator( - &d_listTunables.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_LIST_TUNABLES]); - default: - BSLS_ASSERT(ReplicationCommand::SELECTION_ID_UNDEFINED == - d_selectionId); + SELECTION_INFO_ARRAY[SELECTION_INDEX_GET_TUNABLE]); + case ReplicationCommand::SELECTION_ID_LIST_TUNABLES: + return manipulator(&d_listTunables.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_LIST_TUNABLES]); + default: + BSLS_ASSERT(ReplicationCommand::SELECTION_ID_UNDEFINED == d_selectionId); return -1; } } -inline SetTunable& ReplicationCommand::setTunable() +inline +SetTunable& ReplicationCommand::setTunable() { BSLS_ASSERT(SELECTION_ID_SET_TUNABLE == d_selectionId); return d_setTunable.object(); } -inline GetTunable& ReplicationCommand::getTunable() +inline +GetTunable& ReplicationCommand::getTunable() { BSLS_ASSERT(SELECTION_ID_GET_TUNABLE == d_selectionId); return d_getTunable.object(); } -inline Void& ReplicationCommand::listTunables() +inline +Void& ReplicationCommand::listTunables() { BSLS_ASSERT(SELECTION_ID_LIST_TUNABLES == d_selectionId); return d_listTunables.object(); } // ACCESSORS -inline int ReplicationCommand::selectionId() const +inline +int ReplicationCommand::selectionId() const { return d_selectionId; } @@ -45439,60 +46339,70 @@ template int ReplicationCommand::accessSelection(t_ACCESSOR& accessor) const { switch (d_selectionId) { - case SELECTION_ID_SET_TUNABLE: + case SELECTION_ID_SET_TUNABLE: return accessor(d_setTunable.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_SET_TUNABLE]); - case SELECTION_ID_GET_TUNABLE: + SELECTION_INFO_ARRAY[SELECTION_INDEX_SET_TUNABLE]); + case SELECTION_ID_GET_TUNABLE: return accessor(d_getTunable.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_GET_TUNABLE]); - case SELECTION_ID_LIST_TUNABLES: + SELECTION_INFO_ARRAY[SELECTION_INDEX_GET_TUNABLE]); + case SELECTION_ID_LIST_TUNABLES: return accessor(d_listTunables.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_LIST_TUNABLES]); - default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); return -1; + SELECTION_INFO_ARRAY[SELECTION_INDEX_LIST_TUNABLES]); + default: + BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); + return -1; } } -inline const SetTunable& ReplicationCommand::setTunable() const +inline +const SetTunable& ReplicationCommand::setTunable() const { BSLS_ASSERT(SELECTION_ID_SET_TUNABLE == d_selectionId); return d_setTunable.object(); } -inline const GetTunable& ReplicationCommand::getTunable() const +inline +const GetTunable& ReplicationCommand::getTunable() const { BSLS_ASSERT(SELECTION_ID_GET_TUNABLE == d_selectionId); return d_getTunable.object(); } -inline const Void& ReplicationCommand::listTunables() const +inline +const Void& ReplicationCommand::listTunables() const { BSLS_ASSERT(SELECTION_ID_LIST_TUNABLES == d_selectionId); return d_listTunables.object(); } -inline bool ReplicationCommand::isSetTunableValue() const +inline +bool ReplicationCommand::isSetTunableValue() const { return SELECTION_ID_SET_TUNABLE == d_selectionId; } -inline bool ReplicationCommand::isGetTunableValue() const +inline +bool ReplicationCommand::isGetTunableValue() const { return SELECTION_ID_GET_TUNABLE == d_selectionId; } -inline bool ReplicationCommand::isListTunablesValue() const +inline +bool ReplicationCommand::isListTunablesValue() const { return SELECTION_ID_LIST_TUNABLES == d_selectionId; } -inline bool ReplicationCommand::isUndefinedValue() const +inline +bool ReplicationCommand::isUndefinedValue() const { return SELECTION_ID_UNDEFINED == d_selectionId; } -// ----------------- -// class StatCommand -// ----------------- + + // ----------------- + // class StatCommand + // ----------------- // CLASS METHODS // PRIVATE ACCESSORS @@ -45503,35 +46413,38 @@ void StatCommand::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const using bslh::hashAppend; hashAppend(hashAlgorithm, this->selectionId()); switch (this->selectionId()) { - case Class::SELECTION_ID_SHOW: + case Class::SELECTION_ID_SHOW: hashAppend(hashAlgorithm, this->show()); break; - case Class::SELECTION_ID_SET_TUNABLE: + case Class::SELECTION_ID_SET_TUNABLE: hashAppend(hashAlgorithm, this->setTunable()); break; - case Class::SELECTION_ID_GET_TUNABLE: + case Class::SELECTION_ID_GET_TUNABLE: hashAppend(hashAlgorithm, this->getTunable()); break; - case Class::SELECTION_ID_LIST_TUNABLES: + case Class::SELECTION_ID_LIST_TUNABLES: hashAppend(hashAlgorithm, this->listTunables()); break; - default: BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); + default: + BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); } } -inline bool StatCommand::isEqualTo(const StatCommand& rhs) const +inline +bool StatCommand::isEqualTo(const StatCommand& rhs) const { typedef StatCommand Class; if (this->selectionId() == rhs.selectionId()) { switch (rhs.selectionId()) { - case Class::SELECTION_ID_SHOW: return this->show() == rhs.show(); - case Class::SELECTION_ID_SET_TUNABLE: + case Class::SELECTION_ID_SHOW: + return this->show() == rhs.show(); + case Class::SELECTION_ID_SET_TUNABLE: return this->setTunable() == rhs.setTunable(); - case Class::SELECTION_ID_GET_TUNABLE: + case Class::SELECTION_ID_GET_TUNABLE: return this->getTunable() == rhs.getTunable(); - case Class::SELECTION_ID_LIST_TUNABLES: + case Class::SELECTION_ID_LIST_TUNABLES: return this->listTunables() == rhs.listTunables(); - default: + default: BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId()); return true; } @@ -45542,13 +46455,15 @@ inline bool StatCommand::isEqualTo(const StatCommand& rhs) const } // CREATORS -inline StatCommand::StatCommand(bslma::Allocator* basicAllocator) +inline +StatCommand::StatCommand(bslma::Allocator *basicAllocator) : d_selectionId(SELECTION_ID_UNDEFINED) , d_allocator_p(bslma::Default::allocator(basicAllocator)) { } -inline StatCommand::~StatCommand() +inline +StatCommand::~StatCommand() { reset(); } @@ -45558,51 +46473,55 @@ template int StatCommand::manipulateSelection(t_MANIPULATOR& manipulator) { switch (d_selectionId) { - case StatCommand::SELECTION_ID_SHOW: + case StatCommand::SELECTION_ID_SHOW: return manipulator(&d_show.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_SHOW]); - case StatCommand::SELECTION_ID_SET_TUNABLE: + SELECTION_INFO_ARRAY[SELECTION_INDEX_SHOW]); + case StatCommand::SELECTION_ID_SET_TUNABLE: return manipulator(&d_setTunable.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_SET_TUNABLE]); - case StatCommand::SELECTION_ID_GET_TUNABLE: + SELECTION_INFO_ARRAY[SELECTION_INDEX_SET_TUNABLE]); + case StatCommand::SELECTION_ID_GET_TUNABLE: return manipulator(&d_getTunable.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_GET_TUNABLE]); - case StatCommand::SELECTION_ID_LIST_TUNABLES: - return manipulator( - &d_listTunables.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_LIST_TUNABLES]); - default: + SELECTION_INFO_ARRAY[SELECTION_INDEX_GET_TUNABLE]); + case StatCommand::SELECTION_ID_LIST_TUNABLES: + return manipulator(&d_listTunables.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_LIST_TUNABLES]); + default: BSLS_ASSERT(StatCommand::SELECTION_ID_UNDEFINED == d_selectionId); return -1; } } -inline Void& StatCommand::show() +inline +Void& StatCommand::show() { BSLS_ASSERT(SELECTION_ID_SHOW == d_selectionId); return d_show.object(); } -inline SetTunable& StatCommand::setTunable() +inline +SetTunable& StatCommand::setTunable() { BSLS_ASSERT(SELECTION_ID_SET_TUNABLE == d_selectionId); return d_setTunable.object(); } -inline bsl::string& StatCommand::getTunable() +inline +bsl::string& StatCommand::getTunable() { BSLS_ASSERT(SELECTION_ID_GET_TUNABLE == d_selectionId); return d_getTunable.object(); } -inline Void& StatCommand::listTunables() +inline +Void& StatCommand::listTunables() { BSLS_ASSERT(SELECTION_ID_LIST_TUNABLES == d_selectionId); return d_listTunables.object(); } // ACCESSORS -inline int StatCommand::selectionId() const +inline +int StatCommand::selectionId() const { return d_selectionId; } @@ -45611,74 +46530,86 @@ template int StatCommand::accessSelection(t_ACCESSOR& accessor) const { switch (d_selectionId) { - case SELECTION_ID_SHOW: + case SELECTION_ID_SHOW: return accessor(d_show.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_SHOW]); - case SELECTION_ID_SET_TUNABLE: + SELECTION_INFO_ARRAY[SELECTION_INDEX_SHOW]); + case SELECTION_ID_SET_TUNABLE: return accessor(d_setTunable.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_SET_TUNABLE]); - case SELECTION_ID_GET_TUNABLE: + SELECTION_INFO_ARRAY[SELECTION_INDEX_SET_TUNABLE]); + case SELECTION_ID_GET_TUNABLE: return accessor(d_getTunable.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_GET_TUNABLE]); - case SELECTION_ID_LIST_TUNABLES: + SELECTION_INFO_ARRAY[SELECTION_INDEX_GET_TUNABLE]); + case SELECTION_ID_LIST_TUNABLES: return accessor(d_listTunables.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_LIST_TUNABLES]); - default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); return -1; + SELECTION_INFO_ARRAY[SELECTION_INDEX_LIST_TUNABLES]); + default: + BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); + return -1; } } -inline const Void& StatCommand::show() const +inline +const Void& StatCommand::show() const { BSLS_ASSERT(SELECTION_ID_SHOW == d_selectionId); return d_show.object(); } -inline const SetTunable& StatCommand::setTunable() const +inline +const SetTunable& StatCommand::setTunable() const { BSLS_ASSERT(SELECTION_ID_SET_TUNABLE == d_selectionId); return d_setTunable.object(); } -inline const bsl::string& StatCommand::getTunable() const +inline +const bsl::string& StatCommand::getTunable() const { BSLS_ASSERT(SELECTION_ID_GET_TUNABLE == d_selectionId); return d_getTunable.object(); } -inline const Void& StatCommand::listTunables() const +inline +const Void& StatCommand::listTunables() const { BSLS_ASSERT(SELECTION_ID_LIST_TUNABLES == d_selectionId); return d_listTunables.object(); } -inline bool StatCommand::isShowValue() const +inline +bool StatCommand::isShowValue() const { return SELECTION_ID_SHOW == d_selectionId; } -inline bool StatCommand::isSetTunableValue() const +inline +bool StatCommand::isSetTunableValue() const { return SELECTION_ID_SET_TUNABLE == d_selectionId; } -inline bool StatCommand::isGetTunableValue() const +inline +bool StatCommand::isGetTunableValue() const { return SELECTION_ID_GET_TUNABLE == d_selectionId; } -inline bool StatCommand::isListTunablesValue() const +inline +bool StatCommand::isListTunablesValue() const { return SELECTION_ID_LIST_TUNABLES == d_selectionId; } -inline bool StatCommand::isUndefinedValue() const +inline +bool StatCommand::isUndefinedValue() const { return SELECTION_ID_UNDEFINED == d_selectionId; } -// ----------------------- -// class SubscriptionGroup -// ----------------------- + + // ----------------------- + // class SubscriptionGroup + // ----------------------- // PRIVATE ACCESSORS template @@ -45691,9 +46622,11 @@ void SubscriptionGroup::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const hashAppend(hashAlgorithm, this->priorityGroup()); } -inline bool SubscriptionGroup::isEqualTo(const SubscriptionGroup& rhs) const +inline +bool SubscriptionGroup::isEqualTo(const SubscriptionGroup& rhs) const { - return this->id() == rhs.id() && this->expression() == rhs.expression() && + return this->id() == rhs.id() && + this->expression() == rhs.expression() && this->upstreamSubQueueId() == rhs.upstreamSubQueueId() && this->priorityGroup() == rhs.priorityGroup(); } @@ -45710,21 +46643,17 @@ int SubscriptionGroup::manipulateAttributes(t_MANIPULATOR& manipulator) return ret; } - ret = manipulator(&d_expression, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_EXPRESSION]); + ret = manipulator(&d_expression, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_EXPRESSION]); if (ret) { return ret; } - ret = manipulator( - &d_upstreamSubQueueId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_UPSTREAM_SUB_QUEUE_ID]); + ret = manipulator(&d_upstreamSubQueueId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_UPSTREAM_SUB_QUEUE_ID]); if (ret) { return ret; } - ret = manipulator(&d_priorityGroup, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIORITY_GROUP]); + ret = manipulator(&d_priorityGroup, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIORITY_GROUP]); if (ret) { return ret; } @@ -45738,36 +46667,33 @@ int SubscriptionGroup::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_ID: { + case ATTRIBUTE_ID_ID: { return manipulator(&d_id, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ID]); - } - case ATTRIBUTE_ID_EXPRESSION: { - return manipulator(&d_expression, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_EXPRESSION]); - } - case ATTRIBUTE_ID_UPSTREAM_SUB_QUEUE_ID: { - return manipulator( - &d_upstreamSubQueueId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_UPSTREAM_SUB_QUEUE_ID]); - } - case ATTRIBUTE_ID_PRIORITY_GROUP: { - return manipulator( - &d_priorityGroup, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIORITY_GROUP]); - } - default: return NOT_FOUND; + } + case ATTRIBUTE_ID_EXPRESSION: { + return manipulator(&d_expression, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_EXPRESSION]); + } + case ATTRIBUTE_ID_UPSTREAM_SUB_QUEUE_ID: { + return manipulator(&d_upstreamSubQueueId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_UPSTREAM_SUB_QUEUE_ID]); + } + case ATTRIBUTE_ID_PRIORITY_GROUP: { + return manipulator(&d_priorityGroup, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIORITY_GROUP]); + } + default: + return NOT_FOUND; } } template -int SubscriptionGroup::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int SubscriptionGroup::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -45775,22 +46701,26 @@ int SubscriptionGroup::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline unsigned int& SubscriptionGroup::id() +inline +unsigned int& SubscriptionGroup::id() { return d_id; } -inline bsl::string& SubscriptionGroup::expression() +inline +bsl::string& SubscriptionGroup::expression() { return d_expression; } -inline unsigned int& SubscriptionGroup::upstreamSubQueueId() +inline +unsigned int& SubscriptionGroup::upstreamSubQueueId() { return d_upstreamSubQueueId; } -inline bdlb::NullableValue& SubscriptionGroup::priorityGroup() +inline +bdlb::NullableValue& SubscriptionGroup::priorityGroup() { return d_priorityGroup; } @@ -45806,21 +46736,17 @@ int SubscriptionGroup::accessAttributes(t_ACCESSOR& accessor) const return ret; } - ret = accessor(d_expression, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_EXPRESSION]); + ret = accessor(d_expression, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_EXPRESSION]); if (ret) { return ret; } - ret = accessor( - d_upstreamSubQueueId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_UPSTREAM_SUB_QUEUE_ID]); + ret = accessor(d_upstreamSubQueueId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_UPSTREAM_SUB_QUEUE_ID]); if (ret) { return ret; } - ret = accessor(d_priorityGroup, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIORITY_GROUP]); + ret = accessor(d_priorityGroup, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIORITY_GROUP]); if (ret) { return ret; } @@ -45834,66 +46760,69 @@ int SubscriptionGroup::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_ID: { + case ATTRIBUTE_ID_ID: { return accessor(d_id, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ID]); - } - case ATTRIBUTE_ID_EXPRESSION: { - return accessor(d_expression, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_EXPRESSION]); - } - case ATTRIBUTE_ID_UPSTREAM_SUB_QUEUE_ID: { - return accessor( - d_upstreamSubQueueId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_UPSTREAM_SUB_QUEUE_ID]); - } - case ATTRIBUTE_ID_PRIORITY_GROUP: { - return accessor(d_priorityGroup, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIORITY_GROUP]); - } - default: return NOT_FOUND; + } + case ATTRIBUTE_ID_EXPRESSION: { + return accessor(d_expression, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_EXPRESSION]); + } + case ATTRIBUTE_ID_UPSTREAM_SUB_QUEUE_ID: { + return accessor(d_upstreamSubQueueId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_UPSTREAM_SUB_QUEUE_ID]); + } + case ATTRIBUTE_ID_PRIORITY_GROUP: { + return accessor(d_priorityGroup, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIORITY_GROUP]); + } + default: + return NOT_FOUND; } } template -int SubscriptionGroup::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int SubscriptionGroup::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline unsigned int SubscriptionGroup::id() const +inline +unsigned int SubscriptionGroup::id() const { return d_id; } -inline const bsl::string& SubscriptionGroup::expression() const +inline +const bsl::string& SubscriptionGroup::expression() const { return d_expression; } -inline unsigned int SubscriptionGroup::upstreamSubQueueId() const +inline +unsigned int SubscriptionGroup::upstreamSubQueueId() const { return d_upstreamSubQueueId; } -inline const bdlb::NullableValue& -SubscriptionGroup::priorityGroup() const +inline +const bdlb::NullableValue& SubscriptionGroup::priorityGroup() const { return d_priorityGroup; } -// -------------- -// class Tunables -// -------------- + + + // -------------- + // class Tunables + // -------------- // CLASS METHODS // MANIPULATORS @@ -45902,8 +46831,7 @@ int Tunables::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator(&d_tunables, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_TUNABLES]); + ret = manipulator(&d_tunables, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_TUNABLES]); if (ret) { return ret; } @@ -45917,23 +46845,24 @@ int Tunables::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_TUNABLES: { - return manipulator(&d_tunables, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_TUNABLES]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_TUNABLES: { + return manipulator(&d_tunables, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_TUNABLES]); + } + default: + return NOT_FOUND; } } template -int Tunables::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int Tunables::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -45941,7 +46870,8 @@ int Tunables::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::vector& Tunables::tunables() +inline +bsl::vector& Tunables::tunables() { return d_tunables; } @@ -45966,38 +46896,42 @@ int Tunables::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_TUNABLES: { - return accessor(d_tunables, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_TUNABLES]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_TUNABLES: { + return accessor(d_tunables, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_TUNABLES]); + } + default: + return NOT_FOUND; } } template -int Tunables::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int Tunables::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::vector& Tunables::tunables() const +inline +const bsl::vector& Tunables::tunables() const { return d_tunables; } -// ------------------------- -// class ClusterStateCommand -// ------------------------- + + + // ------------------------- + // class ClusterStateCommand + // ------------------------- // CLASS METHODS // PRIVATE ACCESSORS @@ -46008,22 +46942,23 @@ void ClusterStateCommand::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const using bslh::hashAppend; hashAppend(hashAlgorithm, this->selectionId()); switch (this->selectionId()) { - case Class::SELECTION_ID_ELECTOR: + case Class::SELECTION_ID_ELECTOR: hashAppend(hashAlgorithm, this->elector()); break; - default: BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); + default: + BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); } } -inline bool -ClusterStateCommand::isEqualTo(const ClusterStateCommand& rhs) const +inline +bool ClusterStateCommand::isEqualTo(const ClusterStateCommand& rhs) const { typedef ClusterStateCommand Class; if (this->selectionId() == rhs.selectionId()) { switch (rhs.selectionId()) { - case Class::SELECTION_ID_ELECTOR: + case Class::SELECTION_ID_ELECTOR: return this->elector() == rhs.elector(); - default: + default: BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId()); return true; } @@ -46034,14 +46969,15 @@ ClusterStateCommand::isEqualTo(const ClusterStateCommand& rhs) const } // CREATORS -inline ClusterStateCommand::ClusterStateCommand( - bslma::Allocator* basicAllocator) +inline +ClusterStateCommand::ClusterStateCommand(bslma::Allocator *basicAllocator) : d_selectionId(SELECTION_ID_UNDEFINED) , d_allocator_p(bslma::Default::allocator(basicAllocator)) { } -inline ClusterStateCommand::~ClusterStateCommand() +inline +ClusterStateCommand::~ClusterStateCommand() { reset(); } @@ -46051,24 +46987,25 @@ template int ClusterStateCommand::manipulateSelection(t_MANIPULATOR& manipulator) { switch (d_selectionId) { - case ClusterStateCommand::SELECTION_ID_ELECTOR: + case ClusterStateCommand::SELECTION_ID_ELECTOR: return manipulator(&d_elector.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_ELECTOR]); - default: - BSLS_ASSERT(ClusterStateCommand::SELECTION_ID_UNDEFINED == - d_selectionId); + SELECTION_INFO_ARRAY[SELECTION_INDEX_ELECTOR]); + default: + BSLS_ASSERT(ClusterStateCommand::SELECTION_ID_UNDEFINED == d_selectionId); return -1; } } -inline ElectorCommand& ClusterStateCommand::elector() +inline +ElectorCommand& ClusterStateCommand::elector() { BSLS_ASSERT(SELECTION_ID_ELECTOR == d_selectionId); return d_elector.object(); } // ACCESSORS -inline int ClusterStateCommand::selectionId() const +inline +int ClusterStateCommand::selectionId() const { return d_selectionId; } @@ -46077,32 +47014,38 @@ template int ClusterStateCommand::accessSelection(t_ACCESSOR& accessor) const { switch (d_selectionId) { - case SELECTION_ID_ELECTOR: + case SELECTION_ID_ELECTOR: return accessor(d_elector.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_ELECTOR]); - default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); return -1; + SELECTION_INFO_ARRAY[SELECTION_INDEX_ELECTOR]); + default: + BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); + return -1; } } -inline const ElectorCommand& ClusterStateCommand::elector() const +inline +const ElectorCommand& ClusterStateCommand::elector() const { BSLS_ASSERT(SELECTION_ID_ELECTOR == d_selectionId); return d_elector.object(); } -inline bool ClusterStateCommand::isElectorValue() const +inline +bool ClusterStateCommand::isElectorValue() const { return SELECTION_ID_ELECTOR == d_selectionId; } -inline bool ClusterStateCommand::isUndefinedValue() const +inline +bool ClusterStateCommand::isUndefinedValue() const { return SELECTION_ID_UNDEFINED == d_selectionId; } -// --------------------------- -// class ClusterStorageSummary -// --------------------------- + + // --------------------------- + // class ClusterStorageSummary + // --------------------------- // CLASS METHODS // MANIPULATORS @@ -46111,15 +47054,12 @@ int ClusterStorageSummary::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator( - &d_clusterFileStoreLocation, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTER_FILE_STORE_LOCATION]); + ret = manipulator(&d_clusterFileStoreLocation, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTER_FILE_STORE_LOCATION]); if (ret) { return ret; } - ret = manipulator(&d_fileStores, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_FILE_STORES]); + ret = manipulator(&d_fileStores, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_FILE_STORES]); if (ret) { return ret; } @@ -46128,34 +47068,32 @@ int ClusterStorageSummary::manipulateAttributes(t_MANIPULATOR& manipulator) } template -int ClusterStorageSummary::manipulateAttribute(t_MANIPULATOR& manipulator, - int id) +int ClusterStorageSummary::manipulateAttribute(t_MANIPULATOR& manipulator, int id) { enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_CLUSTER_FILE_STORE_LOCATION: { - return manipulator( - &d_clusterFileStoreLocation, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTER_FILE_STORE_LOCATION]); - } - case ATTRIBUTE_ID_FILE_STORES: { - return manipulator(&d_fileStores, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_FILE_STORES]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_CLUSTER_FILE_STORE_LOCATION: { + return manipulator(&d_clusterFileStoreLocation, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTER_FILE_STORE_LOCATION]); + } + case ATTRIBUTE_ID_FILE_STORES: { + return manipulator(&d_fileStores, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_FILE_STORES]); + } + default: + return NOT_FOUND; } } template -int ClusterStorageSummary::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int ClusterStorageSummary::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -46163,12 +47101,14 @@ int ClusterStorageSummary::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::string& ClusterStorageSummary::clusterFileStoreLocation() +inline +bsl::string& ClusterStorageSummary::clusterFileStoreLocation() { return d_clusterFileStoreLocation; } -inline bsl::vector& ClusterStorageSummary::fileStores() +inline +bsl::vector& ClusterStorageSummary::fileStores() { return d_fileStores; } @@ -46179,15 +47119,12 @@ int ClusterStorageSummary::accessAttributes(t_ACCESSOR& accessor) const { int ret; - ret = accessor( - d_clusterFileStoreLocation, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTER_FILE_STORE_LOCATION]); + ret = accessor(d_clusterFileStoreLocation, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTER_FILE_STORE_LOCATION]); if (ret) { return ret; } - ret = accessor(d_fileStores, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_FILE_STORES]); + ret = accessor(d_fileStores, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_FILE_STORES]); if (ret) { return ret; } @@ -46201,49 +47138,51 @@ int ClusterStorageSummary::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_CLUSTER_FILE_STORE_LOCATION: { - return accessor( - d_clusterFileStoreLocation, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTER_FILE_STORE_LOCATION]); - } - case ATTRIBUTE_ID_FILE_STORES: { - return accessor(d_fileStores, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_FILE_STORES]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_CLUSTER_FILE_STORE_LOCATION: { + return accessor(d_clusterFileStoreLocation, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTER_FILE_STORE_LOCATION]); + } + case ATTRIBUTE_ID_FILE_STORES: { + return accessor(d_fileStores, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_FILE_STORES]); + } + default: + return NOT_FOUND; } } template -int ClusterStorageSummary::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int ClusterStorageSummary::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::string& -ClusterStorageSummary::clusterFileStoreLocation() const +inline +const bsl::string& ClusterStorageSummary::clusterFileStoreLocation() const { return d_clusterFileStoreLocation; } -inline const bsl::vector& ClusterStorageSummary::fileStores() const +inline +const bsl::vector& ClusterStorageSummary::fileStores() const { return d_fileStores; } -// ------------ -// class Domain -// ------------ + + + // ------------ + // class Domain + // ------------ // CLASS METHODS // MANIPULATORS @@ -46257,8 +47196,7 @@ int Domain::manipulateAttributes(t_MANIPULATOR& manipulator) return ret; } - ret = manipulator(&d_command, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND]); + ret = manipulator(&d_command, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND]); if (ret) { return ret; } @@ -46272,27 +47210,27 @@ int Domain::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_NAME: { - return manipulator(&d_name, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]); - } - case ATTRIBUTE_ID_COMMAND: { - return manipulator(&d_command, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_NAME: { + return manipulator(&d_name, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]); + } + case ATTRIBUTE_ID_COMMAND: { + return manipulator(&d_command, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND]); + } + default: + return NOT_FOUND; } } template -int Domain::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int Domain::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -46300,12 +47238,14 @@ int Domain::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::string& Domain::name() +inline +bsl::string& Domain::name() { return d_name; } -inline DomainCommand& Domain::command() +inline +DomainCommand& Domain::command() { return d_command; } @@ -46335,46 +47275,51 @@ int Domain::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_NAME: { + case ATTRIBUTE_ID_NAME: { return accessor(d_name, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]); - } - case ATTRIBUTE_ID_COMMAND: { - return accessor(d_command, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND]); - } - default: return NOT_FOUND; + } + case ATTRIBUTE_ID_COMMAND: { + return accessor(d_command, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND]); + } + default: + return NOT_FOUND; } } template -int Domain::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int Domain::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::string& Domain::name() const +inline +const bsl::string& Domain::name() const { return d_name; } -inline const DomainCommand& Domain::command() const +inline +const DomainCommand& Domain::command() const { return d_command; } -// ------------------- -// class ElectorResult -// ------------------- + + + // ------------------- + // class ElectorResult + // ------------------- // CLASS METHODS // PRIVATE ACCESSORS @@ -46385,35 +47330,38 @@ void ElectorResult::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const using bslh::hashAppend; hashAppend(hashAlgorithm, this->selectionId()); switch (this->selectionId()) { - case Class::SELECTION_ID_ERROR: + case Class::SELECTION_ID_ERROR: hashAppend(hashAlgorithm, this->error()); break; - case Class::SELECTION_ID_TUNABLE: + case Class::SELECTION_ID_TUNABLE: hashAppend(hashAlgorithm, this->tunable()); break; - case Class::SELECTION_ID_TUNABLES: + case Class::SELECTION_ID_TUNABLES: hashAppend(hashAlgorithm, this->tunables()); break; - case Class::SELECTION_ID_TUNABLE_CONFIRMATION: + case Class::SELECTION_ID_TUNABLE_CONFIRMATION: hashAppend(hashAlgorithm, this->tunableConfirmation()); break; - default: BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); + default: + BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); } } -inline bool ElectorResult::isEqualTo(const ElectorResult& rhs) const +inline +bool ElectorResult::isEqualTo(const ElectorResult& rhs) const { typedef ElectorResult Class; if (this->selectionId() == rhs.selectionId()) { switch (rhs.selectionId()) { - case Class::SELECTION_ID_ERROR: return this->error() == rhs.error(); - case Class::SELECTION_ID_TUNABLE: + case Class::SELECTION_ID_ERROR: + return this->error() == rhs.error(); + case Class::SELECTION_ID_TUNABLE: return this->tunable() == rhs.tunable(); - case Class::SELECTION_ID_TUNABLES: + case Class::SELECTION_ID_TUNABLES: return this->tunables() == rhs.tunables(); - case Class::SELECTION_ID_TUNABLE_CONFIRMATION: + case Class::SELECTION_ID_TUNABLE_CONFIRMATION: return this->tunableConfirmation() == rhs.tunableConfirmation(); - default: + default: BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId()); return true; } @@ -46424,13 +47372,15 @@ inline bool ElectorResult::isEqualTo(const ElectorResult& rhs) const } // CREATORS -inline ElectorResult::ElectorResult(bslma::Allocator* basicAllocator) +inline +ElectorResult::ElectorResult(bslma::Allocator *basicAllocator) : d_selectionId(SELECTION_ID_UNDEFINED) , d_allocator_p(bslma::Default::allocator(basicAllocator)) { } -inline ElectorResult::~ElectorResult() +inline +ElectorResult::~ElectorResult() { reset(); } @@ -46440,51 +47390,55 @@ template int ElectorResult::manipulateSelection(t_MANIPULATOR& manipulator) { switch (d_selectionId) { - case ElectorResult::SELECTION_ID_ERROR: + case ElectorResult::SELECTION_ID_ERROR: return manipulator(&d_error.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR]); - case ElectorResult::SELECTION_ID_TUNABLE: + SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR]); + case ElectorResult::SELECTION_ID_TUNABLE: return manipulator(&d_tunable.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE]); - case ElectorResult::SELECTION_ID_TUNABLES: + SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE]); + case ElectorResult::SELECTION_ID_TUNABLES: return manipulator(&d_tunables.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLES]); - case ElectorResult::SELECTION_ID_TUNABLE_CONFIRMATION: - return manipulator( - &d_tunableConfirmation.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE_CONFIRMATION]); - default: + SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLES]); + case ElectorResult::SELECTION_ID_TUNABLE_CONFIRMATION: + return manipulator(&d_tunableConfirmation.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE_CONFIRMATION]); + default: BSLS_ASSERT(ElectorResult::SELECTION_ID_UNDEFINED == d_selectionId); return -1; } } -inline Error& ElectorResult::error() +inline +Error& ElectorResult::error() { BSLS_ASSERT(SELECTION_ID_ERROR == d_selectionId); return d_error.object(); } -inline Tunable& ElectorResult::tunable() +inline +Tunable& ElectorResult::tunable() { BSLS_ASSERT(SELECTION_ID_TUNABLE == d_selectionId); return d_tunable.object(); } -inline Tunables& ElectorResult::tunables() +inline +Tunables& ElectorResult::tunables() { BSLS_ASSERT(SELECTION_ID_TUNABLES == d_selectionId); return d_tunables.object(); } -inline TunableConfirmation& ElectorResult::tunableConfirmation() +inline +TunableConfirmation& ElectorResult::tunableConfirmation() { BSLS_ASSERT(SELECTION_ID_TUNABLE_CONFIRMATION == d_selectionId); return d_tunableConfirmation.object(); } // ACCESSORS -inline int ElectorResult::selectionId() const +inline +int ElectorResult::selectionId() const { return d_selectionId; } @@ -46493,75 +47447,86 @@ template int ElectorResult::accessSelection(t_ACCESSOR& accessor) const { switch (d_selectionId) { - case SELECTION_ID_ERROR: + case SELECTION_ID_ERROR: return accessor(d_error.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR]); - case SELECTION_ID_TUNABLE: + SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR]); + case SELECTION_ID_TUNABLE: return accessor(d_tunable.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE]); - case SELECTION_ID_TUNABLES: + SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE]); + case SELECTION_ID_TUNABLES: return accessor(d_tunables.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLES]); - case SELECTION_ID_TUNABLE_CONFIRMATION: - return accessor( - d_tunableConfirmation.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE_CONFIRMATION]); - default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); return -1; + SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLES]); + case SELECTION_ID_TUNABLE_CONFIRMATION: + return accessor(d_tunableConfirmation.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE_CONFIRMATION]); + default: + BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); + return -1; } } -inline const Error& ElectorResult::error() const +inline +const Error& ElectorResult::error() const { BSLS_ASSERT(SELECTION_ID_ERROR == d_selectionId); return d_error.object(); } -inline const Tunable& ElectorResult::tunable() const +inline +const Tunable& ElectorResult::tunable() const { BSLS_ASSERT(SELECTION_ID_TUNABLE == d_selectionId); return d_tunable.object(); } -inline const Tunables& ElectorResult::tunables() const +inline +const Tunables& ElectorResult::tunables() const { BSLS_ASSERT(SELECTION_ID_TUNABLES == d_selectionId); return d_tunables.object(); } -inline const TunableConfirmation& ElectorResult::tunableConfirmation() const +inline +const TunableConfirmation& ElectorResult::tunableConfirmation() const { BSLS_ASSERT(SELECTION_ID_TUNABLE_CONFIRMATION == d_selectionId); return d_tunableConfirmation.object(); } -inline bool ElectorResult::isErrorValue() const +inline +bool ElectorResult::isErrorValue() const { return SELECTION_ID_ERROR == d_selectionId; } -inline bool ElectorResult::isTunableValue() const +inline +bool ElectorResult::isTunableValue() const { return SELECTION_ID_TUNABLE == d_selectionId; } -inline bool ElectorResult::isTunablesValue() const +inline +bool ElectorResult::isTunablesValue() const { return SELECTION_ID_TUNABLES == d_selectionId; } -inline bool ElectorResult::isTunableConfirmationValue() const +inline +bool ElectorResult::isTunableConfirmationValue() const { return SELECTION_ID_TUNABLE_CONFIRMATION == d_selectionId; } -inline bool ElectorResult::isUndefinedValue() const +inline +bool ElectorResult::isUndefinedValue() const { return SELECTION_ID_UNDEFINED == d_selectionId; } -// ---------------- -// class QueueState -// ---------------- + + // ---------------- + // class QueueState + // ---------------- // PRIVATE ACCESSORS template @@ -46579,12 +47544,14 @@ void QueueState::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const hashAppend(hashAlgorithm, this->handles()); } -inline bool QueueState::isEqualTo(const QueueState& rhs) const +inline +bool QueueState::isEqualTo(const QueueState& rhs) const { return this->uri() == rhs.uri() && this->handleParametersJson() == rhs.handleParametersJson() && this->streamParametersJson() == rhs.streamParametersJson() && - this->id() == rhs.id() && this->key() == rhs.key() && + this->id() == rhs.id() && + this->key() == rhs.key() && this->partitionId() == rhs.partitionId() && this->storage() == rhs.storage() && this->capacityMeter() == rhs.capacityMeter() && @@ -46603,16 +47570,12 @@ int QueueState::manipulateAttributes(t_MANIPULATOR& manipulator) return ret; } - ret = manipulator( - &d_handleParametersJson, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_HANDLE_PARAMETERS_JSON]); + ret = manipulator(&d_handleParametersJson, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_HANDLE_PARAMETERS_JSON]); if (ret) { return ret; } - ret = manipulator( - &d_streamParametersJson, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STREAM_PARAMETERS_JSON]); + ret = manipulator(&d_streamParametersJson, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STREAM_PARAMETERS_JSON]); if (ret) { return ret; } @@ -46627,26 +47590,22 @@ int QueueState::manipulateAttributes(t_MANIPULATOR& manipulator) return ret; } - ret = manipulator(&d_partitionId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITION_ID]); + ret = manipulator(&d_partitionId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITION_ID]); if (ret) { return ret; } - ret = manipulator(&d_storage, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STORAGE]); + ret = manipulator(&d_storage, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STORAGE]); if (ret) { return ret; } - ret = manipulator(&d_capacityMeter, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CAPACITY_METER]); + ret = manipulator(&d_capacityMeter, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CAPACITY_METER]); if (ret) { return ret; } - ret = manipulator(&d_handles, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_HANDLES]); + ret = manipulator(&d_handles, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_HANDLES]); if (ret) { return ret; } @@ -46660,55 +47619,48 @@ int QueueState::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_URI: { + case ATTRIBUTE_ID_URI: { return manipulator(&d_uri, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_URI]); - } - case ATTRIBUTE_ID_HANDLE_PARAMETERS_JSON: { - return manipulator( - &d_handleParametersJson, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_HANDLE_PARAMETERS_JSON]); - } - case ATTRIBUTE_ID_STREAM_PARAMETERS_JSON: { - return manipulator( - &d_streamParametersJson, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STREAM_PARAMETERS_JSON]); - } - case ATTRIBUTE_ID_ID: { + } + case ATTRIBUTE_ID_HANDLE_PARAMETERS_JSON: { + return manipulator(&d_handleParametersJson, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_HANDLE_PARAMETERS_JSON]); + } + case ATTRIBUTE_ID_STREAM_PARAMETERS_JSON: { + return manipulator(&d_streamParametersJson, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STREAM_PARAMETERS_JSON]); + } + case ATTRIBUTE_ID_ID: { return manipulator(&d_id, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ID]); - } - case ATTRIBUTE_ID_KEY: { + } + case ATTRIBUTE_ID_KEY: { return manipulator(&d_key, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_KEY]); - } - case ATTRIBUTE_ID_PARTITION_ID: { - return manipulator(&d_partitionId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITION_ID]); - } - case ATTRIBUTE_ID_STORAGE: { - return manipulator(&d_storage, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STORAGE]); - } - case ATTRIBUTE_ID_CAPACITY_METER: { - return manipulator( - &d_capacityMeter, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CAPACITY_METER]); - } - case ATTRIBUTE_ID_HANDLES: { - return manipulator(&d_handles, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_HANDLES]); - } - default: return NOT_FOUND; + } + case ATTRIBUTE_ID_PARTITION_ID: { + return manipulator(&d_partitionId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITION_ID]); + } + case ATTRIBUTE_ID_STORAGE: { + return manipulator(&d_storage, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STORAGE]); + } + case ATTRIBUTE_ID_CAPACITY_METER: { + return manipulator(&d_capacityMeter, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CAPACITY_METER]); + } + case ATTRIBUTE_ID_HANDLES: { + return manipulator(&d_handles, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_HANDLES]); + } + default: + return NOT_FOUND; } } template -int QueueState::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int QueueState::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -46716,47 +47668,56 @@ int QueueState::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::string& QueueState::uri() +inline +bsl::string& QueueState::uri() { return d_uri; } -inline bsl::string& QueueState::handleParametersJson() +inline +bsl::string& QueueState::handleParametersJson() { return d_handleParametersJson; } -inline bsl::string& QueueState::streamParametersJson() +inline +bsl::string& QueueState::streamParametersJson() { return d_streamParametersJson; } -inline unsigned int& QueueState::id() +inline +unsigned int& QueueState::id() { return d_id; } -inline bsl::string& QueueState::key() +inline +bsl::string& QueueState::key() { return d_key; } -inline int& QueueState::partitionId() +inline +int& QueueState::partitionId() { return d_partitionId; } -inline bdlb::NullableValue& QueueState::storage() +inline +bdlb::NullableValue& QueueState::storage() { return d_storage; } -inline bdlb::NullableValue& QueueState::capacityMeter() +inline +bdlb::NullableValue& QueueState::capacityMeter() { return d_capacityMeter; } -inline bsl::vector& QueueState::handles() +inline +bsl::vector& QueueState::handles() { return d_handles; } @@ -46772,16 +47733,12 @@ int QueueState::accessAttributes(t_ACCESSOR& accessor) const return ret; } - ret = accessor( - d_handleParametersJson, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_HANDLE_PARAMETERS_JSON]); + ret = accessor(d_handleParametersJson, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_HANDLE_PARAMETERS_JSON]); if (ret) { return ret; } - ret = accessor( - d_streamParametersJson, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STREAM_PARAMETERS_JSON]); + ret = accessor(d_streamParametersJson, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STREAM_PARAMETERS_JSON]); if (ret) { return ret; } @@ -46796,8 +47753,7 @@ int QueueState::accessAttributes(t_ACCESSOR& accessor) const return ret; } - ret = accessor(d_partitionId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITION_ID]); + ret = accessor(d_partitionId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITION_ID]); if (ret) { return ret; } @@ -46807,8 +47763,7 @@ int QueueState::accessAttributes(t_ACCESSOR& accessor) const return ret; } - ret = accessor(d_capacityMeter, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CAPACITY_METER]); + ret = accessor(d_capacityMeter, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CAPACITY_METER]); if (ret) { return ret; } @@ -46827,110 +47782,114 @@ int QueueState::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_URI: { + case ATTRIBUTE_ID_URI: { return accessor(d_uri, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_URI]); - } - case ATTRIBUTE_ID_HANDLE_PARAMETERS_JSON: { - return accessor( - d_handleParametersJson, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_HANDLE_PARAMETERS_JSON]); - } - case ATTRIBUTE_ID_STREAM_PARAMETERS_JSON: { - return accessor( - d_streamParametersJson, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STREAM_PARAMETERS_JSON]); - } - case ATTRIBUTE_ID_ID: { + } + case ATTRIBUTE_ID_HANDLE_PARAMETERS_JSON: { + return accessor(d_handleParametersJson, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_HANDLE_PARAMETERS_JSON]); + } + case ATTRIBUTE_ID_STREAM_PARAMETERS_JSON: { + return accessor(d_streamParametersJson, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STREAM_PARAMETERS_JSON]); + } + case ATTRIBUTE_ID_ID: { return accessor(d_id, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ID]); - } - case ATTRIBUTE_ID_KEY: { + } + case ATTRIBUTE_ID_KEY: { return accessor(d_key, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_KEY]); - } - case ATTRIBUTE_ID_PARTITION_ID: { - return accessor(d_partitionId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITION_ID]); - } - case ATTRIBUTE_ID_STORAGE: { - return accessor(d_storage, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STORAGE]); - } - case ATTRIBUTE_ID_CAPACITY_METER: { - return accessor(d_capacityMeter, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CAPACITY_METER]); - } - case ATTRIBUTE_ID_HANDLES: { - return accessor(d_handles, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_HANDLES]); - } - default: return NOT_FOUND; + } + case ATTRIBUTE_ID_PARTITION_ID: { + return accessor(d_partitionId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITION_ID]); + } + case ATTRIBUTE_ID_STORAGE: { + return accessor(d_storage, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STORAGE]); + } + case ATTRIBUTE_ID_CAPACITY_METER: { + return accessor(d_capacityMeter, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CAPACITY_METER]); + } + case ATTRIBUTE_ID_HANDLES: { + return accessor(d_handles, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_HANDLES]); + } + default: + return NOT_FOUND; } } template -int QueueState::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int QueueState::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::string& QueueState::uri() const +inline +const bsl::string& QueueState::uri() const { return d_uri; } -inline const bsl::string& QueueState::handleParametersJson() const +inline +const bsl::string& QueueState::handleParametersJson() const { return d_handleParametersJson; } -inline const bsl::string& QueueState::streamParametersJson() const +inline +const bsl::string& QueueState::streamParametersJson() const { return d_streamParametersJson; } -inline unsigned int QueueState::id() const +inline +unsigned int QueueState::id() const { return d_id; } -inline const bsl::string& QueueState::key() const +inline +const bsl::string& QueueState::key() const { return d_key; } -inline int QueueState::partitionId() const +inline +int QueueState::partitionId() const { return d_partitionId; } -inline const bdlb::NullableValue& QueueState::storage() const +inline +const bdlb::NullableValue& QueueState::storage() const { return d_storage; } -inline const bdlb::NullableValue& -QueueState::capacityMeter() const +inline +const bdlb::NullableValue& QueueState::capacityMeter() const { return d_capacityMeter; } -inline const bsl::vector& QueueState::handles() const +inline +const bsl::vector& QueueState::handles() const { return d_handles; } -// ----------------------- -// class ReplicationResult -// ----------------------- + + + // ----------------------- + // class ReplicationResult + // ----------------------- // CLASS METHODS // PRIVATE ACCESSORS @@ -46941,35 +47900,38 @@ void ReplicationResult::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const using bslh::hashAppend; hashAppend(hashAlgorithm, this->selectionId()); switch (this->selectionId()) { - case Class::SELECTION_ID_ERROR: + case Class::SELECTION_ID_ERROR: hashAppend(hashAlgorithm, this->error()); break; - case Class::SELECTION_ID_TUNABLE: + case Class::SELECTION_ID_TUNABLE: hashAppend(hashAlgorithm, this->tunable()); break; - case Class::SELECTION_ID_TUNABLES: + case Class::SELECTION_ID_TUNABLES: hashAppend(hashAlgorithm, this->tunables()); break; - case Class::SELECTION_ID_TUNABLE_CONFIRMATION: + case Class::SELECTION_ID_TUNABLE_CONFIRMATION: hashAppend(hashAlgorithm, this->tunableConfirmation()); break; - default: BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); + default: + BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); } } -inline bool ReplicationResult::isEqualTo(const ReplicationResult& rhs) const +inline +bool ReplicationResult::isEqualTo(const ReplicationResult& rhs) const { typedef ReplicationResult Class; if (this->selectionId() == rhs.selectionId()) { switch (rhs.selectionId()) { - case Class::SELECTION_ID_ERROR: return this->error() == rhs.error(); - case Class::SELECTION_ID_TUNABLE: + case Class::SELECTION_ID_ERROR: + return this->error() == rhs.error(); + case Class::SELECTION_ID_TUNABLE: return this->tunable() == rhs.tunable(); - case Class::SELECTION_ID_TUNABLES: + case Class::SELECTION_ID_TUNABLES: return this->tunables() == rhs.tunables(); - case Class::SELECTION_ID_TUNABLE_CONFIRMATION: + case Class::SELECTION_ID_TUNABLE_CONFIRMATION: return this->tunableConfirmation() == rhs.tunableConfirmation(); - default: + default: BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId()); return true; } @@ -46980,13 +47942,15 @@ inline bool ReplicationResult::isEqualTo(const ReplicationResult& rhs) const } // CREATORS -inline ReplicationResult::ReplicationResult(bslma::Allocator* basicAllocator) +inline +ReplicationResult::ReplicationResult(bslma::Allocator *basicAllocator) : d_selectionId(SELECTION_ID_UNDEFINED) , d_allocator_p(bslma::Default::allocator(basicAllocator)) { } -inline ReplicationResult::~ReplicationResult() +inline +ReplicationResult::~ReplicationResult() { reset(); } @@ -46996,52 +47960,55 @@ template int ReplicationResult::manipulateSelection(t_MANIPULATOR& manipulator) { switch (d_selectionId) { - case ReplicationResult::SELECTION_ID_ERROR: + case ReplicationResult::SELECTION_ID_ERROR: return manipulator(&d_error.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR]); - case ReplicationResult::SELECTION_ID_TUNABLE: + SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR]); + case ReplicationResult::SELECTION_ID_TUNABLE: return manipulator(&d_tunable.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE]); - case ReplicationResult::SELECTION_ID_TUNABLES: + SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE]); + case ReplicationResult::SELECTION_ID_TUNABLES: return manipulator(&d_tunables.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLES]); - case ReplicationResult::SELECTION_ID_TUNABLE_CONFIRMATION: - return manipulator( - &d_tunableConfirmation.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE_CONFIRMATION]); - default: - BSLS_ASSERT(ReplicationResult::SELECTION_ID_UNDEFINED == - d_selectionId); + SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLES]); + case ReplicationResult::SELECTION_ID_TUNABLE_CONFIRMATION: + return manipulator(&d_tunableConfirmation.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE_CONFIRMATION]); + default: + BSLS_ASSERT(ReplicationResult::SELECTION_ID_UNDEFINED == d_selectionId); return -1; } } -inline Error& ReplicationResult::error() +inline +Error& ReplicationResult::error() { BSLS_ASSERT(SELECTION_ID_ERROR == d_selectionId); return d_error.object(); } -inline Tunable& ReplicationResult::tunable() +inline +Tunable& ReplicationResult::tunable() { BSLS_ASSERT(SELECTION_ID_TUNABLE == d_selectionId); return d_tunable.object(); } -inline Tunables& ReplicationResult::tunables() +inline +Tunables& ReplicationResult::tunables() { BSLS_ASSERT(SELECTION_ID_TUNABLES == d_selectionId); return d_tunables.object(); } -inline TunableConfirmation& ReplicationResult::tunableConfirmation() +inline +TunableConfirmation& ReplicationResult::tunableConfirmation() { BSLS_ASSERT(SELECTION_ID_TUNABLE_CONFIRMATION == d_selectionId); return d_tunableConfirmation.object(); } // ACCESSORS -inline int ReplicationResult::selectionId() const +inline +int ReplicationResult::selectionId() const { return d_selectionId; } @@ -47050,76 +48017,86 @@ template int ReplicationResult::accessSelection(t_ACCESSOR& accessor) const { switch (d_selectionId) { - case SELECTION_ID_ERROR: + case SELECTION_ID_ERROR: return accessor(d_error.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR]); - case SELECTION_ID_TUNABLE: + SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR]); + case SELECTION_ID_TUNABLE: return accessor(d_tunable.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE]); - case SELECTION_ID_TUNABLES: + SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE]); + case SELECTION_ID_TUNABLES: return accessor(d_tunables.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLES]); - case SELECTION_ID_TUNABLE_CONFIRMATION: - return accessor( - d_tunableConfirmation.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE_CONFIRMATION]); - default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); return -1; + SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLES]); + case SELECTION_ID_TUNABLE_CONFIRMATION: + return accessor(d_tunableConfirmation.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE_CONFIRMATION]); + default: + BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); + return -1; } } -inline const Error& ReplicationResult::error() const +inline +const Error& ReplicationResult::error() const { BSLS_ASSERT(SELECTION_ID_ERROR == d_selectionId); return d_error.object(); } -inline const Tunable& ReplicationResult::tunable() const +inline +const Tunable& ReplicationResult::tunable() const { BSLS_ASSERT(SELECTION_ID_TUNABLE == d_selectionId); return d_tunable.object(); } -inline const Tunables& ReplicationResult::tunables() const +inline +const Tunables& ReplicationResult::tunables() const { BSLS_ASSERT(SELECTION_ID_TUNABLES == d_selectionId); return d_tunables.object(); } -inline const TunableConfirmation& -ReplicationResult::tunableConfirmation() const +inline +const TunableConfirmation& ReplicationResult::tunableConfirmation() const { BSLS_ASSERT(SELECTION_ID_TUNABLE_CONFIRMATION == d_selectionId); return d_tunableConfirmation.object(); } -inline bool ReplicationResult::isErrorValue() const +inline +bool ReplicationResult::isErrorValue() const { return SELECTION_ID_ERROR == d_selectionId; } -inline bool ReplicationResult::isTunableValue() const +inline +bool ReplicationResult::isTunableValue() const { return SELECTION_ID_TUNABLE == d_selectionId; } -inline bool ReplicationResult::isTunablesValue() const +inline +bool ReplicationResult::isTunablesValue() const { return SELECTION_ID_TUNABLES == d_selectionId; } -inline bool ReplicationResult::isTunableConfirmationValue() const +inline +bool ReplicationResult::isTunableConfirmationValue() const { return SELECTION_ID_TUNABLE_CONFIRMATION == d_selectionId; } -inline bool ReplicationResult::isUndefinedValue() const +inline +bool ReplicationResult::isUndefinedValue() const { return SELECTION_ID_UNDEFINED == d_selectionId; } -// -------------------- -// class RouterConsumer -// -------------------- + + // -------------------- + // class RouterConsumer + // -------------------- // PRIVATE ACCESSORS template @@ -47132,7 +48109,8 @@ void RouterConsumer::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const hashAppend(hashAlgorithm, this->expression()); } -inline bool RouterConsumer::isEqualTo(const RouterConsumer& rhs) const +inline +bool RouterConsumer::isEqualTo(const RouterConsumer& rhs) const { return this->priority() == rhs.priority() && this->queueHandle() == rhs.queueHandle() && @@ -47147,14 +48125,12 @@ int RouterConsumer::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator(&d_priority, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIORITY]); + ret = manipulator(&d_priority, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIORITY]); if (ret) { return ret; } - ret = manipulator(&d_queueHandle, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_HANDLE]); + ret = manipulator(&d_queueHandle, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_HANDLE]); if (ret) { return ret; } @@ -47164,8 +48140,7 @@ int RouterConsumer::manipulateAttributes(t_MANIPULATOR& manipulator) return ret; } - ret = manipulator(&d_expression, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_EXPRESSION]); + ret = manipulator(&d_expression, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_EXPRESSION]); if (ret) { return ret; } @@ -47179,35 +48154,33 @@ int RouterConsumer::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_PRIORITY: { - return manipulator(&d_priority, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIORITY]); - } - case ATTRIBUTE_ID_QUEUE_HANDLE: { - return manipulator(&d_queueHandle, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_HANDLE]); - } - case ATTRIBUTE_ID_COUNT: { - return manipulator(&d_count, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COUNT]); - } - case ATTRIBUTE_ID_EXPRESSION: { - return manipulator(&d_expression, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_EXPRESSION]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_PRIORITY: { + return manipulator(&d_priority, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIORITY]); + } + case ATTRIBUTE_ID_QUEUE_HANDLE: { + return manipulator(&d_queueHandle, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_HANDLE]); + } + case ATTRIBUTE_ID_COUNT: { + return manipulator(&d_count, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COUNT]); + } + case ATTRIBUTE_ID_EXPRESSION: { + return manipulator(&d_expression, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_EXPRESSION]); + } + default: + return NOT_FOUND; } } template -int RouterConsumer::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int RouterConsumer::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -47215,22 +48188,26 @@ int RouterConsumer::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline int& RouterConsumer::priority() +inline +int& RouterConsumer::priority() { return d_priority; } -inline QueueHandle& RouterConsumer::queueHandle() +inline +QueueHandle& RouterConsumer::queueHandle() { return d_queueHandle; } -inline unsigned int& RouterConsumer::count() +inline +unsigned int& RouterConsumer::count() { return d_count; } -inline bsl::string& RouterConsumer::expression() +inline +bsl::string& RouterConsumer::expression() { return d_expression; } @@ -47246,8 +48223,7 @@ int RouterConsumer::accessAttributes(t_ACCESSOR& accessor) const return ret; } - ret = accessor(d_queueHandle, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_HANDLE]); + ret = accessor(d_queueHandle, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_HANDLE]); if (ret) { return ret; } @@ -47257,8 +48233,7 @@ int RouterConsumer::accessAttributes(t_ACCESSOR& accessor) const return ret; } - ret = accessor(d_expression, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_EXPRESSION]); + ret = accessor(d_expression, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_EXPRESSION]); if (ret) { return ret; } @@ -47272,64 +48247,69 @@ int RouterConsumer::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_PRIORITY: { - return accessor(d_priority, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIORITY]); - } - case ATTRIBUTE_ID_QUEUE_HANDLE: { - return accessor(d_queueHandle, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_HANDLE]); - } - case ATTRIBUTE_ID_COUNT: { + case ATTRIBUTE_ID_PRIORITY: { + return accessor(d_priority, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PRIORITY]); + } + case ATTRIBUTE_ID_QUEUE_HANDLE: { + return accessor(d_queueHandle, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_HANDLE]); + } + case ATTRIBUTE_ID_COUNT: { return accessor(d_count, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COUNT]); - } - case ATTRIBUTE_ID_EXPRESSION: { - return accessor(d_expression, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_EXPRESSION]); - } - default: return NOT_FOUND; + } + case ATTRIBUTE_ID_EXPRESSION: { + return accessor(d_expression, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_EXPRESSION]); + } + default: + return NOT_FOUND; } } template -int RouterConsumer::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int RouterConsumer::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline int RouterConsumer::priority() const +inline +int RouterConsumer::priority() const { return d_priority; } -inline const QueueHandle& RouterConsumer::queueHandle() const +inline +const QueueHandle& RouterConsumer::queueHandle() const { return d_queueHandle; } -inline unsigned int RouterConsumer::count() const +inline +unsigned int RouterConsumer::count() const { return d_count; } -inline const bsl::string& RouterConsumer::expression() const +inline +const bsl::string& RouterConsumer::expression() const { return d_expression; } -// ------------- -// class Routing -// ------------- + + + // ------------- + // class Routing + // ------------- // CLASS METHODS // MANIPULATORS @@ -47338,9 +48318,7 @@ int Routing::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator( - &d_subscriptionGroups, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUBSCRIPTION_GROUPS]); + ret = manipulator(&d_subscriptionGroups, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUBSCRIPTION_GROUPS]); if (ret) { return ret; } @@ -47354,24 +48332,24 @@ int Routing::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_SUBSCRIPTION_GROUPS: { - return manipulator( - &d_subscriptionGroups, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUBSCRIPTION_GROUPS]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_SUBSCRIPTION_GROUPS: { + return manipulator(&d_subscriptionGroups, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUBSCRIPTION_GROUPS]); + } + default: + return NOT_FOUND; } } template -int Routing::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int Routing::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -47379,7 +48357,8 @@ int Routing::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::vector& Routing::subscriptionGroups() +inline +bsl::vector& Routing::subscriptionGroups() { return d_subscriptionGroups; } @@ -47390,8 +48369,7 @@ int Routing::accessAttributes(t_ACCESSOR& accessor) const { int ret; - ret = accessor(d_subscriptionGroups, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUBSCRIPTION_GROUPS]); + ret = accessor(d_subscriptionGroups, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUBSCRIPTION_GROUPS]); if (ret) { return ret; } @@ -47405,40 +48383,42 @@ int Routing::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_SUBSCRIPTION_GROUPS: { - return accessor( - d_subscriptionGroups, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUBSCRIPTION_GROUPS]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_SUBSCRIPTION_GROUPS: { + return accessor(d_subscriptionGroups, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUBSCRIPTION_GROUPS]); + } + default: + return NOT_FOUND; } } template -int Routing::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int Routing::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::vector& -Routing::subscriptionGroups() const +inline +const bsl::vector& Routing::subscriptionGroups() const { return d_subscriptionGroups; } -// ---------------- -// class StatResult -// ---------------- + + + // ---------------- + // class StatResult + // ---------------- // CLASS METHODS // PRIVATE ACCESSORS @@ -47449,39 +48429,43 @@ void StatResult::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const using bslh::hashAppend; hashAppend(hashAlgorithm, this->selectionId()); switch (this->selectionId()) { - case Class::SELECTION_ID_ERROR: + case Class::SELECTION_ID_ERROR: hashAppend(hashAlgorithm, this->error()); break; - case Class::SELECTION_ID_STATS: + case Class::SELECTION_ID_STATS: hashAppend(hashAlgorithm, this->stats()); break; - case Class::SELECTION_ID_TUNABLE: + case Class::SELECTION_ID_TUNABLE: hashAppend(hashAlgorithm, this->tunable()); break; - case Class::SELECTION_ID_TUNABLES: + case Class::SELECTION_ID_TUNABLES: hashAppend(hashAlgorithm, this->tunables()); break; - case Class::SELECTION_ID_TUNABLE_CONFIRMATION: + case Class::SELECTION_ID_TUNABLE_CONFIRMATION: hashAppend(hashAlgorithm, this->tunableConfirmation()); break; - default: BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); + default: + BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); } } -inline bool StatResult::isEqualTo(const StatResult& rhs) const +inline +bool StatResult::isEqualTo(const StatResult& rhs) const { typedef StatResult Class; if (this->selectionId() == rhs.selectionId()) { switch (rhs.selectionId()) { - case Class::SELECTION_ID_ERROR: return this->error() == rhs.error(); - case Class::SELECTION_ID_STATS: return this->stats() == rhs.stats(); - case Class::SELECTION_ID_TUNABLE: + case Class::SELECTION_ID_ERROR: + return this->error() == rhs.error(); + case Class::SELECTION_ID_STATS: + return this->stats() == rhs.stats(); + case Class::SELECTION_ID_TUNABLE: return this->tunable() == rhs.tunable(); - case Class::SELECTION_ID_TUNABLES: + case Class::SELECTION_ID_TUNABLES: return this->tunables() == rhs.tunables(); - case Class::SELECTION_ID_TUNABLE_CONFIRMATION: + case Class::SELECTION_ID_TUNABLE_CONFIRMATION: return this->tunableConfirmation() == rhs.tunableConfirmation(); - default: + default: BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId()); return true; } @@ -47492,13 +48476,15 @@ inline bool StatResult::isEqualTo(const StatResult& rhs) const } // CREATORS -inline StatResult::StatResult(bslma::Allocator* basicAllocator) +inline +StatResult::StatResult(bslma::Allocator *basicAllocator) : d_selectionId(SELECTION_ID_UNDEFINED) , d_allocator_p(bslma::Default::allocator(basicAllocator)) { } -inline StatResult::~StatResult() +inline +StatResult::~StatResult() { reset(); } @@ -47508,60 +48494,65 @@ template int StatResult::manipulateSelection(t_MANIPULATOR& manipulator) { switch (d_selectionId) { - case StatResult::SELECTION_ID_ERROR: + case StatResult::SELECTION_ID_ERROR: return manipulator(&d_error.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR]); - case StatResult::SELECTION_ID_STATS: + SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR]); + case StatResult::SELECTION_ID_STATS: return manipulator(&d_stats.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_STATS]); - case StatResult::SELECTION_ID_TUNABLE: + SELECTION_INFO_ARRAY[SELECTION_INDEX_STATS]); + case StatResult::SELECTION_ID_TUNABLE: return manipulator(&d_tunable.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE]); - case StatResult::SELECTION_ID_TUNABLES: + SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE]); + case StatResult::SELECTION_ID_TUNABLES: return manipulator(&d_tunables.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLES]); - case StatResult::SELECTION_ID_TUNABLE_CONFIRMATION: - return manipulator( - &d_tunableConfirmation.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE_CONFIRMATION]); - default: + SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLES]); + case StatResult::SELECTION_ID_TUNABLE_CONFIRMATION: + return manipulator(&d_tunableConfirmation.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE_CONFIRMATION]); + default: BSLS_ASSERT(StatResult::SELECTION_ID_UNDEFINED == d_selectionId); return -1; } } -inline Error& StatResult::error() +inline +Error& StatResult::error() { BSLS_ASSERT(SELECTION_ID_ERROR == d_selectionId); return d_error.object(); } -inline bsl::string& StatResult::stats() +inline +bsl::string& StatResult::stats() { BSLS_ASSERT(SELECTION_ID_STATS == d_selectionId); return d_stats.object(); } -inline Tunable& StatResult::tunable() +inline +Tunable& StatResult::tunable() { BSLS_ASSERT(SELECTION_ID_TUNABLE == d_selectionId); return d_tunable.object(); } -inline Tunables& StatResult::tunables() +inline +Tunables& StatResult::tunables() { BSLS_ASSERT(SELECTION_ID_TUNABLES == d_selectionId); return d_tunables.object(); } -inline TunableConfirmation& StatResult::tunableConfirmation() +inline +TunableConfirmation& StatResult::tunableConfirmation() { BSLS_ASSERT(SELECTION_ID_TUNABLE_CONFIRMATION == d_selectionId); return d_tunableConfirmation.object(); } // ACCESSORS -inline int StatResult::selectionId() const +inline +int StatResult::selectionId() const { return d_selectionId; } @@ -47570,89 +48561,102 @@ template int StatResult::accessSelection(t_ACCESSOR& accessor) const { switch (d_selectionId) { - case SELECTION_ID_ERROR: + case SELECTION_ID_ERROR: return accessor(d_error.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR]); - case SELECTION_ID_STATS: + SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR]); + case SELECTION_ID_STATS: return accessor(d_stats.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_STATS]); - case SELECTION_ID_TUNABLE: + SELECTION_INFO_ARRAY[SELECTION_INDEX_STATS]); + case SELECTION_ID_TUNABLE: return accessor(d_tunable.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE]); - case SELECTION_ID_TUNABLES: + SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE]); + case SELECTION_ID_TUNABLES: return accessor(d_tunables.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLES]); - case SELECTION_ID_TUNABLE_CONFIRMATION: - return accessor( - d_tunableConfirmation.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE_CONFIRMATION]); - default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); return -1; + SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLES]); + case SELECTION_ID_TUNABLE_CONFIRMATION: + return accessor(d_tunableConfirmation.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE_CONFIRMATION]); + default: + BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); + return -1; } } -inline const Error& StatResult::error() const +inline +const Error& StatResult::error() const { BSLS_ASSERT(SELECTION_ID_ERROR == d_selectionId); return d_error.object(); } -inline const bsl::string& StatResult::stats() const +inline +const bsl::string& StatResult::stats() const { BSLS_ASSERT(SELECTION_ID_STATS == d_selectionId); return d_stats.object(); } -inline const Tunable& StatResult::tunable() const +inline +const Tunable& StatResult::tunable() const { BSLS_ASSERT(SELECTION_ID_TUNABLE == d_selectionId); return d_tunable.object(); } -inline const Tunables& StatResult::tunables() const +inline +const Tunables& StatResult::tunables() const { BSLS_ASSERT(SELECTION_ID_TUNABLES == d_selectionId); return d_tunables.object(); } -inline const TunableConfirmation& StatResult::tunableConfirmation() const +inline +const TunableConfirmation& StatResult::tunableConfirmation() const { BSLS_ASSERT(SELECTION_ID_TUNABLE_CONFIRMATION == d_selectionId); return d_tunableConfirmation.object(); } -inline bool StatResult::isErrorValue() const +inline +bool StatResult::isErrorValue() const { return SELECTION_ID_ERROR == d_selectionId; } -inline bool StatResult::isStatsValue() const +inline +bool StatResult::isStatsValue() const { return SELECTION_ID_STATS == d_selectionId; } -inline bool StatResult::isTunableValue() const +inline +bool StatResult::isTunableValue() const { return SELECTION_ID_TUNABLE == d_selectionId; } -inline bool StatResult::isTunablesValue() const +inline +bool StatResult::isTunablesValue() const { return SELECTION_ID_TUNABLES == d_selectionId; } -inline bool StatResult::isTunableConfirmationValue() const +inline +bool StatResult::isTunableConfirmationValue() const { return SELECTION_ID_TUNABLE_CONFIRMATION == d_selectionId; } -inline bool StatResult::isUndefinedValue() const +inline +bool StatResult::isUndefinedValue() const { return SELECTION_ID_UNDEFINED == d_selectionId; } -// -------------------- -// class StorageCommand -// -------------------- + + // -------------------- + // class StorageCommand + // -------------------- // CLASS METHODS // PRIVATE ACCESSORS @@ -47663,39 +48667,43 @@ void StorageCommand::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const using bslh::hashAppend; hashAppend(hashAlgorithm, this->selectionId()); switch (this->selectionId()) { - case Class::SELECTION_ID_SUMMARY: + case Class::SELECTION_ID_SUMMARY: hashAppend(hashAlgorithm, this->summary()); break; - case Class::SELECTION_ID_PARTITION: + case Class::SELECTION_ID_PARTITION: hashAppend(hashAlgorithm, this->partition()); break; - case Class::SELECTION_ID_DOMAIN: + case Class::SELECTION_ID_DOMAIN: hashAppend(hashAlgorithm, this->domain()); break; - case Class::SELECTION_ID_QUEUE: + case Class::SELECTION_ID_QUEUE: hashAppend(hashAlgorithm, this->queue()); break; - case Class::SELECTION_ID_REPLICATION: + case Class::SELECTION_ID_REPLICATION: hashAppend(hashAlgorithm, this->replication()); break; - default: BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); + default: + BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); } } -inline bool StorageCommand::isEqualTo(const StorageCommand& rhs) const +inline +bool StorageCommand::isEqualTo(const StorageCommand& rhs) const { typedef StorageCommand Class; if (this->selectionId() == rhs.selectionId()) { switch (rhs.selectionId()) { - case Class::SELECTION_ID_SUMMARY: + case Class::SELECTION_ID_SUMMARY: return this->summary() == rhs.summary(); - case Class::SELECTION_ID_PARTITION: + case Class::SELECTION_ID_PARTITION: return this->partition() == rhs.partition(); - case Class::SELECTION_ID_DOMAIN: return this->domain() == rhs.domain(); - case Class::SELECTION_ID_QUEUE: return this->queue() == rhs.queue(); - case Class::SELECTION_ID_REPLICATION: + case Class::SELECTION_ID_DOMAIN: + return this->domain() == rhs.domain(); + case Class::SELECTION_ID_QUEUE: + return this->queue() == rhs.queue(); + case Class::SELECTION_ID_REPLICATION: return this->replication() == rhs.replication(); - default: + default: BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId()); return true; } @@ -47706,13 +48714,15 @@ inline bool StorageCommand::isEqualTo(const StorageCommand& rhs) const } // CREATORS -inline StorageCommand::StorageCommand(bslma::Allocator* basicAllocator) +inline +StorageCommand::StorageCommand(bslma::Allocator *basicAllocator) : d_selectionId(SELECTION_ID_UNDEFINED) , d_allocator_p(bslma::Default::allocator(basicAllocator)) { } -inline StorageCommand::~StorageCommand() +inline +StorageCommand::~StorageCommand() { reset(); } @@ -47722,59 +48732,65 @@ template int StorageCommand::manipulateSelection(t_MANIPULATOR& manipulator) { switch (d_selectionId) { - case StorageCommand::SELECTION_ID_SUMMARY: + case StorageCommand::SELECTION_ID_SUMMARY: return manipulator(&d_summary.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_SUMMARY]); - case StorageCommand::SELECTION_ID_PARTITION: + SELECTION_INFO_ARRAY[SELECTION_INDEX_SUMMARY]); + case StorageCommand::SELECTION_ID_PARTITION: return manipulator(&d_partition.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_PARTITION]); - case StorageCommand::SELECTION_ID_DOMAIN: + SELECTION_INFO_ARRAY[SELECTION_INDEX_PARTITION]); + case StorageCommand::SELECTION_ID_DOMAIN: return manipulator(&d_domain.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAIN]); - case StorageCommand::SELECTION_ID_QUEUE: + SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAIN]); + case StorageCommand::SELECTION_ID_QUEUE: return manipulator(&d_queue.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE]); - case StorageCommand::SELECTION_ID_REPLICATION: + SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE]); + case StorageCommand::SELECTION_ID_REPLICATION: return manipulator(&d_replication.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_REPLICATION]); - default: + SELECTION_INFO_ARRAY[SELECTION_INDEX_REPLICATION]); + default: BSLS_ASSERT(StorageCommand::SELECTION_ID_UNDEFINED == d_selectionId); return -1; } } -inline Void& StorageCommand::summary() +inline +Void& StorageCommand::summary() { BSLS_ASSERT(SELECTION_ID_SUMMARY == d_selectionId); return d_summary.object(); } -inline StoragePartition& StorageCommand::partition() +inline +StoragePartition& StorageCommand::partition() { BSLS_ASSERT(SELECTION_ID_PARTITION == d_selectionId); return d_partition.object(); } -inline StorageDomain& StorageCommand::domain() +inline +StorageDomain& StorageCommand::domain() { BSLS_ASSERT(SELECTION_ID_DOMAIN == d_selectionId); return d_domain.object(); } -inline StorageQueue& StorageCommand::queue() +inline +StorageQueue& StorageCommand::queue() { BSLS_ASSERT(SELECTION_ID_QUEUE == d_selectionId); return d_queue.object(); } -inline ReplicationCommand& StorageCommand::replication() +inline +ReplicationCommand& StorageCommand::replication() { BSLS_ASSERT(SELECTION_ID_REPLICATION == d_selectionId); return d_replication.object(); } // ACCESSORS -inline int StorageCommand::selectionId() const +inline +int StorageCommand::selectionId() const { return d_selectionId; } @@ -47783,88 +48799,102 @@ template int StorageCommand::accessSelection(t_ACCESSOR& accessor) const { switch (d_selectionId) { - case SELECTION_ID_SUMMARY: + case SELECTION_ID_SUMMARY: return accessor(d_summary.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_SUMMARY]); - case SELECTION_ID_PARTITION: + SELECTION_INFO_ARRAY[SELECTION_INDEX_SUMMARY]); + case SELECTION_ID_PARTITION: return accessor(d_partition.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_PARTITION]); - case SELECTION_ID_DOMAIN: + SELECTION_INFO_ARRAY[SELECTION_INDEX_PARTITION]); + case SELECTION_ID_DOMAIN: return accessor(d_domain.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAIN]); - case SELECTION_ID_QUEUE: + SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAIN]); + case SELECTION_ID_QUEUE: return accessor(d_queue.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE]); - case SELECTION_ID_REPLICATION: + SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE]); + case SELECTION_ID_REPLICATION: return accessor(d_replication.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_REPLICATION]); - default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); return -1; + SELECTION_INFO_ARRAY[SELECTION_INDEX_REPLICATION]); + default: + BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); + return -1; } } -inline const Void& StorageCommand::summary() const +inline +const Void& StorageCommand::summary() const { BSLS_ASSERT(SELECTION_ID_SUMMARY == d_selectionId); return d_summary.object(); } -inline const StoragePartition& StorageCommand::partition() const +inline +const StoragePartition& StorageCommand::partition() const { BSLS_ASSERT(SELECTION_ID_PARTITION == d_selectionId); return d_partition.object(); } -inline const StorageDomain& StorageCommand::domain() const +inline +const StorageDomain& StorageCommand::domain() const { BSLS_ASSERT(SELECTION_ID_DOMAIN == d_selectionId); return d_domain.object(); } -inline const StorageQueue& StorageCommand::queue() const +inline +const StorageQueue& StorageCommand::queue() const { BSLS_ASSERT(SELECTION_ID_QUEUE == d_selectionId); return d_queue.object(); } -inline const ReplicationCommand& StorageCommand::replication() const +inline +const ReplicationCommand& StorageCommand::replication() const { BSLS_ASSERT(SELECTION_ID_REPLICATION == d_selectionId); return d_replication.object(); } -inline bool StorageCommand::isSummaryValue() const +inline +bool StorageCommand::isSummaryValue() const { return SELECTION_ID_SUMMARY == d_selectionId; } -inline bool StorageCommand::isPartitionValue() const +inline +bool StorageCommand::isPartitionValue() const { return SELECTION_ID_PARTITION == d_selectionId; } -inline bool StorageCommand::isDomainValue() const +inline +bool StorageCommand::isDomainValue() const { return SELECTION_ID_DOMAIN == d_selectionId; } -inline bool StorageCommand::isQueueValue() const +inline +bool StorageCommand::isQueueValue() const { return SELECTION_ID_QUEUE == d_selectionId; } -inline bool StorageCommand::isReplicationValue() const +inline +bool StorageCommand::isReplicationValue() const { return SELECTION_ID_REPLICATION == d_selectionId; } -inline bool StorageCommand::isUndefinedValue() const +inline +bool StorageCommand::isUndefinedValue() const { return SELECTION_ID_UNDEFINED == d_selectionId; } -// -------------------- -// class ClusterCommand -// -------------------- + + // -------------------- + // class ClusterCommand + // -------------------- // CLASS METHODS // PRIVATE ACCESSORS @@ -47875,39 +48905,43 @@ void ClusterCommand::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const using bslh::hashAppend; hashAppend(hashAlgorithm, this->selectionId()); switch (this->selectionId()) { - case Class::SELECTION_ID_STATUS: + case Class::SELECTION_ID_STATUS: hashAppend(hashAlgorithm, this->status()); break; - case Class::SELECTION_ID_QUEUE_HELPER: + case Class::SELECTION_ID_QUEUE_HELPER: hashAppend(hashAlgorithm, this->queueHelper()); break; - case Class::SELECTION_ID_FORCE_GC_QUEUES: + case Class::SELECTION_ID_FORCE_GC_QUEUES: hashAppend(hashAlgorithm, this->forceGcQueues()); break; - case Class::SELECTION_ID_STORAGE: + case Class::SELECTION_ID_STORAGE: hashAppend(hashAlgorithm, this->storage()); break; - case Class::SELECTION_ID_STATE: + case Class::SELECTION_ID_STATE: hashAppend(hashAlgorithm, this->state()); break; - default: BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); + default: + BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); } } -inline bool ClusterCommand::isEqualTo(const ClusterCommand& rhs) const +inline +bool ClusterCommand::isEqualTo(const ClusterCommand& rhs) const { typedef ClusterCommand Class; if (this->selectionId() == rhs.selectionId()) { switch (rhs.selectionId()) { - case Class::SELECTION_ID_STATUS: return this->status() == rhs.status(); - case Class::SELECTION_ID_QUEUE_HELPER: + case Class::SELECTION_ID_STATUS: + return this->status() == rhs.status(); + case Class::SELECTION_ID_QUEUE_HELPER: return this->queueHelper() == rhs.queueHelper(); - case Class::SELECTION_ID_FORCE_GC_QUEUES: + case Class::SELECTION_ID_FORCE_GC_QUEUES: return this->forceGcQueues() == rhs.forceGcQueues(); - case Class::SELECTION_ID_STORAGE: + case Class::SELECTION_ID_STORAGE: return this->storage() == rhs.storage(); - case Class::SELECTION_ID_STATE: return this->state() == rhs.state(); - default: + case Class::SELECTION_ID_STATE: + return this->state() == rhs.state(); + default: BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId()); return true; } @@ -47918,13 +48952,15 @@ inline bool ClusterCommand::isEqualTo(const ClusterCommand& rhs) const } // CREATORS -inline ClusterCommand::ClusterCommand(bslma::Allocator* basicAllocator) +inline +ClusterCommand::ClusterCommand(bslma::Allocator *basicAllocator) : d_selectionId(SELECTION_ID_UNDEFINED) , d_allocator_p(bslma::Default::allocator(basicAllocator)) { } -inline ClusterCommand::~ClusterCommand() +inline +ClusterCommand::~ClusterCommand() { reset(); } @@ -47934,60 +48970,65 @@ template int ClusterCommand::manipulateSelection(t_MANIPULATOR& manipulator) { switch (d_selectionId) { - case ClusterCommand::SELECTION_ID_STATUS: + case ClusterCommand::SELECTION_ID_STATUS: return manipulator(&d_status.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_STATUS]); - case ClusterCommand::SELECTION_ID_QUEUE_HELPER: + SELECTION_INFO_ARRAY[SELECTION_INDEX_STATUS]); + case ClusterCommand::SELECTION_ID_QUEUE_HELPER: return manipulator(&d_queueHelper.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE_HELPER]); - case ClusterCommand::SELECTION_ID_FORCE_GC_QUEUES: - return manipulator( - &d_forceGcQueues.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_FORCE_GC_QUEUES]); - case ClusterCommand::SELECTION_ID_STORAGE: + SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE_HELPER]); + case ClusterCommand::SELECTION_ID_FORCE_GC_QUEUES: + return manipulator(&d_forceGcQueues.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_FORCE_GC_QUEUES]); + case ClusterCommand::SELECTION_ID_STORAGE: return manipulator(&d_storage.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_STORAGE]); - case ClusterCommand::SELECTION_ID_STATE: + SELECTION_INFO_ARRAY[SELECTION_INDEX_STORAGE]); + case ClusterCommand::SELECTION_ID_STATE: return manipulator(&d_state.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_STATE]); - default: + SELECTION_INFO_ARRAY[SELECTION_INDEX_STATE]); + default: BSLS_ASSERT(ClusterCommand::SELECTION_ID_UNDEFINED == d_selectionId); return -1; } } -inline Void& ClusterCommand::status() +inline +Void& ClusterCommand::status() { BSLS_ASSERT(SELECTION_ID_STATUS == d_selectionId); return d_status.object(); } -inline Void& ClusterCommand::queueHelper() +inline +Void& ClusterCommand::queueHelper() { BSLS_ASSERT(SELECTION_ID_QUEUE_HELPER == d_selectionId); return d_queueHelper.object(); } -inline Void& ClusterCommand::forceGcQueues() +inline +Void& ClusterCommand::forceGcQueues() { BSLS_ASSERT(SELECTION_ID_FORCE_GC_QUEUES == d_selectionId); return d_forceGcQueues.object(); } -inline StorageCommand& ClusterCommand::storage() +inline +StorageCommand& ClusterCommand::storage() { BSLS_ASSERT(SELECTION_ID_STORAGE == d_selectionId); return d_storage.object(); } -inline ClusterStateCommand& ClusterCommand::state() +inline +ClusterStateCommand& ClusterCommand::state() { BSLS_ASSERT(SELECTION_ID_STATE == d_selectionId); return d_state.object(); } // ACCESSORS -inline int ClusterCommand::selectionId() const +inline +int ClusterCommand::selectionId() const { return d_selectionId; } @@ -47996,88 +49037,102 @@ template int ClusterCommand::accessSelection(t_ACCESSOR& accessor) const { switch (d_selectionId) { - case SELECTION_ID_STATUS: + case SELECTION_ID_STATUS: return accessor(d_status.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_STATUS]); - case SELECTION_ID_QUEUE_HELPER: + SELECTION_INFO_ARRAY[SELECTION_INDEX_STATUS]); + case SELECTION_ID_QUEUE_HELPER: return accessor(d_queueHelper.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE_HELPER]); - case SELECTION_ID_FORCE_GC_QUEUES: + SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE_HELPER]); + case SELECTION_ID_FORCE_GC_QUEUES: return accessor(d_forceGcQueues.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_FORCE_GC_QUEUES]); - case SELECTION_ID_STORAGE: + SELECTION_INFO_ARRAY[SELECTION_INDEX_FORCE_GC_QUEUES]); + case SELECTION_ID_STORAGE: return accessor(d_storage.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_STORAGE]); - case SELECTION_ID_STATE: + SELECTION_INFO_ARRAY[SELECTION_INDEX_STORAGE]); + case SELECTION_ID_STATE: return accessor(d_state.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_STATE]); - default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); return -1; + SELECTION_INFO_ARRAY[SELECTION_INDEX_STATE]); + default: + BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); + return -1; } } -inline const Void& ClusterCommand::status() const +inline +const Void& ClusterCommand::status() const { BSLS_ASSERT(SELECTION_ID_STATUS == d_selectionId); return d_status.object(); } -inline const Void& ClusterCommand::queueHelper() const +inline +const Void& ClusterCommand::queueHelper() const { BSLS_ASSERT(SELECTION_ID_QUEUE_HELPER == d_selectionId); return d_queueHelper.object(); } -inline const Void& ClusterCommand::forceGcQueues() const +inline +const Void& ClusterCommand::forceGcQueues() const { BSLS_ASSERT(SELECTION_ID_FORCE_GC_QUEUES == d_selectionId); return d_forceGcQueues.object(); } -inline const StorageCommand& ClusterCommand::storage() const +inline +const StorageCommand& ClusterCommand::storage() const { BSLS_ASSERT(SELECTION_ID_STORAGE == d_selectionId); return d_storage.object(); } -inline const ClusterStateCommand& ClusterCommand::state() const +inline +const ClusterStateCommand& ClusterCommand::state() const { BSLS_ASSERT(SELECTION_ID_STATE == d_selectionId); return d_state.object(); } -inline bool ClusterCommand::isStatusValue() const +inline +bool ClusterCommand::isStatusValue() const { return SELECTION_ID_STATUS == d_selectionId; } -inline bool ClusterCommand::isQueueHelperValue() const +inline +bool ClusterCommand::isQueueHelperValue() const { return SELECTION_ID_QUEUE_HELPER == d_selectionId; } -inline bool ClusterCommand::isForceGcQueuesValue() const +inline +bool ClusterCommand::isForceGcQueuesValue() const { return SELECTION_ID_FORCE_GC_QUEUES == d_selectionId; } -inline bool ClusterCommand::isStorageValue() const +inline +bool ClusterCommand::isStorageValue() const { return SELECTION_ID_STORAGE == d_selectionId; } -inline bool ClusterCommand::isStateValue() const +inline +bool ClusterCommand::isStateValue() const { return SELECTION_ID_STATE == d_selectionId; } -inline bool ClusterCommand::isUndefinedValue() const +inline +bool ClusterCommand::isUndefinedValue() const { return SELECTION_ID_UNDEFINED == d_selectionId; } -// ------------------- -// class ClusterStatus -// ------------------- + + // ------------------- + // class ClusterStatus + // ------------------- // PRIVATE ACCESSORS template @@ -48095,7 +49150,8 @@ void ClusterStatus::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const hashAppend(hashAlgorithm, this->clusterStorageSummary()); } -inline bool ClusterStatus::isEqualTo(const ClusterStatus& rhs) const +inline +bool ClusterStatus::isEqualTo(const ClusterStatus& rhs) const { return this->name() == rhs.name() && this->description() == rhs.description() && @@ -48120,52 +49176,42 @@ int ClusterStatus::manipulateAttributes(t_MANIPULATOR& manipulator) return ret; } - ret = manipulator(&d_description, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DESCRIPTION]); + ret = manipulator(&d_description, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DESCRIPTION]); if (ret) { return ret; } - ret = manipulator( - &d_selfNodeDescription, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SELF_NODE_DESCRIPTION]); + ret = manipulator(&d_selfNodeDescription, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SELF_NODE_DESCRIPTION]); if (ret) { return ret; } - ret = manipulator(&d_isHealthy, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_HEALTHY]); + ret = manipulator(&d_isHealthy, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_HEALTHY]); if (ret) { return ret; } - ret = manipulator(&d_nodeStatuses, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NODE_STATUSES]); + ret = manipulator(&d_nodeStatuses, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NODE_STATUSES]); if (ret) { return ret; } - ret = manipulator(&d_electorInfo, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ELECTOR_INFO]); + ret = manipulator(&d_electorInfo, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ELECTOR_INFO]); if (ret) { return ret; } - ret = manipulator(&d_partitionsInfo, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITIONS_INFO]); + ret = manipulator(&d_partitionsInfo, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITIONS_INFO]); if (ret) { return ret; } - ret = manipulator(&d_queuesInfo, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUES_INFO]); + ret = manipulator(&d_queuesInfo, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUES_INFO]); if (ret) { return ret; } - ret = manipulator( - &d_clusterStorageSummary, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTER_STORAGE_SUMMARY]); + ret = manipulator(&d_clusterStorageSummary, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTER_STORAGE_SUMMARY]); if (ret) { return ret; } @@ -48179,59 +49225,48 @@ int ClusterStatus::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_NAME: { - return manipulator(&d_name, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]); - } - case ATTRIBUTE_ID_DESCRIPTION: { - return manipulator(&d_description, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DESCRIPTION]); - } - case ATTRIBUTE_ID_SELF_NODE_DESCRIPTION: { - return manipulator( - &d_selfNodeDescription, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SELF_NODE_DESCRIPTION]); - } - case ATTRIBUTE_ID_IS_HEALTHY: { - return manipulator(&d_isHealthy, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_HEALTHY]); - } - case ATTRIBUTE_ID_NODE_STATUSES: { - return manipulator( - &d_nodeStatuses, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NODE_STATUSES]); - } - case ATTRIBUTE_ID_ELECTOR_INFO: { - return manipulator(&d_electorInfo, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ELECTOR_INFO]); - } - case ATTRIBUTE_ID_PARTITIONS_INFO: { - return manipulator( - &d_partitionsInfo, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITIONS_INFO]); - } - case ATTRIBUTE_ID_QUEUES_INFO: { - return manipulator(&d_queuesInfo, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUES_INFO]); - } - case ATTRIBUTE_ID_CLUSTER_STORAGE_SUMMARY: { - return manipulator( - &d_clusterStorageSummary, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTER_STORAGE_SUMMARY]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_NAME: { + return manipulator(&d_name, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]); + } + case ATTRIBUTE_ID_DESCRIPTION: { + return manipulator(&d_description, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DESCRIPTION]); + } + case ATTRIBUTE_ID_SELF_NODE_DESCRIPTION: { + return manipulator(&d_selfNodeDescription, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SELF_NODE_DESCRIPTION]); + } + case ATTRIBUTE_ID_IS_HEALTHY: { + return manipulator(&d_isHealthy, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_HEALTHY]); + } + case ATTRIBUTE_ID_NODE_STATUSES: { + return manipulator(&d_nodeStatuses, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NODE_STATUSES]); + } + case ATTRIBUTE_ID_ELECTOR_INFO: { + return manipulator(&d_electorInfo, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ELECTOR_INFO]); + } + case ATTRIBUTE_ID_PARTITIONS_INFO: { + return manipulator(&d_partitionsInfo, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITIONS_INFO]); + } + case ATTRIBUTE_ID_QUEUES_INFO: { + return manipulator(&d_queuesInfo, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUES_INFO]); + } + case ATTRIBUTE_ID_CLUSTER_STORAGE_SUMMARY: { + return manipulator(&d_clusterStorageSummary, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTER_STORAGE_SUMMARY]); + } + default: + return NOT_FOUND; } } template -int ClusterStatus::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int ClusterStatus::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -48239,47 +49274,56 @@ int ClusterStatus::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::string& ClusterStatus::name() +inline +bsl::string& ClusterStatus::name() { return d_name; } -inline bsl::string& ClusterStatus::description() +inline +bsl::string& ClusterStatus::description() { return d_description; } -inline bsl::string& ClusterStatus::selfNodeDescription() +inline +bsl::string& ClusterStatus::selfNodeDescription() { return d_selfNodeDescription; } -inline bool& ClusterStatus::isHealthy() +inline +bool& ClusterStatus::isHealthy() { return d_isHealthy; } -inline NodeStatuses& ClusterStatus::nodeStatuses() +inline +NodeStatuses& ClusterStatus::nodeStatuses() { return d_nodeStatuses; } -inline ElectorInfo& ClusterStatus::electorInfo() +inline +ElectorInfo& ClusterStatus::electorInfo() { return d_electorInfo; } -inline PartitionsInfo& ClusterStatus::partitionsInfo() +inline +PartitionsInfo& ClusterStatus::partitionsInfo() { return d_partitionsInfo; } -inline StorageContent& ClusterStatus::queuesInfo() +inline +StorageContent& ClusterStatus::queuesInfo() { return d_queuesInfo; } -inline ClusterStorageSummary& ClusterStatus::clusterStorageSummary() +inline +ClusterStorageSummary& ClusterStatus::clusterStorageSummary() { return d_clusterStorageSummary; } @@ -48295,52 +49339,42 @@ int ClusterStatus::accessAttributes(t_ACCESSOR& accessor) const return ret; } - ret = accessor(d_description, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DESCRIPTION]); + ret = accessor(d_description, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DESCRIPTION]); if (ret) { return ret; } - ret = accessor( - d_selfNodeDescription, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SELF_NODE_DESCRIPTION]); + ret = accessor(d_selfNodeDescription, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SELF_NODE_DESCRIPTION]); if (ret) { return ret; } - ret = accessor(d_isHealthy, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_HEALTHY]); + ret = accessor(d_isHealthy, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_HEALTHY]); if (ret) { return ret; } - ret = accessor(d_nodeStatuses, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NODE_STATUSES]); + ret = accessor(d_nodeStatuses, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NODE_STATUSES]); if (ret) { return ret; } - ret = accessor(d_electorInfo, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ELECTOR_INFO]); + ret = accessor(d_electorInfo, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ELECTOR_INFO]); if (ret) { return ret; } - ret = accessor(d_partitionsInfo, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITIONS_INFO]); + ret = accessor(d_partitionsInfo, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITIONS_INFO]); if (ret) { return ret; } - ret = accessor(d_queuesInfo, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUES_INFO]); + ret = accessor(d_queuesInfo, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUES_INFO]); if (ret) { return ret; } - ret = accessor( - d_clusterStorageSummary, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTER_STORAGE_SUMMARY]); + ret = accessor(d_clusterStorageSummary, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTER_STORAGE_SUMMARY]); if (ret) { return ret; } @@ -48354,112 +49388,114 @@ int ClusterStatus::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_NAME: { + case ATTRIBUTE_ID_NAME: { return accessor(d_name, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]); - } - case ATTRIBUTE_ID_DESCRIPTION: { - return accessor(d_description, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DESCRIPTION]); - } - case ATTRIBUTE_ID_SELF_NODE_DESCRIPTION: { - return accessor( - d_selfNodeDescription, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SELF_NODE_DESCRIPTION]); - } - case ATTRIBUTE_ID_IS_HEALTHY: { - return accessor(d_isHealthy, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_HEALTHY]); - } - case ATTRIBUTE_ID_NODE_STATUSES: { - return accessor(d_nodeStatuses, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NODE_STATUSES]); - } - case ATTRIBUTE_ID_ELECTOR_INFO: { - return accessor(d_electorInfo, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ELECTOR_INFO]); - } - case ATTRIBUTE_ID_PARTITIONS_INFO: { - return accessor(d_partitionsInfo, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITIONS_INFO]); - } - case ATTRIBUTE_ID_QUEUES_INFO: { - return accessor(d_queuesInfo, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUES_INFO]); - } - case ATTRIBUTE_ID_CLUSTER_STORAGE_SUMMARY: { - return accessor( - d_clusterStorageSummary, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTER_STORAGE_SUMMARY]); - } - default: return NOT_FOUND; + } + case ATTRIBUTE_ID_DESCRIPTION: { + return accessor(d_description, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_DESCRIPTION]); + } + case ATTRIBUTE_ID_SELF_NODE_DESCRIPTION: { + return accessor(d_selfNodeDescription, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SELF_NODE_DESCRIPTION]); + } + case ATTRIBUTE_ID_IS_HEALTHY: { + return accessor(d_isHealthy, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_HEALTHY]); + } + case ATTRIBUTE_ID_NODE_STATUSES: { + return accessor(d_nodeStatuses, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NODE_STATUSES]); + } + case ATTRIBUTE_ID_ELECTOR_INFO: { + return accessor(d_electorInfo, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ELECTOR_INFO]); + } + case ATTRIBUTE_ID_PARTITIONS_INFO: { + return accessor(d_partitionsInfo, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_PARTITIONS_INFO]); + } + case ATTRIBUTE_ID_QUEUES_INFO: { + return accessor(d_queuesInfo, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUES_INFO]); + } + case ATTRIBUTE_ID_CLUSTER_STORAGE_SUMMARY: { + return accessor(d_clusterStorageSummary, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CLUSTER_STORAGE_SUMMARY]); + } + default: + return NOT_FOUND; } } template -int ClusterStatus::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int ClusterStatus::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::string& ClusterStatus::name() const +inline +const bsl::string& ClusterStatus::name() const { return d_name; } -inline const bsl::string& ClusterStatus::description() const +inline +const bsl::string& ClusterStatus::description() const { return d_description; } -inline const bsl::string& ClusterStatus::selfNodeDescription() const +inline +const bsl::string& ClusterStatus::selfNodeDescription() const { return d_selfNodeDescription; } -inline bool ClusterStatus::isHealthy() const +inline +bool ClusterStatus::isHealthy() const { return d_isHealthy; } -inline const NodeStatuses& ClusterStatus::nodeStatuses() const +inline +const NodeStatuses& ClusterStatus::nodeStatuses() const { return d_nodeStatuses; } -inline const ElectorInfo& ClusterStatus::electorInfo() const +inline +const ElectorInfo& ClusterStatus::electorInfo() const { return d_electorInfo; } -inline const PartitionsInfo& ClusterStatus::partitionsInfo() const +inline +const PartitionsInfo& ClusterStatus::partitionsInfo() const { return d_partitionsInfo; } -inline const StorageContent& ClusterStatus::queuesInfo() const +inline +const StorageContent& ClusterStatus::queuesInfo() const { return d_queuesInfo; } -inline const ClusterStorageSummary& -ClusterStatus::clusterStorageSummary() const +inline +const ClusterStorageSummary& ClusterStatus::clusterStorageSummary() const { return d_clusterStorageSummary; } -// -------------------- -// class DomainsCommand -// -------------------- + + + // -------------------- + // class DomainsCommand + // -------------------- // CLASS METHODS // PRIVATE ACCESSORS @@ -48470,30 +49506,33 @@ void DomainsCommand::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const using bslh::hashAppend; hashAppend(hashAlgorithm, this->selectionId()); switch (this->selectionId()) { - case Class::SELECTION_ID_DOMAIN: + case Class::SELECTION_ID_DOMAIN: hashAppend(hashAlgorithm, this->domain()); break; - case Class::SELECTION_ID_RESOLVER: + case Class::SELECTION_ID_RESOLVER: hashAppend(hashAlgorithm, this->resolver()); break; - case Class::SELECTION_ID_RECONFIGURE: + case Class::SELECTION_ID_RECONFIGURE: hashAppend(hashAlgorithm, this->reconfigure()); break; - default: BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); + default: + BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); } } -inline bool DomainsCommand::isEqualTo(const DomainsCommand& rhs) const +inline +bool DomainsCommand::isEqualTo(const DomainsCommand& rhs) const { typedef DomainsCommand Class; if (this->selectionId() == rhs.selectionId()) { switch (rhs.selectionId()) { - case Class::SELECTION_ID_DOMAIN: return this->domain() == rhs.domain(); - case Class::SELECTION_ID_RESOLVER: + case Class::SELECTION_ID_DOMAIN: + return this->domain() == rhs.domain(); + case Class::SELECTION_ID_RESOLVER: return this->resolver() == rhs.resolver(); - case Class::SELECTION_ID_RECONFIGURE: + case Class::SELECTION_ID_RECONFIGURE: return this->reconfigure() == rhs.reconfigure(); - default: + default: BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId()); return true; } @@ -48504,13 +49543,15 @@ inline bool DomainsCommand::isEqualTo(const DomainsCommand& rhs) const } // CREATORS -inline DomainsCommand::DomainsCommand(bslma::Allocator* basicAllocator) +inline +DomainsCommand::DomainsCommand(bslma::Allocator *basicAllocator) : d_selectionId(SELECTION_ID_UNDEFINED) , d_allocator_p(bslma::Default::allocator(basicAllocator)) { } -inline DomainsCommand::~DomainsCommand() +inline +DomainsCommand::~DomainsCommand() { reset(); } @@ -48520,41 +49561,45 @@ template int DomainsCommand::manipulateSelection(t_MANIPULATOR& manipulator) { switch (d_selectionId) { - case DomainsCommand::SELECTION_ID_DOMAIN: + case DomainsCommand::SELECTION_ID_DOMAIN: return manipulator(&d_domain.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAIN]); - case DomainsCommand::SELECTION_ID_RESOLVER: + SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAIN]); + case DomainsCommand::SELECTION_ID_RESOLVER: return manipulator(&d_resolver.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_RESOLVER]); - case DomainsCommand::SELECTION_ID_RECONFIGURE: + SELECTION_INFO_ARRAY[SELECTION_INDEX_RESOLVER]); + case DomainsCommand::SELECTION_ID_RECONFIGURE: return manipulator(&d_reconfigure.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_RECONFIGURE]); - default: + SELECTION_INFO_ARRAY[SELECTION_INDEX_RECONFIGURE]); + default: BSLS_ASSERT(DomainsCommand::SELECTION_ID_UNDEFINED == d_selectionId); return -1; } } -inline Domain& DomainsCommand::domain() +inline +Domain& DomainsCommand::domain() { BSLS_ASSERT(SELECTION_ID_DOMAIN == d_selectionId); return d_domain.object(); } -inline DomainResolverCommand& DomainsCommand::resolver() +inline +DomainResolverCommand& DomainsCommand::resolver() { BSLS_ASSERT(SELECTION_ID_RESOLVER == d_selectionId); return d_resolver.object(); } -inline DomainReconfigure& DomainsCommand::reconfigure() +inline +DomainReconfigure& DomainsCommand::reconfigure() { BSLS_ASSERT(SELECTION_ID_RECONFIGURE == d_selectionId); return d_reconfigure.object(); } // ACCESSORS -inline int DomainsCommand::selectionId() const +inline +int DomainsCommand::selectionId() const { return d_selectionId; } @@ -48563,60 +49608,70 @@ template int DomainsCommand::accessSelection(t_ACCESSOR& accessor) const { switch (d_selectionId) { - case SELECTION_ID_DOMAIN: + case SELECTION_ID_DOMAIN: return accessor(d_domain.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAIN]); - case SELECTION_ID_RESOLVER: + SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAIN]); + case SELECTION_ID_RESOLVER: return accessor(d_resolver.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_RESOLVER]); - case SELECTION_ID_RECONFIGURE: + SELECTION_INFO_ARRAY[SELECTION_INDEX_RESOLVER]); + case SELECTION_ID_RECONFIGURE: return accessor(d_reconfigure.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_RECONFIGURE]); - default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); return -1; + SELECTION_INFO_ARRAY[SELECTION_INDEX_RECONFIGURE]); + default: + BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); + return -1; } } -inline const Domain& DomainsCommand::domain() const +inline +const Domain& DomainsCommand::domain() const { BSLS_ASSERT(SELECTION_ID_DOMAIN == d_selectionId); return d_domain.object(); } -inline const DomainResolverCommand& DomainsCommand::resolver() const +inline +const DomainResolverCommand& DomainsCommand::resolver() const { BSLS_ASSERT(SELECTION_ID_RESOLVER == d_selectionId); return d_resolver.object(); } -inline const DomainReconfigure& DomainsCommand::reconfigure() const +inline +const DomainReconfigure& DomainsCommand::reconfigure() const { BSLS_ASSERT(SELECTION_ID_RECONFIGURE == d_selectionId); return d_reconfigure.object(); } -inline bool DomainsCommand::isDomainValue() const +inline +bool DomainsCommand::isDomainValue() const { return SELECTION_ID_DOMAIN == d_selectionId; } -inline bool DomainsCommand::isResolverValue() const +inline +bool DomainsCommand::isResolverValue() const { return SELECTION_ID_RESOLVER == d_selectionId; } -inline bool DomainsCommand::isReconfigureValue() const +inline +bool DomainsCommand::isReconfigureValue() const { return SELECTION_ID_RECONFIGURE == d_selectionId; } -inline bool DomainsCommand::isUndefinedValue() const +inline +bool DomainsCommand::isUndefinedValue() const { return SELECTION_ID_UNDEFINED == d_selectionId; } -// ---------------------- -// class RoundRobinRouter -// ---------------------- + + // ---------------------- + // class RoundRobinRouter + // ---------------------- // CLASS METHODS // MANIPULATORS @@ -48625,8 +49680,7 @@ int RoundRobinRouter::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator(&d_consumers, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONSUMERS]); + ret = manipulator(&d_consumers, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONSUMERS]); if (ret) { return ret; } @@ -48640,23 +49694,24 @@ int RoundRobinRouter::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_CONSUMERS: { - return manipulator(&d_consumers, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONSUMERS]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_CONSUMERS: { + return manipulator(&d_consumers, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONSUMERS]); + } + default: + return NOT_FOUND; } } template -int RoundRobinRouter::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int RoundRobinRouter::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -48664,7 +49719,8 @@ int RoundRobinRouter::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::vector& RoundRobinRouter::consumers() +inline +bsl::vector& RoundRobinRouter::consumers() { return d_consumers; } @@ -48675,8 +49731,7 @@ int RoundRobinRouter::accessAttributes(t_ACCESSOR& accessor) const { int ret; - ret = accessor(d_consumers, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONSUMERS]); + ret = accessor(d_consumers, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONSUMERS]); if (ret) { return ret; } @@ -48690,38 +49745,42 @@ int RoundRobinRouter::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_CONSUMERS: { - return accessor(d_consumers, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONSUMERS]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_CONSUMERS: { + return accessor(d_consumers, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONSUMERS]); + } + default: + return NOT_FOUND; } } template -int RoundRobinRouter::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int RoundRobinRouter::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::vector& RoundRobinRouter::consumers() const +inline +const bsl::vector& RoundRobinRouter::consumers() const { return d_consumers; } -// ------------------- -// class StorageResult -// ------------------- + + + // ------------------- + // class StorageResult + // ------------------- // CLASS METHODS // PRIVATE ACCESSORS @@ -48732,46 +49791,48 @@ void StorageResult::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const using bslh::hashAppend; hashAppend(hashAlgorithm, this->selectionId()); switch (this->selectionId()) { - case Class::SELECTION_ID_SUCCESS: + case Class::SELECTION_ID_SUCCESS: hashAppend(hashAlgorithm, this->success()); break; - case Class::SELECTION_ID_ERROR: + case Class::SELECTION_ID_ERROR: hashAppend(hashAlgorithm, this->error()); break; - case Class::SELECTION_ID_STORAGE_CONTENT: + case Class::SELECTION_ID_STORAGE_CONTENT: hashAppend(hashAlgorithm, this->storageContent()); break; - case Class::SELECTION_ID_CLUSTER_STORAGE_SUMMARY: + case Class::SELECTION_ID_CLUSTER_STORAGE_SUMMARY: hashAppend(hashAlgorithm, this->clusterStorageSummary()); break; - case Class::SELECTION_ID_REPLICATION_RESULT: + case Class::SELECTION_ID_REPLICATION_RESULT: hashAppend(hashAlgorithm, this->replicationResult()); break; - case Class::SELECTION_ID_PURGED_QUEUES: + case Class::SELECTION_ID_PURGED_QUEUES: hashAppend(hashAlgorithm, this->purgedQueues()); break; - default: BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); + default: + BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); } } -inline bool StorageResult::isEqualTo(const StorageResult& rhs) const +inline +bool StorageResult::isEqualTo(const StorageResult& rhs) const { typedef StorageResult Class; if (this->selectionId() == rhs.selectionId()) { switch (rhs.selectionId()) { - case Class::SELECTION_ID_SUCCESS: + case Class::SELECTION_ID_SUCCESS: return this->success() == rhs.success(); - case Class::SELECTION_ID_ERROR: return this->error() == rhs.error(); - case Class::SELECTION_ID_STORAGE_CONTENT: + case Class::SELECTION_ID_ERROR: + return this->error() == rhs.error(); + case Class::SELECTION_ID_STORAGE_CONTENT: return this->storageContent() == rhs.storageContent(); - case Class::SELECTION_ID_CLUSTER_STORAGE_SUMMARY: - return this->clusterStorageSummary() == - rhs.clusterStorageSummary(); - case Class::SELECTION_ID_REPLICATION_RESULT: + case Class::SELECTION_ID_CLUSTER_STORAGE_SUMMARY: + return this->clusterStorageSummary() == rhs.clusterStorageSummary(); + case Class::SELECTION_ID_REPLICATION_RESULT: return this->replicationResult() == rhs.replicationResult(); - case Class::SELECTION_ID_PURGED_QUEUES: + case Class::SELECTION_ID_PURGED_QUEUES: return this->purgedQueues() == rhs.purgedQueues(); - default: + default: BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId()); return true; } @@ -48782,13 +49843,15 @@ inline bool StorageResult::isEqualTo(const StorageResult& rhs) const } // CREATORS -inline StorageResult::StorageResult(bslma::Allocator* basicAllocator) +inline +StorageResult::StorageResult(bslma::Allocator *basicAllocator) : d_selectionId(SELECTION_ID_UNDEFINED) , d_allocator_p(bslma::Default::allocator(basicAllocator)) { } -inline StorageResult::~StorageResult() +inline +StorageResult::~StorageResult() { reset(); } @@ -48798,72 +49861,75 @@ template int StorageResult::manipulateSelection(t_MANIPULATOR& manipulator) { switch (d_selectionId) { - case StorageResult::SELECTION_ID_SUCCESS: + case StorageResult::SELECTION_ID_SUCCESS: return manipulator(&d_success.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_SUCCESS]); - case StorageResult::SELECTION_ID_ERROR: + SELECTION_INFO_ARRAY[SELECTION_INDEX_SUCCESS]); + case StorageResult::SELECTION_ID_ERROR: return manipulator(&d_error.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR]); - case StorageResult::SELECTION_ID_STORAGE_CONTENT: - return manipulator( - &d_storageContent.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_STORAGE_CONTENT]); - case StorageResult::SELECTION_ID_CLUSTER_STORAGE_SUMMARY: - return manipulator( - &d_clusterStorageSummary.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_STORAGE_SUMMARY]); - case StorageResult::SELECTION_ID_REPLICATION_RESULT: - return manipulator( - &d_replicationResult.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_REPLICATION_RESULT]); - case StorageResult::SELECTION_ID_PURGED_QUEUES: - return manipulator( - &d_purgedQueues.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_PURGED_QUEUES]); - default: + SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR]); + case StorageResult::SELECTION_ID_STORAGE_CONTENT: + return manipulator(&d_storageContent.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_STORAGE_CONTENT]); + case StorageResult::SELECTION_ID_CLUSTER_STORAGE_SUMMARY: + return manipulator(&d_clusterStorageSummary.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_STORAGE_SUMMARY]); + case StorageResult::SELECTION_ID_REPLICATION_RESULT: + return manipulator(&d_replicationResult.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_REPLICATION_RESULT]); + case StorageResult::SELECTION_ID_PURGED_QUEUES: + return manipulator(&d_purgedQueues.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_PURGED_QUEUES]); + default: BSLS_ASSERT(StorageResult::SELECTION_ID_UNDEFINED == d_selectionId); return -1; } } -inline Void& StorageResult::success() +inline +Void& StorageResult::success() { BSLS_ASSERT(SELECTION_ID_SUCCESS == d_selectionId); return d_success.object(); } -inline Error& StorageResult::error() +inline +Error& StorageResult::error() { BSLS_ASSERT(SELECTION_ID_ERROR == d_selectionId); return d_error.object(); } -inline StorageContent& StorageResult::storageContent() +inline +StorageContent& StorageResult::storageContent() { BSLS_ASSERT(SELECTION_ID_STORAGE_CONTENT == d_selectionId); return d_storageContent.object(); } -inline ClusterStorageSummary& StorageResult::clusterStorageSummary() +inline +ClusterStorageSummary& StorageResult::clusterStorageSummary() { BSLS_ASSERT(SELECTION_ID_CLUSTER_STORAGE_SUMMARY == d_selectionId); return d_clusterStorageSummary.object(); } -inline ReplicationResult& StorageResult::replicationResult() +inline +ReplicationResult& StorageResult::replicationResult() { BSLS_ASSERT(SELECTION_ID_REPLICATION_RESULT == d_selectionId); return d_replicationResult.object(); } -inline PurgedQueues& StorageResult::purgedQueues() +inline +PurgedQueues& StorageResult::purgedQueues() { BSLS_ASSERT(SELECTION_ID_PURGED_QUEUES == d_selectionId); return d_purgedQueues.object(); } // ACCESSORS -inline int StorageResult::selectionId() const +inline +int StorageResult::selectionId() const { return d_selectionId; } @@ -48872,105 +49938,118 @@ template int StorageResult::accessSelection(t_ACCESSOR& accessor) const { switch (d_selectionId) { - case SELECTION_ID_SUCCESS: + case SELECTION_ID_SUCCESS: return accessor(d_success.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_SUCCESS]); - case SELECTION_ID_ERROR: + SELECTION_INFO_ARRAY[SELECTION_INDEX_SUCCESS]); + case SELECTION_ID_ERROR: return accessor(d_error.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR]); - case SELECTION_ID_STORAGE_CONTENT: + SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR]); + case SELECTION_ID_STORAGE_CONTENT: return accessor(d_storageContent.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_STORAGE_CONTENT]); - case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: - return accessor( - d_clusterStorageSummary.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_STORAGE_SUMMARY]); - case SELECTION_ID_REPLICATION_RESULT: - return accessor( - d_replicationResult.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_REPLICATION_RESULT]); - case SELECTION_ID_PURGED_QUEUES: + SELECTION_INFO_ARRAY[SELECTION_INDEX_STORAGE_CONTENT]); + case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: + return accessor(d_clusterStorageSummary.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_STORAGE_SUMMARY]); + case SELECTION_ID_REPLICATION_RESULT: + return accessor(d_replicationResult.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_REPLICATION_RESULT]); + case SELECTION_ID_PURGED_QUEUES: return accessor(d_purgedQueues.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_PURGED_QUEUES]); - default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); return -1; + SELECTION_INFO_ARRAY[SELECTION_INDEX_PURGED_QUEUES]); + default: + BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); + return -1; } } -inline const Void& StorageResult::success() const +inline +const Void& StorageResult::success() const { BSLS_ASSERT(SELECTION_ID_SUCCESS == d_selectionId); return d_success.object(); } -inline const Error& StorageResult::error() const +inline +const Error& StorageResult::error() const { BSLS_ASSERT(SELECTION_ID_ERROR == d_selectionId); return d_error.object(); } -inline const StorageContent& StorageResult::storageContent() const +inline +const StorageContent& StorageResult::storageContent() const { BSLS_ASSERT(SELECTION_ID_STORAGE_CONTENT == d_selectionId); return d_storageContent.object(); } -inline const ClusterStorageSummary& -StorageResult::clusterStorageSummary() const +inline +const ClusterStorageSummary& StorageResult::clusterStorageSummary() const { BSLS_ASSERT(SELECTION_ID_CLUSTER_STORAGE_SUMMARY == d_selectionId); return d_clusterStorageSummary.object(); } -inline const ReplicationResult& StorageResult::replicationResult() const +inline +const ReplicationResult& StorageResult::replicationResult() const { BSLS_ASSERT(SELECTION_ID_REPLICATION_RESULT == d_selectionId); return d_replicationResult.object(); } -inline const PurgedQueues& StorageResult::purgedQueues() const +inline +const PurgedQueues& StorageResult::purgedQueues() const { BSLS_ASSERT(SELECTION_ID_PURGED_QUEUES == d_selectionId); return d_purgedQueues.object(); } -inline bool StorageResult::isSuccessValue() const +inline +bool StorageResult::isSuccessValue() const { return SELECTION_ID_SUCCESS == d_selectionId; } -inline bool StorageResult::isErrorValue() const +inline +bool StorageResult::isErrorValue() const { return SELECTION_ID_ERROR == d_selectionId; } -inline bool StorageResult::isStorageContentValue() const +inline +bool StorageResult::isStorageContentValue() const { return SELECTION_ID_STORAGE_CONTENT == d_selectionId; } -inline bool StorageResult::isClusterStorageSummaryValue() const +inline +bool StorageResult::isClusterStorageSummaryValue() const { return SELECTION_ID_CLUSTER_STORAGE_SUMMARY == d_selectionId; } -inline bool StorageResult::isReplicationResultValue() const +inline +bool StorageResult::isReplicationResultValue() const { return SELECTION_ID_REPLICATION_RESULT == d_selectionId; } -inline bool StorageResult::isPurgedQueuesValue() const +inline +bool StorageResult::isPurgedQueuesValue() const { return SELECTION_ID_PURGED_QUEUES == d_selectionId; } -inline bool StorageResult::isUndefinedValue() const +inline +bool StorageResult::isUndefinedValue() const { return SELECTION_ID_UNDEFINED == d_selectionId; } -// -------------- -// class AppState -// -------------- + + // -------------- + // class AppState + // -------------- // PRIVATE ACCESSORS template @@ -48983,7 +50062,8 @@ void AppState::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const hashAppend(hashAlgorithm, this->roundRobinRouter()); } -inline bool AppState::isEqualTo(const AppState& rhs) const +inline +bool AppState::isEqualTo(const AppState& rhs) const { return this->appId() == rhs.appId() && this->numConsumers() == rhs.numConsumers() && @@ -49003,22 +50083,17 @@ int AppState::manipulateAttributes(t_MANIPULATOR& manipulator) return ret; } - ret = manipulator(&d_numConsumers, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_CONSUMERS]); + ret = manipulator(&d_numConsumers, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_CONSUMERS]); if (ret) { return ret; } - ret = manipulator( - &d_redeliveryListLength, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_REDELIVERY_LIST_LENGTH]); + ret = manipulator(&d_redeliveryListLength, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_REDELIVERY_LIST_LENGTH]); if (ret) { return ret; } - ret = manipulator( - &d_roundRobinRouter, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ROUND_ROBIN_ROUTER]); + ret = manipulator(&d_roundRobinRouter, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ROUND_ROBIN_ROUTER]); if (ret) { return ret; } @@ -49032,38 +50107,33 @@ int AppState::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_APP_ID: { - return manipulator(&d_appId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_ID]); - } - case ATTRIBUTE_ID_NUM_CONSUMERS: { - return manipulator( - &d_numConsumers, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_CONSUMERS]); - } - case ATTRIBUTE_ID_REDELIVERY_LIST_LENGTH: { - return manipulator( - &d_redeliveryListLength, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_REDELIVERY_LIST_LENGTH]); - } - case ATTRIBUTE_ID_ROUND_ROBIN_ROUTER: { - return manipulator( - &d_roundRobinRouter, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ROUND_ROBIN_ROUTER]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_APP_ID: { + return manipulator(&d_appId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_ID]); + } + case ATTRIBUTE_ID_NUM_CONSUMERS: { + return manipulator(&d_numConsumers, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_CONSUMERS]); + } + case ATTRIBUTE_ID_REDELIVERY_LIST_LENGTH: { + return manipulator(&d_redeliveryListLength, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_REDELIVERY_LIST_LENGTH]); + } + case ATTRIBUTE_ID_ROUND_ROBIN_ROUTER: { + return manipulator(&d_roundRobinRouter, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ROUND_ROBIN_ROUTER]); + } + default: + return NOT_FOUND; } } template -int AppState::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int AppState::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -49071,22 +50141,26 @@ int AppState::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::string& AppState::appId() +inline +bsl::string& AppState::appId() { return d_appId; } -inline unsigned int& AppState::numConsumers() +inline +unsigned int& AppState::numConsumers() { return d_numConsumers; } -inline bsls::Types::Int64& AppState::redeliveryListLength() +inline +bsls::Types::Int64& AppState::redeliveryListLength() { return d_redeliveryListLength; } -inline RoundRobinRouter& AppState::roundRobinRouter() +inline +RoundRobinRouter& AppState::roundRobinRouter() { return d_roundRobinRouter; } @@ -49102,21 +50176,17 @@ int AppState::accessAttributes(t_ACCESSOR& accessor) const return ret; } - ret = accessor(d_numConsumers, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_CONSUMERS]); + ret = accessor(d_numConsumers, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_CONSUMERS]); if (ret) { return ret; } - ret = accessor( - d_redeliveryListLength, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_REDELIVERY_LIST_LENGTH]); + ret = accessor(d_redeliveryListLength, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_REDELIVERY_LIST_LENGTH]); if (ret) { return ret; } - ret = accessor(d_roundRobinRouter, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ROUND_ROBIN_ROUTER]); + ret = accessor(d_roundRobinRouter, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ROUND_ROBIN_ROUTER]); if (ret) { return ret; } @@ -49130,66 +50200,69 @@ int AppState::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_APP_ID: { + case ATTRIBUTE_ID_APP_ID: { return accessor(d_appId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_ID]); - } - case ATTRIBUTE_ID_NUM_CONSUMERS: { - return accessor(d_numConsumers, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_CONSUMERS]); - } - case ATTRIBUTE_ID_REDELIVERY_LIST_LENGTH: { - return accessor( - d_redeliveryListLength, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_REDELIVERY_LIST_LENGTH]); - } - case ATTRIBUTE_ID_ROUND_ROBIN_ROUTER: { - return accessor( - d_roundRobinRouter, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ROUND_ROBIN_ROUTER]); - } - default: return NOT_FOUND; + } + case ATTRIBUTE_ID_NUM_CONSUMERS: { + return accessor(d_numConsumers, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_CONSUMERS]); + } + case ATTRIBUTE_ID_REDELIVERY_LIST_LENGTH: { + return accessor(d_redeliveryListLength, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_REDELIVERY_LIST_LENGTH]); + } + case ATTRIBUTE_ID_ROUND_ROBIN_ROUTER: { + return accessor(d_roundRobinRouter, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ROUND_ROBIN_ROUTER]); + } + default: + return NOT_FOUND; } } template -int AppState::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int AppState::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::string& AppState::appId() const +inline +const bsl::string& AppState::appId() const { return d_appId; } -inline unsigned int AppState::numConsumers() const +inline +unsigned int AppState::numConsumers() const { return d_numConsumers; } -inline bsls::Types::Int64 AppState::redeliveryListLength() const +inline +bsls::Types::Int64 AppState::redeliveryListLength() const { return d_redeliveryListLength; } -inline const RoundRobinRouter& AppState::roundRobinRouter() const +inline +const RoundRobinRouter& AppState::roundRobinRouter() const { return d_roundRobinRouter; } -// ------------- -// class Cluster -// ------------- + + + // ------------- + // class Cluster + // ------------- // CLASS METHODS // MANIPULATORS @@ -49203,8 +50276,7 @@ int Cluster::manipulateAttributes(t_MANIPULATOR& manipulator) return ret; } - ret = manipulator(&d_command, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND]); + ret = manipulator(&d_command, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND]); if (ret) { return ret; } @@ -49218,27 +50290,27 @@ int Cluster::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_NAME: { - return manipulator(&d_name, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]); - } - case ATTRIBUTE_ID_COMMAND: { - return manipulator(&d_command, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_NAME: { + return manipulator(&d_name, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]); + } + case ATTRIBUTE_ID_COMMAND: { + return manipulator(&d_command, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND]); + } + default: + return NOT_FOUND; } } template -int Cluster::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int Cluster::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -49246,12 +50318,14 @@ int Cluster::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::string& Cluster::name() +inline +bsl::string& Cluster::name() { return d_name; } -inline ClusterCommand& Cluster::command() +inline +ClusterCommand& Cluster::command() { return d_command; } @@ -49281,46 +50355,51 @@ int Cluster::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_NAME: { + case ATTRIBUTE_ID_NAME: { return accessor(d_name, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NAME]); - } - case ATTRIBUTE_ID_COMMAND: { - return accessor(d_command, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND]); - } - default: return NOT_FOUND; + } + case ATTRIBUTE_ID_COMMAND: { + return accessor(d_command, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_COMMAND]); + } + default: + return NOT_FOUND; } } template -int Cluster::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int Cluster::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::string& Cluster::name() const +inline +const bsl::string& Cluster::name() const { return d_name; } -inline const ClusterCommand& Cluster::command() const +inline +const ClusterCommand& Cluster::command() const { return d_command; } -// ------------------- -// class ClusterResult -// ------------------- + + + // ------------------- + // class ClusterResult + // ------------------- // CLASS METHODS // PRIVATE ACCESSORS @@ -49331,50 +50410,53 @@ void ClusterResult::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const using bslh::hashAppend; hashAppend(hashAlgorithm, this->selectionId()); switch (this->selectionId()) { - case Class::SELECTION_ID_ERROR: + case Class::SELECTION_ID_ERROR: hashAppend(hashAlgorithm, this->error()); break; - case Class::SELECTION_ID_SUCCESS: + case Class::SELECTION_ID_SUCCESS: hashAppend(hashAlgorithm, this->success()); break; - case Class::SELECTION_ID_ELECTOR_RESULT: + case Class::SELECTION_ID_ELECTOR_RESULT: hashAppend(hashAlgorithm, this->electorResult()); break; - case Class::SELECTION_ID_STORAGE_RESULT: + case Class::SELECTION_ID_STORAGE_RESULT: hashAppend(hashAlgorithm, this->storageResult()); break; - case Class::SELECTION_ID_CLUSTER_QUEUE_HELPER: + case Class::SELECTION_ID_CLUSTER_QUEUE_HELPER: hashAppend(hashAlgorithm, this->clusterQueueHelper()); break; - case Class::SELECTION_ID_CLUSTER_STATUS: + case Class::SELECTION_ID_CLUSTER_STATUS: hashAppend(hashAlgorithm, this->clusterStatus()); break; - case Class::SELECTION_ID_CLUSTER_PROXY_STATUS: + case Class::SELECTION_ID_CLUSTER_PROXY_STATUS: hashAppend(hashAlgorithm, this->clusterProxyStatus()); break; - default: BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); + default: + BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); } } -inline bool ClusterResult::isEqualTo(const ClusterResult& rhs) const +inline +bool ClusterResult::isEqualTo(const ClusterResult& rhs) const { typedef ClusterResult Class; if (this->selectionId() == rhs.selectionId()) { switch (rhs.selectionId()) { - case Class::SELECTION_ID_ERROR: return this->error() == rhs.error(); - case Class::SELECTION_ID_SUCCESS: + case Class::SELECTION_ID_ERROR: + return this->error() == rhs.error(); + case Class::SELECTION_ID_SUCCESS: return this->success() == rhs.success(); - case Class::SELECTION_ID_ELECTOR_RESULT: + case Class::SELECTION_ID_ELECTOR_RESULT: return this->electorResult() == rhs.electorResult(); - case Class::SELECTION_ID_STORAGE_RESULT: + case Class::SELECTION_ID_STORAGE_RESULT: return this->storageResult() == rhs.storageResult(); - case Class::SELECTION_ID_CLUSTER_QUEUE_HELPER: + case Class::SELECTION_ID_CLUSTER_QUEUE_HELPER: return this->clusterQueueHelper() == rhs.clusterQueueHelper(); - case Class::SELECTION_ID_CLUSTER_STATUS: + case Class::SELECTION_ID_CLUSTER_STATUS: return this->clusterStatus() == rhs.clusterStatus(); - case Class::SELECTION_ID_CLUSTER_PROXY_STATUS: + case Class::SELECTION_ID_CLUSTER_PROXY_STATUS: return this->clusterProxyStatus() == rhs.clusterProxyStatus(); - default: + default: BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId()); return true; } @@ -49385,13 +50467,15 @@ inline bool ClusterResult::isEqualTo(const ClusterResult& rhs) const } // CREATORS -inline ClusterResult::ClusterResult(bslma::Allocator* basicAllocator) +inline +ClusterResult::ClusterResult(bslma::Allocator *basicAllocator) : d_selectionId(SELECTION_ID_UNDEFINED) , d_allocator_p(bslma::Default::allocator(basicAllocator)) { } -inline ClusterResult::~ClusterResult() +inline +ClusterResult::~ClusterResult() { reset(); } @@ -49401,82 +50485,85 @@ template int ClusterResult::manipulateSelection(t_MANIPULATOR& manipulator) { switch (d_selectionId) { - case ClusterResult::SELECTION_ID_ERROR: + case ClusterResult::SELECTION_ID_ERROR: return manipulator(&d_error.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR]); - case ClusterResult::SELECTION_ID_SUCCESS: + SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR]); + case ClusterResult::SELECTION_ID_SUCCESS: return manipulator(&d_success.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_SUCCESS]); - case ClusterResult::SELECTION_ID_ELECTOR_RESULT: - return manipulator( - &d_electorResult.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_ELECTOR_RESULT]); - case ClusterResult::SELECTION_ID_STORAGE_RESULT: - return manipulator( - &d_storageResult.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_STORAGE_RESULT]); - case ClusterResult::SELECTION_ID_CLUSTER_QUEUE_HELPER: - return manipulator( - &d_clusterQueueHelper.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_QUEUE_HELPER]); - case ClusterResult::SELECTION_ID_CLUSTER_STATUS: - return manipulator( - &d_clusterStatus.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_STATUS]); - case ClusterResult::SELECTION_ID_CLUSTER_PROXY_STATUS: - return manipulator( - &d_clusterProxyStatus.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_PROXY_STATUS]); - default: + SELECTION_INFO_ARRAY[SELECTION_INDEX_SUCCESS]); + case ClusterResult::SELECTION_ID_ELECTOR_RESULT: + return manipulator(&d_electorResult.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_ELECTOR_RESULT]); + case ClusterResult::SELECTION_ID_STORAGE_RESULT: + return manipulator(&d_storageResult.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_STORAGE_RESULT]); + case ClusterResult::SELECTION_ID_CLUSTER_QUEUE_HELPER: + return manipulator(&d_clusterQueueHelper.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_QUEUE_HELPER]); + case ClusterResult::SELECTION_ID_CLUSTER_STATUS: + return manipulator(&d_clusterStatus.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_STATUS]); + case ClusterResult::SELECTION_ID_CLUSTER_PROXY_STATUS: + return manipulator(&d_clusterProxyStatus.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_PROXY_STATUS]); + default: BSLS_ASSERT(ClusterResult::SELECTION_ID_UNDEFINED == d_selectionId); return -1; } } -inline Error& ClusterResult::error() +inline +Error& ClusterResult::error() { BSLS_ASSERT(SELECTION_ID_ERROR == d_selectionId); return d_error.object(); } -inline Void& ClusterResult::success() +inline +Void& ClusterResult::success() { BSLS_ASSERT(SELECTION_ID_SUCCESS == d_selectionId); return d_success.object(); } -inline ElectorResult& ClusterResult::electorResult() +inline +ElectorResult& ClusterResult::electorResult() { BSLS_ASSERT(SELECTION_ID_ELECTOR_RESULT == d_selectionId); return d_electorResult.object(); } -inline StorageResult& ClusterResult::storageResult() +inline +StorageResult& ClusterResult::storageResult() { BSLS_ASSERT(SELECTION_ID_STORAGE_RESULT == d_selectionId); return d_storageResult.object(); } -inline ClusterQueueHelper& ClusterResult::clusterQueueHelper() +inline +ClusterQueueHelper& ClusterResult::clusterQueueHelper() { BSLS_ASSERT(SELECTION_ID_CLUSTER_QUEUE_HELPER == d_selectionId); return d_clusterQueueHelper.object(); } -inline ClusterStatus& ClusterResult::clusterStatus() +inline +ClusterStatus& ClusterResult::clusterStatus() { BSLS_ASSERT(SELECTION_ID_CLUSTER_STATUS == d_selectionId); return d_clusterStatus.object(); } -inline ClusterProxyStatus& ClusterResult::clusterProxyStatus() +inline +ClusterProxyStatus& ClusterResult::clusterProxyStatus() { BSLS_ASSERT(SELECTION_ID_CLUSTER_PROXY_STATUS == d_selectionId); return d_clusterProxyStatus.object(); } // ACCESSORS -inline int ClusterResult::selectionId() const +inline +int ClusterResult::selectionId() const { return d_selectionId; } @@ -49485,118 +50572,134 @@ template int ClusterResult::accessSelection(t_ACCESSOR& accessor) const { switch (d_selectionId) { - case SELECTION_ID_ERROR: + case SELECTION_ID_ERROR: return accessor(d_error.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR]); - case SELECTION_ID_SUCCESS: + SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR]); + case SELECTION_ID_SUCCESS: return accessor(d_success.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_SUCCESS]); - case SELECTION_ID_ELECTOR_RESULT: + SELECTION_INFO_ARRAY[SELECTION_INDEX_SUCCESS]); + case SELECTION_ID_ELECTOR_RESULT: return accessor(d_electorResult.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_ELECTOR_RESULT]); - case SELECTION_ID_STORAGE_RESULT: + SELECTION_INFO_ARRAY[SELECTION_INDEX_ELECTOR_RESULT]); + case SELECTION_ID_STORAGE_RESULT: return accessor(d_storageResult.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_STORAGE_RESULT]); - case SELECTION_ID_CLUSTER_QUEUE_HELPER: - return accessor( - d_clusterQueueHelper.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_QUEUE_HELPER]); - case SELECTION_ID_CLUSTER_STATUS: + SELECTION_INFO_ARRAY[SELECTION_INDEX_STORAGE_RESULT]); + case SELECTION_ID_CLUSTER_QUEUE_HELPER: + return accessor(d_clusterQueueHelper.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_QUEUE_HELPER]); + case SELECTION_ID_CLUSTER_STATUS: return accessor(d_clusterStatus.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_STATUS]); - case SELECTION_ID_CLUSTER_PROXY_STATUS: - return accessor( - d_clusterProxyStatus.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_PROXY_STATUS]); - default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); return -1; + SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_STATUS]); + case SELECTION_ID_CLUSTER_PROXY_STATUS: + return accessor(d_clusterProxyStatus.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_PROXY_STATUS]); + default: + BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); + return -1; } } -inline const Error& ClusterResult::error() const +inline +const Error& ClusterResult::error() const { BSLS_ASSERT(SELECTION_ID_ERROR == d_selectionId); return d_error.object(); } -inline const Void& ClusterResult::success() const +inline +const Void& ClusterResult::success() const { BSLS_ASSERT(SELECTION_ID_SUCCESS == d_selectionId); return d_success.object(); } -inline const ElectorResult& ClusterResult::electorResult() const +inline +const ElectorResult& ClusterResult::electorResult() const { BSLS_ASSERT(SELECTION_ID_ELECTOR_RESULT == d_selectionId); return d_electorResult.object(); } -inline const StorageResult& ClusterResult::storageResult() const +inline +const StorageResult& ClusterResult::storageResult() const { BSLS_ASSERT(SELECTION_ID_STORAGE_RESULT == d_selectionId); return d_storageResult.object(); } -inline const ClusterQueueHelper& ClusterResult::clusterQueueHelper() const +inline +const ClusterQueueHelper& ClusterResult::clusterQueueHelper() const { BSLS_ASSERT(SELECTION_ID_CLUSTER_QUEUE_HELPER == d_selectionId); return d_clusterQueueHelper.object(); } -inline const ClusterStatus& ClusterResult::clusterStatus() const +inline +const ClusterStatus& ClusterResult::clusterStatus() const { BSLS_ASSERT(SELECTION_ID_CLUSTER_STATUS == d_selectionId); return d_clusterStatus.object(); } -inline const ClusterProxyStatus& ClusterResult::clusterProxyStatus() const +inline +const ClusterProxyStatus& ClusterResult::clusterProxyStatus() const { BSLS_ASSERT(SELECTION_ID_CLUSTER_PROXY_STATUS == d_selectionId); return d_clusterProxyStatus.object(); } -inline bool ClusterResult::isErrorValue() const +inline +bool ClusterResult::isErrorValue() const { return SELECTION_ID_ERROR == d_selectionId; } -inline bool ClusterResult::isSuccessValue() const +inline +bool ClusterResult::isSuccessValue() const { return SELECTION_ID_SUCCESS == d_selectionId; } -inline bool ClusterResult::isElectorResultValue() const +inline +bool ClusterResult::isElectorResultValue() const { return SELECTION_ID_ELECTOR_RESULT == d_selectionId; } -inline bool ClusterResult::isStorageResultValue() const +inline +bool ClusterResult::isStorageResultValue() const { return SELECTION_ID_STORAGE_RESULT == d_selectionId; } -inline bool ClusterResult::isClusterQueueHelperValue() const +inline +bool ClusterResult::isClusterQueueHelperValue() const { return SELECTION_ID_CLUSTER_QUEUE_HELPER == d_selectionId; } -inline bool ClusterResult::isClusterStatusValue() const +inline +bool ClusterResult::isClusterStatusValue() const { return SELECTION_ID_CLUSTER_STATUS == d_selectionId; } -inline bool ClusterResult::isClusterProxyStatusValue() const +inline +bool ClusterResult::isClusterProxyStatusValue() const { return SELECTION_ID_CLUSTER_PROXY_STATUS == d_selectionId; } -inline bool ClusterResult::isUndefinedValue() const +inline +bool ClusterResult::isUndefinedValue() const { return SELECTION_ID_UNDEFINED == d_selectionId; } -// --------------------- -// class ClustersCommand -// --------------------- + + // --------------------- + // class ClustersCommand + // --------------------- // CLASS METHODS // PRIVATE ACCESSORS @@ -49607,30 +50710,33 @@ void ClustersCommand::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const using bslh::hashAppend; hashAppend(hashAlgorithm, this->selectionId()); switch (this->selectionId()) { - case Class::SELECTION_ID_LIST: + case Class::SELECTION_ID_LIST: hashAppend(hashAlgorithm, this->list()); break; - case Class::SELECTION_ID_ADD_REVERSE_PROXY: + case Class::SELECTION_ID_ADD_REVERSE_PROXY: hashAppend(hashAlgorithm, this->addReverseProxy()); break; - case Class::SELECTION_ID_CLUSTER: + case Class::SELECTION_ID_CLUSTER: hashAppend(hashAlgorithm, this->cluster()); break; - default: BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); + default: + BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); } } -inline bool ClustersCommand::isEqualTo(const ClustersCommand& rhs) const +inline +bool ClustersCommand::isEqualTo(const ClustersCommand& rhs) const { typedef ClustersCommand Class; if (this->selectionId() == rhs.selectionId()) { switch (rhs.selectionId()) { - case Class::SELECTION_ID_LIST: return this->list() == rhs.list(); - case Class::SELECTION_ID_ADD_REVERSE_PROXY: + case Class::SELECTION_ID_LIST: + return this->list() == rhs.list(); + case Class::SELECTION_ID_ADD_REVERSE_PROXY: return this->addReverseProxy() == rhs.addReverseProxy(); - case Class::SELECTION_ID_CLUSTER: + case Class::SELECTION_ID_CLUSTER: return this->cluster() == rhs.cluster(); - default: + default: BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId()); return true; } @@ -49641,13 +50747,15 @@ inline bool ClustersCommand::isEqualTo(const ClustersCommand& rhs) const } // CREATORS -inline ClustersCommand::ClustersCommand(bslma::Allocator* basicAllocator) +inline +ClustersCommand::ClustersCommand(bslma::Allocator *basicAllocator) : d_selectionId(SELECTION_ID_UNDEFINED) , d_allocator_p(bslma::Default::allocator(basicAllocator)) { } -inline ClustersCommand::~ClustersCommand() +inline +ClustersCommand::~ClustersCommand() { reset(); } @@ -49657,42 +50765,45 @@ template int ClustersCommand::manipulateSelection(t_MANIPULATOR& manipulator) { switch (d_selectionId) { - case ClustersCommand::SELECTION_ID_LIST: + case ClustersCommand::SELECTION_ID_LIST: return manipulator(&d_list.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_LIST]); - case ClustersCommand::SELECTION_ID_ADD_REVERSE_PROXY: - return manipulator( - &d_addReverseProxy.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_ADD_REVERSE_PROXY]); - case ClustersCommand::SELECTION_ID_CLUSTER: + SELECTION_INFO_ARRAY[SELECTION_INDEX_LIST]); + case ClustersCommand::SELECTION_ID_ADD_REVERSE_PROXY: + return manipulator(&d_addReverseProxy.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_ADD_REVERSE_PROXY]); + case ClustersCommand::SELECTION_ID_CLUSTER: return manipulator(&d_cluster.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER]); - default: + SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER]); + default: BSLS_ASSERT(ClustersCommand::SELECTION_ID_UNDEFINED == d_selectionId); return -1; } } -inline Void& ClustersCommand::list() +inline +Void& ClustersCommand::list() { BSLS_ASSERT(SELECTION_ID_LIST == d_selectionId); return d_list.object(); } -inline AddReverseProxy& ClustersCommand::addReverseProxy() +inline +AddReverseProxy& ClustersCommand::addReverseProxy() { BSLS_ASSERT(SELECTION_ID_ADD_REVERSE_PROXY == d_selectionId); return d_addReverseProxy.object(); } -inline Cluster& ClustersCommand::cluster() +inline +Cluster& ClustersCommand::cluster() { BSLS_ASSERT(SELECTION_ID_CLUSTER == d_selectionId); return d_cluster.object(); } // ACCESSORS -inline int ClustersCommand::selectionId() const +inline +int ClustersCommand::selectionId() const { return d_selectionId; } @@ -49701,61 +50812,70 @@ template int ClustersCommand::accessSelection(t_ACCESSOR& accessor) const { switch (d_selectionId) { - case SELECTION_ID_LIST: + case SELECTION_ID_LIST: return accessor(d_list.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_LIST]); - case SELECTION_ID_ADD_REVERSE_PROXY: - return accessor( - d_addReverseProxy.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_ADD_REVERSE_PROXY]); - case SELECTION_ID_CLUSTER: + SELECTION_INFO_ARRAY[SELECTION_INDEX_LIST]); + case SELECTION_ID_ADD_REVERSE_PROXY: + return accessor(d_addReverseProxy.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_ADD_REVERSE_PROXY]); + case SELECTION_ID_CLUSTER: return accessor(d_cluster.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER]); - default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); return -1; + SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER]); + default: + BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); + return -1; } } -inline const Void& ClustersCommand::list() const +inline +const Void& ClustersCommand::list() const { BSLS_ASSERT(SELECTION_ID_LIST == d_selectionId); return d_list.object(); } -inline const AddReverseProxy& ClustersCommand::addReverseProxy() const +inline +const AddReverseProxy& ClustersCommand::addReverseProxy() const { BSLS_ASSERT(SELECTION_ID_ADD_REVERSE_PROXY == d_selectionId); return d_addReverseProxy.object(); } -inline const Cluster& ClustersCommand::cluster() const +inline +const Cluster& ClustersCommand::cluster() const { BSLS_ASSERT(SELECTION_ID_CLUSTER == d_selectionId); return d_cluster.object(); } -inline bool ClustersCommand::isListValue() const +inline +bool ClustersCommand::isListValue() const { return SELECTION_ID_LIST == d_selectionId; } -inline bool ClustersCommand::isAddReverseProxyValue() const +inline +bool ClustersCommand::isAddReverseProxyValue() const { return SELECTION_ID_ADD_REVERSE_PROXY == d_selectionId; } -inline bool ClustersCommand::isClusterValue() const +inline +bool ClustersCommand::isClusterValue() const { return SELECTION_ID_CLUSTER == d_selectionId; } -inline bool ClustersCommand::isUndefinedValue() const +inline +bool ClustersCommand::isUndefinedValue() const { return SELECTION_ID_UNDEFINED == d_selectionId; } -// -------------------- -// class ClustersResult -// -------------------- + + // -------------------- + // class ClustersResult + // -------------------- // CLASS METHODS // PRIVATE ACCESSORS @@ -49766,35 +50886,38 @@ void ClustersResult::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const using bslh::hashAppend; hashAppend(hashAlgorithm, this->selectionId()); switch (this->selectionId()) { - case Class::SELECTION_ID_ERROR: + case Class::SELECTION_ID_ERROR: hashAppend(hashAlgorithm, this->error()); break; - case Class::SELECTION_ID_SUCCESS: + case Class::SELECTION_ID_SUCCESS: hashAppend(hashAlgorithm, this->success()); break; - case Class::SELECTION_ID_CLUSTER_LIST: + case Class::SELECTION_ID_CLUSTER_LIST: hashAppend(hashAlgorithm, this->clusterList()); break; - case Class::SELECTION_ID_CLUSTER_RESULT: + case Class::SELECTION_ID_CLUSTER_RESULT: hashAppend(hashAlgorithm, this->clusterResult()); break; - default: BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); + default: + BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); } } -inline bool ClustersResult::isEqualTo(const ClustersResult& rhs) const +inline +bool ClustersResult::isEqualTo(const ClustersResult& rhs) const { typedef ClustersResult Class; if (this->selectionId() == rhs.selectionId()) { switch (rhs.selectionId()) { - case Class::SELECTION_ID_ERROR: return this->error() == rhs.error(); - case Class::SELECTION_ID_SUCCESS: + case Class::SELECTION_ID_ERROR: + return this->error() == rhs.error(); + case Class::SELECTION_ID_SUCCESS: return this->success() == rhs.success(); - case Class::SELECTION_ID_CLUSTER_LIST: + case Class::SELECTION_ID_CLUSTER_LIST: return this->clusterList() == rhs.clusterList(); - case Class::SELECTION_ID_CLUSTER_RESULT: + case Class::SELECTION_ID_CLUSTER_RESULT: return this->clusterResult() == rhs.clusterResult(); - default: + default: BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId()); return true; } @@ -49805,13 +50928,15 @@ inline bool ClustersResult::isEqualTo(const ClustersResult& rhs) const } // CREATORS -inline ClustersResult::ClustersResult(bslma::Allocator* basicAllocator) +inline +ClustersResult::ClustersResult(bslma::Allocator *basicAllocator) : d_selectionId(SELECTION_ID_UNDEFINED) , d_allocator_p(bslma::Default::allocator(basicAllocator)) { } -inline ClustersResult::~ClustersResult() +inline +ClustersResult::~ClustersResult() { reset(); } @@ -49821,51 +50946,55 @@ template int ClustersResult::manipulateSelection(t_MANIPULATOR& manipulator) { switch (d_selectionId) { - case ClustersResult::SELECTION_ID_ERROR: + case ClustersResult::SELECTION_ID_ERROR: return manipulator(&d_error.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR]); - case ClustersResult::SELECTION_ID_SUCCESS: + SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR]); + case ClustersResult::SELECTION_ID_SUCCESS: return manipulator(&d_success.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_SUCCESS]); - case ClustersResult::SELECTION_ID_CLUSTER_LIST: + SELECTION_INFO_ARRAY[SELECTION_INDEX_SUCCESS]); + case ClustersResult::SELECTION_ID_CLUSTER_LIST: return manipulator(&d_clusterList.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_LIST]); - case ClustersResult::SELECTION_ID_CLUSTER_RESULT: - return manipulator( - &d_clusterResult.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_RESULT]); - default: + SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_LIST]); + case ClustersResult::SELECTION_ID_CLUSTER_RESULT: + return manipulator(&d_clusterResult.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_RESULT]); + default: BSLS_ASSERT(ClustersResult::SELECTION_ID_UNDEFINED == d_selectionId); return -1; } } -inline Error& ClustersResult::error() +inline +Error& ClustersResult::error() { BSLS_ASSERT(SELECTION_ID_ERROR == d_selectionId); return d_error.object(); } -inline Void& ClustersResult::success() +inline +Void& ClustersResult::success() { BSLS_ASSERT(SELECTION_ID_SUCCESS == d_selectionId); return d_success.object(); } -inline ClusterList& ClustersResult::clusterList() +inline +ClusterList& ClustersResult::clusterList() { BSLS_ASSERT(SELECTION_ID_CLUSTER_LIST == d_selectionId); return d_clusterList.object(); } -inline ClusterResult& ClustersResult::clusterResult() +inline +ClusterResult& ClustersResult::clusterResult() { BSLS_ASSERT(SELECTION_ID_CLUSTER_RESULT == d_selectionId); return d_clusterResult.object(); } // ACCESSORS -inline int ClustersResult::selectionId() const +inline +int ClustersResult::selectionId() const { return d_selectionId; } @@ -49874,74 +51003,86 @@ template int ClustersResult::accessSelection(t_ACCESSOR& accessor) const { switch (d_selectionId) { - case SELECTION_ID_ERROR: + case SELECTION_ID_ERROR: return accessor(d_error.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR]); - case SELECTION_ID_SUCCESS: + SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR]); + case SELECTION_ID_SUCCESS: return accessor(d_success.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_SUCCESS]); - case SELECTION_ID_CLUSTER_LIST: + SELECTION_INFO_ARRAY[SELECTION_INDEX_SUCCESS]); + case SELECTION_ID_CLUSTER_LIST: return accessor(d_clusterList.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_LIST]); - case SELECTION_ID_CLUSTER_RESULT: + SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_LIST]); + case SELECTION_ID_CLUSTER_RESULT: return accessor(d_clusterResult.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_RESULT]); - default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); return -1; + SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_RESULT]); + default: + BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); + return -1; } } -inline const Error& ClustersResult::error() const +inline +const Error& ClustersResult::error() const { BSLS_ASSERT(SELECTION_ID_ERROR == d_selectionId); return d_error.object(); } -inline const Void& ClustersResult::success() const +inline +const Void& ClustersResult::success() const { BSLS_ASSERT(SELECTION_ID_SUCCESS == d_selectionId); return d_success.object(); } -inline const ClusterList& ClustersResult::clusterList() const +inline +const ClusterList& ClustersResult::clusterList() const { BSLS_ASSERT(SELECTION_ID_CLUSTER_LIST == d_selectionId); return d_clusterList.object(); } -inline const ClusterResult& ClustersResult::clusterResult() const +inline +const ClusterResult& ClustersResult::clusterResult() const { BSLS_ASSERT(SELECTION_ID_CLUSTER_RESULT == d_selectionId); return d_clusterResult.object(); } -inline bool ClustersResult::isErrorValue() const +inline +bool ClustersResult::isErrorValue() const { return SELECTION_ID_ERROR == d_selectionId; } -inline bool ClustersResult::isSuccessValue() const +inline +bool ClustersResult::isSuccessValue() const { return SELECTION_ID_SUCCESS == d_selectionId; } -inline bool ClustersResult::isClusterListValue() const +inline +bool ClustersResult::isClusterListValue() const { return SELECTION_ID_CLUSTER_LIST == d_selectionId; } -inline bool ClustersResult::isClusterResultValue() const +inline +bool ClustersResult::isClusterResultValue() const { return SELECTION_ID_CLUSTER_RESULT == d_selectionId; } -inline bool ClustersResult::isUndefinedValue() const +inline +bool ClustersResult::isUndefinedValue() const { return SELECTION_ID_UNDEFINED == d_selectionId; } -// ------------------- -// class ConsumerState -// ------------------- + + // ------------------- + // class ConsumerState + // ------------------- // PRIVATE ACCESSORS template @@ -49954,9 +51095,11 @@ void ConsumerState::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const hashAppend(hashAlgorithm, this->appState()); } -inline bool ConsumerState::isEqualTo(const ConsumerState& rhs) const +inline +bool ConsumerState::isEqualTo(const ConsumerState& rhs) const { - return this->appId() == rhs.appId() && this->status() == rhs.status() && + return this->appId() == rhs.appId() && + this->status() == rhs.status() && this->isAtEndOfStorage() == rhs.isAtEndOfStorage() && this->appState() == rhs.appState(); } @@ -49978,15 +51121,12 @@ int ConsumerState::manipulateAttributes(t_MANIPULATOR& manipulator) return ret; } - ret = manipulator( - &d_isAtEndOfStorage, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_AT_END_OF_STORAGE]); + ret = manipulator(&d_isAtEndOfStorage, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_AT_END_OF_STORAGE]); if (ret) { return ret; } - ret = manipulator(&d_appState, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_STATE]); + ret = manipulator(&d_appState, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_STATE]); if (ret) { return ret; } @@ -50000,36 +51140,33 @@ int ConsumerState::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_APP_ID: { - return manipulator(&d_appId, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_ID]); - } - case ATTRIBUTE_ID_STATUS: { - return manipulator(&d_status, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STATUS]); - } - case ATTRIBUTE_ID_IS_AT_END_OF_STORAGE: { - return manipulator( - &d_isAtEndOfStorage, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_AT_END_OF_STORAGE]); - } - case ATTRIBUTE_ID_APP_STATE: { - return manipulator(&d_appState, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_STATE]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_APP_ID: { + return manipulator(&d_appId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_ID]); + } + case ATTRIBUTE_ID_STATUS: { + return manipulator(&d_status, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STATUS]); + } + case ATTRIBUTE_ID_IS_AT_END_OF_STORAGE: { + return manipulator(&d_isAtEndOfStorage, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_AT_END_OF_STORAGE]); + } + case ATTRIBUTE_ID_APP_STATE: { + return manipulator(&d_appState, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_STATE]); + } + default: + return NOT_FOUND; } } template -int ConsumerState::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int ConsumerState::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -50037,22 +51174,26 @@ int ConsumerState::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::string& ConsumerState::appId() +inline +bsl::string& ConsumerState::appId() { return d_appId; } -inline ConsumerStatus::Value& ConsumerState::status() +inline +ConsumerStatus::Value& ConsumerState::status() { return d_status; } -inline bdlb::NullableValue& ConsumerState::isAtEndOfStorage() +inline +bdlb::NullableValue& ConsumerState::isAtEndOfStorage() { return d_isAtEndOfStorage; } -inline AppState& ConsumerState::appState() +inline +AppState& ConsumerState::appState() { return d_appState; } @@ -50073,14 +51214,12 @@ int ConsumerState::accessAttributes(t_ACCESSOR& accessor) const return ret; } - ret = accessor(d_isAtEndOfStorage, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_AT_END_OF_STORAGE]); + ret = accessor(d_isAtEndOfStorage, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_AT_END_OF_STORAGE]); if (ret) { return ret; } - ret = accessor(d_appState, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_STATE]); + ret = accessor(d_appState, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_STATE]); if (ret) { return ret; } @@ -50094,65 +51233,69 @@ int ConsumerState::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_APP_ID: { + case ATTRIBUTE_ID_APP_ID: { return accessor(d_appId, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_ID]); - } - case ATTRIBUTE_ID_STATUS: { - return accessor(d_status, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STATUS]); - } - case ATTRIBUTE_ID_IS_AT_END_OF_STORAGE: { - return accessor( - d_isAtEndOfStorage, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_AT_END_OF_STORAGE]); - } - case ATTRIBUTE_ID_APP_STATE: { - return accessor(d_appState, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_STATE]); - } - default: return NOT_FOUND; + } + case ATTRIBUTE_ID_STATUS: { + return accessor(d_status, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STATUS]); + } + case ATTRIBUTE_ID_IS_AT_END_OF_STORAGE: { + return accessor(d_isAtEndOfStorage, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_AT_END_OF_STORAGE]); + } + case ATTRIBUTE_ID_APP_STATE: { + return accessor(d_appState, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_STATE]); + } + default: + return NOT_FOUND; } } template -int ConsumerState::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int ConsumerState::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::string& ConsumerState::appId() const +inline +const bsl::string& ConsumerState::appId() const { return d_appId; } -inline ConsumerStatus::Value ConsumerState::status() const +inline +ConsumerStatus::Value ConsumerState::status() const { return d_status; } -inline const bdlb::NullableValue& ConsumerState::isAtEndOfStorage() const +inline +const bdlb::NullableValue& ConsumerState::isAtEndOfStorage() const { return d_isAtEndOfStorage; } -inline const AppState& ConsumerState::appState() const +inline +const AppState& ConsumerState::appState() const { return d_appState; } -// ---------------------- -// class RelayQueueEngine -// ---------------------- + + + // ---------------------- + // class RelayQueueEngine + // ---------------------- // PRIVATE ACCESSORS template @@ -50165,7 +51308,8 @@ void RelayQueueEngine::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const hashAppend(hashAlgorithm, this->routing()); } -inline bool RelayQueueEngine::isEqualTo(const RelayQueueEngine& rhs) const +inline +bool RelayQueueEngine::isEqualTo(const RelayQueueEngine& rhs) const { return this->numSubstreams() == rhs.numSubstreams() && this->subStreams() == rhs.subStreams() && @@ -50180,26 +51324,22 @@ int RelayQueueEngine::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator(&d_numSubstreams, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_SUBSTREAMS]); + ret = manipulator(&d_numSubstreams, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_SUBSTREAMS]); if (ret) { return ret; } - ret = manipulator(&d_subStreams, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUB_STREAMS]); + ret = manipulator(&d_subStreams, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUB_STREAMS]); if (ret) { return ret; } - ret = manipulator(&d_appStates, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_STATES]); + ret = manipulator(&d_appStates, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_STATES]); if (ret) { return ret; } - ret = manipulator(&d_routing, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ROUTING]); + ret = manipulator(&d_routing, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ROUTING]); if (ret) { return ret; } @@ -50213,36 +51353,33 @@ int RelayQueueEngine::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_NUM_SUBSTREAMS: { - return manipulator( - &d_numSubstreams, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_SUBSTREAMS]); - } - case ATTRIBUTE_ID_SUB_STREAMS: { - return manipulator(&d_subStreams, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUB_STREAMS]); - } - case ATTRIBUTE_ID_APP_STATES: { - return manipulator(&d_appStates, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_STATES]); - } - case ATTRIBUTE_ID_ROUTING: { - return manipulator(&d_routing, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ROUTING]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_NUM_SUBSTREAMS: { + return manipulator(&d_numSubstreams, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_SUBSTREAMS]); + } + case ATTRIBUTE_ID_SUB_STREAMS: { + return manipulator(&d_subStreams, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUB_STREAMS]); + } + case ATTRIBUTE_ID_APP_STATES: { + return manipulator(&d_appStates, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_STATES]); + } + case ATTRIBUTE_ID_ROUTING: { + return manipulator(&d_routing, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ROUTING]); + } + default: + return NOT_FOUND; } } template -int RelayQueueEngine::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int RelayQueueEngine::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -50250,22 +51387,26 @@ int RelayQueueEngine::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline unsigned int& RelayQueueEngine::numSubstreams() +inline +unsigned int& RelayQueueEngine::numSubstreams() { return d_numSubstreams; } -inline bsl::vector& RelayQueueEngine::subStreams() +inline +bsl::vector& RelayQueueEngine::subStreams() { return d_subStreams; } -inline bsl::vector& RelayQueueEngine::appStates() +inline +bsl::vector& RelayQueueEngine::appStates() { return d_appStates; } -inline Routing& RelayQueueEngine::routing() +inline +Routing& RelayQueueEngine::routing() { return d_routing; } @@ -50276,20 +51417,17 @@ int RelayQueueEngine::accessAttributes(t_ACCESSOR& accessor) const { int ret; - ret = accessor(d_numSubstreams, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_SUBSTREAMS]); + ret = accessor(d_numSubstreams, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_SUBSTREAMS]); if (ret) { return ret; } - ret = accessor(d_subStreams, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUB_STREAMS]); + ret = accessor(d_subStreams, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUB_STREAMS]); if (ret) { return ret; } - ret = accessor(d_appStates, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_STATES]); + ret = accessor(d_appStates, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_STATES]); if (ret) { return ret; } @@ -50308,66 +51446,69 @@ int RelayQueueEngine::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_NUM_SUBSTREAMS: { - return accessor(d_numSubstreams, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_SUBSTREAMS]); - } - case ATTRIBUTE_ID_SUB_STREAMS: { - return accessor(d_subStreams, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUB_STREAMS]); - } - case ATTRIBUTE_ID_APP_STATES: { - return accessor(d_appStates, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_STATES]); - } - case ATTRIBUTE_ID_ROUTING: { - return accessor(d_routing, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ROUTING]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_NUM_SUBSTREAMS: { + return accessor(d_numSubstreams, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_SUBSTREAMS]); + } + case ATTRIBUTE_ID_SUB_STREAMS: { + return accessor(d_subStreams, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SUB_STREAMS]); + } + case ATTRIBUTE_ID_APP_STATES: { + return accessor(d_appStates, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_APP_STATES]); + } + case ATTRIBUTE_ID_ROUTING: { + return accessor(d_routing, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ROUTING]); + } + default: + return NOT_FOUND; } } template -int RelayQueueEngine::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int RelayQueueEngine::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline unsigned int RelayQueueEngine::numSubstreams() const +inline +unsigned int RelayQueueEngine::numSubstreams() const { return d_numSubstreams; } -inline const bsl::vector& -RelayQueueEngine::subStreams() const +inline +const bsl::vector& RelayQueueEngine::subStreams() const { return d_subStreams; } -inline const bsl::vector& RelayQueueEngine::appStates() const +inline +const bsl::vector& RelayQueueEngine::appStates() const { return d_appStates; } -inline const Routing& RelayQueueEngine::routing() const +inline +const Routing& RelayQueueEngine::routing() const { return d_routing; } -// ------------------- -// class CommandChoice -// ------------------- + + + // ------------------- + // class CommandChoice + // ------------------- // CLASS METHODS // PRIVATE ACCESSORS @@ -50378,48 +51519,53 @@ void CommandChoice::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const using bslh::hashAppend; hashAppend(hashAlgorithm, this->selectionId()); switch (this->selectionId()) { - case Class::SELECTION_ID_HELP: + case Class::SELECTION_ID_HELP: hashAppend(hashAlgorithm, this->help()); break; - case Class::SELECTION_ID_DOMAINS: + case Class::SELECTION_ID_DOMAINS: hashAppend(hashAlgorithm, this->domains()); break; - case Class::SELECTION_ID_CONFIG_PROVIDER: + case Class::SELECTION_ID_CONFIG_PROVIDER: hashAppend(hashAlgorithm, this->configProvider()); break; - case Class::SELECTION_ID_STAT: + case Class::SELECTION_ID_STAT: hashAppend(hashAlgorithm, this->stat()); break; - case Class::SELECTION_ID_CLUSTERS: + case Class::SELECTION_ID_CLUSTERS: hashAppend(hashAlgorithm, this->clusters()); break; - case Class::SELECTION_ID_DANGER: + case Class::SELECTION_ID_DANGER: hashAppend(hashAlgorithm, this->danger()); break; - case Class::SELECTION_ID_BROKER_CONFIG: + case Class::SELECTION_ID_BROKER_CONFIG: hashAppend(hashAlgorithm, this->brokerConfig()); break; - default: BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); + default: + BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); } } -inline bool CommandChoice::isEqualTo(const CommandChoice& rhs) const +inline +bool CommandChoice::isEqualTo(const CommandChoice& rhs) const { typedef CommandChoice Class; if (this->selectionId() == rhs.selectionId()) { switch (rhs.selectionId()) { - case Class::SELECTION_ID_HELP: return this->help() == rhs.help(); - case Class::SELECTION_ID_DOMAINS: + case Class::SELECTION_ID_HELP: + return this->help() == rhs.help(); + case Class::SELECTION_ID_DOMAINS: return this->domains() == rhs.domains(); - case Class::SELECTION_ID_CONFIG_PROVIDER: + case Class::SELECTION_ID_CONFIG_PROVIDER: return this->configProvider() == rhs.configProvider(); - case Class::SELECTION_ID_STAT: return this->stat() == rhs.stat(); - case Class::SELECTION_ID_CLUSTERS: + case Class::SELECTION_ID_STAT: + return this->stat() == rhs.stat(); + case Class::SELECTION_ID_CLUSTERS: return this->clusters() == rhs.clusters(); - case Class::SELECTION_ID_DANGER: return this->danger() == rhs.danger(); - case Class::SELECTION_ID_BROKER_CONFIG: + case Class::SELECTION_ID_DANGER: + return this->danger() == rhs.danger(); + case Class::SELECTION_ID_BROKER_CONFIG: return this->brokerConfig() == rhs.brokerConfig(); - default: + default: BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId()); return true; } @@ -50430,13 +51576,15 @@ inline bool CommandChoice::isEqualTo(const CommandChoice& rhs) const } // CREATORS -inline CommandChoice::CommandChoice(bslma::Allocator* basicAllocator) +inline +CommandChoice::CommandChoice(bslma::Allocator *basicAllocator) : d_selectionId(SELECTION_ID_UNDEFINED) , d_allocator_p(bslma::Default::allocator(basicAllocator)) { } -inline CommandChoice::~CommandChoice() +inline +CommandChoice::~CommandChoice() { reset(); } @@ -50446,79 +51594,85 @@ template int CommandChoice::manipulateSelection(t_MANIPULATOR& manipulator) { switch (d_selectionId) { - case CommandChoice::SELECTION_ID_HELP: + case CommandChoice::SELECTION_ID_HELP: return manipulator(&d_help.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_HELP]); - case CommandChoice::SELECTION_ID_DOMAINS: + SELECTION_INFO_ARRAY[SELECTION_INDEX_HELP]); + case CommandChoice::SELECTION_ID_DOMAINS: return manipulator(&d_domains.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAINS]); - case CommandChoice::SELECTION_ID_CONFIG_PROVIDER: - return manipulator( - &d_configProvider.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_CONFIG_PROVIDER]); - case CommandChoice::SELECTION_ID_STAT: + SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAINS]); + case CommandChoice::SELECTION_ID_CONFIG_PROVIDER: + return manipulator(&d_configProvider.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_CONFIG_PROVIDER]); + case CommandChoice::SELECTION_ID_STAT: return manipulator(&d_stat.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_STAT]); - case CommandChoice::SELECTION_ID_CLUSTERS: + SELECTION_INFO_ARRAY[SELECTION_INDEX_STAT]); + case CommandChoice::SELECTION_ID_CLUSTERS: return manipulator(&d_clusters.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTERS]); - case CommandChoice::SELECTION_ID_DANGER: + SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTERS]); + case CommandChoice::SELECTION_ID_DANGER: return manipulator(&d_danger.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_DANGER]); - case CommandChoice::SELECTION_ID_BROKER_CONFIG: - return manipulator( - &d_brokerConfig.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_BROKER_CONFIG]); - default: + SELECTION_INFO_ARRAY[SELECTION_INDEX_DANGER]); + case CommandChoice::SELECTION_ID_BROKER_CONFIG: + return manipulator(&d_brokerConfig.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_BROKER_CONFIG]); + default: BSLS_ASSERT(CommandChoice::SELECTION_ID_UNDEFINED == d_selectionId); return -1; } } -inline HelpCommand& CommandChoice::help() +inline +HelpCommand& CommandChoice::help() { BSLS_ASSERT(SELECTION_ID_HELP == d_selectionId); return d_help.object(); } -inline DomainsCommand& CommandChoice::domains() +inline +DomainsCommand& CommandChoice::domains() { BSLS_ASSERT(SELECTION_ID_DOMAINS == d_selectionId); return d_domains.object(); } -inline ConfigProviderCommand& CommandChoice::configProvider() +inline +ConfigProviderCommand& CommandChoice::configProvider() { BSLS_ASSERT(SELECTION_ID_CONFIG_PROVIDER == d_selectionId); return d_configProvider.object(); } -inline StatCommand& CommandChoice::stat() +inline +StatCommand& CommandChoice::stat() { BSLS_ASSERT(SELECTION_ID_STAT == d_selectionId); return d_stat.object(); } -inline ClustersCommand& CommandChoice::clusters() +inline +ClustersCommand& CommandChoice::clusters() { BSLS_ASSERT(SELECTION_ID_CLUSTERS == d_selectionId); return d_clusters.object(); } -inline DangerCommand& CommandChoice::danger() +inline +DangerCommand& CommandChoice::danger() { BSLS_ASSERT(SELECTION_ID_DANGER == d_selectionId); return d_danger.object(); } -inline BrokerConfigCommand& CommandChoice::brokerConfig() +inline +BrokerConfigCommand& CommandChoice::brokerConfig() { BSLS_ASSERT(SELECTION_ID_BROKER_CONFIG == d_selectionId); return d_brokerConfig.object(); } // ACCESSORS -inline int CommandChoice::selectionId() const +inline +int CommandChoice::selectionId() const { return d_selectionId; } @@ -50527,116 +51681,134 @@ template int CommandChoice::accessSelection(t_ACCESSOR& accessor) const { switch (d_selectionId) { - case SELECTION_ID_HELP: + case SELECTION_ID_HELP: return accessor(d_help.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_HELP]); - case SELECTION_ID_DOMAINS: + SELECTION_INFO_ARRAY[SELECTION_INDEX_HELP]); + case SELECTION_ID_DOMAINS: return accessor(d_domains.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAINS]); - case SELECTION_ID_CONFIG_PROVIDER: + SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAINS]); + case SELECTION_ID_CONFIG_PROVIDER: return accessor(d_configProvider.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_CONFIG_PROVIDER]); - case SELECTION_ID_STAT: + SELECTION_INFO_ARRAY[SELECTION_INDEX_CONFIG_PROVIDER]); + case SELECTION_ID_STAT: return accessor(d_stat.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_STAT]); - case SELECTION_ID_CLUSTERS: + SELECTION_INFO_ARRAY[SELECTION_INDEX_STAT]); + case SELECTION_ID_CLUSTERS: return accessor(d_clusters.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTERS]); - case SELECTION_ID_DANGER: + SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTERS]); + case SELECTION_ID_DANGER: return accessor(d_danger.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_DANGER]); - case SELECTION_ID_BROKER_CONFIG: + SELECTION_INFO_ARRAY[SELECTION_INDEX_DANGER]); + case SELECTION_ID_BROKER_CONFIG: return accessor(d_brokerConfig.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_BROKER_CONFIG]); - default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); return -1; + SELECTION_INFO_ARRAY[SELECTION_INDEX_BROKER_CONFIG]); + default: + BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); + return -1; } } -inline const HelpCommand& CommandChoice::help() const +inline +const HelpCommand& CommandChoice::help() const { BSLS_ASSERT(SELECTION_ID_HELP == d_selectionId); return d_help.object(); } -inline const DomainsCommand& CommandChoice::domains() const +inline +const DomainsCommand& CommandChoice::domains() const { BSLS_ASSERT(SELECTION_ID_DOMAINS == d_selectionId); return d_domains.object(); } -inline const ConfigProviderCommand& CommandChoice::configProvider() const +inline +const ConfigProviderCommand& CommandChoice::configProvider() const { BSLS_ASSERT(SELECTION_ID_CONFIG_PROVIDER == d_selectionId); return d_configProvider.object(); } -inline const StatCommand& CommandChoice::stat() const +inline +const StatCommand& CommandChoice::stat() const { BSLS_ASSERT(SELECTION_ID_STAT == d_selectionId); return d_stat.object(); } -inline const ClustersCommand& CommandChoice::clusters() const +inline +const ClustersCommand& CommandChoice::clusters() const { BSLS_ASSERT(SELECTION_ID_CLUSTERS == d_selectionId); return d_clusters.object(); } -inline const DangerCommand& CommandChoice::danger() const +inline +const DangerCommand& CommandChoice::danger() const { BSLS_ASSERT(SELECTION_ID_DANGER == d_selectionId); return d_danger.object(); } -inline const BrokerConfigCommand& CommandChoice::brokerConfig() const +inline +const BrokerConfigCommand& CommandChoice::brokerConfig() const { BSLS_ASSERT(SELECTION_ID_BROKER_CONFIG == d_selectionId); return d_brokerConfig.object(); } -inline bool CommandChoice::isHelpValue() const +inline +bool CommandChoice::isHelpValue() const { return SELECTION_ID_HELP == d_selectionId; } -inline bool CommandChoice::isDomainsValue() const +inline +bool CommandChoice::isDomainsValue() const { return SELECTION_ID_DOMAINS == d_selectionId; } -inline bool CommandChoice::isConfigProviderValue() const +inline +bool CommandChoice::isConfigProviderValue() const { return SELECTION_ID_CONFIG_PROVIDER == d_selectionId; } -inline bool CommandChoice::isStatValue() const +inline +bool CommandChoice::isStatValue() const { return SELECTION_ID_STAT == d_selectionId; } -inline bool CommandChoice::isClustersValue() const +inline +bool CommandChoice::isClustersValue() const { return SELECTION_ID_CLUSTERS == d_selectionId; } -inline bool CommandChoice::isDangerValue() const +inline +bool CommandChoice::isDangerValue() const { return SELECTION_ID_DANGER == d_selectionId; } -inline bool CommandChoice::isBrokerConfigValue() const +inline +bool CommandChoice::isBrokerConfigValue() const { return SELECTION_ID_BROKER_CONFIG == d_selectionId; } -inline bool CommandChoice::isUndefinedValue() const +inline +bool CommandChoice::isUndefinedValue() const { return SELECTION_ID_UNDEFINED == d_selectionId; } -// ----------------------- -// class FanoutQueueEngine -// ----------------------- + + // ----------------------- + // class FanoutQueueEngine + // ----------------------- // PRIVATE ACCESSORS template @@ -50649,7 +51821,8 @@ void FanoutQueueEngine::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const hashAppend(hashAlgorithm, this->routing()); } -inline bool FanoutQueueEngine::isEqualTo(const FanoutQueueEngine& rhs) const +inline +bool FanoutQueueEngine::isEqualTo(const FanoutQueueEngine& rhs) const { return this->maxConsumers() == rhs.maxConsumers() && this->mode() == rhs.mode() && @@ -50664,8 +51837,7 @@ int FanoutQueueEngine::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator(&d_maxConsumers, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MAX_CONSUMERS]); + ret = manipulator(&d_maxConsumers, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MAX_CONSUMERS]); if (ret) { return ret; } @@ -50675,14 +51847,12 @@ int FanoutQueueEngine::manipulateAttributes(t_MANIPULATOR& manipulator) return ret; } - ret = manipulator(&d_consumerStates, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONSUMER_STATES]); + ret = manipulator(&d_consumerStates, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONSUMER_STATES]); if (ret) { return ret; } - ret = manipulator(&d_routing, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ROUTING]); + ret = manipulator(&d_routing, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ROUTING]); if (ret) { return ret; } @@ -50696,37 +51866,33 @@ int FanoutQueueEngine::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_MAX_CONSUMERS: { - return manipulator( - &d_maxConsumers, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MAX_CONSUMERS]); - } - case ATTRIBUTE_ID_MODE: { - return manipulator(&d_mode, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MODE]); - } - case ATTRIBUTE_ID_CONSUMER_STATES: { - return manipulator( - &d_consumerStates, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONSUMER_STATES]); - } - case ATTRIBUTE_ID_ROUTING: { - return manipulator(&d_routing, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ROUTING]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_MAX_CONSUMERS: { + return manipulator(&d_maxConsumers, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MAX_CONSUMERS]); + } + case ATTRIBUTE_ID_MODE: { + return manipulator(&d_mode, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MODE]); + } + case ATTRIBUTE_ID_CONSUMER_STATES: { + return manipulator(&d_consumerStates, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONSUMER_STATES]); + } + case ATTRIBUTE_ID_ROUTING: { + return manipulator(&d_routing, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ROUTING]); + } + default: + return NOT_FOUND; } } template -int FanoutQueueEngine::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int FanoutQueueEngine::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -50734,22 +51900,26 @@ int FanoutQueueEngine::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline unsigned int& FanoutQueueEngine::maxConsumers() +inline +unsigned int& FanoutQueueEngine::maxConsumers() { return d_maxConsumers; } -inline bsl::string& FanoutQueueEngine::mode() +inline +bsl::string& FanoutQueueEngine::mode() { return d_mode; } -inline bsl::vector& FanoutQueueEngine::consumerStates() +inline +bsl::vector& FanoutQueueEngine::consumerStates() { return d_consumerStates; } -inline Routing& FanoutQueueEngine::routing() +inline +Routing& FanoutQueueEngine::routing() { return d_routing; } @@ -50760,8 +51930,7 @@ int FanoutQueueEngine::accessAttributes(t_ACCESSOR& accessor) const { int ret; - ret = accessor(d_maxConsumers, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MAX_CONSUMERS]); + ret = accessor(d_maxConsumers, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MAX_CONSUMERS]); if (ret) { return ret; } @@ -50771,8 +51940,7 @@ int FanoutQueueEngine::accessAttributes(t_ACCESSOR& accessor) const return ret; } - ret = accessor(d_consumerStates, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONSUMER_STATES]); + ret = accessor(d_consumerStates, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONSUMER_STATES]); if (ret) { return ret; } @@ -50791,65 +51959,69 @@ int FanoutQueueEngine::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_MAX_CONSUMERS: { - return accessor(d_maxConsumers, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MAX_CONSUMERS]); - } - case ATTRIBUTE_ID_MODE: { + case ATTRIBUTE_ID_MAX_CONSUMERS: { + return accessor(d_maxConsumers, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MAX_CONSUMERS]); + } + case ATTRIBUTE_ID_MODE: { return accessor(d_mode, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_MODE]); - } - case ATTRIBUTE_ID_CONSUMER_STATES: { - return accessor(d_consumerStates, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONSUMER_STATES]); - } - case ATTRIBUTE_ID_ROUTING: { - return accessor(d_routing, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ROUTING]); - } - default: return NOT_FOUND; + } + case ATTRIBUTE_ID_CONSUMER_STATES: { + return accessor(d_consumerStates, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CONSUMER_STATES]); + } + case ATTRIBUTE_ID_ROUTING: { + return accessor(d_routing, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ROUTING]); + } + default: + return NOT_FOUND; } } template -int FanoutQueueEngine::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int FanoutQueueEngine::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline unsigned int FanoutQueueEngine::maxConsumers() const +inline +unsigned int FanoutQueueEngine::maxConsumers() const { return d_maxConsumers; } -inline const bsl::string& FanoutQueueEngine::mode() const +inline +const bsl::string& FanoutQueueEngine::mode() const { return d_mode; } -inline const bsl::vector& -FanoutQueueEngine::consumerStates() const +inline +const bsl::vector& FanoutQueueEngine::consumerStates() const { return d_consumerStates; } -inline const Routing& FanoutQueueEngine::routing() const +inline +const Routing& FanoutQueueEngine::routing() const { return d_routing; } -// ------------- -// class Command -// ------------- + + + // ------------- + // class Command + // ------------- // CLASS METHODS // MANIPULATORS @@ -50863,8 +52035,7 @@ int Command::manipulateAttributes(t_MANIPULATOR& manipulator) return ret; } - ret = manipulator(&d_encoding, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ENCODING]); + ret = manipulator(&d_encoding, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ENCODING]); if (ret) { return ret; } @@ -50878,27 +52049,27 @@ int Command::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_CHOICE: { - return manipulator(&d_choice, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE]); - } - case ATTRIBUTE_ID_ENCODING: { - return manipulator(&d_encoding, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ENCODING]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_CHOICE: { + return manipulator(&d_choice, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE]); + } + case ATTRIBUTE_ID_ENCODING: { + return manipulator(&d_encoding, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ENCODING]); + } + default: + return NOT_FOUND; } } template -int Command::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int Command::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -50906,12 +52077,14 @@ int Command::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline CommandChoice& Command::choice() +inline +CommandChoice& Command::choice() { return d_choice; } -inline EncodingFormat::Value& Command::encoding() +inline +EncodingFormat::Value& Command::encoding() { return d_encoding; } @@ -50941,47 +52114,51 @@ int Command::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_CHOICE: { - return accessor(d_choice, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE]); - } - case ATTRIBUTE_ID_ENCODING: { - return accessor(d_encoding, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ENCODING]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_CHOICE: { + return accessor(d_choice, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CHOICE]); + } + case ATTRIBUTE_ID_ENCODING: { + return accessor(d_encoding, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_ENCODING]); + } + default: + return NOT_FOUND; } } template -int Command::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int Command::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const CommandChoice& Command::choice() const +inline +const CommandChoice& Command::choice() const { return d_choice; } -inline EncodingFormat::Value Command::encoding() const +inline +EncodingFormat::Value Command::encoding() const { return d_encoding; } -// ----------------- -// class QueueEngine -// ----------------- + + + // ----------------- + // class QueueEngine + // ----------------- // CLASS METHODS // PRIVATE ACCESSORS @@ -50992,24 +52169,28 @@ void QueueEngine::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const using bslh::hashAppend; hashAppend(hashAlgorithm, this->selectionId()); switch (this->selectionId()) { - case Class::SELECTION_ID_FANOUT: + case Class::SELECTION_ID_FANOUT: hashAppend(hashAlgorithm, this->fanout()); break; - case Class::SELECTION_ID_RELAY: + case Class::SELECTION_ID_RELAY: hashAppend(hashAlgorithm, this->relay()); break; - default: BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); + default: + BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); } } -inline bool QueueEngine::isEqualTo(const QueueEngine& rhs) const +inline +bool QueueEngine::isEqualTo(const QueueEngine& rhs) const { typedef QueueEngine Class; if (this->selectionId() == rhs.selectionId()) { switch (rhs.selectionId()) { - case Class::SELECTION_ID_FANOUT: return this->fanout() == rhs.fanout(); - case Class::SELECTION_ID_RELAY: return this->relay() == rhs.relay(); - default: + case Class::SELECTION_ID_FANOUT: + return this->fanout() == rhs.fanout(); + case Class::SELECTION_ID_RELAY: + return this->relay() == rhs.relay(); + default: BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId()); return true; } @@ -51020,13 +52201,15 @@ inline bool QueueEngine::isEqualTo(const QueueEngine& rhs) const } // CREATORS -inline QueueEngine::QueueEngine(bslma::Allocator* basicAllocator) +inline +QueueEngine::QueueEngine(bslma::Allocator *basicAllocator) : d_selectionId(SELECTION_ID_UNDEFINED) , d_allocator_p(bslma::Default::allocator(basicAllocator)) { } -inline QueueEngine::~QueueEngine() +inline +QueueEngine::~QueueEngine() { reset(); } @@ -51036,32 +52219,35 @@ template int QueueEngine::manipulateSelection(t_MANIPULATOR& manipulator) { switch (d_selectionId) { - case QueueEngine::SELECTION_ID_FANOUT: + case QueueEngine::SELECTION_ID_FANOUT: return manipulator(&d_fanout.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_FANOUT]); - case QueueEngine::SELECTION_ID_RELAY: + SELECTION_INFO_ARRAY[SELECTION_INDEX_FANOUT]); + case QueueEngine::SELECTION_ID_RELAY: return manipulator(&d_relay.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_RELAY]); - default: + SELECTION_INFO_ARRAY[SELECTION_INDEX_RELAY]); + default: BSLS_ASSERT(QueueEngine::SELECTION_ID_UNDEFINED == d_selectionId); return -1; } } -inline FanoutQueueEngine& QueueEngine::fanout() +inline +FanoutQueueEngine& QueueEngine::fanout() { BSLS_ASSERT(SELECTION_ID_FANOUT == d_selectionId); return d_fanout.object(); } -inline RelayQueueEngine& QueueEngine::relay() +inline +RelayQueueEngine& QueueEngine::relay() { BSLS_ASSERT(SELECTION_ID_RELAY == d_selectionId); return d_relay.object(); } // ACCESSORS -inline int QueueEngine::selectionId() const +inline +int QueueEngine::selectionId() const { return d_selectionId; } @@ -51070,46 +52256,54 @@ template int QueueEngine::accessSelection(t_ACCESSOR& accessor) const { switch (d_selectionId) { - case SELECTION_ID_FANOUT: + case SELECTION_ID_FANOUT: return accessor(d_fanout.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_FANOUT]); - case SELECTION_ID_RELAY: + SELECTION_INFO_ARRAY[SELECTION_INDEX_FANOUT]); + case SELECTION_ID_RELAY: return accessor(d_relay.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_RELAY]); - default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); return -1; + SELECTION_INFO_ARRAY[SELECTION_INDEX_RELAY]); + default: + BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); + return -1; } } -inline const FanoutQueueEngine& QueueEngine::fanout() const +inline +const FanoutQueueEngine& QueueEngine::fanout() const { BSLS_ASSERT(SELECTION_ID_FANOUT == d_selectionId); return d_fanout.object(); } -inline const RelayQueueEngine& QueueEngine::relay() const +inline +const RelayQueueEngine& QueueEngine::relay() const { BSLS_ASSERT(SELECTION_ID_RELAY == d_selectionId); return d_relay.object(); } -inline bool QueueEngine::isFanoutValue() const +inline +bool QueueEngine::isFanoutValue() const { return SELECTION_ID_FANOUT == d_selectionId; } -inline bool QueueEngine::isRelayValue() const +inline +bool QueueEngine::isRelayValue() const { return SELECTION_ID_RELAY == d_selectionId; } -inline bool QueueEngine::isUndefinedValue() const +inline +bool QueueEngine::isUndefinedValue() const { return SELECTION_ID_UNDEFINED == d_selectionId; } -// ---------------- -// class LocalQueue -// ---------------- + + // ---------------- + // class LocalQueue + // ---------------- // CLASS METHODS // MANIPULATORS @@ -51118,8 +52312,7 @@ int LocalQueue::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator(&d_queueEngine, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_ENGINE]); + ret = manipulator(&d_queueEngine, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_ENGINE]); if (ret) { return ret; } @@ -51133,23 +52326,24 @@ int LocalQueue::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_QUEUE_ENGINE: { - return manipulator(&d_queueEngine, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_ENGINE]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_QUEUE_ENGINE: { + return manipulator(&d_queueEngine, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_ENGINE]); + } + default: + return NOT_FOUND; } } template -int LocalQueue::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int LocalQueue::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -51157,7 +52351,8 @@ int LocalQueue::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline QueueEngine& LocalQueue::queueEngine() +inline +QueueEngine& LocalQueue::queueEngine() { return d_queueEngine; } @@ -51168,8 +52363,7 @@ int LocalQueue::accessAttributes(t_ACCESSOR& accessor) const { int ret; - ret = accessor(d_queueEngine, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_ENGINE]); + ret = accessor(d_queueEngine, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_ENGINE]); if (ret) { return ret; } @@ -51183,38 +52377,42 @@ int LocalQueue::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_QUEUE_ENGINE: { - return accessor(d_queueEngine, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_ENGINE]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_QUEUE_ENGINE: { + return accessor(d_queueEngine, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_ENGINE]); + } + default: + return NOT_FOUND; } } template -int LocalQueue::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int LocalQueue::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const QueueEngine& LocalQueue::queueEngine() const +inline +const QueueEngine& LocalQueue::queueEngine() const { return d_queueEngine; } -// ----------------- -// class RemoteQueue -// ----------------- + + + // ----------------- + // class RemoteQueue + // ----------------- // PRIVATE ACCESSORS template @@ -51229,12 +52427,12 @@ void RemoteQueue::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const hashAppend(hashAlgorithm, this->queueEngine()); } -inline bool RemoteQueue::isEqualTo(const RemoteQueue& rhs) const +inline +bool RemoteQueue::isEqualTo(const RemoteQueue& rhs) const { return this->numPendingPuts() == rhs.numPendingPuts() && this->numPendingConfirms() == rhs.numPendingConfirms() && - this->isPushExpirationTimerScheduled() == - rhs.isPushExpirationTimerScheduled() && + this->isPushExpirationTimerScheduled() == rhs.isPushExpirationTimerScheduled() && this->numUpstreamGeneration() == rhs.numUpstreamGeneration() && this->streams() == rhs.streams() && this->queueEngine() == rhs.queueEngine(); @@ -51247,42 +52445,32 @@ int RemoteQueue::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator(&d_numPendingPuts, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_PENDING_PUTS]); + ret = manipulator(&d_numPendingPuts, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_PENDING_PUTS]); if (ret) { return ret; } - ret = manipulator( - &d_numPendingConfirms, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_PENDING_CONFIRMS]); + ret = manipulator(&d_numPendingConfirms, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_PENDING_CONFIRMS]); if (ret) { return ret; } - ret = manipulator( - &d_isPushExpirationTimerScheduled, - ATTRIBUTE_INFO_ARRAY - [ATTRIBUTE_INDEX_IS_PUSH_EXPIRATION_TIMER_SCHEDULED]); + ret = manipulator(&d_isPushExpirationTimerScheduled, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_PUSH_EXPIRATION_TIMER_SCHEDULED]); if (ret) { return ret; } - ret = manipulator( - &d_numUpstreamGeneration, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_UPSTREAM_GENERATION]); + ret = manipulator(&d_numUpstreamGeneration, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_UPSTREAM_GENERATION]); if (ret) { return ret; } - ret = manipulator(&d_streams, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STREAMS]); + ret = manipulator(&d_streams, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STREAMS]); if (ret) { return ret; } - ret = manipulator(&d_queueEngine, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_ENGINE]); + ret = manipulator(&d_queueEngine, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_ENGINE]); if (ret) { return ret; } @@ -51296,48 +52484,39 @@ int RemoteQueue::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_NUM_PENDING_PUTS: { - return manipulator( - &d_numPendingPuts, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_PENDING_PUTS]); - } - case ATTRIBUTE_ID_NUM_PENDING_CONFIRMS: { - return manipulator( - &d_numPendingConfirms, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_PENDING_CONFIRMS]); - } - case ATTRIBUTE_ID_IS_PUSH_EXPIRATION_TIMER_SCHEDULED: { - return manipulator( - &d_isPushExpirationTimerScheduled, - ATTRIBUTE_INFO_ARRAY - [ATTRIBUTE_INDEX_IS_PUSH_EXPIRATION_TIMER_SCHEDULED]); - } - case ATTRIBUTE_ID_NUM_UPSTREAM_GENERATION: { - return manipulator( - &d_numUpstreamGeneration, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_UPSTREAM_GENERATION]); - } - case ATTRIBUTE_ID_STREAMS: { - return manipulator(&d_streams, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STREAMS]); - } - case ATTRIBUTE_ID_QUEUE_ENGINE: { - return manipulator(&d_queueEngine, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_ENGINE]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_NUM_PENDING_PUTS: { + return manipulator(&d_numPendingPuts, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_PENDING_PUTS]); + } + case ATTRIBUTE_ID_NUM_PENDING_CONFIRMS: { + return manipulator(&d_numPendingConfirms, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_PENDING_CONFIRMS]); + } + case ATTRIBUTE_ID_IS_PUSH_EXPIRATION_TIMER_SCHEDULED: { + return manipulator(&d_isPushExpirationTimerScheduled, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_PUSH_EXPIRATION_TIMER_SCHEDULED]); + } + case ATTRIBUTE_ID_NUM_UPSTREAM_GENERATION: { + return manipulator(&d_numUpstreamGeneration, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_UPSTREAM_GENERATION]); + } + case ATTRIBUTE_ID_STREAMS: { + return manipulator(&d_streams, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STREAMS]); + } + case ATTRIBUTE_ID_QUEUE_ENGINE: { + return manipulator(&d_queueEngine, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_ENGINE]); + } + default: + return NOT_FOUND; } } template -int RemoteQueue::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int RemoteQueue::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -51345,32 +52524,38 @@ int RemoteQueue::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsls::Types::Int64& RemoteQueue::numPendingPuts() +inline +bsls::Types::Int64& RemoteQueue::numPendingPuts() { return d_numPendingPuts; } -inline bsls::Types::Int64& RemoteQueue::numPendingConfirms() +inline +bsls::Types::Int64& RemoteQueue::numPendingConfirms() { return d_numPendingConfirms; } -inline bool& RemoteQueue::isPushExpirationTimerScheduled() +inline +bool& RemoteQueue::isPushExpirationTimerScheduled() { return d_isPushExpirationTimerScheduled; } -inline unsigned int& RemoteQueue::numUpstreamGeneration() +inline +unsigned int& RemoteQueue::numUpstreamGeneration() { return d_numUpstreamGeneration; } -inline bsl::vector& RemoteQueue::streams() +inline +bsl::vector& RemoteQueue::streams() { return d_streams; } -inline QueueEngine& RemoteQueue::queueEngine() +inline +QueueEngine& RemoteQueue::queueEngine() { return d_queueEngine; } @@ -51381,28 +52566,22 @@ int RemoteQueue::accessAttributes(t_ACCESSOR& accessor) const { int ret; - ret = accessor(d_numPendingPuts, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_PENDING_PUTS]); + ret = accessor(d_numPendingPuts, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_PENDING_PUTS]); if (ret) { return ret; } - ret = accessor(d_numPendingConfirms, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_PENDING_CONFIRMS]); + ret = accessor(d_numPendingConfirms, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_PENDING_CONFIRMS]); if (ret) { return ret; } - ret = accessor(d_isPushExpirationTimerScheduled, - ATTRIBUTE_INFO_ARRAY - [ATTRIBUTE_INDEX_IS_PUSH_EXPIRATION_TIMER_SCHEDULED]); + ret = accessor(d_isPushExpirationTimerScheduled, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_PUSH_EXPIRATION_TIMER_SCHEDULED]); if (ret) { return ret; } - ret = accessor( - d_numUpstreamGeneration, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_UPSTREAM_GENERATION]); + ret = accessor(d_numUpstreamGeneration, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_UPSTREAM_GENERATION]); if (ret) { return ret; } @@ -51412,8 +52591,7 @@ int RemoteQueue::accessAttributes(t_ACCESSOR& accessor) const return ret; } - ret = accessor(d_queueEngine, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_ENGINE]); + ret = accessor(d_queueEngine, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_ENGINE]); if (ret) { return ret; } @@ -51427,88 +52605,87 @@ int RemoteQueue::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_NUM_PENDING_PUTS: { - return accessor( - d_numPendingPuts, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_PENDING_PUTS]); - } - case ATTRIBUTE_ID_NUM_PENDING_CONFIRMS: { - return accessor( - d_numPendingConfirms, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_PENDING_CONFIRMS]); - } - case ATTRIBUTE_ID_IS_PUSH_EXPIRATION_TIMER_SCHEDULED: { - return accessor( - d_isPushExpirationTimerScheduled, - ATTRIBUTE_INFO_ARRAY - [ATTRIBUTE_INDEX_IS_PUSH_EXPIRATION_TIMER_SCHEDULED]); - } - case ATTRIBUTE_ID_NUM_UPSTREAM_GENERATION: { - return accessor( - d_numUpstreamGeneration, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_UPSTREAM_GENERATION]); - } - case ATTRIBUTE_ID_STREAMS: { - return accessor(d_streams, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STREAMS]); - } - case ATTRIBUTE_ID_QUEUE_ENGINE: { - return accessor(d_queueEngine, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_ENGINE]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_NUM_PENDING_PUTS: { + return accessor(d_numPendingPuts, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_PENDING_PUTS]); + } + case ATTRIBUTE_ID_NUM_PENDING_CONFIRMS: { + return accessor(d_numPendingConfirms, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_PENDING_CONFIRMS]); + } + case ATTRIBUTE_ID_IS_PUSH_EXPIRATION_TIMER_SCHEDULED: { + return accessor(d_isPushExpirationTimerScheduled, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_IS_PUSH_EXPIRATION_TIMER_SCHEDULED]); + } + case ATTRIBUTE_ID_NUM_UPSTREAM_GENERATION: { + return accessor(d_numUpstreamGeneration, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_NUM_UPSTREAM_GENERATION]); + } + case ATTRIBUTE_ID_STREAMS: { + return accessor(d_streams, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STREAMS]); + } + case ATTRIBUTE_ID_QUEUE_ENGINE: { + return accessor(d_queueEngine, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE_ENGINE]); + } + default: + return NOT_FOUND; } } template -int RemoteQueue::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int RemoteQueue::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline bsls::Types::Int64 RemoteQueue::numPendingPuts() const +inline +bsls::Types::Int64 RemoteQueue::numPendingPuts() const { return d_numPendingPuts; } -inline bsls::Types::Int64 RemoteQueue::numPendingConfirms() const +inline +bsls::Types::Int64 RemoteQueue::numPendingConfirms() const { return d_numPendingConfirms; } -inline bool RemoteQueue::isPushExpirationTimerScheduled() const +inline +bool RemoteQueue::isPushExpirationTimerScheduled() const { return d_isPushExpirationTimerScheduled; } -inline unsigned int RemoteQueue::numUpstreamGeneration() const +inline +unsigned int RemoteQueue::numUpstreamGeneration() const { return d_numUpstreamGeneration; } -inline const bsl::vector& RemoteQueue::streams() const +inline +const bsl::vector& RemoteQueue::streams() const { return d_streams; } -inline const QueueEngine& RemoteQueue::queueEngine() const +inline +const QueueEngine& RemoteQueue::queueEngine() const { return d_queueEngine; } -// ----------- -// class Queue -// ----------- + + + // ----------- + // class Queue + // ----------- // CLASS METHODS // PRIVATE ACCESSORS @@ -51519,31 +52696,33 @@ void Queue::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const using bslh::hashAppend; hashAppend(hashAlgorithm, this->selectionId()); switch (this->selectionId()) { - case Class::SELECTION_ID_LOCAL_QUEUE: + case Class::SELECTION_ID_LOCAL_QUEUE: hashAppend(hashAlgorithm, this->localQueue()); break; - case Class::SELECTION_ID_REMOTE_QUEUE: + case Class::SELECTION_ID_REMOTE_QUEUE: hashAppend(hashAlgorithm, this->remoteQueue()); break; - case Class::SELECTION_ID_UNINITIALIZED_QUEUE: + case Class::SELECTION_ID_UNINITIALIZED_QUEUE: hashAppend(hashAlgorithm, this->uninitializedQueue()); break; - default: BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); + default: + BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); } } -inline bool Queue::isEqualTo(const Queue& rhs) const +inline +bool Queue::isEqualTo(const Queue& rhs) const { typedef Queue Class; if (this->selectionId() == rhs.selectionId()) { switch (rhs.selectionId()) { - case Class::SELECTION_ID_LOCAL_QUEUE: + case Class::SELECTION_ID_LOCAL_QUEUE: return this->localQueue() == rhs.localQueue(); - case Class::SELECTION_ID_REMOTE_QUEUE: + case Class::SELECTION_ID_REMOTE_QUEUE: return this->remoteQueue() == rhs.remoteQueue(); - case Class::SELECTION_ID_UNINITIALIZED_QUEUE: + case Class::SELECTION_ID_UNINITIALIZED_QUEUE: return this->uninitializedQueue() == rhs.uninitializedQueue(); - default: + default: BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId()); return true; } @@ -51554,13 +52733,15 @@ inline bool Queue::isEqualTo(const Queue& rhs) const } // CREATORS -inline Queue::Queue(bslma::Allocator* basicAllocator) +inline +Queue::Queue(bslma::Allocator *basicAllocator) : d_selectionId(SELECTION_ID_UNDEFINED) , d_allocator_p(bslma::Default::allocator(basicAllocator)) { } -inline Queue::~Queue() +inline +Queue::~Queue() { reset(); } @@ -51570,42 +52751,45 @@ template int Queue::manipulateSelection(t_MANIPULATOR& manipulator) { switch (d_selectionId) { - case Queue::SELECTION_ID_LOCAL_QUEUE: + case Queue::SELECTION_ID_LOCAL_QUEUE: return manipulator(&d_localQueue.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_LOCAL_QUEUE]); - case Queue::SELECTION_ID_REMOTE_QUEUE: + SELECTION_INFO_ARRAY[SELECTION_INDEX_LOCAL_QUEUE]); + case Queue::SELECTION_ID_REMOTE_QUEUE: return manipulator(&d_remoteQueue.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_REMOTE_QUEUE]); - case Queue::SELECTION_ID_UNINITIALIZED_QUEUE: - return manipulator( - &d_uninitializedQueue.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_UNINITIALIZED_QUEUE]); - default: + SELECTION_INFO_ARRAY[SELECTION_INDEX_REMOTE_QUEUE]); + case Queue::SELECTION_ID_UNINITIALIZED_QUEUE: + return manipulator(&d_uninitializedQueue.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_UNINITIALIZED_QUEUE]); + default: BSLS_ASSERT(Queue::SELECTION_ID_UNDEFINED == d_selectionId); return -1; } } -inline LocalQueue& Queue::localQueue() +inline +LocalQueue& Queue::localQueue() { BSLS_ASSERT(SELECTION_ID_LOCAL_QUEUE == d_selectionId); return d_localQueue.object(); } -inline RemoteQueue& Queue::remoteQueue() +inline +RemoteQueue& Queue::remoteQueue() { BSLS_ASSERT(SELECTION_ID_REMOTE_QUEUE == d_selectionId); return d_remoteQueue.object(); } -inline UninitializedQueue& Queue::uninitializedQueue() +inline +UninitializedQueue& Queue::uninitializedQueue() { BSLS_ASSERT(SELECTION_ID_UNINITIALIZED_QUEUE == d_selectionId); return d_uninitializedQueue.object(); } // ACCESSORS -inline int Queue::selectionId() const +inline +int Queue::selectionId() const { return d_selectionId; } @@ -51614,61 +52798,70 @@ template int Queue::accessSelection(t_ACCESSOR& accessor) const { switch (d_selectionId) { - case SELECTION_ID_LOCAL_QUEUE: + case SELECTION_ID_LOCAL_QUEUE: return accessor(d_localQueue.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_LOCAL_QUEUE]); - case SELECTION_ID_REMOTE_QUEUE: + SELECTION_INFO_ARRAY[SELECTION_INDEX_LOCAL_QUEUE]); + case SELECTION_ID_REMOTE_QUEUE: return accessor(d_remoteQueue.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_REMOTE_QUEUE]); - case SELECTION_ID_UNINITIALIZED_QUEUE: - return accessor( - d_uninitializedQueue.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_UNINITIALIZED_QUEUE]); - default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); return -1; + SELECTION_INFO_ARRAY[SELECTION_INDEX_REMOTE_QUEUE]); + case SELECTION_ID_UNINITIALIZED_QUEUE: + return accessor(d_uninitializedQueue.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_UNINITIALIZED_QUEUE]); + default: + BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); + return -1; } } -inline const LocalQueue& Queue::localQueue() const +inline +const LocalQueue& Queue::localQueue() const { BSLS_ASSERT(SELECTION_ID_LOCAL_QUEUE == d_selectionId); return d_localQueue.object(); } -inline const RemoteQueue& Queue::remoteQueue() const +inline +const RemoteQueue& Queue::remoteQueue() const { BSLS_ASSERT(SELECTION_ID_REMOTE_QUEUE == d_selectionId); return d_remoteQueue.object(); } -inline const UninitializedQueue& Queue::uninitializedQueue() const +inline +const UninitializedQueue& Queue::uninitializedQueue() const { BSLS_ASSERT(SELECTION_ID_UNINITIALIZED_QUEUE == d_selectionId); return d_uninitializedQueue.object(); } -inline bool Queue::isLocalQueueValue() const +inline +bool Queue::isLocalQueueValue() const { return SELECTION_ID_LOCAL_QUEUE == d_selectionId; } -inline bool Queue::isRemoteQueueValue() const +inline +bool Queue::isRemoteQueueValue() const { return SELECTION_ID_REMOTE_QUEUE == d_selectionId; } -inline bool Queue::isUninitializedQueueValue() const +inline +bool Queue::isUninitializedQueueValue() const { return SELECTION_ID_UNINITIALIZED_QUEUE == d_selectionId; } -inline bool Queue::isUndefinedValue() const +inline +bool Queue::isUndefinedValue() const { return SELECTION_ID_UNDEFINED == d_selectionId; } -// -------------------- -// class QueueInternals -// -------------------- + + // -------------------- + // class QueueInternals + // -------------------- // CLASS METHODS // MANIPULATORS @@ -51696,27 +52889,27 @@ int QueueInternals::manipulateAttribute(t_MANIPULATOR& manipulator, int id) enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_STATE: { - return manipulator(&d_state, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STATE]); - } - case ATTRIBUTE_ID_QUEUE: { - return manipulator(&d_queue, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_STATE: { + return manipulator(&d_state, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STATE]); + } + case ATTRIBUTE_ID_QUEUE: { + return manipulator(&d_queue, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE]); + } + default: + return NOT_FOUND; } } template -int QueueInternals::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int QueueInternals::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -51724,12 +52917,14 @@ int QueueInternals::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline QueueState& QueueInternals::state() +inline +QueueState& QueueInternals::state() { return d_state; } -inline Queue& QueueInternals::queue() +inline +Queue& QueueInternals::queue() { return d_queue; } @@ -51759,45 +52954,51 @@ int QueueInternals::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_STATE: { + case ATTRIBUTE_ID_STATE: { return accessor(d_state, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_STATE]); - } - case ATTRIBUTE_ID_QUEUE: { + } + case ATTRIBUTE_ID_QUEUE: { return accessor(d_queue, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_QUEUE]); - } - default: return NOT_FOUND; + } + default: + return NOT_FOUND; } } template -int QueueInternals::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int QueueInternals::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const QueueState& QueueInternals::state() const +inline +const QueueState& QueueInternals::state() const { return d_state; } -inline const Queue& QueueInternals::queue() const +inline +const Queue& QueueInternals::queue() const { return d_queue; } -// ----------------- -// class QueueResult -// ----------------- + + + // ----------------- + // class QueueResult + // ----------------- // CLASS METHODS // PRIVATE ACCESSORS @@ -51808,35 +53009,38 @@ void QueueResult::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const using bslh::hashAppend; hashAppend(hashAlgorithm, this->selectionId()); switch (this->selectionId()) { - case Class::SELECTION_ID_ERROR: + case Class::SELECTION_ID_ERROR: hashAppend(hashAlgorithm, this->error()); break; - case Class::SELECTION_ID_PURGED_QUEUES: + case Class::SELECTION_ID_PURGED_QUEUES: hashAppend(hashAlgorithm, this->purgedQueues()); break; - case Class::SELECTION_ID_QUEUE_CONTENTS: + case Class::SELECTION_ID_QUEUE_CONTENTS: hashAppend(hashAlgorithm, this->queueContents()); break; - case Class::SELECTION_ID_QUEUE_INTERNALS: + case Class::SELECTION_ID_QUEUE_INTERNALS: hashAppend(hashAlgorithm, this->queueInternals()); break; - default: BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); + default: + BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); } } -inline bool QueueResult::isEqualTo(const QueueResult& rhs) const +inline +bool QueueResult::isEqualTo(const QueueResult& rhs) const { typedef QueueResult Class; if (this->selectionId() == rhs.selectionId()) { switch (rhs.selectionId()) { - case Class::SELECTION_ID_ERROR: return this->error() == rhs.error(); - case Class::SELECTION_ID_PURGED_QUEUES: + case Class::SELECTION_ID_ERROR: + return this->error() == rhs.error(); + case Class::SELECTION_ID_PURGED_QUEUES: return this->purgedQueues() == rhs.purgedQueues(); - case Class::SELECTION_ID_QUEUE_CONTENTS: + case Class::SELECTION_ID_QUEUE_CONTENTS: return this->queueContents() == rhs.queueContents(); - case Class::SELECTION_ID_QUEUE_INTERNALS: + case Class::SELECTION_ID_QUEUE_INTERNALS: return this->queueInternals() == rhs.queueInternals(); - default: + default: BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId()); return true; } @@ -51847,13 +53051,15 @@ inline bool QueueResult::isEqualTo(const QueueResult& rhs) const } // CREATORS -inline QueueResult::QueueResult(bslma::Allocator* basicAllocator) +inline +QueueResult::QueueResult(bslma::Allocator *basicAllocator) : d_selectionId(SELECTION_ID_UNDEFINED) , d_allocator_p(bslma::Default::allocator(basicAllocator)) { } -inline QueueResult::~QueueResult() +inline +QueueResult::~QueueResult() { reset(); } @@ -51863,53 +53069,55 @@ template int QueueResult::manipulateSelection(t_MANIPULATOR& manipulator) { switch (d_selectionId) { - case QueueResult::SELECTION_ID_ERROR: + case QueueResult::SELECTION_ID_ERROR: return manipulator(&d_error.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR]); - case QueueResult::SELECTION_ID_PURGED_QUEUES: - return manipulator( - &d_purgedQueues.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_PURGED_QUEUES]); - case QueueResult::SELECTION_ID_QUEUE_CONTENTS: - return manipulator( - &d_queueContents.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE_CONTENTS]); - case QueueResult::SELECTION_ID_QUEUE_INTERNALS: - return manipulator( - &d_queueInternals.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE_INTERNALS]); - default: + SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR]); + case QueueResult::SELECTION_ID_PURGED_QUEUES: + return manipulator(&d_purgedQueues.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_PURGED_QUEUES]); + case QueueResult::SELECTION_ID_QUEUE_CONTENTS: + return manipulator(&d_queueContents.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE_CONTENTS]); + case QueueResult::SELECTION_ID_QUEUE_INTERNALS: + return manipulator(&d_queueInternals.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE_INTERNALS]); + default: BSLS_ASSERT(QueueResult::SELECTION_ID_UNDEFINED == d_selectionId); return -1; } } -inline Error& QueueResult::error() +inline +Error& QueueResult::error() { BSLS_ASSERT(SELECTION_ID_ERROR == d_selectionId); return d_error.object(); } -inline PurgedQueues& QueueResult::purgedQueues() +inline +PurgedQueues& QueueResult::purgedQueues() { BSLS_ASSERT(SELECTION_ID_PURGED_QUEUES == d_selectionId); return d_purgedQueues.object(); } -inline QueueContents& QueueResult::queueContents() +inline +QueueContents& QueueResult::queueContents() { BSLS_ASSERT(SELECTION_ID_QUEUE_CONTENTS == d_selectionId); return d_queueContents.object(); } -inline QueueInternals& QueueResult::queueInternals() +inline +QueueInternals& QueueResult::queueInternals() { BSLS_ASSERT(SELECTION_ID_QUEUE_INTERNALS == d_selectionId); return d_queueInternals.object(); } // ACCESSORS -inline int QueueResult::selectionId() const +inline +int QueueResult::selectionId() const { return d_selectionId; } @@ -51918,74 +53126,86 @@ template int QueueResult::accessSelection(t_ACCESSOR& accessor) const { switch (d_selectionId) { - case SELECTION_ID_ERROR: + case SELECTION_ID_ERROR: return accessor(d_error.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR]); - case SELECTION_ID_PURGED_QUEUES: + SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR]); + case SELECTION_ID_PURGED_QUEUES: return accessor(d_purgedQueues.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_PURGED_QUEUES]); - case SELECTION_ID_QUEUE_CONTENTS: + SELECTION_INFO_ARRAY[SELECTION_INDEX_PURGED_QUEUES]); + case SELECTION_ID_QUEUE_CONTENTS: return accessor(d_queueContents.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE_CONTENTS]); - case SELECTION_ID_QUEUE_INTERNALS: + SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE_CONTENTS]); + case SELECTION_ID_QUEUE_INTERNALS: return accessor(d_queueInternals.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE_INTERNALS]); - default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); return -1; + SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE_INTERNALS]); + default: + BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); + return -1; } } -inline const Error& QueueResult::error() const +inline +const Error& QueueResult::error() const { BSLS_ASSERT(SELECTION_ID_ERROR == d_selectionId); return d_error.object(); } -inline const PurgedQueues& QueueResult::purgedQueues() const +inline +const PurgedQueues& QueueResult::purgedQueues() const { BSLS_ASSERT(SELECTION_ID_PURGED_QUEUES == d_selectionId); return d_purgedQueues.object(); } -inline const QueueContents& QueueResult::queueContents() const +inline +const QueueContents& QueueResult::queueContents() const { BSLS_ASSERT(SELECTION_ID_QUEUE_CONTENTS == d_selectionId); return d_queueContents.object(); } -inline const QueueInternals& QueueResult::queueInternals() const +inline +const QueueInternals& QueueResult::queueInternals() const { BSLS_ASSERT(SELECTION_ID_QUEUE_INTERNALS == d_selectionId); return d_queueInternals.object(); } -inline bool QueueResult::isErrorValue() const +inline +bool QueueResult::isErrorValue() const { return SELECTION_ID_ERROR == d_selectionId; } -inline bool QueueResult::isPurgedQueuesValue() const +inline +bool QueueResult::isPurgedQueuesValue() const { return SELECTION_ID_PURGED_QUEUES == d_selectionId; } -inline bool QueueResult::isQueueContentsValue() const +inline +bool QueueResult::isQueueContentsValue() const { return SELECTION_ID_QUEUE_CONTENTS == d_selectionId; } -inline bool QueueResult::isQueueInternalsValue() const +inline +bool QueueResult::isQueueInternalsValue() const { return SELECTION_ID_QUEUE_INTERNALS == d_selectionId; } -inline bool QueueResult::isUndefinedValue() const +inline +bool QueueResult::isUndefinedValue() const { return SELECTION_ID_UNDEFINED == d_selectionId; } -// ------------ -// class Result -// ------------ + + // ------------ + // class Result + // ------------ // CLASS METHODS // PRIVATE ACCESSORS @@ -51996,139 +53216,143 @@ void Result::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const using bslh::hashAppend; hashAppend(hashAlgorithm, this->selectionId()); switch (this->selectionId()) { - case Class::SELECTION_ID_ERROR: + case Class::SELECTION_ID_ERROR: hashAppend(hashAlgorithm, this->error()); break; - case Class::SELECTION_ID_SUCCESS: + case Class::SELECTION_ID_SUCCESS: hashAppend(hashAlgorithm, this->success()); break; - case Class::SELECTION_ID_VALUE: + case Class::SELECTION_ID_VALUE: hashAppend(hashAlgorithm, this->value()); break; - case Class::SELECTION_ID_TUNABLE: + case Class::SELECTION_ID_TUNABLE: hashAppend(hashAlgorithm, this->tunable()); break; - case Class::SELECTION_ID_TUNABLES: + case Class::SELECTION_ID_TUNABLES: hashAppend(hashAlgorithm, this->tunables()); break; - case Class::SELECTION_ID_TUNABLE_CONFIRMATION: + case Class::SELECTION_ID_TUNABLE_CONFIRMATION: hashAppend(hashAlgorithm, this->tunableConfirmation()); break; - case Class::SELECTION_ID_HELP: + case Class::SELECTION_ID_HELP: hashAppend(hashAlgorithm, this->help()); break; - case Class::SELECTION_ID_DOMAIN_INFO: + case Class::SELECTION_ID_DOMAIN_INFO: hashAppend(hashAlgorithm, this->domainInfo()); break; - case Class::SELECTION_ID_PURGED_QUEUES: + case Class::SELECTION_ID_PURGED_QUEUES: hashAppend(hashAlgorithm, this->purgedQueues()); break; - case Class::SELECTION_ID_QUEUE_INTERNALS: + case Class::SELECTION_ID_QUEUE_INTERNALS: hashAppend(hashAlgorithm, this->queueInternals()); break; - case Class::SELECTION_ID_MESSAGE_GROUP_ID_HELPER: + case Class::SELECTION_ID_MESSAGE_GROUP_ID_HELPER: hashAppend(hashAlgorithm, this->messageGroupIdHelper()); break; - case Class::SELECTION_ID_QUEUE_CONTENTS: + case Class::SELECTION_ID_QUEUE_CONTENTS: hashAppend(hashAlgorithm, this->queueContents()); break; - case Class::SELECTION_ID_MESSAGE: + case Class::SELECTION_ID_MESSAGE: hashAppend(hashAlgorithm, this->message()); break; - case Class::SELECTION_ID_STATS: + case Class::SELECTION_ID_STATS: hashAppend(hashAlgorithm, this->stats()); break; - case Class::SELECTION_ID_CLUSTER_LIST: + case Class::SELECTION_ID_CLUSTER_LIST: hashAppend(hashAlgorithm, this->clusterList()); break; - case Class::SELECTION_ID_CLUSTER_STATUS: + case Class::SELECTION_ID_CLUSTER_STATUS: hashAppend(hashAlgorithm, this->clusterStatus()); break; - case Class::SELECTION_ID_CLUSTER_PROXY_STATUS: + case Class::SELECTION_ID_CLUSTER_PROXY_STATUS: hashAppend(hashAlgorithm, this->clusterProxyStatus()); break; - case Class::SELECTION_ID_NODE_STATUSES: + case Class::SELECTION_ID_NODE_STATUSES: hashAppend(hashAlgorithm, this->nodeStatuses()); break; - case Class::SELECTION_ID_ELECTOR_INFO: + case Class::SELECTION_ID_ELECTOR_INFO: hashAppend(hashAlgorithm, this->electorInfo()); break; - case Class::SELECTION_ID_PARTITIONS_INFO: + case Class::SELECTION_ID_PARTITIONS_INFO: hashAppend(hashAlgorithm, this->partitionsInfo()); break; - case Class::SELECTION_ID_CLUSTER_QUEUE_HELPER: + case Class::SELECTION_ID_CLUSTER_QUEUE_HELPER: hashAppend(hashAlgorithm, this->clusterQueueHelper()); break; - case Class::SELECTION_ID_STORAGE_CONTENT: + case Class::SELECTION_ID_STORAGE_CONTENT: hashAppend(hashAlgorithm, this->storageContent()); break; - case Class::SELECTION_ID_CLUSTER_STORAGE_SUMMARY: + case Class::SELECTION_ID_CLUSTER_STORAGE_SUMMARY: hashAppend(hashAlgorithm, this->clusterStorageSummary()); break; - case Class::SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES: + case Class::SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES: hashAppend(hashAlgorithm, this->clusterDomainQueueStatuses()); break; - case Class::SELECTION_ID_BROKER_CONFIG: + case Class::SELECTION_ID_BROKER_CONFIG: hashAppend(hashAlgorithm, this->brokerConfig()); break; - default: BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); + default: + BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); } } -inline bool Result::isEqualTo(const Result& rhs) const +inline +bool Result::isEqualTo(const Result& rhs) const { typedef Result Class; if (this->selectionId() == rhs.selectionId()) { switch (rhs.selectionId()) { - case Class::SELECTION_ID_ERROR: return this->error() == rhs.error(); - case Class::SELECTION_ID_SUCCESS: + case Class::SELECTION_ID_ERROR: + return this->error() == rhs.error(); + case Class::SELECTION_ID_SUCCESS: return this->success() == rhs.success(); - case Class::SELECTION_ID_VALUE: return this->value() == rhs.value(); - case Class::SELECTION_ID_TUNABLE: + case Class::SELECTION_ID_VALUE: + return this->value() == rhs.value(); + case Class::SELECTION_ID_TUNABLE: return this->tunable() == rhs.tunable(); - case Class::SELECTION_ID_TUNABLES: + case Class::SELECTION_ID_TUNABLES: return this->tunables() == rhs.tunables(); - case Class::SELECTION_ID_TUNABLE_CONFIRMATION: + case Class::SELECTION_ID_TUNABLE_CONFIRMATION: return this->tunableConfirmation() == rhs.tunableConfirmation(); - case Class::SELECTION_ID_HELP: return this->help() == rhs.help(); - case Class::SELECTION_ID_DOMAIN_INFO: + case Class::SELECTION_ID_HELP: + return this->help() == rhs.help(); + case Class::SELECTION_ID_DOMAIN_INFO: return this->domainInfo() == rhs.domainInfo(); - case Class::SELECTION_ID_PURGED_QUEUES: + case Class::SELECTION_ID_PURGED_QUEUES: return this->purgedQueues() == rhs.purgedQueues(); - case Class::SELECTION_ID_QUEUE_INTERNALS: + case Class::SELECTION_ID_QUEUE_INTERNALS: return this->queueInternals() == rhs.queueInternals(); - case Class::SELECTION_ID_MESSAGE_GROUP_ID_HELPER: + case Class::SELECTION_ID_MESSAGE_GROUP_ID_HELPER: return this->messageGroupIdHelper() == rhs.messageGroupIdHelper(); - case Class::SELECTION_ID_QUEUE_CONTENTS: + case Class::SELECTION_ID_QUEUE_CONTENTS: return this->queueContents() == rhs.queueContents(); - case Class::SELECTION_ID_MESSAGE: + case Class::SELECTION_ID_MESSAGE: return this->message() == rhs.message(); - case Class::SELECTION_ID_STATS: return this->stats() == rhs.stats(); - case Class::SELECTION_ID_CLUSTER_LIST: + case Class::SELECTION_ID_STATS: + return this->stats() == rhs.stats(); + case Class::SELECTION_ID_CLUSTER_LIST: return this->clusterList() == rhs.clusterList(); - case Class::SELECTION_ID_CLUSTER_STATUS: + case Class::SELECTION_ID_CLUSTER_STATUS: return this->clusterStatus() == rhs.clusterStatus(); - case Class::SELECTION_ID_CLUSTER_PROXY_STATUS: + case Class::SELECTION_ID_CLUSTER_PROXY_STATUS: return this->clusterProxyStatus() == rhs.clusterProxyStatus(); - case Class::SELECTION_ID_NODE_STATUSES: + case Class::SELECTION_ID_NODE_STATUSES: return this->nodeStatuses() == rhs.nodeStatuses(); - case Class::SELECTION_ID_ELECTOR_INFO: + case Class::SELECTION_ID_ELECTOR_INFO: return this->electorInfo() == rhs.electorInfo(); - case Class::SELECTION_ID_PARTITIONS_INFO: + case Class::SELECTION_ID_PARTITIONS_INFO: return this->partitionsInfo() == rhs.partitionsInfo(); - case Class::SELECTION_ID_CLUSTER_QUEUE_HELPER: + case Class::SELECTION_ID_CLUSTER_QUEUE_HELPER: return this->clusterQueueHelper() == rhs.clusterQueueHelper(); - case Class::SELECTION_ID_STORAGE_CONTENT: + case Class::SELECTION_ID_STORAGE_CONTENT: return this->storageContent() == rhs.storageContent(); - case Class::SELECTION_ID_CLUSTER_STORAGE_SUMMARY: - return this->clusterStorageSummary() == - rhs.clusterStorageSummary(); - case Class::SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES: - return this->clusterDomainQueueStatuses() == - rhs.clusterDomainQueueStatuses(); - case Class::SELECTION_ID_BROKER_CONFIG: + case Class::SELECTION_ID_CLUSTER_STORAGE_SUMMARY: + return this->clusterStorageSummary() == rhs.clusterStorageSummary(); + case Class::SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES: + return this->clusterDomainQueueStatuses() == rhs.clusterDomainQueueStatuses(); + case Class::SELECTION_ID_BROKER_CONFIG: return this->brokerConfig() == rhs.brokerConfig(); - default: + default: BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId()); return true; } @@ -52139,13 +53363,15 @@ inline bool Result::isEqualTo(const Result& rhs) const } // CREATORS -inline Result::Result(bslma::Allocator* basicAllocator) +inline +Result::Result(bslma::Allocator *basicAllocator) : d_selectionId(SELECTION_ID_UNDEFINED) , d_allocator_p(bslma::Default::allocator(basicAllocator)) { } -inline Result::~Result() +inline +Result::~Result() { reset(); } @@ -52155,254 +53381,265 @@ template int Result::manipulateSelection(t_MANIPULATOR& manipulator) { switch (d_selectionId) { - case Result::SELECTION_ID_ERROR: + case Result::SELECTION_ID_ERROR: return manipulator(&d_error.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR]); - case Result::SELECTION_ID_SUCCESS: + SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR]); + case Result::SELECTION_ID_SUCCESS: return manipulator(&d_success.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_SUCCESS]); - case Result::SELECTION_ID_VALUE: + SELECTION_INFO_ARRAY[SELECTION_INDEX_SUCCESS]); + case Result::SELECTION_ID_VALUE: return manipulator(&d_value.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_VALUE]); - case Result::SELECTION_ID_TUNABLE: + SELECTION_INFO_ARRAY[SELECTION_INDEX_VALUE]); + case Result::SELECTION_ID_TUNABLE: return manipulator(&d_tunable.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE]); - case Result::SELECTION_ID_TUNABLES: + SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE]); + case Result::SELECTION_ID_TUNABLES: return manipulator(&d_tunables.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLES]); - case Result::SELECTION_ID_TUNABLE_CONFIRMATION: - return manipulator( - &d_tunableConfirmation.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE_CONFIRMATION]); - case Result::SELECTION_ID_HELP: + SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLES]); + case Result::SELECTION_ID_TUNABLE_CONFIRMATION: + return manipulator(&d_tunableConfirmation.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE_CONFIRMATION]); + case Result::SELECTION_ID_HELP: return manipulator(&d_help.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_HELP]); - case Result::SELECTION_ID_DOMAIN_INFO: + SELECTION_INFO_ARRAY[SELECTION_INDEX_HELP]); + case Result::SELECTION_ID_DOMAIN_INFO: return manipulator(&d_domainInfo.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAIN_INFO]); - case Result::SELECTION_ID_PURGED_QUEUES: - return manipulator( - &d_purgedQueues.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_PURGED_QUEUES]); - case Result::SELECTION_ID_QUEUE_INTERNALS: - return manipulator( - &d_queueInternals.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE_INTERNALS]); - case Result::SELECTION_ID_MESSAGE_GROUP_ID_HELPER: - return manipulator( - &d_messageGroupIdHelper.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_MESSAGE_GROUP_ID_HELPER]); - case Result::SELECTION_ID_QUEUE_CONTENTS: - return manipulator( - &d_queueContents.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE_CONTENTS]); - case Result::SELECTION_ID_MESSAGE: + SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAIN_INFO]); + case Result::SELECTION_ID_PURGED_QUEUES: + return manipulator(&d_purgedQueues.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_PURGED_QUEUES]); + case Result::SELECTION_ID_QUEUE_INTERNALS: + return manipulator(&d_queueInternals.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE_INTERNALS]); + case Result::SELECTION_ID_MESSAGE_GROUP_ID_HELPER: + return manipulator(&d_messageGroupIdHelper.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_MESSAGE_GROUP_ID_HELPER]); + case Result::SELECTION_ID_QUEUE_CONTENTS: + return manipulator(&d_queueContents.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE_CONTENTS]); + case Result::SELECTION_ID_MESSAGE: return manipulator(&d_message.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_MESSAGE]); - case Result::SELECTION_ID_STATS: + SELECTION_INFO_ARRAY[SELECTION_INDEX_MESSAGE]); + case Result::SELECTION_ID_STATS: return manipulator(&d_stats.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_STATS]); - case Result::SELECTION_ID_CLUSTER_LIST: + SELECTION_INFO_ARRAY[SELECTION_INDEX_STATS]); + case Result::SELECTION_ID_CLUSTER_LIST: return manipulator(&d_clusterList.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_LIST]); - case Result::SELECTION_ID_CLUSTER_STATUS: - return manipulator( - &d_clusterStatus.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_STATUS]); - case Result::SELECTION_ID_CLUSTER_PROXY_STATUS: - return manipulator( - &d_clusterProxyStatus.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_PROXY_STATUS]); - case Result::SELECTION_ID_NODE_STATUSES: - return manipulator( - &d_nodeStatuses.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_NODE_STATUSES]); - case Result::SELECTION_ID_ELECTOR_INFO: + SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_LIST]); + case Result::SELECTION_ID_CLUSTER_STATUS: + return manipulator(&d_clusterStatus.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_STATUS]); + case Result::SELECTION_ID_CLUSTER_PROXY_STATUS: + return manipulator(&d_clusterProxyStatus.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_PROXY_STATUS]); + case Result::SELECTION_ID_NODE_STATUSES: + return manipulator(&d_nodeStatuses.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_NODE_STATUSES]); + case Result::SELECTION_ID_ELECTOR_INFO: return manipulator(&d_electorInfo.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_ELECTOR_INFO]); - case Result::SELECTION_ID_PARTITIONS_INFO: - return manipulator( - &d_partitionsInfo.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_PARTITIONS_INFO]); - case Result::SELECTION_ID_CLUSTER_QUEUE_HELPER: - return manipulator( - &d_clusterQueueHelper.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_QUEUE_HELPER]); - case Result::SELECTION_ID_STORAGE_CONTENT: - return manipulator( - &d_storageContent.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_STORAGE_CONTENT]); - case Result::SELECTION_ID_CLUSTER_STORAGE_SUMMARY: - return manipulator( - &d_clusterStorageSummary.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_STORAGE_SUMMARY]); - case Result::SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES: - return manipulator( - &d_clusterDomainQueueStatuses.object(), - SELECTION_INFO_ARRAY - [SELECTION_INDEX_CLUSTER_DOMAIN_QUEUE_STATUSES]); - case Result::SELECTION_ID_BROKER_CONFIG: - return manipulator( - &d_brokerConfig.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_BROKER_CONFIG]); - default: + SELECTION_INFO_ARRAY[SELECTION_INDEX_ELECTOR_INFO]); + case Result::SELECTION_ID_PARTITIONS_INFO: + return manipulator(&d_partitionsInfo.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_PARTITIONS_INFO]); + case Result::SELECTION_ID_CLUSTER_QUEUE_HELPER: + return manipulator(&d_clusterQueueHelper.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_QUEUE_HELPER]); + case Result::SELECTION_ID_STORAGE_CONTENT: + return manipulator(&d_storageContent.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_STORAGE_CONTENT]); + case Result::SELECTION_ID_CLUSTER_STORAGE_SUMMARY: + return manipulator(&d_clusterStorageSummary.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_STORAGE_SUMMARY]); + case Result::SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES: + return manipulator(&d_clusterDomainQueueStatuses.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_DOMAIN_QUEUE_STATUSES]); + case Result::SELECTION_ID_BROKER_CONFIG: + return manipulator(&d_brokerConfig.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_BROKER_CONFIG]); + default: BSLS_ASSERT(Result::SELECTION_ID_UNDEFINED == d_selectionId); return -1; } } -inline Error& Result::error() +inline +Error& Result::error() { BSLS_ASSERT(SELECTION_ID_ERROR == d_selectionId); return d_error.object(); } -inline Void& Result::success() +inline +Void& Result::success() { BSLS_ASSERT(SELECTION_ID_SUCCESS == d_selectionId); return d_success.object(); } -inline Value& Result::value() +inline +Value& Result::value() { BSLS_ASSERT(SELECTION_ID_VALUE == d_selectionId); return d_value.object(); } -inline Tunable& Result::tunable() +inline +Tunable& Result::tunable() { BSLS_ASSERT(SELECTION_ID_TUNABLE == d_selectionId); return d_tunable.object(); } -inline Tunables& Result::tunables() +inline +Tunables& Result::tunables() { BSLS_ASSERT(SELECTION_ID_TUNABLES == d_selectionId); return d_tunables.object(); } -inline TunableConfirmation& Result::tunableConfirmation() +inline +TunableConfirmation& Result::tunableConfirmation() { BSLS_ASSERT(SELECTION_ID_TUNABLE_CONFIRMATION == d_selectionId); return d_tunableConfirmation.object(); } -inline Help& Result::help() +inline +Help& Result::help() { BSLS_ASSERT(SELECTION_ID_HELP == d_selectionId); return d_help.object(); } -inline DomainInfo& Result::domainInfo() +inline +DomainInfo& Result::domainInfo() { BSLS_ASSERT(SELECTION_ID_DOMAIN_INFO == d_selectionId); return d_domainInfo.object(); } -inline PurgedQueues& Result::purgedQueues() +inline +PurgedQueues& Result::purgedQueues() { BSLS_ASSERT(SELECTION_ID_PURGED_QUEUES == d_selectionId); return d_purgedQueues.object(); } -inline QueueInternals& Result::queueInternals() +inline +QueueInternals& Result::queueInternals() { BSLS_ASSERT(SELECTION_ID_QUEUE_INTERNALS == d_selectionId); return d_queueInternals.object(); } -inline MessageGroupIdHelper& Result::messageGroupIdHelper() +inline +MessageGroupIdHelper& Result::messageGroupIdHelper() { BSLS_ASSERT(SELECTION_ID_MESSAGE_GROUP_ID_HELPER == d_selectionId); return d_messageGroupIdHelper.object(); } -inline QueueContents& Result::queueContents() +inline +QueueContents& Result::queueContents() { BSLS_ASSERT(SELECTION_ID_QUEUE_CONTENTS == d_selectionId); return d_queueContents.object(); } -inline Message& Result::message() +inline +Message& Result::message() { BSLS_ASSERT(SELECTION_ID_MESSAGE == d_selectionId); return d_message.object(); } -inline bsl::string& Result::stats() +inline +bsl::string& Result::stats() { BSLS_ASSERT(SELECTION_ID_STATS == d_selectionId); return d_stats.object(); } -inline ClusterList& Result::clusterList() +inline +ClusterList& Result::clusterList() { BSLS_ASSERT(SELECTION_ID_CLUSTER_LIST == d_selectionId); return d_clusterList.object(); } -inline ClusterStatus& Result::clusterStatus() +inline +ClusterStatus& Result::clusterStatus() { BSLS_ASSERT(SELECTION_ID_CLUSTER_STATUS == d_selectionId); return d_clusterStatus.object(); } -inline ClusterProxyStatus& Result::clusterProxyStatus() +inline +ClusterProxyStatus& Result::clusterProxyStatus() { BSLS_ASSERT(SELECTION_ID_CLUSTER_PROXY_STATUS == d_selectionId); return d_clusterProxyStatus.object(); } -inline NodeStatuses& Result::nodeStatuses() +inline +NodeStatuses& Result::nodeStatuses() { BSLS_ASSERT(SELECTION_ID_NODE_STATUSES == d_selectionId); return d_nodeStatuses.object(); } -inline ElectorInfo& Result::electorInfo() +inline +ElectorInfo& Result::electorInfo() { BSLS_ASSERT(SELECTION_ID_ELECTOR_INFO == d_selectionId); return d_electorInfo.object(); } -inline PartitionsInfo& Result::partitionsInfo() +inline +PartitionsInfo& Result::partitionsInfo() { BSLS_ASSERT(SELECTION_ID_PARTITIONS_INFO == d_selectionId); return d_partitionsInfo.object(); } -inline ClusterQueueHelper& Result::clusterQueueHelper() +inline +ClusterQueueHelper& Result::clusterQueueHelper() { BSLS_ASSERT(SELECTION_ID_CLUSTER_QUEUE_HELPER == d_selectionId); return d_clusterQueueHelper.object(); } -inline StorageContent& Result::storageContent() +inline +StorageContent& Result::storageContent() { BSLS_ASSERT(SELECTION_ID_STORAGE_CONTENT == d_selectionId); return d_storageContent.object(); } -inline ClusterStorageSummary& Result::clusterStorageSummary() +inline +ClusterStorageSummary& Result::clusterStorageSummary() { BSLS_ASSERT(SELECTION_ID_CLUSTER_STORAGE_SUMMARY == d_selectionId); return d_clusterStorageSummary.object(); } -inline ClusterDomainQueueStatuses& Result::clusterDomainQueueStatuses() +inline +ClusterDomainQueueStatuses& Result::clusterDomainQueueStatuses() { BSLS_ASSERT(SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES == d_selectionId); return d_clusterDomainQueueStatuses.object(); } -inline BrokerConfig& Result::brokerConfig() +inline +BrokerConfig& Result::brokerConfig() { BSLS_ASSERT(SELECTION_ID_BROKER_CONFIG == d_selectionId); return d_brokerConfig.object(); } // ACCESSORS -inline int Result::selectionId() const +inline +int Result::selectionId() const { return d_selectionId; } @@ -52411,375 +53648,422 @@ template int Result::accessSelection(t_ACCESSOR& accessor) const { switch (d_selectionId) { - case SELECTION_ID_ERROR: + case SELECTION_ID_ERROR: return accessor(d_error.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR]); - case SELECTION_ID_SUCCESS: + SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR]); + case SELECTION_ID_SUCCESS: return accessor(d_success.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_SUCCESS]); - case SELECTION_ID_VALUE: + SELECTION_INFO_ARRAY[SELECTION_INDEX_SUCCESS]); + case SELECTION_ID_VALUE: return accessor(d_value.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_VALUE]); - case SELECTION_ID_TUNABLE: + SELECTION_INFO_ARRAY[SELECTION_INDEX_VALUE]); + case SELECTION_ID_TUNABLE: return accessor(d_tunable.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE]); - case SELECTION_ID_TUNABLES: + SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE]); + case SELECTION_ID_TUNABLES: return accessor(d_tunables.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLES]); - case SELECTION_ID_TUNABLE_CONFIRMATION: - return accessor( - d_tunableConfirmation.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE_CONFIRMATION]); - case SELECTION_ID_HELP: + SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLES]); + case SELECTION_ID_TUNABLE_CONFIRMATION: + return accessor(d_tunableConfirmation.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_TUNABLE_CONFIRMATION]); + case SELECTION_ID_HELP: return accessor(d_help.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_HELP]); - case SELECTION_ID_DOMAIN_INFO: + SELECTION_INFO_ARRAY[SELECTION_INDEX_HELP]); + case SELECTION_ID_DOMAIN_INFO: return accessor(d_domainInfo.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAIN_INFO]); - case SELECTION_ID_PURGED_QUEUES: + SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAIN_INFO]); + case SELECTION_ID_PURGED_QUEUES: return accessor(d_purgedQueues.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_PURGED_QUEUES]); - case SELECTION_ID_QUEUE_INTERNALS: + SELECTION_INFO_ARRAY[SELECTION_INDEX_PURGED_QUEUES]); + case SELECTION_ID_QUEUE_INTERNALS: return accessor(d_queueInternals.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE_INTERNALS]); - case SELECTION_ID_MESSAGE_GROUP_ID_HELPER: - return accessor( - d_messageGroupIdHelper.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_MESSAGE_GROUP_ID_HELPER]); - case SELECTION_ID_QUEUE_CONTENTS: + SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE_INTERNALS]); + case SELECTION_ID_MESSAGE_GROUP_ID_HELPER: + return accessor(d_messageGroupIdHelper.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_MESSAGE_GROUP_ID_HELPER]); + case SELECTION_ID_QUEUE_CONTENTS: return accessor(d_queueContents.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE_CONTENTS]); - case SELECTION_ID_MESSAGE: + SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE_CONTENTS]); + case SELECTION_ID_MESSAGE: return accessor(d_message.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_MESSAGE]); - case SELECTION_ID_STATS: + SELECTION_INFO_ARRAY[SELECTION_INDEX_MESSAGE]); + case SELECTION_ID_STATS: return accessor(d_stats.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_STATS]); - case SELECTION_ID_CLUSTER_LIST: + SELECTION_INFO_ARRAY[SELECTION_INDEX_STATS]); + case SELECTION_ID_CLUSTER_LIST: return accessor(d_clusterList.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_LIST]); - case SELECTION_ID_CLUSTER_STATUS: + SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_LIST]); + case SELECTION_ID_CLUSTER_STATUS: return accessor(d_clusterStatus.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_STATUS]); - case SELECTION_ID_CLUSTER_PROXY_STATUS: - return accessor( - d_clusterProxyStatus.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_PROXY_STATUS]); - case SELECTION_ID_NODE_STATUSES: + SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_STATUS]); + case SELECTION_ID_CLUSTER_PROXY_STATUS: + return accessor(d_clusterProxyStatus.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_PROXY_STATUS]); + case SELECTION_ID_NODE_STATUSES: return accessor(d_nodeStatuses.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_NODE_STATUSES]); - case SELECTION_ID_ELECTOR_INFO: + SELECTION_INFO_ARRAY[SELECTION_INDEX_NODE_STATUSES]); + case SELECTION_ID_ELECTOR_INFO: return accessor(d_electorInfo.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_ELECTOR_INFO]); - case SELECTION_ID_PARTITIONS_INFO: + SELECTION_INFO_ARRAY[SELECTION_INDEX_ELECTOR_INFO]); + case SELECTION_ID_PARTITIONS_INFO: return accessor(d_partitionsInfo.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_PARTITIONS_INFO]); - case SELECTION_ID_CLUSTER_QUEUE_HELPER: - return accessor( - d_clusterQueueHelper.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_QUEUE_HELPER]); - case SELECTION_ID_STORAGE_CONTENT: + SELECTION_INFO_ARRAY[SELECTION_INDEX_PARTITIONS_INFO]); + case SELECTION_ID_CLUSTER_QUEUE_HELPER: + return accessor(d_clusterQueueHelper.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_QUEUE_HELPER]); + case SELECTION_ID_STORAGE_CONTENT: return accessor(d_storageContent.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_STORAGE_CONTENT]); - case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: - return accessor( - d_clusterStorageSummary.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_STORAGE_SUMMARY]); - case SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES: + SELECTION_INFO_ARRAY[SELECTION_INDEX_STORAGE_CONTENT]); + case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: + return accessor(d_clusterStorageSummary.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_STORAGE_SUMMARY]); + case SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES: return accessor(d_clusterDomainQueueStatuses.object(), - SELECTION_INFO_ARRAY - [SELECTION_INDEX_CLUSTER_DOMAIN_QUEUE_STATUSES]); - case SELECTION_ID_BROKER_CONFIG: + SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_DOMAIN_QUEUE_STATUSES]); + case SELECTION_ID_BROKER_CONFIG: return accessor(d_brokerConfig.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_BROKER_CONFIG]); - default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); return -1; + SELECTION_INFO_ARRAY[SELECTION_INDEX_BROKER_CONFIG]); + default: + BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); + return -1; } } -inline const Error& Result::error() const +inline +const Error& Result::error() const { BSLS_ASSERT(SELECTION_ID_ERROR == d_selectionId); return d_error.object(); } -inline const Void& Result::success() const +inline +const Void& Result::success() const { BSLS_ASSERT(SELECTION_ID_SUCCESS == d_selectionId); return d_success.object(); } -inline const Value& Result::value() const +inline +const Value& Result::value() const { BSLS_ASSERT(SELECTION_ID_VALUE == d_selectionId); return d_value.object(); } -inline const Tunable& Result::tunable() const +inline +const Tunable& Result::tunable() const { BSLS_ASSERT(SELECTION_ID_TUNABLE == d_selectionId); return d_tunable.object(); } -inline const Tunables& Result::tunables() const +inline +const Tunables& Result::tunables() const { BSLS_ASSERT(SELECTION_ID_TUNABLES == d_selectionId); return d_tunables.object(); } -inline const TunableConfirmation& Result::tunableConfirmation() const +inline +const TunableConfirmation& Result::tunableConfirmation() const { BSLS_ASSERT(SELECTION_ID_TUNABLE_CONFIRMATION == d_selectionId); return d_tunableConfirmation.object(); } -inline const Help& Result::help() const +inline +const Help& Result::help() const { BSLS_ASSERT(SELECTION_ID_HELP == d_selectionId); return d_help.object(); } -inline const DomainInfo& Result::domainInfo() const +inline +const DomainInfo& Result::domainInfo() const { BSLS_ASSERT(SELECTION_ID_DOMAIN_INFO == d_selectionId); return d_domainInfo.object(); } -inline const PurgedQueues& Result::purgedQueues() const +inline +const PurgedQueues& Result::purgedQueues() const { BSLS_ASSERT(SELECTION_ID_PURGED_QUEUES == d_selectionId); return d_purgedQueues.object(); } -inline const QueueInternals& Result::queueInternals() const +inline +const QueueInternals& Result::queueInternals() const { BSLS_ASSERT(SELECTION_ID_QUEUE_INTERNALS == d_selectionId); return d_queueInternals.object(); } -inline const MessageGroupIdHelper& Result::messageGroupIdHelper() const +inline +const MessageGroupIdHelper& Result::messageGroupIdHelper() const { BSLS_ASSERT(SELECTION_ID_MESSAGE_GROUP_ID_HELPER == d_selectionId); return d_messageGroupIdHelper.object(); } -inline const QueueContents& Result::queueContents() const +inline +const QueueContents& Result::queueContents() const { BSLS_ASSERT(SELECTION_ID_QUEUE_CONTENTS == d_selectionId); return d_queueContents.object(); } -inline const Message& Result::message() const +inline +const Message& Result::message() const { BSLS_ASSERT(SELECTION_ID_MESSAGE == d_selectionId); return d_message.object(); } -inline const bsl::string& Result::stats() const +inline +const bsl::string& Result::stats() const { BSLS_ASSERT(SELECTION_ID_STATS == d_selectionId); return d_stats.object(); } -inline const ClusterList& Result::clusterList() const +inline +const ClusterList& Result::clusterList() const { BSLS_ASSERT(SELECTION_ID_CLUSTER_LIST == d_selectionId); return d_clusterList.object(); } -inline const ClusterStatus& Result::clusterStatus() const +inline +const ClusterStatus& Result::clusterStatus() const { BSLS_ASSERT(SELECTION_ID_CLUSTER_STATUS == d_selectionId); return d_clusterStatus.object(); } -inline const ClusterProxyStatus& Result::clusterProxyStatus() const +inline +const ClusterProxyStatus& Result::clusterProxyStatus() const { BSLS_ASSERT(SELECTION_ID_CLUSTER_PROXY_STATUS == d_selectionId); return d_clusterProxyStatus.object(); } -inline const NodeStatuses& Result::nodeStatuses() const +inline +const NodeStatuses& Result::nodeStatuses() const { BSLS_ASSERT(SELECTION_ID_NODE_STATUSES == d_selectionId); return d_nodeStatuses.object(); } -inline const ElectorInfo& Result::electorInfo() const +inline +const ElectorInfo& Result::electorInfo() const { BSLS_ASSERT(SELECTION_ID_ELECTOR_INFO == d_selectionId); return d_electorInfo.object(); } -inline const PartitionsInfo& Result::partitionsInfo() const +inline +const PartitionsInfo& Result::partitionsInfo() const { BSLS_ASSERT(SELECTION_ID_PARTITIONS_INFO == d_selectionId); return d_partitionsInfo.object(); } -inline const ClusterQueueHelper& Result::clusterQueueHelper() const +inline +const ClusterQueueHelper& Result::clusterQueueHelper() const { BSLS_ASSERT(SELECTION_ID_CLUSTER_QUEUE_HELPER == d_selectionId); return d_clusterQueueHelper.object(); } -inline const StorageContent& Result::storageContent() const +inline +const StorageContent& Result::storageContent() const { BSLS_ASSERT(SELECTION_ID_STORAGE_CONTENT == d_selectionId); return d_storageContent.object(); } -inline const ClusterStorageSummary& Result::clusterStorageSummary() const +inline +const ClusterStorageSummary& Result::clusterStorageSummary() const { BSLS_ASSERT(SELECTION_ID_CLUSTER_STORAGE_SUMMARY == d_selectionId); return d_clusterStorageSummary.object(); } -inline const ClusterDomainQueueStatuses& -Result::clusterDomainQueueStatuses() const +inline +const ClusterDomainQueueStatuses& Result::clusterDomainQueueStatuses() const { BSLS_ASSERT(SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES == d_selectionId); return d_clusterDomainQueueStatuses.object(); } -inline const BrokerConfig& Result::brokerConfig() const +inline +const BrokerConfig& Result::brokerConfig() const { BSLS_ASSERT(SELECTION_ID_BROKER_CONFIG == d_selectionId); return d_brokerConfig.object(); } -inline bool Result::isErrorValue() const +inline +bool Result::isErrorValue() const { return SELECTION_ID_ERROR == d_selectionId; } -inline bool Result::isSuccessValue() const +inline +bool Result::isSuccessValue() const { return SELECTION_ID_SUCCESS == d_selectionId; } -inline bool Result::isValueValue() const +inline +bool Result::isValueValue() const { return SELECTION_ID_VALUE == d_selectionId; } -inline bool Result::isTunableValue() const +inline +bool Result::isTunableValue() const { return SELECTION_ID_TUNABLE == d_selectionId; } -inline bool Result::isTunablesValue() const +inline +bool Result::isTunablesValue() const { return SELECTION_ID_TUNABLES == d_selectionId; } -inline bool Result::isTunableConfirmationValue() const +inline +bool Result::isTunableConfirmationValue() const { return SELECTION_ID_TUNABLE_CONFIRMATION == d_selectionId; } -inline bool Result::isHelpValue() const +inline +bool Result::isHelpValue() const { return SELECTION_ID_HELP == d_selectionId; } -inline bool Result::isDomainInfoValue() const +inline +bool Result::isDomainInfoValue() const { return SELECTION_ID_DOMAIN_INFO == d_selectionId; } -inline bool Result::isPurgedQueuesValue() const +inline +bool Result::isPurgedQueuesValue() const { return SELECTION_ID_PURGED_QUEUES == d_selectionId; } -inline bool Result::isQueueInternalsValue() const +inline +bool Result::isQueueInternalsValue() const { return SELECTION_ID_QUEUE_INTERNALS == d_selectionId; } -inline bool Result::isMessageGroupIdHelperValue() const +inline +bool Result::isMessageGroupIdHelperValue() const { return SELECTION_ID_MESSAGE_GROUP_ID_HELPER == d_selectionId; } -inline bool Result::isQueueContentsValue() const +inline +bool Result::isQueueContentsValue() const { return SELECTION_ID_QUEUE_CONTENTS == d_selectionId; } -inline bool Result::isMessageValue() const +inline +bool Result::isMessageValue() const { return SELECTION_ID_MESSAGE == d_selectionId; } -inline bool Result::isStatsValue() const +inline +bool Result::isStatsValue() const { return SELECTION_ID_STATS == d_selectionId; } -inline bool Result::isClusterListValue() const +inline +bool Result::isClusterListValue() const { return SELECTION_ID_CLUSTER_LIST == d_selectionId; } -inline bool Result::isClusterStatusValue() const +inline +bool Result::isClusterStatusValue() const { return SELECTION_ID_CLUSTER_STATUS == d_selectionId; } -inline bool Result::isClusterProxyStatusValue() const +inline +bool Result::isClusterProxyStatusValue() const { return SELECTION_ID_CLUSTER_PROXY_STATUS == d_selectionId; } -inline bool Result::isNodeStatusesValue() const +inline +bool Result::isNodeStatusesValue() const { return SELECTION_ID_NODE_STATUSES == d_selectionId; } -inline bool Result::isElectorInfoValue() const +inline +bool Result::isElectorInfoValue() const { return SELECTION_ID_ELECTOR_INFO == d_selectionId; } -inline bool Result::isPartitionsInfoValue() const +inline +bool Result::isPartitionsInfoValue() const { return SELECTION_ID_PARTITIONS_INFO == d_selectionId; } -inline bool Result::isClusterQueueHelperValue() const +inline +bool Result::isClusterQueueHelperValue() const { return SELECTION_ID_CLUSTER_QUEUE_HELPER == d_selectionId; } -inline bool Result::isStorageContentValue() const +inline +bool Result::isStorageContentValue() const { return SELECTION_ID_STORAGE_CONTENT == d_selectionId; } -inline bool Result::isClusterStorageSummaryValue() const +inline +bool Result::isClusterStorageSummaryValue() const { return SELECTION_ID_CLUSTER_STORAGE_SUMMARY == d_selectionId; } -inline bool Result::isClusterDomainQueueStatusesValue() const +inline +bool Result::isClusterDomainQueueStatusesValue() const { return SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES == d_selectionId; } -inline bool Result::isBrokerConfigValue() const +inline +bool Result::isBrokerConfigValue() const { return SELECTION_ID_BROKER_CONFIG == d_selectionId; } -inline bool Result::isUndefinedValue() const +inline +bool Result::isUndefinedValue() const { return SELECTION_ID_UNDEFINED == d_selectionId; } -// ------------------ -// class DomainResult -// ------------------ + + // ------------------ + // class DomainResult + // ------------------ // CLASS METHODS // PRIVATE ACCESSORS @@ -52790,40 +54074,43 @@ void DomainResult::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const using bslh::hashAppend; hashAppend(hashAlgorithm, this->selectionId()); switch (this->selectionId()) { - case Class::SELECTION_ID_SUCCESS: + case Class::SELECTION_ID_SUCCESS: hashAppend(hashAlgorithm, this->success()); break; - case Class::SELECTION_ID_ERROR: + case Class::SELECTION_ID_ERROR: hashAppend(hashAlgorithm, this->error()); break; - case Class::SELECTION_ID_DOMAIN_INFO: + case Class::SELECTION_ID_DOMAIN_INFO: hashAppend(hashAlgorithm, this->domainInfo()); break; - case Class::SELECTION_ID_PURGED_QUEUES: + case Class::SELECTION_ID_PURGED_QUEUES: hashAppend(hashAlgorithm, this->purgedQueues()); break; - case Class::SELECTION_ID_QUEUE_RESULT: + case Class::SELECTION_ID_QUEUE_RESULT: hashAppend(hashAlgorithm, this->queueResult()); break; - default: BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); + default: + BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); } } -inline bool DomainResult::isEqualTo(const DomainResult& rhs) const +inline +bool DomainResult::isEqualTo(const DomainResult& rhs) const { typedef DomainResult Class; if (this->selectionId() == rhs.selectionId()) { switch (rhs.selectionId()) { - case Class::SELECTION_ID_SUCCESS: + case Class::SELECTION_ID_SUCCESS: return this->success() == rhs.success(); - case Class::SELECTION_ID_ERROR: return this->error() == rhs.error(); - case Class::SELECTION_ID_DOMAIN_INFO: + case Class::SELECTION_ID_ERROR: + return this->error() == rhs.error(); + case Class::SELECTION_ID_DOMAIN_INFO: return this->domainInfo() == rhs.domainInfo(); - case Class::SELECTION_ID_PURGED_QUEUES: + case Class::SELECTION_ID_PURGED_QUEUES: return this->purgedQueues() == rhs.purgedQueues(); - case Class::SELECTION_ID_QUEUE_RESULT: + case Class::SELECTION_ID_QUEUE_RESULT: return this->queueResult() == rhs.queueResult(); - default: + default: BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId()); return true; } @@ -52834,13 +54121,15 @@ inline bool DomainResult::isEqualTo(const DomainResult& rhs) const } // CREATORS -inline DomainResult::DomainResult(bslma::Allocator* basicAllocator) +inline +DomainResult::DomainResult(bslma::Allocator *basicAllocator) : d_selectionId(SELECTION_ID_UNDEFINED) , d_allocator_p(bslma::Default::allocator(basicAllocator)) { } -inline DomainResult::~DomainResult() +inline +DomainResult::~DomainResult() { reset(); } @@ -52850,60 +54139,65 @@ template int DomainResult::manipulateSelection(t_MANIPULATOR& manipulator) { switch (d_selectionId) { - case DomainResult::SELECTION_ID_SUCCESS: + case DomainResult::SELECTION_ID_SUCCESS: return manipulator(&d_success.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_SUCCESS]); - case DomainResult::SELECTION_ID_ERROR: + SELECTION_INFO_ARRAY[SELECTION_INDEX_SUCCESS]); + case DomainResult::SELECTION_ID_ERROR: return manipulator(&d_error.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR]); - case DomainResult::SELECTION_ID_DOMAIN_INFO: + SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR]); + case DomainResult::SELECTION_ID_DOMAIN_INFO: return manipulator(&d_domainInfo.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAIN_INFO]); - case DomainResult::SELECTION_ID_PURGED_QUEUES: - return manipulator( - &d_purgedQueues.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_PURGED_QUEUES]); - case DomainResult::SELECTION_ID_QUEUE_RESULT: + SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAIN_INFO]); + case DomainResult::SELECTION_ID_PURGED_QUEUES: + return manipulator(&d_purgedQueues.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_PURGED_QUEUES]); + case DomainResult::SELECTION_ID_QUEUE_RESULT: return manipulator(&d_queueResult.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE_RESULT]); - default: + SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE_RESULT]); + default: BSLS_ASSERT(DomainResult::SELECTION_ID_UNDEFINED == d_selectionId); return -1; } } -inline Void& DomainResult::success() +inline +Void& DomainResult::success() { BSLS_ASSERT(SELECTION_ID_SUCCESS == d_selectionId); return d_success.object(); } -inline Error& DomainResult::error() +inline +Error& DomainResult::error() { BSLS_ASSERT(SELECTION_ID_ERROR == d_selectionId); return d_error.object(); } -inline DomainInfo& DomainResult::domainInfo() +inline +DomainInfo& DomainResult::domainInfo() { BSLS_ASSERT(SELECTION_ID_DOMAIN_INFO == d_selectionId); return d_domainInfo.object(); } -inline PurgedQueues& DomainResult::purgedQueues() +inline +PurgedQueues& DomainResult::purgedQueues() { BSLS_ASSERT(SELECTION_ID_PURGED_QUEUES == d_selectionId); return d_purgedQueues.object(); } -inline QueueResult& DomainResult::queueResult() +inline +QueueResult& DomainResult::queueResult() { BSLS_ASSERT(SELECTION_ID_QUEUE_RESULT == d_selectionId); return d_queueResult.object(); } // ACCESSORS -inline int DomainResult::selectionId() const +inline +int DomainResult::selectionId() const { return d_selectionId; } @@ -52912,88 +54206,102 @@ template int DomainResult::accessSelection(t_ACCESSOR& accessor) const { switch (d_selectionId) { - case SELECTION_ID_SUCCESS: + case SELECTION_ID_SUCCESS: return accessor(d_success.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_SUCCESS]); - case SELECTION_ID_ERROR: + SELECTION_INFO_ARRAY[SELECTION_INDEX_SUCCESS]); + case SELECTION_ID_ERROR: return accessor(d_error.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR]); - case SELECTION_ID_DOMAIN_INFO: + SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR]); + case SELECTION_ID_DOMAIN_INFO: return accessor(d_domainInfo.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAIN_INFO]); - case SELECTION_ID_PURGED_QUEUES: + SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAIN_INFO]); + case SELECTION_ID_PURGED_QUEUES: return accessor(d_purgedQueues.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_PURGED_QUEUES]); - case SELECTION_ID_QUEUE_RESULT: + SELECTION_INFO_ARRAY[SELECTION_INDEX_PURGED_QUEUES]); + case SELECTION_ID_QUEUE_RESULT: return accessor(d_queueResult.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE_RESULT]); - default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); return -1; + SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE_RESULT]); + default: + BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); + return -1; } } -inline const Void& DomainResult::success() const +inline +const Void& DomainResult::success() const { BSLS_ASSERT(SELECTION_ID_SUCCESS == d_selectionId); return d_success.object(); } -inline const Error& DomainResult::error() const +inline +const Error& DomainResult::error() const { BSLS_ASSERT(SELECTION_ID_ERROR == d_selectionId); return d_error.object(); } -inline const DomainInfo& DomainResult::domainInfo() const +inline +const DomainInfo& DomainResult::domainInfo() const { BSLS_ASSERT(SELECTION_ID_DOMAIN_INFO == d_selectionId); return d_domainInfo.object(); } -inline const PurgedQueues& DomainResult::purgedQueues() const +inline +const PurgedQueues& DomainResult::purgedQueues() const { BSLS_ASSERT(SELECTION_ID_PURGED_QUEUES == d_selectionId); return d_purgedQueues.object(); } -inline const QueueResult& DomainResult::queueResult() const +inline +const QueueResult& DomainResult::queueResult() const { BSLS_ASSERT(SELECTION_ID_QUEUE_RESULT == d_selectionId); return d_queueResult.object(); } -inline bool DomainResult::isSuccessValue() const +inline +bool DomainResult::isSuccessValue() const { return SELECTION_ID_SUCCESS == d_selectionId; } -inline bool DomainResult::isErrorValue() const +inline +bool DomainResult::isErrorValue() const { return SELECTION_ID_ERROR == d_selectionId; } -inline bool DomainResult::isDomainInfoValue() const +inline +bool DomainResult::isDomainInfoValue() const { return SELECTION_ID_DOMAIN_INFO == d_selectionId; } -inline bool DomainResult::isPurgedQueuesValue() const +inline +bool DomainResult::isPurgedQueuesValue() const { return SELECTION_ID_PURGED_QUEUES == d_selectionId; } -inline bool DomainResult::isQueueResultValue() const +inline +bool DomainResult::isQueueResultValue() const { return SELECTION_ID_QUEUE_RESULT == d_selectionId; } -inline bool DomainResult::isUndefinedValue() const +inline +bool DomainResult::isUndefinedValue() const { return SELECTION_ID_UNDEFINED == d_selectionId; } -// ------------------------- -// class RouteResponseResult -// ------------------------- + + // ------------------------- + // class RouteResponseResult + // ------------------------- // CLASS METHODS // MANIPULATORS @@ -53002,9 +54310,7 @@ int RouteResponseResult::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator( - &d_sourceNodeDescription, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SOURCE_NODE_DESCRIPTION]); + ret = manipulator(&d_sourceNodeDescription, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SOURCE_NODE_DESCRIPTION]); if (ret) { return ret; } @@ -53018,34 +54324,32 @@ int RouteResponseResult::manipulateAttributes(t_MANIPULATOR& manipulator) } template -int RouteResponseResult::manipulateAttribute(t_MANIPULATOR& manipulator, - int id) +int RouteResponseResult::manipulateAttribute(t_MANIPULATOR& manipulator, int id) { enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_SOURCE_NODE_DESCRIPTION: { - return manipulator( - &d_sourceNodeDescription, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SOURCE_NODE_DESCRIPTION]); - } - case ATTRIBUTE_ID_RESULT: { - return manipulator(&d_result, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_RESULT]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_SOURCE_NODE_DESCRIPTION: { + return manipulator(&d_sourceNodeDescription, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SOURCE_NODE_DESCRIPTION]); + } + case ATTRIBUTE_ID_RESULT: { + return manipulator(&d_result, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_RESULT]); + } + default: + return NOT_FOUND; } } template -int RouteResponseResult::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int RouteResponseResult::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -53053,12 +54357,14 @@ int RouteResponseResult::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::string& RouteResponseResult::sourceNodeDescription() +inline +bsl::string& RouteResponseResult::sourceNodeDescription() { return d_sourceNodeDescription; } -inline Result& RouteResponseResult::result() +inline +Result& RouteResponseResult::result() { return d_result; } @@ -53069,9 +54375,7 @@ int RouteResponseResult::accessAttributes(t_ACCESSOR& accessor) const { int ret; - ret = accessor( - d_sourceNodeDescription, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SOURCE_NODE_DESCRIPTION]); + ret = accessor(d_sourceNodeDescription, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SOURCE_NODE_DESCRIPTION]); if (ret) { return ret; } @@ -53090,48 +54394,51 @@ int RouteResponseResult::accessAttribute(t_ACCESSOR& accessor, int id) const enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_SOURCE_NODE_DESCRIPTION: { - return accessor( - d_sourceNodeDescription, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SOURCE_NODE_DESCRIPTION]); - } - case ATTRIBUTE_ID_RESULT: { - return accessor(d_result, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_RESULT]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_SOURCE_NODE_DESCRIPTION: { + return accessor(d_sourceNodeDescription, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SOURCE_NODE_DESCRIPTION]); + } + case ATTRIBUTE_ID_RESULT: { + return accessor(d_result, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_RESULT]); + } + default: + return NOT_FOUND; } } template -int RouteResponseResult::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int RouteResponseResult::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::string& RouteResponseResult::sourceNodeDescription() const +inline +const bsl::string& RouteResponseResult::sourceNodeDescription() const { return d_sourceNodeDescription; } -inline const Result& RouteResponseResult::result() const +inline +const Result& RouteResponseResult::result() const { return d_result; } -// ------------------- -// class DomainsResult -// ------------------- + + + // ------------------- + // class DomainsResult + // ------------------- // CLASS METHODS // PRIVATE ACCESSORS @@ -53142,30 +54449,33 @@ void DomainsResult::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const using bslh::hashAppend; hashAppend(hashAlgorithm, this->selectionId()); switch (this->selectionId()) { - case Class::SELECTION_ID_SUCCESS: + case Class::SELECTION_ID_SUCCESS: hashAppend(hashAlgorithm, this->success()); break; - case Class::SELECTION_ID_ERROR: + case Class::SELECTION_ID_ERROR: hashAppend(hashAlgorithm, this->error()); break; - case Class::SELECTION_ID_DOMAIN_RESULT: + case Class::SELECTION_ID_DOMAIN_RESULT: hashAppend(hashAlgorithm, this->domainResult()); break; - default: BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); + default: + BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); } } -inline bool DomainsResult::isEqualTo(const DomainsResult& rhs) const +inline +bool DomainsResult::isEqualTo(const DomainsResult& rhs) const { typedef DomainsResult Class; if (this->selectionId() == rhs.selectionId()) { switch (rhs.selectionId()) { - case Class::SELECTION_ID_SUCCESS: + case Class::SELECTION_ID_SUCCESS: return this->success() == rhs.success(); - case Class::SELECTION_ID_ERROR: return this->error() == rhs.error(); - case Class::SELECTION_ID_DOMAIN_RESULT: + case Class::SELECTION_ID_ERROR: + return this->error() == rhs.error(); + case Class::SELECTION_ID_DOMAIN_RESULT: return this->domainResult() == rhs.domainResult(); - default: + default: BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId()); return true; } @@ -53176,13 +54486,15 @@ inline bool DomainsResult::isEqualTo(const DomainsResult& rhs) const } // CREATORS -inline DomainsResult::DomainsResult(bslma::Allocator* basicAllocator) +inline +DomainsResult::DomainsResult(bslma::Allocator *basicAllocator) : d_selectionId(SELECTION_ID_UNDEFINED) , d_allocator_p(bslma::Default::allocator(basicAllocator)) { } -inline DomainsResult::~DomainsResult() +inline +DomainsResult::~DomainsResult() { reset(); } @@ -53192,42 +54504,45 @@ template int DomainsResult::manipulateSelection(t_MANIPULATOR& manipulator) { switch (d_selectionId) { - case DomainsResult::SELECTION_ID_SUCCESS: + case DomainsResult::SELECTION_ID_SUCCESS: return manipulator(&d_success.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_SUCCESS]); - case DomainsResult::SELECTION_ID_ERROR: + SELECTION_INFO_ARRAY[SELECTION_INDEX_SUCCESS]); + case DomainsResult::SELECTION_ID_ERROR: return manipulator(&d_error.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR]); - case DomainsResult::SELECTION_ID_DOMAIN_RESULT: - return manipulator( - &d_domainResult.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAIN_RESULT]); - default: + SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR]); + case DomainsResult::SELECTION_ID_DOMAIN_RESULT: + return manipulator(&d_domainResult.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAIN_RESULT]); + default: BSLS_ASSERT(DomainsResult::SELECTION_ID_UNDEFINED == d_selectionId); return -1; } } -inline Void& DomainsResult::success() +inline +Void& DomainsResult::success() { BSLS_ASSERT(SELECTION_ID_SUCCESS == d_selectionId); return d_success.object(); } -inline Error& DomainsResult::error() +inline +Error& DomainsResult::error() { BSLS_ASSERT(SELECTION_ID_ERROR == d_selectionId); return d_error.object(); } -inline DomainResult& DomainsResult::domainResult() +inline +DomainResult& DomainsResult::domainResult() { BSLS_ASSERT(SELECTION_ID_DOMAIN_RESULT == d_selectionId); return d_domainResult.object(); } // ACCESSORS -inline int DomainsResult::selectionId() const +inline +int DomainsResult::selectionId() const { return d_selectionId; } @@ -53236,60 +54551,70 @@ template int DomainsResult::accessSelection(t_ACCESSOR& accessor) const { switch (d_selectionId) { - case SELECTION_ID_SUCCESS: + case SELECTION_ID_SUCCESS: return accessor(d_success.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_SUCCESS]); - case SELECTION_ID_ERROR: + SELECTION_INFO_ARRAY[SELECTION_INDEX_SUCCESS]); + case SELECTION_ID_ERROR: return accessor(d_error.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR]); - case SELECTION_ID_DOMAIN_RESULT: + SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR]); + case SELECTION_ID_DOMAIN_RESULT: return accessor(d_domainResult.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAIN_RESULT]); - default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); return -1; + SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAIN_RESULT]); + default: + BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); + return -1; } } -inline const Void& DomainsResult::success() const +inline +const Void& DomainsResult::success() const { BSLS_ASSERT(SELECTION_ID_SUCCESS == d_selectionId); return d_success.object(); } -inline const Error& DomainsResult::error() const +inline +const Error& DomainsResult::error() const { BSLS_ASSERT(SELECTION_ID_ERROR == d_selectionId); return d_error.object(); } -inline const DomainResult& DomainsResult::domainResult() const +inline +const DomainResult& DomainsResult::domainResult() const { BSLS_ASSERT(SELECTION_ID_DOMAIN_RESULT == d_selectionId); return d_domainResult.object(); } -inline bool DomainsResult::isSuccessValue() const +inline +bool DomainsResult::isSuccessValue() const { return SELECTION_ID_SUCCESS == d_selectionId; } -inline bool DomainsResult::isErrorValue() const +inline +bool DomainsResult::isErrorValue() const { return SELECTION_ID_ERROR == d_selectionId; } -inline bool DomainsResult::isDomainResultValue() const +inline +bool DomainsResult::isDomainResultValue() const { return SELECTION_ID_DOMAIN_RESULT == d_selectionId; } -inline bool DomainsResult::isUndefinedValue() const +inline +bool DomainsResult::isUndefinedValue() const { return SELECTION_ID_UNDEFINED == d_selectionId; } -// ----------------------------- -// class RouteResponseResultList -// ----------------------------- + + // ----------------------------- + // class RouteResponseResultList + // ----------------------------- // CLASS METHODS // MANIPULATORS @@ -53298,8 +54623,7 @@ int RouteResponseResultList::manipulateAttributes(t_MANIPULATOR& manipulator) { int ret; - ret = manipulator(&d_responses, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_RESPONSES]); + ret = manipulator(&d_responses, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_RESPONSES]); if (ret) { return ret; } @@ -53308,29 +54632,29 @@ int RouteResponseResultList::manipulateAttributes(t_MANIPULATOR& manipulator) } template -int RouteResponseResultList::manipulateAttribute(t_MANIPULATOR& manipulator, - int id) +int RouteResponseResultList::manipulateAttribute(t_MANIPULATOR& manipulator, int id) { enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_RESPONSES: { - return manipulator(&d_responses, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_RESPONSES]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_RESPONSES: { + return manipulator(&d_responses, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_RESPONSES]); + } + default: + return NOT_FOUND; } } template -int RouteResponseResultList::manipulateAttribute(t_MANIPULATOR& manipulator, - const char* name, - int nameLength) +int RouteResponseResultList::manipulateAttribute( + t_MANIPULATOR& manipulator, + const char *name, + int nameLength) { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { return NOT_FOUND; } @@ -53338,7 +54662,8 @@ int RouteResponseResultList::manipulateAttribute(t_MANIPULATOR& manipulator, return manipulateAttribute(manipulator, attributeInfo->d_id); } -inline bsl::vector& RouteResponseResultList::responses() +inline +bsl::vector& RouteResponseResultList::responses() { return d_responses; } @@ -53349,8 +54674,7 @@ int RouteResponseResultList::accessAttributes(t_ACCESSOR& accessor) const { int ret; - ret = accessor(d_responses, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_RESPONSES]); + ret = accessor(d_responses, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_RESPONSES]); if (ret) { return ret; } @@ -53359,45 +54683,47 @@ int RouteResponseResultList::accessAttributes(t_ACCESSOR& accessor) const } template -int RouteResponseResultList::accessAttribute(t_ACCESSOR& accessor, - int id) const +int RouteResponseResultList::accessAttribute(t_ACCESSOR& accessor, int id) const { enum { NOT_FOUND = -1 }; switch (id) { - case ATTRIBUTE_ID_RESPONSES: { - return accessor(d_responses, - ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_RESPONSES]); - } - default: return NOT_FOUND; + case ATTRIBUTE_ID_RESPONSES: { + return accessor(d_responses, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_RESPONSES]); + } + default: + return NOT_FOUND; } } template -int RouteResponseResultList::accessAttribute(t_ACCESSOR& accessor, - const char* name, - int nameLength) const +int RouteResponseResultList::accessAttribute( + t_ACCESSOR& accessor, + const char *name, + int nameLength) const { enum { NOT_FOUND = -1 }; - const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, - nameLength); + const bdlat_AttributeInfo *attributeInfo = + lookupAttributeInfo(name, nameLength); if (0 == attributeInfo) { - return NOT_FOUND; + return NOT_FOUND; } return accessAttribute(accessor, attributeInfo->d_id); } -inline const bsl::vector& -RouteResponseResultList::responses() const +inline +const bsl::vector& RouteResponseResultList::responses() const { return d_responses; } -// -------------------- -// class InternalResult -// -------------------- + + + // -------------------- + // class InternalResult + // -------------------- // CLASS METHODS // PRIVATE ACCESSORS @@ -53408,76 +54734,78 @@ void InternalResult::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const using bslh::hashAppend; hashAppend(hashAlgorithm, this->selectionId()); switch (this->selectionId()) { - case Class::SELECTION_ID_ERROR: + case Class::SELECTION_ID_ERROR: hashAppend(hashAlgorithm, this->error()); break; - case Class::SELECTION_ID_SUCCESS: + case Class::SELECTION_ID_SUCCESS: hashAppend(hashAlgorithm, this->success()); break; - case Class::SELECTION_ID_DOMAINS_RESULT: + case Class::SELECTION_ID_DOMAINS_RESULT: hashAppend(hashAlgorithm, this->domainsResult()); break; - case Class::SELECTION_ID_CLUSTERS_RESULT: + case Class::SELECTION_ID_CLUSTERS_RESULT: hashAppend(hashAlgorithm, this->clustersResult()); break; - case Class::SELECTION_ID_HELP: + case Class::SELECTION_ID_HELP: hashAppend(hashAlgorithm, this->help()); break; - case Class::SELECTION_ID_QUEUE_INTERNALS: + case Class::SELECTION_ID_QUEUE_INTERNALS: hashAppend(hashAlgorithm, this->queueInternals()); break; - case Class::SELECTION_ID_STAT_RESULT: + case Class::SELECTION_ID_STAT_RESULT: hashAppend(hashAlgorithm, this->statResult()); break; - case Class::SELECTION_ID_CLUSTER_LIST: + case Class::SELECTION_ID_CLUSTER_LIST: hashAppend(hashAlgorithm, this->clusterList()); break; - case Class::SELECTION_ID_CLUSTER_QUEUE_HELPER: + case Class::SELECTION_ID_CLUSTER_QUEUE_HELPER: hashAppend(hashAlgorithm, this->clusterQueueHelper()); break; - case Class::SELECTION_ID_CLUSTER_STORAGE_SUMMARY: + case Class::SELECTION_ID_CLUSTER_STORAGE_SUMMARY: hashAppend(hashAlgorithm, this->clusterStorageSummary()); break; - case Class::SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES: + case Class::SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES: hashAppend(hashAlgorithm, this->clusterDomainQueueStatuses()); break; - case Class::SELECTION_ID_BROKER_CONFIG: + case Class::SELECTION_ID_BROKER_CONFIG: hashAppend(hashAlgorithm, this->brokerConfig()); break; - default: BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); + default: + BSLS_ASSERT(this->selectionId() == Class::SELECTION_ID_UNDEFINED); } } -inline bool InternalResult::isEqualTo(const InternalResult& rhs) const +inline +bool InternalResult::isEqualTo(const InternalResult& rhs) const { typedef InternalResult Class; if (this->selectionId() == rhs.selectionId()) { switch (rhs.selectionId()) { - case Class::SELECTION_ID_ERROR: return this->error() == rhs.error(); - case Class::SELECTION_ID_SUCCESS: + case Class::SELECTION_ID_ERROR: + return this->error() == rhs.error(); + case Class::SELECTION_ID_SUCCESS: return this->success() == rhs.success(); - case Class::SELECTION_ID_DOMAINS_RESULT: + case Class::SELECTION_ID_DOMAINS_RESULT: return this->domainsResult() == rhs.domainsResult(); - case Class::SELECTION_ID_CLUSTERS_RESULT: + case Class::SELECTION_ID_CLUSTERS_RESULT: return this->clustersResult() == rhs.clustersResult(); - case Class::SELECTION_ID_HELP: return this->help() == rhs.help(); - case Class::SELECTION_ID_QUEUE_INTERNALS: + case Class::SELECTION_ID_HELP: + return this->help() == rhs.help(); + case Class::SELECTION_ID_QUEUE_INTERNALS: return this->queueInternals() == rhs.queueInternals(); - case Class::SELECTION_ID_STAT_RESULT: + case Class::SELECTION_ID_STAT_RESULT: return this->statResult() == rhs.statResult(); - case Class::SELECTION_ID_CLUSTER_LIST: + case Class::SELECTION_ID_CLUSTER_LIST: return this->clusterList() == rhs.clusterList(); - case Class::SELECTION_ID_CLUSTER_QUEUE_HELPER: + case Class::SELECTION_ID_CLUSTER_QUEUE_HELPER: return this->clusterQueueHelper() == rhs.clusterQueueHelper(); - case Class::SELECTION_ID_CLUSTER_STORAGE_SUMMARY: - return this->clusterStorageSummary() == - rhs.clusterStorageSummary(); - case Class::SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES: - return this->clusterDomainQueueStatuses() == - rhs.clusterDomainQueueStatuses(); - case Class::SELECTION_ID_BROKER_CONFIG: + case Class::SELECTION_ID_CLUSTER_STORAGE_SUMMARY: + return this->clusterStorageSummary() == rhs.clusterStorageSummary(); + case Class::SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES: + return this->clusterDomainQueueStatuses() == rhs.clusterDomainQueueStatuses(); + case Class::SELECTION_ID_BROKER_CONFIG: return this->brokerConfig() == rhs.brokerConfig(); - default: + default: BSLS_ASSERT(Class::SELECTION_ID_UNDEFINED == rhs.selectionId()); return true; } @@ -53488,13 +54816,15 @@ inline bool InternalResult::isEqualTo(const InternalResult& rhs) const } // CREATORS -inline InternalResult::InternalResult(bslma::Allocator* basicAllocator) +inline +InternalResult::InternalResult(bslma::Allocator *basicAllocator) : d_selectionId(SELECTION_ID_UNDEFINED) , d_allocator_p(bslma::Default::allocator(basicAllocator)) { } -inline InternalResult::~InternalResult() +inline +InternalResult::~InternalResult() { reset(); } @@ -53504,130 +54834,135 @@ template int InternalResult::manipulateSelection(t_MANIPULATOR& manipulator) { switch (d_selectionId) { - case InternalResult::SELECTION_ID_ERROR: + case InternalResult::SELECTION_ID_ERROR: return manipulator(&d_error.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR]); - case InternalResult::SELECTION_ID_SUCCESS: + SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR]); + case InternalResult::SELECTION_ID_SUCCESS: return manipulator(&d_success.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_SUCCESS]); - case InternalResult::SELECTION_ID_DOMAINS_RESULT: - return manipulator( - &d_domainsResult.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAINS_RESULT]); - case InternalResult::SELECTION_ID_CLUSTERS_RESULT: - return manipulator( - &d_clustersResult.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTERS_RESULT]); - case InternalResult::SELECTION_ID_HELP: + SELECTION_INFO_ARRAY[SELECTION_INDEX_SUCCESS]); + case InternalResult::SELECTION_ID_DOMAINS_RESULT: + return manipulator(&d_domainsResult.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAINS_RESULT]); + case InternalResult::SELECTION_ID_CLUSTERS_RESULT: + return manipulator(&d_clustersResult.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTERS_RESULT]); + case InternalResult::SELECTION_ID_HELP: return manipulator(&d_help.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_HELP]); - case InternalResult::SELECTION_ID_QUEUE_INTERNALS: - return manipulator( - &d_queueInternals.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE_INTERNALS]); - case InternalResult::SELECTION_ID_STAT_RESULT: + SELECTION_INFO_ARRAY[SELECTION_INDEX_HELP]); + case InternalResult::SELECTION_ID_QUEUE_INTERNALS: + return manipulator(&d_queueInternals.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE_INTERNALS]); + case InternalResult::SELECTION_ID_STAT_RESULT: return manipulator(&d_statResult.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_STAT_RESULT]); - case InternalResult::SELECTION_ID_CLUSTER_LIST: + SELECTION_INFO_ARRAY[SELECTION_INDEX_STAT_RESULT]); + case InternalResult::SELECTION_ID_CLUSTER_LIST: return manipulator(&d_clusterList.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_LIST]); - case InternalResult::SELECTION_ID_CLUSTER_QUEUE_HELPER: - return manipulator( - &d_clusterQueueHelper.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_QUEUE_HELPER]); - case InternalResult::SELECTION_ID_CLUSTER_STORAGE_SUMMARY: - return manipulator( - &d_clusterStorageSummary.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_STORAGE_SUMMARY]); - case InternalResult::SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES: - return manipulator( - &d_clusterDomainQueueStatuses.object(), - SELECTION_INFO_ARRAY - [SELECTION_INDEX_CLUSTER_DOMAIN_QUEUE_STATUSES]); - case InternalResult::SELECTION_ID_BROKER_CONFIG: - return manipulator( - &d_brokerConfig.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_BROKER_CONFIG]); - default: + SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_LIST]); + case InternalResult::SELECTION_ID_CLUSTER_QUEUE_HELPER: + return manipulator(&d_clusterQueueHelper.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_QUEUE_HELPER]); + case InternalResult::SELECTION_ID_CLUSTER_STORAGE_SUMMARY: + return manipulator(&d_clusterStorageSummary.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_STORAGE_SUMMARY]); + case InternalResult::SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES: + return manipulator(&d_clusterDomainQueueStatuses.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_DOMAIN_QUEUE_STATUSES]); + case InternalResult::SELECTION_ID_BROKER_CONFIG: + return manipulator(&d_brokerConfig.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_BROKER_CONFIG]); + default: BSLS_ASSERT(InternalResult::SELECTION_ID_UNDEFINED == d_selectionId); return -1; } } -inline Error& InternalResult::error() +inline +Error& InternalResult::error() { BSLS_ASSERT(SELECTION_ID_ERROR == d_selectionId); return d_error.object(); } -inline Void& InternalResult::success() +inline +Void& InternalResult::success() { BSLS_ASSERT(SELECTION_ID_SUCCESS == d_selectionId); return d_success.object(); } -inline DomainsResult& InternalResult::domainsResult() +inline +DomainsResult& InternalResult::domainsResult() { BSLS_ASSERT(SELECTION_ID_DOMAINS_RESULT == d_selectionId); return d_domainsResult.object(); } -inline ClustersResult& InternalResult::clustersResult() +inline +ClustersResult& InternalResult::clustersResult() { BSLS_ASSERT(SELECTION_ID_CLUSTERS_RESULT == d_selectionId); return d_clustersResult.object(); } -inline Help& InternalResult::help() +inline +Help& InternalResult::help() { BSLS_ASSERT(SELECTION_ID_HELP == d_selectionId); return d_help.object(); } -inline QueueInternals& InternalResult::queueInternals() +inline +QueueInternals& InternalResult::queueInternals() { BSLS_ASSERT(SELECTION_ID_QUEUE_INTERNALS == d_selectionId); return d_queueInternals.object(); } -inline StatResult& InternalResult::statResult() +inline +StatResult& InternalResult::statResult() { BSLS_ASSERT(SELECTION_ID_STAT_RESULT == d_selectionId); return d_statResult.object(); } -inline ClusterList& InternalResult::clusterList() +inline +ClusterList& InternalResult::clusterList() { BSLS_ASSERT(SELECTION_ID_CLUSTER_LIST == d_selectionId); return d_clusterList.object(); } -inline ClusterQueueHelper& InternalResult::clusterQueueHelper() +inline +ClusterQueueHelper& InternalResult::clusterQueueHelper() { BSLS_ASSERT(SELECTION_ID_CLUSTER_QUEUE_HELPER == d_selectionId); return d_clusterQueueHelper.object(); } -inline ClusterStorageSummary& InternalResult::clusterStorageSummary() +inline +ClusterStorageSummary& InternalResult::clusterStorageSummary() { BSLS_ASSERT(SELECTION_ID_CLUSTER_STORAGE_SUMMARY == d_selectionId); return d_clusterStorageSummary.object(); } -inline ClusterDomainQueueStatuses& InternalResult::clusterDomainQueueStatuses() +inline +ClusterDomainQueueStatuses& InternalResult::clusterDomainQueueStatuses() { BSLS_ASSERT(SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES == d_selectionId); return d_clusterDomainQueueStatuses.object(); } -inline BrokerConfig& InternalResult::brokerConfig() +inline +BrokerConfig& InternalResult::brokerConfig() { BSLS_ASSERT(SELECTION_ID_BROKER_CONFIG == d_selectionId); return d_brokerConfig.object(); } // ACCESSORS -inline int InternalResult::selectionId() const +inline +int InternalResult::selectionId() const { return d_selectionId; } @@ -53636,184 +54971,206 @@ template int InternalResult::accessSelection(t_ACCESSOR& accessor) const { switch (d_selectionId) { - case SELECTION_ID_ERROR: + case SELECTION_ID_ERROR: return accessor(d_error.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR]); - case SELECTION_ID_SUCCESS: + SELECTION_INFO_ARRAY[SELECTION_INDEX_ERROR]); + case SELECTION_ID_SUCCESS: return accessor(d_success.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_SUCCESS]); - case SELECTION_ID_DOMAINS_RESULT: + SELECTION_INFO_ARRAY[SELECTION_INDEX_SUCCESS]); + case SELECTION_ID_DOMAINS_RESULT: return accessor(d_domainsResult.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAINS_RESULT]); - case SELECTION_ID_CLUSTERS_RESULT: + SELECTION_INFO_ARRAY[SELECTION_INDEX_DOMAINS_RESULT]); + case SELECTION_ID_CLUSTERS_RESULT: return accessor(d_clustersResult.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTERS_RESULT]); - case SELECTION_ID_HELP: + SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTERS_RESULT]); + case SELECTION_ID_HELP: return accessor(d_help.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_HELP]); - case SELECTION_ID_QUEUE_INTERNALS: + SELECTION_INFO_ARRAY[SELECTION_INDEX_HELP]); + case SELECTION_ID_QUEUE_INTERNALS: return accessor(d_queueInternals.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE_INTERNALS]); - case SELECTION_ID_STAT_RESULT: + SELECTION_INFO_ARRAY[SELECTION_INDEX_QUEUE_INTERNALS]); + case SELECTION_ID_STAT_RESULT: return accessor(d_statResult.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_STAT_RESULT]); - case SELECTION_ID_CLUSTER_LIST: + SELECTION_INFO_ARRAY[SELECTION_INDEX_STAT_RESULT]); + case SELECTION_ID_CLUSTER_LIST: return accessor(d_clusterList.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_LIST]); - case SELECTION_ID_CLUSTER_QUEUE_HELPER: - return accessor( - d_clusterQueueHelper.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_QUEUE_HELPER]); - case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: - return accessor( - d_clusterStorageSummary.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_STORAGE_SUMMARY]); - case SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES: + SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_LIST]); + case SELECTION_ID_CLUSTER_QUEUE_HELPER: + return accessor(d_clusterQueueHelper.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_QUEUE_HELPER]); + case SELECTION_ID_CLUSTER_STORAGE_SUMMARY: + return accessor(d_clusterStorageSummary.object(), + SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_STORAGE_SUMMARY]); + case SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES: return accessor(d_clusterDomainQueueStatuses.object(), - SELECTION_INFO_ARRAY - [SELECTION_INDEX_CLUSTER_DOMAIN_QUEUE_STATUSES]); - case SELECTION_ID_BROKER_CONFIG: + SELECTION_INFO_ARRAY[SELECTION_INDEX_CLUSTER_DOMAIN_QUEUE_STATUSES]); + case SELECTION_ID_BROKER_CONFIG: return accessor(d_brokerConfig.object(), - SELECTION_INFO_ARRAY[SELECTION_INDEX_BROKER_CONFIG]); - default: BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); return -1; + SELECTION_INFO_ARRAY[SELECTION_INDEX_BROKER_CONFIG]); + default: + BSLS_ASSERT(SELECTION_ID_UNDEFINED == d_selectionId); + return -1; } } -inline const Error& InternalResult::error() const +inline +const Error& InternalResult::error() const { BSLS_ASSERT(SELECTION_ID_ERROR == d_selectionId); return d_error.object(); } -inline const Void& InternalResult::success() const +inline +const Void& InternalResult::success() const { BSLS_ASSERT(SELECTION_ID_SUCCESS == d_selectionId); return d_success.object(); } -inline const DomainsResult& InternalResult::domainsResult() const +inline +const DomainsResult& InternalResult::domainsResult() const { BSLS_ASSERT(SELECTION_ID_DOMAINS_RESULT == d_selectionId); return d_domainsResult.object(); } -inline const ClustersResult& InternalResult::clustersResult() const +inline +const ClustersResult& InternalResult::clustersResult() const { BSLS_ASSERT(SELECTION_ID_CLUSTERS_RESULT == d_selectionId); return d_clustersResult.object(); } -inline const Help& InternalResult::help() const +inline +const Help& InternalResult::help() const { BSLS_ASSERT(SELECTION_ID_HELP == d_selectionId); return d_help.object(); } -inline const QueueInternals& InternalResult::queueInternals() const +inline +const QueueInternals& InternalResult::queueInternals() const { BSLS_ASSERT(SELECTION_ID_QUEUE_INTERNALS == d_selectionId); return d_queueInternals.object(); } -inline const StatResult& InternalResult::statResult() const +inline +const StatResult& InternalResult::statResult() const { BSLS_ASSERT(SELECTION_ID_STAT_RESULT == d_selectionId); return d_statResult.object(); } -inline const ClusterList& InternalResult::clusterList() const +inline +const ClusterList& InternalResult::clusterList() const { BSLS_ASSERT(SELECTION_ID_CLUSTER_LIST == d_selectionId); return d_clusterList.object(); } -inline const ClusterQueueHelper& InternalResult::clusterQueueHelper() const +inline +const ClusterQueueHelper& InternalResult::clusterQueueHelper() const { BSLS_ASSERT(SELECTION_ID_CLUSTER_QUEUE_HELPER == d_selectionId); return d_clusterQueueHelper.object(); } -inline const ClusterStorageSummary& -InternalResult::clusterStorageSummary() const +inline +const ClusterStorageSummary& InternalResult::clusterStorageSummary() const { BSLS_ASSERT(SELECTION_ID_CLUSTER_STORAGE_SUMMARY == d_selectionId); return d_clusterStorageSummary.object(); } -inline const ClusterDomainQueueStatuses& -InternalResult::clusterDomainQueueStatuses() const +inline +const ClusterDomainQueueStatuses& InternalResult::clusterDomainQueueStatuses() const { BSLS_ASSERT(SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES == d_selectionId); return d_clusterDomainQueueStatuses.object(); } -inline const BrokerConfig& InternalResult::brokerConfig() const +inline +const BrokerConfig& InternalResult::brokerConfig() const { BSLS_ASSERT(SELECTION_ID_BROKER_CONFIG == d_selectionId); return d_brokerConfig.object(); } -inline bool InternalResult::isErrorValue() const +inline +bool InternalResult::isErrorValue() const { return SELECTION_ID_ERROR == d_selectionId; } -inline bool InternalResult::isSuccessValue() const +inline +bool InternalResult::isSuccessValue() const { return SELECTION_ID_SUCCESS == d_selectionId; } -inline bool InternalResult::isDomainsResultValue() const +inline +bool InternalResult::isDomainsResultValue() const { return SELECTION_ID_DOMAINS_RESULT == d_selectionId; } -inline bool InternalResult::isClustersResultValue() const +inline +bool InternalResult::isClustersResultValue() const { return SELECTION_ID_CLUSTERS_RESULT == d_selectionId; } -inline bool InternalResult::isHelpValue() const +inline +bool InternalResult::isHelpValue() const { return SELECTION_ID_HELP == d_selectionId; } -inline bool InternalResult::isQueueInternalsValue() const +inline +bool InternalResult::isQueueInternalsValue() const { return SELECTION_ID_QUEUE_INTERNALS == d_selectionId; } -inline bool InternalResult::isStatResultValue() const +inline +bool InternalResult::isStatResultValue() const { return SELECTION_ID_STAT_RESULT == d_selectionId; } -inline bool InternalResult::isClusterListValue() const +inline +bool InternalResult::isClusterListValue() const { return SELECTION_ID_CLUSTER_LIST == d_selectionId; } -inline bool InternalResult::isClusterQueueHelperValue() const +inline +bool InternalResult::isClusterQueueHelperValue() const { return SELECTION_ID_CLUSTER_QUEUE_HELPER == d_selectionId; } -inline bool InternalResult::isClusterStorageSummaryValue() const +inline +bool InternalResult::isClusterStorageSummaryValue() const { return SELECTION_ID_CLUSTER_STORAGE_SUMMARY == d_selectionId; } -inline bool InternalResult::isClusterDomainQueueStatusesValue() const +inline +bool InternalResult::isClusterDomainQueueStatusesValue() const { return SELECTION_ID_CLUSTER_DOMAIN_QUEUE_STATUSES == d_selectionId; } -inline bool InternalResult::isBrokerConfigValue() const +inline +bool InternalResult::isBrokerConfigValue() const { return SELECTION_ID_BROKER_CONFIG == d_selectionId; } -inline bool InternalResult::isUndefinedValue() const +inline +bool InternalResult::isUndefinedValue() const { return SELECTION_ID_UNDEFINED == d_selectionId; } @@ -53825,5 +55182,11 @@ inline bool InternalResult::isUndefinedValue() const #endif // 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. +// Property of Bloomberg Finance L.P. (BFLP) +// This software is made available solely pursuant to the +// terms of a BFLP license agreement which governs its use. +// ------------------------------- END-OF-FILE --------------------------------