• <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 力為 閱讀(1393) 評(píng)論(2)  編輯 收藏 引用 所屬分類: 5. GP&STL&BOOST

            評(píng)論

            # re: An Adapter Solution 2006-09-05 16:43 taochunhua
            太棒了!
            這個(gè)故事有下文嗎?
              回復(fù)  更多評(píng)論
              

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

            亚洲国产香蕉人人爽成AV片久久 | 一级做a爰片久久毛片16| 人妻无码中文久久久久专区| 亚洲欧美伊人久久综合一区二区| 久久亚洲国产成人精品性色| 99国产精品久久| 久久国产成人| 91麻豆国产精品91久久久| 伊人久久大香线蕉亚洲| 亚洲国产成人久久精品影视| 青青草国产精品久久久久| 久久亚洲国产精品123区| 伊人久久大香线蕉综合影院首页| 久久精品国产精品亚洲精品| 久久久久婷婷| 精品国际久久久久999波多野| 久久国产综合精品五月天| 久久人人爽人人爽人人AV东京热| 国产69精品久久久久9999| 亚洲国产精品无码久久青草| 久久国产精品一国产精品金尊| 久久精品国产亚洲5555| 久久久久无码精品国产不卡| 久久久久亚洲?V成人无码| 99久久精品费精品国产一区二区 | 久久精品九九亚洲精品| 久久无码国产| 久久久久久亚洲精品成人| 色综合合久久天天给综看| 国产欧美一区二区久久| 亚洲国产精品久久久天堂| 欧美国产精品久久高清| 99久久成人18免费网站| 日产精品99久久久久久| 亚洲欧洲久久久精品| 久久av高潮av无码av喷吹| 国产美女久久久| 99久久免费国产特黄| 亚洲中文字幕无码久久2020| 精品久久久久久久国产潘金莲| 国产精品熟女福利久久AV|