Program Listing for File context.h#
↰ Return to documentation for file (sdv_control\context.h)
#ifndef CONTEXT_H
#define CONTEXT_H
#include <cstdint>
#include <filesystem>
#include <support/string.h>
#include <support/sequence.h>
struct SContext
{
bool bSilent = false;
bool bVerbose = false;
bool bServerSilent = false;
bool bServerVerbose = false;
uint32_t uiInstanceID = 1000;
bool bListNoHdr = false;
bool bListShort = false;
sdv::sequence<sdv::u8string> seqCmdLine;
std::filesystem::path pathInstallDir;
};
#include <cctype> // std::tolower
#include <algorithm> // std::equal
inline bool ichar_equals(char cLeft, char cRight)
{
return std::tolower(static_cast<unsigned char>(cLeft)) ==
std::tolower(static_cast<unsigned char>(cRight));
}
inline bool iequals(const std::string& rssLeft, const std::string& rssRight)
{
return std::equal(rssLeft.begin(), rssLeft.end(), rssRight.begin(), rssRight.end(), ichar_equals);
}
#endif // !defined CONTEXT_H