Open 3D Engine EMotionFX Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
EMotionFX::ObjectId Class Reference

#include <ObjectId.h>

Public Member Functions

 ObjectId (const ObjectId &id)
 
 ObjectId (AZ::u64 id)
 
 operator AZ::u64 () const
 
AZStd::string ToString () const
 
bool IsValid () const
 
void SetInvalid ()
 
bool operator== (const ObjectId &rhs) const
 
bool operator!= (const ObjectId &rhs) const
 

Static Public Member Functions

static ObjectId Create ()
 
static ObjectId CreateFromString (const AZStd::string &text)
 
static void Reflect (AZ::ReflectContext *context)
 

Static Public Attributes

static const ObjectId InvalidId
 

Protected Attributes

AZ::u64 m_id
 

Detailed Description

Object ID type. IDs are used to uniquely identify objects.

Member Function Documentation

◆ Create()

static ObjectId EMotionFX::ObjectId::Create ( )
static

Generate a random and valid id.

Returns
A randomized, valid id.

◆ CreateFromString()

static ObjectId EMotionFX::ObjectId::CreateFromString ( const AZStd::string &  text)
static

Convert the given string to an id.

Parameters
[in]textThe string to parse and convert.
Returns
The resulting id. The id will be invalid in case the text could not be parsed correctly.

◆ IsValid()

bool EMotionFX::ObjectId::IsValid ( ) const

Determines whether this id is valid. An id is invalid if you did not provide an argument to the constructor.

Returns
Returns true if the id is valid. Otherwise, false.

◆ operator AZ::u64()

EMotionFX::ObjectId::operator AZ::u64 ( ) const
inline

Casts the id to u64. Needed for reflection.

Returns
The id as an 64-bit unsigned int.

◆ operator!=()

bool EMotionFX::ObjectId::operator!= ( const ObjectId rhs) const

Compare two ids for inequality.

Parameters
rhsId to compare against.
Returns
True if the ids are different. Otherwise, false.

◆ operator==()

bool EMotionFX::ObjectId::operator== ( const ObjectId rhs) const

Compare two ids for equality.

Parameters
rhsId to compare against.
Returns
True if the ids are equal. Otherwise, false.

◆ SetInvalid()

void EMotionFX::ObjectId::SetInvalid ( )

Set the id to the invalid value.

◆ ToString()

AZStd::string EMotionFX::ObjectId::ToString ( ) const

Convert the id to a string and return it.


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