summaryrefslogtreecommitdiffhomepage
path: root/src/kernel/NeKit/Atom.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/NeKit/Atom.h')
-rw-r--r--src/kernel/NeKit/Atom.h19
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;