2 +----------------------------------------------------------------------+
4 +----------------------------------------------------------------------+
5 | Copyright (c) 2010-present Facebook, Inc. (http://www.facebook.com) |
6 +----------------------------------------------------------------------+
7 | This source file is subject to version 3.01 of the PHP license, |
8 | that is bundled with this package in the file LICENSE, and is |
9 | available through the world-wide-web at the following url: |
10 | http://www.php.net/license/3_01.txt |
11 | If you did not receive a copy of the PHP license and are unable to |
12 | obtain it through the world-wide-web, please send a note to |
13 | license@php.net so we can mail you a copy immediately. |
14 +----------------------------------------------------------------------+
17 #ifndef incl_HPHP_MEMBER_REFLECTION_H_
18 #define incl_HPHP_MEMBER_REFLECTION_H_
20 #include "hphp/runtime/base/mixed-array.h"
24 ///////////////////////////////////////////////////////////////////////////////
26 #define HPHP_REFLECTABLES_UNQ \
37 /* other php types */\
48 #define HPHP_REFLECTABLES \
49 HPHP_REFLECTABLES_UNQ\
53 #define X(name) struct name;
57 ///////////////////////////////////////////////////////////////////////////////
60 * Initialize the module by dynamically linking in generated code.
62 * Returns true on success, else false.
64 bool init_member_reflection();
67 * Given an object pointer `base' and an internal pointer `internal' for
68 * `base', get the name of the data member referred to by `internal'.
70 * Returns nullptr if reflection is not supported for the base type, or if the
71 * internal pointer is invalid.
74 const char* nameof_member(const HPHP::name* base, const void* internal);
79 const char* nameof_member(const T
* /*base*/, const void* /*internal*/) {
83 ///////////////////////////////////////////////////////////////////////////////
87 constexpr const char* const kMemberReflectionTableName
=
88 "g_member_reflection_vtable_impl";
92 ///////////////////////////////////////////////////////////////////////////////