#include "globals.hh"
#include <vector>
#include <algorithm>
Go to the source code of this file.
Data Structures | |
class | G4SortHelperPtr< A > |
struct | G4Delete |
Defines | |
#define | G4HadTmpUtil_hh 1 |
Functions | |
G4String | G4inttostring (int ai) |
template<class A> | |
void | G4PtrSort (std::vector< A * > *aList) |
#define G4HadTmpUtil_hh 1 |
Definition at line 27 of file G4HadTmpUtil.hh.
G4String G4inttostring | ( | int | ai | ) |
Definition at line 29 of file G4HadTmpUtil.cc.
00030 { 00031 std::ostringstream ost; 00032 ost << ai; 00033 G4String result = ost.str(); 00034 return result; 00035 }
void G4PtrSort | ( | std::vector< A * > * | aList | ) |
Definition at line 47 of file G4HadTmpUtil.hh.
00048 { 00049 std::vector<G4SortHelperPtr<A> > helper; 00050 for(size_t i=0; i<aList->size(); i++) helper.push_back(aList->operator[](i)); 00051 std::sort(helper.begin(), helper.end()); 00052 for(size_t j=0; j<helper.size(); j++) aList->operator[](j)=&(*helper[j]); 00053 }