• <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
            太棒了!
            這個(gè)故事有下文嗎?
              回復(fù)  更多評論
              

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

            国产AⅤ精品一区二区三区久久 | 国产精品激情综合久久| 精品久久久久久亚洲精品 | 亚洲va中文字幕无码久久不卡 | 久久涩综合| 久久久无码精品亚洲日韩按摩 | 色综合久久中文字幕无码| 蜜桃麻豆www久久| 亚洲中文字幕无码久久精品1 | 久久伊人五月丁香狠狠色| 欧美激情精品久久久久| 99精品国产99久久久久久97| 狠狠色丁香婷综合久久| 亚洲AV无码成人网站久久精品大| 色综合久久88色综合天天| 久久国产欧美日韩精品| 青青青青久久精品国产h久久精品五福影院1421| 亚洲国产日韩欧美久久| 国产日韩欧美久久| 91精品婷婷国产综合久久| 久久精品天天中文字幕人妻 | 久久久久久毛片免费看| 人人狠狠综合久久亚洲婷婷| 亚洲精品无码久久久久久| 亚洲精品午夜国产va久久| 久久伊人中文无码| 深夜久久AAAAA级毛片免费看| 天天爽天天爽天天片a久久网| MM131亚洲国产美女久久| 性高湖久久久久久久久| 亚洲AV日韩AV永久无码久久| 久久久久久久久久久| 狠狠综合久久AV一区二区三区| 欧美与黑人午夜性猛交久久久| 久久一本综合| 国内精品伊人久久久影院| 2021国内久久精品| 日产精品久久久久久久性色| 色婷婷久久综合中文久久蜜桃av| 久久久久国产精品嫩草影院| 久久夜色精品国产噜噜噜亚洲AV|