{"id":159,"date":"2014-03-14T16:00:34","date_gmt":"2014-03-14T15:00:34","guid":{"rendered":"https:\/\/kszyh.kisim.eu.org\/?p=159"},"modified":"2014-03-14T16:00:34","modified_gmt":"2014-03-14T15:00:34","slug":"parsowanie-listy-punktow","status":"publish","type":"post","link":"https:\/\/kszyh.kisim.eu.org\/?p=159","title":{"rendered":"Parsowanie listy punkt\u00f3w"},"content":{"rendered":"<p>string w postaci: (0,0), (0.01,0), (0.01,0.01)<\/br><br \/>\nzamieniony na tablic\u0119 obiekt\u00f3w typu punkt (x,y)<\/p>\n<pre class=\"lang:cpp\">void TokenizeVectorOfPoints(std::vector<Point<2>>& pointsVector){\r\n    boost::regex re(\"(\\\\((.*?),(.*?)\\\\).*?)+\");\r\n    std::string s = _project->heatTransferProbePoints;\t\r\n\r\n    boost::sregex_iterator  it(s.begin(), s.end(), re);\r\n    boost::sregex_iterator  end;\r\n    for (; it != end; ++it) {\r\n        double x, y;\r\n        try {\r\n            x = boost::lexical_cast<double>((*it)[2]);\r\n            y = boost::lexical_cast<double>((*it)[3]);\r\n        } catch (boost::bad_lexical_cast const&) {\r\n            x = 0;\r\n            y = 0;\r\n        }\r\n        pointsVector.emplace_back(Point<2>(x,y));  \r\n    }\r\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>string w postaci: (0,0), (0.01,0), (0.01,0.01) zamieniony na tablic\u0119 obiekt\u00f3w typu punkt (x,y) void TokenizeVectorOfPoints(std::vector&#038; pointsVector){ boost::regex re(&#8222;(\\\\((.*?),(.*?)\\\\).*?)+&#8221;); std::string s = _project->heatTransferProbePoints; boost::sregex_iterator it(s.begin(), s.end(), re); boost::sregex_iterator end; for (; it != end; ++it) { double x, y; try { x = boost::lexical_cast((*it)[2]); y = boost::lexical_cast((*it)[3]); } catch (boost::bad_lexical_cast const&#038;)&#8230; <a class=\"continue-reading-link\" href=\"https:\/\/kszyh.kisim.eu.org\/?p=159\"> Continue reading <span class=\"meta-nav\">&rarr; <\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[3,51,52,53],"class_list":["post-159","post","type-post","status-publish","format-standard","hentry","category-c","tag-boost","tag-regex","tag-split","tag-tokeny"],"_links":{"self":[{"href":"https:\/\/kszyh.kisim.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/159","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kszyh.kisim.eu.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kszyh.kisim.eu.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kszyh.kisim.eu.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kszyh.kisim.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=159"}],"version-history":[{"count":1,"href":"https:\/\/kszyh.kisim.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/159\/revisions"}],"predecessor-version":[{"id":160,"href":"https:\/\/kszyh.kisim.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/159\/revisions\/160"}],"wp:attachment":[{"href":"https:\/\/kszyh.kisim.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=159"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kszyh.kisim.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=159"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kszyh.kisim.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=159"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}