Geant4 9.6.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 48 of file G4Visible.hh.

Constructor & Destructor Documentation

◆ G4Visible() [1/3]

G4Visible::G4Visible ( )

Definition at line 37 of file G4Visible.cc.

37 :
40{}
const G4VisAttributes * fpVisAttributes
Definition: G4Visible.hh:81
G4bool fAllocatedVisAttributes
Definition: G4Visible.hh:82

◆ G4Visible() [2/3]

G4Visible::G4Visible ( const G4Visible visible)

◆ G4Visible() [3/3]

G4Visible::G4Visible ( const G4VisAttributes pVA)

Definition at line 49 of file G4Visible.cc.

49 :
50 fpVisAttributes (pVA),
52{}

◆ ~G4Visible()

G4Visible::~G4Visible ( )
virtual

Definition at line 54 of file G4Visible.cc.

54 {
56}

Member Function Documentation

◆ GetVisAttributes()

◆ operator!=()

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

Definition at line 87 of file G4Visible.cc.

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

◆ operator=()

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

Definition at line 58 of file G4Visible.cc.

58 {
59 if (&rhs == this) return *this;
62 delete fpVisAttributes;
64 }
66 return *this;
67}

Referenced by G4VMarker::operator=().

◆ SetVisAttributes() [1/2]

void G4Visible::SetVisAttributes ( const G4VisAttributes VA)

Definition at line 69 of file G4Visible.cc.

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

◆ SetVisAttributes() [2/2]

Friends And Related Function Documentation

◆ operator<<

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

Definition at line 94 of file G4Visible.cc.

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

Member Data Documentation

◆ fAllocatedVisAttributes

G4bool G4Visible::fAllocatedVisAttributes
protected

Definition at line 82 of file G4Visible.hh.

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

◆ fpVisAttributes

const G4VisAttributes* G4Visible::fpVisAttributes
protected

Definition at line 81 of file G4Visible.hh.

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


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