33 #include <boost/cstdint.hpp>
34 #include <boost/shared_ptr.hpp>
36 #include "rsc/rscexports.h"
57 void operator()(
void* ignored)
const;
72 template<
class ParentType>
84 boost::shared_ptr<ParentType>
parent;
114 RSC_EXPORT std::string
randAlnumStr(
const std::string::size_type& length);
117 #define GCC_VERSION (__GNUC__ * 10000 \
118 + __GNUC_MINOR__ * 100 \
119 + __GNUC_PATCHLEVEL__)
139 #if GCC_VERSION > 40500
140 #define DEPRECATED_MSG(func, msg) func __attribute__ ((deprecated (#msg)))
142 #define DEPRECATED_MSG(func, msg) func __attribute__ ((deprecated))
144 #elif defined(_MSC_VER)
145 #define DEPRECATED_MSG(func, msg) __declspec(deprecated(#msg)) func
147 #pragma message("WARNING: You need to implement DEPRECATED for this compiler")
148 #define DEPRECATED_MSG(func, msg) func
168 #define DEPRECATED(fun) DEPRECATED_MSG(fun, "Use of deprecated construct.")
183 #if GCC_VERSION > 40500
184 #define DEPRECATED_CLASS(msg) __attribute__ ((deprecated (#msg)))
186 #define DEPRECATED_CLASS(msg) __attribute__ ((deprecated))
188 #elif defined(_MSC_VER)
189 #define DEPRECATED_CLASS(msg) __declspec(deprecated(#msg))
191 #pragma message("WARNING: You need to implement DEPRECATED_CLASS for this compiler")
192 #define DEPRECATED_CLASS(msg)
198 #define PP_CAT(x,y) PP_CAT1(x,y)
199 #define PP_CAT1(x,y) x##y
227 #define STATIC_ASSERT_WARN(cond, msg) \
228 struct PP_CAT(static_warning,__LINE__) { \
229 DEPRECATED_MSG(void _(::rsc::misc::detail::false_type const& ),msg) {}; \
230 void _(::rsc::misc::detail::true_type const& ) {}; \
231 PP_CAT(static_warning,__LINE__)() {_(::rsc::misc::detail::converter<(cond)>());} \
248 #define STATIC_ASSERT_WARN_TEMPLATE(token, cond, msg) \
249 STATIC_ASSERT_WARN(cond, msg) PP_CAT(PP_CAT(_localvar_, token),__LINE__)
A deleter object that can be used with boost::shared_ptr that doesn't release any memory...
std::string randAlnumStr(const std::string::size_type &length)
Generates a random alpha-numeric string with fixed length.
ParentSharedPtrDeleter(boost::shared_ptr< ParentType > parent)
boost::uint64_t currentTimeMillis()
Returns the current system time as milliseconds.
void operator()(void const *)
char randAlnumChar()
Generates a random alpha-numeric character.
boost::uint64_t currentTimeMicros()
Returns the current system time as microseconds.
boost::shared_ptr< ParentType > parent
A deleter for boost::shared_ptr which enables to use a pointer in a shared_ptr, which is not a shared...