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

            久久亚洲私人国产精品| 午夜精品久久久内射近拍高清 | 亚洲精品tv久久久久| 欧美日韩精品久久久久 | 国产精品久久久久…| 99热成人精品免费久久| 伊人久久亚洲综合影院| 少妇精品久久久一区二区三区| 狠狠狠色丁香婷婷综合久久五月 | 亚洲精品无码久久久久去q| 精品久久久久久| 久久人人爽人人爽人人爽| 国产99久久精品一区二区| 久久久久人妻一区二区三区| 岛国搬运www久久| 久久久精品人妻一区二区三区蜜桃| 国产精品成人精品久久久 | 色噜噜狠狠先锋影音久久| 久久人人爽人人爽人人片AV不| 狠色狠色狠狠色综合久久| 久久人妻AV中文字幕| 亚洲欧洲中文日韩久久AV乱码| 四虎国产永久免费久久| 久久综合国产乱子伦精品免费| 无码乱码观看精品久久| 精品久久久久久久中文字幕 | 久久香蕉超碰97国产精品| 最新久久免费视频| 日韩十八禁一区二区久久 | 国产成人精品综合久久久久| 狠狠色伊人久久精品综合网 | 国产成人精品三上悠亚久久| 色播久久人人爽人人爽人人片aV| 91视频国产91久久久| jizzjizz国产精品久久| av午夜福利一片免费看久久| 奇米综合四色77777久久| 欧洲人妻丰满av无码久久不卡 | 一97日本道伊人久久综合影院| 国产精品热久久毛片| 久久青青草原精品国产软件|