HoverRace  2.0
Namespaces | Macros | Typedefs | Functions | Variables
OS.h File Reference
#include <locale>
#include <set>
#include <string>
#include <vector>
#include <boost/filesystem.hpp>
#include "MR_Types.h"
+ Include dependency graph for OS.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 HoverRace
 
 HoverRace::Util
 
 HoverRace::Util::OS
 Operating system support utilities.
 

Macros

#define MR_DllDeclare
 

Typedefs

using HoverRace::Util::OS::cpstr_t = const path_t::value_type *
 
using HoverRace::Util::OS::dirEnt_t = boost::filesystem::directory_entry
 
using HoverRace::Util::OS::dirIter_t = boost::filesystem::directory_iterator
 
using HoverRace::Util::OS::fs_error_t = boost::filesystem::filesystem_error
 
using HoverRace::Util::OS::path_t = boost::filesystem::path
 
using HoverRace::Util::OS::pstr_t = path_t::value_type *
 
using HoverRace::Util::OS::timestamp_t = MR_Int64
 

Functions

std::string HoverRace::Util::OS::FileTimeString ()
 Generate a string representing the current timestamp, suitable for filenames. More...
 
OS::path_t HoverRace::Util::OS::FindExePath ()
 Find the path of the executable itself. More...
 
FILE * HoverRace::Util::OS::FOpen (const path_t &path, const char *mode)
 Open a file using the OS-specific path format. More...
 
std::string HoverRace::Util::OS::GetUsername ()
 Get the username of the current OS user. More...
 
bool HoverRace::Util::OS::OpenLink (const std::string &url)
 Open a URL. More...
 
bool HoverRace::Util::OS::OpenPath (const path_t &path)
 Open a filesystem path. More...
 
void HoverRace::Util::OS::SetEnv (const char *key, const char *val)
 Set an environment variable. More...
 
const std::locale & HoverRace::Util::OS::SetLocale (const path_t &path, const std::string &domain, const std::string &reqLocale={})
 Set the locale based on the current environment. More...
 
void HoverRace::Util::OS::ShowMessage (const std::string &s, bool error=false)
 Display a simple error message to the user. More...
 
std::string HoverRace::Util::OS::StrError (int errnum)
 Convert an error number to a string. More...
 
timestamp_t HoverRace::Util::OS::Time ()
 Retrieve a timestamp. More...
 
constexpr timestamp_t HoverRace::Util::OS::TimeDiff (timestamp_t laterTs, timestamp_t earlierTs) noexcept
 Calculate the difference between two timestamps. More...
 
void HoverRace::Util::OS::TimeInit ()
 Initialize the OS time source. More...
 
void HoverRace::Util::OS::TimeShutdown ()
 Shutdown the OS time source. More...
 

Variables

std::locale HoverRace::Util::OS::locale {""}
 Global reference to the current locale. More...
 
const std::locale & HoverRace::Util::OS::stdLocale = std::locale::classic()
 The standard "C" locale for things that should be not be affected by locale. More...
 

Macro Definition Documentation

#define MR_DllDeclare