亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? functor.h

?? 和modern c++ design 這本書配套的程序庫。可以從作者的網站上免費下載。
?? H
?? 第 1 頁 / 共 4 頁
字號:
////////////////////////////////////////////////////////////////////////////////
// The Loki Library
// Copyright (c) 2001 by Andrei Alexandrescu
// This code accompanies the book:
// Alexandrescu, Andrei. "Modern C++ Design: Generic Programming and Design 
//     Patterns Applied". Copyright (c) 2001. Addison-Wesley.
// Permission to use, copy, modify, distribute and sell this software for any 
//     purpose is hereby granted without fee, provided that the above copyright 
//     notice appear in all copies and that both that copyright notice and this 
//     permission notice appear in supporting documentation.
// The author or Addison-Welsey Longman make no representations about the 
//     suitability of this software for any purpose. It is provided "as is" 
//     without express or implied warranty.
////////////////////////////////////////////////////////////////////////////////

// Last update: June 20, 2001

#ifndef FUNCTOR_INC_
#define FUNCTOR_INC_

#include "Typelist.h"
#include "EmptyType.h"
#include "SmallObj.h"
#include "TypeTraits.h"
#include <typeinfo>
#include <memory>

namespace Loki
{
////////////////////////////////////////////////////////////////////////////////
// class template FunctorImpl (internal)
////////////////////////////////////////////////////////////////////////////////

    namespace Private
    {
        template <typename R, template <class> class ThreadingModel>
        struct FunctorImplBase : public SmallObject<ThreadingModel>
        {
            typedef R ResultType;
            
            typedef EmptyType Parm1;
            typedef EmptyType Parm2;
            typedef EmptyType Parm3;
            typedef EmptyType Parm4;
            typedef EmptyType Parm5;
            typedef EmptyType Parm6;
            typedef EmptyType Parm7;
            typedef EmptyType Parm8;
            typedef EmptyType Parm9;
            typedef EmptyType Parm10;
            typedef EmptyType Parm11;
            typedef EmptyType Parm12;
            typedef EmptyType Parm13;
            typedef EmptyType Parm14;
            typedef EmptyType Parm15;

            virtual FunctorImplBase* DoClone() const = 0;
            template <class U>
            static U* Clone(U* pObj)
            {
                if (!pObj) return 0;
                U* pClone = static_cast<U*>(pObj->DoClone());
                assert(typeid(*pClone) == typeid(*pObj));
                return pClone;
            }
        };
    }
    
////////////////////////////////////////////////////////////////////////////////
// macro DEFINE_CLONE_FUNCTORIMPL
// Implements the DoClone function for a functor implementation
////////////////////////////////////////////////////////////////////////////////

#define DEFINE_CLONE_FUNCTORIMPL(Cls) \
    virtual Cls* DoClone() const { return new Cls(*this); }

////////////////////////////////////////////////////////////////////////////////
// class template FunctorImpl
// The base class for a hierarchy of functors. The FunctorImpl class is not used
//     directly; rather, the Functor class manages and forwards to a pointer to
//     FunctorImpl
// You may want to derive your own functors from FunctorImpl.
// Specializations of FunctorImpl for up to 15 parameters follow
////////////////////////////////////////////////////////////////////////////////

    template <typename R, class TList, 
        template <class> class ThreadingModel = DEFAULT_THREADING>
    class FunctorImpl;

////////////////////////////////////////////////////////////////////////////////
// class template FunctorImpl
// Specialization for 0 (zero) parameters
////////////////////////////////////////////////////////////////////////////////

    template <typename R, template <class> class ThreadingModel>
    class FunctorImpl<R, NullType, ThreadingModel>
        : public Private::FunctorImplBase<R, ThreadingModel>
    {
    public:
        typedef R ResultType;
        virtual R operator()() = 0;
    };

////////////////////////////////////////////////////////////////////////////////
// class template FunctorImpl
// Specialization for 1 parameter
////////////////////////////////////////////////////////////////////////////////

    template <typename R, typename P1, template <class> class ThreadingModel>
    class FunctorImpl<R, TYPELIST_1(P1), ThreadingModel>
        : public Private::FunctorImplBase<R, ThreadingModel>
    {
    public:
        typedef R ResultType;
        typedef typename TypeTraits<P1>::ParameterType Parm1;
        virtual R operator()(Parm1) = 0;
    };

////////////////////////////////////////////////////////////////////////////////
// class template FunctorImpl
// Specialization for 2 parameters
////////////////////////////////////////////////////////////////////////////////

    template <typename R, typename P1, typename P2, 
        template <class> class ThreadingModel>
    class FunctorImpl<R, TYPELIST_2(P1, P2), ThreadingModel>
        : public Private::FunctorImplBase<R, ThreadingModel>
    {
    public:
        typedef R ResultType;
        typedef typename TypeTraits<P1>::ParameterType Parm1;
        typedef typename TypeTraits<P2>::ParameterType Parm2;
        virtual R operator()(Parm1, Parm2) = 0;
    };

////////////////////////////////////////////////////////////////////////////////
// class template FunctorImpl
// Specialization for 3 parameters
////////////////////////////////////////////////////////////////////////////////

    template <typename R, typename P1, typename P2, typename P3,
        template <class> class ThreadingModel>
    class FunctorImpl<R, TYPELIST_3(P1, P2, P3), ThreadingModel>
        : public Private::FunctorImplBase<R, ThreadingModel>
    {
    public:
        typedef R ResultType;
        typedef typename TypeTraits<P1>::ParameterType Parm1;
        typedef typename TypeTraits<P2>::ParameterType Parm2;
        typedef typename TypeTraits<P3>::ParameterType Parm3;
        virtual R operator()(Parm1, Parm2, Parm3) = 0;
    };

////////////////////////////////////////////////////////////////////////////////
// class template FunctorImpl
// Specialization for 4 parameters
////////////////////////////////////////////////////////////////////////////////

    template <typename R, typename P1, typename P2, typename P3, typename P4,
        template <class> class ThreadingModel>
    class FunctorImpl<R, TYPELIST_4(P1, P2, P3, P4), ThreadingModel>
        : public Private::FunctorImplBase<R, ThreadingModel>
    {
    public:
        typedef R ResultType;
        typedef typename TypeTraits<P1>::ParameterType Parm1;
        typedef typename TypeTraits<P2>::ParameterType Parm2;
        typedef typename TypeTraits<P3>::ParameterType Parm3;
        typedef typename TypeTraits<P4>::ParameterType Parm4;
        virtual R operator()(Parm1, Parm2, Parm3, Parm4) = 0;
    };

////////////////////////////////////////////////////////////////////////////////
// class template FunctorImpl
// Specialization for 5 parameters
////////////////////////////////////////////////////////////////////////////////

    template <typename R, typename P1, typename P2, typename P3, typename P4,
        typename P5,
        template <class> class ThreadingModel>
    class FunctorImpl<R, TYPELIST_5(P1, P2, P3, P4, P5), ThreadingModel>
        : public Private::FunctorImplBase<R, ThreadingModel>
    {
    public:
        typedef R ResultType;
        typedef typename TypeTraits<P1>::ParameterType Parm1;
        typedef typename TypeTraits<P2>::ParameterType Parm2;
        typedef typename TypeTraits<P3>::ParameterType Parm3;
        typedef typename TypeTraits<P4>::ParameterType Parm4;
        typedef typename TypeTraits<P5>::ParameterType Parm5;
        virtual R operator()(Parm1, Parm2, Parm3, Parm4, Parm5) = 0;
    };

////////////////////////////////////////////////////////////////////////////////
// class template FunctorImpl
// Specialization for 6 parameters
////////////////////////////////////////////////////////////////////////////////

    template <typename R, typename P1, typename P2, typename P3, typename P4,
        typename P5, typename P6,
        template <class> class ThreadingModel>
    class FunctorImpl<R, TYPELIST_6(P1, P2, P3, P4, P5, P6), ThreadingModel>
        : public Private::FunctorImplBase<R, ThreadingModel>
    {
    public:
        typedef R ResultType;
        typedef typename TypeTraits<P1>::ParameterType Parm1;
        typedef typename TypeTraits<P2>::ParameterType Parm2;
        typedef typename TypeTraits<P3>::ParameterType Parm3;
        typedef typename TypeTraits<P4>::ParameterType Parm4;
        typedef typename TypeTraits<P5>::ParameterType Parm5;
        typedef typename TypeTraits<P6>::ParameterType Parm6;
        virtual R operator()(Parm1, Parm2, Parm3, Parm4, Parm5, Parm6) = 0;
    };

////////////////////////////////////////////////////////////////////////////////
// class template FunctorImpl
// Specialization for 7 parameters
////////////////////////////////////////////////////////////////////////////////

    template <typename R, typename P1, typename P2, typename P3, typename P4,
        typename P5, typename P6, typename P7,
        template <class> class ThreadingModel>
    class FunctorImpl<R, TYPELIST_7(P1, P2, P3, P4, P5, P6, P7), ThreadingModel>
        : public Private::FunctorImplBase<R, ThreadingModel>
    {
    public:
        typedef R ResultType;
        typedef typename TypeTraits<P1>::ParameterType Parm1;
        typedef typename TypeTraits<P2>::ParameterType Parm2;
        typedef typename TypeTraits<P3>::ParameterType Parm3;
        typedef typename TypeTraits<P4>::ParameterType Parm4;
        typedef typename TypeTraits<P5>::ParameterType Parm5;
        typedef typename TypeTraits<P6>::ParameterType Parm6;
        typedef typename TypeTraits<P7>::ParameterType Parm7;
        virtual R operator()(Parm1, Parm2, Parm3, Parm4, Parm5, Parm6, 
            Parm7) = 0;
    };

////////////////////////////////////////////////////////////////////////////////
// class template FunctorImpl
// Specialization for 8 parameters
////////////////////////////////////////////////////////////////////////////////

    template <typename R, typename P1, typename P2, typename P3, typename P4,
        typename P5, typename P6, typename P7, typename P8,
        template <class> class ThreadingModel>
    class FunctorImpl<R, TYPELIST_8(P1, P2, P3, P4, P5, P6, P7, P8),
            ThreadingModel>
        : public Private::FunctorImplBase<R, ThreadingModel>
    {
    public:
        typedef R ResultType;
        typedef typename TypeTraits<P1>::ParameterType Parm1;
        typedef typename TypeTraits<P2>::ParameterType Parm2;
        typedef typename TypeTraits<P3>::ParameterType Parm3;
        typedef typename TypeTraits<P4>::ParameterType Parm4;
        typedef typename TypeTraits<P5>::ParameterType Parm5;
        typedef typename TypeTraits<P6>::ParameterType Parm6;
        typedef typename TypeTraits<P7>::ParameterType Parm7;
        typedef typename TypeTraits<P8>::ParameterType Parm8;
        virtual R operator()(Parm1, Parm2, Parm3, Parm4, Parm5, Parm6, 
            Parm7, Parm8) = 0;
    };

////////////////////////////////////////////////////////////////////////////////
// class template FunctorImpl
// Specialization for 9 parameters
////////////////////////////////////////////////////////////////////////////////

    template <typename R, typename P1, typename P2, typename P3, typename P4,
        typename P5, typename P6, typename P7, typename P8, typename P9,
        template <class> class ThreadingModel>
    class FunctorImpl<R, TYPELIST_9(P1, P2, P3, P4, P5, P6, P7, P8, P9),
            ThreadingModel>
        : public Private::FunctorImplBase<R, ThreadingModel>
    {
    public:
        typedef R ResultType;
        typedef typename TypeTraits<P1>::ParameterType Parm1;
        typedef typename TypeTraits<P2>::ParameterType Parm2;
        typedef typename TypeTraits<P3>::ParameterType Parm3;
        typedef typename TypeTraits<P4>::ParameterType Parm4;
        typedef typename TypeTraits<P5>::ParameterType Parm5;
        typedef typename TypeTraits<P6>::ParameterType Parm6;
        typedef typename TypeTraits<P7>::ParameterType Parm7;
        typedef typename TypeTraits<P8>::ParameterType Parm8;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美亚洲免费在线一区| 国产精品中文有码| 中文字幕一区二区三区不卡| 精品剧情v国产在线观看在线| 欧美视频一区二区三区在线观看 | 欧美日韩午夜影院| 93久久精品日日躁夜夜躁欧美| 国产91精品久久久久久久网曝门| 国产一区二区看久久| 国产酒店精品激情| 国产成人综合网站| 99精品欧美一区二区三区小说 | 欧美日韩精品电影| 欧美亚洲自拍偷拍| 51精品国自产在线| 精品国产免费久久| 精品日本一线二线三线不卡| 久久精品网站免费观看| 亚洲国产精品二十页| 亚洲欧美福利一区二区| 亚洲成人在线免费| 麻豆成人综合网| www.亚洲色图.com| 欧美日韩视频在线第一区| 欧美一二三区在线观看| 一区二区三区精品在线| 一区二区国产盗摄色噜噜| 日韩在线一区二区| 国产一区二区视频在线| 91丨porny丨蝌蚪视频| 在线不卡欧美精品一区二区三区| 精品乱人伦一区二区三区| 亚洲国产高清在线| 婷婷开心激情综合| 国产91在线看| 欧美日韩精品一区二区| 久久精品人人爽人人爽| 亚洲美女精品一区| 国产一区二区三区国产| 在线视频国内自拍亚洲视频| 欧美白人最猛性xxxxx69交| 亚洲人吸女人奶水| 国产在线播放一区三区四| 色av综合在线| 国产欧美一二三区| 欧美a一区二区| 91久久精品国产91性色tv | 精品午夜久久福利影院 | 欧美性大战久久| 久久综合色8888| 亚洲成人激情av| 97久久超碰国产精品| 精品日本一线二线三线不卡| 一卡二卡欧美日韩| 丰满少妇久久久久久久| 日韩一级片在线观看| 亚洲一区二区欧美日韩| 成人黄色大片在线观看| 精品99久久久久久| 蜜臀久久99精品久久久久久9| 色呦呦一区二区三区| 日本一区二区三区国色天香| 捆绑调教一区二区三区| 欧美视频一区在线观看| 一区二区三区在线观看国产| 成人精品视频一区二区三区尤物| 欧美xxxx老人做受| 美女一区二区在线观看| 欧美日韩精品三区| 玉米视频成人免费看| 99久久综合精品| 中文字幕第一区二区| 国产福利一区在线| 久久久国产综合精品女国产盗摄| 日本色综合中文字幕| 91精品国产综合久久久久久久久久 | 亚洲欧洲日产国产综合网| 国产成人一区二区精品非洲| 久久久精品天堂| 国产电影一区二区三区| 欧美韩国一区二区| 欧美亚洲国产一区二区三区va| 亚洲欧美自拍偷拍色图| 91蜜桃免费观看视频| 亚洲美女区一区| 欧美精品在线一区二区三区| 午夜精品久久久| 日韩欧美电影一区| 黑人巨大精品欧美一区| 国产欧美精品一区二区三区四区| 国产91丝袜在线播放九色| 国产精品二三区| 在线看一区二区| 日韩成人免费在线| 久久精品男人的天堂| 99国产精品一区| 丝袜美腿亚洲综合| 精品999久久久| 成人国产亚洲欧美成人综合网| 亚洲色图一区二区三区| 在线成人av影院| 国产精品 日产精品 欧美精品| 日韩伦理电影网| 777亚洲妇女| 成人性色生活片| 日韩二区在线观看| 中文字幕免费不卡在线| 欧美日韩亚洲综合在线| 久久99最新地址| 亚洲三级免费电影| 日韩欧美123| 91色九色蝌蚪| 国模少妇一区二区三区| 一区二区三区中文在线观看| 日韩一级二级三级| 97久久超碰国产精品| 激情欧美日韩一区二区| 亚洲自拍欧美精品| 国产三级精品在线| 91麻豆精品国产| 91老师国产黑色丝袜在线| 久久av资源网| 亚洲一区精品在线| 国产欧美精品一区二区色综合| 4438亚洲最大| 欧美亚州韩日在线看免费版国语版| 国内精品写真在线观看| 亚洲国产精品天堂| 一色桃子久久精品亚洲| www国产精品av| 欧美日韩国产一级片| 成人av在线网站| 国产精品自在在线| 久久99精品国产麻豆婷婷| 亚洲影视在线播放| 亚洲人成在线观看一区二区| 久久综合五月天婷婷伊人| 7777精品伊人久久久大香线蕉经典版下载 | 久久精品水蜜桃av综合天堂| 欧美一区二区三区公司| 欧美性做爰猛烈叫床潮| 色屁屁一区二区| 成人国产精品免费观看动漫| 国产精品一区专区| 久久成人18免费观看| 日韩和欧美一区二区三区| 一区二区免费视频| 一区二区三区影院| 国产精品九色蝌蚪自拍| 欧美高清在线视频| 国产三级欧美三级日产三级99| 精品电影一区二区| 精品国内二区三区| 精品精品欲导航| 日韩免费观看高清完整版| 欧美一级片免费看| 日韩视频免费观看高清在线视频| 欧美日韩国产综合久久| 4438x成人网最大色成网站| 欧美日韩大陆在线| 91精品国产91久久久久久最新毛片 | 久久婷婷综合激情| 久久久久久久综合日本| 国产午夜精品福利| 中文字幕国产精品一区二区| 国产精品色婷婷久久58| 18成人在线视频| 亚洲一区在线看| 天天av天天翘天天综合网色鬼国产 | 99天天综合性| 色婷婷av一区二区三区之一色屋| 91久久精品一区二区| 欧美卡1卡2卡| 精品理论电影在线观看| 国产精品免费免费| 夜色激情一区二区| 老司机免费视频一区二区| 成人免费的视频| 欧美日韩电影在线| 国产丝袜欧美中文另类| 亚洲私人影院在线观看| 青青草97国产精品免费观看无弹窗版| 精品在线观看免费| 91丨九色丨蝌蚪富婆spa| 欧美军同video69gay| 亚洲精品久久久久久国产精华液| 亚洲高清免费在线| 国产成人自拍在线| 欧美视频中文字幕| 国产日韩高清在线| 亚洲一区二区三区不卡国产欧美| 久久99精品国产| 欧美亚男人的天堂| 国产色产综合色产在线视频 | 天天av天天翘天天综合网| 国产精品亚洲第一| 欧美精品在线观看播放| 亚洲国产精品ⅴa在线观看| 婷婷开心激情综合| 91麻豆.com|