{"id":322,"date":"2012-07-09T17:00:29","date_gmt":"2012-07-09T08:00:29","guid":{"rendered":"http:\/\/soundengine.jp\/wordpress\/tips\/?p=322"},"modified":"2014-02-06T23:42:37","modified_gmt":"2014-02-06T14:42:37","slug":"visual-studio-20052008-%e3%82%a6%e3%82%aa%e3%83%83%e3%83%81%e3%81%abcautoptrarray%e3%81%ae%e4%b8%ad%e8%ba%ab%e8%a1%a8%e7%a4%ba","status":"publish","type":"post","link":"https:\/\/soundengine.jp\/wordpress\/tips\/tutorial\/322\/","title":{"rendered":"Visual Studio 2005\/2008 \u30a6\u30aa\u30c3\u30c1\u306bCAutoPtrArray\u306e\u4e2d\u8eab\u8868\u793a"},"content":{"rendered":"<p><a href=\"http:\/\/soundengine.jp\/wordpress\/tips\/?p=289\">Visual Studio 2005\/2008 CAtlArray\u306e\u4e2d\u8eab\u8868\u793a<\/a>\u306e\u3088\u3046\u306b\u4eca\u56de\u3082Visual Studio 2005\u306e\u30c7\u30d0\u30c3\u30b0\u30a6\u30a3\u30f3\u30c9\u30a6\u306e\u30a6\u30aa\u30c3\u30c1\u306bCAutoPtrArray\u3092\u5c55\u958b\u3059\u308b\u65b9\u6cd5\u3092\u7d39\u4ecb\u3059\u308b\u3002<\/p>\n<p><!--more--><\/p>\n<h2 id=\"content_1_0\">CAutoPtrArray  <a class=\"anchor_super\" id=\"idb8e3b3\" href=\"http:\/\/soundengine.jp\/backend\/?services%2Ftips%2F2007-05-23%2F1#idb8e3b3\" title=\"idb8e3b3\"> <\/a><\/h2>\n<p>\u3053\u306e\u30af\u30e9\u30b9\u306f\u3001ATL\u306b\u304a\u3051\u308b\u81ea\u52d5\u30dd\u30a4\u30f3\u30bf\u914d\u5217\u5b9f\u88c5\u30af\u30e9\u30b9\u3067\u3042\u308b\u3002vector &lt; auto_ptr &gt;\u306b\u610f\u5473\u7684\u306b\u306f\u540c\u3058\u3060\u304c\u3001vector &lt; auto_ptr &gt;\u306f\u5b9f\u969b\u306b\u306f\u4f7f\u3046\u306e\u306f\u304a\u52e7\u3081\u3057\u306a\u3044\u3002\u4f7f\u3046\u3068\u3059\u308c\u3070\u3001boost\u3092\u7528\u3044\u3066vector &lt; shared_ptr &gt;\u3092\u4f7f\u3063\u305f\u65b9\u304c\u3088\u3044\u3002<\/p>\n<p>\u3055\u3066\u3001\u3053\u306eCAutoPtrArray\u3067\u3042\u308b\u304c\u3001\u6a19\u6e96\u3067\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u4e2d\u8eab\u3092\u5165\u308c\u3066\u3082\u5c55\u958b\u3055\u308c\u306a\u3044\u305f\u3081\u3001\u305d\u306e\u3064\u3069m_pData,10\u306a\u3069\u3068\u66f8\u3044\u305f\u308a\u3057\u3066\u5c55\u958b\u3057\u306a\u304f\u3066\u306f\u306a\u3089\u306a\u3044\u3002\u6211\u3005\u304c\u898b\u305f\u3044\u306e\u306f\u305f\u3044\u3066\u3044\u4e2d\u8eab\u3067\u3042\u308b\u305f\u3081\u305d\u308c\u306f\u307e\u3069\u308d\u3063\u3053\u3057\u3044\u3002<\/p>\n<pre>- {...} ATL::CAutoPtrArray &lt; int &gt;\r\n- ATL::CAtlArray &lt; ATL::CAutoPtr &lt; int &gt;, ATL::CAutoPtrElementTraits &lt; int &gt; &gt;\t\r\n  { m_pData=0x003a8310 m_nSize=3 m_nMaxSize=5 ... }\r\n  ATL::CAtlArray &lt; ATL::CAutoPtr &lt; int &gt;, ATL::CAutoPtrElementTraits &lt; int &gt; &gt;\r\n+\t\tm_pData\t0x003a8310 { m_p=0x003a8250 }\tATL::CAutoPtr&lt; int &gt; *\r\n\t\tm_nSize\t3\tunsigned int\r\n\t\tm_nMaxSize\t5\tunsigned int\r\n\t\tm_nGrowBy\t0\tint<\/pre>\n<div class=\"jumpmenu\">\n<\/div>\n<h3 id=\"content_1_1\">autoexp.dat  <a class=\"anchor_super\" id=\"gd9c449e\" href=\"http:\/\/soundengine.jp\/backend\/?services%2Ftips%2F2007-05-23%2F1#gd9c449e\" title=\"gd9c449e\"> <\/a><\/h3>\n<p>autoexp.dat\u306f\u3001Visual Studio 2005\u306e\u30a6\u30a9\u30c3\u30c1\u5c55\u958b\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3092\u8a18\u5165\u3059\u308b\u30d5\u30a1\u30a4\u30eb\u3060\u304c\u3001\u4eca\u56de\u306f\u4ee5\u4e0b\u306e\u5185\u5bb9\u3092\u8ffd\u52a0\u3057\u3066\u307f\u305f\u3002<\/p>\n<pre>ATL::CAutoPtrArray&lt;*&gt;{\r\n\tchildren\r\n\t(\r\n\t    #array\r\n\t    (\r\n\t\t\texpr :\t(*($c.m_pData)[$i].m_p),  \r\n\t\t\tsize :\t$c.m_nSize\r\n\t\t)\r\n\t)\r\n\t\r\n    preview\r\n    ( \r\n        #( \r\n\t\t\t\"[\", \r\n            $e.m_nSize , \r\n            \"](\", \r\n            \r\n            #array\r\n            (\r\n\t\t\t\texpr : \t(*($c.m_pData)[$i].m_p),  \r\n\t\t\t\tsize : \t$c.m_nSize\r\n\t\t\t), \r\n\t\t\t\")\"\r\n\t\t)\r\n\t)\r\n}<\/pre>\n<p>\u5165\u308c\u308b\u5834\u6240\u306f\u3001\u307e\u3060\u3088\u304f\u308f\u304b\u3063\u3066\u3044\u306a\u3044\u304c\u3001[Visualizer]\u30bf\u30b0\u306e\u4e0b\u306b\u5165\u308c\u3066\u3044\u308b\u3002\u3068\u308a\u3042\u3048\u305a\u3053\u306e\u3088\u3046\u306b\u66f8\u304f\u3060\u3051\u3067\u3046\u307e\u304f\u5c55\u958b\u3057\u3066\u304f\u308c\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3002<\/p>\n<div class=\"img_margin\" style=\"text-align: left\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/soundengine.jp\/backend\/?plugin=ref&amp;page=services%2Ftips%2F2007-05-23%2F1&amp;src=tenkai.gif\" alt=\"tenkai.gif\" height=\"112\" width=\"377\"><\/div>\n<p>\u306a\u304a\u3001\u4e0a\u306e\u753b\u50cf\u3067\u306fAdd( CAutoPtr &lt; int &gt; ( new int ) )\u3068\u3044\u3046\u306e\u3092\u8ffd\u52a0\u3057\u3066\u3044\u308b\u306e\u3060\u304c\u3001\u3053\u3053\u3067\u5358\u306bAdd()\u3068\u3057\u3066\u4e2d\u8eab\u3092\u8ffd\u52a0\u3057\u306a\u3044\u5834\u5408\u3001<\/p>\n<pre>- [1](...,...)\tATL::CAutoPtrArray&lt;int&gt;\r\n  [0]\tCXX0030: \u30a8\u30e9\u30fc\u3067\u3059: \u5f0f\u3092\u8a55\u4fa1\u3067\u304d\u307e\u305b\u3093\t<\/pre>\n<p>\u3053\u306e\u3088\u3046\u306a\u611f\u3058\u306b\u306a\u3063\u3066\u3057\u307e\u3046\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Visual Studio 2005\/2008 CAtlArray\u306e\u4e2d\u8eab\u8868\u793a\u306e\u3088 &hellip; <a href=\"https:\/\/soundengine.jp\/wordpress\/tips\/tutorial\/322\/\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-322","post","type-post","status-publish","format-standard","hentry","category-tutorial"],"_links":{"self":[{"href":"https:\/\/soundengine.jp\/wordpress\/tips\/wp-json\/wp\/v2\/posts\/322","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/soundengine.jp\/wordpress\/tips\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/soundengine.jp\/wordpress\/tips\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/soundengine.jp\/wordpress\/tips\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/soundengine.jp\/wordpress\/tips\/wp-json\/wp\/v2\/comments?post=322"}],"version-history":[{"count":3,"href":"https:\/\/soundengine.jp\/wordpress\/tips\/wp-json\/wp\/v2\/posts\/322\/revisions"}],"predecessor-version":[{"id":3321,"href":"https:\/\/soundengine.jp\/wordpress\/tips\/wp-json\/wp\/v2\/posts\/322\/revisions\/3321"}],"wp:attachment":[{"href":"https:\/\/soundengine.jp\/wordpress\/tips\/wp-json\/wp\/v2\/media?parent=322"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/soundengine.jp\/wordpress\/tips\/wp-json\/wp\/v2\/categories?post=322"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/soundengine.jp\/wordpress\/tips\/wp-json\/wp\/v2\/tags?post=322"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}