summaryrefslogtreecommitdiff
path: root/source/modules/asura-utils/IO/FileData.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/modules/asura-utils/IO/FileData.cpp')
-rw-r--r--source/modules/asura-utils/IO/FileData.cpp59
1 files changed, 0 insertions, 59 deletions
diff --git a/source/modules/asura-utils/IO/FileData.cpp b/source/modules/asura-utils/IO/FileData.cpp
deleted file mode 100644
index ca1cce7..0000000
--- a/source/modules/asura-utils/IO/FileData.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-#include "FileData.h"
-
-namespace AsuraEngine
-{
- namespace IO
- {
-
- FileData::FileData(const std::string& filename)
- : m_Data(nullptr)
- , m_FileName(filename)
- {
- size_t dot = filename.rfind('.');
- if (dot != std::string::npos)
- {
- m_Extension = filename.substr(dot + 1);
- m_Name = filename.substr(0, dot);
- }
- else
- m_Name = filename;
- }
-
- FileData::~FileData()
- {
- if (m_Data)
- m_Data->Release();
- }
-
- const std::string& FileData::GetFileName()
- {
- return m_FileName;
- }
-
- const std::string& FileData::GetExtension()
- {
- return m_Extension;
- }
-
- const std::string& FileData::GetName()
- {
- return m_Name;
- }
-
- void FileData::BindData(ASURA_MOVE DataBuffer* buffer)
- {
- if (!buffer)
- return;
- if (m_Data)
- m_Data->Release();
- m_Data = buffer;
- m_Data->Retain();
- }
-
- DataBuffer* FileData::GetDataBuffer()
- {
- return m_Data;
- }
-
- }
-} \ No newline at end of file