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
add a description to s4u for the treated examples
[simgrid.git]
/
include
/
xbt
/
string.hpp
diff --git
a/include/xbt/string.hpp
b/include/xbt/string.hpp
index
2fcd61a
..
912fe8d
100644
(file)
--- a/
include/xbt/string.hpp
+++ b/
include/xbt/string.hpp
@@
-1,5
+1,4
@@
-/* Copyright (c) 2015. The SimGrid Team.
- * All rights reserved. */
+/* Copyright (c) 2015-2017. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
@@
-9,14
+8,14
@@
#include <simgrid_config.h>
#include <simgrid_config.h>
-#include <string>
#include <cstdarg>
#include <cstdarg>
+#include <cstdlib>
+#include <string>
-#if HAVE_MC
+#if
SIMGRID_
HAVE_MC
#include <stdexcept>
#include <cstddef>
#include <stdexcept>
#include <cstddef>
-#include <cstdlib>
#include <cstring>
#include <iterator>
#include <cstring>
#include <iterator>
@@
-27,7
+26,7
@@
namespace simgrid {
namespace xbt {
namespace simgrid {
namespace xbt {
-#if HAVE_MC
+#if
SIMGRID_
HAVE_MC
/** POD structure representation of a string
*/
/** POD structure representation of a string
*/
@@
-165,10
+164,7
@@
public:
return data()[i];
}
// Conversion
return data()[i];
}
// Conversion
- operator std::string() const
- {
- return std::string(this->c_str(), this->size());
- }
+ operator std::string() const { return std::string(this->c_str(), this->size()); }
// Iterators
iterator begin() { return data(); }
// Iterators
iterator begin() { return data(); }
@@
-208,7
+204,7
@@
public:
template<class X>
bool operator!=(X const& that) const
{
template<class X>
bool operator!=(X const& that) const
{
- return
!((*this)
== that);
+ return
not (*this
== that);
}
// Compare:
}
// Compare:
@@
-298,9
+294,18
@@
typedef std::string string;
#endif
#endif
-std::string string_vprintf(const char *fmt, va_list ap);
+/** Create a C++ string from a C-style format
+ *
+ * @ingroup XBT_str
+*/
std::string string_printf(const char *fmt, ...);
std::string string_printf(const char *fmt, ...);
+/** Create a C++ string from a C-style format
+ *
+ * @ingroup XBT_str
+*/
+std::string string_vprintf(const char *fmt, va_list ap);
+
}
}
}
}