memoryfile.h
来自「这个刚才那个的源代码」· C头文件 代码 · 共 37 行
H
37 行
#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 + =
减小字号Ctrl + -
显示快捷键?