ChimeraTK-DeviceAccess 03.20.00
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ChimeraTK::TransferElementID Class Reference

Simple class holding a unique ID for a TransferElement. More...

#include <TransferElementID.h>

Public Member Functions

 TransferElementID ()=default
 Default constructor constructs an invalid ID, which may be assigned with another ID.
 
 TransferElementID (const TransferElementID &other)=default
 Copy ID from another.
 
bool operator== (const TransferElementID &other) const
 Compare ID with another.
 
bool operator!= (const TransferElementID &other) const
 
bool isValid () const
 Check whether the ID is valid.
 
TransferElementIDoperator= (const TransferElementID &other)=default
 Assign ID from another.
 

Protected Member Functions

void makeUnique ()
 Assign an ID to this instance.
 

Protected Attributes

size_t _id {0}
 The actual ID value.
 

Friends

struct std::hash< TransferElementID >
 
struct std::less< TransferElementID >
 
class TransferElement
 
std::ostream & operator<< (std::ostream &os, const TransferElementID &me)
 Streaming operator to stream the TransferElementID e.g.
 

Detailed Description

Simple class holding a unique ID for a TransferElement.

The ID is guaranteed to be unique for all accessors throughout the lifetime of the process.

Definition at line 17 of file TransferElementID.h.

Constructor & Destructor Documentation

◆ TransferElementID() [1/2]

ChimeraTK::TransferElementID::TransferElementID ( )
default

Default constructor constructs an invalid ID, which may be assigned with another ID.

◆ TransferElementID() [2/2]

ChimeraTK::TransferElementID::TransferElementID ( const TransferElementID other)
default

Copy ID from another.

Member Function Documentation

◆ isValid()

bool ChimeraTK::TransferElementID::isValid ( ) const
inline

Check whether the ID is valid.

Definition at line 36 of file TransferElementID.h.

◆ makeUnique()

void ChimeraTK::TransferElementID::makeUnique ( )
protected

Assign an ID to this instance.

May only be called if currently no ID has been assigned.

Definition at line 14 of file TransferElementID.cc.

◆ operator!=()

bool ChimeraTK::TransferElementID::operator!= ( const TransferElementID other) const
inline

Definition at line 33 of file TransferElementID.h.

◆ operator=()

TransferElementID & ChimeraTK::TransferElementID::operator= ( const TransferElementID other)
default

Assign ID from another.

◆ operator==()

bool ChimeraTK::TransferElementID::operator== ( const TransferElementID other) const
inline

Compare ID with another.

Will always return false, if the ID is invalid (i.e. setId() was never called).

Definition at line 32 of file TransferElementID.h.

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const TransferElementID me 
)
friend

Streaming operator to stream the TransferElementID e.g.

to std::cout

Definition at line 24 of file TransferElementID.cc.

◆ std::hash< TransferElementID >

friend struct std::hash< TransferElementID >
friend

Definition at line 48 of file TransferElementID.h.

◆ std::less< TransferElementID >

friend struct std::less< TransferElementID >
friend

Definition at line 48 of file TransferElementID.h.

◆ TransferElement

friend class TransferElement
friend

Definition at line 57 of file TransferElementID.h.

Member Data Documentation

◆ _id

size_t ChimeraTK::TransferElementID::_id {0}
protected

The actual ID value.

Definition at line 48 of file TransferElementID.h.


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