swift
Loading...
Searching...
No Matches
qtfreeutils.h File Reference

Go to the source code of this file.

Classes

struct  swift::misc::simulation::xplane::qtfreeutils::AcfProperties
 ACF properties. More...
struct  swift::misc::simulation::xplane::qtfreeutils::Utf8Iterator< I >
 Encoding-aware iterator adaptor for std::u8string. More...

Namespaces

namespace  swift::misc
 Free functions in swift::misc.

Functions

std::string swift::misc::simulation::xplane::qtfreeutils::getFileName (const std::string &filePath)
 Get filename (including all extensions) from a filePath.
std::string swift::misc::simulation::xplane::qtfreeutils::getDirName (const std::string &filePath)
 Get the name of the parent directory.
std::string swift::misc::simulation::xplane::qtfreeutils::getBaseName (const std::string &filePath)
 Get the base name of the file.
std::vector< std::string > swift::misc::simulation::xplane::qtfreeutils::split (const std::string &str, size_t maxSplitCount=0, const std::string &delimiter=" ")
 Split string by delimiter and maxSplitCount times.
double swift::misc::simulation::xplane::qtfreeutils::normalizeValue (const double value, const double start, const double end)
 Normalize value to range start -> end (like for +-180degrees).
std::string swift::misc::simulation::xplane::qtfreeutils::stringForFlyableModel (const AcfProperties &acfProperties, const std::string &acfFile)
 Get the model string for a flyable aircraft.
std::string swift::misc::simulation::xplane::qtfreeutils::toLower (std::string s)
 String to lower case.
bool swift::misc::simulation::xplane::qtfreeutils::stringCompareCaseInsensitive (const std::string &str1, const std::string &str2)
 Compare case insensitive.
const std::string & swift::misc::simulation::xplane::qtfreeutils::boolToYesNo (bool t)
 Yes/no from bool.
const std::string & swift::misc::simulation::xplane::qtfreeutils::boolTotrueFalse (bool t)
 True/false from bool.
bool swift::misc::simulation::xplane::qtfreeutils::isFuzzyEqual (double v1, double v2)
 Qt free version of fuzzy compare.
std::string swift::misc::simulation::xplane::qtfreeutils::simplifyWhitespace (const std::string &s)
 Trim whitespace from the beginning and end, and replace sequences of whitespace with single space characters.
AcfProperties swift::misc::simulation::xplane::qtfreeutils::extractAcfProperties (const std::string &filePath)
 Extract ACF properties from an aircraft file.

Function Documentation

◆ boolTotrueFalse()

const std::string & swift::misc::simulation::xplane::qtfreeutils::boolTotrueFalse ( bool t)
inline

True/false from bool.

Definition at line 164 of file qtfreeutils.h.

◆ boolToYesNo()

const std::string & swift::misc::simulation::xplane::qtfreeutils::boolToYesNo ( bool t)
inline

Yes/no from bool.

Definition at line 156 of file qtfreeutils.h.

◆ extractAcfProperties()

AcfProperties swift::misc::simulation::xplane::qtfreeutils::extractAcfProperties ( const std::string & filePath)
inline

Extract ACF properties from an aircraft file.

Definition at line 206 of file qtfreeutils.h.

◆ getBaseName()

std::string swift::misc::simulation::xplane::qtfreeutils::getBaseName ( const std::string & filePath)
inline

Get the base name of the file.

Definition at line 54 of file qtfreeutils.h.

◆ getDirName()

std::string swift::misc::simulation::xplane::qtfreeutils::getDirName ( const std::string & filePath)
inline

Get the name of the parent directory.

Definition at line 38 of file qtfreeutils.h.

◆ getFileName()

std::string swift::misc::simulation::xplane::qtfreeutils::getFileName ( const std::string & filePath)
inline

Get filename (including all extensions) from a filePath.

Definition at line 23 of file qtfreeutils.h.

◆ isFuzzyEqual()

bool swift::misc::simulation::xplane::qtfreeutils::isFuzzyEqual ( double v1,
double v2 )
inline

Qt free version of fuzzy compare.

Definition at line 172 of file qtfreeutils.h.

◆ normalizeValue()

double swift::misc::simulation::xplane::qtfreeutils::normalizeValue ( const double value,
const double start,
const double end )
inline

Normalize value to range start -> end (like for +-180degrees).

Definition at line 90 of file qtfreeutils.h.

◆ simplifyWhitespace()

std::string swift::misc::simulation::xplane::qtfreeutils::simplifyWhitespace ( const std::string & s)
inline

Trim whitespace from the beginning and end, and replace sequences of whitespace with single space characters.

Definition at line 181 of file qtfreeutils.h.

◆ split()

std::vector< std::string > swift::misc::simulation::xplane::qtfreeutils::split ( const std::string & str,
size_t maxSplitCount = 0,
const std::string & delimiter = " " )
inline

Split string by delimiter and maxSplitCount times.

Definition at line 70 of file qtfreeutils.h.

◆ stringCompareCaseInsensitive()

bool swift::misc::simulation::xplane::qtfreeutils::stringCompareCaseInsensitive ( const std::string & str1,
const std::string & str2 )
inline

Compare case insensitive.

Definition at line 144 of file qtfreeutils.h.

◆ stringForFlyableModel()

std::string swift::misc::simulation::xplane::qtfreeutils::stringForFlyableModel ( const AcfProperties & acfProperties,
const std::string & acfFile )
inline

Get the model string for a flyable aircraft.

Definition at line 113 of file qtfreeutils.h.

◆ toLower()

std::string swift::misc::simulation::xplane::qtfreeutils::toLower ( std::string s)
inline

String to lower case.

Definition at line 137 of file qtfreeutils.h.