| include/Zycore/Bitset.h(3) | Library Functions Manual | include/Zycore/Bitset.h(3) |
include/Zycore/Bitset.h
#include <Zycore/Allocator.h>
#include <Zycore/Status.h>
#include <Zycore/Types.h>
#include <Zycore/Vector.h>
struct ZyanBitset_
typedef struct ZyanBitset_ ZyanBitset
typedef ZyanStatus(* ZyanBitsetByteOperation) (ZyanU8 *v1, const
ZyanU8 *v2)
ZYCORE_EXPORT ZYAN_REQUIRES_LIBC ZyanStatus
ZyanBitsetInit (ZyanBitset *bitset, ZyanUSize count)
ZYCORE_EXPORT ZyanStatus ZyanBitsetInitEx
(ZyanBitset *bitset, ZyanUSize count, ZyanAllocator
*allocator, ZyanU8 growth_factor, ZyanU8 shrink_threshold)
ZYCORE_EXPORT ZyanStatus ZyanBitsetInitBuffer
(ZyanBitset *bitset, ZyanUSize count, void *buffer, ZyanUSize
capacity)
ZYCORE_EXPORT ZyanStatus ZyanBitsetDestroy
(ZyanBitset *bitset)
ZYCORE_EXPORT ZyanStatus ZyanBitsetPerformByteOperation
(ZyanBitset *destination, const ZyanBitset *source,
ZyanBitsetByteOperation operation)
ZYCORE_EXPORT ZyanStatus ZyanBitsetAND (ZyanBitset
*destination, const ZyanBitset *source)
ZYCORE_EXPORT ZyanStatus ZyanBitsetOR (ZyanBitset
*destination, const ZyanBitset *source)
ZYCORE_EXPORT ZyanStatus ZyanBitsetXOR (ZyanBitset
*destination, const ZyanBitset *source)
ZYCORE_EXPORT ZyanStatus ZyanBitsetFlip
(ZyanBitset *bitset)
ZYCORE_EXPORT ZyanStatus ZyanBitsetSet (ZyanBitset
*bitset, ZyanUSize index)
ZYCORE_EXPORT ZyanStatus ZyanBitsetReset
(ZyanBitset *bitset, ZyanUSize index)
ZYCORE_EXPORT ZyanStatus ZyanBitsetAssign
(ZyanBitset *bitset, ZyanUSize index, ZyanBool value)
ZYCORE_EXPORT ZyanStatus ZyanBitsetToggle
(ZyanBitset *bitset, ZyanUSize index)
ZYCORE_EXPORT ZyanStatus ZyanBitsetTest
(ZyanBitset *bitset, ZyanUSize index)
ZYCORE_EXPORT ZyanStatus ZyanBitsetTestMSB
(ZyanBitset *bitset)
ZYCORE_EXPORT ZyanStatus ZyanBitsetTestLSB
(ZyanBitset *bitset)
ZYCORE_EXPORT ZyanStatus ZyanBitsetSetAll
(ZyanBitset *bitset)
ZYCORE_EXPORT ZyanStatus ZyanBitsetResetAll
(ZyanBitset *bitset)
ZYCORE_EXPORT ZyanStatus ZyanBitsetPush
(ZyanBitset *bitset, ZyanBool value)
ZYCORE_EXPORT ZyanStatus ZyanBitsetPop (ZyanBitset
*bitset)
ZYCORE_EXPORT ZyanStatus ZyanBitsetClear
(ZyanBitset *bitset)
ZYCORE_EXPORT ZyanStatus ZyanBitsetReserve
(ZyanBitset *bitset, ZyanUSize count)
ZYCORE_EXPORT ZyanStatus ZyanBitsetShrinkToFit
(ZyanBitset *bitset)
ZYCORE_EXPORT ZyanStatus ZyanBitsetGetSize (const
ZyanBitset *bitset, ZyanUSize *size)
ZYCORE_EXPORT ZyanStatus ZyanBitsetGetCapacity (const
ZyanBitset *bitset, ZyanUSize *capacity)
ZYCORE_EXPORT ZyanStatus ZyanBitsetGetSizeBytes (const
ZyanBitset *bitset, ZyanUSize *size)
ZYCORE_EXPORT ZyanStatus ZyanBitsetGetCapacityBytes
(const ZyanBitset *bitset, ZyanUSize *capacity)
ZYCORE_EXPORT ZyanStatus ZyanBitsetCount (const
ZyanBitset *bitset, ZyanUSize *count)
ZYCORE_EXPORT ZyanStatus ZyanBitsetAll (const
ZyanBitset *bitset)
ZYCORE_EXPORT ZyanStatus ZyanBitsetAny (const
ZyanBitset *bitset)
ZYCORE_EXPORT ZyanStatus ZyanBitsetNone (const
ZyanBitset *bitset)
Implements the bitset class.
Defines the ZyanVector struct.
All fields in this struct should be considered as 'private'. Any changes may lead to unexpected behavior.
Defines the ZyanBitsetByteOperation function prototype.
Parameters
Returns
This function is used to perform byte-wise operations on two ZyanBitset instances.
Checks, if all bits of the given bitset are set.
Parameters
Returns
Performs a logical AND operation on the given ZyanBitset instances.
Parameters
Returns
If the destination bitmask contains more bits than the source one, the state of the remaining bits will be undefined.
Checks, if at least one bit of the given bitset is set.
Parameters
Returns
Sets the bit at index of the given ZyanBitset instance to the specified value.
Parameters
Returns
Deletes all bits of the given ZyanBitset instance.
Parameters
Returns
Returns the amount of bits set in the given bitset.
Parameters
Returns
Destroys the given ZyanBitset instance.
Parameters
Returns
Flips all bits of the given ZyanBitset instance.
Parameters
Returns
Returns the current capacity of the bitset in bits.
Parameters
Returns
Returns the current capacity of the bitset in bytes.
Parameters
Returns
Returns the current size of the bitset in bits.
Parameters
Returns
Returns the current size of the bitset in bytes.
Parameters
Returns
Initializes the given ZyanBitset instance.
Parameters
Returns
The space for the bitset is dynamically allocated by the default allocator using the default growth factor and the default shrink threshold.
Initializes the given ZyanBitset instance and configures it to use a custom user defined buffer with a fixed size.
Parameters
Returns
Initializes the given ZyanBitset instance and sets a custom allocator and memory allocation/deallocation parameters.
Parameters
Returns
A growth factor of 1 disables overallocation and a shrink threshold of 0 disables dynamic shrinking.
Checks, if none bits of the given bitset are set.
Parameters
Returns
Performs a logical OR operation on the given ZyanBitset instances.
Parameters
Returns
If the destination bitmask contains more bits than the source one, the state of the remaining bits will be undefined.
Performs a byte-wise operation for every byte in the given ZyanBitset instances.
Parameters
Returns
The operation callback is invoked once for every byte in the smallest of the ZyanBitset instances.
Removes the last bit of the bitset.
Parameters
Returns
Adds a new bit at the end of the bitset.
Parameters
Returns
Changes the capacity of the given ZyanBitset instance.
Parameters
Returns
Sets the bit at index of the given ZyanBitset instance to 0.
Parameters
Returns
Sets all bits of the given ZyanBitset instance to 0.
Parameters
Returns
Sets the bit at index of the given ZyanBitset instance to 1.
Parameters
Returns
Sets all bits of the given ZyanBitset instance to 1.
Parameters
Returns
Shrinks the capacity of the given bitset to match it's size.
Parameters
Returns
Returns the value of the bit at index.
Parameters
Returns
Returns the value of the least significant bit.
Parameters
Returns
Returns the value of the most significant bit.
Parameters
Returns
Toggles the bit at index of the given ZyanBitset instance.
Parameters
Returns
Performs a logical XOR operation on the given ZyanBitset instances.
Parameters
Returns
If the destination bitmask contains more bits than the source one, the state of the remaining bits will be undefined.
Generated automatically by Doxygen for Zycore from the source code.
| Version 1.5.2.0 | Zycore |