• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            力為的技術(shù)博客

            聯(lián)系 聚合 管理
              154 Posts :: 1 Stories :: 561 Comments :: 0 Trackbacks

            An Adapter Solution

            Long long ago, there were one couple who lived in a very mystical village. They had two children,but their children couldn't speak. The worst thing was that nobody knew they were girl or they were boy, even the couple!

            ?

            class ?Father
            {
            }


            class ?Mother
            {
            }


            class ?Child1?:? public ?Father,? public ?Mother
            {
            }


            class ?Child2?:? public ?Father,? public ?Mother
            {
            }



            Then one day, an old man, from very far away, nobody knew where he came from and what he would to do, came to the village. It was very strange that the whole village became exciting after he stayed there only for a day. That's because he found the sex of the couple's children, and he also made the two little to speak, because he had magic tools:

            ?

            enum ?SEX
            {
            ?GRIL,
            ?BOY
            }
            ;

            class ?NewFound
            {
            public :
            ?
            void ?Speak() {}

            }


            template
            < class ?P,? class ?N,?SEX?sex >
            class ?ChildT?:? public ?P,? public ?N
            {
            public :
            ??SEX?getSex()
            { return ?sex;}
            }

            ?

            So the two children look like as the following:

            ?

            typedef?ChildT < Child1,?NewFound,?BOX > ?Son;
            typedef?ChildT
            < Child2,?NewFound,?GIRL > ?Girl;?

            Son?son;?
            SEX?sex?
            = ?son.getSex();
            son.Speak();

            Girl?girl;
            sex?
            = ?girl.getSex();
            gril.Speak();

            ?

            As time gone by, the couple had another girl. The first day of her life, she learned to speak, and the second day, she learned the ability to fly!!! What a strange girl! You may ask whether she was an angel. Maybe only the god knows that.

            ?

            class ?NewGirl?:? public ?ChildT < Father,?NewAblity,?GIRL > ,? public ?Mother
            {
            public :?
            ?
            void ?Fly() {}
            }

            ?

            or

            ?

            class ?NewGirl?:? public ?ChildT < Mother,?NewAblity,?GIRL > ,? public ?Father
            {
            public :?
            ?
            void ?Fly() {}
            }

            ?

            To be continued?

            posted on 2006-08-16 17:22 力為 閱讀(1391) 評論(2)  編輯 收藏 引用 所屬分類: 5. GP&STL&BOOST

            評論

            # re: An Adapter Solution 2006-09-05 16:43 taochunhua
            太棒了!
            這個故事有下文嗎?
              回復(fù)  更多評論
              

            # re: An Adapter Solution 2006-10-18 12:22 力為
            @taochunhua
            To be continued...  回復(fù)  更多評論
              

            亚洲欧美伊人久久综合一区二区| 国产成人综合久久精品尤物| 亚洲精品国产综合久久一线| 久久中文字幕人妻丝袜| 欧美精品乱码99久久蜜桃| 久久婷婷是五月综合色狠狠| 精品久久久久久综合日本| 国产精品成人精品久久久| 久久久久黑人强伦姧人妻| 无码专区久久综合久中文字幕 | 久久亚洲日韩看片无码| 性高湖久久久久久久久| 久久精品国产一区| 亚洲国产成人精品久久久国产成人一区二区三区综 | 精品久久香蕉国产线看观看亚洲| 久久国产免费直播| 色婷婷综合久久久久中文一区二区| 精品久久久久一区二区三区| 青青草原精品99久久精品66 | 国内精品伊人久久久影院| 久久久老熟女一区二区三区| 久久久高清免费视频| 国产亚洲综合久久系列| 日韩欧美亚洲综合久久| 久久国产一区二区| 国内精品久久国产| 国产亚州精品女人久久久久久| 伊人久久大香线焦AV综合影院| 久久久中文字幕日本| 久久精品国产亚洲Aⅴ香蕉| 无码AV中文字幕久久专区| 久久国产影院| a高清免费毛片久久| 亚洲午夜久久久影院伊人| 国产亚洲成人久久| AV色综合久久天堂AV色综合在 | 久久国产成人午夜aⅴ影院| 亚洲AV无一区二区三区久久| 武侠古典久久婷婷狼人伊人| 国产精品午夜久久| 久久精品国产亚洲欧美|