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

            久久亚洲AV成人无码国产| 日韩人妻无码一区二区三区久久| 99久久婷婷免费国产综合精品| 99久久99久久久精品齐齐| 国产精品久久久久一区二区三区 | 99国产精品久久| 久久夜色撩人精品国产小说| 色综合久久久久无码专区| 久久99国产精品99久久| 伊人情人综合成人久久网小说| 精品熟女少妇av免费久久| 久久性生大片免费观看性| 国产Av激情久久无码天堂| 色综合久久天天综线观看| 国产精品久久午夜夜伦鲁鲁| 一本色综合久久| 精品久久久久久久中文字幕 | 国产成人久久精品区一区二区| 久久久久国产视频电影| 久久99毛片免费观看不卡| 国产成人精品久久| 内射无码专区久久亚洲| 亚洲午夜久久久精品影院| 久久精品国产精品亚洲毛片| 久久婷婷五月综合色奶水99啪 | 国产精品一久久香蕉产线看 | 久久久久久久久波多野高潮| 久久99精品久久久久久秒播| 久久免费美女视频| 久久99国产精品久久| 久久免费美女视频| 色综合久久综精品| 国产精品久久久久9999高清| 久久久久久人妻无码| 久久人人爽人人爽人人片AV不| 亚洲日韩中文无码久久| 亚洲AV无码久久精品色欲| 久久亚洲日韩看片无码| 久久人人爽爽爽人久久久| 97久久精品无码一区二区天美| 久久99热只有频精品8|