Namespaces | |
| namespace | Tracing |
Classes | |
| class | ArchiveExtractor |
| class | CommandLineArgs |
| class | CrossPlatform |
| class | CrowReturnable |
| class | EnumMap |
| class | FileReader |
| class | IJsonable |
| class | JsonCrowReturnable |
| class | Logger |
| class | StopWatch |
| class | ThreadSafeQueue |
| class | UrlEncoding |
| class | WorkQueueLoopThread |
Typedefs | |
| typedef std::vector< std::string > | StringVector |
Enumerations | |
| enum class | ExitCode { Success = 0 , FailedInit = 1 , FailedInitSsl = 2 , FailedInitSslDirDoesNotExist = 3 , FailedInitLoadDesign = 4 , PreServerRunFailed = 5 , PostServerRunFailed = 6 , UnknownError = 7 } |
| enum class | CompressionType { TarGzip } |
Functions | |
| UTILS_EXPORT std::string | hex2bin (const std::string &s) |
| UTILS_EXPORT std::string | bin2hex (const std::string &s) |
| UTILS_EXPORT std::string | b64_encode (const std::string &s) |
| UTILS_EXPORT std::string | b64_decode (const std::string &s) |
| bool | float_equals (float a, float b, float epsilon) |
| bool | double_equals (double a, double b, double epsilon) |
| template<class R > | |
| bool | equals_within (const R a, const R b, const R epsilon=0.001f) |
| std::uint64_t | Fnv1a64 (const char *data, std::size_t sizeBytes, std::uint64_t hash=FNV1A64_OFFSET_BASIS) |
| std::string | MakeEtag (const std::string &designName, std::int64_t mtimeTicks, std::uint64_t sizeBytes, const std::string &endpointPath, std::uint64_t generation=0) |
| std::filesystem::path | FindDesignArchiveFile (const std::string &designsDir, const std::string &designName) |
| std::string | MakeDesignEtag (const std::string &designsDir, const std::string &designName, const std::string &endpointPath, std::uint64_t generation=0) |
| bool | IfNoneMatchMatches (const std::string &header, const std::string &etag) |
| void | move_file (const path &source, const path &dest, bool overwriteExisting, std::error_code &ec) |
| void | fastmove_file (const path &source, const path &dest, bool overwriteExisting, std::error_code &ec) |
| UTILS_EXPORT void | move_file (const std::filesystem::path &source, const std::filesystem::path &dest, bool overwriteExisting, std::error_code &ec) |
| UTILS_EXPORT void | fastmove_file (const std::filesystem::path &source, const std::filesystem::path &dest, bool overwriteExisting, std::error_code &ec) |
| bool | extract (const char *filename, const char *destDir) |
| bool | compress_dir (const char *srcDir, const char *destDir, const char *archiveName, std::string &fileOut, CompressionType type) |
| bool | is_safe_filename_component (const std::string &name) |
| bool | is_safe_relative_entry_path (const std::string &name) |
| std::int64_t | run_process (const std::string &program, const std::vector< std::string > &args, bool discardOutput) |
| std::string & | str_ltrim (std::string &s) |
| std::string & | str_rtrim (std::string &s) |
| std::string & | str_trim (std::string &s) |
| std::string & | str_ltrim (std::string &s, char toRemove) |
| std::string & | str_rtrim (std::string &s, char toRemove) |
| std::string & | str_trim (std::string &s, char toRemove) |
| std::string | str_ltrim_copy (const std::string &s) |
| std::string | str_rtrim_copy (const std::string &s) |
| std::string | str_trim_copy (const std::string &s) |
| std::string | str_ltrim_copy (const std::string &s, char toRemove) |
| std::string | str_rtrim_copy (const std::string &s, char toRemove) |
| std::string | str_trim_copy (const std::string &s, char toRemove) |
| void | str_to_lower (std::string &s) |
| void | str_to_upper (std::string &s) |
| std::string | str_to_lower_copy (const std::string &s) |
| std::string | str_to_upper_copy (const std::string &s) |
| bool | str_iequals (const std::string &s1, const std::string &s2) |
| std::vector< std::string >::iterator | find_str_icmp (std::vector< std::string >::iterator first, std::vector< std::string >::iterator last, const std::string &val) |
| std::vector< std::string >::const_iterator | find_str_icmp (const std::vector< std::string >::const_iterator first, const std::vector< std::string >::const_iterator last, const std::string &val) |
| std::string | make_timestamp (const system_clock::time_point &timepoint) |
| std::string | make_timestamp () |
| system_clock::time_point | parse_timestamp (const std::string ×tamp, const std::string &format) |
| std::string UTILS_EXPORT | make_timestamp (const std::chrono::system_clock::time_point &timepoint) |
Variables | |
| std::mutex | localtimeMutex |
| constexpr std::uint64_t | FNV1A64_OFFSET_BASIS = 14695981039346656037ull |
| constexpr std::uint64_t | FNV1A64_PRIME = 1099511628211ull |
| const int | MS_PER_S = 1000 |
| typedef std::vector<std::string> Utils::StringVector |
Definition at line 8 of file StringVector.h.
|
strong |
| Enumerator | |
|---|---|
| TarGzip | |
Definition at line 8 of file libarchive_extract.h.
|
strong |
| Enumerator | |
|---|---|
| Success | |
| FailedInit | |
| FailedInitSsl | |
| FailedInitSslDirDoesNotExist | |
| FailedInitLoadDesign | |
| PreServerRunFailed | |
| PostServerRunFailed | |
| UnknownError | |
Definition at line 6 of file ExitCode.h.
|
inline |
Definition at line 87 of file bin2ascii.h.
|
inline |
Definition at line 60 of file bin2ascii.h.
|
inline |
Definition at line 46 of file bin2ascii.h.
| UTILS_EXPORT bool Utils::compress_dir | ( | const char * | srcDir, |
| const char * | destDir, | ||
| const char * | archiveName, | ||
| std::string & | fileOut, | ||
| CompressionType | type | ||
| ) |
| UTILS_EXPORT bool Utils::double_equals | ( | double | a, |
| double | b, | ||
| double | epsilon | ||
| ) |
Definition at line 11 of file equals_within.cpp.
| bool Utils::equals_within | ( | const R | a, |
| const R | b, | ||
| const R | epsilon = 0.001f |
||
| ) |
Definition at line 9 of file equals_within.h.
| bool Utils::extract | ( | const char * | filename, |
| const char * | destDir | ||
| ) |
Definition at line 113 of file libarchive_extract.cpp.
| void Utils::fastmove_file | ( | const path & | source, |
| const path & | dest, | ||
| bool | overwriteExisting, | ||
| std::error_code & | ec | ||
| ) |
| UTILS_EXPORT void Utils::fastmove_file | ( | const std::filesystem::path & | source, |
| const std::filesystem::path & | dest, | ||
| bool | overwriteExisting, | ||
| std::error_code & | ec | ||
| ) |
| UTILS_EXPORT std::vector< std::string >::const_iterator Utils::find_str_icmp | ( | const std::vector< std::string >::const_iterator | first, |
| const std::vector< std::string >::const_iterator | last, | ||
| const std::string & | val | ||
| ) |
Definition at line 145 of file str_utils.cpp.
| UTILS_EXPORT std::vector< std::string >::iterator Utils::find_str_icmp | ( | std::vector< std::string >::iterator | first, |
| std::vector< std::string >::iterator | last, | ||
| const std::string & | val | ||
| ) |
|
inline |
| UTILS_EXPORT bool Utils::float_equals | ( | float | a, |
| float | b, | ||
| float | epsilon | ||
| ) |
Definition at line 5 of file equals_within.cpp.
|
inline |
|
inline |
Definition at line 12 of file bin2ascii.h.
|
inline |
| bool Utils::is_safe_filename_component | ( | const std::string & | name | ) |
Definition at line 72 of file PathSafety.cpp.
| bool Utils::is_safe_relative_entry_path | ( | const std::string & | name | ) |
| std::string UTILS_EXPORT Utils::make_timestamp | ( | ) |
Definition at line 39 of file timestamp.cpp.
| std::string UTILS_EXPORT Utils::make_timestamp | ( | const std::chrono::system_clock::time_point & | timepoint | ) |
| std::string Utils::make_timestamp | ( | const system_clock::time_point & | timepoint | ) |
Definition at line 18 of file timestamp.cpp.
|
inline |
|
inline |
| void Utils::move_file | ( | const path & | source, |
| const path & | dest, | ||
| bool | overwriteExisting, | ||
| std::error_code & | ec | ||
| ) |
| UTILS_EXPORT void Utils::move_file | ( | const std::filesystem::path & | source, |
| const std::filesystem::path & | dest, | ||
| bool | overwriteExisting, | ||
| std::error_code & | ec | ||
| ) |
| std::chrono::system_clock::time_point UTILS_EXPORT Utils::parse_timestamp | ( | const std::string & | timestamp, |
| const std::string & | format | ||
| ) |
| std::int64_t Utils::run_process | ( | const std::string & | program, |
| const std::vector< std::string > & | args, | ||
| bool | discardOutput | ||
| ) |
Definition at line 23 of file ProcessSpawn.cpp.
| UTILS_EXPORT bool Utils::str_iequals | ( | const std::string & | s1, |
| const std::string & | s2 | ||
| ) |
Definition at line 135 of file str_utils.cpp.
| UTILS_EXPORT std::string & Utils::str_ltrim | ( | std::string & | s | ) |
std::isspace(char) can only handle chars in the range [0,255] so we need to cast the it's argument to unsigned char
Definition at line 16 of file str_utils.cpp.
| UTILS_EXPORT std::string & Utils::str_ltrim | ( | std::string & | s, |
| char | toRemove | ||
| ) |
Definition at line 43 of file str_utils.cpp.
| UTILS_EXPORT std::string Utils::str_ltrim_copy | ( | const std::string & | s | ) |
| UTILS_EXPORT std::string Utils::str_ltrim_copy | ( | const std::string & | s, |
| char | toRemove | ||
| ) |
| UTILS_EXPORT std::string & Utils::str_rtrim | ( | std::string & | s | ) |
| UTILS_EXPORT std::string & Utils::str_rtrim | ( | std::string & | s, |
| char | toRemove | ||
| ) |
Definition at line 54 of file str_utils.cpp.
| UTILS_EXPORT std::string Utils::str_rtrim_copy | ( | const std::string & | s | ) |
| UTILS_EXPORT std::string Utils::str_rtrim_copy | ( | const std::string & | s, |
| char | toRemove | ||
| ) |
| UTILS_EXPORT void Utils::str_to_lower | ( | std::string & | s | ) |
Definition at line 111 of file str_utils.cpp.
| UTILS_EXPORT std::string Utils::str_to_lower_copy | ( | const std::string & | s | ) |
Definition at line 121 of file str_utils.cpp.
| UTILS_EXPORT void Utils::str_to_upper | ( | std::string & | s | ) |
Definition at line 116 of file str_utils.cpp.
| UTILS_EXPORT std::string Utils::str_to_upper_copy | ( | const std::string & | s | ) |
Definition at line 128 of file str_utils.cpp.
| UTILS_EXPORT std::string & Utils::str_trim | ( | std::string & | s | ) |
Definition at line 38 of file str_utils.cpp.
| UTILS_EXPORT std::string & Utils::str_trim | ( | std::string & | s, |
| char | toRemove | ||
| ) |
| UTILS_EXPORT std::string Utils::str_trim_copy | ( | const std::string & | s | ) |
| UTILS_EXPORT std::string Utils::str_trim_copy | ( | const std::string & | s, |
| char | toRemove | ||
| ) |
|
inlineconstexpr |
|
inlineconstexpr |
| std::mutex Utils::localtimeMutex |
Definition at line 14 of file CrossPlatform.cpp.
| const int Utils::MS_PER_S = 1000 |
Definition at line 16 of file timestamp.cpp.