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

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

?? xbytebuffer.h

?? BCB的學習資料
?? H
字號:
//---------------------------------------------------------------------------

#ifndef XByteBufferH
#define XByteBufferH


#ifndef XCommonTypeH
#include <XCommonType.h>
#endif
#ifndef XExcepMsgH
#include <XExcepMsg.h>
#endif
#ifndef XArrayH
#include <XArray.h>
#endif
//---------------------------------------------------------------------------
namespace zdhsoft
{
//定義XByteBuffer缺省塊大小
const int XBYTE_BUFFER_MIN_BLOCK = 4096;
/*
///////////////////////////////////////////////////////////////////////////////
[Name]XByteBuffer
[Title]字節緩沖區
///////////////////////////////////////////////////////////////////////////////
[Description]
    這個類主要實現數據處理,這個主要是針對DVB中PSI/SI的數據處理進行設計的,以方便數據的操作
    緩沖區的大小是XBYTE_BUFFER_MIN_BLOCK的倍數,在這里XBYTE_BUFFER_MIN_BLOCK的值為4k,這樣做則是
    為了避免過多的內存碎片和過多的再分配內存
    
    由于這個類主要適用于數字電視系統中,所以對于16位,32位,64位整數存放,與PC系列存放整數的
    順序剛好相反:如值0x1234在PC系列中存放為34 12,而XByteBuffer中的存放,則為12 34
    為了便于對緩沖區的操作,在這里提供了大量的操作方法
    主要有Append...Array追加數組,Append...追加數值,AppendData,AppendString等
    重載了許多<<運算符
    為了便于設置和取值,還提供了Set...Value和Get...Value系統操作方法
[Version]1.0
[Author]Rex Winter
[Date]2005-6-18
//////////////////////////////////////////////////////////////////////////////
*/
class XByteBuffer
{
public:
//缺省實現的方法
    XByteBuffer(int iPrepareLength = XBYTE_BUFFER_MIN_BLOCK);
    XByteBuffer(void * aData,int aDataSize,int iPrepareLength = XBYTE_BUFFER_MIN_BLOCK);
    XByteBuffer(const XByteBuffer & aBuffer);
    ~XByteBuffer();

    //一些常用方法
    const void * Data() const { return (void *)m_Data; }
    int GetLength() const { return m_Length; }
    XByte & operator[](int Index);
    const XByte & operator[] (int Index) const;
    XByteBuffer & operator=(const XByteBuffer & aBuffer);
    void Clear(bool bFree = false);
    void ensureCapacity(int minimumCapacity)
    {
        if (minimumCapacity > m_DataSize ) {
            expandCapacity(minimumCapacity);
        }
    }
    //追加系列方法
    XByteBuffer & AppendByteArray(const XArray<XByte> &aByteArray);
    XByteBuffer & AppendCharArray(const XArray<XChar> &aCharArray);
    XByteBuffer & AppendBoolArray(const XArray<XBoolean> &aBoolArray);
    XByteBuffer & AppendShortArray(const XArray<XShort> &aShortArray);
    XByteBuffer & AppendWordArray(const XArray<XWord> &aWordArray);

    XByteBuffer & AppendIntArray(const XArray<XInt> &aIntArray);
    XByteBuffer & AppendDWordArray(const XArray<XDWord> &aDWordArray);
    XByteBuffer & AppendLongArray(const XArray<XLong> &aLongArray);
    XByteBuffer & AppendDDWordArray(const XArray<XDDWord> &aDDWordArray);
    XByteBuffer & AppendFloatArray(const XArray<XFloat> &aFloatArray);
    XByteBuffer & AppendDoubleArray(const XArray<XDouble> &aDoubleArray);
    XByteBuffer & AppendLongDoubleArray(const XArray<XLongDouble> &aLongDoubleArray);

    XByteBuffer & AppendByteArray(const XDynamicArray<XByte> &aByteArray);
    XByteBuffer & AppendCharArray(const XDynamicArray<XChar> &aCharArray);
    XByteBuffer & AppendBoolArray(const XDynamicArray<XBoolean> &aBoolArray);
    XByteBuffer & AppendShortArray(const XDynamicArray<XShort> &aShortArray);
    XByteBuffer & AppendWordArray(const XDynamicArray<XWord> &aWordArray);

    XByteBuffer & AppendIntArray(const XDynamicArray<XInt> &aIntArray);
    XByteBuffer & AppendDWordArray(const XDynamicArray<XDWord> &aDWordArray);
    XByteBuffer & AppendLongArray(const XDynamicArray<XLong> &aLongArray);
    XByteBuffer & AppendDDWordArray(const XDynamicArray<XDDWord> &aDDWordArray);
    XByteBuffer & AppendFloatArray(const XDynamicArray<XFloat> &aFloatArray);
    XByteBuffer & AppendDoubleArray(const XDynamicArray<XDouble> &aDoubleArray);
    XByteBuffer & AppendLongDoubleArray(const XDynamicArray<XLongDouble> &aLongDoubleArray);


    XByteBuffer & operator<<(const XArray<XByte> &aByteArray)
    {
        return AppendByteArray(aByteArray);
    }
    XByteBuffer & operator<<(const XArray<XChar> &aCharArray)
    {
        return AppendCharArray(aCharArray);
    }
    XByteBuffer & operator<<(const XArray<XBoolean> &aBooleanArray)
    {
        return AppendBoolArray(aBooleanArray);
    }
    XByteBuffer & operator<<(const XArray<XShort> &aShortArray)
    {
        return AppendShortArray( aShortArray );
    }
    XByteBuffer & operator<<(const XArray<XWord> &aWordArray)
    {
        return AppendWordArray( aWordArray );
    }
    XByteBuffer & operator<<(const XArray<XInt> &aIntArray)
    {
        return AppendIntArray( aIntArray );
    }
    XByteBuffer & operator<<(const XArray<XDWord> &aDWordArray)
    {
        return AppendDWordArray( aDWordArray );
    }
    XByteBuffer & operator<<(const XArray<XLong> &aLongArray)
    {
        return AppendLongArray( aLongArray );
    }
    XByteBuffer & operator<<(const XArray<XDDWord> &aDDWordArray)
    {
        return AppendDDWordArray( aDDWordArray );
    }
    XByteBuffer & operator<<(const XArray<XFloat> &aFloatArray)
    {
        return AppendFloatArray( aFloatArray );
    }
    XByteBuffer & operator<<(const XArray<XDouble> &aDoubleArray)
    {
        return AppendDoubleArray( aDoubleArray );
    }
    XByteBuffer & operator<<(const XArray<XLongDouble> &aLongDoubleArray)
    {
        return AppendLongDoubleArray( aLongDoubleArray );
    }
    //
    XByteBuffer & operator<<(const XDynamicArray<XByte> &aByteArray)
    {
        return AppendByteArray(aByteArray);
    }
    XByteBuffer & operator<<(const XDynamicArray<XChar> &aCharArray)
    {
        return AppendCharArray(aCharArray);
    }
    XByteBuffer & operator<<(const XDynamicArray<XBoolean> &aBooleanArray)
    {
        return AppendBoolArray(aBooleanArray);
    }
    XByteBuffer & operator<<(const XDynamicArray<XShort> &aShortArray)
    {
        return AppendShortArray( aShortArray );
    }
    XByteBuffer & operator<<(const XDynamicArray<XWord> &aWordArray)
    {
        return AppendWordArray( aWordArray );
    }
    XByteBuffer & operator<<(const XDynamicArray<XInt> &aIntArray)
    {
        return AppendIntArray( aIntArray );
    }
    XByteBuffer & operator<<(const XDynamicArray<XDWord> &aDWordArray)
    {
        return AppendDWordArray( aDWordArray );
    }
    XByteBuffer & operator<<(const XDynamicArray<XLong> &aLongArray)
    {
        return AppendLongArray( aLongArray );
    }
    XByteBuffer & operator<<(const XDynamicArray<XDDWord> &aDDWordArray)
    {
        return AppendDDWordArray( aDDWordArray );
    }
    XByteBuffer & operator<<(const XDynamicArray<XFloat> &aFloatArray)
    {
        return AppendFloatArray( aFloatArray );
    }
    XByteBuffer & operator<<(const XDynamicArray<XDouble> &aDoubleArray)
    {
        return AppendDoubleArray( aDoubleArray );
    }
    XByteBuffer & operator<<(const XDynamicArray<XLongDouble> &aLongDoubleArray)
    {
        return AppendLongDoubleArray( aLongDoubleArray );
    }

    //
    XByteBuffer & SetByteValue(int iPos,XByte aByte);
    XByteBuffer & SetCharValue(int iPos,XChar aChar);
    XByteBuffer & SetWordValue(int iPos,XWord aWord);
    XByteBuffer & SetShortValue(int iPos,XShort aShort);
    XByteBuffer & SetIntValue(int iPos,XInt aInt);
    XByteBuffer & SetDWordValue(int iPos,XDWord aDWord);
    XByteBuffer & SetLongValue(int iPos,XLong aLong);
    XByteBuffer & SetDDWordValue(int iPos,XDDWord aDDWord);
    XByteBuffer & SetBoolValue(int iPos,XBoolean aBool);
    XByteBuffer & SetFloatValue(int iPos,XFloat aFloat);
    XByteBuffer & SetDoubleValue(int iPos,XDouble aDouble);
    XByteBuffer & SetLongDoubleValue(int iPos,XLongDouble aLongDouble);
    XByteBuffer & SetDataValue(int iPos,const void * aData,int iSize);

    XByte GetByteValue(int iPos) const;
    XChar GetCharValue(int iPos) const;
    XWord GetWordValue(int iPos) const;
    XShort GetShortValue(int iPos) const;
    XInt GetIntValue(int iPos) const;
    XDWord GetDWordValue(int iPos) const;
    XLong GetLongValue(int iPos) const;
    XDDWord GetDDWordValue(int iPos) const;
    XBoolean GetBoolValue(int iPos) const;
    XFloat GetFloatValue(int iPos) const;
    XDouble GetDoubleValue(int iPos) const;
    XLongDouble GetLongDoubleValue(int iPos) const;

    XByteBuffer &GetByteValue(int iPos,XByte & v) 
    {
        v = GetByteValue(iPos);
        return *this;
    }
    XByteBuffer &GetCharValue(int iPos,XChar & v)
    {
        v = GetCharValue(iPos);
        return *this;
    }
    XByteBuffer &GetWordValue(int iPos,XWord & v)
    {
        v = GetWordValue(iPos);
        return *this;
    }
    XByteBuffer &GetShortValue(int iPos,XShort & v)
    {
        v = GetShortValue(iPos);
        return *this;
    }
    XByteBuffer &GetIntValue(int iPos,XInt & v)
    {
        v = GetIntValue(iPos);
        return *this;
    }
    XByteBuffer &GetDWordValue(int iPos,XDWord & v)
    {
        v = GetDWordValue(iPos);
        return *this;
    }
    XByteBuffer &GetLongValue(int iPos,XLong & v)
    {
        v = GetLongValue(iPos);
        return *this;
    }
    XByteBuffer &GetDDWordValue(int iPos,XDDWord & v)
    {
        v = GetDDWordValue(iPos);
        return *this;
    }
    XByteBuffer &GetBoolValue(int iPos,XBoolean & v)
    {
        v = GetBoolValue(iPos);
        return *this;
    }
    XByteBuffer &GetFloatValue(int iPos,XFloat & v)
    {
        v = GetFloatValue(iPos);
        return *this;
    }
    XByteBuffer &GetDoubleValue(int iPos,XDouble & v)
    {
        v = GetDoubleValue(iPos);
        return *this;
    }
    XByteBuffer &GetLongDoubleValue(int iPos,XLongDouble & v) 
    {
        v = GetLongDoubleValue(iPos);
        return *this;
    }
    XByteBuffer &GetDataValue(int iPos,void * aData,int iSize);
    void GetDataValue(int iPos,void *aData,int iSize) const;

    XByteBuffer & AppendBuffer(const XByteBuffer & aBuffer);
    XByteBuffer & AppendString(const AnsiString & aString);
    XByteBuffer & AppendData(const void * aData,int aDataSize);
    XByteBuffer & AppendString(const char * aString);
    XByteBuffer & AppendByte(XByte aByte);
    XByteBuffer & AppendChar(XChar aChar);
    XByteBuffer & AppendWord(XWord aWord);
    XByteBuffer & AppendShort(XShort aShort);
    XByteBuffer & AppendInt(XInt aInt);
    XByteBuffer & AppendDWord(XDWord aDWord);
    XByteBuffer & AppendLong(XLong aLong);
    XByteBuffer & AppendDDWord(XDDWord aDDWord);
    XByteBuffer & AppendFloat(XFloat aFloat);
    XByteBuffer & AppendDouble(XDouble aDouble);
    XByteBuffer & AppendLongDouble(XLongDouble aLongDouble);
    XByteBuffer & AppendBoolean(XBoolean v);


    XByteBuffer & operator<<(XBoolean v)
    {
        return AppendBoolean(v);
    }
    XByteBuffer & operator<<(const XByteBuffer & aBuffer)
    {
        return AppendBuffer(aBuffer);
    }
    XByteBuffer & operator<<(const AnsiString & aString)
    {
        return AppendString(aString);
    }
    XByteBuffer & operator<<(const char * aString)
    {
        return AppendString(aString);
    }

    XByteBuffer & operator<<(XByte aByte)
    {
        return AppendByte(aByte);
    }
    XByteBuffer & operator<<(XChar aChar)
    {
        return AppendChar(aChar);
    }
    XByteBuffer & operator<<(XWord v)
    {
        return AppendWord(v);
    }
    XByteBuffer & operator<<(XShort v)
    {
        return AppendShort(v);
    }

    XByteBuffer & operator<<(XInt v)
    {
        return AppendInt(v);
    }
    XByteBuffer & operator<<(XDWord v)
    {
        return AppendDWord(v);
    }
    XByteBuffer & operator<<(XLong v)
    {
        return AppendLong(v);
    }
    XByteBuffer & operator<<(XDDWord v)
    {
        return AppendDDWord(v);
    }
    XByteBuffer & operator<<(XFloat v)
    {
        return AppendFloat(v);
    }
    XByteBuffer & operator<<(XDouble v)
    {
        return AppendDouble(v);
    }
    XByteBuffer & operator<<(XLongDouble v)
    {
        return AppendLongDouble(v);
    }

public:
    __property int Length = { read = m_Length };
private:
    int PrepareLength(iPrepareLength) //計算要準備的字節數
        {
            if( iPrepareLength < XBYTE_BUFFER_MIN_BLOCK ) iPrepareLength = XBYTE_BUFFER_MIN_BLOCK;
            else if( (iPrepareLength % XBYTE_BUFFER_MIN_BLOCK) != 0) iPrepareLength = (iPrepareLength / XBYTE_BUFFER_MIN_BLOCK+1) * XBYTE_BUFFER_MIN_BLOCK;
            return iPrepareLength;
        }
    void expandCapacity(int minimumCapacity,bool bCopyData = true);
private:
    XByte * m_Data;
    int m_DataSize;
    int m_Length;
};

};
#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
午夜精品成人在线视频| 一区二区三区日韩欧美| 日本高清视频一区二区| 蜜臀va亚洲va欧美va天堂 | 免费高清成人在线| 日韩美女啊v在线免费观看| 日韩欧美亚洲一区二区| 欧洲精品一区二区| av网站免费线看精品| 国产一区二区三区日韩 | 久久9热精品视频| 亚洲高清不卡在线| 亚洲天堂精品在线观看| 国产欧美精品一区二区色综合| 日韩午夜av电影| 欧美猛男超大videosgay| 97se亚洲国产综合自在线不卡| 精品亚洲成av人在线观看| 天天综合天天做天天综合| 亚洲乱码国产乱码精品精小说 | 国产精品一区二区91| 日本成人在线不卡视频| 午夜精品一区二区三区三上悠亚| 亚洲欧美成aⅴ人在线观看| 国产精品系列在线| 国产午夜一区二区三区| 精品99999| 日韩色在线观看| 91精品国产欧美一区二区| 欧美人狂配大交3d怪物一区| 欧美午夜精品免费| 欧美日韩精品一区二区| 欧美日韩综合色| 欧美日韩亚洲综合| 欧美日韩免费一区二区三区视频 | 欧美日韩精品一区二区三区蜜桃 | 欧美性xxxxx极品少妇| 91日韩一区二区三区| 99久久精品国产一区二区三区| 成人精品gif动图一区| 成人免费观看视频| 成人a级免费电影| 成人污视频在线观看| 成人黄动漫网站免费app| 精品蜜桃在线看| 欧美最猛黑人xxxxx猛交| 欧美主播一区二区三区| 欧美三级一区二区| 欧美一区永久视频免费观看| 欧美一级免费大片| 精品成人a区在线观看| 国产欧美日韩亚州综合| 国产精品天美传媒| 亚洲男人的天堂在线aⅴ视频| 亚洲一区在线观看免费| 亚洲成人777| 精品一区二区三区免费毛片爱 | 热久久国产精品| 久久国产三级精品| 国产99久久久久| 91亚洲国产成人精品一区二三| 欧美在线观看18| 精品三级在线看| 亚洲国产精品99久久久久久久久| 亚洲美女视频在线观看| 亚洲日本va在线观看| 亚洲第四色夜色| 国产麻豆精品theporn| 色综合天天综合网天天看片| 91.xcao| 久久夜色精品国产噜噜av| 国产精品久久久久久一区二区三区| 亚洲精品欧美综合四区| 美脚の诱脚舐め脚责91| 成人v精品蜜桃久久一区| 欧美视频中文字幕| 国产婷婷色一区二区三区在线| 精品视频在线免费| 欧美v国产在线一区二区三区| 国产三区在线成人av| 亚洲一区二区视频在线| 国产精品一卡二| 欧美日韩国产精品自在自线| 久久九九国产精品| 亚洲成人免费看| 高清在线成人网| 日韩一级欧美一级| 亚洲色图欧美在线| 久久国产夜色精品鲁鲁99| 色哦色哦哦色天天综合| 欧美精品一区二| 亚洲成av人片在www色猫咪| 国产成人日日夜夜| 制服丝袜亚洲色图| 自拍视频在线观看一区二区| 国产自产视频一区二区三区| 欧美日韩精品欧美日韩精品一 | 亚洲欧美中日韩| 另类小说图片综合网| 欧美吞精做爰啪啪高潮| 国产农村妇女精品| 麻豆精品国产传媒mv男同 | 久久久久久久电影| 日韩二区三区在线观看| 色综合色狠狠天天综合色| 久久嫩草精品久久久久| 日韩精品视频网| 欧美视频一区二区三区| 国产精品色哟哟| 国产精品69毛片高清亚洲| 日韩亚洲欧美一区| 亚洲成av人片在线| 色欧美片视频在线观看| ●精品国产综合乱码久久久久| 精油按摩中文字幕久久| 日韩欧美综合一区| 日韩高清一区在线| 欧美日韩一区三区四区| 一区二区日韩电影| 91成人国产精品| 亚洲免费伊人电影| 91美女精品福利| 国产精品国产a| 成人久久视频在线观看| 中文字幕第一区二区| 3d成人h动漫网站入口| 国产一区二区在线观看免费| 在线成人av影院| 亚洲一区二区三区精品在线| 色天使久久综合网天天| 日韩毛片视频在线看| 91在线观看一区二区| 中文字幕一区二区在线观看| 成人免费观看视频| 中文字幕在线观看一区| 99精品久久99久久久久| 最新成人av在线| 欧美亚洲动漫制服丝袜| 亚洲成人免费在线观看| 在线观看91av| 蜜乳av一区二区| 精品国产青草久久久久福利| 国产在线观看一区二区| 欧美高清一级片在线观看| av资源站一区| 亚洲精品高清在线| 欧美日韩第一区日日骚| 日本亚洲电影天堂| 久久久亚洲高清| 成人一级片在线观看| 自拍偷在线精品自拍偷无码专区| 在线观看网站黄不卡| 日韩精品福利网| 久久久亚洲精华液精华液精华液| 成人免费视频播放| 一区二区三区中文字幕| 欧美欧美午夜aⅴ在线观看| 日本欧美一区二区在线观看| 欧美tickling挠脚心丨vk| 国产福利91精品| 一区二区三区中文免费| 欧美高清你懂得| 国产精品自拍在线| 亚洲精品第1页| 91麻豆精品久久久久蜜臀| 国产呦萝稀缺另类资源| 亚洲欧美偷拍卡通变态| 日韩一区二区精品在线观看| 国产精品一二二区| 亚洲最大色网站| 欧美成人午夜电影| 99久久久久久| 日韩成人一区二区三区在线观看| 久久综合中文字幕| 91久久人澡人人添人人爽欧美| 日韩综合小视频| 亚洲欧洲另类国产综合| 色婷婷av一区二区三区gif| 国产精品国产自产拍高清av王其| 色播五月激情综合网| 另类专区欧美蜜桃臀第一页| 综合久久久久综合| 日韩免费看的电影| 91视频在线观看免费| 免费成人在线观看视频| 亚洲欧美另类综合偷拍| 久久精品国产一区二区三| 另类欧美日韩国产在线| 欧美成人欧美edvon| 国产精品毛片a∨一区二区三区| 国产精品美女一区二区在线观看| 国产精品久久久久久久久图文区 | 激情五月激情综合网| 久久国产乱子精品免费女| 国产高清精品久久久久| 欧美一区二区在线看| 日韩不卡一区二区| 欧美精品自拍偷拍动漫精品| 国产a久久麻豆| 六月丁香婷婷色狠狠久久|