Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:59:24

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 //
0027 //
0028 // 
0029 // John Allison  30th October 1996
0030 
0031 // Class Description:
0032 // Base class for all things visible, i.e., which have Vis Attributes.
0033 //
0034 // Note: a null pointer implies no attributes.  Under those circumstances
0035 // the visualization system is free to choose some.
0036 // Class Description - End:
0037 
0038 
0039 #ifndef G4VISIBLE_HH
0040 #define G4VISIBLE_HH
0041 
0042 #include "globals.hh"
0043 #include <iostream>
0044 
0045 class G4VisAttributes;
0046 
0047 class G4Visible {
0048 
0049   friend std::ostream& operator << (std::ostream& os, const G4Visible& v);
0050 
0051 public: // With description
0052 
0053   G4Visible ();
0054   G4Visible (const G4Visible&);
0055   G4Visible (G4Visible&&);
0056   G4Visible (const G4VisAttributes*);
0057 
0058   virtual ~G4Visible ();
0059 
0060   G4Visible& operator= (const G4Visible&);
0061   G4Visible& operator= (G4Visible&&);
0062 
0063   G4bool operator != (const G4Visible& right) const;
0064 
0065   const G4VisAttributes* GetVisAttributes () const;
0066 
0067   void SetVisAttributes (const G4VisAttributes*);
0068   // The G4VisAttributes object is not stored in a G4Visible; only a
0069   // reference, a const pointer, is kept.  Therefore the
0070   // G4VisAttributes object to which it refers must have a life long
0071   // enough to satisfy all uses of the G4Visible object.  E.g., if the
0072   // G4Visible object is created on the heap (using `new') then the
0073   // associated G4VisAttributes object would normally also be created
0074   // on the heap and managed in the same way.
0075 
0076   void SetVisAttributes (const G4VisAttributes&);
0077   // A copy of the G4VisAttributes object is created on the heap to
0078   // ensure a long life.
0079 
0080   // Access functions to the string for user customizable information
0081   virtual   const G4String&  GetInfo() const;
0082   virtual   void             SetInfo(const G4String& info);
0083 
0084 protected:
0085 
0086   G4String  fInfo;   // String for user customizable information
0087   const G4VisAttributes* fpVisAttributes;
0088   G4bool fAllocatedVisAttributes;
0089 };
0090 
0091 #include "G4Visible.icc"
0092 
0093 #endif