io_utils.hpp

Tools to simplify IO, such as with a command line.

This file is part of Empirical, https://github.com/devosoft/Empirical Copyright (C) 2025 Michigan State University MIT Software license; see doc/LICENSE.md

Note

Status: BETA

Defines

INCLUDE_EMP_IO_IO_UTILS_HPP_GUARD

Typedefs

using split_path_t = vector<std_fs::path>

Functions

template<typename ...ARG_Ts>
inline void PrintTo(std::ostream &os, ARG_Ts&&... args)
template<typename ...ARG_Ts>
void Print(ARG_Ts&&... args)
template<typename ...ARG_Ts>
void PrintLn(ARG_Ts&&... args)
void PrintRepeat(char ch, size_t count)
template<typename T>
void PrintRepeat(T arg, size_t count)
template<typename ...ARG_Ts>
void PrintRepeatLn(ARG_Ts&&... args)
IOChar GetIOChar()
split_path_t SplitPath(const std_fs::path &in_path)
std_fs::path JoinPath(const split_path_t &path)
std::optional<std_fs::path> FindFolderInPath(std::string folder_name, std_fs::path test_path)
void ReduceToCommonPath(split_path_t &path1, const split_path_t &path2)
std_fs::path FindCommonPath(std_fs::path path1, std_fs::path path2)
template<typename CONTAINER_T>
std_fs::path FindCommonPath(const CONTAINER_T &filenames)
bool CanWriteToDirectory(const std_fs::path &dir, std::string test_name = ".Empirical_test_delete_me")
struct IOChar
#include <io_utils.hpp>

Public Functions

inline IOChar(int value = 0)
IOChar(const IOChar&) = default
IOChar &operator=(const IOChar&) = default
auto operator<=>(const IOChar&) const = default
inline std::string GetName() const
inline operator int() const

Public Members

int char_id = 0

Public Static Attributes

static constexpr int UNKNOWN = 1000
static constexpr int ESCAPE = 1001
static constexpr int UP = 1002
static constexpr int RIGHT = 1003
static constexpr int DOWN = 1004
static constexpr int LEFT = 1005