#ifndef __INC_METIN_II_GAME_BUFFER_MANAGER_H__ #define __INC_METIN_II_GAME_BUFFER_MANAGER_H__ #include "../../common/stl.h" class TEMP_BUFFER { public: TEMP_BUFFER(int Size = 8192, bool ForceDelete = false ); ~TEMP_BUFFER(); const void * read_peek(); template>* = nullptr> void write(const T& c_pvData) { write(&c_pvData, sizeof(T)); } template>* = nullptr> void write(const C& v) { write(v.data(), v.size() * sizeof(typename C::value_type)); } void write(const void * data, int size); int size(); void reset(); LPBUFFER getptr() { return buf; } protected: LPBUFFER buf; bool forceDelete; }; #endif //martysama0134's 623a0779c74cb7565145d45548376308