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

            国产精品一久久香蕉国产线看观看| 亚洲va中文字幕无码久久| 久久亚洲AV成人出白浆无码国产 | 精品久久久无码人妻中文字幕 | 亚洲精品乱码久久久久久中文字幕| 久久成人小视频| 人妻无码中文久久久久专区| 久久亚洲国产午夜精品理论片| 看全色黄大色大片免费久久久| 思思久久精品在热线热| 久久精品国产亚洲精品2020| 国内精品久久久久久久影视麻豆| 超级97碰碰碰碰久久久久最新| 国产精品久久久久久久久| 久久久久综合国产欧美一区二区 | 久久99毛片免费观看不卡| 久久久这里有精品中文字幕| 99热成人精品热久久669| 亚洲а∨天堂久久精品9966| 青青青国产成人久久111网站| 色妞色综合久久夜夜| 99久久综合狠狠综合久久| 欧美丰满熟妇BBB久久久| 一级a性色生活片久久无少妇一级婬片免费放 | 亚洲午夜久久久影院伊人| 久久99国产精品99久久| 久久99热这里只频精品6| 久久99精品久久久久久9蜜桃| 久久99国产综合精品| 亚洲香蕉网久久综合影视| 久久久久久久免费视频| 国产午夜电影久久| 日本精品久久久久中文字幕8 | 日韩人妻无码一区二区三区久久 | 精品一区二区久久| 久久精品人成免费| 午夜天堂av天堂久久久| 久久精品国产久精国产一老狼| 精品99久久aaa一级毛片| 欧美久久精品一级c片片| 99久久99久久精品国产|