CommonLib
Loading...
Searching...
No Matches
hedgedev::csl::host::environment Namespace Reference

Functions

std::optional< std::filesystem::path > get_file (const std::filesystem::path &in_filename)
template<typename T_result, ut::expr::any_string T_name>
std::optional< T_result > get_variable (const T_name &in_name, std::optional< T_result > in_default_value)

Function Documentation

◆ get_file()

std::optional< std::filesystem::path > hedgedev::csl::host::environment::get_file ( const std::filesystem::path & in_filename)
inline

Gets a file in the host environment.

Parameters
in_filenameThe file to search for.
Returns
The path to the file, if found.

◆ get_variable()

template<typename T_result, ut::expr::any_string T_name>
std::optional< T_result > hedgedev::csl::host::environment::get_variable ( const T_name & in_name,
std::optional< T_result > in_default_value = std::nullopt )
inline

Gets a variable in the host environment.

Template Parameters
T_resultThe value type to parse.
T_nameThe name string type.
Parameters
in_nameThe variable to search for.
in_default_valueThe default value to use, if the variable could not be found.
Returns
The value of the variable, if found.