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

#include <G4Visible.hh>

+ Inheritance diagram for G4Visible:

Public Member Functions

 G4Visible ()
 
 G4Visible (const G4Visible &)
 
 G4Visible (const G4VisAttributes *)
 
virtual ~G4Visible ()
 
G4Visibleoperator= (const G4Visible &)
 
G4bool operator!= (const G4Visible &right) const
 
const G4VisAttributesGetVisAttributes () const
 
void SetVisAttributes (const G4VisAttributes *)
 
void SetVisAttributes (const G4VisAttributes &)
 

Protected Attributes

const G4VisAttributesfpVisAttributes
 
G4bool fAllocatedVisAttributes
 

Friends

std::ostream & operator<< (std::ostream &os, const G4Visible &v)
 

Detailed Description

Definition at line 47 of file G4Visible.hh.

Constructor & Destructor Documentation

◆ G4Visible() [1/3]

G4Visible::G4Visible ( )

Definition at line 36 of file G4Visible.cc.

36 :
39{}
const G4VisAttributes * fpVisAttributes
Definition: G4Visible.hh:80
G4bool fAllocatedVisAttributes
Definition: G4Visible.hh:81

◆ G4Visible() [2/3]

G4Visible::G4Visible ( const G4Visible visible)

◆ G4Visible() [3/3]

G4Visible::G4Visible ( const G4VisAttributes pVA)

Definition at line 48 of file G4Visible.cc.

48 :
49 fpVisAttributes (pVA),
51{}

◆ ~G4Visible()

G4Visible::~G4Visible ( )
virtual

Definition at line 53 of file G4Visible.cc.

53 {
55}

Member Function Documentation

◆ GetVisAttributes()

◆ operator!=()

G4bool G4Visible::operator!= ( const G4Visible right) const

Definition at line 86 of file G4Visible.cc.

86 {
88 return *fpVisAttributes != *right.fpVisAttributes;
89 else if (!fpVisAttributes && !right.fpVisAttributes) return false;
90 else return true;
91}

◆ operator=()

G4Visible & G4Visible::operator= ( const G4Visible rhs)

Definition at line 57 of file G4Visible.cc.

57 {
58 if (&rhs == this) return *this;
61 delete fpVisAttributes;
63 }
65 return *this;
66}

Referenced by G4VMarker::operator=().

◆ SetVisAttributes() [1/2]

void G4Visible::SetVisAttributes ( const G4VisAttributes VA)

Definition at line 68 of file G4Visible.cc.

68 {
69 // Allocate G4VisAttributes on the heap in case the user specifies a
70 // short-lived VA for a long-lived G4Visible. Flag so that it can
71 // be deleted in the destructor.
72 // First delete any G4VisAttributes already on the heap...
76}

◆ SetVisAttributes() [2/2]

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const G4Visible v 
)
friend

Definition at line 93 of file G4Visible.cc.

93 {
94 if (v.fpVisAttributes) return os << *(v.fpVisAttributes);
95 else return os << "No Visualization Attributes";
96}

Member Data Documentation

◆ fAllocatedVisAttributes

G4bool G4Visible::fAllocatedVisAttributes
protected

Definition at line 81 of file G4Visible.hh.

Referenced by G4Visible(), operator=(), SetVisAttributes(), and ~G4Visible().

◆ fpVisAttributes

const G4VisAttributes* G4Visible::fpVisAttributes
protected

Definition at line 80 of file G4Visible.hh.

Referenced by G4Visible(), operator!=(), operator=(), SetVisAttributes(), and ~G4Visible().


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