Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4TypeKey Class Reference

#include <G4TypeKey.hh>

+ Inheritance diagram for G4TypeKey:

Public Types

using Key = unsigned long
 

Public Member Functions

 G4TypeKey ()=default
 
virtual ~G4TypeKey ()=default
 
G4bool IsValid ()
 
Key operator() () const
 
G4bool operator== (const G4TypeKey &rhs) const
 
G4bool operator!= (const G4TypeKey &rhs) const
 
G4bool operator< (const G4TypeKey &rhs) const
 
G4bool operator> (const G4TypeKey &rhs) const
 

Protected Member Functions

Key NextKey () const
 

Protected Attributes

Key fMyKey {0}
 

Friends

std::ostream & operator<< (std::ostream &out, const G4TypeKey &key)
 

Detailed Description

Definition at line 37 of file G4TypeKey.hh.

Member Typedef Documentation

◆ Key

using G4TypeKey::Key = unsigned long

Definition at line 41 of file G4TypeKey.hh.

Constructor & Destructor Documentation

◆ G4TypeKey()

G4TypeKey::G4TypeKey ( )
default

◆ ~G4TypeKey()

virtual G4TypeKey::~G4TypeKey ( )
virtualdefault

Member Function Documentation

◆ IsValid()

G4bool G4TypeKey::IsValid ( )
inline

Definition at line 49 of file G4TypeKey.hh.

49 {
50 return (0 != fMyKey);
51 }

Referenced by G4AttFilterUtils::GetNewFilter().

◆ NextKey()

Key G4TypeKey::NextKey ( ) const
inlineprotected

Definition at line 66 of file G4TypeKey.hh.

66 {
67 static G4ThreadLocal Key *npKey = nullptr ;
68 if (npKey == nullptr) { npKey = new Key; *npKey = 0; }
69 Key &nKey = *npKey;
70 return ++nKey;
71 }
unsigned long Key
Definition G4TypeKey.hh:41
#define G4ThreadLocal
Definition tls.hh:77

Referenced by G4TypeKeyT< T >::G4TypeKeyT().

◆ operator!=()

G4bool G4TypeKey::operator!= ( const G4TypeKey & rhs) const
inline

Definition at line 56 of file G4TypeKey.hh.

56{return !operator==(rhs);}
G4bool operator==(const G4TypeKey &rhs) const
Definition G4TypeKey.hh:55

◆ operator()()

Key G4TypeKey::operator() ( ) const
inline

Definition at line 54 of file G4TypeKey.hh.

54{return fMyKey;}

◆ operator<()

G4bool G4TypeKey::operator< ( const G4TypeKey & rhs) const
inline

Definition at line 57 of file G4TypeKey.hh.

57{return fMyKey < rhs.fMyKey;}

◆ operator==()

G4bool G4TypeKey::operator== ( const G4TypeKey & rhs) const
inline

Definition at line 55 of file G4TypeKey.hh.

55{return fMyKey == rhs.fMyKey;}

Referenced by operator!=().

◆ operator>()

G4bool G4TypeKey::operator> ( const G4TypeKey & rhs) const
inline

Definition at line 58 of file G4TypeKey.hh.

58{return fMyKey > rhs.fMyKey;}

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & out,
const G4TypeKey & key )
friend

Definition at line 60 of file G4TypeKey.hh.

60 {
61 return out<< key.fMyKey;
62 }

Member Data Documentation

◆ fMyKey

Key G4TypeKey::fMyKey {0}
protected

Definition at line 73 of file G4TypeKey.hh.

73{0};

Referenced by G4TypeKeyT< T >::G4TypeKeyT(), IsValid(), operator()(), operator<(), operator==(), and operator>().


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