This file contains hidden or 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
/*** | |
Реализация шаблона должна быть доступна компилятору. | |
Поэтому шаблоны размещают в .hpp-файлах | |
*/ | |
///////////////////////////////////////////////////// | |
/*** |
This file contains hidden or 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
#include <so_5/all.hpp> | |
namespace example | |
{ | |
class a_stats_listener_t final : public so_5::agent_t | |
{ | |
public : | |
a_stats_listener_t( context_t ctx ) | |
: so_5::agent_t( std::move(ctx) ) |
This file contains hidden or 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
#include <so_5/all.hpp> | |
#include <iostream> | |
class shutdown_initiated final : public so_5::signal_t {}; | |
class my_stop_guard final : public so_5::stop_guard_t | |
{ | |
const so_5::mbox_t m_dest; |
This file contains hidden or 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
class meeting_room_t { | |
std::mutex lock_; | |
std::condition_variable wakeup_cv_; | |
unsigned attenders_{}; | |
public: | |
meeting_room_t() = default; | |
void enter() { |
This file contains hidden or 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
#include <chrono> | |
#include <iostream> | |
#include <string> | |
#include <variant> | |
namespace isdefault_benchmark | |
{ | |
class time_meter_t | |
{ |
This file contains hidden or 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
#include <so_5/all.hpp> | |
struct m1 final : public so_5::signal_t {}; | |
struct m2 final : public so_5::signal_t {}; | |
struct m3 final : public so_5::signal_t {}; | |
struct done final : public so_5::signal_t {}; | |
class A final : public so_5::agent_t | |
{ | |
public: |
This file contains hidden or 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
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN | |
#include <doctest/doctest.h> | |
#include <restinio/helpers/http_field_parsers/host.hpp> | |
namespace example | |
{ | |
namespace ep = restinio::easy_parser; |
This file contains hidden or 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
if defined( "UNIX" ) && !defined( "GNU" ) | |
define "GNU"; | |
objPath = "o"; | |
if !defined( "NOAUTODEP" ) { | |
autodepIncludePathList += "."; | |
autodepIncludePathList += "h"; | |
autodepIncludePathList += "mxx/h"; | |
} |
This file contains hidden or 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
#include <iostream> | |
#include <chrono> | |
#include <vector> | |
#include <so_5/all.hpp> | |
using hires_clock = std::chrono::high_resolution_clock; | |
struct msg_01 final : public so_5::signal_t {}; | |
struct msg_02 final : public so_5::signal_t {}; |