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

            国产精品久久久久久久久鸭| 中文精品99久久国产 | 人妻无码αv中文字幕久久琪琪布| 精品国产乱码久久久久软件| 亚洲乱码精品久久久久..| 91精品国产91久久久久久青草 | 久久91精品国产91久久麻豆| 怡红院日本一道日本久久| 久久青青草视频| 久久久WWW成人| 亚洲综合久久综合激情久久 | 欧美粉嫩小泬久久久久久久| 精品国际久久久久999波多野| 国产精品亚洲综合久久| 国产精品午夜久久| 精品精品国产自在久久高清| 无码人妻久久一区二区三区| 欧美久久久久久| 性做久久久久久免费观看| 久久93精品国产91久久综合| 国产精品久久成人影院| 国产精品美女久久久m| 亚洲国产精品一区二区久久hs| 精品久久久久久久国产潘金莲| 亚洲国产一成久久精品国产成人综合 | 日韩美女18网站久久精品| 久久九九久精品国产| 久久久精品波多野结衣| 久久se这里只有精品| 国产精品免费久久久久久久久| 伊人久久免费视频| 99久久精品九九亚洲精品| 国产精品欧美亚洲韩国日本久久 | 2021久久精品国产99国产精品| 精品久久人妻av中文字幕| 久久婷婷久久一区二区三区| 日本三级久久网| 久久强奷乱码老熟女| 久久人人爽人人爽人人爽 | 久久久中文字幕| 久久精品亚洲欧美日韩久久|