00001 // 00002 // ******************************************************************** 00003 // * License and Disclaimer * 00004 // * * 00005 // * The Geant4 software is copyright of the Copyright Holders of * 00006 // * the Geant4 Collaboration. It is provided under the terms and * 00007 // * conditions of the Geant4 Software License, included in the file * 00008 // * LICENSE and available at http://cern.ch/geant4/license . These * 00009 // * include a list of copyright holders. * 00010 // * * 00011 // * Neither the authors of this software system, nor their employing * 00012 // * institutes,nor the agencies providing financial support for this * 00013 // * work make any representation or warranty, express or implied, * 00014 // * regarding this software system or assume any liability for its * 00015 // * use. Please see the license in the file LICENSE and URL above * 00016 // * for the full disclaimer and the limitation of liability. * 00017 // * * 00018 // * This code implementation is the result of the scientific and * 00019 // * technical work of the GEANT4 collaboration. * 00020 // * By using, copying, modifying or distributing the software (or * 00021 // * any work based on the software) you agree to acknowledge its * 00022 // * use in resulting scientific publications, and indicate your * 00023 // * acceptance of all terms of the Geant4 Software license. * 00024 // ******************************************************************** 00025 // 00026 // 00027 // $Id$ 00028 // 00029 // ---------------------------------------------------------------------- 00030 // Class G4SurfaceList 00031 // 00032 // Class description: 00033 // 00034 // Class defining a list of surfaces. 00035 00036 // Authors: J.Sulkimo, P.Urban. 00037 // ---------------------------------------------------------------------- 00038 #ifndef __G4SurfaceList_h 00039 #define __G4SurfaceList_h 1 00040 00041 #include "G4Surface.hh" 00042 00043 class G4SurfaceList 00044 { 00045 public: // with description 00046 00047 G4SurfaceList(); 00048 ~G4SurfaceList(); 00049 // Constructor & destructor. 00050 00051 void MoveToFirst(G4Surface *srf); 00052 void AddSurface(G4Surface *srf); 00053 00054 G4Surface* GetSurface(); 00055 const G4Surface* GetSurface(G4int number); 00056 const G4Surface* GetLastSurface() const; 00057 00058 void RemoveSurface(G4Surface* srf); 00059 void RemovePointer(); 00060 00061 void MoveToFirst(); 00062 void Step(); 00063 00064 void EmptyList(); 00065 void G4SortList(); 00066 00067 void QuickG4Sort(G4Surface**, G4int, G4int); 00068 00069 const G4Surface* GetFirst() const { return first; } 00070 const G4Surface* GetNext() const { return next; } 00071 G4int GetSize() const { return number_of_elements; } 00072 00073 private: 00074 00075 G4SurfaceList(const G4SurfaceList&); 00076 G4SurfaceList& operator=(const G4SurfaceList&); 00077 // Private copy constructor and assignment operator. 00078 00079 private: // without description 00080 00081 G4int number_of_elements; 00082 00083 G4Surface* first; 00084 G4Surface* next; 00085 G4Surface* last; 00086 G4Surface* temp; 00087 G4Surface* index; 00088 00089 }; 00090 00091 #endif