|
ReUseX
0.0.5
3D Point Cloud Processing for Building Reuse
|
Crow-backed implementation of the GUI API contract. More...
#include <Server.hpp>
Public Member Functions | |
| Server (ServerOptions options) | |
| Opens the project read-write once (creating/migrating it if needed), then constructs the job runner and registers every route. | |
| ~Server () | |
| Server (const Server &)=delete | |
| Server & | operator= (const Server &)=delete |
| const ServerOptions & | options () const noexcept |
| The resolved options, with asset_dir filled in by the search order. | |
| std::string | url () const |
| Where the server can be reached, e.g. "http://127.0.0.1:8420". | |
| bool | has_assets () const noexcept |
| True when a frontend bundle was found; false when the placeholder page is being served instead. | |
| int | run () |
| Serve until SIGINT/SIGTERM or stop(). Returns a process exit code. | |
| void | stop () |
| Ask a running server to shut down, unblocking run(). | |
Crow-backed implementation of the GUI API contract.
Definition at line 59 of file Server.hpp.
|
explicit |
Opens the project read-write once (creating/migrating it if needed), then constructs the job runner and registers every route.
| std::runtime_error | if the project cannot be opened or the options are invalid. |
References options().
Referenced by operator=(), and Server().
| rux::gui::Server::~Server | ( | ) |
|
delete |
References Server().
|
noexcept |
True when a frontend bundle was found; false when the placeholder page is being served instead.
References has_assets().
Referenced by has_assets().
|
noexcept |
The resolved options, with asset_dir filled in by the search order.
Referenced by Server().
| int rux::gui::Server::run | ( | ) |
| void rux::gui::Server::stop | ( | ) |
Ask a running server to shut down, unblocking run().
rux gui itself relies on Crow's own signal handling, so this exists for callers that drive run() on a thread — chiefly the socket-level tests, which need a real listening server and then need it to go away again. Safe to call from another thread; join the thread running run() before destroying the Server.
References stop().
Referenced by stop().
| std::string rux::gui::Server::url | ( | ) | const |