<?xml version="1.0" encoding="UTF-8"?>
<page xmlns="http://api.springnote.com">
  <identifier type="integer">2607794</identifier>
  <title>&#51687;&#44256; &#49845;&#44288;&#51201;&#51064; &#53076;&#46300;&#47196; &#54056;&#53556; &#47564;&#46308;&#44592;</title>
  <relation_is_part_of type="integer">238137</relation_is_part_of>
  <date_modified type="datetime">2009-01-31T14:11:23Z</date_modified>
  <uri>http://heycalmdown.springnote.com/pages/2607794</uri>
  <date_created type="datetime">2009-01-31T04:55:38Z</date_created>
  <source>&lt;p&gt;&#46160; &#50836;&#49548;&#47484; &#48708;&#44368;&#54616;&#44144;&#45208;&amp;nbsp;&#52968;&#53580;&#51060;&#45320;&#50640; &#46308;&#50612;&#51080;&#45716; &#50836;&#49548;&#51032; &#51221;&#47148;&#54624; &#46412;&amp;nbsp;&#53412;&#44032; &#46168; &#51060;&#49345;&#51064; &#44221;&#50864;&#44032; &#51333;&#51333; &#51080;&#51648;&#50836;. &#47676;&#51200; &#54616;&#45208;&#47484; &#48708;&#44368;&#54616;&#44256; &#44057;&#51012; &#46412; &#46160; &#48264;&#51704; &#44050;&#51012; &#48708;&#44368;&#54616;&#45716; &#54805;&#53468;&#47196; &#44396;&#54788;&#54633;&#45768;&#45796;. &#44536;&#47084;&#47732; &#50500;&#47000;&#52376;&#47100; &#49373;&#44596; &#53076;&#46300;&#44032;&amp;nbsp;&#46104;&#51648;&#50836;.&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;bool greater(const&amp;nbsp;Element&amp;amp; source, const Element&amp;amp; target)&lt;/li&gt;
&lt;li&gt;{&lt;/li&gt;
&lt;li&gt;
&lt;p style="margin-left: 2em;"&gt;if (source.first &amp;lt; target.first) {&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p style="margin-left: 4em;"&gt;return true;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p style="margin-left: 2em;"&gt;} else if (source.first == target.first) {&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p style="margin-left: 4em;"&gt;return source.second &amp;lt; target.second;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p style="margin-left: 2em;"&gt;}&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p style="margin-left: 2em;"&gt;return false;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;}&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&#51060;&#47088; &#54632;&#49688;&#47484; &#53364;&#47000;&#49828; &#50672;&#49328;&#51088;&#47196; &#51116;&#51221;&#51032;&#54616;&#44592;&#46020; &#54616;&#44256; &#50976;&#54008;&#47532;&#54000; &#54632;&#49688;&#47196; &#47564;&#46308;&#44592;&#46020; &#54616;&#45716;&#45936;&#50836; &#50724;&#45720;&#51008; &#48276;&#50857;&#51004;&#47196; &#49324;&#50857;&#54624; &#49688; &#51080;&#45716; &#54632;&#49688;&#47484; &#54616;&#45208;&amp;nbsp;&#47564;&#46308;&#50612; &#48380;&#44620; &#54633;&#45768;&#45796;. &#50724;&#45720;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&#51008;&lt;/span&gt;&amp;nbsp;&#54616;&#44256; &#50044;&#45796;&#44256; &#54644;&#49436; &#45236;&#51068;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&#46020;&lt;/span&gt;&amp;nbsp;&#47956;&#44032; &#47564;&#46308;&#51648;&#45716; &#50506;&#49845;&#45768;&#45796;&#47564;.&lt;/p&gt;
&lt;h3&gt;&#45436;&#47532;&#54364;&#54788;&#49885; &#51201;&#50857;&#54616;&#44592;&lt;/h3&gt;
&lt;p&gt;&#51228;&#44032; &#48373;&#51105;&#54620; &#51312;&#44148;&#47928;&#51012; &#51069;&#44592; &#54200;&#54616;&#44172; &#47564;&#46308;&#44592; &#50948;&#54644; &#49324;&#50857;&#54616;&#45716; &#53364;&#47000;&#49828;&#44032; &#51080;&#49845;&#45768;&#45796;. &#51060;&#47492;&#51008; &#50500;&#47924;&#47000;&#46020; &#49345;&#44288;&#50630;&#51648;&#47564; &#50668;&#44592;&#49436;&#45716; &#51060;&#44152; LogicalExpression &#51060;&#46972; &#48512;&#47476;&#44192;&#49845;&#45768;&#45796;. And(&amp;amp;&amp;amp;)&#50752; Or(||)&#44032; &#48373;&#51105;&#54616;&#44172; &#49438;&#51064; &#51312;&#44148;&#47928;&#51008; &#50500;&#47924;&#47000;&#46020; &#51069;&#44592; &#50612;&#47157;&#44592; &#46412;&#47928;&#50640; &#44292;&#54840;&#47196; &#49912;&#51064;&amp;nbsp;&#44033;&#44033;&#51032; &#47926;&#51020;&#51012; &#50669;&#54624;&#50640; &#46384;&#46972; &#51060;&#47492;&#51012; &#48537;&#50668;&#51452;&#47140; &#54624; &#46412; &#49324;&#50857;&#54633;&#45768;&#45796;. &#50696;&#47484; &#46308;&#50612; &#45796;&#51020;&#44284; &#44057;&#51008; &#53076;&#46300;&#44032;...&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;// &#48260;&#54532;&#44032; &#52712;&#49548;&#46096;&#44144;&#45208; &#51648;&#49549; &#49884;&#44036;&#51060; &#51648;&#45228;&#51004;&#47732; &#51228;&#44144;&#54633;&#45768;&#45796;&lt;/li&gt;
&lt;li&gt;if (&lt;/li&gt;
&lt;li style="margin-left: 2em;"&gt;(buff.live&amp;nbsp;== false)&amp;nbsp;||&lt;/li&gt;
&lt;li style="margin-left: 2em;"&gt;(buff.live&amp;nbsp;&amp;amp;&amp;amp; (buff.tickInitialized&amp;nbsp;+ buff.tickDuration&amp;nbsp;&amp;lt;= Time::tickNow)) {&lt;/li&gt;
&lt;li&gt;
&lt;p style="margin-left: 2em;"&gt;remove(buff);&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;}&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&#50500;&#47000;&#52376;&#47100; &#48148;&#45076; &#49688; &#51080;&#49845;&#45768;&#45796;.&amp;nbsp;&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;LogicalExpression isDead(buff.live == false);&lt;/li&gt;
&lt;li&gt;LogicalExpression isExpired(buff.live);&lt;/li&gt;
&lt;li&gt;isExpired.and(buff.tickInitialized&amp;nbsp;+ buff.tickDuration&amp;nbsp;&amp;lt;= Time::tickNow);&lt;/li&gt;
&lt;li&gt;if (isDead.or(isExpired)) {&lt;/li&gt;
&lt;li&gt;
&lt;p style="margin-left: 2em;"&gt;remove(buff);&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;}&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&#51032;&#48120;&#44032; &#45908;&amp;nbsp;&#47749;&#54869;&#54644;&#51276;&#51424;. &#51060;&#51228; &#51452;&#49437;&#51060; &#54596;&#50836;&#50630;&#45716;, &#51032;&#48120;&#47484; &#47568;&#54616;&#45716; &#53076;&#46300;&#44032; &#46104;&#50632;&#49845;&#45768;&#45796;.&amp;nbsp;&#48708;&#47197; &#50696;&#47484; &#50948;&#54620; &#50696;&#51060;&#44596; &#54644;&#46020;&amp;nbsp;&#50612;&#46500; &#50857;&#46020;&#47196; &#50416;&#45716;&#51648;&#45716;&amp;nbsp;&#50500;&#49892; &#44144;&#50640;&#50836;. &#44536;&#47100; &#50864;&#47532;&#44032; &#52376;&#51020;&#50640; &#47564;&#46304; &#48708;&#44368;&#47928;&#51012; LogicalExpression&#51012; &#50024;&#49436;&amp;nbsp;&#45796;&#49884; &#47564;&#46308;&#46104; &#48276;&#50857;&#49457;&#51012; &#44054;&#46020;&#47197; &#54644;&#48389;&#49884;&#45796;.&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li style="line-height: 2em;"&gt;template&amp;lt; typename _Ty1, typename _Ty2 &amp;gt;&lt;/li&gt;
&lt;li style="line-height: 2em;"&gt;bool greater(_Ty1 s1, _Ty1 t1, _Ty2 s2, _Ty2 t2)&lt;/li&gt;
&lt;li style="line-height: 2em;"&gt;{&lt;/li&gt;
&lt;li style="line-height: 2em; margin-left: 2em;"&gt;LogicalExpression greaterFirst(s1&amp;nbsp;&amp;lt; t1);&lt;/li&gt;
&lt;li style="line-height: 2em; margin-left: 2em;"&gt;LogicalExpression greaterSecond(s1&amp;nbsp;== t1);&lt;/li&gt;
&lt;li style="line-height: 2em; margin-left: 2em;"&gt;greaterSecond.and(s2&amp;nbsp;&amp;lt; t2);&lt;/li&gt;
&lt;li style="line-height: 2em; margin-left: 2em;"&gt;return greaterFirst.or(greaterSecond);&lt;/li&gt;
&lt;li style="line-height: 2em;"&gt;}&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&#53076;&#46300;&#45716; &#45908; &#51687;&#44256; &#47749;&#54869;&#54644;&#51276;&#44256;,&amp;nbsp;&#51032;&#46020;&#54620; &#44148; &#50500;&#45768;&#51648;&#47564; &#48373;&#51105;&#49457;&#51060; &#51460;&#50612;&#46300;&#45716; &#48512;&#51089;&#50857;&#46020; &#51068;&#50612;&#45228;&#49845;&#45768;&#45796;. &#50640;&#51204;&amp;nbsp;&#54632;&#49688;&#45716; Element&#50640; &#45824;&#54644;&#49436;&#47564; &#49324;&#50857;&#54624; &#49688; &#51080;&#50632;&#51648;&#47564; &#49352;&#47196;&#50868; &#54632;&#49688;&#45716; &#44536;&#47111;&#51648; &#50506;&#44256;&#50836;. &#45824;&#49888; &#50696;&#51204;&#48372;&#45796; &#48512;&#47476;&#44592;&#44032; &#48264;&#51105;&#49828;&#47084;&#50864;&#45768; &#51068;&#51012; &#51460;&#50668;&#51452;&#45716; &#47588;&#53356;&#47196;&#47484; &#47564;&#46308; &#49688;&#46020; &#51080;&#44192;&#51648;&#50836;.&lt;/p&gt;
&lt;ol class="code"&gt;
&lt;li&gt;#define GREATER_2(s,t,a,b) greater(s.a, t.a, s.b, t.b)&lt;/li&gt;
&lt;li&gt;{&lt;/li&gt;
&lt;li&gt;
&lt;p style="margin-left: 2em;"&gt;if (GREATER_2(source, target, first, second)) {&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p style="margin-left: 4em;"&gt;// target&#51060; &#45908; &#53356;&#45796;!&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p style="margin-left: 2em;"&gt;}&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;}&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;&#47956;&#44032; &#49888;&#44221;&#50416;&#51064;&#45796;&lt;/h3&gt;
&lt;p&gt;&#50864;&#47532;&#44032; &#47564;&#46304; &#49352;&#47196;&#50868; greater&amp;nbsp;&#54632;&#49688;&#50640;&#49436; &#52395; &#48264;&#51704; &#50836;&#49548;&#44032; &#46160; &#48264; &#45208;&#50724;&#51094;&#50500;&#50836;? &#53360;&#51648; &#54620; &#48264; &#48372;&#44256; &#44057;&#51008;&#51648; &#54620; &#48264; &#48372;&#45768;&#44620;&#50836;. &#49888;&#44221;&#50416;&#51060;&#45348;&#50836;. &#48708;&#49847;&#54620; &#44396;&#47928;&#51060; &#48152;&#48373;&#46104;&#47732;&amp;nbsp;&#49892;&#49688;&#54624; &#50668;&#51648;&#46020;&amp;nbsp;&#49373;&#44592;&#44256;, &#51060;&#50976;&#50556; &#50612;&#51724;&#46304;&amp;nbsp;&#50784;&#51648; &#44592;&#48516; &#45208;&#49257;&#45768;&#45796;. &#48708;&#44368;&#54616;&#45716; &#44050;&#51008; &#46041;&#51068;&#54616;&#44256; &#48512;&#46321;&#54840;&#47564; &#48148;&#45012;&#48380; &#49688; &#51080;&#45716; &#44061;&#52404;&#44032; &#51080;&#51004;&#47732; &#51339;&#44192;&#44400;&#50836;. &#51060;&#44152; PairEvaluate&amp;nbsp;&#46972;&#44256;&amp;nbsp;&#54633;&#49884;&#45796;. &#51060; &#44061;&#52404;&#50640; &#44050;&#51012; &#54620; &#48264;&#47564; &#45347;&#44256; greater()&#45208; equal() &#47700;&#49548;&#46308;&#47484; &#48512;&#47476;&#47732; &#46112; &#44163; &#44057;&#45348;&#50836;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;ol class="code" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 38px; line-height: 1.8em; font-family: courier, monospace; background-image: ; background-color: rgb(239, 239, 239); background-position: 8px 7px;"&gt;
&lt;li style="line-height: 2em;"&gt;#define GREATER_2(s,t,a,b) greater(PairEvaluate(s.a, t.a), PairEvaluate(s.b, t.b))&lt;/li&gt;
&lt;li style="line-height: 2em;"&gt;{&lt;/li&gt;
&lt;li style="line-height: 2em; margin-left: 2em;"&gt;
&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 2em;"&gt;if (GREATER_2(source, target, first, second)) {&lt;/p&gt;
&lt;/li&gt;
&lt;li style="line-height: 2em; margin-left: 4em;"&gt;
&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 2em;"&gt;// target&#51060; &#45908; &#53356;&#45796;!&lt;/p&gt;
&lt;/li&gt;
&lt;li style="line-height: 2em; margin-left: 2em;"&gt;
&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; line-height: 2em;"&gt;}&lt;/p&gt;
&lt;/li&gt;
&lt;li style="line-height: 2em;"&gt;}&lt;br /&gt;
&lt;br /&gt;
template&amp;lt; typename _Ty1, typename _Ty2 &amp;gt;&lt;/li&gt;
&lt;li style="line-height: 2em;"&gt;bool greater(const&amp;nbsp;PairEvaluate&amp;lt; _Ty1 &amp;gt;&amp;amp; first, const PairEvaluate&amp;lt; _Ty2 &amp;gt;&amp;amp; second)&lt;/li&gt;
&lt;li style="line-height: 2em;"&gt;{&lt;/li&gt;
&lt;li style="line-height: 2em; margin-left: 2em;"&gt;LogicalExpression greaterFirst(first.greater());&lt;/li&gt;
&lt;li style="line-height: 2em; margin-left: 2em;"&gt;LogicalExpression greaterSecond(first.equal());&lt;/li&gt;
&lt;li style="line-height: 2em; margin-left: 2em;"&gt;greaterSecond.and(second.greater());&lt;/li&gt;
&lt;li style="line-height: 2em; margin-left: 2em;"&gt;return greaterFirst.or(greaterSecond);&lt;/li&gt;
&lt;li style="line-height: 2em; margin-left: 2em;"&gt;//return first.greater() || (first.equal() &amp;amp;&amp;amp; second.greater());&lt;/li&gt;
&lt;li style="line-height: 2em;"&gt;}&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&#47560;&#51648;&#47561; &#51460;&#50640;&#45716; LogicalExpression &#50630;&#51060; &#46041;&#51068;&#54620; &#51032;&#48120;&#47484; &#54616;&#45716; &#53076;&#46300;&#47484; &#51201;&#50612;&#48420;&#45716;&#45936;&#50836;, &#50724;&#55176;&#47140; &#51060;&#54200;&#51060; &#51069;&#44592; &#51339;&#44400;&#50836;.&lt;/p&gt;
</source>
  <rights nil="true"></rights>
  <creator>http://heycalmdown.myid.net/</creator>
  <contributor_modified>http://heycalmdown.myid.net/</contributor_modified>
  <version type="integer">161</version>
  <tags></tags>
</page>
