sc::Identifier(3)

πŸ“¦
version 2.3.1 Β· 5 versions
, in ubuntu jammy

πŸ’– NAME πŸ’–

Welcome to sc::Identifier(3) from the MPQC manual, bestie πŸ’… This page is all about the sc::Identifier crew.

  • sc::Identifier β€” Identifier's are used to distinguish and order objects.

πŸ’… SYNOPSIS πŸ’…

First things first, you gotta pull in the header:

#include <identity.h>

🫢 Public Member Functions 🫢

Okay so here's the whole member-function lineup, no skips, no shortcuts:

  • Identifier () β€” Creates an Identifier for a null object. Starting from nothing, iconic.
  • Identifier (const Identity *i) β€” Creates an Identifier for the given object.
  • Identifier (const Identifier &i) β€” Creates an Identifier for the given object. Copy vibes.
  • ~Identifier () β€” The destructor does nothing. Literally just vibes; it does nothing.
  • void operator= (const Identifier &i) β€” Assigns to the given Identifier.
  • int operator< (const Identifier &i) const β€” Less than.
  • int operator> (const Identifier &i) const β€” Greater than.
  • int operator== (const Identifier &i) const β€” Equal.
  • int operator<= (const Identifier &i) const β€” Less than or equal.
  • int operator>= (const Identifier &i) const β€” Greater than or equal.
  • int operator!= (const Identifier &i) const β€” Not equal.
  • void print (std::ostream &) const β€” This one's listed with no extra description attached, periodt.

πŸ¦‹ Detailed Description πŸ¦‹

The whole point: Identifier's are used to distinguish and order objects. That's the main-character job.

On many architectures, a pointer to the object will suffice 🫢 But here's the fine print, and it's important: the C++ standard only guarantees that this works for two pointers pointing within the same structure or array.

Classes need to inherit from Identity to use this mechanism. And heads up: Identity, Identifier, and the shorthand boolean operations may have to be modified for certain architectures.

⚠️ So yeah, bestie β€” the architecture caveat is real. This is not a β€œworks everywhere with zero changes” situation.

πŸŽ€ Author πŸŽ€

Generated automatically by Doxygen for MPQC from the source code. Not me β€” I just gave it the group-chat glow-up ✨


That's the whole page, bestie β€” MPQC Version 2.3.1, dated Sun Oct 4 2020 πŸ’–βœ¨

πŸ“¦ where this page comes from