hydrobricks
Loading...
Searching...
No Matches
Utils.h
1#ifndef HYDROBRICKS_UTILS_H
2#define HYDROBRICKS_UTILS_H
3
4#include "Includes.h"
5
9[[nodiscard]] bool InitHydrobricks();
10
14[[nodiscard]] bool InitHydrobricksForPython();
15
21wxString GetUserDirPath();
22
28[[nodiscard]] bool CheckOutputDirectory(const string& path);
29
35void DisplayProcessingTime(const wxStopWatch& sw);
36
42void InitLog(const string& path);
43
47void CloseLog();
48
52void SetMaxLogLevel();
53
57void SetDebugLogLevel();
58
62void SetMessageLogLevel();
63
73bool IsNaN(int value);
74
81bool IsNaN(float value);
82
89bool IsNaN(double value);
90
96const char* GetPathSeparator();
97
109bool StringsMatch(const string& str1, const string& str2);
110
121int Find(const int* start, const int* end, int value, int tolerance = 0, bool showWarning = true);
122
133int Find(const float* start, const float* end, float value, float tolerance = 0.0, bool showWarning = true);
134
145int Find(const double* start, const double* end, double value, double tolerance = 0.0, bool showWarning = true);
146
157template <class T>
158int FindT(const T* start, const T* end, T value, T tolerance = 0, bool showWarning = true);
159
168double IncrementDateBy(double date, int amount, TimeUnit unit);
169
176Time GetTimeStructFromMJD(double mjd);
177
185double ParseDate(const string& dateStr, TimeFormat format);
186
198double GetMJD(int year, int month = 1, int day = 1, int hour = 0, int minute = 0, int second = 0);
199
200#endif // HYDROBRICKS_UTILS_H
Definition Includes.h:97