Superdrop IDs¶
Header file: <libs/superdrops/superdrop_ids.hpp>
[source]
-
struct IntID¶
Struct containing value of SD identity (8 bytes integer).
Public Functions
-
inline size_t get_value() const¶
Public Members
-
size_t value¶
Value of the SD identity.
-
class Gen¶
Class for generating unique SD identity.
Public Functions
-
inline Gen()¶
Default constructor for ID generation starting at value = 0.
-
inline explicit Gen(const size_t id)¶
Constructor for ID generation with next id at value = id + 1.
Private Members
-
size_t _id = 0¶
Internal counter for generating SD identities.
-
inline Gen()¶
-
inline size_t get_value() const¶
-
struct EmptyID¶
Struct for non-existent (no memory) SD identity.
Public Functions
-
inline size_t get_value() const¶
-
class Gen¶
Class for generating empty SD identity.
-
inline size_t get_value() const¶
-
inline std::ostream &operator<<(std::ostream &os, const EmptyID &id)¶
Output stream operator for printing null statement when super-droplet identity is instance of EmptyID (non-existent) type.
Null statement reads “(Undefined) No ID”.
- Parameters:
os – Output stream.
id – SD identity to print.
- Returns:
Reference to the output stream.
-
inline std::ostream &operator<<(std::ostream &os, const IntID &id)¶
Output stream operator for printing super-droplet identity when it is IntID type.
Statement is of value of super-droplet identity, IntID::value.
- Parameters:
os – Output stream.
id – SD identity to print.
- Returns:
Reference to the output stream.