|
Brunot
|
a Key class to be used as a key when holding GameObjects (or unique pointers to game objects) in <key, value> datasets More...
#include <GameObject.h>
Public Member Functions | |
| Key (gobj::UUID uuid, gobj::Type type, unsigned short subtype) | |
| auto | getUUID () const -> gobj::UUID |
| auto | getType () const -> gobj::Type |
| auto | getSubtype () const -> unsigned short |
Private Attributes | |
| gobj::UUID | uuid |
| the UUID of the GameObject the Key was generated from | |
| gobj::Type | type |
| the type of the GameObject the Key was generated from | |
| unsigned short | subtype |
Friends | |
| auto | operator< (const Key &lhs, const Key &rhs) ->bool |
| comparison for GameObject Keys, to allow them to be used as keys in <key, value> containers. | |
a Key class to be used as a key when holding GameObjects (or unique pointers to game objects) in <key, value> datasets
| GameObject::Key::Key | ( | gobj::UUID | uuid, |
| gobj::Type | type, | ||
| unsigned short | subtype ) |
| auto GameObject::Key::getSubtype | ( | ) | const->unsignedshort |
| auto GameObject::Key::getType | ( | ) | const->gobj::Type |
| auto GameObject::Key::getUUID | ( | ) | const->gobj::UUID |
comparison for GameObject Keys, to allow them to be used as keys in <key, value> containers.
Less than means that the type, and subtype (if applicable) comes before the others type and subtype in the type and subtype enums. In the cases where type and subtype are equal, then UUID is used for comparison, and the object with the lower UUID (created first) is treated as lower.
| lhs | |
| rhs |
@todo: turn this into a non branching comparison @todo: check this logic on same subtype but different types of objects (may not be necessary as we only store one type in a container /e usually )
|
private |
|
private |
the type of the GameObject the Key was generated from
|
private |
the UUID of the GameObject the Key was generated from