openModeller
Version 1.5.0
|
#include <os_specific.hh>
#include <openmodeller/Log.hh>
#include <openmodeller/AlgorithmFactory.hh>
#include <openmodeller/Settings.hh>
#include <stdio.h>
#include <fstream>
#include <windows.h>
#include <direct.h>
#include <cpl_conv.h>
#include <proj_api.h>
#include <io.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
Go to the source code of this file.
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 () |
vector< string > | scanDirectory (string dir) |
dllexp int | initRandom () |
dllexp int | initRandom (unsigned int new_seed) |
dllexp int | rand_r (unsigned *seed) |
std::string | getWorkingPath () |
bool | pathExists (const std::string path) |
bool | createPath (const std::string path) |
bool createPath | ( | const std::string | path | ) |
Creates (recursively) the specified path. path Path to be created
Definition at line 430 of file os_specific_win.cpp.
References createPath(), and pathExists().
int dllClose | ( | DLLHandle | handle | ) |
Definition at line 79 of file os_specific_win.cpp.
const char* dllError | ( | DLLHandle | ) |
Definition at line 88 of file os_specific_win.cpp.
References error.
void* dllFunction | ( | DLLHandle | handle, |
char const * | function_name | ||
) |
Definition at line 70 of file os_specific_win.cpp.
DLLHandle dllOpen | ( | char const * | dll_file_name | ) |
Definition at line 56 of file os_specific_win.cpp.
std::string getWorkingPath | ( | ) |
Returns the current working path.
Definition at line 401 of file os_specific_win.cpp.
vector<string> initialPluginPath | ( | ) |
Retrieve initial library path.
Definition at line 194 of file os_specific_win.cpp.
References Settings::count(), Log::debug(), Settings::get(), AlgorithmFactory::getDefaultAlgDir(), and Log::instance().
dllexp int initRandom | ( | ) |
Definition at line 352 of file os_specific_win.cpp.
dllexp 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 363 of file os_specific_win.cpp.
References Log::debug(), and Log::instance().
std::string omDataPath | ( | std::string | dir = "" | ) |
Return the om data directory, optionally setting it through the parameter.
dir | Default directory. |
Definition at line 156 of file os_specific_win.cpp.
References Settings::count(), and Settings::get().
Referenced by 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 410 of file os_specific_win.cpp.
Referenced by createPath().
dllexp int rand_r | ( | unsigned * | seed | ) |
Definition at line 392 of file os_specific_win.cpp.
vector<string> scanDirectory | ( | string | dir | ) |
Definition at line 283 of file os_specific_win.cpp.
void setupExternalResources | ( | ) |
Set up external resources (GDAL & proj4 configuration, om algorithms & data paths).
Definition at line 104 of file os_specific_win.cpp.
References omDataPath(), and AlgorithmFactory::setDefaultAlgDir().