Change GetEntryTypeFunc to std::function.

Also implement it as a member function of Dispatcher.
This commit is contained in:
Peter Johnson
2015-07-19 23:17:14 -07:00
parent c9ca2f902e
commit c9260ea785
3 changed files with 24 additions and 8 deletions

View File

@@ -8,6 +8,7 @@
#ifndef NT_MESSAGE_H_
#define NT_MESSAGE_H_
#include <functional>
#include <memory>
#include <string>
@@ -38,7 +39,7 @@ class Message {
kExecuteRpc = 0x20,
kRpcResponse = 0x21
};
typedef NT_Type (*GetEntryTypeFunc)(unsigned int id);
typedef std::function<NT_Type(unsigned int id)> GetEntryTypeFunc;
Message() : m_type(kUnknown), m_id(0), m_flags(0), m_seq_num_uid(0) {}
Message(MsgType type, const private_init&)