proxygen
wangle::IntToStringFilter Class Reference
Inheritance diagram for wangle::IntToStringFilter:
wangle::ServiceFilter< int, int, std::string, std::string > wangle::Service< int, int >

Public Member Functions

 IntToStringFilter (std::shared_ptr< Service< std::string, std::string >> service)
 
Future< int > operator() (int req) override
 
- Public Member Functions inherited from wangle::ServiceFilter< int, int, std::string, std::string >
 ServiceFilter (std::shared_ptr< Service< std::string, std::string >> service)
 
 ~ServiceFilter () override=default
 
folly::Future< folly::Unitclose () override
 
bool isAvailable () override
 
- Public Member Functions inherited from wangle::Service< int, int >
virtual ~Service ()=default
 

Additional Inherited Members

- Protected Attributes inherited from wangle::ServiceFilter< int, int, std::string, std::string >
std::shared_ptr< Service< std::string, std::string > > service_
 

Detailed Description

Definition at line 152 of file ServiceTest.cpp.

Constructor & Destructor Documentation

wangle::IntToStringFilter::IntToStringFilter ( std::shared_ptr< Service< std::string, std::string >>  service)
inlineexplicit

Member Function Documentation

Future<int> wangle::IntToStringFilter::operator() ( int  req)
inlineoverridevirtual

Implements wangle::Service< int, int >.

Definition at line 159 of file ServiceTest.cpp.

References string.

159  {
160  return (*service_)(folly::to<std::string>(req))
161  .thenValue([](std::string resp) { return folly::to<int>(resp); });
162  }
std::shared_ptr< Service< std::string, std::string > > service_
Definition: Service.h:82
const char * string
Definition: Conv.cpp:212

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