• <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 力為 閱讀(1401) 評論(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ù)  更多評論
              

            久久久久国产精品嫩草影院| 久久久久香蕉视频| www.久久热.com| 青青青青久久精品国产h| 久久久精品波多野结衣| 久久综合香蕉国产蜜臀AV| 亚洲伊人久久大香线蕉苏妲己| 久久久久国产亚洲AV麻豆| 精品国产乱码久久久久软件 | 伊人色综合久久天天网| 久久人爽人人爽人人片AV| 国产激情久久久久影院老熟女免费| 欧美粉嫩小泬久久久久久久 | 久久九九久精品国产免费直播| 亚洲中文精品久久久久久不卡| 观看 国产综合久久久久鬼色 欧美 亚洲 一区二区 | 久久ww精品w免费人成| 久久久久亚洲AV成人网人人网站| 久久久久久久女国产乱让韩| 久久精品国产亚洲Aⅴ蜜臀色欲| 久久久无码人妻精品无码| 思思久久99热只有频精品66| 91久久国产视频| 免费观看久久精彩视频| 一本久久知道综合久久| 久久婷婷是五月综合色狠狠| 亚洲国产成人久久精品99| 国产精品无码久久四虎| 久久精品成人免费看| 国内精品久久久久久久97牛牛| 久久中文字幕人妻丝袜| 久久久精品久久久久久| 欧美成a人片免费看久久| 久久久久久久久久久免费精品| 久久精品国产亚洲Aⅴ香蕉| 精品视频久久久久| 久久久久久久综合日本| 亚洲国产成人久久综合野外| 久久伊人五月丁香狠狠色| 精品久久久久久无码不卡| 久久精品久久久久观看99水蜜桃|