• <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 力為 閱讀(1401) 評論(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一区| 国产成人久久777777| 久久99热这里只有精品国产| 久久综合综合久久97色| 精品久久久中文字幕人妻| 女人香蕉久久**毛片精品| 丁香色欲久久久久久综合网| 99热热久久这里只有精品68| 一本色综合网久久| 99久久国产亚洲高清观看2024 | 久久超乳爆乳中文字幕| 香蕉久久夜色精品国产2020| 亚洲精品国产成人99久久| 色妞色综合久久夜夜| 久久精品国产精品亚洲精品| 久久996热精品xxxx| 国产精品久久久久久搜索| 亚洲香蕉网久久综合影视| 亚洲国产成人久久综合一区77| 国产精品永久久久久久久久久| 99久久国语露脸精品国产| 亚洲国产欧美国产综合久久| 一本久久免费视频| 无码人妻久久一区二区三区蜜桃| 一本久久a久久精品综合夜夜| 亚洲国产精品无码久久久不卡| 久久久久国产| 久久中文字幕视频、最近更新| 99久久超碰中文字幕伊人| 久久超乳爆乳中文字幕| 99久久婷婷免费国产综合精品| 久久久噜噜噜www成人网| 国产成人久久精品激情| 久久免费线看线看|