#include <Environment.h>
Public Types | |
typedef UInt8 | NodeId [6] |
Static Public Member Functions | |
static std::string | get (const std::string &name, const std::string &defaultValue) |
static std::string | get (const std::string &name) |
Ethernet address. | |
static bool | has (const std::string &name) |
static std::string | nodeId () |
static void | nodeId (NodeId &id) |
Returns the node (or host) name. | |
static std::string | nodeName () |
Returns the operating system architecture. | |
static std::string | osArchitecture () |
Returns the operating system version. | |
static std::string | osName () |
static std::string | osVersion () |
Returns the operating system name. | |
static void | set (const std::string &name, const std::string &value) |
This class provides access to environment variables and some general system information.
Definition at line 49 of file Environment.h.
typedef UInt8 Poco::Environment::NodeId[6] |
Definition at line 54 of file Environment.h.
std::string Poco::Environment::get | ( | const std::string & | name, | |
const std::string & | defaultValue | |||
) | [static] |
Returns the value of the environment variable with the given name. Throws a NotFoundException if the variable does not exist.
Definition at line 47 of file Environment.cpp.
std::string Poco::Environment::get | ( | const std::string & | name | ) | [static] |
Ethernet address.
Definition at line 41 of file Environment.cpp.
bool Poco::Environment::has | ( | const std::string & | name | ) | [static] |
Returns the value of the environment variable with the given name. If the environment variable is undefined, returns defaultValue instead.
Definition at line 56 of file Environment.cpp.
std::string Poco::Environment::nodeId | ( | ) | [static] |
Returns the Ethernet address of the first Ethernet adapter found on the system.
Throws a SystemException if no Ethernet adapter is available.
Definition at line 92 of file Environment.cpp.
void Poco::Environment::nodeId | ( | NodeId & | id | ) | [static] |
Returns the node (or host) name.
Definition at line 108 of file Environment.cpp.
std::string Poco::Environment::nodeName | ( | ) | [static] |
Returns the operating system architecture.
Definition at line 86 of file Environment.cpp.
std::string Poco::Environment::osArchitecture | ( | ) | [static] |
Returns the operating system version.
Definition at line 80 of file Environment.cpp.
std::string Poco::Environment::osName | ( | ) | [static] |
Sets the environment variable with the given name to the given value.
Definition at line 68 of file Environment.cpp.
std::string Poco::Environment::osVersion | ( | ) | [static] |
Returns the operating system name.
Definition at line 74 of file Environment.cpp.
void Poco::Environment::set | ( | const std::string & | name, | |
const std::string & | value | |||
) | [static] |
Returns true iff an environment variable with the given name is defined.
Definition at line 62 of file Environment.cpp.