Geant4-11
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
G4TypeKeyT< T > Class Template Reference

#include <G4TypeKeyT.hh>

Inheritance diagram for G4TypeKeyT< T >:
G4TypeKey

Public Types

typedef unsigned long Key
 

Public Member Functions

 G4TypeKeyT ()
 
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 ~G4TypeKeyT ()
 

Protected Member Functions

Key NextKey () const
 

Protected Attributes

Key fMyKey
 

Detailed Description

template<typename T>
class G4TypeKeyT< T >

Definition at line 37 of file G4TypeKeyT.hh.

Member Typedef Documentation

◆ Key

typedef unsigned long G4TypeKey::Key
inherited

Definition at line 41 of file G4TypeKey.hh.

Constructor & Destructor Documentation

◆ G4TypeKeyT()

template<typename T >
G4TypeKeyT< T >::G4TypeKeyT ( )
inline

Definition at line 41 of file G4TypeKeyT.hh.

41 {
42 static G4ThreadLocal Key *pkey = 0 ;
43 if (!pkey) { pkey = new Key; *pkey = NextKey(); }
44 Key &key = *pkey;
45 fMyKey = key;
46 }
unsigned long Key
Definition: G4TypeKey.hh:41
Key fMyKey
Definition: G4TypeKey.hh:73
Key NextKey() const
Definition: G4TypeKey.hh:66
#define G4ThreadLocal
Definition: tls.hh:77

References G4TypeKey::fMyKey, G4ThreadLocal, and G4TypeKey::NextKey().

◆ ~G4TypeKeyT()

template<typename T >
virtual G4TypeKeyT< T >::~G4TypeKeyT ( )
inlinevirtual

Definition at line 48 of file G4TypeKeyT.hh.

48{}

Member Function Documentation

◆ IsValid()

G4bool G4TypeKey::IsValid ( void  )
inlineinherited

Definition at line 49 of file G4TypeKey.hh.

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

References G4TypeKey::fMyKey.

Referenced by G4AttFilterUtils::GetNewFilter().

◆ NextKey()

Key G4TypeKey::NextKey ( ) const
inlineprotectedinherited

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 }

References G4ThreadLocal.

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

◆ operator!=()

G4bool G4TypeKey::operator!= ( const G4TypeKey rhs) const
inlineinherited

Definition at line 56 of file G4TypeKey.hh.

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

References G4TypeKey::operator==().

◆ operator()()

Key G4TypeKey::operator() ( ) const
inlineinherited

Definition at line 54 of file G4TypeKey.hh.

54{return fMyKey;}

References G4TypeKey::fMyKey.

◆ operator<()

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

Definition at line 57 of file G4TypeKey.hh.

57{return fMyKey < rhs.fMyKey;}

References G4TypeKey::fMyKey.

◆ operator==()

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

Definition at line 55 of file G4TypeKey.hh.

55{return fMyKey == rhs.fMyKey;}

References G4TypeKey::fMyKey.

Referenced by G4TypeKey::operator!=().

◆ operator>()

G4bool G4TypeKey::operator> ( const G4TypeKey rhs) const
inlineinherited

Definition at line 58 of file G4TypeKey.hh.

58{return fMyKey > rhs.fMyKey;}

References G4TypeKey::fMyKey.

Field Documentation

◆ fMyKey

Key G4TypeKey::fMyKey
protectedinherited

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