--------------------------------------------------------------------
| 123 | // -------------------------------------------------------------------- |
| 124 | // |
| 125 | G4bool G4ProcessVector::insertAt(G4int i, G4VProcess* aProcess) |
| 126 | { |
| 127 | if ( (i<0) || (i>G4int(pProcVector->size())) ) return false; |
| 128 | if (i==G4int(pProcVector->size())) |
| 129 | { |
| 130 | pProcVector->push_back(aProcess); |
| 131 | } |
| 132 | else |
| 133 | { |
| 134 | auto it=pProcVector->cbegin(); |
| 135 | for(G4int j=0; j!=i; ++j) ++it; |
| 136 | pProcVector->insert(it, aProcess); |
| 137 | } |
| 138 | return true; |
| 139 | } |
| 140 | |
| 141 | // -------------------------------------------------------------------- |
| 142 | // |