Print

Print


Commit in lcio/src/cpp/include/IMPL on rio_v00-00
LCCollectionVec.h+24-31.11.20.2 -> 1.11.20.3
replaced inheritance for std::vector<LCObject*> by inclusion

lcio/src/cpp/include/IMPL
LCCollectionVec.h 1.11.20.2 -> 1.11.20.3
diff -u -r1.11.20.2 -r1.11.20.3
--- LCCollectionVec.h	20 Nov 2009 15:12:04 -0000	1.11.20.2
+++ LCCollectionVec.h	26 Nov 2009 14:24:31 -0000	1.11.20.3
@@ -19,12 +19,14 @@
    *  of LCObjects.
    * 
    * @author gaede 
-   * @version $Id: LCCollectionVec.h,v 1.11.20.2 2009/11/20 15:12:04 gaede Exp $
+   * @version $Id: LCCollectionVec.h,v 1.11.20.3 2009/11/26 14:24:31 gaede Exp $
    * @see LCObject
    * @see LCCollection
    */
-  class LCCollectionVec : public EVENT::LCCollection , public EVENT::LCObjectVec 
-    , public AccessChecked {
+  class LCCollectionVec : public EVENT::LCCollection, public AccessChecked {
+    
+//   class LCCollectionVec : public EVENT::LCCollection , public EVENT::LCObjectVec 
+//     , public AccessChecked {
     
     //  protected:
   public:
@@ -149,6 +151,23 @@
     void ptrToIndex() ;
     
 
+    // forward some of std::vector's interface so that we can serve as a wrapper to vector ------------
+
+    inline void push_back(EVENT::LCObject* t){
+      _vec.push_back(t) ;
+    }
+    inline void resize(size_t nS){   _vec.resize(nS) ; }
+    inline EVENT::LCObject* operator[](size_t n){  return _vec[n] ; }
+    inline const EVENT::LCObject* operator[](size_t n) const { return _vec[n] ; }
+    inline EVENT::LCObject*& at(size_t n){ return _vec.at(n)  ; }
+    inline size_t size() const { return _vec.size()  ; }
+//     inline iterator begin(){  return _vec.begin() ; }
+//     inline iterator end(){ return _vec.end() ; }
+//     inline const_iterator begin() const {  return _vec.begin() ; }
+//     inline const_iterator end() const { return _vec.end() ; }
+
+
+
   protected:
     void setReadOnly(bool readOnly) ;
 
@@ -157,6 +176,8 @@
     LCParametersImpl _params ;
     //    int _access ;
 
+    EVENT::LCObjectVec _vec; 
+
 }; // class
 } // namespace IMPL
 #endif /* ifndef EVENT_LCCOLLECTIONVEC_H */
CVSspam 0.2.8