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

            草草久久久无码国产专区| 97r久久精品国产99国产精| 久久九九精品99国产精品| 国内精品久久久久影院老司| 国产精久久一区二区三区| 久久狠狠高潮亚洲精品| 久久精品国产亚洲77777| 少妇久久久久久久久久| 久久久久久亚洲AV无码专区| 亚洲欧美日韩中文久久| 久久久久女人精品毛片| 97久久精品无码一区二区天美| 久久ZYZ资源站无码中文动漫| 久久精品国产亚洲av麻豆色欲 | 97精品伊人久久大香线蕉| 亚洲国产成人久久笫一页| 久久久久99这里有精品10| 久久国产免费直播| 久久久噜噜噜www成人网| 色综合色天天久久婷婷基地| 久久国产成人| 久久久国产精华液| 91视频国产91久久久| 久久久WWW成人免费毛片| 国产精品久久久久久久久久影院 | 亚洲国产日韩欧美久久| 亚洲AV成人无码久久精品老人| 亚洲AV乱码久久精品蜜桃| 国产99久久九九精品无码| 亚洲欧美日韩久久精品| 精品国产乱码久久久久久郑州公司 | 久久久久这里只有精品| 国产69精品久久久久APP下载 | 久久电影网| 亚洲精品午夜国产VA久久成人| 91精品国产91久久| 久久午夜无码鲁丝片秋霞| 青青草原综合久久| 亚洲精品乱码久久久久久久久久久久 | 久久美女人爽女人爽| 久久WWW免费人成一看片|