Geant4-11
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends
G4TypeKey Class Reference

#include <G4TypeKey.hh>

Inheritance diagram for G4TypeKey:
G4TypeKeyT< T >

Public Types

typedef unsigned long Key
 

Public Member Functions

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

Protected Member Functions

Key NextKey () const
 

Protected Attributes

Key fMyKey
 

Friends

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

Detailed Description

Definition at line 37 of file G4TypeKey.hh.

Member Typedef Documentation

◆ Key

typedef unsigned long G4TypeKey::Key

Definition at line 41 of file G4TypeKey.hh.

Constructor & Destructor Documentation

◆ G4TypeKey()

G4TypeKey::G4TypeKey ( )
inline

Definition at line 44 of file G4TypeKey.hh.

44:fMyKey(0) {}
Key fMyKey
Definition: G4TypeKey.hh:73

◆ ~G4TypeKey()

virtual G4TypeKey::~G4TypeKey ( )
inlinevirtual

Definition at line 47 of file G4TypeKey.hh.

47{}

Member Function Documentation

◆ IsValid()

G4bool G4TypeKey::IsValid ( void  )
inline

Definition at line 49 of file G4TypeKey.hh.

49 {
50 return (0 == fMyKey ? false : true);
51 }

References fMyKey.

Referenced by G4AttFilterUtils::GetNewFilter().

◆ NextKey()

Key G4TypeKey::NextKey ( ) const
inlineprotected

Definition at line 66 of file G4TypeKey.hh.

66 {
67 static G4ThreadLocal Key *npKey = 0 ;
68 if (!npKey) { 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

References G4ThreadLocal.

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

References operator==().

◆ operator()()

Key G4TypeKey::operator() ( ) const
inline

Definition at line 54 of file G4TypeKey.hh.

54{return fMyKey;}

References fMyKey.

◆ operator<()

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

Definition at line 57 of file G4TypeKey.hh.

57{return fMyKey < rhs.fMyKey;}

References fMyKey.

◆ operator==()

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

Definition at line 55 of file G4TypeKey.hh.

55{return fMyKey == rhs.fMyKey;}

References 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;}

References fMyKey.

Friends And Related Function 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 }

Field Documentation

◆ fMyKey

Key G4TypeKey::fMyKey
protected

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