From 9069182c82a8e523a9229d86b53fbe4aa9e0ca03 Mon Sep 17 00:00:00 2001 From: Christopher Beard Date: Sat, 5 Oct 2024 11:49:49 -0400 Subject: [PATCH] Fix[BMQA] minor bde -> doxygen docs Signed-off-by: Christopher Beard --- src/groups/bmq/bmqa/bmqa_closequeuestatus.h | 21 +-- .../bmq/bmqa/bmqa_configurequeuestatus.h | 15 +- src/groups/bmq/bmqa/bmqa_message.h | 26 ++-- src/groups/bmq/bmqa/bmqa_messageiterator.h | 4 +- src/groups/bmq/bmqa/bmqa_messageproperties.h | 25 +-- src/groups/bmq/bmqa/bmqa_mocksession.h | 144 +++++++++--------- src/groups/bmq/bmqa/bmqa_openqueuestatus.h | 21 +-- src/groups/bmq/bmqa/bmqa_session.h | 17 ++- 8 files changed, 144 insertions(+), 129 deletions(-) diff --git a/src/groups/bmq/bmqa/bmqa_closequeuestatus.h b/src/groups/bmq/bmqa/bmqa_closequeuestatus.h index dad7cbe8a..affb8123f 100644 --- a/src/groups/bmq/bmqa/bmqa_closequeuestatus.h +++ b/src/groups/bmq/bmqa/bmqa_closequeuestatus.h @@ -62,18 +62,19 @@ namespace bmqa { class CloseQueueStatus { private: // DATA + + /// queueId associated with the open + /// queue operation QueueId d_queueId; - // queueId associated with the open - // queue operation + /// Result code of the operation + /// (success, failure) bmqt::CloseQueueResult::Enum d_result; - // Result code of the operation - // (success, failure) + /// Optional string with a human + /// readable description of the error, + /// if any bsl::string d_errorDescription; - // Optional string with a human - // readable description of the error, - // if any public: // TRAITS @@ -81,9 +82,9 @@ class CloseQueueStatus { // TYPES - // Use of an `UnspecifiedBool` to prevent implicit conversions to - // integral values, and comparisons between different classes which - // have boolean operators. + /// Use of an `UnspecifiedBool` to prevent implicit conversions to + /// integral values, and comparisons between different classes which + /// have boolean operators. typedef bsls::UnspecifiedBool::BoolType BoolType; // CREATORS diff --git a/src/groups/bmq/bmqa/bmqa_configurequeuestatus.h b/src/groups/bmq/bmqa/bmqa_configurequeuestatus.h index f236fe884..5b2fa6ed7 100644 --- a/src/groups/bmq/bmqa/bmqa_configurequeuestatus.h +++ b/src/groups/bmq/bmqa/bmqa_configurequeuestatus.h @@ -61,18 +61,19 @@ namespace bmqa { class ConfigureQueueStatus { private: // DATA + + /// queueId associated with the open + /// queue operation QueueId d_queueId; - // queueId associated with the open - // queue operation + /// Status code of the operation + /// (success, failure) bmqt::ConfigureQueueResult::Enum d_result; - // Status code of the operation - // (success, failure) + /// Optional string with a human + /// readable description of the error, + /// if any bsl::string d_errorDescription; - // Optional string with a human - // readable description of the error, - // if any public: // TRAITS diff --git a/src/groups/bmq/bmqa/bmqa_message.h b/src/groups/bmq/bmqa/bmqa_message.h index c48718132..b8c7dd63f 100644 --- a/src/groups/bmq/bmqa/bmqa_message.h +++ b/src/groups/bmq/bmqa/bmqa_message.h @@ -101,25 +101,26 @@ class MessageProperties; /// `bmqa::MessageIterator.nextMessage()`. struct MessageImpl { // PUBLIC DATA + + /// Pointer to the Event this message is + /// associated with bmqimp::Event* d_event_p; - // Pointer to the Event this message is - // associated with + /// May point to a bmqimp::Event (in case + /// this Message is a clone) bsl::shared_ptr d_clonedEvent_sp; - // May point to a bmqimp::Event (in case - // this Message is a clone) + /// QueueId this message is associated + /// with bmqa::QueueId d_queueId; - // QueueId this message is associated - // with + /// CorrelationId this message is + /// associated with bmqt::CorrelationId d_correlationId; - // CorrelationId this message is - // associated with + /// SubscriptionHandle this message is + /// associated with bmqt::SubscriptionHandle d_subscriptionHandle; - // SubscriptionHandle this message is - // associated with #ifdef BMQ_ENABLE_MSG_GROUPID bsl::string d_groupId; @@ -136,11 +137,12 @@ struct MessageImpl { class MessageConfirmationCookie { private: // DATA + + /// QueueID associated to this cookie bmqa::QueueId d_queueId; - // QueueID associated to this cookie + /// GUID associated to this cookie bmqt::MessageGUID d_guid; - // GUID associated to this cookie public: // CREATORS diff --git a/src/groups/bmq/bmqa/bmqa_messageiterator.h b/src/groups/bmq/bmqa/bmqa_messageiterator.h index 111322601..d3855bf5e 100644 --- a/src/groups/bmq/bmqa/bmqa_messageiterator.h +++ b/src/groups/bmq/bmqa/bmqa_messageiterator.h @@ -73,9 +73,9 @@ struct MessageIteratorImpl { // the Message, and so that we only create one // such object per MessageIterator. + /// Position of 'd_message' in the underlying + /// message event. int d_messageIndex; - // Position of 'd_message' in the underlying - // message event. }; // ===================== diff --git a/src/groups/bmq/bmqa/bmqa_messageproperties.h b/src/groups/bmq/bmqa/bmqa_messageproperties.h index e61c929dc..b41cecf5c 100644 --- a/src/groups/bmq/bmqa/bmqa_messageproperties.h +++ b/src/groups/bmq/bmqa/bmqa_messageproperties.h @@ -96,9 +96,9 @@ class MessageProperties { private: // PRIVATE CONSTANTS - // Constant representing the maximum size of a - // `bmqp::MessageProperties` object, so that the below AlignedBuffer - // is big enough. + /// Constant representing the maximum size of a + /// `bmqp::MessageProperties` object, so that the below AlignedBuffer + /// is big enough. static const int k_MAX_SIZEOF_BMQP_MESSAGEPROPERTIES = 184; // PRIVATE TYPES @@ -107,18 +107,19 @@ class MessageProperties { private: // DATA + + /// Pointer to the implementation object + /// in 'd_buffer', providing a shortcut + /// type safe cast to that object. This + /// variable *must* *be* the first + /// member of this class, as other + /// components in bmqa package may + /// reinterpret_cast to that variable. mutable bmqp::MessageProperties* d_impl_p; - // Pointer to the implementation object - // in 'd_buffer', providing a shortcut - // type safe cast to that object. This - // variable *must* *be* the first - // member of this class, as other - // components in bmqa package may - // reinterpret_cast to that variable. + /// Buffer containing the implementation + /// object, maximally aligned. ImplBuffer d_buffer; - // Buffer containing the implementation - // object, maximally aligned. bslma::Allocator* d_allocator_p; diff --git a/src/groups/bmq/bmqa/bmqa_mocksession.h b/src/groups/bmq/bmqa/bmqa_mocksession.h index ca11b53d4..918a50cf8 100644 --- a/src/groups/bmq/bmqa/bmqa_mocksession.h +++ b/src/groups/bmq/bmqa/bmqa_mocksession.h @@ -607,13 +607,14 @@ class ConfirmEventBuilder; struct MockSessionUtil { private: // PRIVATE TYPES + + /// Event impl shared pointer to access + /// the pimpl of 'bmqa::Event'. typedef bsl::shared_ptr EventImplSp; - // Event impl shared pointer to access - // the pimpl of 'bmqa::Event'. + /// Queue impl shared pointer to access + /// the pimpl of 'bmqa::QueueId'. typedef bsl::shared_ptr QueueImplSp; - // Queue impl shared pointer to access - // the pimpl of 'bmqa::QueueId'. public: // PUBLIC TYPES @@ -621,16 +622,18 @@ struct MockSessionUtil { /// Struct representing parameters for an ack message. struct AckParams { // PUBLIC DATA - bmqt::AckResult::Enum d_status; // Status code + /// Status code + bmqt::AckResult::Enum d_status; + + /// Correlation id bmqt::CorrelationId d_correlationId; - // Correlation id - bmqt::MessageGUID d_guid; // Message GUID of confirmed message + /// Message GUID of confirmed message + bmqt::MessageGUID d_guid; + /// Queue id for message being referred to QueueId d_queueId; - // Queue id for message being referred - // to // CREATORS @@ -815,25 +818,26 @@ class MockSession : public AbstractSession { /// operation executed with a user-specified callback struct Job { // PUBLIC DATA + + /// Signature of a 'void' callback method CallbackFn d_callback; - // Signature of a 'void' callback method + /// Queue associated with this job QueueImplSp d_queue; - // Queue associated with this job + /// Type of queue event associated with + /// this job (OPEN,CONFIGURE, or CLOSE) bmqt::SessionEventType::Enum d_type; - // Type of queue event associated with - // this job (OPEN,CONFIGURE, or CLOSE) + /// Status of the queue operation int d_status; - // Status of the queue operation }; typedef bdlb::Variant EventOrJob; + /// Enumeration for the methods in the 'MockSession' protocol. Each + /// enum value corresponds to a method. enum Method { - // Enumeration for the methods in the 'MockSession' protocol. Each - // enum value corresponds to a method. e_START, e_START_ASYNC, e_STOP, @@ -859,78 +863,81 @@ class MockSession : public AbstractSession { struct Call { // PUBLIC TYPES - typedef bsl::vector EventsAndJobs; // Vector of events + + /// Vector of events + typedef bsl::vector EventsAndJobs; // PUBLIC DATA + + /// Value to be returned on call int d_rc; - // Value to be returned on call + /// The type of method Method d_method; - // The type of method + /// Line number int d_line; - // Line number + /// File bsl::string d_file; - // File + /// Uri associated with this call bmqt::Uri d_uri; - // Uri associated with this call + /// Flags associated with this call bsls::Types::Uint64 d_flags; - // Flags associated with this call + /// QueueOptions associated with this + /// call bmqt::QueueOptions d_queueOptions; - // QueueOptions associated with this - // call + /// Timeout interval associated with + /// this call bsls::TimeInterval d_timeout; - // Timeout interval associated with - // this call - OpenQueueCallback d_openQueueCallback; // Callback to be invoked upon emission // of an async openQueue (if callback // was provided) + OpenQueueCallback d_openQueueCallback; + /// Callback to be invoked upon emission + /// of an async configureQueue (if + /// callback was provided) ConfigureQueueCallback d_configureQueueCallback; - // Callback to be invoked upon emission - // of an async configureQueue (if - // callback was provided) + /// Callback to be invoked upon emission + /// of an async closeQueue (if callback + /// was provided) CloseQueueCallback d_closeQueueCallback; - // Callback to be invoked upon emission - // of an async closeQueue (if callback - // was provided) + /// The result of an open queue + /// operation bmqa::OpenQueueStatus d_openQueueResult; - // The result of an open queue - // operation + /// The result of a configure queue + /// operation bmqa::ConfigureQueueStatus d_configureQueueResult; - // The result of a configure queue - // operation + /// The result of a close queue + /// operation bmqa::CloseQueueStatus d_closeQueueResult; - // The result of a close queue - // operation + /// Events to be emitted on this call EventsAndJobs d_emittedEvents; - // Events to be emitted on this call + /// Event to be returned on this call Event d_returnEvent; - // Event to be returned on this call + /// MessageEvent associated with this + /// call MessageEvent d_messageEvent; - // MessageEvent associated with this - // call + /// MessageConfirmationCookie associated + /// with this call MessageConfirmationCookie d_cookie; - // MessageConfirmationCookie associated - // with this call + /// Allocator bslma::Allocator* d_allocator_p; - // Allocator // TRAITS BSLMF_NESTED_TRAIT_DECLARATION(Call, bslma::UsesBslmaAllocator) @@ -1006,56 +1013,57 @@ class MockSession : public AbstractSession { typedef bsl::deque PostedEvents; // DATA + + /// Buffer factory bdlbb::PooledBlobBufferFactory d_blobBufferFactory; - // Buffer factory + /// Event handler (set only in + /// asynchronous mode) bslma::ManagedPtr d_eventHandler_mp; - // Event handler (set only in - // asynchronous mode) + /// sequence of method calls that are + /// expected mutable CallQueue d_calls; - // sequence of method calls that are - // expected + /// events waiting to be emitted mutable bsl::deque d_eventsAndJobs; - // events waiting to be emitted + /// GUIDS of unconfirmed messages bsl::unordered_set d_unconfirmedGUIDs; - // GUIDS of unconfirmed messages + /// Aligned buffer of two key hash map + /// uri, corrid to queues TwoKeyHashMapBuffer d_twoKeyHashMapBuffer; - // Aligned buffer of two key hash map - // uri, corrid to queues + /// Currently installed failure callback + /// that is invoked if methods are + /// called incorrectly or out of order. FailureCb d_failureCb; - // Currently installed failure callback - // that is invoked if methods are - // called incorrectly or out of order. + /// QueueId int d_lastQueueId; - // QueueId + /// Mock correlationId container CorrelationIdContainerSp d_corrIdContainer_sp; - // Mock correlationId container + /// Queue of posted events PostedEvents d_postedEvents; - // Queue of posted events + /// protects all public methods mutable bslmt::Mutex d_mutex; - // protects all public methods + /// Top level stat context for this + /// mocked Session. mwcst::StatContext d_rootStatContext; - // Top level stat context for this - // mocked Session. + /// Stats for all queues StatImplSp d_queuesStats_sp; - // Stats for all queues + /// Session Options for current session bmqt::SessionOptions d_sessionOptions; - // Session Options for current session + /// Allocator bslma::Allocator* d_allocator_p; - // Allocator private: // PRIVATE CLASS METHODS diff --git a/src/groups/bmq/bmqa/bmqa_openqueuestatus.h b/src/groups/bmq/bmqa/bmqa_openqueuestatus.h index 70c8eeba5..36d04234d 100644 --- a/src/groups/bmq/bmqa/bmqa_openqueuestatus.h +++ b/src/groups/bmq/bmqa/bmqa_openqueuestatus.h @@ -62,18 +62,19 @@ namespace bmqa { class OpenQueueStatus { private: // DATA + + /// queueId associated with the open + /// queue operation QueueId d_queueId; - // queueId associated with the open - // queue operation + /// Result code of the operation + /// (success, failure) bmqt::OpenQueueResult::Enum d_result; - // Result code of the operation - // (success, failure) + /// Optional string with a human + /// readable description of the error, + /// if any bsl::string d_errorDescription; - // Optional string with a human - // readable description of the error, - // if any public: // TRAITS @@ -81,9 +82,9 @@ class OpenQueueStatus { // TYPES - // Use of an `UnspecifiedBool` to prevent implicit conversions to - // integral values, and comparisons between different classes which - // have boolean operators. + /// Use of an `UnspecifiedBool` to prevent implicit conversions to + /// integral values, and comparisons between different classes which + /// have boolean operators. typedef bsls::UnspecifiedBool::BoolType BoolType; // CREATORS diff --git a/src/groups/bmq/bmqa/bmqa_session.h b/src/groups/bmq/bmqa/bmqa_session.h index 604edeec5..d6d7861c6 100644 --- a/src/groups/bmq/bmqa/bmqa_session.h +++ b/src/groups/bmq/bmqa/bmqa_session.h @@ -636,23 +636,24 @@ class SessionEventHandler { /// Care should be taken though since `Session` is a polymorphic class. struct SessionImpl { // PUBLIC DATA + + /// The allocator to use bslma::Allocator* d_allocator_p; - // The allocator to use + /// Session options as provided by + /// the application. bmqt::SessionOptions d_sessionOptions; - // Session options as provided by - // the application. + /// Event handler, if any, to use + /// for notifying application of + /// events. bslma::ManagedPtr d_eventHandler_mp; - // Event handler, if any, to use - // for notifying application of - // events. + /// GUID generator object. bsl::shared_ptr d_guidGenerator_sp; - // GUID generator object. + /// The application object. bslma::ManagedPtr d_application_mp; - // The application object. private: // NOT IMPLEMENTED