openModeller  Version 1.5.0
os_specific_win.cpp File Reference
#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>
Include dependency graph for os_specific_win.cpp:

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)
 

Function Documentation

bool createPath ( const std::string  path)

Creates (recursively) the specified path. path Path to be created

Returns
Succeeded or not.

Definition at line 430 of file os_specific_win.cpp.

References createPath(), and pathExists().

Here is the call graph for this function:

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.

Returns
Working path.

Definition at line 401 of file os_specific_win.cpp.

vector<string> initialPluginPath ( )

Retrieve initial library path.

Returns
Vector of directories.

Definition at line 194 of file os_specific_win.cpp.

References Settings::count(), Log::debug(), Settings::get(), AlgorithmFactory::getDefaultAlgDir(), and Log::instance().

Here is the call graph for this function:

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.

Parameters
new_seedOptional seed that can be explicitly provided.
Returns
Not zero if the generator was initiated.

Definition at line 363 of file os_specific_win.cpp.

References Log::debug(), and Log::instance().

Here is the call graph for this function:

std::string omDataPath ( std::string  dir = "")

Return the om data directory, optionally setting it through the parameter.

Parameters
dirDefault directory.
Returns
dir openModeller data directory.

Definition at line 156 of file os_specific_win.cpp.

References Settings::count(), and Settings::get().

Referenced by setupExternalResources().

Here is the call graph for this function:

bool pathExists ( const std::string  path)

Indicates if the specified path exists in the file system. path Path to be tested

Returns
Yes or no.

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().

Here is the call graph for this function: