{"id":8092,"date":"2016-09-06T09:00:17","date_gmt":"2016-09-06T00:00:17","guid":{"rendered":"http:\/\/www.moonmile.net\/blog\/?p=8092"},"modified":"2016-09-06T10:21:42","modified_gmt":"2016-09-06T01:21:42","slug":"%e3%82%a2%e3%83%aa%e3%82%b9%e3%81%af%e3%83%aa%e3%83%95%e3%83%ac%e3%82%af%e3%82%b7%e3%83%a7%e3%83%b3%e3%81%8c%e3%81%8a%e5%ab%8c%e3%81%84","status":"publish","type":"post","link":"http:\/\/www.moonmile.net\/blog\/archives\/8092","title":{"rendered":"\u30a2\u30ea\u30b9\u306f\u30ea\u30d5\u30ec\u30af\u30b7\u30e7\u30f3\u304c\u304a\u5acc\u3044"},"content":{"rendered":"<p>\n\u9577\u5e74\u4f7f\u3063\u3066\u3044\u305f Perl+C# \u306e WordPress \u6295\u7a3f\u30c4\u30fc\u30eb\u3092\u3001.net core \u3092\u6a5f\u4f1a\u306b F# \u306b\u76f4\u305d\u3046\u3068\u3057\u3066\u3044\u308b\u9014\u4e2d\u306a\u306e\u3067\u3059\u304c\u3001\u305d\u306e\u306a\u304b\u3067\u3075\u3068\u3001\u30ea\u30d5\u30ec\u30af\u30b7\u30e7\u30f3\u3092\u4f7f\u308f\u305a\u306b XML-RPC \u3092\u5b9f\u88c5\u3059\u308b\u306e\u306f\u3055\u305e\u3057\u3093\u3069\u3044\u3053\u3068\u3067\u306f\u306a\u3044\u304b\uff1f<br \/>\n\u3068\u3044\u3046\u3053\u3068\u306b\u601d\u3044\u81f3\u308a\u307e\u3057\u305f\u3002\u3044\u3084\u3001\u3082\u3068\u3082\u3068\u4f7f\u3063\u3066\u3044\u305f XMLRPC.NET \u306f\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u5f62\u5f0f\u306a\u306e\u3067\u3042\u308c\u3053\u308c\u3068\u3084\u3084\u3053\u3057\u304f\u306a\u3063\u3066\u3044\u308b\u3093\u3067\u3059\u3088\u306d\u3002\u305d\u306e\u3042\u305f\u308a\u3067\u4f7f\u3044\u52dd\u624b\u304c\u60aa\u304f\u306a\u3063\u3066\u3057\u307e\u3063\u3066\u3044\u308b\u306e\u3068\u3001\u30b9\u30c8\u30ec\u30b9\u767a\u6563\u306e\u306e\u305f\u3081\u306b\u3082 F# \u3067\u66f8\u304d\u76f4\u3057\u3092\u3057\u3066\u3044\u307e\u3059\u3002\n<\/p>\n<p>\n\u5b9f\u306f\u3001MVC\u30d1\u30bf\u30fc\u30f3\u306eController\u306e\u547c\u3073\u51fa\u3057\u306b\u3082\u30ea\u30d5\u30ec\u30af\u30b7\u30e7\u30f3\u304c\u4f7f\u308f\u308c\u307e\u3059\u3002\u30d6\u30e9\u30a6\u30b6\u304b\u3089\u547c\u3073\u51fa\u3055\u308c\u305fURL\u30a2\u30c9\u30ec\u30b9\u304b\u3089Action\u30e1\u30bd\u30c3\u30c9\u306e\u547c\u3073\u51fa\u3057\u304c\u305d\u308c\u3067\u3001Controller\u30af\u30e9\u30b9\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u3042\u3089\u304b\u3058\u3081\u767b\u9332\u3057\u3066\u3044\u308b\u306e\u3067\u306f\u306a\u304f\u3066\u3001\u5b9f\u884c\u6642\u306b\u30e1\u30bd\u30c3\u30c9\u3092\u63a2\u3057\u307e\u3059\u3002ASP.NET MVC \u3060\u3068\u3044\u3061\u3044\u3061\u30b3\u30f3\u30d1\u30a4\u30eb\u3092\u3057\u306a\u3044\u3068\u99c4\u76ee\u3060\u3051\u3069\u3001CakePHP\u306e\u3088\u3046\u306a\u30d1\u30bf\u30fc\u30f3\u3060\u3068\u52d5\u7684\u8a00\u8a9e\u306a\u306e\u3067\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u76f4\u63a5\u4fee\u6b63\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\n<\/p>\n<p>\n\u305d\u3093\u306a\u308f\u3051\u3067\u3001XML-RPC \u3060\u3068\n<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\nclass Prada\r\n{\r\n    public int Style { get; set; }\r\n    public string Color { get; set; }\r\n}\r\n\r\n<\/pre>\n<p>\n\u306a\u30af\u30e9\u30b9\u3092\n<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;struct&gt;\r\n  &lt;member&gt;\r\n    &lt;name&gt;Style&lt;\/name&gt;\r\n    &lt;value&gt;\r\n      &lt;int&gt;10&lt;\/int&gt;\r\n    &lt;\/value&gt;\r\n  &lt;\/member&gt;\r\n  &lt;member&gt;\r\n    &lt;name&gt;Color&lt;\/name&gt;\r\n    &lt;value&gt;\r\n      &lt;string&gt;Pink&lt;\/string&gt;\r\n    &lt;\/value&gt;\r\n  &lt;\/member&gt;\r\n&lt;\/struct&gt;\r\n<\/pre>\n<p>\n\u306a\u98a8\u306bXML\u5f62\u5f0f\u306b\u76f4\u3057\u307e\u3059\u3002\u5b9f\u969b\u306fmethodCall\u8981\u7d20\u304c\u3042\u3063\u305f\u308a\u3001\u4eca\u3060\u3063\u305f\u3089JSON\u5f62\u5f0f\u306e\u307b\u3046\u304c\u697d\u3060\u308d\u3046\u3063\u3066\u3053\u3068\u306a\u3093\u3067\u3059\u304c\u3001Wordpress\u306bXMLRPC\u3067\u6295\u7a3f\u3059\u308b\u3068\u697d\u306a\u306e\u3067\u81ea\u4f5c\u30c4\u30fc\u30eb\u3092\u4f5c\u3063\u3066\u4f7f\u3063\u3066\u3044\u307e\u3059\u3002\n<\/p>\n<p><h2>\u30ea\u30d5\u30ec\u30af\u30b7\u30e7\u30f3\u3092\u4f7f\u3046<\/h2>\n<\/p>\n<p>\n\u3058\u3083\u3042 C# \u3067XML\u5f62\u5f0f\u306b\u76f4\u3059\u3053\u3068\u3092\u8003\u3048\u308b\u3068\u3001Prada\u30af\u30e9\u30b9\u306eStyle\u30d7\u30ed\u30d1\u30c6\u30a3\u3068Color\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u3069\u3046\u306b\u304b\u3057\u3066\u6301\u3063\u3066\u3053\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u306e\u3067\u3001\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u5217\u6319\u3059\u308b\u30ea\u30d5\u30ec\u30af\u30b7\u30e7\u30f3\u3092\u4f7f\u3048\u3070\u3044\u3044\u3093\u3060\u306d\u3001\u3068\u3044\u3046\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002\n<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\nusing System.Reflection;\r\n\r\npublic void TestMethod1()\r\n{\r\n    var m = new Prada { Style = 10, Color = &quot;Pink&quot; };\r\n    var ti = m.GetType().GetTypeInfo();\r\n    var plist = ti.DeclaredProperties;\r\n    foreach (var prop in plist)\r\n    {\r\n        var n = prop.Name;\r\n        var v = prop.GetValue(m);\r\n        Debug.WriteLine($&quot;prop: {n} value: {v}&quot;);\r\n    }\r\n}\r\n<\/pre>\n<p>\n\u3053\u3093\u306a\u98a8\u306b\u3001GetTypeInfo\u30e1\u30bd\u30c3\u30c9\u3067\u30af\u30e9\u30b9\u60c5\u5831\u3092\u53d6\u3063\u3066\u304d\u3066\u3001DeclaredProperties\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u3067\u30d7\u30ed\u30d1\u30c6\u30a3\u306e\u4e00\u89a7\u3092\u53d6\u5f97\u3001\u305d\u306e\u5f8c\u3067\u540d\u524d\u3068\u5024\u3092\u53d6\u3063\u3066\u304d\u307e\u3059\u3002GetValue\u30e1\u30bd\u30c3\u30c9\u3067\u53d6\u3063\u3066\u304d\u305f\u3082\u306e\u306f object \u578b\u306a\u306e\u3067\u3001\u5b9f\u969b\u306b\u5229\u7528\u3059\u308b\u3068\u304d\u306f\u5143\u306e\u578b\u306b\u623b\u3055\u306a\u3044\u3068\u3044\u3051\u307e\u305b\u3093\u3002\u578b\u81ea\u4f53\u306f\u3001PropertyType \u30d7\u30ed\u30d1\u30c6\u30a3\u3067\u53d6\u3063\u3066\u6765\u308c\u308b\u306e\u3067\u3001\u3053\u308c\u3092\u305d\u308c\u305e\u308c\u306e\u578b\u3068 is \u6f14\u7b97\u5b50\u3067\u6bd4\u8f03\u3059\u308b\u304b\u3001\u4e71\u66b4\u306a\u5834\u5408\u306f as \u3067\u30ad\u30e3\u30b9\u30c8\u3057\u3066\u3057\u307e\u3044\u307e\u3059\u3002<br \/>\nXML-RPC\u306e\u3068\u304d\u306f\u6700\u7d42\u7684\u306b\u6587\u5b57\u5217\u306b\u76f4\u3057\u3066\u3057\u307e\u3046\u306e\u3067\u3001ToString \u3067\u4ee3\u7528\u3055\u305b\u3066\u3044\u307e\u3059\u3002\n<\/p>\n<p>\n\u3061\u306a\u307f\u306b\u3001F# \u3067\u66f8\u304f\u3068\u3053\u3093\u306a\u611f\u3058\u306b\u306a\u308a\u307e\u3059\u3002\n<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">\r\ntype Prada() =\r\n    member val Style = 0 with get, set\r\n    member val Color = &amp;quot;&amp;quot; with get, set\r\n\r\n&#x5B;&lt;TestMethod&gt;]\r\nlet TestMethod1() =\r\n    let m = new Prada( Style=10, Color=&amp;quot;Pink&amp;quot; )\r\n    let ti = m.GetType().GetTypeInfo()\r\n    let plist = ti.DeclaredProperties\r\n    for prop in plist do\r\n        let n = prop.Name\r\n        let v = prop.GetValue(m)\r\n        System.Diagnostics.Debug.WriteLine(String.Format(&amp;quot;prop: {0} value: {1}&amp;quot;, n, v ))\r\n\r\n<\/pre>\n<p>\n\u3053\u306e\u5217\u6319\u3057\u305f\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u4f7f\u3063\u3066 XML \u5f62\u5f0f\u306b\u76f4\u3059\u308f\u3051\u3067\u3059\u304c\u3001\u305d\u306e\u3042\u305f\u308a\u306f XElement \u3092\u4f7f\u3046\u3068\u697d\u306b\u3067\u304d\u308b\u306e\u3067\u3001\u3061\u3087\u3063\u3068\u7701\u7565\u3002\n<\/p>\n<p>\n\u3067\u3001\u30a2\u30ea\u30d7\u30e9\u306e\u672c\u984c\u306b\u3044\u304d\u307e\u3059\u3002<br \/>\n\u3053\u308c\u3063\u3066\u3001\u30ea\u30d5\u30ec\u30af\u30b7\u30e7\u30f3\u3092\u4f7f\u3046\u3068\u300c\u30af\u30e9\u30b9\u60c5\u5831\u300d\u3092\u53d6\u308c\u308b\u3053\u3068\u306b\u306a\u308b\u3051\u3069\u3001\u5185\u90e8\u5b9f\u88c5\u7684\u306b\u306f\u3069\u3046\u306a\u3063\u3066\u3044\u308b\u3093\u3060\u308d\u3046\u304b\u3002\u3044\u3084\u3001\u305d\u3082\u305d\u3082\u3001C++ \u306e\u3088\u3046\u306a\u30af\u30e9\u30b9\u60c5\u5831\u3092\u6301\u305f\u306a\u3044\u8a00\u8a9e\u306e\u5834\u5408\u306f\u3001\u3069\u3046\u3084\u3063\u3066\u5b9f\u88c5\u3059\u308c\u3070\u3044\u3044\u3093\u3060\u308d\u3046\u304b\uff1f\n<\/p>\n<p>\n\u3068\u3044\u3046\u8a71\u306b\u306a\u308a\u307e\u3059\u3002\u30af\u30e9\u30b9\u60c5\u5831\u306a\u3093\u3060\u304b\u3089\u3001\u30af\u30e9\u30b9\u306b\u7d10\u3065\u3044\u3066\u3044\u308b\u308f\u3051\u3067\u3001new \u3067\u4f5c\u6210\u3057\u305f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3068\u306f\u5225\u3067\u3059\u3088\u306d\u3002\u306a\u306e\u3067\u3001\u3044\u304f\u3064\u3082\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u3063\u305f\u3068\u3057\u3066\u3082\u3001\u30af\u30e9\u30b9\u60c5\u5831\u3068\u304b\u30d7\u30ed\u30d1\u30c6\u30a3\u306e\u578b\u3068\u304b\u306f\u4e00\u7a2e\u985e\u3057\u304b\u306a\u3044\u308f\u3051\u3067\u3059\u3002Javascript\u306e\u3088\u3046\u306b\u30d7\u30ed\u30c8\u30bf\u30a4\u30d7\u3067\u5f8c\u304b\u3089\u3069\u3093\u3069\u3093\u4ed8\u3051\u52a0\u3048\u3066\u3044\u304f\u3068\u3044\u3046\u30d1\u30bf\u30fc\u30f3\u3082\u3042\u308b\u306e\u3067\u3001\u30d7\u30ed\u30d1\u30c6\u30a3\u3084\u30e1\u30bd\u30c3\u30c9\u304c\u56fa\u5b9a\u3068\u3044\u3046\u308f\u3051\u3067\u306f\u306a\u3044\u3051\u308c\u3069\uff08\u5b9f\u88c5\u7684\u306b\u306f\u3001\u5f8c\u4ed8\u3051\u7528\u306e\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u3092\u7528\u610f\u3059\u308b\u308f\u3051\u3060\u3057\u3001dynamic\u578b\u307f\u305f\u3044\u306a\u611f\u3058\u306b\u306a\u308b\uff09\u3001\u3082\u3068\u3082\u3068\u306e\u56fa\u5b9a\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u3084\u30e1\u30bd\u30c3\u30c9\u3092\u3069\u3046\u3084\u3063\u3066\u6271\u304a\u3046\u304b\u3068\u3044\u3046\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002\n<\/p>\n<p><h2>\u30ea\u30d5\u30ec\u30af\u30b7\u30e7\u30f3\u3082\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3082\u4f7f\u308f\u306a\u3044\u3067\u5b9f\u88c5\u3059\u308b<\/h2>\n<\/p>\n<p>\n\u306a\u306e\u3067\u3001\u30a2\u30ea\u30b9\u306f\u300c\u30ea\u30d5\u30ec\u30af\u30b7\u30e7\u30f3\u300d\u3082\u300c\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u300d\u3082\u5acc\u3044\u306a\u306e\u3067\u3001\u30eb\u30a4\u30b9\u306f\u4f55\u304b\u5225\u306e\u65b9\u6cd5\u3067\u5b9f\u88c5\u3057\u306a\u3051\u308c\u3070\u3044\u3051\u307e\u305b\u3093\u3002\u672c\u6765\u306a\u3089\u3070\u3001\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3092\u4f5c\u3063\u3066\u3068\u3044\u3046\u8a71\u306b\u306a\u308b\u3051\u3069\u3001\u3067\u304d\u308b\u3060\u3051\u30ea\u30d5\u30ec\u30af\u30b7\u30e7\u30f3\u3063\u307d\u3044\u5f62\u306b\u3057\u305f\u3044\u3002\u3042\u3068\u3001\u30af\u30e9\u30b9\u306e\u5c5e\u6027\u306e\u3088\u3046\u306b\u4ed8\u52a0\u60c5\u5831\u3082\u53d6\u308a\u5165\u308c\u305f\u3044\u3002\n<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\nclass PradaNew\r\n{\r\n    public static string ClassName = &amp;quot;PradaNew&amp;quot;;\r\n    public static Dictionary&lt;string, Func&lt;PradaNew, object&gt;&gt; Properties =\r\n        new Dictionary&lt;string, Func&lt;PradaNew, object&gt;&gt;\r\n    {\r\n        {&amp;quot;Style&amp;quot;, m =&gt; m.Style  },\r\n        {&amp;quot;Color&amp;quot;, m =&gt; m.Color }\r\n    };\r\n    public int Style { get; set; }\r\n    public string Color { get; set; }\r\n}\r\n<\/pre>\n<p>\n\u305d\u3093\u306a\u8a33\u3067\u3001\u30eb\u30a4\u30b9\u306f\u300cPradaNew\u300d\u30af\u30e9\u30b9\u3092\u4f5c\u3063\u3066\u3001\u4ed8\u52a0\u60c5\u5831\u3092\u72ec\u81ea\u306b\u8ffd\u52a0\u3057\u307e\u3057\u305f\u3002\u306a\u3093\u304b\u3001\u305d\u308c\u3063\u307d\u3044\u5f62\u3067\u53d6\u308c\u308b\u3088\u3046\u306b\u3001\u30af\u30e9\u30b9\u540d\u3068\u3001\u30d7\u30ed\u30d1\u30c6\u30a3\u540d\u3092\u6e21\u3059\u3068\u5024\u304c\u53d6\u308c\u308b\u3088\u3046\u306a\u4ed5\u7d44\u307f\u3092\u4f5c\u3063\u3066\u304a\u304d\u307e\u3059\u3002<br \/>\n\u4e21\u65b9\u3068\u3082 static \u30d7\u30ed\u30d1\u30c6\u30a3\u306a\u306e\u3067\u3001\u30af\u30e9\u30b9\u306e\u307f\u306b\u7d10\u3065\u3044\u305f\u60c5\u5831\u306b\u306a\u308a\u307e\u3059\u306d\u3002\n<\/p>\n<p>\n\u3067\u3082\u3063\u3066\u3001PradaNew \u3092\u4f7f\u3063\u305f\u30ea\u30d5\u30ec\u30af\u30b7\u30e7\u30f3\u3063\u307d\u3044\u5f62\u306e\u4f8b\u304c\u3053\u3063\u3061\u3002\n<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\npublic void TestMethod2()\r\n{\r\n    \/\/ \u30ea\u30d5\u30ec\u30af\u30b7\u30e7\u30f3\u3092\u4f7f\u308f\u306a\u3044\u30d1\u30bf\u30fc\u30f3\r\n    var m = new PradaNew { Style = 10, Color = &quot;Pink&quot; };\r\n    var ti = m.GetType().GetTypeInfo();\r\n    var plist = PradaNew.Properties;\r\n\r\n    foreach (var prop in plist)\r\n    {\r\n        var n = prop.Key;\r\n        var v = prop.Value(m);\r\n        Debug.WriteLine($&quot;prop: {n} value: {v}&quot;);\r\n    }\r\n}\r\n<\/pre>\n<p>\n\u30d7\u30ed\u30d1\u30c6\u30a3\u540d\u3092 Key \u3067\u3001\u5024\u306e\u307b\u3046\u3092 Value \u3067\u53d6\u3063\u3066\u304f\u308b\u306e\u304c\u591a\u5c11\u4e71\u66b4\u3067\u3059\u304c\u3001\u5148\u306e\u30ea\u30d5\u30ec\u30af\u30b7\u30e7\u30f3\u3068\u540c\u3058\u3088\u3046\u306a\u30b9\u30bf\u30a4\u30eb\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n\u3053\u3053\u306b\u30af\u30e9\u30b9\u306e\u5c5e\u6027\u3068\u3057\u3066\u300cHttpGet\u300d\u3068\u304b\u52a0\u3048\u305f\u3044\u3068\u304d\u3082\u3001ClassName \u30d7\u30ed\u30d1\u30c6\u30a3\u306e\u3088\u3046\u306b static \u306a\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u8ffd\u52a0\u3059\u308c\u3070 ok \u3067\u3059\u306d\u3002static \u306a\u30d7\u30ed\u30d1\u30c6\u30a3\u306a\u306e\u3067\u3001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u5927\u91cf\u306b\u5897\u3048\u3066\u3082\u30e1\u30e2\u30ea\u306f\u5897\u3048\u307e\u305b\u3093\u3002\u307e\u305f\u3001\u5024\u3092\u53d6\u3063\u3066\u304f\u308b\u3068\u3053\u308d\u306f\u9069\u5f53\u306b\u30ad\u30e3\u30c3\u30b7\u30e5\u3057\u3066\u3084\u308c\u3070\u3001\u901a\u5e38\u306e\u30e1\u30bd\u30c3\u30c9\u547c\u3073\u51fa\u3057\u3068\u905c\u8272\u306a\u3044\u30b9\u30d4\u30fc\u30c9\u304c\u51fa\u305b\u305d\u3046\u3060\u3068\u3044\u3046\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u3002\n<\/p>\n<p>\n\u3053\u308c\u3092\u3001\u3061\u3087\u3063\u3068 C++ \u3067\u76f4\u3057\u3066\u307f\u307e\u3059\u3002\n<\/p>\n<pre class=\"brush: csharp; title: ; notranslate\" title=\"\">\r\n#include &lt;map&gt;\r\n#include &lt;functional&gt;\r\n\r\nclass Prada {\r\nprivate:\r\n\tint _style = 0;\r\n\tstd::string _color = &amp;quot;&amp;quot;;\r\npublic:\r\n\tint getStyle() { return _style; }\r\n\tvoid setStyle(int v) { _style = v; }\r\n\tstd::string getColor() { return _color; }\r\n\tvoid setColor(std::string v) { _color = v; }\r\n\r\npublic:\r\n\tconst std::string className = &amp;quot;Prada&amp;quot;;\r\n\tstatic std::map &lt;std::string, std::function&lt;void*(Prada*)&gt;&gt; properties;\r\n\r\n\tPrada() {\r\n\t\tauto func = &#x5B;](Prada* m) { auto v = m-&gt;getStyle(); };\r\n\t\tPrada::properties.insert(std::make_pair(std::string(&amp;quot;Style&amp;quot;), &#x5B;](Prada* m) { auto v = m-&gt;getStyle(); return &amp;v; }));\r\n\t\tPrada::properties.insert(std::make_pair(std::string(&amp;quot;Color&amp;quot;), &#x5B;](Prada* m) { auto v = m-&gt;getColor(); return &amp;v; }));\r\n\t}\r\n};\r\nstd::map &lt;std::string, std::function&lt;void*(Prada*)&gt;&gt; Prada::properties;;\r\n\r\nint main()\r\n{\r\n\tauto m = new Prada();\r\n\tm-&gt;setStyle(10);\r\n\tm-&gt;setColor(&amp;quot;Pink&amp;quot;);\r\n\tauto plist = m-&gt;properties;\r\n\tfor each (auto prop in plist)\r\n\t{\r\n\t\tauto n = prop.first;\r\n\t\tauto v = prop.second;\r\n\t\tvoid* x = v(m);\r\n\t\t\/\/ void* \u304b\u3089\u5143\u306e\u578b\u3078\u623b\u3059\u306b\u306f\uff1f\r\n\t}\r\n\treturn 0;\r\n}\r\n<\/pre>\n<p>\n\u5143\u306e\u578b\u306b\u623b\u3059\u306e\u306b\u306f\u3001\u30d7\u30ed\u30d1\u30c6\u30a3\u306e\u578b\u3092\u8abf\u3079\u308b\u5fc5\u8981\u304c\u3042\u308b\u306e\u3067\u3001\u3082\u3046\u5c11\u3057\u624b\u3092\u5165\u308c\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u3051\u3069\u3001\u3060\u3044\u305f\u3044\u306f\u3053\u3093\u306a\u611f\u3058\u3002map \u306b\u3057\u3066\u30e9\u30e0\u30c0\u5f0f\u3092\u8fd4\u3059\u3088\u3046\u306b\u3057\u305f\u306e\u3067\u3084\u3084\u3053\u3057\u3044\u3053\u3068\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u304c\u3001\u69cb\u9020\u4f53\u3092\u4f5c\u3063\u3066\u30d7\u30ed\u30d1\u30c6\u30a3\u306e\u578b\u3092\u8abf\u3079\u308b\u3068\u3053\u308d\u3068\u3001\u5024\u3092\u53d6\u5f97\u3059\u308b\u3068\u3053\u308d\u3092\u4f5c\u3063\u305f\u307b\u3046\u304c\u697d\u304b\u3082\u3002\n<\/p>\n<p>\n\u307e\u3042\u3001\u3053\u3093\u306a\u5b9f\u88c5\u306f\u666e\u901a\u306f\u3057\u306a\u3044\u308f\u3051\u3067\u3001\u5185\u90e8\u7684\u306b\u306f\u3053\u3093\u306a\u3053\u3068\u306b\u306a\u3063\u3066\u3044\u308b\u306a\u30fc\u3068\u601d\u3044\u3064\u3064\u3001\u30ea\u30d5\u30ec\u30af\u30b7\u30e7\u30f3\u3092\u9053\u5177\u3068\u3057\u3066\u4f7f\u3046\u3068\u3088\u3044\u306e\u3067\u306f\u3068\u601d\u3063\u305f\u6b21\u7b2c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9577\u5e74\u4f7f\u3063\u3066\u3044\u305f Perl+C# \u306e WordPress \u6295\u7a3f\u30c4\u30fc\u30eb\u3092\u3001.net core \u3092\u6a5f\u4f1a\u306b F# \u306b\u76f4\u305d\u3046\u3068\u3057\u3066\u3044\u308b\u9014\u4e2d\u306a\u306e\u3067\u3059\u304c\u3001\u305d\u306e\u306a\u304b\u3067\u3075\u3068\u3001\u30ea\u30d5\u30ec\u30af\u30b7\u30e7\u30f3\u3092\u4f7f\u308f\u305a\u306b XML-RPC \u3092\u5b9f\u88c5\u3059\u308b\u306e\u306f\u3055\u305e\u3057\u3093 &hellip; <a href=\"http:\/\/www.moonmile.net\/blog\/archives\/8092\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3],"tags":[],"class_list":["post-8092","post","type-post","status-publish","format-standard","hentry","category-dev"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts\/8092","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/comments?post=8092"}],"version-history":[{"count":2,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts\/8092\/revisions"}],"predecessor-version":[{"id":8094,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/posts\/8092\/revisions\/8094"}],"wp:attachment":[{"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/media?parent=8092"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/categories?post=8092"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.moonmile.net\/blog\/wp-json\/wp\/v2\/tags?post=8092"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}