• <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>

            力為的技術(shù)博客

            聯(lián)系 聚合 管理
              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
            太棒了!
            這個故事有下文嗎?
              回復(fù)  更多評論
              

            # re: An Adapter Solution 2006-10-18 12:22 力為
            @taochunhua
            To be continued...  回復(fù)  更多評論
              

            日韩精品久久无码中文字幕| 久久e热在这里只有国产中文精品99| 久久久久九九精品影院| 中文字幕久久欲求不满| 精品久久人人做人人爽综合| 久久精品无码一区二区app| 最新久久免费视频| 91精品国产综合久久婷婷| 久久精品综合一区二区三区| 欧美日韩精品久久久免费观看| 99久久人妻无码精品系列| 久久久WWW成人免费精品| 日产精品久久久久久久性色| 99久久精品这里只有精品| 亚洲αv久久久噜噜噜噜噜| 国产一区二区精品久久凹凸 | 久久亚洲AV成人无码电影| 青青草国产精品久久久久| 人人妻久久人人澡人人爽人人精品 | 久久99国产精品一区二区| 久久久久亚洲AV成人网人人网站| 色综合久久无码五十路人妻| 久久er国产精品免费观看8| 久久精品国产69国产精品亚洲 | 久久国产免费观看精品3| 久久乐国产综合亚洲精品| 青青热久久综合网伊人| 久久99国产精品尤物| 久久久久人妻一区二区三区| 久久涩综合| 青春久久| 久久中文字幕无码专区| 久久精品二区| 国产精品久久久久久久久久免费| 久久综合香蕉国产蜜臀AV| 久久久国产精华液| 国内精品综合久久久40p| 久久久久久精品久久久久| 香蕉99久久国产综合精品宅男自 | 精品一久久香蕉国产线看播放| 国产精品久久自在自线观看|