Namespaces | |
| async | |
| Cartography | |
| crypto | |
| detection_logger | |
| file_system | |
| geom | |
| JSON | |
| logging | |
| mutexutils | |
| systemutils | |
| untar | |
Classes | |
| class | CannotParseEnumException |
| class | CscException |
| struct | DoubleSizedArray |
| struct | FloatSizedArray |
| struct | IsStdFixedArrayStruct |
| struct | IsStdFixedArrayStruct< std::array< T, I > > |
| struct | PointeeType |
| struct | PointeeType< const U * > |
| struct | PointeeType< const U *const > |
| struct | PointeeType< U * > |
| struct | PointeeType< U *const > |
| struct | SharedPtrTraits |
| struct | SharedPtrTraits< std::shared_ptr< U > > |
Functions | |
| string | getLocalMacAddressAsHexString () |
| optional< string > | resolveReachableIpAddress () |
| returns VPN address or public address, if found More... | |
| optional< string > | resolveReachableLocalIpAddress () |
| returns local address, if found More... | |
| string | getLocalIpAddress () |
| string | trim (const string &str, const string &trimmedChars) |
| string | floatArrayToString (float *floatArray, int size) |
| string | doubleArrayToString (double *doubleArray, int size) |
| string | intArrayToString (int *intArray, int size) |
| string | boolToString (bool value) |
| bool | replaceInString (string &str, const string &from, const string &to, bool onlyFirst) |
| bool | replaceAllInString (string &str, const string &from, const string &to) |
| void | removeSpacesInString (string &str) |
| string | toStringCurrentTimeWithMillis () |
| string | toStringDateAndTime () |
| vector< float > * | parseFloatList (string input, char separator) |
| vector< int > * | parseIntList (string input, char separator) |
| map< string, string > | parseMap (string input, const string &entriesSeparator, const string &keyValueSeparator, bool removeGlobalBracketIfExist) |
| vector< string > * | splitString (const string &inputString, const string &delimiter, bool escapeDelimiterWithBackslash) |
| system_clock::time_point | timepointWithTime (optional< int > hours, optional< int > minutes, optional< int > seconds, system_clock::time_point timePoint) |
| unsigned long long | timestampWithTime (optional< int > hours, optional< int > minutes, optional< int > seconds, system_clock::time_point timePoint) |
| unsigned long long | toMillis (system_clock::time_point timePoint) |
| unsigned long long | diffMillis (system_clock::time_point timePoint1, system_clock::time_point timePoint2) |
| unsigned long long | nowMillis () |
| system_clock::time_point | toTimePoint (unsigned long long timestampMillis) |
| bool | stringIsNumber (const string &str) |
| char * | copyStringChars (const string &str) |
| bool | stringsAreEqualCaseInsensitive (const string &a, const string &b) |
| bool | findSubString (const string str, const string sub) |
| int | randomInt (int lowerBound, int upperBound) |
| string | randomUUID () |
| string | randomString (size_t length, const string &allowedChars) |
| float | randomFloat (float aBound, float bBound) |
| char * | longToCharArray (long value) |
| char * | concatenateCharArray (const char *a, const char *b) |
| optional< int > | parseInt (const string &inputString) |
| optional< double > | parseDouble (const string &inputString) |
| float | inchToCentimeter (float inchValue) |
| double | inchToCentimeter (double inchValue) |
| string | toStringTimestampMillis (unsigned long long timestampInMs, string format) |
| string | toLowerCase (string &str) |
| string | toUpperCase (string &str) |
| bool | startsWithIgnoreCase (const string &str, const string &searchedPrefix) |
| string | snakeCaseToPascalCase (const string &snakeCaseString) |
| bool | doublesEqual (double value1, double value2, double epsilon) |
| bool | floatsEqual (float value1, float value2, float epsilon) |
| bool | stringContainsIgnoreCase (const string &theString, const string &searchedToken) |
| string | truncateString (const string &input, size_t maxSize) |
| optional< any > | getMapValueByPath (const map< string, any > &data, const string &path) |
| string | getClassName (const type_info ¶msClass, bool withNamespace) |
| string | getStackTrace () |
| string | stringPadLeft (const string &input, size_t totalLength, char padChar) |
| string | stringPadRight (const string &input, size_t totalLength, char padChar) |
| string | timePointToString (system_clock::time_point point) |
| string | timePointToString (const std::chrono::steady_clock::time_point &tp) |
| void | stringRemoveToken (string &s, const std::string_view &token) |
| template<class T > | |
| string | toStringOrNullString (T *object) |
| template<class T > | |
| string | toStringOrNullString (T object) |
| template<class T > | |
| string | vectorToString (const vector< T > &vector, const char *separator=",") |
| template<class T > | |
| vector< const T * > * | vectorOfPointerToConst (vector< T * > *theVector) |
| template<class T > | |
| vector< const T * > & | vectorOfPointerToConst (vector< T * > &&theVector) |
| template<class T > | |
| vector< const T * > & | vectorOfPointerToConst (vector< T * > &theVector) |
| template<class T > | |
| const vector< const T * > & | vectorOfPointerToConst (const vector< T * > &theVector) |
| template<class T > | |
| vector< T > | vectorsConcat (const vector< T > &vector1, const vector< T > &vector2) |
| template<class T > | |
| vector< T * > * | vectorCloneDeep (const vector< T * > *source) |
| template<class T > | |
| void | vectorPushIfMissing (vector< T > &vector, T value) |
| template<class T , class R > | |
| vector< R > | vectorTransform (const vector< T > &source, function< R(const T &item)> transformFunction) |
| template<class T > | |
| std::vector< T >::iterator | vectorIndexOf (const vector< T > &vector, T value) |
| template<class T > | |
| bool | vectorContains (const vector< T > &vector, T value) |
| template<class T > | |
| vector< T > & | vectorRemoveIf (vector< T > &theVector, function< bool(const T &)> predicate) |
| template<class T > | |
| vector< T > & | vectorRemove (vector< T > &theVector, const T &item) |
| template<class K , class V > | |
| const optional< K > | keyOfValueInMap (const map< K, V > *map, V searchedValue) |
| template<class TKey , class TValue > | |
| bool | areMapsEqual (const map< TKey, TValue > &map1, const map< TKey, TValue > &map2) |
| template<class TKey , class TValue > | |
| vector< TKey > | mapKeys (const map< TKey, TValue > &theMap) |
| template<class TKey , class TValue > | |
| vector< TValue > | mapValuesConst (const map< TKey, const TValue > &theMap) |
| template<class TKey , class TValue > | |
| vector< TValue > | mapValues (const map< TKey, TValue > &theMap) |
| template<class TKey , class TValue > | |
| vector< TValue * > | mapValues (const map< TKey, TValue * > &theMap) |
| template<class TKey , class TValue > | |
| void | mapEraseIfExist (std::map< TKey, TValue > &theMap, const TKey &key) |
| template<class K , class V > | |
| string | mapToString (const map< K, V > &theMap, const string &entriesSeparator=",", const string &keyValueSeparator="=") |
| template<typename K , typename V > | |
| bool | equals (const map< K, V > &map1, const map< K, V > &map2) |
| template<typename T > | |
| T | enforceBounds (T valueToBound, T min, T max) |
| template<typename T > | |
| string | to_string_precision (const T value, const int n=2) |
| template<typename T > | |
| string | to_string_precision_float (const T value) |
| template<typename T > | |
| string | to_string_precision_double (const T value) |
| template<typename T > | |
| string | to_string_precision_lngLat (const T value) |
| template<typename T > | |
| constexpr size_t | size_of () |
| template<typename T > | |
| void | pushInBytes (char *bytes, int &index, T data) |
| template<typename T > | |
| T | findMinValue (T *array, size_t size) |
| template<typename T > | |
| T | findMaxValue (T *array, size_t size) |
| template<typename T > | |
| T | findMinRowValueFromArray (T **array, size_t size, int row) |
| template<typename T > | |
| T | findMaxRowValueFromArray (T **array, size_t size, int row) |
| template<typename T > | |
| T | vectorGetRandomElement (const std::vector< T > *vec) |
| string | getClassName (const std::type_info ¶msClass, bool withNamespace) |
Variables | |
| template<class TTestedType , class TPointee > | |
| concept | IsPointerOf = std::is_same_v<TTestedType, const TPointee *> || std::is_same_v<TTestedType, TPointee *> || std::is_same_v<TTestedType, std::shared_ptr<const TPointee>> || std::is_same_v<TTestedType, std::shared_ptr<TPointee>> |
| template<class , template< class... > class> | |
| constexpr bool | IsTemplatedType = false |
| template<template< class... > class T, class... Args> | |
| constexpr bool | IsTemplatedType< T< Args... >, T > = true |
| template<typename T > | |
| concept | IsOptional = IsTemplatedType<T, std::optional> |
| template<typename T > | |
| concept | IsVector = IsTemplatedType<T, std::vector> |
| template<class T > | |
| constexpr bool | IsStdFixedArray = IsStdFixedArrayStruct<T>::value |
| template<typename T > | |
| concept | IsMap = IsTemplatedType<T, std::map> |
| template<typename T > | |
| concept | IsEnum = std::is_enum_v<T> |
| template<typename T > | |
| concept | IsStarPointer = PointeeType<std::remove_cvref_t<T>>::isPointer |
| template<typename T > | |
| concept | IsSharedPointer = SharedPtrTraits<std::remove_cvref_t<T>>::isSharedPtr |
| static const string | ALL_SPACES_STRING = " \n\t\r" |
| const string | ALPHABETICAL_CHARS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" |
| const string | ALPHANUMERIC_CHARS = ALPHABETICAL_CHARS + "0123456789" |
| bool conscience_utils::areMapsEqual | ( | const map< TKey, TValue > & | map1, |
| const map< TKey, TValue > & | map2 | ||
| ) |
| string conscience_utils::boolToString | ( | bool | value | ) |
| char * conscience_utils::concatenateCharArray | ( | const char * | a, |
| const char * | b | ||
| ) |
| char * conscience_utils::copyStringChars | ( | const string & | str | ) |
| unsigned long long conscience_utils::diffMillis | ( | system_clock::time_point | timePoint1, |
| system_clock::time_point | timePoint2 | ||
| ) |
| string conscience_utils::doubleArrayToString | ( | double * | doubleArray, |
| int | size | ||
| ) |
| bool conscience_utils::doublesEqual | ( | double | value1, |
| double | value2, | ||
| double | epsilon | ||
| ) |
| T conscience_utils::enforceBounds | ( | T | valueToBound, |
| T | min, | ||
| T | max | ||
| ) |
| bool conscience_utils::equals | ( | const map< K, V > & | map1, |
| const map< K, V > & | map2 | ||
| ) |
| T conscience_utils::findMaxRowValueFromArray | ( | T ** | array, |
| size_t | size, | ||
| int | row | ||
| ) |
| T conscience_utils::findMaxValue | ( | T * | array, |
| size_t | size | ||
| ) |
| T conscience_utils::findMinRowValueFromArray | ( | T ** | array, |
| size_t | size, | ||
| int | row | ||
| ) |
| T conscience_utils::findMinValue | ( | T * | array, |
| size_t | size | ||
| ) |
| bool conscience_utils::findSubString | ( | const string | str, |
| const string | sub | ||
| ) |
| string conscience_utils::floatArrayToString | ( | float * | floatArray, |
| int | size | ||
| ) |
| bool conscience_utils::floatsEqual | ( | float | value1, |
| float | value2, | ||
| float | epsilon | ||
| ) |
| string conscience_utils::getClassName | ( | const std::type_info & | paramsClass, |
| bool | withNamespace | ||
| ) |
| string conscience_utils::getClassName | ( | const type_info & | paramsClass, |
| bool | withNamespace | ||
| ) |
| string conscience_utils::getLocalIpAddress | ( | ) |
| string conscience_utils::getLocalMacAddressAsHexString | ( | ) |
| optional< any > conscience_utils::getMapValueByPath | ( | const map< string, any > & | data, |
| const string & | path | ||
| ) |
| path | dot separated path, for instance: getMapValueByPath(myMap, "position.x") will select value at key "position" in data, and expect it to be a submap, in which there is a key "x" |
| string conscience_utils::getStackTrace | ( | ) |
| double conscience_utils::inchToCentimeter | ( | double | inchValue | ) |
| float conscience_utils::inchToCentimeter | ( | float | inchValue | ) |
| string conscience_utils::intArrayToString | ( | int * | intArray, |
| int | size | ||
| ) |
| const optional<K> conscience_utils::keyOfValueInMap | ( | const map< K, V > * | map, |
| V | searchedValue | ||
| ) |
return key of searchedValue in given map, or null if not found
| char * conscience_utils::longToCharArray | ( | long | value | ) |
|
inline |
Erase from the map only if key exist
| vector<TKey> conscience_utils::mapKeys | ( | const map< TKey, TValue > & | theMap | ) |
Gets all values in given map
| string conscience_utils::mapToString | ( | const map< K, V > & | theMap, |
| const string & | entriesSeparator = ",", |
||
| const string & | keyValueSeparator = "=" |
||
| ) |
Converts given map to a printable string (debug format, key1=value1, key2=value2
| vector<TValue *> conscience_utils::mapValues | ( | const map< TKey, TValue * > & | theMap | ) |
Gets all values in given map
| vector<TValue> conscience_utils::mapValues | ( | const map< TKey, TValue > & | theMap | ) |
Gets all values in given map
| vector<TValue> conscience_utils::mapValuesConst | ( | const map< TKey, const TValue > & | theMap | ) |
Gets all values in given map
| unsigned long long conscience_utils::nowMillis | ( | ) |
| optional< double > conscience_utils::parseDouble | ( | const string & | inputString | ) |
| vector< float > * conscience_utils::parseFloatList | ( | string | input, |
| char | separator | ||
| ) |
| optional< int > conscience_utils::parseInt | ( | const string & | inputString | ) |
| vector< int > * conscience_utils::parseIntList | ( | string | input, |
| char | separator | ||
| ) |
| map< string, string > conscience_utils::parseMap | ( | string | input, |
| const string & | entriesSeparator, | ||
| const string & | keyValueSeparator, | ||
| bool | removeGlobalBracketIfExist | ||
| ) |
| void conscience_utils::pushInBytes | ( | char * | bytes, |
| int & | index, | ||
| T | data | ||
| ) |
| float conscience_utils::randomFloat | ( | float | aBound, |
| float | bBound | ||
| ) |
Returns a random float between aBound and bBound inclusive
| int conscience_utils::randomInt | ( | int | lowerBound, |
| int | upperBound | ||
| ) |
Returns a random int between aBound and bBound inclusive
| string conscience_utils::randomString | ( | size_t | length, |
| const string & | allowedChars | ||
| ) |
| string conscience_utils::randomUUID | ( | ) |
| void conscience_utils::removeSpacesInString | ( | string & | str | ) |
removes all kind of spaces from [str]
| bool conscience_utils::replaceAllInString | ( | string & | str, |
| const string & | from, | ||
| const string & | to | ||
| ) |
Replace all occurrences of [from] in [str] with [to].
| bool conscience_utils::replaceInString | ( | string & | str, |
| const string & | from, | ||
| const string & | to, | ||
| bool | onlyFirst = true |
||
| ) |
Replace occurence(s) of [from] in [str] with [to]. /!\ If [onlyFirst] is true, will replace only first occurence
| optional< string > conscience_utils::resolveReachableIpAddress | ( | ) |
returns VPN address or public address, if found
| optional< string > conscience_utils::resolveReachableLocalIpAddress | ( | ) |
returns local address, if found
|
constexpr |
| string conscience_utils::snakeCaseToPascalCase | ( | const string & | snakeCaseString | ) |
| vector< string > * conscience_utils::splitString | ( | const string & | inputString, |
| const string & | delimiter, | ||
| bool | escapeDelimiterWithBackslash | ||
| ) |
| bool conscience_utils::startsWithIgnoreCase | ( | const string & | str, |
| const string & | searchedPrefix | ||
| ) |
| bool conscience_utils::stringContainsIgnoreCase | ( | const string & | theString, |
| const string & | searchedToken | ||
| ) |
| bool conscience_utils::stringIsNumber | ( | const string & | str | ) |
| string conscience_utils::stringPadLeft | ( | const string & | input, |
| size_t | totalLength, | ||
| char | padChar | ||
| ) |
| string conscience_utils::stringPadRight | ( | const string & | input, |
| size_t | totalLength, | ||
| char | padChar | ||
| ) |
| void conscience_utils::stringRemoveToken | ( | string & | s, |
| const std::string_view & | token | ||
| ) |
| bool conscience_utils::stringsAreEqualCaseInsensitive | ( | const string & | a, |
| const string & | b | ||
| ) |
| string conscience_utils::timePointToString | ( | const std::chrono::steady_clock::time_point & | tp | ) |
| string conscience_utils::timePointToString | ( | system_clock::time_point | point | ) |
| system_clock::time_point conscience_utils::timepointWithTime | ( | optional< int > | hours, |
| optional< int > | minutes, | ||
| optional< int > | seconds, | ||
| system_clock::time_point | timePoint | ||
| ) |
| unsigned long long conscience_utils::timestampWithTime | ( | optional< int > | hours, |
| optional< int > | minutes, | ||
| optional< int > | seconds, | ||
| system_clock::time_point | timePoint | ||
| ) |
|
inline |
|
inline |
|
inline |
|
inline |
| string conscience_utils::toLowerCase | ( | string & | str | ) |
| unsigned long long conscience_utils::toMillis | ( | system_clock::time_point | timePoint | ) |
| string conscience_utils::toStringCurrentTimeWithMillis | ( | ) |
display time with milliseconds (3 digits) in the following format : MM-DD-YY HH:M:S.ms
| string conscience_utils::toStringDateAndTime | ( | ) |
display time in the following format : YYMMDD_HhMmSs_
| string conscience_utils::toStringOrNullString | ( | T * | object | ) |
| string conscience_utils::toStringOrNullString | ( | T | object | ) |
| string conscience_utils::toStringTimestampMillis | ( | unsigned long long | timestampInMs, |
| string | format | ||
| ) |
| format | put time format used to stringified the date |
| system_clock::time_point conscience_utils::toTimePoint | ( | unsigned long long | timestampMillis | ) |
| string conscience_utils::toUpperCase | ( | string & | str | ) |
| string conscience_utils::trim | ( | const string & | str, |
| const string & | trimmedChars | ||
| ) |
| string conscience_utils::truncateString | ( | const string & | input, |
| size_t | maxSize | ||
| ) |
| vector<T *>* conscience_utils::vectorCloneDeep | ( | const vector< T * > * | source | ) |
|
inline |
| T conscience_utils::vectorGetRandomElement | ( | const std::vector< T > * | vec | ) |
|
inline |
| const vector<const T *>& conscience_utils::vectorOfPointerToConst | ( | const vector< T * > & | theVector | ) |
| vector<const T *>& conscience_utils::vectorOfPointerToConst | ( | vector< T * > && | theVector | ) |
| vector<const T *>& conscience_utils::vectorOfPointerToConst | ( | vector< T * > & | theVector | ) |
| vector<const T *>* conscience_utils::vectorOfPointerToConst | ( | vector< T * > * | theVector | ) |
|
inline |
|
inline |
use with : vectorRemove(myVector, item);
|
inline |
use with : vectorRemoveIf(myVector, [&](const item &myItem) { return ...; });
| vector<T> conscience_utils::vectorsConcat | ( | const vector< T > & | vector1, |
| const vector< T > & | vector2 | ||
| ) |
| string conscience_utils::vectorToString | ( | const vector< T > & | vector, |
| const char * | separator = "," |
||
| ) |
|
inline |
Maps elements of a vector using given transform function. vector of T will be transformed to vector of R using R(T)
|
inlinestatic |
| const string conscience_utils::ALPHABETICAL_CHARS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" |
| const string conscience_utils::ALPHANUMERIC_CHARS = ALPHABETICAL_CHARS + "0123456789" |
| concept conscience_utils::IsEnum = std::is_enum_v<T> |
| concept conscience_utils::IsMap = IsTemplatedType<T, std::map> |
| concept conscience_utils::IsOptional = IsTemplatedType<T, std::optional> |
| concept conscience_utils::IsPointerOf = std::is_same_v<TTestedType, const TPointee *> || std::is_same_v<TTestedType, TPointee *> || std::is_same_v<TTestedType, std::shared_ptr<const TPointee>> || std::is_same_v<TTestedType, std::shared_ptr<TPointee>> |
true if tested type is any kind of pointer to TPointee or const TPointee
| concept conscience_utils::IsSharedPointer = SharedPtrTraits<std::remove_cvref_t<T>>::isSharedPtr |
| concept conscience_utils::IsStarPointer = PointeeType<std::remove_cvref_t<T>>::isPointer |
|
constexpr |
|
inlineconstexpr |
returns false if given template type is not of requested type<with args>
|
inlineconstexpr |
returns true if given template type T is of requested type<with Args>
| concept conscience_utils::IsVector = IsTemplatedType<T, std::vector> |