src: replace naive search in Buffer::IndexOf
[platform/upstream/nodejs.git] / src / req-wrap.h
1 #ifndef SRC_REQ_WRAP_H_
2 #define SRC_REQ_WRAP_H_
3
4 #include "async-wrap.h"
5 #include "env.h"
6 #include "util.h"
7 #include "v8.h"
8
9 namespace node {
10
11 template <typename T>
12 class ReqWrap : public AsyncWrap {
13  public:
14   inline ReqWrap(Environment* env,
15                  v8::Local<v8::Object> object,
16                  AsyncWrap::ProviderType provider);
17   inline ~ReqWrap() override;
18   inline void Dispatched();  // Call this after the req has been dispatched.
19
20  private:
21   friend class Environment;
22   ListNode<ReqWrap> req_wrap_queue_;
23
24  public:
25   T req_;  // Must be last.  TODO(bnoordhuis) Make private.
26 };
27
28 }  // namespace node
29
30 #endif  // SRC_REQ_WRAP_H_