root: macro: web: namespace refactor into common

This commit is contained in:
2024-07-20 22:13:49 -07:00
parent a0091423d1
commit c3aee1dee8
2 changed files with 6 additions and 7 deletions

View File

@@ -36,16 +36,16 @@ namespace docker_finance
//! \since docker-finance 1.0.0
namespace macro
{
//! \namespace docker_finance::macro::internal
//! \brief ROOT macros for internal use only
//! \namespace docker_finance::macro::common
//! \brief Shared ROOT macro-related functionality
//! \since docker-finance 1.0.0
namespace internal
namespace common
{
//! \brief HTTP Server instance
//! \note In namespace scope because of ROOT's static functions requirement
//! \since docker-finance 1.0.0
auto g_HTTPServer = std::make_unique<::THttpServer>("http:8080");
} // namespace internal
} // namespace common
} // namespace macro
} // namespace docker_finance

View File

@@ -61,16 +61,15 @@ class Server final
static void register_commands()
{
namespace common = ::docker_finance::macro::common;
namespace internal = ::docker_finance::macro::internal;
common::Command::load({"web/internal/crypto.C"});
internal::g_HTTPServer->RegisterCommand(
common::g_HTTPServer->RegisterCommand(
"/rng_sample",
"::docker_finance::macro::web::internal::Random::rng_sample(\"%arg1%"
"\")");
common::Command::load({"web/internal/meta.C"});
internal::g_HTTPServer->RegisterCommand(
common::g_HTTPServer->RegisterCommand(
"/meta_sample",
"::docker_finance::macro::web::internal::Meta::meta_sample(\"%arg1%"
"\")");