diff options
Diffstat (limited to 'src/Util.h')
-rw-r--r-- | src/Util.h | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -3,6 +3,8 @@ #include <uuid/uuid.h> #include <sys/utsname.h> +#include <stdlib.h> +#include "String.h" namespace PY { @@ -40,6 +42,18 @@ public: } }; +class Env : public String { +public: + Env (const gchar *name) { + gchar *str; + str = getenv (name); + assign (str != NULL ? str : ""); + } + operator const gchar *(void) const { + return c_str(); + } +}; + class StaticString { public: StaticString (const gchar *str) : m_string (str) {} |