#ifndef RAGNAROK_SOURCE_FILE_COMMONOBJECT_H #define RAGNAROK_SOURCE_FILE_COMMONOBJECT_H #include #include #include #include class CFile; class ResourceBytes; class CCommonObject { public: // INLINED CCommonObject() { this->Clear(); } virtual ~CCommonObject(); void Clear(); bool LoadTokens(std::vector& tokens, const char* name, int mode, ResourceBytes& file); bool LoadCsv(const char* name, std::vector (*transform)(const std::vector&), void (*insert)(std::vector&)); bool LoadCsv(const char* name, std::function(std::vector&)> transform, std::function&, std::any)> insert, std::any context); private: bool OpenCsv(const char* name, CFile& file); std::vector ReadCsvRow(CFile& file, char separator); /* 0004 */ std::vector m_buffers; CCommonObject(const CCommonObject&) = delete; CCommonObject& operator=(const CCommonObject&) = delete; }; #if defined(_WIN32) && !defined(_WIN64) static_assert(sizeof(CCommonObject) == 16); #endif #endif