forked from jupyter-xeus/xeus
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved server factory functions to dedicated file
- Loading branch information
1 parent
61206af
commit f73b978
Showing
7 changed files
with
78 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/*************************************************************************** | ||
* Copyright (c) 2016, Johan Mabille, Sylvain Corlay, Martin Renou * | ||
* Copyright (c) 2016, QuantStack * | ||
* * | ||
* Distributed under the terms of the BSD 3-Clause License. * | ||
* * | ||
* The full license is in the file LICENSE, distributed with this software. * | ||
****************************************************************************/ | ||
|
||
#ifndef XEUS_SERVER_ZMQ_FACTORY_HPP | ||
#define XEUS_SERVER_ZMQ_FACTORY_HPP | ||
|
||
#include <memory> | ||
|
||
#include "zmq.hpp" | ||
|
||
#include "xserver.hpp" | ||
|
||
namespace xeus | ||
{ | ||
XEUS_API | ||
std::unique_ptr<xserver> make_xserver(zmq::context_t& context, | ||
const xconfiguration& config, | ||
nl::json::error_handler_t eh = nl::json::error_handler_t::strict); | ||
|
||
XEUS_API | ||
std::unique_ptr<xserver> make_xserver_control_main(zmq::context_t& context, | ||
const xconfiguration& config, | ||
nl::json::error_handler_t eh = nl::json::error_handler_t::strict); | ||
|
||
XEUS_API | ||
std::unique_ptr<xserver> make_xserver_shell_main(zmq::context_t& context, | ||
const xconfiguration& config, | ||
nl::json::error_handler_t eh = nl::json::error_handler_t::strict); | ||
} | ||
|
||
#endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#include "xeus/xserver_zmq_factory.hpp" | ||
#include "xeus/xserver_zmq.hpp" | ||
#include "xeus/xserver_control_main.hpp" | ||
#include "xeus/xserver_shell_main.hpp" | ||
|
||
namespace xeus | ||
{ | ||
std::unique_ptr<xserver> make_xserver(zmq::context_t& context, | ||
const xconfiguration& config, | ||
nl::json::error_handler_t eh) | ||
{ | ||
return std::make_unique<xserver_zmq>(context, config, eh); | ||
} | ||
|
||
std::unique_ptr<xserver> make_xserver_control_main(zmq::context_t& context, | ||
const xconfiguration& config, | ||
nl::json::error_handler_t eh) | ||
{ | ||
return std::make_unique<xserver_control_main>(context, config, eh); | ||
} | ||
|
||
std::unique_ptr<xserver> make_xserver_shell_main(zmq::context_t& context, | ||
const xconfiguration& config, | ||
nl::json::error_handler_t eh) | ||
{ | ||
return std::make_unique<xserver_shell_main>(context, config, eh); | ||
} | ||
} | ||
|