Quick Links:

bmqa | bmqpi | bmqt

Public Member Functions

bmqpi::DTContext Class Reference

#include <bmqpi_dtcontext.h>

List of all members.

Public Member Functions

virtual ~DTContext ()
virtual bsl::shared_ptr
< bmqpi::DTSpan
span () const =0
virtual bslma::ManagedPtr< void > scope (const bsl::shared_ptr< DTSpan > &newSpan)=0

Detailed Description

A pure interface for a context with a notion of a current span.

See Component bmqpi_dtcontext


Constructor & Destructor Documentation

virtual bmqpi::DTContext::~DTContext (  )  [virtual]

Destructor


Member Function Documentation

virtual bsl::shared_ptr<bmqpi::DTSpan> bmqpi::DTContext::span (  )  const [pure virtual]

Returns the current DTSpan for the calling thread according to this DTContext, or an empty shared_ptr if no span is currently set.

virtual bslma::ManagedPtr<void> bmqpi::DTContext::scope ( const bsl::shared_ptr< DTSpan > &  newSpan  )  [pure virtual]

Letting previous = span() on some thread T, returns an object token which promises:

  • span() will return newSpan when called on thread T, following the construction of token.
  • span() will return previous when called on thread T, following the destruction of token.

Note that if token2 = scope(otherSpan) is called on thread T during the lifetime of token, then span() will return otherSpan. After token2 is destroyed, it will again return newSpan.


The documentation for this class was generated from the following file: