|
Urbi SDK Remote for C++
2.7.3
|
#include <libport/sys/stat.h>#include <libport/unistd.h>#include <libport/cassert>#include <libport/cstring>#include <libport/cstdlib>#include <libport/cstdio>#include <iostream>#include <libport/config.h>#include <libport/foreach.hh>#include <libport/sysexits.hh>#include <urbi/urbi-root.hh>#include <dlfcn.h>

Go to the source code of this file.
Defines | |
| #define | APPLE_LINUX_WINDOWS(Apple, Linux, Windows) Linux |
| #define | URBI_ROOT_ECHO(S) std::cerr << S << std::endl \ |
| #define | URBI_ROOT_DEBUG(Self, S) |
| #define | URBI_ROOT_FATAL(Self, N, S) |
Typedefs | |
| typedef std::vector< std::string > | strings_type |
| typedef int(* | urbi_main_type )(const std::vector< std::string > &args, UrbiRoot &root, bool block, bool errors) |
Functions | |
| static std::string | mygetenv (const std::string &var, const std::string &val="") |
| static std::string | urbi_getenv (const std::string &self, std::string var, const std::string &val="") |
| static bool | debug () |
| static std::string | operator/ (const std::string &lhs, const std::string &rhs) |
| Join path components. | |
| static strings_type | split (std::string lib) |
| static RTLD_HANDLE | xdlopen (const std::string &program, const std::string &msg, std::string path, sysexit status=EX_FAIL, int flags=RTLD_LAZY|RTLD_GLOBAL) |
| path does not include the extension. | |
| template<typename Res > | |
| static Res | xdlsym (const std::string &program, const char *modname, RTLD_HANDLE module, const char *name) |
| static std::string | resolve_symlinks (const std::string &logname, const std::string &s) |
| static std::string | find_program (const std::string &logname, std::string prog) |
| Find prog in $PATH. | |
Variables | |
| static const std::string | libext |
| static const std::string | separator |
| static const std::string | libdir |
| #define APPLE_LINUX_WINDOWS | ( | Apple, | |
| Linux, | |||
| Windows | |||
| ) | Linux |
Definition at line 34 of file liburbi/urbi-root.cc.
| #define URBI_ROOT_DEBUG | ( | Self, | |
| S | |||
| ) |
do { \ if (debug()) \ URBI_ROOT_ECHO(Self << ": " << S); \ } while (0)
Definition at line 79 of file liburbi/urbi-root.cc.
Referenced by find_program(), resolve_symlinks(), UrbiRoot::urbi_main(), UrbiRoot::UrbiRoot(), xdlopen(), and xdlsym().
| #define URBI_ROOT_ECHO | ( | S | ) | std::cerr << S << std::endl \ |
Definition at line 76 of file liburbi/urbi-root.cc.
| #define URBI_ROOT_FATAL | ( | Self, | |
| N, | |||
| S | |||
| ) |
do { \ URBI_ROOT_ECHO(Self << ": " << S); \ exit(N); \ } while (0)
Definition at line 85 of file liburbi/urbi-root.cc.
Referenced by UrbiRoot::UrbiRoot(), xdlopen(), and xdlsym().
| typedef std::vector<std::string> strings_type |
Definition at line 157 of file liburbi/urbi-root.cc.
| typedef int(* urbi_main_type)(const std::vector< std::string > &args, UrbiRoot &root, bool block, bool errors) |
Definition at line 488 of file liburbi/urbi-root.cc.
| static bool debug | ( | ) | [static] |
Definition at line 70 of file liburbi/urbi-root.cc.
References mygetenv().
Referenced by urbi_launch_().
| static std::string find_program | ( | const std::string & | logname, |
| std::string | prog | ||
| ) | [static] |
Find prog in $PATH.
| logname | the prefix for log messages |
| prog | the program to look for (.exe will be appended on Windows) |
Definition at line 272 of file liburbi/urbi-root.cc.
References mygetenv(), split(), and URBI_ROOT_DEBUG.
Referenced by UrbiRoot::UrbiRoot().
| static std::string mygetenv | ( | const std::string & | var, |
| const std::string & | val = "" |
||
| ) | [static] |
Definition at line 43 of file liburbi/urbi-root.cc.
Referenced by debug(), and find_program().
| static std::string operator/ | ( | const std::string & | lhs, |
| const std::string & | rhs | ||
| ) | [static] |
| static std::string resolve_symlinks | ( | const std::string & | logname, |
| const std::string & | s | ||
| ) | [static] |
Definition at line 251 of file liburbi/urbi-root.cc.
References URBI_ROOT_DEBUG.
Referenced by UrbiRoot::UrbiRoot().
| static strings_type split | ( | std::string | lib | ) | [static] |
Definition at line 159 of file liburbi/urbi-root.cc.
Referenced by find_program().
| static std::string urbi_getenv | ( | const std::string & | self, |
| std::string | var, | ||
| const std::string & | val = "" |
||
| ) | [static] |
Definition at line 50 of file liburbi/urbi-root.cc.
Referenced by UrbiRoot::library_load(), UrbiRoot::load_plugin(), UrbiRoot::load_remote(), and UrbiRoot::UrbiRoot().
| static RTLD_HANDLE xdlopen | ( | const std::string & | program, |
| const std::string & | msg, | ||
| std::string | path, | ||
| sysexit | status = EX_FAIL, |
||
| int | flags = RTLD_LAZY | RTLD_GLOBAL |
||
| ) | [static] |
path does not include the extension.
Definition at line 217 of file liburbi/urbi-root.cc.
References libext, URBI_ROOT_DEBUG, and URBI_ROOT_FATAL.
Referenced by UrbiRoot::library_load(), UrbiRoot::load_custom(), UrbiRoot::load_plugin(), and UrbiRoot::load_remote().
| static Res xdlsym | ( | const std::string & | program, |
| const char * | modname, | ||
| RTLD_HANDLE | module, | ||
| const char * | name | ||
| ) | [static] |
Definition at line 235 of file liburbi/urbi-root.cc.
References URBI_ROOT_DEBUG, and URBI_ROOT_FATAL.
const std::string libdir [static] |
APPLE_LINUX_WINDOWS("lib", "lib", "bin")
Definition at line 99 of file liburbi/urbi-root.cc.
Referenced by UrbiRoot::library_load().
const std::string libext [static] |
APPLE_LINUX_WINDOWS(".dylib", ".so", ".dll")
Definition at line 95 of file liburbi/urbi-root.cc.
Referenced by xdlopen().
const std::string separator [static] |
APPLE_LINUX_WINDOWS("/", "/", "\\")
Definition at line 97 of file liburbi/urbi-root.cc.
Referenced by operator/().