diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-12-18 19:38:22 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-12-18 19:38:22 +0100 |
| commit | f651858b579138d5df0f89363879825513ece227 (patch) | |
| tree | 7f9fc7f18d7948e4c969b3901e9ca6559f4941d9 /src/kernel/NeKit/Atom.h | |
| parent | ed6d2f6007b572b907e3cb11b4303c13d1572c9c (diff) | |
chore: MKFS library improvements on documentation.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'src/kernel/NeKit/Atom.h')
| -rw-r--r-- | src/kernel/NeKit/Atom.h | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/kernel/NeKit/Atom.h b/src/kernel/NeKit/Atom.h index 7deff14e..7c5177fe 100644 --- a/src/kernel/NeKit/Atom.h +++ b/src/kernel/NeKit/Atom.h @@ -22,14 +22,21 @@ class Atom final { public: using Type = TypeAtomic; - + const TypeAtomic& operator[](const SizeT& bit) { return (fArrayOfAtoms & (1 << bit)); } - void operator|(const SizeT& bit) { fArrayOfAtoms |= (1 << bit); } - Atom& operator|=(const SizeT& bit) { this->operator|(bit); return *this; } - - friend bool operator==(Atom<TypeAtomic>& atomic, const TypeAtomic& idx) { return atomic[idx] == idx; } - friend bool operator!=(Atom<TypeAtomic>& atomic, const TypeAtomic& idx) { return atomic[idx] != idx; } + void operator|(const SizeT& bit) { fArrayOfAtoms |= (1 << bit); } + Atom& operator|=(const SizeT& bit) { + this->operator|(bit); + return *this; + } + + friend bool operator==(Atom<TypeAtomic>& atomic, const TypeAtomic& idx) { + return atomic[idx] == idx; + } + friend bool operator!=(Atom<TypeAtomic>& atomic, const TypeAtomic& idx) { + return atomic[idx] != idx; + } private: TypeAtomic fArrayOfAtoms; |
