/* ------------------------------------------- Copyright Zeta Electronics Corporation ------------------------------------------- */ #pragma once #include #include #include namespace NewOS { template class Array final { public: explicit Array() = default; ~Array() = default; Array& operator=(const Array&) = default; Array(const Array&) = default; ErrorOr operator[](Size At) { if (At > N) return {}; return ErrorOr(&fArray[At]); } Boolean Empty() const { for (auto Val : fArray) { if (Val) return false; } return true; } SizeT Count() const { return N; } const T* CData() { return fArray; } operator bool() { return !Empty(); } private: T fArray[N]; }; } // namespace NewOS