BioDynaMo  v1.05.120-25dc9790
Public Types | Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | Friends | List of all members
bdm::AgentUid Class Reference

#include <agent_uid.h>

Public Types

using Index_t = uint32_t
 
using Reused_t = uint32_t
 

Public Member Functions

constexpr AgentUid () noexcept
 
 AgentUid (Index_t index)
 
 AgentUid (Index_t idx, Reused_t reused)
 
Reused_t GetReused () const
 
Index_t GetIndex () const
 
void operator++ ()
 
void operator-- ()
 
bool operator== (const AgentUid &other) const
 
bool operator!= (const AgentUid &other) const
 
bool operator< (const AgentUid &other) const
 
bool operator< (size_t other) const
 
AgentUid operator+ (int i) const
 
AgentUid operator+ (uint64_t i) const
 
AgentUid operator- (int i) const
 
AgentUid operator- (uint64_t i) const
 
AgentUidoperator+= (const AgentUid &uid)
 
 operator uint64_t () const
 

Static Public Attributes

static constexpr Reused_t kReusedMax = std::numeric_limits<Reused_t>::max()
 

Private Member Functions

 BDM_CLASS_DEF_NV (AgentUid, 1)
 

Private Attributes

Index_t index_
 
Reused_t reused_
 Determines how often index_ has been resused. More...
 

Friends

std::ostream & operator<< (std::ostream &stream, const AgentUid &handle)
 

Detailed Description

AgentUid is a unique id for agents that remains unchanged throughout the whole simulation.

Definition at line 25 of file agent_uid.h.

Member Typedef Documentation

◆ Index_t

using bdm::AgentUid::Index_t = uint32_t

Definition at line 27 of file agent_uid.h.

◆ Reused_t

using bdm::AgentUid::Reused_t = uint32_t

Definition at line 28 of file agent_uid.h.

Constructor & Destructor Documentation

◆ AgentUid() [1/3]

constexpr bdm::AgentUid::AgentUid ( )
inlineconstexprnoexcept

Definition at line 33 of file agent_uid.h.

◆ AgentUid() [2/3]

bdm::AgentUid::AgentUid ( Index_t  index)
inlineexplicit

Definition at line 37 of file agent_uid.h.

◆ AgentUid() [3/3]

bdm::AgentUid::AgentUid ( Index_t  idx,
Reused_t  reused 
)
inline

Definition at line 39 of file agent_uid.h.

Member Function Documentation

◆ BDM_CLASS_DEF_NV()

bdm::AgentUid::BDM_CLASS_DEF_NV ( AgentUid  ,
 
)
private

◆ GetIndex()

Index_t bdm::AgentUid::GetIndex ( ) const
inline

Definition at line 42 of file agent_uid.h.

◆ GetReused()

Reused_t bdm::AgentUid::GetReused ( ) const
inline

Definition at line 41 of file agent_uid.h.

◆ operator uint64_t()

bdm::AgentUid::operator uint64_t ( ) const
inline

Definition at line 93 of file agent_uid.h.

◆ operator!=()

bool bdm::AgentUid::operator!= ( const AgentUid other) const
inline

Definition at line 52 of file agent_uid.h.

◆ operator+() [1/2]

AgentUid bdm::AgentUid::operator+ ( int  i) const
inline

Definition at line 64 of file agent_uid.h.

◆ operator+() [2/2]

AgentUid bdm::AgentUid::operator+ ( uint64_t  i) const
inline

Definition at line 70 of file agent_uid.h.

◆ operator++()

void bdm::AgentUid::operator++ ( )
inline

Definition at line 45 of file agent_uid.h.

◆ operator+=()

AgentUid& bdm::AgentUid::operator+= ( const AgentUid uid)
inline

Definition at line 88 of file agent_uid.h.

◆ operator-() [1/2]

AgentUid bdm::AgentUid::operator- ( int  i) const
inline

Definition at line 76 of file agent_uid.h.

◆ operator-() [2/2]

AgentUid bdm::AgentUid::operator- ( uint64_t  i) const
inline

Definition at line 82 of file agent_uid.h.

◆ operator--()

void bdm::AgentUid::operator-- ( )
inline

Definition at line 46 of file agent_uid.h.

◆ operator<() [1/2]

bool bdm::AgentUid::operator< ( const AgentUid other) const
inline

Definition at line 54 of file agent_uid.h.

◆ operator<() [2/2]

bool bdm::AgentUid::operator< ( size_t  other) const
inline

Definition at line 62 of file agent_uid.h.

◆ operator==()

bool bdm::AgentUid::operator== ( const AgentUid other) const
inline

Definition at line 48 of file agent_uid.h.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  stream,
const AgentUid handle 
)
friend

Definition at line 98 of file agent_uid.h.

Member Data Documentation

◆ index_

Index_t bdm::AgentUid::index_
private

Consistent with AgentHandle::Index_t -> max element_idx: 4.294.967.296

Definition at line 107 of file agent_uid.h.

◆ kReusedMax

const AgentUid::Reused_t bdm::AgentUid::kReusedMax = std::numeric_limits<Reused_t>::max()
staticconstexpr

Definition at line 31 of file agent_uid.h.

◆ reused_

Reused_t bdm::AgentUid::reused_
private

Determines how often index_ has been resused.

Definition at line 110 of file agent_uid.h.


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