Nebula
Loading...
Searching...
No Matches
resourceid.h File Reference
#include "util/stringatom.h"
#include "ids/id.h"
#include "core/debug.h"
#include "ids/idgenerationpool.h"

Go to the source code of this file.

Classes

struct  Resources::ResourceUnknownId
 

Namespaces

namespace  Resources
 A resource is a container for some type of file which is loaded.
 

Macros

#define RESOURCE_ID_TYPE(type)
 

Typedefs

typedef Util::StringAtom Resources::ResourceName
 

Functions

 Resources::ID_24_8_24_8_NAMED_TYPE (ResourceId, loaderInstanceId, loaderIndex, resourceId, generation, loader, resource)
 

Variables

 Resources::id
 

Macro Definition Documentation

◆ RESOURCE_ID_TYPE

#define RESOURCE_ID_TYPE ( type)
Value:
struct type : public Resources::ResourceUnknownId { \
constexpr type() {};\
constexpr type(const Resources::ResourceUnknownId& res) : Resources::ResourceUnknownId(res) {};\
constexpr type(const Resources::ResourceId& res) : Resources::ResourceUnknownId(res.resourceId, res.generation) {};\
constexpr type(const Ids::Id24 id, const Ids::Id8 generation) : Resources::ResourceUnknownId(id, generation) {};\
constexpr type(const Ids::Id32 id) : Resources::ResourceUnknownId(Ids::Index(id), Ids::Generation(id)) {};\
}; \
static constexpr type Invalid##type = Resources::InvalidResourceUnknownId;
This simple Id pool implements a set of free and used consecutive integers.
Definition id.h:135
uint32_t Id24
Definition id.h:139
uint8_t Id8
Definition id.h:141
uint32_t Id32
Definition id.h:138
A resource is a container for some type of file which is loaded.
Definition resource.cc:9
id
Definition resourceid.h:37
Definition resourceid.h:37