root: macro: utility: namespace refactor into common

This commit is contained in:
2024-07-20 22:00:48 -07:00
parent 8eda51c6bc
commit a0091423d1
5 changed files with 18 additions and 23 deletions

View File

@@ -38,10 +38,10 @@ 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 Wrapper to ROOT Cling commands
//! \ingroup cpp_macro_impl
@@ -84,11 +84,6 @@ class Command final
}
};
//! \namespace docker_finance::macro::internal::utility
//! \brief To help grease the wheels of the machine
//! \since docker-finance 1.0.0
namespace utility
{
//! \brief Get ROOT environment variable
//! \param var ROOT variable
//! \note ROOT environment variables include shell (and shell caller) environment
@@ -112,8 +107,7 @@ std::string make_timestamp()
std::strftime(time.data(), time.size(), "%FT%TZ", std::gmtime(&t));
return std::string{time.data()};
}
} // namespace utility
} // namespace internal
} // namespace common
//! \brief Load file by path
//! \ingroup cpp_macro
@@ -127,7 +121,7 @@ std::string make_timestamp()
//! \note Parent directory is `root/macro`
void load(const std::string& path)
{
internal::Command::load(path);
common::Command::load(path);
}
//! \brief Wrapper to load files by list of paths
@@ -143,7 +137,7 @@ void load(const std::string& path)
void load(const std::initializer_list<std::string>& paths)
{
for (const auto& path : paths)
internal::Command::load(path);
common::Command::load(path);
}
} // namespace macro
} // namespace docker_finance