亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
成人av在线一区二区三区| 欧美日韩一级黄| 亚洲高清免费在线| 国产日产欧美一区二区视频| 51久久夜色精品国产麻豆| 激情五月婷婷综合| 日韩电影免费一区| 一区二区不卡在线播放| 中文字幕一区二区三区乱码在线| 精品国产乱码久久久久久1区2区| 欧美亚洲国产一卡| 成人精品一区二区三区四区| 狠狠色狠狠色综合系列| 琪琪久久久久日韩精品| 日韩一级欧美一级| 日韩一区二区三区电影在线观看| 91成人网在线| 色网站国产精品| 成人午夜在线播放| 粉嫩蜜臀av国产精品网站| 国产在线看一区| 激情欧美日韩一区二区| 麻豆精品一区二区| 国产综合久久久久影院| 国产一区在线不卡| 国产精品一二三在| 国产精品一区在线| 成人毛片视频在线观看| 成人黄色电影在线| 色天使久久综合网天天| 国产成人在线观看免费网站| 国产精品影视网| 成人精品一区二区三区四区| 成人国产精品免费网站| 91丝袜呻吟高潮美腿白嫩在线观看| 高清久久久久久| 99re8在线精品视频免费播放| jlzzjlzz亚洲日本少妇| 色94色欧美sute亚洲线路一久| www.亚洲激情.com| 色综合天天天天做夜夜夜夜做| 色婷婷综合视频在线观看| 欧美日韩在线免费视频| 欧美一区国产二区| 欧美亚洲另类激情小说| 91精品国产欧美日韩| 日韩免费观看高清完整版| 久久久精品黄色| 亚洲国产精品99久久久久久久久 | 欧美在线免费播放| 欧美日韩国产乱码电影| 日韩一级视频免费观看在线| 国产日本亚洲高清| 一区二区欧美在线观看| 视频一区二区三区入口| 国产美女在线观看一区| 在线精品视频免费播放| 精品久久久久久久人人人人传媒 | 99精品热视频| 欧美精品在线一区二区| 国产亚洲欧美中文| 午夜精品久久久久久久99樱桃| 美美哒免费高清在线观看视频一区二区| 国产精品2024| 欧美色视频一区| 26uuu亚洲| 亚洲伊人色欲综合网| 国产一区二区三区不卡在线观看 | 91久久精品一区二区| 欧美一区二区在线免费观看| 国产精品午夜免费| 日本不卡不码高清免费观看 | 亚洲精品一线二线三线| 国产精品素人一区二区| 日韩av在线免费观看不卡| 成人免费看的视频| 日韩一级高清毛片| 一区二区在线观看视频| 国产一区二区主播在线| 精品日本一线二线三线不卡| 在线免费观看日本欧美| 国产一区91精品张津瑜| 精品国产露脸精彩对白| 久久成人综合网| 欧美成人精品3d动漫h| 久88久久88久久久| 久久一区二区三区四区| 精品一区二区三区在线观看| 欧美精品一区二区三区很污很色的| 欧美96一区二区免费视频| 欧美一区二区福利在线| 国产乱码精品一区二区三区忘忧草| 精品国产免费久久| 成人午夜伦理影院| 中文成人av在线| 在线国产电影不卡| 丝袜美腿高跟呻吟高潮一区| 精品免费国产一区二区三区四区| 国产一区二区三区电影在线观看| 国产精品美日韩| 欧洲精品一区二区三区在线观看| 午夜久久久影院| 久久久久久麻豆| 色呦呦日韩精品| 日韩电影免费一区| 国产欧美精品在线观看| 91极品美女在线| 六月丁香综合在线视频| 国产精品欧美经典| 91精品啪在线观看国产60岁| 国产高清成人在线| 一区二区国产视频| 欧美精品一区二区三区四区| 色香色香欲天天天影视综合网| 日本亚洲三级在线| 国产精品短视频| 欧美电视剧免费观看| av在线不卡观看免费观看| 日韩国产在线观看一区| 国产精品久久夜| 欧美一区二区三区成人| jlzzjlzz欧美大全| 国内精品自线一区二区三区视频| 亚洲少妇最新在线视频| 欧美成人高清电影在线| 色屁屁一区二区| 国产一区二区免费看| 亚洲国产精品天堂| 国产精品大尺度| 精品福利av导航| 欧美日韩1234| 在线视频欧美区| 成人av片在线观看| 国产乱国产乱300精品| 三级成人在线视频| 一区二区三区中文在线| 国产精品你懂的在线欣赏| 亚洲精品一线二线三线无人区| 欧美日韩电影在线| 91首页免费视频| 国产成人免费在线观看不卡| 天天综合网天天综合色| 亚洲精品免费一二三区| 国产精品乱码久久久久久| 久久蜜桃一区二区| 精品少妇一区二区三区在线播放| 欧美日韩国产成人在线免费| 91福利国产精品| 91免费在线看| 一本在线高清不卡dvd| 99在线视频精品| 丁香激情综合五月| 国产成人亚洲精品青草天美| 国产精品综合在线视频| 韩国欧美一区二区| 精东粉嫩av免费一区二区三区| 午夜久久久影院| 舔着乳尖日韩一区| 人人精品人人爱| 久久电影网站中文字幕| 精品亚洲aⅴ乱码一区二区三区| 久久精品久久99精品久久| 免费观看日韩av| 九色|91porny| 高清不卡一区二区| 91日韩一区二区三区| 在线免费不卡电影| 欧美一区三区四区| 久久久久久久久久久久久久久99| 久久久午夜精品| 亚洲欧美视频在线观看| 亚洲一级二级在线| 美日韩一区二区| 国产精品18久久久久久久网站| 国产成人精品在线看| 99久久精品免费| 欧美色图天堂网| 日韩欧美国产一区二区三区| 久久久久久久久久久久久久久99 | 国产亚洲精品7777| 国产精品蜜臀av| 亚洲高清免费一级二级三级| 日韩在线a电影| 成人午夜短视频| 欧美日韩1234| 国产日产欧美一区| 亚洲国产一区二区视频| 久久超碰97人人做人人爱| 成人国产精品免费网站| 欧美猛男gaygay网站| 久久九九久精品国产免费直播| 亚洲精品水蜜桃| 人妖欧美一区二区| 99国产精品99久久久久久| 在线不卡中文字幕播放| 中文av字幕一区| 免费人成在线不卡| 一本大道久久a久久综合婷婷| 欧美一区二区三区思思人| 国产精品污污网站在线观看|