Initial commit - restart from existing code

This commit is contained in:
Tom Ray
2026-02-13 19:15:05 +01:00
parent 11df621bb2
commit 7c352bc280
1906 changed files with 491226 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
#include "CAbstractResource.hpp"
namespace CosmicCore {
const char* typeToString(EResourceType type)
{
switch (type) {
case EResourceType::RESOURCE_MESH:
return "Mesh";
case EResourceType::RESOURCE_MATERIAL:
return "Material";
default:
return "UNKNOWN_RESOURCE";
}
}
}

View File

@@ -0,0 +1,25 @@
#ifndef CABSTRACT_RESOURCE_HPP
#define CABSTRACT_RESOURCE_HPP
#include "../Utils/CSerializable.hpp"
namespace CosmicCore {
/**
* @brief Enum representing every type of resources that can be created.
*/
enum class EResourceType : unsigned char {
RESOURCE_MESH,
RESOURCE_MATERIAL,
RESOURCE_COUNT
};
const char* typeToString(EResourceType type);
class CAbstractResource : public CSerializable{
public:
virtual ~CAbstractResource() = default;
virtual nlohmann::json to_json() = 0;
};
}
#endif

View File

@@ -0,0 +1,6 @@
#include "CAbstractMaterial.hpp"
namespace CosmicCore {
CAbstractMaterial::CAbstractMaterial(): CAbstractResource()
{
}
}

View File

@@ -0,0 +1,13 @@
#ifndef CABSTRACTMATERIAL_HPP
#define CABSTRACTMATERIAL_HPP
#include "../../CAbstractResource.hpp"
#include "nlohmann/json_fwd.hpp"
namespace CosmicCore {
class CAbstractMaterial: public CAbstractResource
{
public:
CAbstractMaterial();
nlohmann::json to_json(){return nlohmann::json();};
};
}
#endif

View File

@@ -0,0 +1,9 @@
#include "CAbstractMesh.hpp"
namespace CosmicCore {
CAbstractMesh::CAbstractMesh(): CAbstractResource()
{
}
}

View File

@@ -0,0 +1,13 @@
#ifndef CABSTRACTMESH_HPP
#define CABSTRACTMESH_HPP
#include "../../CAbstractResource.hpp"
#include "nlohmann/json_fwd.hpp"
namespace CosmicCore {
class CAbstractMesh: public CAbstractResource
{
public:
CAbstractMesh();
nlohmann::json to_json(){return nlohmann::json();};
};
}
#endif