Cadabra
Computer algebra system for field theory problems
Loading...
Searching...
No Matches
ScriptThread.hh
Go to the documentation of this file.
1
2#pragma once
3
4#include "websocket_server.hh"
5
6
7namespace cadabra {
8
19
20 class DocumentThread;
21 class GUIBase;
22
24 public:
27
28 ScriptThread(const ScriptThread&) = delete;
29
30 void run();
31 void terminate();
32
34 std::string get_authentication_token() const;
35
36 private:
37 void on_message(websocket_server::id_type id, const std::string& msg,
38 const websocket_server::request_type& req, const std::string& ip_address);
41
45
46 // Authentication token, needs to be sent along with any message.
47 // Gets shown when we start up.
48 mutable std::mutex url_mutex;
51 };
52
53}
A base class with all the logic to manipulate a Cadabra notebook document.
Definition DocumentThread.hh:41
Abstract base class with methods that need to be implemented by any GUI.
Definition GUIBase.hh:16
Definition ScriptThread.hh:23
void run()
Definition ScriptThread.cc:163
void on_close(websocket_server::id_type id)
Definition ScriptThread.cc:45
void on_open(websocket_server::id_type id)
Definition ScriptThread.cc:34
void on_message(websocket_server::id_type id, const std::string &msg, const websocket_server::request_type &req, const std::string &ip_address)
Definition ScriptThread.cc:58
uint16_t local_port
Definition ScriptThread.hh:50
std::string authentication_token
Definition ScriptThread.hh:49
~ScriptThread()
Definition ScriptThread.cc:29
std::string get_authentication_token() const
Definition ScriptThread.cc:183
void terminate()
Definition ScriptThread.cc:189
websocket_server wserver
Definition ScriptThread.hh:42
uint16_t get_local_port() const
Definition ScriptThread.cc:177
ScriptThread(const ScriptThread &)=delete
GUIBase * gui
Definition ScriptThread.hh:44
std::mutex url_mutex
Definition ScriptThread.hh:48
DocumentThread * document
Definition ScriptThread.hh:43
Definition websocket_server.hh:16
boost::beast::http::request< boost::beast::http::string_body > request_type
Definition websocket_server.hh:19
std::size_t id_type
Definition websocket_server.hh:18
Functions to handle the exchange properties of two or more symbols in a product.
Definition Adjform.cc:83
void set(rset_t::iterator &num, multiplier_t fac)
Definition Storage.cc:1179