24 #ifndef _QORE_SYSTEMENVIRONMENT_H
26 #define _QORE_SYSTEMENVIRONMENT_H
46 DLLLOCAL SystemEnvironment& operator=(
const SystemEnvironment&);
55 DLLLOCAL
static int set_intern(
const char *name,
const char *value,
bool overwrite = 1);
87 DLLLOCAL SystemEnvironment();
88 DLLLOCAL ~SystemEnvironment();
96 DLLEXPORT
static int set(
const char *name,
const char *value,
bool overwrite = 1);
103 DLLEXPORT
static class QoreString *
get(
const char *name);
118 DLLEXPORT
static int get(
const char *name,
class QoreString &str);
125 DLLEXPORT
static int unset(
const char *name);
132 DLLEXPORT
static bool valueExists(
const char* name);
149 DLLLOCAL AtomicEnvironmentSetter& operator=(
const AtomicEnvironmentSetter&);
152 DLLLOCAL
void*
operator new(size_t);
155 DLLEXPORT AtomicEnvironmentSetter();
156 DLLEXPORT ~AtomicEnvironmentSetter();
164 DLLEXPORT
int set(
const char *name,
const char *value,
bool overwrite = 1);
171 DLLEXPORT
class QoreString *
get(
const char *name);
186 DLLEXPORT
int get(
const char *name,
class QoreString &str);
193 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:142
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:38
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:42
Qore's string value type, reference counted, dynamically-allocated only.
Definition: QoreStringNode.h:40
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