summaryrefslogtreecommitdiff
path: root/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/MessageJsonHandler.h
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/MessageJsonHandler.h')
-rw-r--r--graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/MessageJsonHandler.h88
1 files changed, 44 insertions, 44 deletions
diff --git a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/MessageJsonHandler.h b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/MessageJsonHandler.h
index 7e238b0cf6..f019fbf121 100644
--- a/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/MessageJsonHandler.h
+++ b/graphics/asymptote/LspCpp/include/LibLsp/JsonRpc/MessageJsonHandler.h
@@ -13,49 +13,49 @@ using GenericNotificationJsonHandler = std::function< std::unique_ptr<LspMessag
class MessageJsonHandler
{
public:
- std::map< std::string, GenericRequestJsonHandler > method2request;
- std::map< std::string, GenericResponseJsonHandler > method2response;
- std::map< std::string, GenericNotificationJsonHandler > method2notification;
-
-
- const GenericRequestJsonHandler* GetRequestJsonHandler(const char* methodInfo) const
- {
- const auto findIt = method2request.find(methodInfo);
- return findIt == method2request.end() ? nullptr : &findIt->second;
- }
-
- void SetRequestJsonHandler(const std::string& methodInfo, GenericRequestJsonHandler handler)
- {
- method2request[methodInfo] = handler;
- }
-
- const GenericResponseJsonHandler* GetResponseJsonHandler(const char* methodInfo) const
- {
- const auto findIt = method2response.find(methodInfo);
- return findIt == method2response.end() ? nullptr : &findIt->second;
- }
-
- void SetResponseJsonHandler(const std::string& methodInfo,GenericResponseJsonHandler handler)
- {
- method2response[methodInfo] = handler;
- }
-
- const GenericNotificationJsonHandler* GetNotificationJsonHandler(const char* methodInfo) const
- {
- const auto findIt = method2notification.find(methodInfo);
- return findIt == method2notification.end() ? nullptr : &findIt->second;
- }
-
- void SetNotificationJsonHandler(const std::string& methodInfo, GenericNotificationJsonHandler handler)
- {
- method2notification[methodInfo] = handler;
- }
-
-
-
- std::unique_ptr<LspMessage> parseResponseMessage(const std::string&, Reader&);
- std::unique_ptr<LspMessage> parseRequstMessage(const std::string&, Reader&);
- bool resovleResponseMessage(Reader&, std::pair<std::string, std::unique_ptr<LspMessage>>& result);
- std::unique_ptr<LspMessage> parseNotificationMessage(const std::string&, Reader&);
+ std::map< std::string, GenericRequestJsonHandler > method2request;
+ std::map< std::string, GenericResponseJsonHandler > method2response;
+ std::map< std::string, GenericNotificationJsonHandler > method2notification;
+
+
+ const GenericRequestJsonHandler* GetRequestJsonHandler(const char* methodInfo) const
+ {
+ const auto findIt = method2request.find(methodInfo);
+ return findIt == method2request.end() ? nullptr : &findIt->second;
+ }
+
+ void SetRequestJsonHandler(const std::string& methodInfo, GenericRequestJsonHandler handler)
+ {
+ method2request[methodInfo] = handler;
+ }
+
+ const GenericResponseJsonHandler* GetResponseJsonHandler(const char* methodInfo) const
+ {
+ const auto findIt = method2response.find(methodInfo);
+ return findIt == method2response.end() ? nullptr : &findIt->second;
+ }
+
+ void SetResponseJsonHandler(const std::string& methodInfo,GenericResponseJsonHandler handler)
+ {
+ method2response[methodInfo] = handler;
+ }
+
+ const GenericNotificationJsonHandler* GetNotificationJsonHandler(const char* methodInfo) const
+ {
+ const auto findIt = method2notification.find(methodInfo);
+ return findIt == method2notification.end() ? nullptr : &findIt->second;
+ }
+
+ void SetNotificationJsonHandler(const std::string& methodInfo, GenericNotificationJsonHandler handler)
+ {
+ method2notification[methodInfo] = handler;
+ }
+
+
+
+ std::unique_ptr<LspMessage> parseResponseMessage(const std::string&, Reader&);
+ std::unique_ptr<LspMessage> parseRequstMessage(const std::string&, Reader&);
+ bool resovleResponseMessage(Reader&, std::pair<std::string, std::unique_ptr<LspMessage>>& result);
+ std::unique_ptr<LspMessage> parseNotificationMessage(const std::string&, Reader&);
};