{"id":321887,"date":"2021-04-22T15:00:09","date_gmt":"2021-04-22T15:00:09","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=321887"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=321887","title":{"rendered":"\u041a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044f \u0432\u043c\u0435\u0441\u0442\u043e \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u044f\u0437\u044b\u043a\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Delight"},"content":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3e5\/57e\/abe\/3e557eabe36f57202acf420d30c9c630.png\" width=\"400\" height=\"297\"><figcaption><\/figcaption><\/figure>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0434\u0438\u043d \u0438\u0437 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432 \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0443\u043f\u0435\u043d\u0438 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u044f \u041e\u041e\u041f (\u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f). \u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043a \u041e\u041e\u041f \u0441\u0442\u0440\u043e\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0438 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f, \u0447\u0442\u043e \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442 \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u044b\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u0438 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0443\u0436\u0435 \u0433\u043e\u0442\u043e\u0432\u043e\u0433\u043e \u043a\u043e\u0434\u0430. \u0421\u043e\u0437\u0434\u0430\u0432\u0430\u044f \u043d\u043e\u0432\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b, \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 (\u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%A0%D0%BE%D0%BC%D0%B1%D0%BE%D0%B2%D0%B8%D0%B4%D0%BD%D0%BE%D0%B5_%D0%BD%D0%B0%D1%81%D0%BB%D0%B5%D0%B4%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5\" rel=\"noopener noreferrer nofollow\">\u0440\u043e\u043c\u0431\u043e\u0432\u0438\u0434\u043d\u043e\u0433\u043e<\/a> \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f) \u0438\u043b\u0438 \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u043e\u0442 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0443\u0436\u0435 \u0443\u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 (<a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%A5%D1%80%D1%83%D0%BF%D0%BA%D0%B8%D0%B9_%D0%B1%D0%B0%D0%B7%D0%BE%D0%B2%D1%8B%D0%B9_%D0%BA%D0%BB%D0%B0%D1%81%D1%81\" rel=\"noopener noreferrer nofollow\">\u0445\u0440\u0443\u043f\u043a\u0438\u0439<\/a> (\u0438\u043b\u0438 \u0447\u0440\u0435\u0437\u043c\u0435\u0440\u043d\u043e \u0440\u0430\u0437\u0434\u0443\u0442\u044b\u0439) \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441). \u041f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u044f\u0437\u044b\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Delight \u0431\u044b\u043b \u0432\u044b\u0431\u0440\u0430\u043d \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438 \u0438 \u0438\u0445 \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u0435\u0439 &#8212; \u041a\u041e\u041f (\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043d\u043e-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435).<\/p>\n<h2>\u0421\u0440\u0430\u0437\u0443 \u043a \u0434\u0435\u043b\u0443<\/h2>\n<p>\u041d\u0430\u0447\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043b\u043e \u0431\u044b \u0441 \u043e\u0441\u043d\u043e\u0432 \u044f\u0437\u044b\u043a\u0430, \u0435\u0433\u043e \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430 \u0438 \u043f\u0440\u0430\u0432\u0438\u043b \u0440\u0430\u0431\u043e\u0442\u044b \u041a\u041e\u041f. \u041d\u043e \u044d\u0442\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u043a\u0443\u0447\u043d\u043e, \u0442\u0430\u043a \u0447\u0442\u043e \u0441\u0440\u0430\u0437\u0443 \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u0438\u0433\u0440\u043e\u0432\u043e\u043c\u0443 \u043f\u0440\u0438\u043c\u0435\u0440\u0443. \u0414\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0432\u0441\u0435\u0433\u043e \u043d\u0438\u0436\u0435\u0438\u0437\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0433\u043e, \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u043d\u0438\u0435 \u041e\u041e\u041f, \u0442\u0430\u043a \u043a\u0430\u043a \u0441\u0430\u043c\u0430 \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044f \u0441\u0442\u0440\u043e\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u0442\u0435\u0445 \u0436\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430\u0445 \u0447\u0442\u043e \u0438 \u041e\u041e\u041f. \u0411\u043e\u043b\u0435\u0435 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0435.<\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0437 \u0443\u0441\u043b\u043e\u0432\u043d\u043e\u0439 \u0438\u0433\u0440\u044b, \u0433\u0434\u0435 \u043d\u0435\u043a\u0438\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u043c\u043e\u0433\u0443\u0442 \u043f\u0435\u0440\u0435\u0434\u0432\u0438\u0433\u0430\u0442\u044c\u0441\u044f \u043f\u043e \u043a\u0430\u0440\u0442\u0435. \u041d\u0430\u043f\u0438\u0448\u0435\u043c \u043a\u043e\u0434 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u044d\u0442\u0438\u0445 \u0441\u0443\u0449\u0435\u0441\u0442\u0432. \u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432.<\/p>\n<pre><code class=\"delphi\">class BaseBehavior   unitPos: UnitPos [shared]   fn DoTurn [virtual]  class PathBuilder   unitPos: UnitPos [shared]   fn Moving:boolean [virtual]     ...   fn BuildPath(x:int, y:int) [virtual]     ...   \/\/ ... and some more helper functions ...<\/code><\/pre>\n<p>BaseBehavior &#8212; \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0431\u0430\u0437\u043e\u0432\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0430, \u0441\u0430\u043c \u043a\u043b\u0430\u0441\u0441 \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u043b\u043e\u0433\u0438\u043a\u0438, \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u0438. <\/p>\n<p>PathBuilder &#8212; \u043a\u043b\u0430\u0441\u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u043f\u043e\u0438\u0441\u043a \u043f\u0443\u0442\u0438 \u043f\u043e \u0437\u0435\u043c\u043b\u0435 (\u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043e\u0431\u0445\u043e\u0434 \u043f\u0440\u0435\u043f\u044f\u0442\u0441\u0442\u0432\u0438\u0439). <\/p>\n<p>\u041c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 [shared] \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0447\u0442\u043e \u044d\u0442\u043e \u043f\u043e\u043b\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u0449\u0438\u043c \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430.<\/p>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u043f\u0440\u043e\u043f\u0438\u0448\u0435\u043c \u043a\u043b\u0430\u0441\u0441\u044b, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043b\u043e\u0433\u0438\u043a\u0430 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"delphi\">class SimpleBehavior   base: BaseBehavior [shared]   path: PathBuilder [shared]      fne DoTurn \/\/ override of BaseBehavior.DoTurn     if path.Moving = false       path.BuildRandomPath  class AgressiveBehavior   open SimpleBehavior [shared]    fne DoTurn \/\/ override of SimpleBehavior.DoTurn     d: float = path.GetDistance(player.x, player.y) \/\/ get distance from this unit to player     if d &lt; 30       path.BuildPath(player.x, player.y) \/\/ run to player     else       nextFn \/\/ inherited call to next DoTurn \t\t\t class ScaredBehavior   open SimpleBehavior [shared] \t   fne DoTurn \/\/ override of SimpleBehavior.DoTurn     d: float = path.GetDistance(player.x, player.y) \/\/ get distance from this unit to player     if d &lt; 50       path.BuildPathAwayFrom(player.x, player.y) \/\/ run away from player     else       nextFn \/\/ inherited call to next DoTurn<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u0432\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e:<\/p>\n<p>SimpleBehavior &#8212; \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0442\u044c\u0441\u044f \u043f\u043e \u043a\u0430\u0440\u0442\u0435 \u043f\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430\u043c.<\/p>\n<p>AgressiveBehavior &#8212; \u0435\u0441\u043b\u0438 \u0438\u0433\u0440\u043e\u043a \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0431\u043b\u0438\u0437\u043a\u043e, \u0442\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u0431\u0435\u0436\u0438\u0442 \u043a \u043d\u0435\u043c\u0443. \u0418\u043d\u0430\u0447\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u044c\u0441\u044f \u0432 SimpleBehavior. <\/p>\n<p>ScaredBehavior &#8212; \u0435\u0441\u043b\u0438 \u0438\u0433\u0440\u043e\u043a \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043d\u0435\u0434\u0430\u043b\u0435\u043a\u043e, \u0442\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u043e\u0442\u0431\u0435\u0433\u0430\u0435\u0442 \u043e\u0442 \u043d\u0435\u0433\u043e \u0438\u043b\u0438 \u0434\u0432\u0438\u0433\u0430\u0435\u0442\u044c\u0441\u044f \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e SimpleBehavior. <\/p>\n<p>open &#8212; \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0435 \u043f\u043e\u043b\u0435 \u043a\u043b\u0430\u0441\u0441\u0430 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u043d\u043e \u0431\u0435\u0437 \u0438\u043c\u0435\u043d\u0438. <\/p>\n<p>fne &#8212; \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u043a\u0430 (override) \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. <\/p>\n<p>nextFn &#8212; \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u044b\u0437\u043e\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0432 \u0446\u0435\u043f\u043e\u0447\u043a\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<p>\u041f\u043e\u043a\u0430 \u0447\u0442\u043e \u0432\u0435\u0441\u044c \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e \u041e\u041e\u041f, \u043d\u043e \u0434\u043b\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u041a\u041e\u041f:<\/p>\n<pre><code class=\"delphi\">class UncertainBehavior   open AgressiveBehavior [shared]   open ScaredBehavior [shared]<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u0443\u0436\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f &#171;\u043c\u0430\u0433\u0438\u044f&#187; \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u0438. \u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u043c \u043a\u043e\u0434\u0435, \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 DoTurn, \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u0432 AgressiveBehavior.DoTurn. \u0415\u0441\u043b\u0438 \u0438\u0433\u0440\u043e\u043a \u0431\u043b\u0438\u0437\u043a\u043e, \u0442\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0431\u0435\u0436\u0438\u0442 \u043a \u043d\u0435\u043c\u0443. \u0415\u0441\u043b\u0438 \u043d\u0435\u0442, \u0442\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442 \u043a ScaredBehavior.DoTurn &#8212; \u0435\u0441\u043b\u0438 \u0438\u0433\u0440\u043e\u043a \u043d\u0435\u0434\u0430\u043b\u0435\u043a\u043e, \u0442\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u0443\u0431\u0435\u0433\u0430\u0435\u0442 \u043e\u0442 \u043d\u0435\u0433\u043e. \u0415\u0441\u043b\u0438 \u043d\u0435\u0442, \u0442\u043e \u0434\u0430\u043b\u044c\u0448\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f SimpleBehavior.DoTurn \u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0431\u0440\u043e\u0434\u0438\u0442 \u043f\u043e \u043a\u0430\u0440\u0442\u0435.<\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u043a\u043e\u0434\u0435 \u0443\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432 \u0412\u043e\u043b\u043a\u0430 (AgressiveBehavior), \u0417\u0430\u0439\u0446\u0430 (ScaredBehavior) \u0438 \u041a\u043e\u0448\u043a\u0443 (UncertainBehavior). \u041d\u043e \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u0432\u0438\u0434\u043e\u0432 \u0441\u0443\u0449\u0435\u0441\u0442\u0432? \u041b\u0435\u0442\u0430\u044e\u0449\u0438\u0445 \u0438\u043b\u0438 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0438\u0445? \u0418\u043b\u0438 \u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445? \u0412 \u041e\u041e\u041f \u043f\u043e\u0434\u043e\u0431\u043d\u0430\u044f \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u044f \u0443\u0436\u0435 \u043d\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0417\u0430\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044f. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u0443\u0442\u0438 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0440\u0435\u0434\u0430\u0445:<\/p>\n<pre><code class=\"delphi\">class PathBuilder_air \/\/ \u043f\u043e\u0438\u0441\u043a \u043f\u0443\u0442\u0438 \u043f\u043e \u0432\u043e\u0437\u0434\u0443\u0445\u0443   path: PathBuilder [shared]   fne BuildPath(x:int, y:int)     ... class PathBuilder_water \/\/ \u043f\u043e\u0438\u0441\u043a \u043f\u0443\u0442\u0438 \u0432 \u0432\u043e\u0434\u0435   path: PathBuilder [shared]   fne BuildPath(x:int, y:int)     ...<\/code><\/pre>\n<p>\u0410 \u0434\u0430\u043b\u044c\u0448\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0434\u043c\u0435\u043d\u0438\u043c \u044d\u0442\u0438\u043c\u0438 \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"delphi\">class Shark   open PathBuilder_water [shared]   open AgressiveBehavior [shared]<\/code><\/pre>\n<p>\u0412 \u044d\u0442\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435 &#171;\u0410\u043a\u0443\u043b\u044b&#187;, \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u043a\u043b\u0430\u0441\u0441 \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u0443\u0442\u0438 \u043f\u043e \u0432\u043e\u0434\u0435, \u0434\u0430\u043b\u044c\u0448\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u0434 \u0441 AgressiveBehavior, \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f, \u0447\u0442\u043e \u043a\u043b\u0430\u0441\u0441 PathBuilder \u043e\u0431\u0449\u0438\u0439 (shared), \u0442\u043e \u0432 AgressiveBehavior (\u043a\u0430\u043a \u0438 \u0432 SimpleBehavior) \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f PathBuilder_water (\u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d \u0431\u044b\u043b \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d \u0440\u0430\u043d\u0435\u0435 \u0447\u0435\u043c \u043e\u0431\u044b\u0447\u043d\u044b\u0439 PathBuilder). \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432\u0441\u044f \u043b\u043e\u0433\u0438\u043a\u0430 AgressiveBehavior \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043b\u0430\u0441\u044c, \u043d\u043e \u043f\u043e\u0438\u0441\u043a \u043f\u0443\u0442\u0438 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0443\u0436\u0435 \u043f\u043e \u0432\u043e\u0434\u0435. \u0422\u0430\u043a\u0438\u043c \u0436\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c, \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u044f \u043a\u043b\u0430\u0441\u0441\u044b-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043a\u043e\u0434\u0430, \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u043c \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0440\u0435\u0434\u0430\u0445 \u043e\u0431\u0438\u0442\u0430\u043d\u0438\u044f:<\/p>\n<pre><code class=\"delphi\">class Fish   open PathBuilder_water [shared]   open ScaredBehavior [shared] \t class Eagle   open PathBuilder_air [shared]   open UncertainBehavior [shared] \t class Pigeon   open PathBuilder_air [shared]   open ScaredBehavior [shared] \t class Wolf   open AgressiveBehavior [shared]<\/code><\/pre>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c, \u0441\u0443\u0442\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043d\u043e-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 \u044d\u0442\u0438\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0432 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u0435-\u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438.<\/p>\n<h2>\u041e\u0441\u043d\u043e\u0432\u044b \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0432 Delight<\/h2>\n<p>\u041e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0430 \u0432 Delight \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"delphi\">class NonVirtualClass   val: OtherClass   fn SomeFn     Trace('Hello world')<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c val \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0431\u044b\u0447\u043d\u044b\u043c \u0447\u043b\u0435\u043d\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0430, \u0441 \u0442\u0438\u043f\u043e\u043c OtherClass.<\/p>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u0430\u043a \u0438 \u0432 \u041e\u041e\u041f \u044f\u0437\u044b\u043a\u0430\u0445 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c\u0438, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 [virtual]<\/p>\n<pre><code class=\"delphi\">fn SomeFn [virtual]   Trace('Hello virtual world')<\/code><\/pre>\n<p>\u0438 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0430\u0442\u044c\u0441\u044f\/\u0434\u043e\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430 fne (\u0432\u043c\u0435\u0441\u0442\u043e fn)<\/p>\n<pre><code class=\"delphi\">fne SomeFn   Trace('Hello overrided world')<\/code><\/pre>\n<p>\u0410 \u0432\u043e\u0442 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f (\u0432\u0435\u0440\u043d\u0435\u0435 \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u0438) \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u044f\u0437\u044b\u043a\u043e\u0432. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u043a\u043b\u0430\u0441\u0441 \u0445\u043e\u0447\u0435\u0442 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0441\u0432\u043e\u0435\u0433\u043e \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430, \u043e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0441 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u043c [shared] (\u043e\u0431\u0449\u0438\u0439), \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c fne \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u043a\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:<\/p>\n<pre><code class=\"delphi\">class BaseClass   fn SomeFn [virtual]     Trace('Hello virtual world')  class NewClass   base: BaseClass [shared]   fne SomeFn     Trace('Hello overrided world')     nextFn<\/code><\/pre>\n<p>\u041a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e nextFn \u0432\u044b\u0437\u043e\u0432\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0432 \u0446\u0435\u043f\u043e\u0447\u043a\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432.<\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043f\u043e\u0445\u043e\u0436\u0438\u0439 (\u043d\u043e \u043d\u0435 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u044b\u0439) \u043a\u043e\u0434 \u043d\u0430 \u0421++<\/p>\n<pre><code class=\"cpp\">class BaseClass { public:   virtual void SomeFn()   {     Trace('Hello virtual world');   } };  class NewClass : public virtual BaseClass {   virtual void SomeFn() override   {     Trace('Hello overrided world');     BaseClass::SomeFn();   } };<\/code><\/pre>\n<p>\u0412 \u043a\u043b\u0430\u0441\u0441\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u043b\u0435\u0439 \u0441 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u043c [shared], \u0447\u0442\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f. \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, shared \u043f\u043e\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c\u0441\u044f \u0432 \u043b\u044e\u0431\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438 \u043a\u043b\u0430\u0441\u0441\u0430, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u0435, \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 [shared] \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u0439 \u043e\u0434\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430, \u0441\u043e\u0437\u0434\u0430\u0441\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u043e\u0431\u0449\u0438\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u044d\u0442\u043e\u0433\u043e \u0442\u0438\u043f\u0430, \u0430 \u0432\u0441\u0435 [shared] \u043f\u043e\u043b\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u0442\u0438\u043f\u0430 \u0432\u043e \u0432\u0441\u0435\u0445 \u043e\u0431\u0449\u0438\u0445 \u043a\u043b\u0430\u0441\u0441\u0430\u0445 \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u044d\u0442\u043e\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 (\u0432\u0435\u0440\u043d\u0435\u0435 \u0437\u0430\u043f\u0438\u0441\u044c \u0432 vtable).<\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0432 \u043a\u043e\u0434\u0435:<\/p>\n<pre><code class=\"delphi\">class Base   val: int \t class ClsA   base: Base [shared] \t class ClsB   base: Base [shared] \t class ClsC   a: ClsA [shared]   b: ClsB [shared]<\/code><\/pre>\n<p>\u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043a\u043b\u0430\u0441\u0441\u0430 ClsC, \u044d\u0442\u043e\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0442\u0440\u0438 \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0432 \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u043e\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0435 (Base, ClsA, ClsB) \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 val \u0431\u0443\u0434\u0435\u0442 \u0432\u0441\u0435\u0433\u0434\u0430 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c (\u043e\u0431\u0449\u0438\u043c) \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u044d\u0442\u0438\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432. \u041f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044e \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u0421++.<\/p>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u0438\u0437 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430, \u0443 \u043e\u0431\u0449\u0438\u0445 \u043f\u043e\u043b\u0435\u0439 \u043f\u0440\u0438 \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0437\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u0442\u0430\u043a\u0436\u0435 \u0438\u043c\u0435\u043d\u0430 (\u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u041e\u041e\u041f, \u0433\u0434\u0435 \u043f\u0440\u0438 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0438, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0442\u0438\u043f), \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a \u0442\u0430\u043a\u043e\u043c\u0443 \u043f\u043e\u043b\u044e \u0434\u043e\u043b\u0436\u043d\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c\u0441\u044f \u0441 \u0438\u043c\u0435\u043d\u0438 \u043f\u043e\u043b\u044f. \u041e\u0434\u043d\u0430\u043a\u043e \u0432 Delight \u0435\u0441\u0442\u044c \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u0430\u0445\u0430\u0440 \u0432 \u0432\u0438\u0434\u0435 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u0435\u0439 \u0447\u0435\u0440\u0435\u0437 \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e open (\u0434\u0435\u043b\u0430\u0435\u0442 \u043f\u043e\u043b\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c). \u0414\u043b\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u044d\u0442\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442, \u043d\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0443 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u0442\u0430\u043a\u043e\u043c\u0443 \u043f\u043e\u043b\u044e \u043f\u043e \u0438\u043c\u0435\u043d\u0438 (\u0432\u0441\u0435 \u043f\u043e\u043b\u044f \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0447\u0435\u0440\u0435\u0437 this).<\/p>\n<pre><code class=\"delphi\">class ClsA   open Base [shared]   fne Constructor     val = 10<\/code><\/pre>\n<h2>\u041e\u0431\u0445\u043e\u0434 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439<\/h2>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0442\u0430\u043a\u0430\u044f \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u044f \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0437\u0430\u0446\u0438\u043a\u043b\u0435\u043d\u043d\u044b\u0439 \u0433\u0440\u0430\u0444, \u0442\u043e \u043e\u0431\u0445\u043e\u0434 \u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u0447\u0435\u043c \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0434\u0435\u0440\u0435\u0432\u0430 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438 \u0432 \u041e\u041e\u041f. \u041f\u043e \u0441\u0443\u0442\u0438, \u043f\u0440\u0438 \u0441\u0442\u0440\u043e\u0438\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0435 \u043a\u043b\u0430\u0441\u0441\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430:<\/p>\n<ul>\n<li>\n<p>\u041a\u043b\u0430\u0441\u0441 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0441\u0432\u0435\u0440\u0445\u0443 \u0432\u043d\u0438\u0437, \u0435\u0441\u043b\u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u043e\u0431\u0449\u0438\u0439 (shared) \u043a\u043b\u0430\u0441\u0441, \u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441\u0442\u0440\u043e\u0438\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0432 \u043f\u043e\u043b\u0435 \u043e\u0431\u0449\u0438\u0439 (shared) \u043a\u043b\u0430\u0441\u0441 \u0442\u0430\u043a\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0443\u0436\u0435 \u0431\u044b\u043b \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d, \u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u0443\u0436\u0435 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441.<\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0430\u043a\u0438\u043c \u0436\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0441\u0442\u0440\u043e\u0438\u0442\u044c\u0441\u044f \u0446\u0435\u043f\u043e\u0447\u043a\u0430 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043d\u043e \u0441 \u0434\u0432\u0443\u043c\u044f \u0432\u0430\u0436\u043d\u044b\u043c \u0434\u0435\u0442\u0430\u043b\u044f\u043c\u0438: <\/p>\n<ul>\n<li>\n<p>\u0412 \u0446\u0435\u043f\u043e\u0447\u043a\u0443 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u0437 \u0442\u0435\u043b\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430, \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u043d\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u0437 \u043e\u0431\u0449\u0438\u0445 \u043f\u043e\u043b\u0435\u0439 \u043a\u043b\u0430\u0441\u0441\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0414\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u0442\u043e\u044f\u0442\u044c \u0432 \u043a\u043e\u043d\u0446\u0435 \u0446\u0435\u043f\u043e\u0447\u043a\u0438 \u0432\u044b\u0437\u043e\u0432\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0432 \u0446\u0435\u043f\u043e\u0447\u043a\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 nextFn. \u0412\u0430\u0436\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u043e \u0441\u0443\u0442\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c \u0432\u044b\u0437\u043e\u0432\u043e\u043c (virtual call), \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u041e\u041e\u041f (inherited call).<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"delphi\">class Base   fn SomeVirtFn [virtual]     Trace('Base') \t class ClsA   open Base [shared]   fne SomeVirtFn     Trace('ClsA') \t class ClsB   open Base [shared]   fne SomeVirtFn     Trace('ClsB') \t class ClsC   open ClsA [shared]   open ClsB [shared]   fne SomeVirtFn     Trace('ClsC') ....    fn Main     c: ClsC     c.SomeVirtFn<\/code><\/pre>\n<p>\u0432\u044b\u0434\u0430\u0441\u0442:<\/p>\n<pre><code>  ClsC   ClsA   ClsB   Base<\/code><\/pre>\n<p>\u0422\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430, \u0434\u0440\u0443\u0433\u0438\u043c, \u043d\u0430\u0445\u043e\u0434\u044f\u0441\u044c \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u044d\u0442\u043e\u043c\u0443, \u043a\u043b\u0430\u0441\u0441\u044b \u043c\u043e\u0433\u0443\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u0442\u044c \u0438\u0437 \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0435\u0440\u0435\u043a\u0440\u044b\u0432\u0430\u044e\u0442 \u0438\u043b\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u044f\u044e\u0442 \u0447\u0443\u0436\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0447\u0442\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043e\u0431\u043b\u0435\u0433\u0447\u0430\u0435\u0442 \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044e \u043a\u043e\u0434\u0430. \u041f\u0440\u0438 \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u0438, \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0440\u0430\u0437\u0431\u0438\u0442 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u043a\u0438\u0440\u043f\u0438\u0447\u0438\u043a\u043e\u0432, \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438 \u0434\u0430\u0435\u0442 \u043d\u0443\u0436\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b. \u0422\u0430\u043a\u0436\u0435 Delight \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044e \u043a\u043e\u0434\u0430, \u043d\u043e \u044d\u0442\u043e \u0443\u0436\u0435 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438.<\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/553824\/\"> https:\/\/habr.com\/ru\/post\/553824\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0434\u0438\u043d \u0438\u0437 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432 \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0443\u043f\u0435\u043d\u0438 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u044f \u041e\u041e\u041f (\u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f). \u041a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043a \u041e\u041e\u041f \u0441\u0442\u0440\u043e\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0438 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f, \u0447\u0442\u043e \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043d\u0430\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442 \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u044b\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e \u0438 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0443\u0436\u0435 \u0433\u043e\u0442\u043e\u0432\u043e\u0433\u043e \u043a\u043e\u0434\u0430. \u0421\u043e\u0437\u0434\u0430\u0432\u0430\u044f \u043d\u043e\u0432\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b, \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 (\u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 <a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%A0%D0%BE%D0%BC%D0%B1%D0%BE%D0%B2%D0%B8%D0%B4%D0%BD%D0%BE%D0%B5_%D0%BD%D0%B0%D1%81%D0%BB%D0%B5%D0%B4%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5\" rel=\"noopener noreferrer nofollow\">\u0440\u043e\u043c\u0431\u043e\u0432\u0438\u0434\u043d\u043e\u0433\u043e<\/a> \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f) \u0438\u043b\u0438 \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u043e\u0442 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0443\u0436\u0435 \u0443\u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 (<a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%A5%D1%80%D1%83%D0%BF%D0%BA%D0%B8%D0%B9_%D0%B1%D0%B0%D0%B7%D0%BE%D0%B2%D1%8B%D0%B9_%D0%BA%D0%BB%D0%B0%D1%81%D1%81\" rel=\"noopener noreferrer nofollow\">\u0445\u0440\u0443\u043f\u043a\u0438\u0439<\/a> (\u0438\u043b\u0438 \u0447\u0440\u0435\u0437\u043c\u0435\u0440\u043d\u043e \u0440\u0430\u0437\u0434\u0443\u0442\u044b\u0439) \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441). \u041f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u044f\u0437\u044b\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Delight \u0431\u044b\u043b \u0432\u044b\u0431\u0440\u0430\u043d \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438 \u0438 \u0438\u0445 \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u0435\u0439 &#8212; \u041a\u041e\u041f (\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043d\u043e-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435).<\/p>\n<h2>\u0421\u0440\u0430\u0437\u0443 \u043a \u0434\u0435\u043b\u0443<\/h2>\n<p>\u041d\u0430\u0447\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043b\u043e \u0431\u044b \u0441 \u043e\u0441\u043d\u043e\u0432 \u044f\u0437\u044b\u043a\u0430, \u0435\u0433\u043e \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430 \u0438 \u043f\u0440\u0430\u0432\u0438\u043b \u0440\u0430\u0431\u043e\u0442\u044b \u041a\u041e\u041f. \u041d\u043e \u044d\u0442\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u043a\u0443\u0447\u043d\u043e, \u0442\u0430\u043a \u0447\u0442\u043e \u0441\u0440\u0430\u0437\u0443 \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u0438\u0433\u0440\u043e\u0432\u043e\u043c\u0443 \u043f\u0440\u0438\u043c\u0435\u0440\u0443. \u0414\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0432\u0441\u0435\u0433\u043e \u043d\u0438\u0436\u0435\u0438\u0437\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0433\u043e, \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u043d\u0438\u0435 \u041e\u041e\u041f, \u0442\u0430\u043a \u043a\u0430\u043a \u0441\u0430\u043c\u0430 \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044f \u0441\u0442\u0440\u043e\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u0442\u0435\u0445 \u0436\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430\u0445 \u0447\u0442\u043e \u0438 \u041e\u041e\u041f. \u0411\u043e\u043b\u0435\u0435 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0435.<\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0437 \u0443\u0441\u043b\u043e\u0432\u043d\u043e\u0439 \u0438\u0433\u0440\u044b, \u0433\u0434\u0435 \u043d\u0435\u043a\u0438\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u043c\u043e\u0433\u0443\u0442 \u043f\u0435\u0440\u0435\u0434\u0432\u0438\u0433\u0430\u0442\u044c\u0441\u044f \u043f\u043e \u043a\u0430\u0440\u0442\u0435. \u041d\u0430\u043f\u0438\u0448\u0435\u043c \u043a\u043e\u0434 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u044d\u0442\u0438\u0445 \u0441\u0443\u0449\u0435\u0441\u0442\u0432. \u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432.<\/p>\n<pre><code class=\"delphi\">class BaseBehavior   unitPos: UnitPos [shared]   fn DoTurn [virtual]  class PathBuilder   unitPos: UnitPos [shared]   fn Moving:boolean [virtual]     ...   fn BuildPath(x:int, y:int) [virtual]     ...   \/\/ ... and some more helper functions ...<\/code><\/pre>\n<p>BaseBehavior &#8212; \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0431\u0430\u0437\u043e\u0432\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0430, \u0441\u0430\u043c \u043a\u043b\u0430\u0441\u0441 \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u043b\u043e\u0433\u0438\u043a\u0438, \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u0438. <\/p>\n<p>PathBuilder &#8212; \u043a\u043b\u0430\u0441\u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u043f\u043e\u0438\u0441\u043a \u043f\u0443\u0442\u0438 \u043f\u043e \u0437\u0435\u043c\u043b\u0435 (\u0432\u043a\u043b\u044e\u0447\u0430\u044f \u043e\u0431\u0445\u043e\u0434 \u043f\u0440\u0435\u043f\u044f\u0442\u0441\u0442\u0432\u0438\u0439). <\/p>\n<p>\u041c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 [shared] \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0447\u0442\u043e \u044d\u0442\u043e \u043f\u043e\u043b\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u0449\u0438\u043c \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043f\u043e\u0434\u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430.<\/p>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u043f\u0440\u043e\u043f\u0438\u0448\u0435\u043c \u043a\u043b\u0430\u0441\u0441\u044b, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043b\u043e\u0433\u0438\u043a\u0430 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"delphi\">class SimpleBehavior   base: BaseBehavior [shared]   path: PathBuilder [shared]      fne DoTurn \/\/ override of BaseBehavior.DoTurn     if path.Moving = false       path.BuildRandomPath  class AgressiveBehavior   open SimpleBehavior [shared]    fne DoTurn \/\/ override of SimpleBehavior.DoTurn     d: float = path.GetDistance(player.x, player.y) \/\/ get distance from this unit to player     if d &lt; 30       path.BuildPath(player.x, player.y) \/\/ run to player     else       nextFn \/\/ inherited call to next DoTurn \t\t\t class ScaredBehavior   open SimpleBehavior [shared] \t   fne DoTurn \/\/ override of SimpleBehavior.DoTurn     d: float = path.GetDistance(player.x, player.y) \/\/ get distance from this unit to player     if d &lt; 50       path.BuildPathAwayFrom(player.x, player.y) \/\/ run away from player     else       nextFn \/\/ inherited call to next DoTurn<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u0432\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e:<\/p>\n<p>SimpleBehavior &#8212; \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0442\u044c\u0441\u044f \u043f\u043e \u043a\u0430\u0440\u0442\u0435 \u043f\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430\u043c.<\/p>\n<p>AgressiveBehavior &#8212; \u0435\u0441\u043b\u0438 \u0438\u0433\u0440\u043e\u043a \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0431\u043b\u0438\u0437\u043a\u043e, \u0442\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u0431\u0435\u0436\u0438\u0442 \u043a \u043d\u0435\u043c\u0443. \u0418\u043d\u0430\u0447\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u044c\u0441\u044f \u0432 SimpleBehavior. <\/p>\n<p>ScaredBehavior &#8212; \u0435\u0441\u043b\u0438 \u0438\u0433\u0440\u043e\u043a \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043d\u0435\u0434\u0430\u043b\u0435\u043a\u043e, \u0442\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u043e\u0442\u0431\u0435\u0433\u0430\u0435\u0442 \u043e\u0442 \u043d\u0435\u0433\u043e \u0438\u043b\u0438 \u0434\u0432\u0438\u0433\u0430\u0435\u0442\u044c\u0441\u044f \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e SimpleBehavior. <\/p>\n<p>open &#8212; \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0435 \u043f\u043e\u043b\u0435 \u043a\u043b\u0430\u0441\u0441\u0430 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u043d\u043e \u0431\u0435\u0437 \u0438\u043c\u0435\u043d\u0438. <\/p>\n<p>fne &#8212; \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u043a\u0430 (override) \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. <\/p>\n<p>nextFn &#8212; \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u044b\u0437\u043e\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0432 \u0446\u0435\u043f\u043e\u0447\u043a\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<p>\u041f\u043e\u043a\u0430 \u0447\u0442\u043e \u0432\u0435\u0441\u044c \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e \u041e\u041e\u041f, \u043d\u043e \u0434\u043b\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u041a\u041e\u041f:<\/p>\n<pre><code class=\"delphi\">class UncertainBehavior   open AgressiveBehavior [shared]   open ScaredBehavior [shared]<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u0443\u0436\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f &#171;\u043c\u0430\u0433\u0438\u044f&#187; \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u0438. \u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u043c \u043a\u043e\u0434\u0435, \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 DoTurn, \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f \u0432 AgressiveBehavior.DoTurn. \u0415\u0441\u043b\u0438 \u0438\u0433\u0440\u043e\u043a \u0431\u043b\u0438\u0437\u043a\u043e, \u0442\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u0431\u0435\u0436\u0438\u0442 \u043a \u043d\u0435\u043c\u0443. \u0415\u0441\u043b\u0438 \u043d\u0435\u0442, \u0442\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442 \u043a ScaredBehavior.DoTurn &#8212; \u0435\u0441\u043b\u0438 \u0438\u0433\u0440\u043e\u043a \u043d\u0435\u0434\u0430\u043b\u0435\u043a\u043e, \u0442\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u0443\u0431\u0435\u0433\u0430\u0435\u0442 \u043e\u0442 \u043d\u0435\u0433\u043e. \u0415\u0441\u043b\u0438 \u043d\u0435\u0442, \u0442\u043e \u0434\u0430\u043b\u044c\u0448\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f SimpleBehavior.DoTurn \u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0431\u0440\u043e\u0434\u0438\u0442 \u043f\u043e \u043a\u0430\u0440\u0442\u0435.<\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u043a\u043e\u0434\u0435 \u0443\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432 \u0412\u043e\u043b\u043a\u0430 (AgressiveBehavior), \u0417\u0430\u0439\u0446\u0430 (ScaredBehavior) \u0438 \u041a\u043e\u0448\u043a\u0443 (UncertainBehavior). \u041d\u043e \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0434\u043b\u044f \u0434\u0440\u0443\u0433\u0438\u0445 \u0432\u0438\u0434\u043e\u0432 \u0441\u0443\u0449\u0435\u0441\u0442\u0432? \u041b\u0435\u0442\u0430\u044e\u0449\u0438\u0445 \u0438\u043b\u0438 \u043f\u043b\u0430\u0432\u0430\u044e\u0449\u0438\u0445? \u0418\u043b\u0438 \u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445? \u0412 \u041e\u041e\u041f \u043f\u043e\u0434\u043e\u0431\u043d\u0430\u044f \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u044f \u0443\u0436\u0435 \u043d\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0417\u0430\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044f. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u0443\u0442\u0438 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0440\u0435\u0434\u0430\u0445:<\/p>\n<pre><code class=\"delphi\">class PathBuilder_air \/\/ \u043f\u043e\u0438\u0441\u043a \u043f\u0443\u0442\u0438 \u043f\u043e \u0432\u043e\u0437\u0434\u0443\u0445\u0443   path: PathBuilder [shared]   fne BuildPath(x:int, y:int)     ... class PathBuilder_water \/\/ \u043f\u043e\u0438\u0441\u043a \u043f\u0443\u0442\u0438 \u0432 \u0432\u043e\u0434\u0435   path: PathBuilder [shared]   fne BuildPath(x:int, y:int)     ...<\/code><\/pre>\n<p>\u0410 \u0434\u0430\u043b\u044c\u0448\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0434\u043c\u0435\u043d\u0438\u043c \u044d\u0442\u0438\u043c\u0438 \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"delphi\">class Shark   open PathBuilder_water [shared]   open AgressiveBehavior [shared]<\/code><\/pre>\n<p>\u0412 \u044d\u0442\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435 &#171;\u0410\u043a\u0443\u043b\u044b&#187;, \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0441\u044f \u043a\u043b\u0430\u0441\u0441 \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u0443\u0442\u0438 \u043f\u043e \u0432\u043e\u0434\u0435, \u0434\u0430\u043b\u044c\u0448\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u0434 \u0441 AgressiveBehavior, \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f, \u0447\u0442\u043e \u043a\u043b\u0430\u0441\u0441 PathBuilder \u043e\u0431\u0449\u0438\u0439 (shared), \u0442\u043e \u0432 AgressiveBehavior (\u043a\u0430\u043a \u0438 \u0432 SimpleBehavior) \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f PathBuilder_water (\u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d \u0431\u044b\u043b \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d \u0440\u0430\u043d\u0435\u0435 \u0447\u0435\u043c \u043e\u0431\u044b\u0447\u043d\u044b\u0439 PathBuilder). \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432\u0441\u044f \u043b\u043e\u0433\u0438\u043a\u0430 AgressiveBehavior \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043b\u0430\u0441\u044c, \u043d\u043e \u043f\u043e\u0438\u0441\u043a \u043f\u0443\u0442\u0438 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0443\u0436\u0435 \u043f\u043e \u0432\u043e\u0434\u0435. \u0422\u0430\u043a\u0438\u043c \u0436\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c, \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u044f \u043a\u043b\u0430\u0441\u0441\u044b-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043a\u043e\u0434\u0430, \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432 \u0441 \u0440\u0430\u0437\u043d\u044b\u043c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435\u043c \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0440\u0435\u0434\u0430\u0445 \u043e\u0431\u0438\u0442\u0430\u043d\u0438\u044f:<\/p>\n<pre><code class=\"delphi\">class Fish   open PathBuilder_water [shared]   open ScaredBehavior [shared] \t class Eagle   open PathBuilder_air [shared]   open UncertainBehavior [shared] \t class Pigeon   open PathBuilder_air [shared]   open ScaredBehavior [shared] \t class Wolf   open AgressiveBehavior [shared]<\/code><\/pre>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c, \u0441\u0443\u0442\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043d\u043e-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432-\u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 \u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 \u044d\u0442\u0438\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0432 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u0435-\u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438.<\/p>\n<h2>\u041e\u0441\u043d\u043e\u0432\u044b \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0432 Delight<\/h2>\n<p>\u041e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0430 \u0432 Delight \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"delphi\">class NonVirtualClass   val: OtherClass   fn SomeFn     Trace('Hello world')<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c val \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0431\u044b\u0447\u043d\u044b\u043c \u0447\u043b\u0435\u043d\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0430, \u0441 \u0442\u0438\u043f\u043e\u043c OtherClass.<\/p>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u0430\u043a \u0438 \u0432 \u041e\u041e\u041f \u044f\u0437\u044b\u043a\u0430\u0445 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c\u0438, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 [virtual]<\/p>\n<pre><code class=\"delphi\">fn SomeFn [virtual]   Trace('Hello virtual world')<\/code><\/pre>\n<p>\u0438 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0430\u0442\u044c\u0441\u044f\/\u0434\u043e\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430 fne (\u0432\u043c\u0435\u0441\u0442\u043e fn)<\/p>\n<pre><code class=\"delphi\">fne SomeFn   Trace('Hello overrided world')<\/code><\/pre>\n<p>\u0410 \u0432\u043e\u0442 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f (\u0432\u0435\u0440\u043d\u0435\u0435 \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u0438) \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u044f\u0437\u044b\u043a\u043e\u0432. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u043a\u043b\u0430\u0441\u0441 \u0445\u043e\u0447\u0435\u0442 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0441\u0432\u043e\u0435\u0433\u043e \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430, \u043e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0441 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u043c [shared] (\u043e\u0431\u0449\u0438\u0439), \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c fne \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u043a\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:<\/p>\n<pre><code class=\"delphi\">class BaseClass   fn SomeFn [virtual]     Trace('Hello virtual world')  class NewClass   base: BaseClass [shared]   fne SomeFn     Trace('Hello overrided world')     nextFn<\/code><\/pre>\n<p>\u041a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e nextFn \u0432\u044b\u0437\u043e\u0432\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0432 \u0446\u0435\u043f\u043e\u0447\u043a\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432.<\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043f\u043e\u0445\u043e\u0436\u0438\u0439 (\u043d\u043e \u043d\u0435 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u044b\u0439) \u043a\u043e\u0434 \u043d\u0430 \u0421++<\/p>\n<pre><code class=\"cpp\">class BaseClass { public:   virtual void SomeFn()   {     Trace('Hello virtual world');   } };  class NewClass : public virtual BaseClass {   virtual void SomeFn() override   {     Trace('Hello overrided world');     BaseClass::SomeFn();   } };<\/code><\/pre>\n<p>\u0412 \u043a\u043b\u0430\u0441\u0441\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u043b\u0435\u0439 \u0441 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u043c [shared], \u0447\u0442\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f. \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, shared \u043f\u043e\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c\u0441\u044f \u0432 \u043b\u044e\u0431\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438 \u043a\u043b\u0430\u0441\u0441\u0430, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u0435, \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 [shared] \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u0439 \u043e\u0434\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430, \u0441\u043e\u0437\u0434\u0430\u0441\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u043e\u0431\u0449\u0438\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u044d\u0442\u043e\u0433\u043e \u0442\u0438\u043f\u0430, \u0430 \u0432\u0441\u0435 [shared] \u043f\u043e\u043b\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u0442\u0438\u043f\u0430 \u0432\u043e \u0432\u0441\u0435\u0445 \u043e\u0431\u0449\u0438\u0445 \u043a\u043b\u0430\u0441\u0441\u0430\u0445 \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u044d\u0442\u043e\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 (\u0432\u0435\u0440\u043d\u0435\u0435 \u0437\u0430\u043f\u0438\u0441\u044c \u0432 vtable).<\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0432 \u043a\u043e\u0434\u0435:<\/p>\n<pre><code class=\"delphi\">class Base   val: int \t class ClsA   base: Base [shared] \t class ClsB   base: Base [shared] \t class ClsC   a: ClsA [shared]   b: ClsB [shared]<\/code><\/pre>\n<p>\u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043a\u043b\u0430\u0441\u0441\u0430 ClsC, \u044d\u0442\u043e\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0442\u0440\u0438 \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0432 \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u043e\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0435 (Base, ClsA, ClsB) \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 val \u0431\u0443\u0434\u0435\u0442 \u0432\u0441\u0435\u0433\u0434\u0430 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c (\u043e\u0431\u0449\u0438\u043c) \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u044d\u0442\u0438\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432. \u041f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044e \u043a\u043b\u0430\u0441\u0441\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u0421++.<\/p>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u0438\u0437 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430, \u0443 \u043e\u0431\u0449\u0438\u0445 \u043f\u043e\u043b\u0435\u0439 \u043f\u0440\u0438 \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0437\u0430\u0434\u0430\u044e\u0442\u0441\u044f \u0442\u0430\u043a\u0436\u0435 \u0438\u043c\u0435\u043d\u0430 (\u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u041e\u041e\u041f, \u0433\u0434\u0435 \u043f\u0440\u0438 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0438, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0442\u0438\u043f), \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a \u0442\u0430\u043a\u043e\u043c\u0443 \u043f\u043e\u043b\u044e \u0434\u043e\u043b\u0436\u043d\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c\u0441\u044f \u0441 \u0438\u043c\u0435\u043d\u0438 \u043f\u043e\u043b\u044f. \u041e\u0434\u043d\u0430\u043a\u043e \u0432 Delight \u0435\u0441\u0442\u044c \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u0430\u0445\u0430\u0440 \u0432 \u0432\u0438\u0434\u0435 \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u0435\u0439 \u0447\u0435\u0440\u0435\u0437 \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e open (\u0434\u0435\u043b\u0430\u0435\u0442 \u043f\u043e\u043b\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c). \u0414\u043b\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u044d\u0442\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442, \u043d\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0443 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u0442\u0430\u043a\u043e\u043c\u0443 \u043f\u043e\u043b\u044e \u043f\u043e \u0438\u043c\u0435\u043d\u0438 (\u0432\u0441\u0435 \u043f\u043e\u043b\u044f \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0447\u0435\u0440\u0435\u0437 this).<\/p>\n<pre><code class=\"delphi\">class ClsA   open Base [shared]   fne Constructor     val = 10<\/code><\/pre>\n<h2>\u041e\u0431\u0445\u043e\u0434 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439<\/h2>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0442\u0430\u043a\u0430\u044f \u0434\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u044f \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0437\u0430\u0446\u0438\u043a\u043b\u0435\u043d\u043d\u044b\u0439 \u0433\u0440\u0430\u0444, \u0442\u043e \u043e\u0431\u0445\u043e\u0434 \u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u0447\u0435\u043c \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0434\u0435\u0440\u0435\u0432\u0430 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438 \u0432 \u041e\u041e\u041f. \u041f\u043e \u0441\u0443\u0442\u0438, \u043f\u0440\u0438 \u0441\u0442\u0440\u043e\u0438\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0435 \u043a\u043b\u0430\u0441\u0441\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430:<\/p>\n<ul>\n<li>\n<p>\u041a\u043b\u0430\u0441\u0441 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0441\u0432\u0435\u0440\u0445\u0443 \u0432\u043d\u0438\u0437, \u0435\u0441\u043b\u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u043e\u0431\u0449\u0438\u0439 (shared) \u043a\u043b\u0430\u0441\u0441, \u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441\u0442\u0440\u043e\u0438\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0415\u0441\u043b\u0438 \u0432 \u043f\u043e\u043b\u0435 \u043e\u0431\u0449\u0438\u0439 (shared) \u043a\u043b\u0430\u0441\u0441 \u0442\u0430\u043a\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0443\u0436\u0435 \u0431\u044b\u043b \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d, \u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u0443\u0436\u0435 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441.<\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0430\u043a\u0438\u043c \u0436\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0441\u0442\u0440\u043e\u0438\u0442\u044c\u0441\u044f \u0446\u0435\u043f\u043e\u0447\u043a\u0430 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043d\u043e \u0441 \u0434\u0432\u0443\u043c\u044f \u0432\u0430\u0436\u043d\u044b\u043c \u0434\u0435\u0442\u0430\u043b\u044f\u043c\u0438: <\/p>\n<ul>\n<li>\n<p>\u0412 \u0446\u0435\u043f\u043e\u0447\u043a\u0443 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u0437 \u0442\u0435\u043b\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430, \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u043d\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u0437 \u043e\u0431\u0449\u0438\u0445 \u043f\u043e\u043b\u0435\u0439 \u043a\u043b\u0430\u0441\u0441\u0430;<\/p>\n<\/li>\n<li>\n<p>\u0414\u0435\u043a\u043b\u0430\u0440\u0430\u0446\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u0442\u043e\u044f\u0442\u044c \u0432 \u043a\u043e\u043d\u0446\u0435 \u0446\u0435\u043f\u043e\u0447\u043a\u0438 \u0432\u044b\u0437\u043e\u0432\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0432 \u0446\u0435\u043f\u043e\u0447\u043a\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 nextFn. \u0412\u0430\u0436\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043f\u043e \u0441\u0443\u0442\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c \u0432\u044b\u0437\u043e\u0432\u043e\u043c (virtual call), \u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u041e\u041e\u041f (inherited call).<\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434:<\/p>\n<pre><code class=\"delphi\">class Base   fn SomeVirtFn [virtual]     Trace('Base') \t class ClsA   open Base [shared]   fne SomeVirtFn     Trace('ClsA') \t class ClsB   open Base [shared]   fne SomeVirtFn     Trace('ClsB') \t class ClsC   open ClsA [shared]   open ClsB [shared]   fne SomeVirtFn     Trace('ClsC') ....    fn Main     c: ClsC     c.SomeVirtFn<\/code><\/pre>\n<p>\u0432\u044b\u0434\u0430\u0441\u0442:<\/p>\n<pre><code>  ClsC   ClsA   ClsB   Base<\/code><\/pre>\n<p>\u0422\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430, \u0434\u0440\u0443\u0433\u0438\u043c, \u043d\u0430\u0445\u043e\u0434\u044f\u0441\u044c \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f<\/p>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-321887","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/321887","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=321887"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/321887\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=321887"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=321887"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=321887"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}