![]() |
RTBKit
0.9
Open-source framework to create real-time ad bidding systems.
|
#include <rest_request_binding.h>
When we bind a callback to a request, we need to generate all of the parameters for the callback. These parameters are generated from the request contents.
For example,
if we bind cb : (x, y, z) -> result
when we get a request r, we need to call
cb (genx(r), geny(r), genz(r) )
to create the parameters for the callback.
This happens in two steps:
1. We create a list of generators (genx, geny, genz). This is done at registration time. 2. When we get a request (and the parameter r), we then call each of the generators in turn with this parameter to generate the argument list to be passed to the callback.
This class deals with creating and calling the generator for a given position it will be called for each of (genx, geny, genz). The RestRequestBinder class is used to actually group them and apply them together to generate the callback arguments.
Definition at line 396 of file rest_request_binding.h.