proxygen
proxygen::TraceEventContext Class Reference

#include <TraceEventContext.h>

Public Member Functions

 TraceEventContext (uint32_t pID, std::vector< TraceEventObserver * > observers, bool allTraceEventNeeded=false)
 
 TraceEventContext (uint32_t pID=0, TraceEventObserver *observer=nullptr, bool allTraceEventNeeded=false)
 
void traceEventAvailable (TraceEvent event)
 
bool isAllTraceEventNeeded () const
 

Public Attributes

uint32_t parentID
 

Private Attributes

std::vector< TraceEventObserver * > observers_
 
bool allTraceEventNeeded_
 

Detailed Description

Definition at line 20 of file TraceEventContext.h.

Constructor & Destructor Documentation

proxygen::TraceEventContext::TraceEventContext ( uint32_t  pID,
std::vector< TraceEventObserver * >  observers,
bool  allTraceEventNeeded = false 
)
inline

Definition at line 25 of file TraceEventContext.h.

28  : parentID(pID)
29  , observers_(std::move(observers))
30  , allTraceEventNeeded_(allTraceEventNeeded) {}
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
std::vector< TraceEventObserver * > observers_
proxygen::TraceEventContext::TraceEventContext ( uint32_t  pID = 0,
TraceEventObserver observer = nullptr,
bool  allTraceEventNeeded = false 
)
inlineexplicit

Definition at line 32 of file TraceEventContext.h.

References isAllTraceEventNeeded(), observers_, and traceEventAvailable().

35  : parentID(pID)
36  , allTraceEventNeeded_(allTraceEventNeeded) {
37  if (observer) {
38  observers_.push_back(observer);
39  }
40  }
std::vector< TraceEventObserver * > observers_

Member Function Documentation

bool proxygen::TraceEventContext::isAllTraceEventNeeded ( ) const

Definition at line 22 of file TraceEventContext.cpp.

References allTraceEventNeeded_.

Referenced by TraceEventContext().

22  {
23  return allTraceEventNeeded_;
24 }
void proxygen::TraceEventContext::traceEventAvailable ( TraceEvent  event)

Definition at line 16 of file TraceEventContext.cpp.

References observers_.

Referenced by TraceEventContext().

16  {
17  for (const auto observer : observers_) {
18  observer->traceEventAvailable(event);
19  }
20 }
std::vector< TraceEventObserver * > observers_

Member Data Documentation

bool proxygen::TraceEventContext::allTraceEventNeeded_
private

Definition at line 52 of file TraceEventContext.h.

Referenced by isAllTraceEventNeeded().

std::vector<TraceEventObserver*> proxygen::TraceEventContext::observers_
private

Definition at line 48 of file TraceEventContext.h.

Referenced by traceEventAvailable(), and TraceEventContext().

uint32_t proxygen::TraceEventContext::parentID

Definition at line 23 of file TraceEventContext.h.


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