#ifndef LIST_H #define LIST_H #include "common/utils/Types.h" template class List final { public: List() : entries(0) { } List& add(const T& t) { if(entries >= L) { return *this; } data[entries++] = t; return *this; } List& clear() { entries = 0; return *this; } uint getLength() const { return entries; } T& operator[](uint index) { return data[index]; } const T& operator[](uint index) const { return data[index]; } private: uint entries; T data[L]; }; #endif