Classes | Namespaces | Functions

C:/knet/include/kNet/BitOps.h File Reference

Provides bit operation utilities on bitfields. More...

#include <cassert>
#include "Types.h"
Include dependency graph for BitOps.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  kNet::LSBT< Bits >
 Template-evaluated enum that gives a mask with the Bits LSB bits set. More...
class  kNet::BitMaskT< Pos, Bits >
 A template-computed enum to create a mask of given amount of bits at given position of a u32 variable. More...

Namespaces

namespace  kNet

Functions

u32 kNet::BinaryStringToValue (const char *str)
 Returns the u32 representation of the given string that consists only of characters '0' and '1'.
int kNet::CountBitsSet (u32 value)
 Returns the number of bits that are set (ones) in the given value.
u32 kNet::LSB (u32 bits)
u32 kNet::BitMask (u32 pos, u32 bits)
template<typename ResultType , typename InputType , int APos, int ABits, int RPos, int RBits, int GPos, int GBits, int BPos, int BBits>
ResultType kNet::PackBits (InputType a, InputType r, InputType g, InputType b)
template<typename ResultType , typename InputType >
ResultType kNet::PackBits (int APos, int ABits, int RPos, int RBits, int GPos, int GBits, int BPos, int BBits, InputType a, InputType r, InputType g, InputType b)
template<typename ResultType , typename InputType , int Pos, int Bits>
void kNet::ExtractBits (ResultType &out, const InputType &in)
 Extracts the given adjacent bits from a larger bitfield.
template<typename ResultType , typename InputType >
void kNet::ExtractBits (int pos, int bits, ResultType &out, const InputType &in)
 Extracts the given adjacent bits from a larger bitfield.

Detailed Description

Provides bit operation utilities on bitfields.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines