My Project
FileData.h
1 #pragma once
2 
3 namespace ParaEngine
4 {
5  /* a file data in memory*/
6  class FileData
7  {
8  public:
9  static const FileData Null;
10  FileData();
11  FileData(const FileData& other);
12  FileData(FileData&& other);
13  ~FileData();
14 
15  FileData& operator= (const FileData& other);
16  FileData& operator= (FileData&& other);
17 
18  char* GetBytes() const;
19  size_t GetSize() const;
20 
26  void copy(char* bytes, const size_t size);
27 
34  void SetOwnBuffer(char* bytes, const size_t size);
35  void ReleaseOwnership();
36 
38  void Clear();
39 
41  bool isNull() const;
42 
43  private:
44  void move(FileData& other);
45 
46  private:
47  char* m_bytes;
48  size_t m_size;
49  };
50 }
void Clear()
Clears data, free buffer and reset data size.
Definition: FileData.cpp:89
void copy(char *bytes, const size_t size)
Copies the buffer pointer and its size.
Definition: FileData.cpp:71
different physics engine has different winding order.
Definition: EventBinding.h:32
void SetOwnBuffer(char *bytes, const size_t size)
take ownership of the buffer.
Definition: FileData.cpp:83
Definition: other.hpp:41
bool isNull() const
Check whether the data is null.
Definition: FileData.cpp:56
Definition: FileData.h:6