Print

Print


Commit in lcio/src/cpp/src/IMPL on rio_v00-00
LCCollectionVec.cc+12-121.12.20.1 -> 1.12.20.2
replaced inheritance for std::vector<LCObject*> by inclusion

lcio/src/cpp/src/IMPL
LCCollectionVec.cc 1.12.20.1 -> 1.12.20.2
diff -u -r1.12.20.1 -r1.12.20.2
--- LCCollectionVec.cc	20 Nov 2009 15:28:51 -0000	1.12.20.1
+++ LCCollectionVec.cc	26 Nov 2009 14:28:04 -0000	1.12.20.2
@@ -44,8 +44,8 @@
 
     AccessChecked::setReadOnly(readOnly ) ;
 
-    LCObjectVec::iterator iter = begin() ;
-    while( iter != end() ){
+    LCObjectVec::iterator iter = _vec.begin() ;
+    while( iter != _vec.end() ){
       AccessChecked* element = dynamic_cast<AccessChecked*>(*iter++) ;
       if(element){
 	element->setReadOnly( readOnly ) ;
@@ -55,22 +55,22 @@
 
   void LCCollectionVec::setIndices( unsigned hash ) {
 
-    for( unsigned i=0 ; i< this->size() ; ++i ){
+    for( unsigned i=0 ; i< _vec.size() ; ++i ){
 
       EVENT::long64 idx(i) ;
       EVENT::long64 hashL( hash ) ;
 
 //       EVENT::long64 index(  idx | hashL<<32 ) ;
 //       std::cout << "   LcCol setIndices : " << idx << " , " << hashL << ", " <<  index  << std::endl ;
-      this->operator[](i)->setIndex(  idx | hashL<<32 ) ;
+      _vec.operator[](i)->setIndex(  idx | hashL<<32 ) ;
     }
   }
  
  void LCCollectionVec::ptrToIndex() {
 
-    for( unsigned i=0 ; i< this->size() ; ++i ){
+    for( unsigned i=0 ; i< _vec.size() ; ++i ){
 
-      this->operator[](i)->ptrToIndex() ;
+      _vec.operator[](i)->ptrToIndex() ;
     }
   }
 
@@ -78,12 +78,12 @@
 
   if( ! isSubset() ){
     // delete all elements
-    LCObjectVec::const_iterator iter = begin() ;
+    LCObjectVec::const_iterator iter = _vec.begin() ;
     //    std::cout << "deleting collection " 
     //  	    << std::endl ;
     //    UTIL::LCTOOLS::printParameters( parameters() )  ;
     
-    while( iter != end() ){
+    while( iter != _vec.end() ){
       delete *iter++ ;
     }
   }
@@ -91,7 +91,7 @@
 
 
 int LCCollectionVec::getNumberOfElements() const{
-  return size() ;
+  return _vec.size() ;
 }
 
 
@@ -102,7 +102,7 @@
 
 
 EVENT::LCObject * LCCollectionVec::getElementAt(int index) const{
-  return this->operator[](index) ;
+  return _vec.operator[](index) ;
 }
 
 bool LCCollectionVec::isTransient() const { 
@@ -149,7 +149,7 @@
     //    if(_access != LCIO::UPDATE )
     //  throw ReadOnlyException("LCCollectionVec::addElement:  event is read only") ;
     checkAccess("LCCollectionVec::addElement") ;
-    this->push_back( obj ) ; 
+    _vec.push_back( obj ) ; 
   }
 
   void LCCollectionVec::removeElementAt(int i) throw (EVENT::ReadOnlyException){
@@ -157,7 +157,7 @@
     //    if(_access != LCIO::UPDATE )
     //  throw ReadOnlyException("LCCollectionVec::addElement:  event is read only") ;
     checkAccess("LCCollectionVec::removeElementAt") ;
-    this->erase( begin() + i ) ;
+    _vec.erase( _vec.begin() + i ) ;
 
   }
 
CVSspam 0.2.8