{"id":256416,"date":"2015-04-30T15:49:02","date_gmt":"2015-04-30T11:49:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=256416"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=256416","title":{"rendered":"\u041c\u0438\u043d\u0438-\u043e\u0431\u0437\u043e\u0440 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0434\u043b\u044f Reflection \u0432 C++"},"content":{"rendered":"<p> \t\t\t\u0412 \u0441\u0438\u043b\u0443 \u0441\u043a\u0440\u043e\u043c\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043d\u0430 \u044d\u0442\u0443 \u0442\u0435\u043c\u0443, \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0440\u043e\u0432\u0435\u0434\u0443 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043e\u0431\u0437\u043e\u0440 \u0438 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0434\u043b\u044f Reflection \u0432 C++. \u0412 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u044d\u0442\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u0438\u0433\u0440.<\/p>\n<p>  \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f reflection \u043c\u043e\u0436\u043d\u043e:<br \/>   \u2014 \u041b\u0435\u0433\u043a\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u044b, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432, \u0442\u0430\u043a \u043a\u0430\u043a \u0435\u0441\u0442\u044c \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043c\u0435\u0442\u0430-\u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0432\u0441\u0435\u0445 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u0445 \u0432\u0430\u0448\u0438\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432;<br \/>   \u2014 \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c binding \u0434\u043b\u044f \u043c\u043d\u043e\u0433\u0438\u0445 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 \u0441\u0440\u0430\u0437\u0443 (Lua, Python, JavaScript, &#8230;;<br \/>   \u2014 \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u0430-\u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438;<br \/>   \u2014 \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0444\u0430\u0431\u0440\u0438\u043a\u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u044f \u043d\u0443\u0436\u043d\u044b\u0435 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u044b, \u0438\u043c\u0435\u044f \u043b\u0438\u0448\u044c \u0441\u0442\u0440\u043e\u043a\u0443 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u0442\u0438\u043f;<br \/>   \u2014 \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u043e\u043b\u0435\u0435 \u043b\u0435\u0433\u043a\u043e\u0432\u0435\u0441\u043d\u043e\u0439 \u0437\u0430\u043c\u0435\u043d\u044b dynamic_cast;<br \/>   \u2014 \u041d\u0435\u0443\u0436\u0435\u043b\u0438 \u044d\u0442\u043e\u0433\u043e \u043c\u0430\u043b\u043e?<br \/>  <a name=\"habracut\"><\/a><br \/>  <b>\u0414\u0430\u043b\u044c\u0448\u0435 \u0438\u0434\u0435\u0442 \u043e\u0431\u0437\u043e\u0440 \u043a\u0430\u0436\u0434\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043f\u043e \u043e\u0447\u0435\u0440\u0435\u0434\u0438 \u0432 \u0441\u0438\u043b\u0443 \u043c\u043e\u0438\u0445 \u0441\u043a\u0440\u043e\u043c\u043d\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439. \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439:<\/b><br \/>   \u2014 \u043a\u043e\u0440\u043e\u0442\u043a\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435;<br \/>   \u2014 \u043f\u0440\u0438\u043c\u0435\u0440 binding&#8217;\u0430 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043b\u044f \u0442\u0430\u043a\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430:<\/p>\n<pre><code class=\"cpp\">class Test { public:   int func(int a, int b)   {     return a + b;   } }; <\/code><\/pre>\n<p>   \u2014 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0437\u0430\u043c\u0435\u0440\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043d\u0430 i5 3570K, Windows 8, Visual Studio 2013, Release x86 (\u0437\u0430\u043c\u0435\u0440\u044f\u043b\u0438\u0441\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e 10 000 000 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430 \u043a\u043b\u0430\u0441\u0441\u0430 \u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e 10 000 000 \u043f\u043e\u0438\u0441\u043a \u043c\u0435\u0442\u0430\u043c\u0435\u0442\u043e\u0434\u0430+\u0432\u044b\u0437\u043e\u0432).<\/p>\n<p>  \u0420\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0438\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0431\u0449\u0438\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0448\u0430\u0433\u043e\u0432 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 (\u0432\u0440\u043e\u0434\u0435 qt moc \u0438 gccxml).<\/p>\n<p>  \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u044b \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u0430\u043d\u0438\u044f \u043b\u0438\u0447\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0430 \u043a \u043d\u0438\u043c.<\/p>\n<h4>1) Luabind<\/h4>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/6b7\/a4f\/438\/6b7a4f43895b404cb7cebe2f2aebd5c6.png\" alt=\"image\"\/><br \/>  <a href=\"https:\/\/github.com\/rpavlik\/luabind\">github.com\/rpavlik\/luabind<\/a><\/p>\n<p>  \u0421\u0435\u0439\u0447\u0430\u0441 \u0434\u043b\u044f binding&#8217;\u0430 \u0432 Lua \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f Luabind (rpavlik&#8217;s fork), \u043d\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0443\u044e \u043c\u0435\u0442\u0430-\u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0438 \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u043e\u0441\u043e\u0431\u043e \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0448\u044c.<\/p>\n<p>  <u>\u041f\u0440\u0438\u043c\u0435\u0440<\/u>  <\/p>\n<pre><code class=\"cpp\">luabind::module(state) [   luabind::class_&lt;Test&gt;(&quot;Test&quot;)     .def(&quot;func&quot;, &Test::func) ]; <\/code><\/pre>\n<pre><code class=\"lua\">local obj = Test() obj:func(1, 2) <\/code><\/pre>\n<p>  <u>Benchmark<\/u><br \/>   \u2014 Invoke \u2014 <b>1100ms<\/b><br \/>   \u2014 FindMetaMethod+Invoke \u2014 <b>1580ms<\/b><\/p>\n<h4>2) Camp<\/h4>\n<p>  <img decoding=\"async\" src=\"https:\/\/avatars2.githubusercontent.com\/u\/245489?v=3&amp;s=400\" alt=\"image\" width=\"128\"\/><br \/>  <a href=\"https:\/\/projects.tegesoft.com\/pm\/projects\/camp\">projects.tegesoft.com\/pm\/projects\/camp<\/a><br \/>  <a href=\"https:\/\/github.com\/tegesoft\/camp\">github.com\/tegesoft\/camp<\/a><\/p>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u043e\u0441\u044c \u0444\u0440\u0430\u043d\u0446\u0443\u0437\u0441\u043a\u043e\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0435\u043c \u043f\u043e\u0434 \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u0435\u043d\u0438\u0435\u043c \u043e\u0442 luabind. \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043a\u0443\u043b\u044c\u0442\u0443\u0440\u043d\u043e \u0438 \u043f\u0440\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043e.<br \/>  \u041f\u0440\u0430\u0432\u0434\u0430 \u0437\u0430\u043c\u0435\u0442\u043d\u043e \u043d\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u043b\u043e\u0441\u044c \u0443\u0436\u0435 \u0433\u043e\u0434\u0430 4.<\/p>\n<p>  <u>\u041f\u0440\u0438\u043c\u0435\u0440<\/u>  <\/p>\n<pre><code class=\"cpp\">CAMP_TYPE(Test)  camp::Class::declare&lt;Test&gt;(&quot;Test&quot;)   .function(&quot;func&quot;, &Test::func);  Test obj; camp::Class t = camp::classByName(&quot;Test&quot;); camp::Function m = t-&gt;function(&quot;func&quot;); camp::Value v = m-&gt;call(obj, camp::Args(1, 2)); auto result = v.to&lt;int&gt;() <\/code><\/pre>\n<p>  <u>Benchmark<\/u> (\u0441\u0431\u0438\u043b\u0434\u0438\u0442\u044c \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c, \u0432\u0437\u044f\u043b \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0441 \u0441\u0430\u0439\u0442\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438)<br \/>   \u2014 Invoke \u2014 <b>6889ms<\/b> &lt; \u2014 \u0441\u043e\u0432\u0441\u0435\u043c \u0433\u0440\u0443\u0441\u0442\u043d\u043e<\/p>\n<h4>3) cpgf<\/h4>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/829\/804\/798\/829804798b337ad70929a716a43d4da6.jpg\" alt=\"image\"\/><br \/>  <a href=\"http:\/\/www.cpgf.org\/document\/index.html\">www.cpgf.org\/document\/index.html<\/a><br \/>  <a href=\"https:\/\/github.com\/cpgf\/cpgf\">github.com\/cpgf\/cpgf<\/a><\/p>\n<p>  \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0430\u0432\u0442\u043e\u0440 \u0432\u0440\u043e\u0434\u0435 \u043a\u0438\u0442\u0430\u0435\u0446. \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u0440\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043e, \u043d\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0443\u0441\u043b\u043e\u0436\u043d\u0435\u043d \u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u043e\u0434 \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u043b\u0430\u043a\u043e\u043d\u0438\u0447\u043d\u043e. \u041c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u0441\u0442\u0430\u0432\u043e\u043a, \u0434\u043e\u0431\u0430\u0432\u043e\u043a \u0432 \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0438, \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432, \u043f\u0440\u0430\u0432\u0438\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u0430\u043a \u0438 \u043a\u043e\u0433\u0434\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u0432\u043b\u0430\u0434\u0435\u043d\u0438\u0435). \u041d\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043d\u0435 \u0432\u0438\u0434\u043d\u043e, \u043d\u043e \u0435\u0441\u043b\u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c tutorial, \u0442\u043e \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0441\u0438\u043b\u044c\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u043d\u043e \u2014 <a href=\"https:\/\/github.com\/cpgf\/cpgf\/blob\/develop\/samples\/tutorials\/a01_reflect_to_global.cpp\">github.com\/cpgf\/cpgf\/blob\/develop\/samples\/tutorials\/a01_reflect_to_global.cpp<\/a><br \/>  \u041f\u0440\u0438 \u044d\u0442\u043e\u043c, \u0432\u0441\u0435 \u0441\u0432\u0435\u0434\u0435\u043d\u043e \u043a \u0435\u0434\u0438\u043d\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0443, \u0447\u0442\u043e \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0440\u0430\u0434\u0443\u0435\u0442.<\/p>\n<p>  \u0411\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u043b\u044e\u0441 \u2014 \u0445\u043e\u0440\u043e\u0448\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f.<\/p>\n<p>  \u0418\u0437 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043d\u0430\u0432\u043e\u0440\u043e\u0442\u043e\u0432 \u2014 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f, \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0431\u0438\u043d\u0434\u0438\u043d\u0433\u0430 \u0432 Lua\/JavaScript\/Python, tweening, \u0441\u0432\u043e\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439.<\/p>\n<p>  \u0411\u0430\u0433\u043e\u0444\u0438\u043a\u0441\u044b \u0431\u044b\u043b\u0438 \u0435\u0449\u0435 \u0432 \u0434\u0435\u043a\u0430\u0431\u0440\u0435, \u0442\u043e \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0435 \u043c\u0435\u0440\u0442\u0432.<\/p>\n<p>  <u>\u041f\u0440\u0438\u043c\u0435\u0440<\/u>  <\/p>\n<pre><code class=\"cpp\">cpgf::GDefineMetaClass&lt;Test&gt;   ::define(&quot;Test&quot;)   ._method(&quot;func&quot;, &CpgfTest::func);  Test obj; cpgf::GMetaClass* t = cpgf::findMetaClass(&quot;Test&quot;); cpgf::GMetaMethod* m = t-&gt;getMethod(&quot;func&quot;); cpgf::GVariant v = m-&gt;invoke(&obj, 1, 2); auto result = cpgf::fromVariant&lt;int&gt;(); <\/code><\/pre>\n<p>  <u>Benchmark<\/u><br \/>   \u2014 Invoke \u2014 <b>1000ms<\/b><br \/>   \u2014 FindMetaMethod+Invoke \u2014 <b>1135ms<\/b> &lt; \u2014 \u0431\u044b\u0441\u0442\u0440\u0435\u0435, \u0447\u0435\u043c luabind<\/p>\n<h4>4) RTTR<\/h4>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/f3e\/c4d\/e03\/f3ec4de03026059f14c90e8f3eb2feae.jpg\" alt=\"image\"\/><br \/>  <a href=\"http:\/\/www.axelmenzel.de\/projects\/coding\/rttr\">www.axelmenzel.de\/projects\/coding\/rttr<\/a><\/p>\n<p>  \u0410\u0432\u0442\u043e\u0440, \u0432\u0440\u043e\u0434\u0435, \u043d\u0435\u043c\u0435\u0446. \u0423\u0440\u0430 \u2014 C++11. \u0410\u043a\u0442\u0438\u0432\u043d\u043e \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441, \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438, \u043e\u0447\u0435\u043d\u044c \u0434\u0430\u0436\u0435 \u0440\u0430\u0434\u0443\u0435\u0442. \u0412 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u043f\u043e\u044f\u0432\u0438\u0442\u044c\u0441\u044f \u043d\u043e\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0441 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433\u043e\u043c.<\/p>\n<p>  \u041d\u043e \u043f\u043e\u043a\u0430, \u0441\u0443\u0434\u044f \u043f\u043e \u043a\u043e\u0434\u0443, \u043c\u043d\u043e\u0433\u043e \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u044f\u043c\u043e\u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0435, \u043e\u0442\u0441\u044e\u0434\u0430 \u0438 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u0443\u0434\u0448\u0438\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>  <u>\u041f\u0440\u0438\u043c\u0435\u0440<\/u>  <\/p>\n<pre><code class=\"cpp\">RTTR_DECLARE_STANDARD_TYPE_VARIANTS(Test);  RTTR_REGISTER {   rttr::class_&lt;Test&gt;()     .method(&quot;func&quot;, &Test::func); }  Test obj; rttr::type t = type::get(&quot;Test&quot;); rttr::method m = t.get_method(&quot;func&quot;); rttr::variant v = m.invoke_variadic(obj, {1, 2}); auto result = v.get_value&lt;int&gt;(); <\/code><\/pre>\n<p>  <u>Benchmark<\/u><br \/>   \u2014 Invoke \u2014 <b>1780ms<\/b><br \/>   \u2014 FindMetaMethod+Invoke \u2014 <b>2290ms<\/b><\/p>\n<h4>5) uMOF<\/h4>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/98d\/ae8\/04c\/98dae804c41e7f3b5dd06505178e15a5.png\" alt=\"image\"\/><br \/>  <a href=\"https:\/\/bitbucket.org\/occash\/umof\">bitbucket.org\/occash\/umof<\/a><\/p>\n<p>  \u0410\u0432\u0442\u043e\u0440 \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e\u0432\u043e\u0440\u044f\u0449\u0438\u0439, \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u043d\u0430 \u0432\u0441\u0435 \u0432\u043e\u043f\u0440\u043e\u0441\u044b. \u0421\u043e\u0437\u0434\u0430\u0432\u0430\u043b\u043e\u0441\u044c, \u043a\u0430\u043a \u044f \u043f\u043e\u043d\u044f\u043b, \u043f\u043e\u0434 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u0435\u043d\u0438\u0435\u043c \u043e\u0442 QT. \u0421\u043d\u043e\u0432\u0430 \u0443\u0440\u0430 \u2014 C++11 (\u0432\u0441\u0435 \u044d\u0442\u0438 constexpr \u0438 \u043f\u0440\u043e\u0447\u0438\u0435 \u0440\u0430\u0434\u043e\u0441\u0442\u0438). \u0410\u043a\u0442\u0438\u0432\u043d\u043e \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u0435\u0442\u0441\u044f. \u0412 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u043f\u043e\u044f\u0432\u0438\u0442\u044c\u0441\u044f \u043d\u043e\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0441 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433\u043e\u043c \u0438 \u0443\u0441\u043a\u043e\u0440\u0435\u043d\u0438\u0435\u043c, \u043e\u043d\u0430 \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043b\u0430\u0441\u044c.<\/p>\n<p>  \u0423\u0441\u043b\u043e\u0432\u043d\u044b\u0439 \u043c\u0438\u043d\u0443\u0441 \u2014 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u0435\u0442\u0430-\u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043d\u0430\u0434\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u043a\u0440\u043e\u0441\u044b, \u043d\u043e \u044d\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 (\u043e\u0431\u044c\u044f\u0441\u043d\u0435\u043d\u043e \u043f\u043e\u0437\u0436\u0435).<\/p>\n<p>  <u>\u041f\u0440\u0438\u043c\u0435\u0440<\/u>  <\/p>\n<pre><code class=\"cpp\">U_DECLARE_API(Test, METHODS); U_DECLARE_METHODS(Test) {   U_METHOD(func) };  const Api* api = U_API(Test)::api(); Method m = api-&gt;method(api-&gt;indexOfMethod(&quot;func(int,int)&quot;)); int result; m.invoke(&obj, result, {1, 2})); <\/code><\/pre>\n<p>  <u>Benchmark<\/u><br \/>   \u2014 Invoke \u2014 <b>115ms<\/b> &lt; \u2014 \u043c\u0430\u0433\u0438\u044f (\u0432 \u0441\u0442\u0430\u0440\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 420, \u0447\u0442\u043e \u0442\u043e\u0436\u0435 \u043d\u0430 \u0433\u043e\u043b\u043e\u0432\u0443 \u0432\u044b\u0448\u0435 \u0434\u0440\u0443\u0433\u0438\u0445)<br \/>   \u2014 FindMetaMethod+Invoke \u2014 <b>1780ms<\/b> &lt; \u2014 \u0443\u0436\u0435 \u043d\u0435 \u0442\u0430\u043a \u0445\u043e\u0440\u043e\u0448\u043e, \u043d\u043e \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0438 \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u043c\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043e<\/p>\n<p>  Invoke \u043f\u043e\u0447\u0442\u0438 \u0432 9 \u0440\u0430\u0437 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0441\u0430\u043c\u043e\u0433\u043e \u043b\u0443\u0447\u0448\u0435\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a.<\/p>\n<p>  \u041f\u0440\u043e \u044d\u0442\u043e \u043f\u0438\u0441\u0430\u043b \u0441\u0430\u043c \u0430\u0432\u0442\u043e\u0440, \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044f \u0441\u0432\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438. \u0421\u0442\u0430\u0442\u044c\u0441\u044f \u0441 \u0433\u0440\u0430\u0444\u0438\u043a\u0430\u043c\u0438 \u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430\u043c\u0438 \u0434\u043b\u044f \u0435\u0449\u0435 \u0441\u0442\u0430\u0440\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0437\u0434\u0435\u0441\u044c \u2014 <a href=\"http:\/\/www.gamedev.net\/page\/resources\/_\/technical\/general-programming\/implementing-a-meta-system-in-c-r3905\">www.gamedev.net\/page\/resources\/_\/technical\/general-programming\/implementing-a-meta-system-in-c-r3905<\/a><br \/>  \u0422\u0430\u043c \u0436\u0435 \u0435\u0441\u0442\u044c \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043a\u0430\u043a\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0432\u043b\u0438\u044f\u044e\u0442 \u043d\u0430 \u0432\u0440\u0435\u043c\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0438 \u043b\u0438\u043d\u043a\u043e\u0432\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0442\u044f\u0436\u0435\u043b\u044f\u044e\u0442 \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a.<\/p>\n<table border=\"1\">\n<caption>\u041e\u0431\u0449\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442<\/caption>\n<tr>\n<td><\/td>\n<td>Luabind<\/td>\n<td>Camp<\/td>\n<td>cpgf<\/td>\n<td>RTTR<\/td>\n<td>uMOF<\/td>\n<\/tr>\n<tr>\n<td>Invoke<\/td>\n<td>1100<\/td>\n<td>6889<\/td>\n<td>1000<\/td>\n<td>1780<\/td>\n<td>115<\/td>\n<\/tr>\n<tr>\n<td>FindMetaMethod+Invoke<\/td>\n<td>1580<\/td>\n<td>x<\/td>\n<td>1135<\/td>\n<td>2290<\/td>\n<td>1780<\/td>\n<\/tr>\n<\/table>\n<h4><b>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/b><\/h4>\n<p>  \u0421\u0430\u043c\u044b\u0435 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043b\u0430\u043a\u043e\u043d\u0438\u0447\u043d\u044b\u0435 \u0438 \u0436\u0438\u0432\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u2014 uMOF, RTTR.<br \/>  \u041d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0431\u043e\u0433\u0430\u0442\u0430\u044f \u043f\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u2014 cpgf.<br \/>  \u0412\u044b\u0434\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u043f\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438:<br \/>   \u2014 uMOF (\u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u043d\u0435\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u044b\u0439 invoke \u0438 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 overhead \u0432 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0438 \u0440\u0430\u0437\u043c\u0435\u0440\u0435 \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a\u0430);<br \/>   \u2014 cpgf (\u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0441\u0430\u043c\u044b\u0439 \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u043e FindMetaMethod+Invoke, \u0447\u0442\u043e \u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0447\u0430\u0441\u0442\u044b\u043c \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f).<\/p>\n<h4>\u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043e\u0431\u0441\u0443\u0436\u0434\u0435\u043d\u0438\u044f<\/h4>\n<p>  1) \u041a\u0430\u043a\u0443\u044e \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0443 \u0438\u0433\u0440 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443?<br \/>  cpgf \u0441\u043e\u043b\u0438\u0434\u043d\u043e \u043f\u0440\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u043d \u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0445\u043e\u0440\u043e\u0448\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b, \u043d\u043e \u0442\u0430\u043a \u043b\u0438 \u0432\u0430\u0436\u0435\u043d \u044d\u0442\u043e\u0442 overhead \u0434\u043b\u044f invoke? \u041c\u043e\u0436\u0435\u0442 \u043e\u0442\u0434\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0442\u0435\u043d\u0438\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0431\u043e\u043b\u0435\u0435 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u043c\u0443 RTTR, \u0442.\u043a. 2290ms \u043d\u0430 10000000 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u044d\u0442\u043e 4366812 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443. 72780 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u043a\u0430\u0434\u0440\u0435 \u043f\u0440\u0438 60 FPS. \u0422\u043e \u0435\u0441\u0442\u044c, \u0435\u0441\u043b\u0438 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u043a\u0430\u0434\u0440\u0435 \u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0440\u044f\u0434\u043a\u0430 700 \u0432\u044b\u0437\u043e\u0432\u043e\u0432, \u0442\u043e \u043f\u0440\u0438 60 FPS \u044d\u0442\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442 \u043c\u0435\u043d\u044c\u0448\u0435 1% \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043a\u0430\u0434\u0440\u0430.<br \/>  \u041f\u0440\u0438 \u044d\u0442\u043e\u043c uMOF \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0432\u044b\u0434\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u043e \u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0441 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0442\u0435\u043d\u0441\u0438\u0432\u043d\u043e\u0441\u0442\u044c\u044e (\u0447\u0442\u043e \u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0441\u044f). \u041d\u043e \u043e\u043d \u0435\u0449\u0435 \u043d\u0435 \u0437\u0430\u043a\u043e\u043d\u0447\u0435\u043d, \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430.<br \/>  2) \u041c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c, \u043a\u0430\u043a\u0430\u044f-\u0442\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043f\u0440\u043e\u043f\u0443\u0449\u0435\u043d\u0430? \u041c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0435\u0435 \u0432 \u043e\u0431\u0437\u043e\u0440.<br \/>  3) \u0427\u0442\u043e \u0432\u044b \u0437\u043d\u0430\u0435\u0442\u0435 \u0438\u0437 \u0441\u0432\u043e\u0435\u0433\u043e \u043e\u043f\u044b\u0442\u0430 \u043f\u0440\u043e \u043b\u044e\u0431\u0443\u044e \u0438\u0437 \u044d\u0442\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a? \u0417\u0434\u0435\u0441\u044c \u043e\u0431\u0437\u043e\u0440 \u0431\u044b\u043b \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u043d\u044b\u0439, \u043c\u043e\u0436\u0435\u0442 \u0432\u0430\u0448 \u043e\u043f\u044b\u0442 \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u043a\u0430\u043a\u0438\u0445-\u0442\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044f\u0445 \u0432 \u043f\u043e\u043b\u044c\u0437\u0443 \u0438\u043b\u0438 \u043f\u0440\u043e\u0442\u0438\u0432 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438.<\/p>\n<p>  \u0417\u0430\u0440\u0430\u043d\u0435\u0435 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0441\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u0430\u0448\u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438. \t\t\t<\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/257071\/\"> http:\/\/habrahabr.ru\/post\/257071\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p> \t\t\t\u0412 \u0441\u0438\u043b\u0443 \u0441\u043a\u0440\u043e\u043c\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043d\u0430 \u044d\u0442\u0443 \u0442\u0435\u043c\u0443, \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043f\u0440\u043e\u0432\u0435\u0434\u0443 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043e\u0431\u0437\u043e\u0440 \u0438 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0434\u043b\u044f Reflection \u0432 C++. \u0412 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u044d\u0442\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u0438\u0433\u0440.<\/p>\n<p>  \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f reflection \u043c\u043e\u0436\u043d\u043e:<br \/>   \u2014 \u041b\u0435\u0433\u043a\u043e \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u044b, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432, \u0442\u0430\u043a \u043a\u0430\u043a \u0435\u0441\u0442\u044c \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043c\u0435\u0442\u0430-\u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u0432\u0441\u0435\u0445 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u0445 \u0432\u0430\u0448\u0438\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432;<br \/>   \u2014 \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c binding \u0434\u043b\u044f \u043c\u043d\u043e\u0433\u0438\u0445 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432\u044b\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 \u0441\u0440\u0430\u0437\u0443 (Lua, Python, JavaScript, &#8230;;<br \/>   \u2014 \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0442\u0430-\u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438;<br \/>   \u2014 \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0444\u0430\u0431\u0440\u0438\u043a\u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u044f \u043d\u0443\u0436\u043d\u044b\u0435 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u044b, \u0438\u043c\u0435\u044f \u043b\u0438\u0448\u044c \u0441\u0442\u0440\u043e\u043a\u0443 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u0442\u0438\u043f;<br \/>   \u2014 \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u043e\u043b\u0435\u0435 \u043b\u0435\u0433\u043a\u043e\u0432\u0435\u0441\u043d\u043e\u0439 \u0437\u0430\u043c\u0435\u043d\u044b dynamic_cast;<br \/>   \u2014 \u041d\u0435\u0443\u0436\u0435\u043b\u0438 \u044d\u0442\u043e\u0433\u043e \u043c\u0430\u043b\u043e?  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-256416","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/256416","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=256416"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/256416\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=256416"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=256416"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=256416"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}