framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
message_switch.hpp
Go to the documentation of this file.
1 // Copyright (C) 2012 iwg molw5
2 // For conditions of distribution and use, see copyright notice in COPYING
3 
13 #pragma once
14 
15 #ifdef FRAMEWORK_NO_BOOST
16  #error "Not implemented"
17 #endif
18 
19 #include <utility>
20 #include <string>
21 #include <array>
22 
23 #include <boost/preprocessor/config/limits.hpp>
24 #include <boost/preprocessor/repetition/repeat.hpp>
25 #include <boost/preprocessor/punctuation/comma_if.hpp>
26 #include <boost/preprocessor/iteration/local.hpp>
27 
30 
31 #ifndef FRAMEWORK_PROTOCOL_BUFFERS_SWITCH_LIMIT
32 
37  #define FRAMEWORK_PROTOCOL_BUFFERS_SWITCH_LIMIT 40
38 #else
39  #if FRAMEWORK_VARIADIC_SWITCH_LIMIT > BOOST_PP_LIMIT_REPEAT
40  #error "Variadic switch limit cannot exceed BOOST_PP_LIMIT_REPEAT"
41  #endif
42 #endif
43 
44 #if FRAMEWORK_PROTOCOL_BUFFERS_SWITCH_LIMIT <= 0
45  #error "Invalid variadic switch limit"
46 #endif
47 
48 namespace framework
49 {
50  namespace protocol_buffers
51  {
52  namespace detail
53  {
54  template <typename RequiredPack, typename SwitchPack>
55  struct message_switch;
56  }
57  }
58 }
59 
60 #include <framework/protocol_buffers/message_switch.inl>