CS::Utility::BitOps Namespace Reference (Crystal Space 2.0 Public API Reference)

| ## Public API Reference

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Namespace List
- Namespace Members

Functions
CS::Utility::BitOps Namespace Reference

Bit operations. More...

## Functions
uint32 | ComputeBitsSet (uint32 v)
| Compute number of bits set in given number.
bool | ScanBitForward (uint32 value, unsigned long &index)
| Compute index of first bit set, scanned from LSB to MSB.
bool | ScanBitReverse (uint32 value, unsigned long &index)
| Compute index of first bit set, scanned from MSB to LSB.

## Detailed Description

Bit operations.

## Function Documentation

uint32 CS::Utility::BitOps::ComputeBitsSet | ( | uint32 | v | ) |

Compute number of bits set in given number.

Definition at line 96 of file bitops.h.

bool CS::Utility::BitOps::ScanBitForward | ( | uint32 | value,
|  | unsigned long & | index
| ) |  |

Compute index of first bit set, scanned from LSB to MSB.

Returns:
  true if any bit is found

Parameters:

  value | Input value
  index | Index of first bit set

Definition at line 38 of file bitops.h.

bool CS::Utility::BitOps::ScanBitReverse | ( | uint32 | value,
|  | unsigned long & | index
| ) |  |

Compute index of first bit set, scanned from MSB to LSB.

Returns:
  true if any bit is found

Parameters:

  value | Input value
  index | Index of first bit set

Definition at line 69 of file bitops.h.