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

            国产精品久久波多野结衣| 亚洲中文字幕伊人久久无码 | 亚洲午夜久久久影院| 亚洲国产精品综合久久网络 | 亚洲狠狠婷婷综合久久蜜芽| 久久无码精品一区二区三区| 久久精品国产99国产精品亚洲| 久久中文字幕人妻丝袜| 亚洲国产小视频精品久久久三级| 国产精品亚洲综合久久| 人妻精品久久久久中文字幕一冢本 | 国产亚洲精品美女久久久| 久久国产亚洲高清观看| 久久本道伊人久久| 久久久久久久综合综合狠狠| 久久久久久亚洲AV无码专区| 久久精品蜜芽亚洲国产AV| 一本久久综合亚洲鲁鲁五月天亚洲欧美一区二区 | 久久久久久国产精品免费免费| 久久久久久久亚洲精品| 久久天天躁狠狠躁夜夜avapp| 欧洲精品久久久av无码电影| 四虎影视久久久免费观看| 久久综合给合久久狠狠狠97色69 | 久久精品天天中文字幕人妻| 欧美激情精品久久久久久久| 99麻豆久久久国产精品免费| 区久久AAA片69亚洲| 久久久久亚洲av毛片大| 亚洲一本综合久久| 无码人妻精品一区二区三区久久久 | 久久人妻无码中文字幕| 亚洲狠狠综合久久| 久久久久久久久久久久中文字幕| 一本色道久久综合狠狠躁篇| 久久久亚洲欧洲日产国码二区| 久久精品亚洲福利| 狠狠久久综合伊人不卡| 久久久久人妻精品一区二区三区 | 9191精品国产免费久久| 一本色道久久88加勒比—综合|