A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[mc] Mark xbt::string as a hack
[simgrid.git]
/
include
/
xbt
/
string.hpp
diff --git
a/include/xbt/string.hpp
b/include/xbt/string.hpp
index
9840855
..
1a2619a
100644
(file)
--- a/
include/xbt/string.hpp
+++ b/
include/xbt/string.hpp
@@
-9,20
+9,26
@@
#include <simgrid_config.h>
#include <simgrid_config.h>
+#include <string>
+#include <cstdarg>
+
#if HAVE_MC
#include <stdexcept>
#include <cstddef>
#include <cstdlib>
#include <cstring>
#if HAVE_MC
#include <stdexcept>
#include <cstddef>
#include <cstdlib>
#include <cstring>
-#include <string>
#include <iterator>
#include <xbt/sysdep.h>
#include <iterator>
#include <xbt/sysdep.h>
+#endif
+
namespace simgrid {
namespace xbt {
namespace simgrid {
namespace xbt {
+#if HAVE_MC
+
/** POD structure representation of a string
*/
struct string_data {
/** POD structure representation of a string
*/
struct string_data {
@@
-30,9
+36,9
@@
struct string_data {
std::size_t len;
};
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.
* It has a fixed POD representation (`simgrid::xbt::string_data`)
* which can be used to easily read the string content from another
* process.
@@
-281,21
+287,16
@@
bool operator>=(std::string const& a, string const& b)
return b <= a;
}
return b <= a;
}
-}
-}
-
#else
#else
-#include <string>
+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
-
-#endif