utils#

Classes#

Line#

class Line#

Helper class to extract lines with istream_iterator.

Public Functions

inline operator std::string() const#

String convertor.

Private Members

std::string data#

Data container.

Friends

inline friend std::istream &operator>>(std::istream &is, Line &l)#

Stream operator.

Structs#

is_shared_ptr_string_constructible#

template<typename T>
struct is_shared_ptr_string_constructible : public std::false_type#

Helper type for detecting shared ptr of which the element type can be constructed from a string.

is_shared_ptr_string_constructible< std::shared_ptr< T > >#

template<typename T>
struct is_shared_ptr_string_constructible<std::shared_ptr<T>> : public std::is_constructible<T, std::string>#

Functions#

find_static_file#

inline fs::path ioh::common::file::utils::find_static_file(const std::string &filename)#

Finds a file located in the static folder of this repository.

Parameters:

filename – the name of the file

Returns:

fs::path the absolute path of the file

from_string#

Warning

doxygenfunction: Unable to resolve function “ioh::common::file::utils::from_string” with arguments None in doxygen xml output for project “iohcpp” from directory: ../../build/xml/. Potential matches:

- template<typename T> std::enable_if<std::is_floating_point<T>::value, T>::type from_string(const std::string &s)
- template<typename T> std::enable_if<std::is_integral<T>::value, T>::type from_string(const std::string &s)

get_static_root#

inline fs::path ioh::common::file::utils::get_static_root()#

Get the absolute path of IOHexperimenter/static.

Returns:

fs::path the absolute path of IOHexperimenter/static

get_static_root_by_env#

inline fs::path ioh::common::file::utils::get_static_root_by_env()#

Get the absolute path of IOHexperimenter/static.

This function attempts to find the absolute path based on environment variables. It first checks if ‘IOH_RESOURCES’ is set and uses it if available. If ‘IOH_RESOURCES’ is not set, it then checks ‘GITHUB_WORKSPACE’. If neither are set, it logs an error and returns a placeholder path.

Returns:

fs::path the absolute path of IOHexperimenter/static