OpendTect  6.3
Functions
envvars.h File Reference
Include dependency graph for envvars.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

const char * GetEnvVar (const char *)
 
bool GetEnvVarYN (const char *, bool defltval=false)
 
int GetEnvVarIVal (const char *, int defltval)
 
double GetEnvVarDVal (const char *, double defltval)
 
float GetEnvVarFVal (const char *, float defltval)
 
void UnsetOSEnvVar (const char *)
 
const char * GetOSEnvVar (const char *)
 
void SetEnvVar (const char *env, const char *val)
 
bool WriteEnvVar (const char *env, const char *val)
 

Function Documentation

const char* GetEnvVar ( const char *  )

getenv or other source. Cannot be called before SetProgramArgs is called. Use GetOSEnvVar if you wish to use before SetProgramArgs.

Note
Will return a pointer to a threadsafe static buffer. Please copy if you want to keep result after next call to this function.
double GetEnvVarDVal ( const char *  ,
double  defltval 
)
float GetEnvVarFVal ( const char *  ,
float  defltval 
)
int GetEnvVarIVal ( const char *  ,
int  defltval 
)
bool GetEnvVarYN ( const char *  ,
bool  defltval = false 
)

Returns defltval if not set, false if set to 0, "no" or "false", otherwise true

const char* GetOSEnvVar ( const char *  )

Raw 'getenv' call.

Note
Will return a pointer to a threadsafe static buffer. Please copy if you want to keep result after next call to this function.
void SetEnvVar ( const char *  env,
const char *  val 
)

sets environment variable to a value.

void UnsetOSEnvVar ( const char *  )
bool WriteEnvVar ( const char *  env,
const char *  val 
)

Writes environment variable to .od/envvars for user or data/Envvars for SysAdm


Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2017