7 #ifndef YARP_OS_IMPL_NAMECONFIG_H
8 #define YARP_OS_IMPL_NAMECONFIG_H
17 #define YARP_CONFIG_FILENAME "yarp.conf"
18 #define YARP_CONFIG_NAMESPACE_FILENAME "yarp_namespace.conf"
27 static std::string expandFilename(
const char* fname);
29 std::string getSafeString(
const std::string& txt);
31 std::string getConfigFileName(
const char* stem =
nullptr,
32 const char* ns =
nullptr);
34 std::string readConfig(
const std::string& fileName);
36 bool writeConfig(
const std::string& fileName,
const std::string& text);
38 bool fromFile(
const char* ns =
nullptr);
40 bool toFile(
bool clean =
false);
42 void setAddress(
const Contact& address);
44 static std::string getHostName(
bool prefer_loopback =
false,
45 const std::string& seed =
"");
47 static std::string getIps();
51 static bool isLocalName(
const std::string& name);
65 std::string getNamespace(
bool refresh =
false);
69 void setNamespace(
const std::string& ns);
77 bool fromString(
const std::string& txt);
A simple collection of objects that can be described and transmitted in a portable way.
Small helper class to help deal with legacy YARP configuration files.
void setMode(const std::string &mode)
The main, catch-all namespace for YARP.
#define YARP_SUPPRESS_DLL_INTERFACE_WARNING_ARG(x)
Suppress MSVC C4251 warning for the declaration.