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

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

?? chxmapstringtostring.h

?? Amarok是一款在LINUX或其他類UNIX操作系統中運行的音頻播放器軟件。 經過兩年開發后
?? H
字號:
/* * * This software is released under the provisions of the GPL version 2. * see file "COPYING".  If that file is not available, the full statement  * of the license can be found at * * http://www.fsf.org/licensing/licenses/gpl.txt * * Portions Copyright (c) 1995-2004 RealNetworks, Inc. All Rights Reserved. * */#ifndef _CHXMAPSTRINGTOSTRING_H_#define _CHXMAPSTRINGTOSTRING_H_// Notes...//// Since we aren't using templates, we get to copy the same basic code all// over the place.  So, if you change something in this class, chances are// that the other CHXMap*To* classes may need the change as well.// XXXSAB: Need to better abstract out the common code...//// This implementation has a few dynamically resized vectors - their// "chunk sizes" (number of elements added to size when a new element// addition requires a reallocation) can be adjusted via the following// accessors.////    m_items - This is the vector of actual key/value pairs (along with a//        boolean "free" flag) where the data for the map is stored.  It's//        chunk size is controlled via the optional argument to the map//        ctor.  And the default value for that is controlled by the//        static SetDefaultChunkSize() method.////    m_buckets - This is the vector of hash buckets.  Each hash bucket is//        a vector of int indices into the m_items vector.  The number of//        buckets doesn't change over time and is controlled via the//        InitHashTable() method (which has the effect of resetting the//        map) and it defaults to z_defaultNumBuckets (101 at the moment).//        The chunk size of the individual hash buckets is set by the//        SetBucketChunkSize() method and the default for that is set by//        the SetDefaultBucketChunkSize() method.//#include "hxtypes.h"#include "carray.h"#include "hxstring.h"#include "hxmaputils.h"#include "chxmapbuckets.h"#include "hlxclib/string.h"     // strcasecmp()class CHXMapStringToString{public:    typedef const char* key_type;    typedef const char* key_arg_type;    typedef const char* key_ref_type;    inline static CHXString& key_nil() { return (CHXString&)HXEmptyString; }        typedef const char* value_type;    typedef const char* value_arg_type;    typedef CHXString& value_ref_type;    typedef const CHXString& value_const_ref_type;    inline static CHXString& val_nil() { return (CHXString&)HXEmptyString; }    struct Item    {        Item (key_arg_type key_ = key_nil(),              value_arg_type val_ = val_nil(),              bool bFree_ = true) :            key(key_), val(val_), bFree(bFree_)        {}        CHXString  key;        CHXString  val;        bool  bFree;    };    DECLARE_ITEMVEC(ItemVec_t,Item,Item(),0,0);//HXEmptyString);    class Iterator    {    public:        typedef key_type iter_key_type;        friend class CHXMapStringToString;        // NOTE: (item == -1) is used to mean "set to end of pItems".        Iterator(ItemVec_t* pItems = NULL,                 int item = -1);        // NOTE: Values of 'next' copied into iterator...since this        //       iterator is caching key/value and doesn't return a        //       value_type&, it can't be used to modify the values in the        //       map.        Iterator& operator++();        Iterator  operator++(int); // XXXSAB: tested?        HXBOOL operator==(const Iterator&) const;        HXBOOL operator!=(const Iterator&) const;        value_type operator*(); // returns the 'value'        iter_key_type get_key  ();   // returns the 'key'    private:        void GotoValid();        ItemVec_t*      m_pItems;        int             m_item;        // cached key/value        CHXString       m_key;        CHXString       m_val;    };private:#if defined(HELIX_CONFIG_NOSTATICS)    static const ULONG32 z_defaultNumBuckets;    static const ULONG32 z_defaultChunkSize;    static const ULONG32 z_defaultBucketChunkSize;#else    static ULONG32 z_defaultNumBuckets;    static ULONG32 z_defaultChunkSize;    static ULONG32 z_defaultBucketChunkSize;#endif    public:    // Construction    // NOTE: Chunk size is the number of key/value pairs to grow by each    //       time one of the hash buckets needs to be grown.    CHXMapStringToString(int chunkSize = z_defaultChunkSize);    ~CHXMapStringToString();    // Attributes    inline int GetCount() const;    inline HXBOOL IsEmpty() const;    HXBOOL Lookup(key_arg_type key, CHXString& value) const;    POSITION Lookup(key_arg_type key) const;    // XXXSAB: I added GetKeyAt() and GetAt() since there was previously    //         no easy way to get those data without advancing the    //         POSITION.    key_ref_type GetKeyAt(POSITION pos) const;    value_const_ref_type GetAt(POSITION pos) const;    value_ref_type GetAt(POSITION pos);    // Lookup & add if not there    value_ref_type operator[](key_arg_type key);    // add a new (key, value) pair    POSITION SetAt(key_arg_type key, value_arg_type value);    // remove existing (key, ?) pair    POSITION Remove(key_arg_type key);    HXBOOL RemoveKey(key_arg_type key);    void RemoveAll();    // Iteration    POSITION GetStartPosition() const;    void GetNextAssoc (POSITION& pos, CHXString& key, CHXString& value) const;    Iterator Begin();    Iterator End();    Iterator Erase(Iterator it);    // XXXSAB: Added Find() command to parallel STL style method    Iterator Find(key_arg_type key);    // Returns the number of hash buckets    inline ULONG32 GetHashTableSize() const;    // This will reset the internal storage so that any the map will be    // empty when this returns.    // NOTE: This function always allocates some data - the bAlloc flag is    //       for compatibility with an old interface and is ignored.    HX_RESULT InitHashTable(ULONG32 numBuckets = z_defaultNumBuckets,                       HXBOOL bAlloc = TRUE);    // defaults to on. Set this before you add anything! And make sure    // that if you set a hash function that it's behavior matches the case    // sensitivity flag.    void SetCaseSensitive(HXBOOL bCaseSens) { m_bCaseSens = bCaseSens ? true : false; }    typedef ULONG32 (*HashFunc_t) (key_arg_type key);    static ULONG32 DefaultHashFunc (key_arg_type key)    {        return HlxMap::StrHashFunc(key, true);    }    static ULONG32 DefaultNoCaseHashFunc (key_arg_type key)    {        return HlxMap::StrHashFunc(key, false);    }    inline HashFunc_t SetHashFunc (HashFunc_t hf = DefaultHashFunc); // XXXSAB: tested???    // Overrideables: special non-virtual (XXXSAB: Huh?)    inline ULONG32 HashKey(key_arg_type key) const;    inline static void SetDefaultNumBuckets (ULONG32 numBuckets);    inline static void SetDefaultChunkSize (ULONG32 chunkSize);    inline static void SetDefaultBucketChunkSize (ULONG32 chunkSize);    inline void SetBucketChunkSize (ULONG32 chunkSize);    // In _DEBUG mode, this does a bunch of DPRINTF's...    void Dump() const;private:    inline HXBOOL Lookup(key_arg_type key, int& retItem) const;    HXBOOL LookupInBucket(ULONG32 bucket, key_arg_type key, int& retItem) const;    Item* LookupItem(ULONG32 bucket, key_arg_type key);    inline const Item* LookupItem(ULONG32 bucket, key_arg_type key) const    {        return ((CHXMapStringToString*)this)->LookupItem(bucket, key);    }    // Internal function - key already verified not to exist    HXBOOL AddToBucket(ULONG32 bucket, key_arg_type key, value_arg_type value, int& retItem);    inline POSITION Item2Pos(int item) const;    inline int Pos2Item(POSITION pos) const;private:    HashFunc_t          m_hf;    ItemVec_t           m_items;    HlxMap::IntVec_t    m_free;    CHlxMapBuckets      m_buckets;    ULONG32             m_numBuckets;    ULONG32             m_chunkSize;    ULONG32             m_bucketChunkSize;    // Members specific to the type of key and/or value goes below here.    void ConstructTypeSpecifics();    inline HXBOOL IsKeyMatch (key_arg_type k1, key_arg_type k2) const    {        HXBOOL bRet;        if (m_bCaseSens) bRet = (strcmp(k1, k2) == 0);        else bRet = (strcasecmp(k1, k2) == 0);#ifdef XXXSAB        printf ("IsKeyMatch(\"%s\", \"%s\") -> %s\n",                k1, k2,                bRet ? "true" : "false");#endif /* XXXSAB */        return bRet;    }    bool                m_bCaseSens;};int CHXMapStringToString::GetCount() const{    return m_items.size() - m_free.size();}HXBOOL CHXMapStringToString::IsEmpty() const{    return GetCount() == 0;}ULONG32 CHXMapStringToString::GetHashTableSize() const{    return m_numBuckets;}CHXMapStringToString::HashFunc_t CHXMapStringToString::SetHashFunc (    CHXMapStringToString::HashFunc_t hf){    HashFunc_t old = m_hf;    m_hf = hf;    return old;}ULONG32 CHXMapStringToString::HashKey (key_arg_type key) const{    if (m_hf) return m_hf(key);    return m_bCaseSens ? DefaultHashFunc(key) : DefaultNoCaseHashFunc(key);}void CHXMapStringToString::SetDefaultNumBuckets (ULONG32 numBuckets){#if !defined(HELIX_CONFIG_NOSTATICS)    z_defaultNumBuckets = numBuckets;#endif}void CHXMapStringToString::SetDefaultChunkSize (ULONG32 chunkSize){#if !defined(HELIX_CONFIG_NOSTATICS)    z_defaultChunkSize = chunkSize;#endif}void CHXMapStringToString::SetDefaultBucketChunkSize (ULONG32 chunkSize){#if !defined(HELIX_CONFIG_NOSTATICS)    z_defaultBucketChunkSize = chunkSize;#endif}void CHXMapStringToString::SetBucketChunkSize (ULONG32 chunkSize){    m_bucketChunkSize = chunkSize;}#endif // _CHXMAPSTRINGTOSTRING_H_

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产日韩精品久久久| 亚洲一区在线观看免费 | 成人午夜在线播放| 精品在线播放午夜| 男人的j进女人的j一区| 日韩电影一区二区三区| 免费美女久久99| 色综合久久88色综合天天| 91网站黄www| 欧美在线制服丝袜| 欧美三级欧美一级| 91麻豆精品国产自产在线| 5858s免费视频成人| 亚洲欧美视频在线观看视频| 国产精品久久网站| 一区二区三区国产精华| 丝袜国产日韩另类美女| 狠狠色综合日日| 成人免费视频免费观看| 精品国产不卡一区二区三区| 国产亚洲成aⅴ人片在线观看| 中文成人综合网| 亚洲成人av一区| 精油按摩中文字幕久久| 6080yy午夜一二三区久久| 亚洲最大成人综合| 欧洲视频一区二区| 亚洲综合免费观看高清完整版| 成人黄色国产精品网站大全在线免费观看| 99精品视频在线免费观看| 91精品视频网| 爽好多水快深点欧美视频| 欧美日韩亚洲另类| 日韩精品一二三| 欧美一二三区精品| 国产精品久久久久9999吃药| 成人午夜看片网址| 亚洲欧洲另类国产综合| 精品一区二区三区日韩| 精品国内片67194| 精品一二三四区| 国产欧美日本一区视频| 99久久精品国产网站| 亚洲婷婷综合久久一本伊一区| 三级欧美在线一区| 精品久久五月天| 成人免费一区二区三区视频| 972aa.com艺术欧美| 亚洲精品美腿丝袜| 国产精品18久久久久| 成人av资源在线| 亚洲欧洲日本在线| 欧美日韩国产一级| 中文字幕亚洲区| 在线看国产日韩| 美日韩一区二区三区| 欧美中文字幕久久| 男男gaygay亚洲| 亚洲国产精品v| 国产在线精品一区二区夜色 | 99r国产精品| 国产一区二区三区四区五区入口 | 欧美三级中文字幕| 日本在线播放一区二区三区| 欧美精品一区二区在线播放| 99久久精品国产精品久久| 亚洲一区国产视频| 欧美成人video| 91网站最新网址| 另类小说综合欧美亚洲| 在线免费观看成人短视频| 美女视频网站黄色亚洲| 国产精品女同互慰在线看| 欧美精品xxxxbbbb| 亚洲 欧美综合在线网络| 日韩精品一区二区三区中文不卡| 午夜精品福利一区二区三区av| 色播五月激情综合网| 国产精品灌醉下药二区| 日韩一区二区三区电影| 91欧美激情一区二区三区成人| 久久99精品久久久久久国产越南| 亚洲婷婷国产精品电影人久久| 日韩欧美电影在线| 精品污污网站免费看| 成人午夜私人影院| 久久精品久久综合| 亚洲va中文字幕| 亚洲丝袜美腿综合| 国产日韩欧美a| 欧美成人一区二区三区在线观看 | 亚洲人成精品久久久久| 久久影视一区二区| 成人国产精品免费网站| 美女视频第一区二区三区免费观看网站| |精品福利一区二区三区| 久久综合资源网| 欧美一区二区三区色| 国产综合色产在线精品| 天天影视涩香欲综合网| 亚洲综合在线视频| 亚洲色图制服诱惑| ...中文天堂在线一区| 国产日韩高清在线| 国产区在线观看成人精品| 欧美xxxxx裸体时装秀| 欧美一区二区视频在线观看2020 | 成人性生交大片免费| 久久激情五月婷婷| 蜜桃在线一区二区三区| 日本欧美在线看| 丝袜脚交一区二区| 日本成人在线一区| 蜜臀久久99精品久久久画质超高清| 亚洲国产精品久久艾草纯爱| 久久亚洲免费视频| 26uuu亚洲| 久久蜜桃av一区二区天堂| 欧美性猛交xxxxxxxx| 经典三级在线一区| 韩国中文字幕2020精品| 国产一区二区三区最好精华液| 精品在线观看视频| 国产成人精品1024| 成人av在线播放网站| 一本大道综合伊人精品热热| 在线观看免费成人| 91麻豆精品国产91久久久久久久久| 欧美日韩成人在线| 欧美岛国在线观看| 久久精品免视看| 尤物在线观看一区| 日韩专区一卡二卡| 国产精品综合一区二区三区| 东方欧美亚洲色图在线| 久久99精品久久久久| 国产一区二区三区免费播放| 波多野结衣的一区二区三区| 久久91精品久久久久久秒播| 国产成人免费在线| 97久久精品人人做人人爽50路| 欧美亚洲另类激情小说| 日韩精品最新网址| 国产精品麻豆99久久久久久| 亚洲一二三专区| 久久97超碰国产精品超碰| 97精品国产露脸对白| 欧美理论电影在线| 欧美经典一区二区三区| 亚洲一区二区四区蜜桃| 久久精品999| 色噜噜狠狠成人中文综合| 日韩欧美美女一区二区三区| 亚洲欧洲精品一区二区三区不卡| 视频一区二区欧美| 成人app软件下载大全免费| 欧美一区二区三区小说| 中文字幕一区二区在线观看| 免费亚洲电影在线| 91日韩一区二区三区| 精品第一国产综合精品aⅴ| 亚洲人成亚洲人成在线观看图片| 蜜臀va亚洲va欧美va天堂| 99国产麻豆精品| 2017欧美狠狠色| 日韩在线一区二区| 99国产精品久久久久| 久久综合久久综合亚洲| 五月天国产精品| 色综合久久99| 日本一区二区三区dvd视频在线| 日韩国产高清在线| 在线观看一区二区视频| 国产精品五月天| 国产一区二区三区在线观看免费| 欧美日韩国产综合一区二区三区 | 99久久精品费精品国产一区二区| 91精品国模一区二区三区| 亚洲免费在线视频一区 二区| 国产一区二区三区在线观看精品 | 免费看日韩a级影片| 在线欧美日韩国产| 国产精品久久久久精k8| 国产乱码精品1区2区3区| 日韩一卡二卡三卡| 日韩国产欧美在线视频| 欧美自拍偷拍一区| 一区二区三区不卡视频在线观看 | 久久99国产精品久久| 91精品国产91热久久久做人人 | 欧美在线视频全部完| 日韩一区在线免费观看| eeuss国产一区二区三区| 国产日韩欧美电影| 国产·精品毛片| 欧美激情在线一区二区| 成人在线视频首页| 国产精品毛片无遮挡高清| av一区二区三区| 亚洲日本va午夜在线影院|