proxygen
folly::RequestEventBase Class Reference

#include <EventBase.h>

Inheritance diagram for folly::RequestEventBase:
folly::RequestData

Public Member Functions

bool hasCallback () override
 
- Public Member Functions inherited from folly::RequestData
virtual ~RequestData ()=default
 
virtual void onSet ()
 
virtual void onUnset ()
 

Static Public Member Functions

static EventBaseget ()
 
static void set (EventBase *eb)
 

Private Member Functions

 RequestEventBase (EventBase *eb)
 

Private Attributes

EventBaseeb_
 

Static Private Attributes

static constexpr const char * kContextDataName {"EventBase"}
 

Detailed Description

Definition at line 81 of file EventBase.h.

Constructor & Destructor Documentation

folly::RequestEventBase::RequestEventBase ( EventBase eb)
inlineexplicitprivate

Definition at line 103 of file EventBase.h.

103 : eb_(eb) {}

Member Function Documentation

static EventBase* folly::RequestEventBase::get ( )
inlinestatic

Definition at line 83 of file EventBase.h.

References folly::data(), folly::RequestContext::get(), and folly::RequestContext::getContextData().

83  {
84  auto data = dynamic_cast<RequestEventBase*>(
86  if (!data) {
87  return nullptr;
88  }
89  return data->eb_;
90  }
RequestEventBase(EventBase *eb)
Definition: EventBase.h:103
static constexpr const char * kContextDataName
Definition: EventBase.h:105
constexpr auto data(C &c) -> decltype(c.data())
Definition: Access.h:71
RequestData * getContextData(const RequestToken &val)
Definition: Request.cpp:151
static RequestContext * get()
Definition: Request.cpp:290
bool folly::RequestEventBase::hasCallback ( )
inlineoverridevirtual

Implements folly::RequestData.

Definition at line 98 of file EventBase.h.

98  {
99  return false;
100  }
static void folly::RequestEventBase::set ( EventBase eb)
inlinestatic

Definition at line 92 of file EventBase.h.

References folly::RequestContext::get(), and folly::RequestContext::setContextData().

92  {
95  std::unique_ptr<RequestEventBase>(new RequestEventBase(eb)));
96  }
void setContextData(const RequestToken &val, std::unique_ptr< RequestData > data)
Definition: Request.cpp:129
RequestEventBase(EventBase *eb)
Definition: EventBase.h:103
static constexpr const char * kContextDataName
Definition: EventBase.h:105
static RequestContext * get()
Definition: Request.cpp:290

Member Data Documentation

EventBase* folly::RequestEventBase::eb_
private

Definition at line 104 of file EventBase.h.

constexpr const char* folly::RequestEventBase::kContextDataName {"EventBase"}
staticprivate

Definition at line 105 of file EventBase.h.


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