template struct TypedId (Niantic.ARDK.Utilities.TypedId.TypedId)
Overview
A generic identifier that takes into account the type of object that it is representing. For example, a TypedId<uint, ClassA> with a value of 0 would not equal a TypedId<uint, ClassB> with a value of 0. More…
template <TRepresented, TId> struct TypedId: IEquatable< TypedId< TRepresented, TId >>, IEquatable< TId > { // properties TId RawIdentifier; // methods override bool Equals(object other); bool Equals(TId other); bool Equals(TypedId<TRepresented, TId> other); override int GetHashCode(); TypedId(TId rawIdentifier); static bool operator != (TId lhs, TypedId<TRepresented, TId> rhs); static bool operator != (TypedId<TRepresented, TId> lhs, TId rhs); static bool operator != ( TypedId<TRepresented, TId> lhs, TypedId<TRepresented, TId> rhs ); static bool operator == (TId lhs, TypedId<TRepresented, TId> rhs); static bool operator == (TypedId<TRepresented, TId> lhs, TId rhs); static bool operator == ( TypedId<TRepresented, TId> lhs, TypedId<TRepresented, TId> rhs ); };
Detailed Documentation
A generic identifier that takes into account the type of object that it is representing. For example, a TypedId<uint, ClassA> with a value of 0 would not equal a TypedId<uint, ClassB> with a value of 0.
Parameters:
TRepresented |
Type of the object being represented |
TId |
Type of the identifier |
Properties
TId RawIdentifier
The raw (untyped) identifier held by this TypedId
Methods
override bool Equals(object other)
Check if an object is a TypedId<TRepresented, TId>, and if it is equivalent to this TypedId
bool Equals(TId other)
Check if this TypedId is equivalent to a raw identifier
Parameters:
other |
Returns:
bool Equals(TypedId<TRepresented, TId> other)
Check if another TypedId is equivalent to this TypedId
override int GetHashCode()
Get the hashcode of this TypedId
TypedId(TId rawIdentifier)
Generate a new TypedId with a raw identifier
Parameters:
rawIdentifier |
Value to give this TypedId |