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

#include <G4CrossSectionSourcePtr.hh>

Public Member Functions

 G4CrossSectionSourcePtr (G4VCrossSectionSource *x=nullptr)
 
 ~G4CrossSectionSourcePtr ()=default
 
 G4CrossSectionSourcePtr (const G4CrossSectionSourcePtr &right)
 
 G4CrossSectionSourcePtr (G4CrossSectionSourcePtr &&right)
 
const G4VCrossSectionSourceoperator() () const
 
G4VCrossSectionSourceoperator() ()
 
G4CrossSectionSourcePtroperator= (const G4CrossSectionSourcePtr &right)
 
G4CrossSectionSourcePtroperator= (G4CrossSectionSourcePtr &&right) noexcept
 
G4bool operator== (const G4CrossSectionSourcePtr &right) const
 
G4bool operator< (const G4CrossSectionSourcePtr &)
 

Detailed Description

Definition at line 42 of file G4CrossSectionSourcePtr.hh.

Constructor & Destructor Documentation

◆ G4CrossSectionSourcePtr() [1/3]

G4CrossSectionSourcePtr::G4CrossSectionSourcePtr ( G4VCrossSectionSource * x = nullptr)

◆ ~G4CrossSectionSourcePtr()

G4CrossSectionSourcePtr::~G4CrossSectionSourcePtr ( )
default

◆ G4CrossSectionSourcePtr() [2/3]

G4CrossSectionSourcePtr::G4CrossSectionSourcePtr ( const G4CrossSectionSourcePtr & right)

Definition at line 41 of file G4CrossSectionSourcePtr.cc.

43 : x_(right.x_)
44{
45}

◆ G4CrossSectionSourcePtr() [3/3]

G4CrossSectionSourcePtr::G4CrossSectionSourcePtr ( G4CrossSectionSourcePtr && right)

Definition at line 47 of file G4CrossSectionSourcePtr.cc.

49 : x_( right.x_ )
50{
51 right.x_ = nullptr;
52}

Member Function Documentation

◆ operator()() [1/2]

G4VCrossSectionSource * G4CrossSectionSourcePtr::operator() ( )

Definition at line 91 of file G4CrossSectionSourcePtr.cc.

92{
93 return x_;
94}

◆ operator()() [2/2]

const G4VCrossSectionSource * G4CrossSectionSourcePtr::operator() ( ) const

Definition at line 86 of file G4CrossSectionSourcePtr.cc.

87{
88 return x_;
89}

Referenced by operator==().

◆ operator<()

G4bool G4CrossSectionSourcePtr::operator< ( const G4CrossSectionSourcePtr & )
inline

Definition at line 71 of file G4CrossSectionSourcePtr.hh.

71{ return false; }

◆ operator=() [1/2]

G4CrossSectionSourcePtr & G4CrossSectionSourcePtr::operator= ( const G4CrossSectionSourcePtr & right)

Definition at line 54 of file G4CrossSectionSourcePtr.cc.

56{
57 if (this != &xw)
58 {
59 x_ = xw.x_;
60 }
61 return *this;
62}

◆ operator=() [2/2]

G4CrossSectionSourcePtr & G4CrossSectionSourcePtr::operator= ( G4CrossSectionSourcePtr && right)
noexcept

Definition at line 64 of file G4CrossSectionSourcePtr.cc.

66{
67 if (this != &right)
68 {
69 // De not release our own resources, as not owning them!
70
71 // Simply transfer pointer from 'right' to 'this'
72 x_ = right.x_;
73
74 // Reset 'right' to a valid state
75 right.x_ = nullptr;
76 }
77 return *this;
78}

◆ operator==()

G4bool G4CrossSectionSourcePtr::operator== ( const G4CrossSectionSourcePtr & right) const

Definition at line 80 of file G4CrossSectionSourcePtr.cc.

82{
83 return *(this->operator()()) == *right();
84}
const G4VCrossSectionSource * operator()() const

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