X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/3c051ac6644ebcb5065d5181d81e20f5585547b9..0c1113a3d64447cac78d831318fd050b8d2ae9a4:/include/xbt/string.hpp?ds=sidebyside diff --git a/include/xbt/string.hpp b/include/xbt/string.hpp index 738cf3261f..1a2619a462 100644 --- a/include/xbt/string.hpp +++ b/include/xbt/string.hpp @@ -7,20 +7,28 @@ #ifndef SIMGRID_XBT_STRING_HPP #define SIMGRID_XBT_STRING_HPP +#include + +#include +#include + #if HAVE_MC #include #include #include #include -#include #include #include +#endif + namespace simgrid { namespace xbt { +#if HAVE_MC + /** POD structure representation of a string */ struct string_data { @@ -28,9 +36,9 @@ struct string_data { std::size_t len; }; -/** A std::string with well-known representation +/** A std::string-like with well-known representation * - * This is a (incomplete) drop-in replacement for `std::string`. + * HACK, this is a (incomplete) replacement for `std::string`. * It has a fixed POD representation (`simgrid::xbt::string_data`) * which can be used to easily read the string content from another * process. @@ -279,21 +287,16 @@ bool operator>=(std::string const& a, string const& b) return b <= a; } -} -} - #else -#include +typedef std::string string; -namespace simgrid { -namespace xbt { +#endif -typedef std::string string; +std::string string_vprintf(const char *fmt, va_list ap); +std::string string_printf(const char *fmt, ...); } } #endif - -#endif