• <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>

            力為的技術博客

            聯系 聚合 管理
              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 力為 閱讀(1395) 評論(2)  編輯 收藏 引用 所屬分類: 5. GP&STL&BOOST

            評論

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

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

            波多野结衣久久一区二区| 久久精品国产精品青草app| 亚洲午夜精品久久久久久人妖| 一本久久a久久精品亚洲| 久久人与动人物a级毛片| 尹人香蕉久久99天天拍| 久久中文字幕精品| 久久综合久久美利坚合众国| 99久久综合国产精品免费| 久久久久久久免费视频| 亚洲va中文字幕无码久久不卡| 影音先锋女人AV鲁色资源网久久| 中文字幕无码精品亚洲资源网久久| 五月丁香综合激情六月久久| 奇米影视7777久久精品| 国产婷婷成人久久Av免费高清| 久久―日本道色综合久久| 91久久精品国产免费直播| 久久夜色精品国产亚洲av| 99久久免费国产精品特黄| 日韩AV无码久久一区二区| 久久综合给合久久狠狠狠97色69| 97热久久免费频精品99| 狠狠人妻久久久久久综合蜜桃| 伊人久久大香线蕉综合热线| 国产亚洲美女精品久久久2020| 91精品国产91久久综合| 久久人人爽人爽人人爽av| 日韩人妻无码一区二区三区久久| 亚洲综合久久综合激情久久 | 久久精品免费网站网| yy6080久久| 国产精品九九久久免费视频 | 久久九九久精品国产| 久久亚洲日韩看片无码| 久久综合久久综合久久| 中文字幕无码免费久久| 久久久精品久久久久久| 婷婷五月深深久久精品| 久久久精品久久久久久 | 亚洲国产另类久久久精品小说|