X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/loba.git/blobdiff_plain/f29b38ef2a056daa14bbfda2fce78063faa773d4..4b258b0acb4f4f43d99a3eba7fd38ba40460b96d:/misc.h diff --git a/misc.h b/misc.h index a4a6db1..2ec625b 100644 --- a/misc.h +++ b/misc.h @@ -1,6 +1,7 @@ #ifndef MISC_H #define MISC_H +#include #include /* Returns true if the given priority is enabled for the default @@ -10,6 +11,20 @@ #define LOG_ISENABLED(priority) \ (_XBT_LOG_ISENABLEDV((*_XBT_LOGV(default)), (priority))) +/* Returns c-string "s" if n > 1, empty string "" otherwise. */ +#define ESSE(n) ((n) > 1 ? misc::str_esse : misc::str_nil) +namespace misc { + + extern const char str_esse[]; + extern const char str_nil[]; + + template + struct address: public std::unary_function { + T* operator()(T& ref) { return &ref; } + }; + +} + #endif // !MISC_H // Local variables: