CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::ResourceID Struct Reference

Type that uniquely represents a resource in the resource system. More...

#include <CeresEngine/Resource/Resource.hpp>

Inheritance diagram for CeresEngine::ResourceID:
CeresEngine::UUID

Public Member Functions

 ResourceID (const UUID &uuid)
 Converts a raw UUID into a ResouceID.
 
constexpr UUID ()=default
 Initializes an empty UUID.
 
constexpr UUID (const UInt32 data1, const UInt32 data2, const UInt32 data3, const UInt32 data4)
 Initializes an UUID using framework's UUID representation.
 
 UUID (StringView uuid)
 Initializes an UUID using its string representation.
 
 UUID (const char *uuid)
 Initializes an UUID using its string representation.
 
- Public Member Functions inherited from CeresEngine::UUID
constexpr UUID ()=default
 Initializes an empty UUID.
 
constexpr UUID (const UInt32 data1, const UInt32 data2, const UInt32 data3, const UInt32 data4)
 Initializes an UUID using framework's UUID representation.
 
 UUID (StringView uuid)
 Initializes an UUID using its string representation.
 
 UUID (const char *uuid)
 Initializes an UUID using its string representation.
 
constexpr bool empty () const
 Checks has the UUID been initialized to a valid value.
 
String toString () const
 Converts the UUID into its string representation.
 
void toString (String &str) const
 Converts the UUID into its string representation.
 
void copyTo (Byte *buffer) const
 Copies the UUID into a buffer.
 
void copyFrom (const Byte *buffer)
 Copies the UUID from a buffer.
 

Static Public Attributes

static const ResourceID null = ResourceID()
 A null (or empty) resource ID.
 

Additional Inherited Members

- Static Public Member Functions inherited from CeresEngine::UUID
static UUID random ()
 Generate a new random universally unique identifier.
 
static UUID withNamespace (const UUID &ns, StringView name)
 Generate a new random universally unique identifier.
 
static UUID fromName (StringView name)
 Generate a new UUID based on a name.
 
template<typename Generator >
static UUID random (Generator generator)
 Generate a new random universally unique identifier.
 
- Public Attributes inherited from CeresEngine::UUID
UInt32 raw [4] = {0, 0, 0, 0}
 The UUID raw representation.
 

Detailed Description

Type that uniquely represents a resource in the resource system.

Each newly created resource gets a UUID assigned to it.

Updates to the resource will not change the UUID, but a copy will generate a new UUID for a resource.

Constructor & Destructor Documentation

◆ ResourceID()

CeresEngine::ResourceID::ResourceID ( const UUID uuid)
inlineexplicit

Converts a raw UUID into a ResouceID.

Member Function Documentation

◆ UUID() [1/4]

constexpr CeresEngine::UUID::UUID ( )
constexprdefault

Initializes an empty UUID.

◆ UUID() [2/4]

CeresEngine::UUID::UUID ( const char uuid)
inlineexplicit

Initializes an UUID using its string representation.

◆ UUID() [3/4]

constexpr CeresEngine::UUID::UUID ( const UInt32  data1,
const UInt32  data2,
const UInt32  data3,
const UInt32  data4 
)
inlineconstexpr

Initializes an UUID using framework's UUID representation.

◆ UUID() [4/4]

CeresEngine::UUID::UUID ( StringView  uuid)
explicit

Initializes an UUID using its string representation.

Member Data Documentation

◆ null

const ResourceID CeresEngine::ResourceID::null = ResourceID()
inlinestatic

A null (or empty) resource ID.


The documentation for this struct was generated from the following file: