Clean up useless C structure

This commit is contained in:
JackCarterSmith 2023-02-04 12:34:54 +01:00
parent c8e1ff66a2
commit 76c4c32a2f
Signed by: JackCarterSmith
GPG Key ID: 832E52F4E23F8F24
7 changed files with 30 additions and 43 deletions

View File

@ -7,7 +7,6 @@
*
*/
#include "../RDI_Datatypes.h"
#include <string>
@ -16,6 +15,8 @@
namespace RDI {
typedef char* MEMFILE;
namespace DatFile {
class DatFileEntryFile;
}

View File

@ -1,6 +1,6 @@
/**
* @file RDI.hpp
* @date 22/01/2023
* @date 04/02/2023
* @author JackCarterSmith
* @copyright GPL-v3.0
* @brief Rogue Data Interface library main entry file.
@ -9,7 +9,6 @@
#include <string>
#include <vector>
#include "RDI_Datatypes.h"
#include "FileHandler/HOB.h"
@ -45,6 +44,21 @@
namespace RDI {
/**
* @brief Errors flags who can be returned by this lib's interfaces.
* //TODO: Should be removed and use c++ exceptions instead
*/
typedef enum e_rdi_result {
RDI_OK,
RDI_ERROR_GENERIC,
RDI_ERROR_PROCESS,
RDI_ERROR_MEMORY,
RDI_ERROR_FILESYSTEM,
RDI_ERROR_UNEXPECTED
} RDI_RESULT;
/**
* @brief Get the current library version.
* @return String of the version.

View File

@ -1,30 +0,0 @@
/**
* @file RDI_Datatypes.h
* @date 20/09/2022
* @author JackCarterSmith
* @copyright GPL-v3.0
* @brief Rogue Data Interface library variables type definitions.
*
*/
#ifndef RDI_DATATYPES_H_
#define RDI_DATATYPES_H_
namespace RDI {
typedef char* MEMFILE;
typedef enum e_rdi_result {
RDI_OK,
RDI_ERROR_GENERIC,
RDI_ERROR_PROCESS,
RDI_ERROR_MEMORY,
RDI_ERROR_FILESYSTEM,
RDI_ERROR_UNEXPECTED
} RDI_RESULT;
}
#endif /* RDI_DATATYPES_H_ */

View File

@ -7,9 +7,9 @@
*
*/
#include <RDI_Datatypes.h>
#include <vector>
#include <string>
#include <FileHandler/Generic.h>
#include "DatFileEntry.hpp"
using std::string;

View File

@ -1,6 +1,6 @@
/**
* @file DatFileEntry.hpp
* @date 12/01/2023
* @date 04/02/2023
* @author JackCarterSmith
* @copyright GPL-v3.0
* @brief Data file entry descriptor objects helper class.
@ -12,13 +12,13 @@
*
*/
#include <RDI_Datatypes.h>
#include <FileHandler/Generic.h>
#include <vector>
#include <string>
#ifndef ERSOENTRY_HPP_
#define ERSOENTRY_HPP_
#ifndef DATFILEENTRY_HPP_
#define DATFILEENTRY_HPP_
namespace RDI {
@ -103,4 +103,4 @@ private:
}
}
#endif /* ERSOENTRY_HPP_ */
#endif /* DATFILEENTRY_HPP_ */

View File

@ -1,6 +1,6 @@
/**
* @file Erso.cpp
* @date 11/01/2023
* @date 04/02/2023
* @author JackCarterSmith
* @copyright GPL-v3.0
* @brief Rogue DATA/BUNDLE file parser and interface.
@ -12,7 +12,8 @@
#include <fstream>
#include <vector>
#include <boost/filesystem.hpp>
#include <RDI_Datatypes.h>
#include <FileHandler/Generic.h>
#include <RDI.hpp> //TODO: Should be removed with RDI_RESULT
#include "files_mms/data_struct.h"
#include "DatFileEntry.hpp"
#include "Erso.hpp"

View File

@ -1,6 +1,6 @@
/**
* @file Erso.hpp
* @date 11/01/2023
* @date 04/02/2023
* @author JackCarterSmith
* @copyright GPL-v3.0
* @brief Rogue DATA/BUNDLE file parser and interface.
@ -30,7 +30,8 @@
#include <boost/filesystem.hpp>
#include <vector>
#include "RDI_Datatypes.h"
#include <FileHandler/Generic.h>
#include <RDI.hpp> //TODO: Should be removed with RDI_RESULT
#include "DatFileEntry.hpp"