libcute 0.1
Loading...
Searching...
No Matches
Classes | Functions
bitmap.h File Reference
#include "memory/allocator.h"
#include "object/optional.h"
#include <stddef.h>
Include dependency graph for bitmap.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  cu_Bitmap
 Dynamically allocated bitmap. More...
 

Functions

cu_Bitmap_Optional cu_Bitmap_create (cu_Allocator backingAllocator, size_t bitCount)
 
void cu_Bitmap_destroy (cu_Bitmap *bitmap)
 
bool cu_Bitmap_get (const cu_Bitmap *bitmap, size_t index)
 
void cu_Bitmap_set (cu_Bitmap *bitmap, size_t index)
 
void cu_Bitmap_clear (cu_Bitmap *bitmap, size_t index)
 
void cu_Bitmap_clear_all (cu_Bitmap *bitmap)
 

Detailed Description

Heap-backed bitmap container.

Function Documentation

◆ cu_Bitmap_clear()

void cu_Bitmap_clear ( cu_Bitmap bitmap,
size_t  index 
)

Clear a single bit.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cu_Bitmap_clear_all()

void cu_Bitmap_clear_all ( cu_Bitmap bitmap)

Clear all bits in the bitmap.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cu_Bitmap_create()

cu_Bitmap_Optional cu_Bitmap_create ( cu_Allocator  backingAllocator,
size_t  bitCount 
)

Create a bitmap with the given number of bits.

◆ cu_Bitmap_destroy()

void cu_Bitmap_destroy ( cu_Bitmap bitmap)

Release all memory owned by bitmap.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cu_Bitmap_get()

bool cu_Bitmap_get ( const cu_Bitmap bitmap,
size_t  index 
)

Query a single bit.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cu_Bitmap_set()

void cu_Bitmap_set ( cu_Bitmap bitmap,
size_t  index 
)

Set a single bit.

Here is the call graph for this function:
Here is the caller graph for this function: