OdbDesignLib
OdbDesign ODB++ Parsing Library
 
Loading...
Searching...
No Matches
RouteController.h
1#pragma once
2
3#include "IOdbServerApp.h"
4#include "../odbdesign_export.h"
5#include <string>
6#include <functional>
7#include <memory>
8#include <vector>
9
10namespace Odb::Lib::App
11{
12 class ODBDESIGN_EXPORT RouteController
13 {
14 public:
15 virtual ~RouteController() = default;
16
17 virtual void register_routes() = 0;
18
19 typedef std::vector<std::shared_ptr<RouteController>> Vector;
20
21 protected:
22 IOdbServerApp& m_serverApp;
23
25
26 typedef std::function<crow::response(const crow::request& req)> TRouteHandlerFunction;
27
28 void register_route_handler(std::string route, TRouteHandlerFunction handler);
29
30 crow::response makeLoadedFileModelsResponse(bool) const;
31
32 };
33}
34