• <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...  回復  更多評論
              

            久久国产高潮流白浆免费观看| 九九久久精品国产| 少妇久久久久久被弄到高潮| 久久99国产一区二区三区| 亚洲日本va午夜中文字幕久久| 国内精品久久久久影院薰衣草| 久久国产精品无码HDAV| 久久亚洲精品无码观看不卡| 欧美黑人激情性久久| 久久黄视频| 久久综合中文字幕| 久久婷婷国产剧情内射白浆| 久久亚洲欧美日本精品| 伊人久久无码精品中文字幕| 欧美久久精品一级c片片| 99久久精品免费看国产一区二区三区| 好久久免费视频高清| 国产A三级久久精品| 久久有码中文字幕| 国产精品久久久久9999| 久久人妻AV中文字幕| 久久精品成人免费国产片小草| 久久精品黄AA片一区二区三区| 亚洲一区精品伊人久久伊人 | 久久精品国产72国产精福利| 久久国产精品77777| 久久亚洲私人国产精品vA| 美女久久久久久| 久久久青草青青国产亚洲免观| 久久最新精品国产| 久久99国内精品自在现线| 久久综合噜噜激激的五月天| 久久久久久精品免费免费自慰 | 97精品依人久久久大香线蕉97| 久久精品成人欧美大片| 久久亚洲国产精品123区| 久久久久亚洲精品中文字幕| 久久人搡人人玩人妻精品首页| 国产成人久久777777| 国产99久久久国产精品~~牛| 91精品国产高清久久久久久国产嫩草|