// TODO: Replace `cout, printf` with sprintf&fputs and custom buffers #ifndef _TABLE_H #define _TABLE_H #include "types.h" #include "vector_type.hpp" #include #include #include #include "io.h" #undef ERROR template class vector_type; template <> class vector_type; #ifdef _MSC_VER namespace types { enum Type_t; template struct Types; template struct Coercion; } #endif template class ColView; template class ColRef : public vector_type<_Ty> { public: typedef ColRef<_Ty> Decayed_t; const char* name; types::Type_t ty = types::Type_t::ERROR; ColRef(const ColRef<_Ty>& vt) : vector_type<_Ty>(vt) {} ColRef(ColRef<_Ty>&& vt) : vector_type<_Ty>(std::move(vt)) {} ColRef() : vector_type<_Ty>(0), name("") {} ColRef(const uint32_t& size, const char* name = "") : vector_type<_Ty>(size), name(name) {} ColRef(const char* name) : name(name) {} ColRef(const uint32_t size, void* data, const char* name = "") : vector_type<_Ty>(size, data), name(name) {} void init(const char* name = "") { ty = types::Types<_Ty>::getType(); this->size = this->capacity = 0; this->container = 0; this->name = name; } void initfrom(uint32_t sz, void*container, const char* name = "") { ty = types::Types<_Ty>::getType(); this->size = sz; this->capacity = 0; this->container = (_Ty*)container; this->name = name; } template