9 #ifndef INCLUDE_FUNAPI_TYPES_H_ 10 #define INCLUDE_FUNAPI_TYPES_H_ 12 #include <boost/bind.hpp> 13 #include <boost/function.hpp> 14 #include <boost/make_shared.hpp> 15 #include <boost/shared_ptr.hpp> 16 #include <boost/thread.hpp> 17 #include <boost/uuid/uuid.hpp> 18 #include <boost/uuid/uuid_io.hpp> 19 #include <boost/weak_ptr.hpp> 20 #include <funapi/network/fun_message.pb.h> 29 #if (defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L || \ 30 (defined(_MSC_VER) && _MSC_VER >= 1900)) 31 template <
typename T>
using Ptr = boost::shared_ptr<T>;
32 template <
typename T>
using WeakPtr = boost::weak_ptr<T>;
34 #error "Not supported compiler version. Please use c++11 or higher." 35 #define Ptr boost::shared_ptr 36 #define WeakPtr boost::weak_ptr 44 using boost::shared_ptr;
47 using boost::weak_ptr;
53 using boost::function;
56 typedef boost::uuids::uuid
Uuid;
78 void operator()(
const T *ptr) {
89 #define DECLARE_CLASS_PTR(CLS) \ 90 static const Ptr<CLS> kNullPtr; \ 91 static const WeakPtr<CLS> kNullWeakPtr; 98 #define DEFINE_CLASS_PTR(CLS) \ 99 const Ptr<CLS> CLS::kNullPtr; \ 100 const WeakPtr<CLS> CLS::kNullWeakPtr; 106 #define DECLARE_EVENT(Event) \ 107 typedef fun::function<fun::ChainAction (Ptr<const Event>)> Handler; 110 #ifndef FUNAPI_DLL_VISIBILITY 111 #define FUNAPI_DLL_VISIBILITY __declspec(dllimport) 112 #endif // FUNAPI_DLL_VISIBILITY 113 #define FUNAPI_DLL_VISIBLE __declspec(dllexport) 115 #ifdef FUNAPI_DLL_VISIBILITY 116 #undef FUNAPI_DLL_VISIBILITY 117 #endif // FUNAPI_DLL_VISIBILITY 118 #define FUNAPI_DLL_VISIBILITY 119 #define FUNAPI_DLL_VISIBLE 123 #define DEPRECATED(func) func __attribute__((deprecated)) 125 #define DEPRECATED(func) __declspec(deprecated) func 132 #define ASSERT_NO_ROLLBACK 134 #endif // INCLUDE_FUNAPI_TYPES_H_
< Stops traversing an operations chain.
Definition: types.h:70
std::string string
String type used throughout Funapi.
Definition: types.h:59
boost::uuids::uuid Uuid
UUID type used throughout Funapi.
Definition: types.h:56
< Stops traversing and nullify effects.
Definition: types.h:72
ChainAction
Action types to specify behavior in chained operations (i.e.
Definition: types.h:67
< Keeps traversing an operations chain.
Definition: types.h:69