1#ifndef HYDROBRICKS_UTILS_H
2#define HYDROBRICKS_UTILS_H
14bool InitHydrobricksForPython();
21wxString GetUserDirPath();
28bool CheckOutputDirectory(
const string& path);
35void DisplayProcessingTime(
const wxStopWatch& sw);
42void InitLog(
const string& path);
57void SetDebugLogLevel();
62void SetMessageLogLevel();
78bool IsNaN(
float value);
86bool IsNaN(
double value);
93const char* GetPathSeparator();
103bool StringsMatch(
const string& str1,
const string& str2);
115int Find(
const int* start,
const int* end,
int value,
int tolerance = 0,
bool showWarning =
true);
127int Find(
const float* start,
const float* end,
float value,
float tolerance = 0.0,
bool showWarning =
true);
139int Find(
const double* start,
const double* end,
double value,
double tolerance = 0.0,
bool showWarning =
true);
152int FindT(
const T* start,
const T* end, T value, T tolerance = 0,
bool showWarning =
true);
162double IncrementDateBy(
double date,
int amount, TimeUnit unit);
170Time GetTimeStructFromMJD(
double mjd);
179double ParseDate(
const string& dateStr, TimeFormat format);
192double GetMJD(
int year,
int month = 1,
int day = 1,
int hour = 0,
int minute = 0,
int second = 0);