Reworked Logging class.

Added Populations for individual Species.
This commit is contained in:
Christian
2019-05-06 13:14:03 +02:00
parent 67f6dcb633
commit 2f764c4812
17 changed files with 385 additions and 547 deletions
+40
View File
@@ -166,4 +166,44 @@ inline std::string getHomebase() {
inline std::string getDataPath() {
return (getHomebase() + "src/mc_electron/data/");
}
inline std::string remove_catEnding (std::string inString) {
if ( inString.substr(inString.size()-4, 4) == ".cat" ){
return (inString.substr(0, inString.size()-4) );
} else {
return (inString);
}
}
inline std::string getparName() {
string parpath = getenv("parpath");
string parfile = remove_catEnding(getenv("parfile"));
return (parpath + "/" + parfile);
}
inline bool isFile(std::string fileName) {
struct stat buffer;
return (stat (fileName.c_str(), &buffer) == 0);
}
inline bool isDir(std::string dirPath) {
struct stat info;
if( stat( dirPath.c_str(), &info ) != 0 )
return (false);
else if( info.st_mode & S_IFDIR ) // S_ISDIR() doesn't exist on my windows
return (true);
else
return (false);
}
#endif /* read_system_h */