Program Listing for File context.h#
↰ Return to documentation for file (sdv_control\context.h)
/********************************************************************************
* Copyright (c) 2025-2026 ZF Friedrichshafen AG
*
* This program and the accompanying materials are made available under the
* terms of the Apache License Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0
*
* SPDX-License-Identifier: Apache-2.0
*
* Contributors:
* Erik Verhoeven - initial API and implementation
********************************************************************************/
#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