27 #include <boost/function_types/is_member_pointer.hpp> 28 #include <boost/function_types/parameter_types.hpp> 29 #include <boost/mpl/equal.hpp> 30 #include <boost/mpl/pop_front.hpp> 31 #include <boost/mpl/transform.hpp> 32 #include <boost/mpl/vector.hpp> 44 template <
typename Fn>
46 return test<Fn>(
nullptr);
50 template <
typename Fn>
52 typename boost::function_types::template is_member_pointer<decltype(
54 template <
typename Fn>
65 template <IdentifyCallable::Kind,
typename Fn>
67 template <
typename Fn>
69 using type =
typename boost::mpl::template pop_front<
70 typename boost::function_types::template parameter_types<decltype(
73 template <
typename Fn>
75 using type =
typename boost::function_types::template parameter_types<Fn>;
78 template <
typename Fn>
85 template <
typename Fn,
typename...
Args>
87 : boost::mpl::template equal<
88 typename boost::mpl::template transform<
89 typename boost::mpl::template transform<
91 typename std::template remove_reference<boost::mpl::_1>>::
93 typename std::template remove_cv<boost::mpl::_1>>::type,
94 boost::mpl::vector<Args...>>
::type {};
95 template <
typename...
Args>
100 template <
typename Fn>
109 template <
typename Fn>
115 template <
typename Fn>
121 template <
typename Fn>
127 template <
typename Fn>
133 template <
typename Fn>
146 template <
typename Fn>
152 template <
typename Fn>
158 template <
typename Fn>
164 template <
typename Fn>
170 template <
typename Fn>
179 template <
typename Fn>
185 template <
typename Fn>
191 template <
typename Fn>
197 template <
typename Fn>
203 template <
typename Fn>
212 template <
typename Fn>
218 template <
typename Fn>
224 template <
typename Fn>
230 template <
typename Fn>
236 template <
typename Fn>
243 template <
typename Fn>
245 wrapError(&key, [&]() {
256 template <
typename Fn>
258 wrapError(&key, [&]() {
259 auto vp =
value().get_ptr(key);
261 throw std::runtime_error(folly::to<std::string>(
262 "Couldn't find key ",
264 " in dynamic object"));
270 template <
typename Fn>
272 wrapError(
nullptr, [&]() {
273 for (
const auto& kv :
value().items()) {
274 parse(kv.first, kv.second, fn);
279 template <
typename Fn>
281 wrapError(
nullptr, [&]() {
283 for (
const auto&
v :
value()) {
290 template <
typename Fn>
301 }
catch (
const std::exception& ex) {
302 reportError(lookup_k, ex);
306 template <
typename Fn>
325 "Parsing nullptr, or parsing after releaseErrors()");
size_t parse(const char *buf, size_t len)
const Map::mapped_type * get_ptr(const Map &map, const Key &key)
EnableForArgTypes< Fn > invokeForKeyValue(Fn f, const folly::dynamic &, const folly::dynamic &)
typename boost::function_types::template is_member_pointer< decltype(&Fn::operator())> IsMemFn
static constexpr Kind test(...)
typename boost::mpl::template pop_front< typename boost::function_types::template parameter_types< decltype(&Fn::operator())>::type >::type type
void required(const folly::dynamic &key, Fn)
const folly::dynamic & key() const
internal::ArgsMatcher< InnerMatcher > Args(const InnerMatcher &matcher)
—— Concurrent Priority Queue Implementation ——
void wrapError(const folly::dynamic *lookup_key, Fn)
void optional(const folly::dynamic &key, Fn)
typename std::enable_if< HasArgumentTypes< Args... >::value, void >::type EnableForArgTypes
std::string asString() const
std::string toPseudoJson(const folly::dynamic &d)
typename ArgumentTypesByKind< IdentifyCallable::getKind< Fn >(), Fn >::type ArgumentTypes
GuardImpl guard(ErrorHandler &&handler)
std::unique_ptr< AltStackBuffer > stack_
static const char *const value
static constexpr Kind getKind()
uint64_t value(const typename LockFreeRingBuffer< T, Atom >::Cursor &rbcursor)
typename boost::function_types::template parameter_types< Fn > type
static constexpr std::enable_if< IsMemFn< Fn >::value, Kind >::type test(IsMemFn< Fn > *)
const folly::dynamic & value() const
void parse(const folly::dynamic &key, const folly::dynamic &value, Fn fn)