openModeller
Version 1.4.0
|
#include <os_specific.hh>
#include <openmodeller/Log.hh>
#include <openmodeller/AlgorithmFactory.hh>
#include <openmodeller/Settings.hh>
#include <iostream>
#include <stdlib.h>
#include <sys/stat.h>
#include <sys/param.h>
#include <errno.h>
#include <unistd.h>
#include <fstream>
#include <dlfcn.h>
#include <dirent.h>
#include <string.h>
#include <sys/time.h>
#include <sys/resource.h>
Go to the source code of this file.
Typedefs | |
typedef struct dirent | TDirent |
Functions | |
DLLHandle | dllOpen (char const *dll_file_name) |
void * | dllFunction (DLLHandle handle, char const *function_name) |
int | dllClose (DLLHandle handle) |
const char * | dllError (DLLHandle) |
void | setupExternalResources () |
std::string | omDataPath (std::string dir) |
vector< string > | initialPluginPath () |
int | filter (const TDirent *dir) |
vector< string > | scanDirectory (string dir) |
int | initRandom (unsigned int new_seed) |
std::string | getWorkingPath () |
bool | pathExists (const std::string path) |
bool | createPath (const std::string path) |
typedef struct dirent TDirent |
Definition at line 253 of file os_specific.cpp.
bool createPath | ( | const std::string | path | ) |
Creates (recursively) the specified path. path Path to be created
Definition at line 421 of file os_specific.cpp.
Referenced by CacheManager::cache(), createPath(), CacheManager::initialize(), and CacheManager::isCached().
Definition at line 79 of file os_specific.cpp.
Referenced by AlgorithmFactory::DLL::~DLL().
Definition at line 88 of file os_specific.cpp.
void* dllFunction | ( | DLLHandle | handle, |
char const * | function_name | ||
) |
Definition at line 70 of file os_specific.cpp.
Definition at line 61 of file os_specific.cpp.
Filter the file's names that refers to a dynamic shared libraries.
Definition at line 271 of file os_specific.cpp.
Referenced by scanDirectory().
std::string getWorkingPath | ( | ) |
Returns the current working path.
Definition at line 398 of file os_specific.cpp.
Referenced by CacheManager::initialize().
vector<string> initialPluginPath | ( | ) |
Retrieve initial library path.
Definition at line 140 of file os_specific.cpp.
Referenced by AlgorithmFactory::searchDefaultDirs().
int initRandom | ( | unsigned int | new_seed = 0 | ) |
Generates a pseudo-random seed and initializes the system random sequence generator. The seed is based in the micro-seconds of the current machine time.
new_seed | Optional seed that can be explicitly provided. |
Definition at line 353 of file os_specific.cpp.
Referenced by Random::Random(), and splitOccurrences().
std::string omDataPath | ( | std::string | dir = "" | ) |
Return the om data directory, optionally setting it through the parameter.
dir | Default directory. |
Definition at line 102 of file os_specific.cpp.
Referenced by AquaMaps::_readSpeciesData(), and setupExternalResources().
bool pathExists | ( | const std::string | path | ) |
Indicates if the specified path exists in the file system. path Path to be tested
Definition at line 407 of file os_specific.cpp.
Referenced by createPath(), and CacheManager::initialize().
vector<string> scanDirectory | ( | string | dir | ) |
Definition at line 297 of file os_specific.cpp.
References filter().
Referenced by AlgorithmFactory::p_addDir().
void setupExternalResources | ( | ) |
Set up external resources (GDAL & proj4 configuration, om algorithms & data paths).
Definition at line 95 of file os_specific.cpp.
Referenced by main().