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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? id.h

?? symbian 下的helix player源代碼
?? H
字號(hào):
/* ***** BEGIN LICENSE BLOCK *****
 * Source last modified: $Id: id.h,v 1.5.32.3 2004/07/09 01:48:00 hubbe Exp $
 * 
 * Portions Copyright (c) 1995-2004 RealNetworks, Inc. All Rights Reserved.
 * 
 * The contents of this file, and the files included with this file,
 * are subject to the current version of the RealNetworks Public
 * Source License (the "RPSL") available at
 * http://www.helixcommunity.org/content/rpsl unless you have licensed
 * the file under the current version of the RealNetworks Community
 * Source License (the "RCSL") available at
 * http://www.helixcommunity.org/content/rcsl, in which case the RCSL
 * will apply. You may also obtain the license terms directly from
 * RealNetworks.  You may not use this file except in compliance with
 * the RPSL or, if you have a valid RCSL with RealNetworks applicable
 * to this file, the RCSL.  Please see the applicable RPSL or RCSL for
 * the rights, obligations and limitations governing use of the
 * contents of the file.
 * 
 * Alternatively, the contents of this file may be used under the
 * terms of the GNU General Public License Version 2 or later (the
 * "GPL") in which case the provisions of the GPL are applicable
 * instead of those above. If you wish to allow use of your version of
 * this file only under the terms of the GPL, and not to allow others
 * to use your version of this file under the terms of either the RPSL
 * or RCSL, indicate your decision by deleting the provisions above
 * and replace them with the notice and other provisions required by
 * the GPL. If you do not delete the provisions above, a recipient may
 * use your version of this file under the terms of any one of the
 * RPSL, the RCSL or the GPL.
 * 
 * This file is part of the Helix DNA Technology. RealNetworks is the
 * developer of the Original Code and owns the copyrights in the
 * portions it created.
 * 
 * This file, and the files included with this file, is distributed
 * and made available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY
 * KIND, EITHER EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS
 * ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES
 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET
 * ENJOYMENT OR NON-INFRINGEMENT.
 * 
 * Technology Compatibility Kit Test Suite(s) Location:
 *    http://www.helixcommunity.org/content/tck
 * 
 * Contributor(s):
 * 
 * ***** END LICENSE BLOCK ***** */

#ifndef CHXID_H
#define CHXID_H

#include "hlxclib/string.h" //for memset/memcpy

#include "hxassert.h"

/*
 *  The whole table now is zero based and we return id+1 when they ask
 *  for a new id, and return table[id-1] when they want the data.
 *  In this way this class will actually WORK and all of the code using this
 *  can still think a 0 return is bad.
 *                                                 -paulm
 */

class CHXID
{
public:
    enum {
      DEFAULT_VALUE =0,
      TABLE_START_SIZE = 10000
    };

    CHXID(u_long32 size = TABLE_START_SIZE);
    ~CHXID();

    u_long32  create(void* ptr = (void*)DEFAULT_VALUE);
    void*     destroy(u_long32 id);
    void*     get(u_long32 id);
    void      set(u_long32 id, void* ptr);
    u_long32  get_size();
    HX_RESULT m_LastError;

private:
    u_long32  table_size;
    u_long32  increment_factor;
    u_long32  slots_used;
    u_long32  last_id;

    void** table_ptr;
};

inline
CHXID::CHXID(u_long32 size)
: m_LastError(HXR_OK)
{
    ASSERT(size > 0);
    table_size = size;
    increment_factor = (table_size / 2) + 1;
    slots_used = 0;
    last_id    = table_size-1;
    table_ptr = new void* [table_size];
    if(!table_ptr)
    {
        m_LastError = HXR_OUTOFMEMORY;
        return;
    }

    memset (table_ptr, DEFAULT_VALUE, table_size * sizeof(void*));
}

inline
CHXID::~CHXID()
{
    delete [] table_ptr;
}

inline void*
CHXID::get(u_long32 id)
{
// This assert has been disabled to prevent udp resend packets
// from killing the server. If a player has a bug in it and sends
// a corrupted udp_packet it could return an id larger than the
// table_size here. The udp_accept logic needs the DEFAULT_VALUE to
// toss the bad packet.
//    ASSERT(id < table_size);

    id--;
    if (id < table_size)
        return table_ptr[id];
    else
        return (void*)DEFAULT_VALUE;
}

inline void
CHXID::set(u_long32 id, void* ptr)
{
    id--;
    ASSERT(id < table_size);
    
    if (id < table_size)
        table_ptr[id] = ptr;
}

inline u_long32
CHXID::create(void* ptr)
{
    if (slots_used > table_size * 0.7)
    {
        void** tmp_table_ptr = new void* [table_size + increment_factor];

        memcpy (tmp_table_ptr, table_ptr, table_size * sizeof(void*)); /* Flawfinder: ignore */
        memset (tmp_table_ptr + table_size, DEFAULT_VALUE, increment_factor * sizeof(void*));

        delete [] table_ptr;
        table_ptr = tmp_table_ptr;
        
        table_size += increment_factor;
	increment_factor = table_size / 2;
    }

    u_long32 new_id = (last_id + 1) % table_size;
    while(table_ptr[new_id] != (void*)DEFAULT_VALUE) 
	new_id = (new_id + 1) % table_size;
    last_id = new_id;
    table_ptr[new_id] = ptr;
    slots_used++;

    return new_id+1;
}

inline void*
CHXID::destroy(u_long32 id)
{
    id--;
    ASSERT(id < table_size);

    if (id > table_size)
    {
        return 0;
    }

    void* ptr = table_ptr[id];
    if (ptr == (void*)DEFAULT_VALUE)
        return 0;

    table_ptr[id] = (void*)DEFAULT_VALUE;
    slots_used--;

    return ptr;
}

inline u_long32
CHXID::get_size()
{
    return table_size;
}


#endif

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产午夜三级一区二区三| 国产在线国偷精品产拍免费yy | 一区二区中文视频| 久久99最新地址| 欧美一区二区日韩| 午夜精品视频在线观看| 欧美午夜精品一区二区蜜桃| 亚洲永久精品国产| 99re这里只有精品视频首页| 日本一区二区不卡视频| 国产福利一区在线| 久久久久久日产精品| 久久99国产精品久久99| 欧美r级在线观看| 蜜桃久久久久久久| 日韩精品一区二区三区在线观看| 捆绑紧缚一区二区三区视频| 日韩一级大片在线观看| 久久国产精品99久久久久久老狼| 日韩欧美另类在线| 国产呦精品一区二区三区网站| 精品国产乱码久久久久久浪潮| 日本中文字幕一区| 日韩精品一区二区三区三区免费| 久久精品国产99| 国产欧美一区二区三区鸳鸯浴| 成人黄色国产精品网站大全在线免费观看| 日本一区二区免费在线| 99re66热这里只有精品3直播 | 婷婷中文字幕综合| 制服.丝袜.亚洲.另类.中文| 蜜乳av一区二区| 久久精品一区二区三区不卡| 不卡的电影网站| 中文字幕在线一区免费| 91国产福利在线| 久久不见久久见中文字幕免费| 日韩欧美二区三区| 不卡大黄网站免费看| 一片黄亚洲嫩模| 日韩欧美一区二区不卡| 国产很黄免费观看久久| 亚洲一区精品在线| 欧美一区二区三区在线观看| 成人国产精品免费| 亚洲国产裸拍裸体视频在线观看乱了| 日韩一区二区电影| av电影一区二区| 亚洲尤物在线视频观看| 91精品国产高清一区二区三区| 国产美女视频一区| 亚洲国产一区视频| 中文字幕一区av| 精品福利一区二区三区| 91精品午夜视频| 在线日韩av片| 99久久久无码国产精品| 国产精品一级二级三级| 亚洲aⅴ怡春院| 亚洲精品欧美激情| 国产精品久久久久久久久图文区| 欧美成人一级视频| 777xxx欧美| 精品视频资源站| 在线日韩av片| 色老头久久综合| 91麻豆国产香蕉久久精品| 成人开心网精品视频| 国产激情一区二区三区桃花岛亚洲| 蜜桃91丨九色丨蝌蚪91桃色| 蜜芽一区二区三区| 午夜精品福利久久久| 亚洲综合视频在线观看| 一区二区三区在线视频观看| 中文字幕一区二区三区乱码在线 | 91在线观看成人| caoporen国产精品视频| 成人一区二区三区在线观看| 国产精品18久久久久| 国产精品综合在线视频| 国产iv一区二区三区| 国产很黄免费观看久久| 国产v日产∨综合v精品视频| 国产成人激情av| 波多野结衣中文字幕一区| 粉嫩蜜臀av国产精品网站| 粉嫩13p一区二区三区| 国产成都精品91一区二区三| 波多野结衣在线一区| 91网站在线观看视频| 91福利视频久久久久| 欧美日韩一卡二卡三卡 | 久久久亚洲午夜电影| 久久久国产一区二区三区四区小说 | 国产精品一色哟哟哟| 丁香婷婷综合网| 99re这里只有精品视频首页| 91精品91久久久中77777| 欧美日韩综合在线免费观看| 91精品久久久久久久99蜜桃| 精品国产伦一区二区三区观看方式| 久久美女高清视频| 中文字幕永久在线不卡| 夜夜夜精品看看| 蜜臀av一区二区在线免费观看| 激情综合五月天| 成人高清在线视频| 欧美精品aⅴ在线视频| 精品美女在线观看| 《视频一区视频二区| 亚洲综合视频网| 国产一区激情在线| 一本高清dvd不卡在线观看| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 91精品国产高清一区二区三区蜜臀 | 不卡大黄网站免费看| 欧美日韩精品三区| 久久你懂得1024| 亚洲午夜一区二区三区| 国产呦精品一区二区三区网站| 色婷婷精品大视频在线蜜桃视频| 91精品国产综合久久久蜜臀图片 | 欧美一级搡bbbb搡bbbb| 国产女主播视频一区二区| 亚洲一区二区在线观看视频| 麻豆国产欧美日韩综合精品二区| 成人午夜免费av| 欧美不卡一区二区| 亚洲视频一二区| 国产一区欧美二区| 欧美老女人第四色| 亚洲欧洲日韩女同| 日本强好片久久久久久aaa| 99精品视频在线播放观看| 日韩午夜精品视频| 亚洲精品久久嫩草网站秘色| 韩国三级中文字幕hd久久精品| 在线欧美小视频| 欧美国产97人人爽人人喊| 天天综合色天天综合色h| 91亚洲精品久久久蜜桃网站 | 国产成人在线观看免费网站| 欧美高清dvd| 亚洲黄色小说网站| av亚洲精华国产精华精华| 精品国产乱码久久久久久牛牛 | 亚洲人成在线播放网站岛国| 国产一区二区三区四区五区入口| 欧美无乱码久久久免费午夜一区| 国产亚洲人成网站| 久久草av在线| 欧美一级片在线看| 天使萌一区二区三区免费观看| 色综合久久久久网| 国产精品女同互慰在线看| 国产老妇另类xxxxx| 日韩一级成人av| 日韩在线卡一卡二| 欧美视频在线不卡| 一级日本不卡的影视| 91浏览器在线视频| 国产精品高潮呻吟久久| 国产成人精品一区二区三区四区| 精品国产不卡一区二区三区| 日本一道高清亚洲日美韩| 在线91免费看| 天堂va蜜桃一区二区三区| 69久久99精品久久久久婷婷 | 91精品国产综合久久婷婷香蕉| 亚洲成人自拍网| 欧美日韩综合一区| 五月天欧美精品| 3d动漫精品啪啪一区二区竹菊| 亚洲国产日韩精品| 欧美精品xxxxbbbb| 热久久一区二区| 亚洲精品一区二区三区影院| 精品综合久久久久久8888| 精品国产乱码久久久久久牛牛| 国产麻豆精品95视频| 久久众筹精品私拍模特| 国产成人综合亚洲91猫咪| 国产农村妇女毛片精品久久麻豆 | 亚洲午夜一区二区| 日韩一区二区三区视频在线| 捆绑调教一区二区三区| 久久免费国产精品| 成人精品国产福利| 亚洲精品免费在线| 欧美日本在线播放| 久久成人18免费观看| 日本一区二区三区久久久久久久久不| 成人av在线电影| 亚洲一二三四久久| 91精品国产欧美日韩| 粉嫩av一区二区三区粉嫩| 亚洲综合色视频| 欧美mv日韩mv亚洲| 91丨九色丨国产丨porny| 亚洲成人av中文|