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

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

?? wxlist.h

?? 用DirectX制作高級動畫-[Advanced.Animation.with.DirectX]
?? H
?? 第 1 頁 / 共 2 頁
字號:
//------------------------------------------------------------------------------
// File: WXList.h
//
// Desc: DirectShow base classes - defines a non-MFC generic template list
//       class.
//
// Copyright (c) 1992-2002 Microsoft Corporation.  All rights reserved.
//------------------------------------------------------------------------------


/* A generic list of pointers to objects.
   No storage management or copying is done on the objects pointed to.
   Objectives: avoid using MFC libraries in ndm kernel mode and
   provide a really useful list type.

   The class is thread safe in that separate threads may add and
   delete items in the list concurrently although the application
   must ensure that constructor and destructor access is suitably
   synchronised. An application can cause deadlock with operations
   which use two lists by simultaneously calling
   list1->Operation(list2) and list2->Operation(list1).  So don't!

   The names must not conflict with MFC classes as an application
   may use both.
   */

#ifndef __WXLIST__
#define __WXLIST__

   /* A POSITION represents (in some fashion that's opaque) a cursor
      on the list that can be set to identify any element.  NULL is
      a valid value and several operations regard NULL as the position
      "one step off the end of the list".  (In an n element list there
      are n+1 places to insert and NULL is that "n+1-th" value).
      The POSITION of an element in the list is only invalidated if
      that element is deleted.  Move operations may mean that what
      was a valid POSITION in one list is now a valid POSITION in
      a different list.

      Some operations which at first sight are illegal are allowed as
      harmless no-ops.  For instance RemoveHead is legal on an empty
      list and it returns NULL.  This allows an atomic way to test if
      there is an element there, and if so, get it.  The two operations
      AddTail and RemoveHead thus implement a MONITOR (See Hoare's paper).

      Single element operations return POSITIONs, non-NULL means it worked.
      whole list operations return a BOOL.  TRUE means it all worked.

      This definition is the same as the POSITION type for MFCs, so we must
      avoid defining it twice.
   */
#ifndef __AFX_H__
struct __POSITION { int unused; };
typedef __POSITION* POSITION;
#endif

const int DEFAULTCACHE = 10;    /* Default node object cache size */

/* A class representing one node in a list.
   Each node knows a pointer to it's adjacent nodes and also a pointer
   to the object that it looks after.
   All of these pointers can be retrieved or set through member functions.
*/
class CBaseList 
#ifdef DEBUG
    : public CBaseObject
#endif
{
    /* Making these classes inherit from CBaseObject does nothing
       functionally but it allows us to check there are no memory
       leaks in debug builds. 
    */

public:

#ifdef DEBUG
    class CNode : public CBaseObject {
#else
    class CNode {
#endif

        CNode *m_pPrev;         /* Previous node in the list */
        CNode *m_pNext;         /* Next node in the list */
        void *m_pObject;      /* Pointer to the object */

    public:

        /* Constructor - initialise the object's pointers */
        CNode()
#ifdef DEBUG
            : CBaseObject(NAME("List node"))
#endif
        {
        };


        /* Return the previous node before this one */
        CNode *Prev() const { return m_pPrev; };


        /* Return the next node after this one */
        CNode *Next() const { return m_pNext; };


        /* Set the previous node before this one */
        void SetPrev(CNode *p) { m_pPrev = p; };


        /* Set the next node after this one */
        void SetNext(CNode *p) { m_pNext = p; };


        /* Get the pointer to the object for this node */
        void *GetData() const { return m_pObject; };


        /* Set the pointer to the object for this node */
        void SetData(void *p) { m_pObject = p; };
    };

    class CNodeCache
    {
    public:
        CNodeCache(INT iCacheSize) : m_iCacheSize(iCacheSize),
                                     m_pHead(NULL),
                                     m_iUsed(0)
                                     {};
        ~CNodeCache() {
            CNode *pNode = m_pHead;
            while (pNode) {
                CNode *pCurrent = pNode;
                pNode = pNode->Next();
                delete pCurrent;
            }
        };
        void AddToCache(CNode *pNode)
        {
            if (m_iUsed < m_iCacheSize) {
                pNode->SetNext(m_pHead);
                m_pHead = pNode;
                m_iUsed++;
            } else {
                delete pNode;
            }
        };
        CNode *RemoveFromCache()
        {
            CNode *pNode = m_pHead;
            if (pNode != NULL) {
                m_pHead = pNode->Next();
                m_iUsed--;
                ASSERT(m_iUsed >= 0);
            } else {
                ASSERT(m_iUsed == 0);
            }
            return pNode;
        };
    private:
        INT m_iCacheSize;
        INT m_iUsed;
        CNode *m_pHead;
    };

protected:

    CNode* m_pFirst;    /* Pointer to first node in the list */
    CNode* m_pLast;     /* Pointer to the last node in the list */
    LONG m_Count;       /* Number of nodes currently in the list */

private:

    CNodeCache m_Cache; /* Cache of unused node pointers */

private:

    /* These override the default copy constructor and assignment
       operator for all list classes. They are in the private class
       declaration section so that anybody trying to pass a list
       object by value will generate a compile time error of
       "cannot access the private member function". If these were
       not here then the compiler will create default constructors
       and assignment operators which when executed first take a
       copy of all member variables and then during destruction
       delete them all. This must not be done for any heap
       allocated data.
    */
    CBaseList(const CBaseList &refList);
    CBaseList &operator=(const CBaseList &refList);

public:

    CBaseList(TCHAR *pName,
              INT iItems);

    CBaseList(TCHAR *pName);
#ifdef UNICODE
    CBaseList(CHAR *pName,
              INT iItems);

    CBaseList(CHAR *pName);
#endif
    ~CBaseList();

    /* Remove all the nodes from *this i.e. make the list empty */
    void RemoveAll();


    /* Return a cursor which identifies the first element of *this */
    POSITION GetHeadPositionI() const;


    /* Return a cursor which identifies the last element of *this */
    POSITION GetTailPositionI() const;


    /* Return the number of objects in *this */
    int GetCountI() const;

protected:
    /* Return the pointer to the object at rp,
       Update rp to the next node in *this
       but make it NULL if it was at the end of *this.
       This is a wart retained for backwards compatibility.
       GetPrev is not implemented.
       Use Next, Prev and Get separately.
    */
    void *GetNextI(POSITION& rp) const;


    /* Return a pointer to the object at p
       Asking for the object at NULL will return NULL harmlessly.
    */
    void *GetI(POSITION p) const;

public:
    /* return the next / prev position in *this
       return NULL when going past the end/start.
       Next(NULL) is same as GetHeadPosition()
       Prev(NULL) is same as GetTailPosition()
       An n element list therefore behaves like a n+1 element
       cycle with NULL at the start/end.

       !!WARNING!! - This handling of NULL is DIFFERENT from GetNext.

       Some reasons are:
       1. For a list of n items there are n+1 positions to insert
          These are conveniently encoded as the n POSITIONs and NULL.
       2. If you are keeping a list sorted (fairly common) and you
          search forward for an element to insert before and don't
          find it you finish up with NULL as the element before which
          to insert.  You then want that NULL to be a valid POSITION
          so that you can insert before it and you want that insertion
          point to mean the (n+1)-th one that doesn't have a POSITION.
          (symmetrically if you are working backwards through the list).
       3. It simplifies the algebra which the methods generate.
          e.g. AddBefore(p,x) is identical to AddAfter(Prev(p),x)
          in ALL cases.  All the other arguments probably are reflections
          of the algebraic point.
    */
    POSITION Next(POSITION pos) const
    {
        if (pos == NULL) {
            return (POSITION) m_pFirst;
        }
        CNode *pn = (CNode *) pos;
        return (POSITION) pn->Next();
    } //Next

    // See Next
    POSITION Prev(POSITION pos) const
    {
        if (pos == NULL) {
            return (POSITION) m_pLast;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
九色综合狠狠综合久久| 欧美精品在欧美一区二区少妇| 99久久国产综合精品麻豆| 欧美日韩国产色站一区二区三区| 欧美成人video| 亚洲自拍偷拍综合| 丁香六月综合激情| 日韩欧美黄色影院| 亚洲成av人片在线| 99久久国产综合精品女不卡 | 美女视频网站黄色亚洲| 白白色 亚洲乱淫| 欧美精品一区二区三区一线天视频| 一区二区久久久久久| 成人性生交大合| 国产色一区二区| 久久精品免费观看| 欧美一区二区三区日韩视频| 亚洲国产精品人人做人人爽| 99久久精品国产导航| 国产精品久久精品日日| 国产成人在线观看免费网站| 久久天堂av综合合色蜜桃网| 久久精品噜噜噜成人av农村| 日韩一级片在线播放| 日韩成人一级片| 欧美一区二区三区思思人| 一区二区三区四区精品在线视频| 成人a免费在线看| 国产精品素人一区二区| 成人免费视频一区二区| 国产精品久久久久久久裸模| 99国产精品一区| 亚洲美女偷拍久久| 国产亚洲女人久久久久毛片| 美美哒免费高清在线观看视频一区二区| 欧美三级蜜桃2在线观看| 亚洲高清免费在线| 91精品国产综合久久小美女| 美女高潮久久久| 国产视频一区在线观看| youjizz国产精品| 亚洲精品欧美综合四区| 欧美日韩亚洲综合在线 | 日韩精品一二三| 91精品国产色综合久久ai换脸 | 亚洲精品水蜜桃| 一本一道波多野结衣一区二区| 亚洲综合一二区| 欧美一区二区三区免费观看视频| 另类成人小视频在线| 久久久国产精品午夜一区ai换脸| 成人av网站在线| 亚洲一区精品在线| 精品国产免费人成电影在线观看四季| 国内精品免费在线观看| 成人免费小视频| 欧美精选一区二区| 国产精品99久久久久久有的能看| 亚洲欧美日韩久久| 日韩欧美国产精品一区| 99久久99久久精品免费看蜜桃| 亚洲综合另类小说| 精品三级在线观看| 91丝袜美腿高跟国产极品老师 | 久久精工是国产品牌吗| 中文字幕精品—区二区四季| 91极品视觉盛宴| 国产主播一区二区| 一区二区三区中文在线观看| 精品少妇一区二区三区在线视频| 成年人午夜久久久| 久久精品久久精品| 玉米视频成人免费看| 久久综合视频网| 欧美性大战久久久久久久蜜臀| 精品在线亚洲视频| 亚洲愉拍自拍另类高清精品| 久久欧美中文字幕| 欧美三区免费完整视频在线观看| 国产精品亚洲视频| 日韩av中文在线观看| 亚洲精品国产无套在线观| 亚洲天堂网中文字| 久久久91精品国产一区二区精品 | 国产一区亚洲一区| 亚洲黄色免费电影| 欧美国产精品v| 日韩欧美www| 欧美日韩国产天堂| 91年精品国产| www.亚洲在线| 国产成人aaa| 久久国产乱子精品免费女| 亚洲综合色区另类av| 国产精品天干天干在线综合| 亚洲精品一区二区三区四区高清| 欧美日韩精品一区二区| 色综合久久久久久久久久久| 国产福利视频一区二区三区| 久久精品国产99国产| 日日摸夜夜添夜夜添国产精品| 亚洲精品亚洲人成人网| 亚洲视频一二三| 亚洲欧洲国产日韩| 国产精品美女久久久久久久| 久久久久久久久久久久久女国产乱| 制服丝袜国产精品| 欧美精品1区2区| 7777精品伊人久久久大香线蕉超级流畅 | 亚洲精选视频在线| 日韩美女久久久| 成人免费在线播放视频| 日韩伦理av电影| 亚洲黄色性网站| 一区二区三区国产精华| 一区二区三区91| 一区二区不卡在线播放 | 国产欧美综合在线| 国产午夜精品一区二区三区视频| 久久久国产精品麻豆 | 欧美电影免费提供在线观看| 日韩视频一区二区| 精品三级av在线| 国产蜜臀av在线一区二区三区| 国产欧美一区二区精品仙草咪| 国产日韩精品一区| 综合欧美一区二区三区| 夜夜嗨av一区二区三区网页| 亚洲国产毛片aaaaa无费看| 午夜视频一区二区三区| 麻豆精品国产91久久久久久| 国产美女娇喘av呻吟久久| 成人免费视频网站在线观看| 日本国产一区二区| 3atv一区二区三区| 久久久www成人免费毛片麻豆| 国产精品国产三级国产aⅴ无密码| 亚洲欧美另类小说视频| 日韩精品一二三区| 国产成人精品亚洲777人妖 | 亚洲午夜免费福利视频| 日本成人在线看| 成人精品小蝌蚪| 欧美日韩久久久久久| www日韩大片| 一区二区在线观看不卡| 另类小说色综合网站| 99久久夜色精品国产网站| 欧美精品乱人伦久久久久久| 欧美mv日韩mv国产网站| 亚洲欧美经典视频| 久久精品国产免费看久久精品| 成人国产精品免费观看视频| 欧美日韩一区高清| 国产情人综合久久777777| 亚洲午夜久久久久久久久电影网| 九九精品视频在线看| 色婷婷一区二区三区四区| 欧美成人免费网站| 亚洲精品久久7777| 韩国女主播成人在线| 欧美午夜一区二区三区免费大片| 久久亚洲综合av| 视频一区国产视频| www.视频一区| 26uuu国产日韩综合| 亚洲高清免费一级二级三级| 成人美女视频在线看| 欧美xxxxx裸体时装秀| 一区二区三区中文字幕在线观看| 国产一二精品视频| 欧美精品一卡二卡| 一区二区视频在线| 粉嫩av亚洲一区二区图片| 日韩一区二区三区高清免费看看| 亚洲蜜臀av乱码久久精品蜜桃| 国产精品一二一区| 欧美一级生活片| 亚洲国产视频一区| 色综合视频一区二区三区高清| 久久久99久久精品欧美| 蜜臀av一级做a爰片久久| 欧美亚洲综合另类| 一区二区三区自拍| 91亚洲精品久久久蜜桃网站| 国产欧美日韩综合| 国产一二三精品| 久久影院午夜论| 国产一区二区三区日韩| 日韩精品资源二区在线| 美女视频网站久久| 欧美一级国产精品| 热久久国产精品| 51精品视频一区二区三区| 亚洲国产精品久久久男人的天堂| 91视频免费观看| 亚洲另类春色校园小说| 91女神在线视频| 亚洲欧美一区二区三区久本道91 |