{"id":359,"date":"2020-11-03T12:01:42","date_gmt":"2020-11-03T16:01:42","guid":{"rendered":"http:\/\/www.prglab.com\/blog\/?page_id=359"},"modified":"2020-11-03T12:01:42","modified_gmt":"2020-11-03T16:01:42","slug":"polymorphism","status":"publish","type":"page","link":"https:\/\/www.prglab.com\/blog\/cplusplus-tutorial\/object-oriented\/polymorphism","title":{"rendered":"\u591a\u6001"},"content":{"rendered":"\n<h2>4.4 \u591a\u6001 (Polymorphism)<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>\u4e3a\u4e86\u80fd\u66f4\u597d\u7684\u7406\u89e3\u672c\u8282\u5185\u5bb9\uff0c\u4f60\u9700\u8981\u6e05\u695a\u7684\u77e5\u9053\u600e\u6837\u4f7f\u7528\u6307\u9488pointers \u548c\u7c7b\u4e4b\u95f4\u7684\u7ee7\u627f inheritance between classes\u3002\u5efa\u8bae\u5982\u679c\u4f60\u89c9\u5f97\u4ee5\u4e0b\u8fd9\u4e9b\u8868\u8fbe\u5f0f\u6bd4\u8f83\u751f\u758f\u7684\u7684\u8bdd\uff0c \u8bf7\u590d\u4e60\u6307\u5b9a\u7684\u7ae0\u8282\uff1aint a::b(c) {}; \/\/ \u7c7bClasses <a href=\"http:\/\/www.prglab.com\/cms\/pages\/c-tutorial\/oo-programming\/classes.php\">(Section 4.1)<\/a>a-&gt;b \/\/ \u6307\u9488\u548c\u5bf9\u8c61pointers and objects <a href=\"http:\/\/www.prglab.com\/cms\/pages\/c-tutorial\/oo-programming\/overloading-operators.php\">(Section 4.2)<\/a>class a: public b; \/\/ \u7c7b\u4e4b\u95f4\u7684\u5173\u7cfbRelationships between classes <a href=\"http:\/\/www.prglab.com\/cms\/pages\/c-tutorial\/oo-programming\/relationships-between-classes.php\">(Section 4.3)<\/a><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3>\u57fa\u7c7b\u7684\u6307\u9488(Pointers to base class)<\/h3>\n\n\n\n<p>\u7ee7\u627f\u7684\u597d\u5904\u4e4b\u4e00\u662f<strong><u>\u4e00\u4e2a\u6307\u5411\u5b50\u7c7b(derived class)\u7684\u6307\u9488\u4e0e\u4e00\u4e2a\u6307\u5411\u57fa\u7c7b(base class)\u7684\u6307\u9488\u662ftype-compatible\u7684\u3002<\/u><\/strong>&nbsp;\u672c\u8282\u5c31\u662f\u91cd\u70b9\u4ecb\u7ecd\u5982\u4f55\u5229\u7528C++\u7684\u8fd9\u4e00\u91cd\u8981\u7279\u6027\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u5c06\u7ed3\u5408C++\u7684\u8fd9\u4e2a\u529f\u80fd\uff0c\u91cd\u5199\u524d\u9762\u5c0f\u8282\u4e2d\u5173\u4e8e\u957f\u65b9\u5f62rectangle \u548c\u4e09\u89d2\u5f62 triangle \u7684\u7a0b\u5e8f\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>\/\/ pointers to base class#include &lt;iostream.h&gt; class CPolygon { protected: int width, height; public: void set_values (int a, int b) { width=a; height=b; } }; class CRectangle: public CPolygon { public: int area (void) { return (width * height); } }; class CTriangle: public CPolygon { public: int area (void) { return (width * height \/ 2); } }; int main () { CRectangle rect; CTriangle trgl; CPolygon * ppoly1 = &amp;rect; CPolygon * ppoly2 = &amp;trgl; ppoly1-&gt;set_values (4,5); ppoly2-&gt;set_values (4,5); cout &lt;&lt; rect.area() &lt;&lt; endl; cout &lt;&lt; trgl.area() &lt;&lt; endl; return 0; }<\/td><td>20<br>10<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u5728\u4e3b\u51fd\u6570 main \u4e2d\u5b9a\u4e49\u4e86\u4e24\u4e2a\u6307\u5411class CPolygon\u7684\u5bf9\u8c61\u7684\u6307\u9488\uff0c\u5373 *ppoly1 \u548c *ppoly2\u3002 \u5b83\u4eec\u88ab\u8d4b\u503c\u4e3arect \u548c trgl\u7684\u5730\u5740\uff0c\u56e0\u4e3arect \u548c trgl\u662fCPolygon \u7684\u5b50\u7c7b\u7684\u5bf9\u8c61\uff0c\u56e0\u6b64\u8fd9\u79cd\u8d4b\u503c\u662f\u6709\u6548\u7684\u3002<\/p>\n\n\n\n<p>\u4f7f\u7528*ppoly1 \u548c *ppoly2 \u53d6\u4ee3rect \u548ctrgl \u7684\u552f\u4e00\u9650\u5236\u662f*ppoly1 \u548c *ppoly2 \u662fCPolygon* \u7c7b\u578b\u7684\uff0c\u56e0\u6b64\u6211\u4eec\u53ea\u80fd\u591f\u5f15\u7528CRectangle \u548c CTriangle \u4ece\u57fa\u7c7bCPolygon\u4e2d\u7ee7\u627f\u7684\u6210\u5458\u3002\u6b63\u662f\u7531\u4e8e\u8fd9\u4e2a\u539f\u56e0\uff0c\u6211\u4eec\u4e0d\u80fd\u591f\u4f7f\u7528*ppoly1 \u548c *ppoly2 \u6765\u8c03\u7528\u6210\u5458\u51fd\u6570 area()\uff0c\u800c\u53ea\u80fd\u4f7f\u7528rect \u548c trgl\u6765\u8c03\u7528\u8fd9\u4e2a\u51fd\u6570\u3002<\/p>\n\n\n\n<p>\u8981\u60f3\u4f7fCPolygon \u7684\u6307\u9488\u627f\u8ba4area()\u4e3a\u5408\u6cd5\u6210\u5458\u51fd\u6570\uff0c\u5fc5\u987b\u5728\u57fa\u7c7b\u4e2d\u58f0\u660e\u5b83\uff0c\u800c\u4e0d\u80fd\u53ea\u5728\u5b50\u7c7b\u8fdb\u884c\u58f0\u660e(\u89c1\u4e0b\u4e00\u5c0f\u8282)\u3002<\/p>\n\n\n\n<h3>\u865a\u62df\u6210\u5458(Virtual members)<\/h3>\n\n\n\n<p>\u5982\u679c\u60f3\u5728\u57fa\u7c7b\u4e2d\u5b9a\u4e49\u4e00\u4e2a\u6210\u5458\u7559\u5f85\u5b50\u7c7b\u4e2d\u8fdb\u884c\u7ec6\u5316\uff0c\u6211\u4eec\u5fc5\u987b\u5728\u5b83\u524d\u9762\u52a0\u5173\u952e\u5b57virtual \uff0c\u4ee5\u4fbf\u53ef\u4ee5\u4f7f\u7528\u6307\u9488\u5bf9\u6307\u5411\u76f8\u5e94\u7684\u5bf9\u8c61\u8fdb\u884c\u64cd\u4f5c\u3002<\/p>\n\n\n\n<p>\u8bf7\u770b\u4e00\u4e0b\u4f8b\u5b50\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>\/\/ virtual members#include &lt;iostream.h&gt; class CPolygon { protected: int width, height; public: void set_values (int a, int b) { width=a; height=b; } virtual int area (void) { return (0); } }; class CRectangle: public CPolygon { public: int area (void) { return (width * height); } }; class CTriangle: public CPolygon { public: int area (void) { return (width * height \/ 2); } }; int main () { CRectangle rect; CTriangle trgl; CPolygon poly; CPolygon * ppoly1 = &amp;rect; CPolygon * ppoly2 = &amp;trgl; CPolygon * ppoly3 = &amp;poly; ppoly1-&gt;set_values (4,5); ppoly2-&gt;set_values (4,5); ppoly3-&gt;set_values (4,5); cout &lt;&lt; ppoly1-&gt;area() &lt;&lt; endl; cout &lt;&lt; ppoly2-&gt;area() &lt;&lt; endl; cout &lt;&lt; ppoly3-&gt;area() &lt;&lt; endl; return 0; }<\/td><td>20<br>10<br>0<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u73b0\u5728\u8fd9\u4e09\u4e2a\u7c7b(CPolygon, CRectangle \u548c CTriangle) \u90fd\u6709\u540c\u6837\u7684\u6210\u5458\uff1awidth, height, set_values() \u548c area()\u3002<\/p>\n\n\n\n<p>area() \u88ab\u5b9a\u4e49\u4e3avirtual \u662f\u56e0\u4e3a\u5b83\u540e\u6765\u5728\u5b50\u7c7b\u4e2d\u88ab\u7ec6\u5316\u4e86\u3002\u4f60\u53ef\u4ee5\u505a\u4e00\u4e2a\u8bd5\u9a8c\uff0c\u5982\u679c\u5728\u4ee3\u7801\u79cd\u53bb\u6389\u8fd9\u4e2a\u5173\u952e\u5b57(virtual)\uff0c\u7136\u540e\u518d\u6267\u884c\u8fd9\u4e2a\u7a0b\u5e8f\uff0c\u4e09\u4e2a\u591a\u8fb9\u5f62\u7684\u9762\u79ef\u8ba1\u7b97\u7ed3\u679c\u90fd\u5c06\u662f 0 \u800c\u4e0d\u662f20,10,0\u3002\u8fd9\u662f\u56e0\u4e3a\u6ca1\u6709\u4e86\u5173\u952e\u5b57virtual \uff0c\u7a0b\u5e8f\u6267\u884c\u4e0d\u518d\u6839\u636e\u5b9e\u9645\u5bf9\u8c61\u7684\u4e0d\u7528\u800c\u8c03\u7528\u76f8\u5e94area() \u51fd\u6570(\u5373\u5206\u522b\u4e3aCRectangle::area(), CTriangle::area() \u548c CPolygon::area())\uff0c\u53d6\u800c\u4ee3\u4e4b\uff0c\u7a0b\u5e8f\u5c06\u5168\u90e8\u8c03\u7528CPolygon::area()\uff0c\u56e0\u4e3a\u8fd9\u4e9b\u8c03\u7528\u662f\u901a\u8fc7CPolygon\u7c7b\u578b\u7684\u6307\u9488\u8fdb\u884c\u7684\u3002<\/p>\n\n\n\n<p>\u56e0\u6b64\uff0c\u5173\u952e\u5b57virtual \u7684\u4f5c\u7528\u5c31\u662f\u5728\u5f53\u4f7f\u7528\u57fa\u7c7b\u7684\u6307\u9488\u7684\u65f6\u5019\uff0c\u4f7f\u5b50\u7c7b\u4e2d\u4e0e\u57fa\u7c7b\u540c\u540d\u7684\u6210\u5458\u5728\u9002\u5f53\u7684\u65f6\u5019\u88ab\u8c03\u7528\uff0c\u5982\u524d\u9762\u4f8b\u5b50\u4e2d\u6240\u793a\u3002<\/p>\n\n\n\n<p><strong>\u6ce8\u610f<\/strong>\uff0c\u867d\u7136\u672c\u8eab\u88ab\u5b9a\u4e49\u4e3a\u865a\u62df\u7c7b\u578b\uff0c\u6211\u4eec\u8fd8\u662f\u53ef\u4ee5\u58f0\u660e\u4e00\u4e2aCPolygon \u7c7b\u578b\u7684\u5bf9\u8c61\u5e76\u8c03\u7528\u5b83\u7684area() \u51fd\u6570\uff0c\u5b83\u5c06\u8fd4\u56de0 \uff0c\u5982\u524d\u9762\u4f8b\u5b50\u7ed3\u679c\u6240\u793a\u3002<\/p>\n\n\n\n<h3>\u62bd\u8c61\u57fa\u7c7b(Abstract base classes)<\/h3>\n\n\n\n<p>\u57fa\u672c\u7684\u62bd\u8c61\u7c7b\u4e0e\u6211\u4eec\u524d\u9762\u4f8b\u5b50\u4e2d\u7684\u7c7bCPolygon \u975e\u5e38\u76f8\u4f3c\uff0c\u552f\u4e00\u7684\u533a\u522b\u662f\u5728\u6211\u4eec\u524d\u9762\u7684\u4f8b\u5b50\u4e2d\uff0c\u6211\u4eec\u5df2\u7ecf\u4e3a\u7c7bCPolygon\u7684\u5bf9\u8c61\uff08\u4f8b\u5982\u5bf9\u8c61poly\uff09\u5b9a\u4e49\u4e86\u4e00\u4e2a\u6709\u6548\u5730area()\u51fd\u6570\uff0c\u800c\u5728\u4e00\u4e2a\u62bd\u8c61\u7c7b\uff08abstract base class\uff09\u4e2d\uff0c\u6211\u4eec\u53ef\u4ee5\u5bf9\u5b83\u4e0d\u5b9a\u4e49\uff0c\u800c\u7b80\u5355\u5f97\u5728\u51fd\u6570\u58f0\u660e\u540e\u9762\u5199 =0 (\u7b49\u4e8e0)\u3002<\/p>\n\n\n\n<p>\u7c7bCPolygon \u53ef\u4ee5\u5199\u6210\u8fd9\u6837\uff1a\/\/ abstract class CPolygon<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">class CPolygon {\n    protected:\n        int width, height;\n    public:\n        void set_values (int a, int b) {\n            width=a;\n            height=b;\n        }\n        virtual int area (void) =0;\n};<\/pre>\n\n\n\n<p>\u6ce8\u610f\u6211\u4eec\u662f\u5982\u4f55\u5728virtual int area (void)\u52a0\u3000=0 \u6765\u4ee3\u66ff\u51fd\u6570\u7684\u5177\u4f53\u5b9e\u73b0\u7684\u3002\u8fd9\u79cd\u51fd\u6570\u88ab\u79f0\u4e3a\u7eaf\u865a\u62df\u51fd\u6570\uff08pure virtual function\uff09\uff0c\u800c\u6240\u6709\u5305\u542b\u7eaf\u865a\u62df\u51fd\u6570\u7684\u7c7b\u88ab\u79f0\u4e3a\u62bd\u8c61\u57fa\u7c7b(abstract base classes)\u3002<\/p>\n\n\n\n<p>\u62bd\u8c61\u57fa\u7c7b\u7684\u6700\u5927\u4e0d\u540c\u662f\u5b83\u4e0d\u80fd\u591f\u6709\u5b9e\u4f8b(\u5bf9\u8c61)\uff0c\u4f46\u6211\u4eec\u53ef\u4ee5\u5b9a\u4e49\u6307\u5411\u5b83\u7684\u6307\u9488\u3002\u56e0\u6b64\uff0c\u50cf\u8fd9\u6837\u7684\u58f0\u660e\uff1a<\/p>\n\n\n\n<p><code>CPolygon poly;<\/code><\/p>\n\n\n\n<p>\u5bf9\u4e8e\u524d\u9762\u5b9a\u4e49\u7684\u62bd\u8c61\u57fa\u7c7b\u662f\u4e0d\u5408\u6cd5\u7684\u3002<\/p>\n\n\n\n<p>\u7136\u800c\uff0c\u6307\u9488\uff1a<\/p>\n\n\n\n<p><code>CPolygon * ppoly1;<br>CPolygon * ppoly2<\/code><\/p>\n\n\n\n<p>\u662f\u5b8c\u5168\u5408\u6cd5\u7684\u3002\u8fd9\u662f\u56e0\u4e3a\u8be5\u7c7b\u5305\u542b\u7684\u7eaf\u865a\u62df\u51fd\u6570(pure virtual function) \u662f\u6ca1\u6709\u88ab\u5b9e\u73b0\u7684\uff0c\u800c\u53c8\u4e0d\u53ef\u80fd\u751f\u6210\u4e00\u4e2a\u4e0d\u5305\u542b\u5b83\u7684\u6240\u6709\u6210\u5458\u5b9a\u4e49\u7684\u5bf9\u8c61\u3002\u7136\u800c\uff0c\u56e0\u4e3a\u8fd9\u4e2a\u51fd\u6570\u5728\u5176\u5b50\u7c7b\u4e2d\u88ab\u5b8c\u6574\u7684\u5b9a\u4e49\u4e86\uff0c\u6240\u4ee5\u751f\u6210\u4e00\u4e2a\u6307\u5411\u5176\u5b50\u7c7b\u7684\u5bf9\u8c61\u7684\u6307\u9488\u662f\u5b8c\u5168\u5408\u6cd5\u7684\u3002<\/p>\n\n\n\n<p>\u4e0b\u9762\u662f\u5b8c\u6574\u7684\u4f8b\u5b50\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>\/\/ virtual members#include &lt;iostream.h&gt; class CPolygon { protected: int width, height; public: void set_values (int a, int b) { width=a; height=b; } virtual int area (void) =0; }; class CRectangle: public CPolygon { public: int area (void) { return (width * height); } }; class CTriangle: public CPolygon { public: int area (void) { return (width * height \/ 2); } }; int main () { CRectangle rect; CTriangle trgl; CPolygon * ppoly1 = &amp;rect; CPolygon * ppoly2 = &amp;trgl; ppoly1-&gt;set_values (4,5); ppoly2-&gt;set_values (4,5); cout &lt;&lt; ppoly1-&gt;area() &lt;&lt; endl; cout &lt;&lt; ppoly2-&gt;area() &lt;&lt; endl; return 0; }<\/td><td>20<br>10<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u518d\u770b\u4e00\u904d\u8fd9\u6bb5\u7a0b\u5e8f\uff0c\u4f60\u4f1a\u53d1\u73b0\u6211\u4eec\u53ef\u4ee5\u7528\u540c\u4e00\u79cd\u7c7b\u578b\u7684\u6307\u9488(CPolygon*)\u6307\u5411\u4e0d\u540c\u7c7b\u7684\u5bf9\u8c61\uff0c\u81f3\u4e00\u70b9\u975e\u5e38\u6709\u7528\u3002 \u60f3\u8c61\u4e00\u4e0b\uff0c\u73b0\u5728\u6211\u4eec\u53ef\u4ee5\u5199\u4e00\u4e2aCPolygon \u7684\u6210\u5458\u51fd\u6570\uff0c\u4f7f\u5f97\u5b83\u53ef\u4ee5\u5c06\u51fd\u6570area()\u7684\u7ed3\u679c\u6253\u5370\u5230\u5c4f\u5e55\u4e0a\uff0c\u800c\u4e0d\u5fc5\u8003\u8651\u5177\u4f53\u662f\u4e3a\u54ea\u4e00\u4e2a\u5b50\u7c7b\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>\/\/ virtual members#include &lt;iostream.h&gt; class CPolygon { protected: int width, height; public: void set_values (int a, int b) { width=a; height=b; } virtual int area (void) =0; void printarea (void) { cout &lt;&lt; this-&gt;area() &lt;&lt; endl; } }; class CRectangle: public CPolygon { public: int area (void) { return (width * height); } }; class CTriangle: public CPolygon { public: int area (void) { return (width * height \/ 2); } }; int main () { CRectangle rect; CTriangle trgl; CPolygon * ppoly1 = &amp;rect; CPolygon * ppoly2 = &amp;trgl; ppoly1-&gt;set_values (4,5); ppoly2-&gt;set_values (4,5); ppoly1-&gt;printarea(); ppoly2-&gt;printarea(); return 0; }<\/td><td>20<br>10<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u8bb0\u4f4f\uff0cthis \u4ee3\u8868\u4ee3\u7801\u6b63\u5728\u88ab\u6267\u884c\u7684\u8fd9\u4e00\u4e2a\u5bf9\u8c61\u7684\u6307\u9488\u3002<\/p>\n\n\n\n<p>\u62bd\u8c61\u7c7b\u548c\u865a\u62df\u6210\u5458\u8d4b\u4e88\u4e86C++ \u591a\u6001(polymorphic)\u7684\u7279\u5f81\uff0c\u4f7f\u5f97\u9762\u5411\u5bf9\u8c61\u7684\u7f16\u7a0bobject-oriented programming\u6210\u4e3a\u4e00\u4e2a\u6709\u7528\u7684\u5de5\u5177\u3002\u8fd9\u91cc\u53ea\u662f\u5c55\u793a\u4e86\u8fd9\u4e9b\u529f\u80fd\u6700\u7b80\u5355\u7684\u7528\u9014\u3002\u60f3\u8c61\u4e00\u4e0b\u5982\u679c\u5728\u5bf9\u8c61\u6570\u7ec4\u6216\u52a8\u6001\u5206\u914d\u7684\u5bf9\u8c61\u4e0a\u4f7f\u7528\u8fd9\u4e9b\u529f\u80fd\uff0c\u5c06\u4f1a\u8282\u7701\u591a\u5c11\u9ebb\u70e6\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>4.4 \u591a\u6001 (Polymorphism) \u4e3a\u4e86\u80fd\u66f4\u597d\u7684\u7406\u89e3\u672c\u8282\u5185\u5bb9\uff0c\u4f60\u9700\u8981\u6e05\u695a\u7684\u77e5\u9053\u600e\u6837\u4f7f\u7528\u6307\u9488pointers \u548c\u7c7b\u4e4b\u95f4\u7684\u7ee7\u627f inheritance between classes\u3002\u5efa\u8bae\u5982\u679c\u4f60\u89c9\u5f97\u4ee5\u4e0b\u8fd9\u4e9b\u8868\u8fbe\u5f0f\u6bd4\u8f83\u751f\u758f\u7684\u7684\u8bdd\uff0c \u8bf7\u590d\u4e60\u6307\u5b9a\u7684\u7ae0\u8282\uff1aint a::b(c) {}; \/\/ \u7c7bClasses (Section 4.1)a-&gt;b \/\/ \u6307\u9488\u548c\u5bf9\u8c61pointers and objects (Section 4.2)class a: public b; \/\/ \u7c7b\u4e4b\u95f4\u7684\u5173\u7cfbRelationships between classes (Section 4.3) \u57fa\u7c7b\u7684\u6307\u9488(Pointers to base class) \u7ee7\u627f\u7684\u597d\u5904\u4e4b\u4e00\u662f\u4e00\u4e2a\u6307\u5411\u5b50\u7c7b(derived class)\u7684\u6307\u9488\u4e0e\u4e00\u4e2a\u6307\u5411\u57fa\u7c7b(base class)\u7684\u6307\u9488\u662ftype-compatible\u7684\u3002&nbsp;\u672c\u8282\u5c31\u662f\u91cd\u70b9\u4ecb\u7ecd\u5982\u4f55\u5229\u7528C++\u7684\u8fd9\u4e00\u91cd\u8981\u7279\u6027\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u5c06\u7ed3\u5408C++\u7684\u8fd9\u4e2a\u529f\u80fd\uff0c\u91cd\u5199\u524d\u9762\u5c0f\u8282\u4e2d\u5173\u4e8e\u957f\u65b9\u5f62rectangle \u548c\u4e09\u89d2\u5f62 triangle \u7684\u7a0b\u5e8f\uff1a \/\/ pointers to base class#include &lt;iostream.h&gt; class CPolygon { protected: int width, height; public: void [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":351,"menu_order":3,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/www.prglab.com\/blog\/wp-json\/wp\/v2\/pages\/359"}],"collection":[{"href":"https:\/\/www.prglab.com\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.prglab.com\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.prglab.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.prglab.com\/blog\/wp-json\/wp\/v2\/comments?post=359"}],"version-history":[{"count":1,"href":"https:\/\/www.prglab.com\/blog\/wp-json\/wp\/v2\/pages\/359\/revisions"}],"predecessor-version":[{"id":360,"href":"https:\/\/www.prglab.com\/blog\/wp-json\/wp\/v2\/pages\/359\/revisions\/360"}],"up":[{"embeddable":true,"href":"https:\/\/www.prglab.com\/blog\/wp-json\/wp\/v2\/pages\/351"}],"wp:attachment":[{"href":"https:\/\/www.prglab.com\/blog\/wp-json\/wp\/v2\/media?parent=359"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}