HOB file handler prototype Mesh building should be moved to RSPModel lib Tree rendering unicode chars fix Updated version detection HOB file handler Debug HOB handler Pointer probably deallocated, need to check it Fix HOB loader and disposer Using HOB instance instead of static methods Review DLL support for MSVC build Vertices values calculation fix Added export obj method to debug tool Missed levels name separation Cleaned model processing Multithreading branch reported to later
62 lines
1.3 KiB
C++
62 lines
1.3 KiB
C++
/**
|
|
* @file GenericFile.h
|
|
* @date 01/02/2023
|
|
* @author JackCarterSmith
|
|
* @copyright GPL-v3.0
|
|
* @brief Generic file object class.
|
|
*
|
|
*/
|
|
|
|
#include "../RDI_Datatypes.h"
|
|
#include <string>
|
|
|
|
|
|
#ifndef GENERICFILE_H_
|
|
#define GENERICFILE_H_
|
|
|
|
namespace RDI {
|
|
|
|
namespace DatFile {
|
|
class DatFileEntryFile;
|
|
}
|
|
|
|
class GenericFile {
|
|
public:
|
|
// Default constructor
|
|
// Set the default class members and link against correct MEMFILE
|
|
GenericFile( DatFile::DatFileEntryFile* hDat );
|
|
virtual ~GenericFile();
|
|
|
|
GenericFile(const GenericFile&) = default;
|
|
GenericFile& operator=(const GenericFile&) = default;
|
|
|
|
GenericFile(GenericFile&&) = default;
|
|
GenericFile& operator=(GenericFile&&) = default;
|
|
|
|
// Primary datas parsing/loading function
|
|
// This function must be called to load datas in memory and access to others function
|
|
void Load();
|
|
bool isLoaded() const { return loaded; }
|
|
|
|
// Free memory of object datas
|
|
// Should be called after using it
|
|
void Dispose();
|
|
|
|
std::string getFileName() const { return fileName; }
|
|
std::string getFullPath() const { return fullFilePath; }
|
|
std::string getFileExtension() const { return fileExtension; }
|
|
MEMFILE get() { return pMemLoc; }
|
|
|
|
protected:
|
|
unsigned long size;
|
|
std::string fileName, fullFilePath, fileExtension;
|
|
MEMFILE pMemLoc = nullptr;
|
|
|
|
private:
|
|
bool loaded = false;
|
|
};
|
|
|
|
}
|
|
|
|
#endif /* GENERICFILE_H_ */
|