4 #if defined(_WIN32) || defined(__WIN32__)
14 #include "rrExporter.h"
15 #include "rrConstants.h"
16 #include "rrStringUtils.h"
27 RR_DECLSPEC
bool cleanFolder(
const string& folder,
const string& baseName,
const std::vector<std::string>& extensions);
28 RR_DECLSPEC
string getTime();
29 RR_DECLSPEC
string getDateTime();
30 RR_DECLSPEC
string getMD5(
const string& text);
31 RR_DECLSPEC
void sleep(
int ms);
37 RR_DECLSPEC std::ptrdiff_t indexOf(
const std::vector<std::string>& vec,
const std::string& elem );
38 RR_DECLSPEC
bool isNaN(
const double& aNum);
39 RR_DECLSPEC
bool isNullOrEmpty(
const string& str);
40 RR_DECLSPEC
void pause(
bool doIt =
true,
const string& msg =
"");
43 RR_DECLSPEC
string removeTrailingSeparator(
const string& fldr,
const char sep = gPathSeparator);
46 RR_DECLSPEC
size_t populateFileSet(
const string& modelsFolder, set<string>& models);
58 RR_DECLSPEC
bool fileExists(
const string& fileN,
int fileMode=0);
60 RR_DECLSPEC
bool folderExists(
const string& folderN);
61 RR_DECLSPEC
bool createFolder(
const string& path);
63 RR_DECLSPEC
string getParentFolder(
const string& path);
64 RR_DECLSPEC
string getCurrentExeFolder();
71 RR_DECLSPEC std::string getCurrentSharedLibDir();
79 RR_DECLSPEC std::string getTempDir();
84 RR_DECLSPEC std::string joinPath(
const string& p1,
const string& p2,
85 const char pathSeparator = gPathSeparator);
90 RR_DECLSPEC std::string joinPath(
const string& p1,
const string& p2,
91 const string& p3,
const char pathSeparator = gPathSeparator);
93 RR_DECLSPEC std::string joinPath(
const string& p1,
const string& p2,
94 const string& p3,
const string& p4,
const char pathSeparator =
97 RR_DECLSPEC std::string joinPath(
const string& p1,
const string& p2,
98 const string& p3,
const string& p4,
const string& p5,
99 const char pathSeparator = gPathSeparator);
102 RR_DECLSPEC
string getCWD();
103 RR_DECLSPEC
const char getPathSeparator();
105 RR_DECLSPEC vector<string> getLinesInFile(
const string& fName);
107 RR_DECLSPEC
void createTestSuiteFileNameParts(
int caseNr,
const string& postFixPart,
string& FilePath,
string& modelFileName,
string& settingsFileName,
string& descriptionFileName);
108 RR_DECLSPEC
string getTestSuiteSubFolderName(
int caseNr);
110 RR_DECLSPEC
bool hasUnimplementedTags(
const string& descriptionFileName);
112 RR_DECLSPEC
bool isSemiStochasticTest(
const string& descriptionFileName);
114 RR_DECLSPEC
bool isFBCTest(
const string& descriptionFileName);
117 RR_DECLSPEC
bool copyCArrayToStdVector(
const int* src, vector<int>& dest,
int size);
118 RR_DECLSPEC
bool copyCArrayToStdVector(
const double* src, vector<double>& dest,
int size);
119 RR_DECLSPEC
bool copyValues(vector<double>& dest,
double* source,
const int& nrVals,
const int& startIndex);
120 RR_DECLSPEC
bool copyCArrayToStdVector(
const bool* src, vector<bool>& dest,
int size);
121 RR_DECLSPEC
bool copyStdVectorToCArray(
const vector<double>& src,
double* dest,
int size);
122 RR_DECLSPEC
bool copyStdVectorToCArray(
const vector<bool>& src,
bool* dest,
int size);
123 RR_DECLSPEC
double*
createVector(
const vector<double>& vec);
124 RR_DECLSPEC vector<double>
createVector(
const double* src,
const int& size);
126 #if defined(_WIN32) || defined(__WIN32__)
127 RR_DECLSPEC HINSTANCE loadDLL(
const string& dll);
128 RR_DECLSPEC
bool unLoadDLL(HINSTANCE dllHandle);
129 RR_DECLSPEC FARPROC getFunctionPtr(
const string& funcName, HINSTANCE DLLHandle);
130 RR_DECLSPEC
string getWINAPIError(DWORD errorCode, LPTSTR lpszFunction);
134 RR_DECLSPEC
bool createFile(
const string& fName, std::ios_base::openmode mode = std::ios::trunc );
144 RR_DECLSPEC int64_t getMicroSeconds();
C_DECL_SPEC RRVectorPtr rrcCallConv createVector(int size)
Create a new vector with a given size.
C_DECL_SPEC char *rrcCallConv getFileContent(const char *fName)
Retrieves the the content of a file.