|
|
|
@ -38,13 +38,13 @@ |
|
|
|
|
template <typename Context, typename Return=hb_empty_t, unsigned int MaxDebugDepth=0> |
|
|
|
|
struct hb_dispatch_context_t |
|
|
|
|
{ |
|
|
|
|
hb_dispatch_context_t () : debug_depth (0) {} |
|
|
|
|
private: |
|
|
|
|
/* https://en.wikipedia.org/wiki/Curiously_recurring_template_pattern */ |
|
|
|
|
const Context* thiz () const { return static_cast<const Context *> (this); } |
|
|
|
|
Context* thiz () { return static_cast< Context *> (this); } |
|
|
|
|
public: |
|
|
|
|
const char *get_name () { return "UNKNOWN"; } |
|
|
|
|
static constexpr unsigned debug_depth = 0; |
|
|
|
|
static constexpr unsigned max_debug_depth = MaxDebugDepth; |
|
|
|
|
typedef Return return_t; |
|
|
|
|
template <typename T, typename F> |
|
|
|
@ -54,6 +54,7 @@ struct hb_dispatch_context_t |
|
|
|
|
{ return obj.dispatch (thiz (), hb_forward<Ts> (ds)...); } |
|
|
|
|
static return_t no_dispatch_return_value () { return Context::default_return_value (); } |
|
|
|
|
static bool stop_sublookup_iteration (const return_t r HB_UNUSED) { return false; } |
|
|
|
|
unsigned debug_depth; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|