📄 memoryfile.h
字号:
#ifndef MEMORY_FILE_H
#define MEMORY_FILE_H
#include "corona.h"
#include "Types.h"
#include "Utility.h"
namespace corona {
class MemoryFile : public DLLImplementation<File> {
public:
MemoryFile(const void* buffer, int size);
~MemoryFile();
int COR_CALL read(void* buffer, int size);
int COR_CALL write(const void* buffer, int size);
bool COR_CALL seek(int position, SeekMode mode);
int COR_CALL tell();
private:
void ensureSize(int min_size);
byte* m_buffer;
int m_position;
int m_size;
/// The actual size of m_buffer. Always a power of two.
int m_capacity;
};
}
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -