Nameless Engine
Loading...
Searching...
No Matches
ne::Guid Class Reference

#include <GuidProperty.h>

Inheritance diagram for ne::Guid:

Public Member Functions

 Guid (const char *pGuid)
 
std::string getGuid () const
 

Private Attributes

std::string sGuid
 

Static Private Attributes

static constexpr size_t iGuidLength = 36
 

Detailed Description

GUID property for classes and structs that inherit Serializable class. This property is required for all derived classes/structs of Serializable class. GUID defined a unique identifier for your class/struct and is used in serialization/deserialization.

Usage example:

class RCLASS(ne::Guid("00000000-0000-0000-0000-000000000000")) MyCoolClass : public ne::Serializable
Definition: GuidProperty.h:30
Definition: Serializable.h:113

You can generate a random GUID by just googling "generate GUID" and using any site/tool to generate it.

Uniqueness of all GUIDs is checked by the engine on startup in DEBUG builds, so you don't need to check if all of your GUIDs are unique or not, this is done automatically and if something is not unique you will get a message box with an error on engine startup saying where and what is not unique.

Constructor & Destructor Documentation

◆ Guid()

ne::Guid::Guid ( const char *  pGuid)

Initializes the GUID of the entity.

Parameters
pGuidGUID of the entity.

Member Function Documentation

◆ getGuid()

std::string ne::Guid::getGuid ( ) const

Returns entity's GUID.

Returns
Entity's GUID.

Member Data Documentation

◆ iGuidLength

constexpr size_t ne::Guid::iGuidLength = 36
staticconstexprprivate

Length of the GUID.

◆ sGuid

std::string ne::Guid::sGuid
private

Entity's GUID.


The documentation for this class was generated from the following files: