diff -r 000000000000 -r 95b198f216e5 inc/BitStream.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/inc/BitStream.h Thu Dec 17 08:52:27 2009 +0200 @@ -0,0 +1,95 @@ +/* +* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: ?Description +* +*/ + + + +#ifndef BITSTREAM_H +#define BITSTREAM_H + +#include + +#define INLINE + +// FORWARD DECLARATIONS + +// CLASS DECLARATION + +/** +* TBitStream: Stream of bits +* +* @lib - +* @since 3.0 +*/ +template +class TBitStream + { +public: // New functions + + INLINE void Clear(); + + INLINE void SetBit( + const TInt aBit); + + INLINE void SetBitValue( + const TInt aBit, + const TInt aValue); + + INLINE void ClearBit( + const TInt aBit); + + INLINE TInt GetBit( + const TInt aBit) const; + + INLINE void XorBit( + const TInt aBit, + const TInt aValue); + + INLINE TPtrC8 Des() const; + + INLINE void Set( + const TDesC8& aInput); + + INLINE void Copy( + TBitStream aBitStream); + + INLINE void Or( + TBitStream aBitStream); + + INLINE void Xor( + TBitStream aBitStream); + + INLINE void And( + TBitStream aBitStream); + + INLINE void Not(); + + INLINE TInt operator[]( + const TInt aBit) const; + +protected: // New functions + +protected: // Data + + // Buffer with the data + TBuf8 iData; + }; + +#include "BitStream.inl" + +#endif // BITSTREAM_H + +// End of File