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

            国产69精品久久久久APP下载| 久久精品一区二区影院| 久久婷婷人人澡人人爽人人爱| 久久伊人影视| 色88久久久久高潮综合影院| 国内精品久久人妻互换| 99久久精品这里只有精品| 国产 亚洲 欧美 另类 久久| 综合久久一区二区三区| 久久综合给合久久狠狠狠97色69| 国内精品久久九九国产精品| 人人狠狠综合88综合久久| 亚洲中文字幕久久精品无码喷水| 日本免费久久久久久久网站| 国内精品伊人久久久影院 | 久久国产三级无码一区二区| 久久精品国产亚洲αv忘忧草| 久久国产精品-久久精品| 三级三级久久三级久久 | 国产一久久香蕉国产线看观看 | 久久久久成人精品无码中文字幕| 91久久国产视频| 99国产精品久久| 午夜精品久久久久久99热| 欧美精品国产综合久久| 久久精品国产清自在天天线| 久久99国产精品久久99| 午夜精品久久久久久久久| 久久午夜福利无码1000合集| 日韩久久久久中文字幕人妻| 久久精品国产72国产精福利| 亚洲国产精品久久| 国产精品美女久久久m| jizzjizz国产精品久久| 久久综合给合久久国产免费| 色欲av伊人久久大香线蕉影院| 看全色黄大色大片免费久久久| 狠狠精品久久久无码中文字幕| 精品国产福利久久久| 久久99精品久久久久久动态图 | 久久激情五月丁香伊人|