32 #ifndef _QORE_SYSTEMENVIRONMENT_H
34 #define _QORE_SYSTEMENVIRONMENT_H
54 DLLLOCAL SystemEnvironment& operator=(
const SystemEnvironment&);
63 DLLLOCAL
static int set_intern(
const char *name,
const char *value,
bool overwrite = 1);
95 DLLLOCAL SystemEnvironment();
96 DLLLOCAL ~SystemEnvironment();
104 DLLEXPORT
static int set(
const char *name,
const char *value,
bool overwrite = 1);
111 DLLEXPORT
static class QoreString *
get(
const char *name);
126 DLLEXPORT
static int get(
const char *name,
class QoreString &str);
133 DLLEXPORT
static int unset(
const char *name);
140 DLLEXPORT
static bool valueExists(
const char* name);
157 DLLLOCAL AtomicEnvironmentSetter& operator=(
const AtomicEnvironmentSetter&);
160 DLLLOCAL
void*
operator new(size_t);
163 DLLEXPORT AtomicEnvironmentSetter();
164 DLLEXPORT ~AtomicEnvironmentSetter();
172 DLLEXPORT
int set(
const char *name,
const char *value,
bool overwrite = 1);
179 DLLEXPORT
class QoreString *
get(
const char *name);
194 DLLEXPORT
int get(
const char *name,
class QoreString &str);
201 DLLEXPORT
int unset(
const char *name);
class allowing for multiple updates to the system environment within a single lock in a thread-safe w...
Definition: SystemEnvironment.h:150
static DLLEXPORT bool valueExists(const char *name)
returns true if the environment variable exists and has a value, false if not
static DLLLOCAL int set_intern(const char *name, const char *value, bool overwrite=1)
sets the given environment variable to the value passed, respecting the overwrite flag ...
static DLLLOCAL class QoreStringNode * get_as_string_node_intern(const char *name)
returns the value of the environment variable as a new QoreStringNode object, 0 if not present...
DLLEXPORT int unset(const char *name)
unsets the given environment variable
class used to safely manipulate the system environment
Definition: SystemEnvironment.h:46
DLLEXPORT int set(const char *name, const char *value, bool overwrite=1)
sets the given environment variable to the value passed, respecting the overwrite flag ...
Qore's string type supported by the QoreEncoding class.
Definition: QoreString.h:50
Qore's string value type, reference counted, dynamically-allocated only.
Definition: QoreStringNode.h:48
static DLLLOCAL int unset_intern(const char *name)
unsets the given environment variable
static DLLEXPORT class QoreStringNode * getAsStringNode(const char *name)
returns the value of the environment variable as a new QoreStringNode object, 0 if not present...
static DLLEXPORT int unset(const char *name)
unsets the given environment variable
static DLLLOCAL class QoreString * get_intern(const char *name)
returns the value of the environment variable as a new QoreString object, 0 if not present...
DLLEXPORT class QoreStringNode * getAsStringNode(const char *name)
returns the value of the environment variable as a new QoreStringNode object, 0 if not present...
static DLLEXPORT int set(const char *name, const char *value, bool overwrite=1)
sets the given environment variable to the value passed, respecting the overwrite flag ...
DLLEXPORT bool valueExists(const char *name)
returns true if the environment variable exists and has a value, false if not