00001 #ifndef EVENT_LCCOLLECTIONVEC_H
00002 #define EVENT_LCCOLLECTIONVEC_H 1
00003
00004 #include <string>
00005 #include <vector>
00006
00007 #include "EVENT/LCCollection.h"
00008 #include "EVENT/LCObject.h"
00009 #include "AccessChecked.h"
00010 #include "LCParametersImpl.h"
00011
00012
00013
00014 namespace IMPL {
00015
00016
00025 class LCCollectionVec : public EVENT::LCCollection , public EVENT::LCObjectVec
00026 , public AccessChecked {
00027
00028
00029 public:
00034 LCCollectionVec() : _typeName("UNKNOWN" ), _flag(0) { }
00035
00036 public:
00037
00039 LCCollectionVec( const std::string& type ) ;
00040
00041
00042
00043
00044
00045
00048 virtual ~LCCollectionVec() ;
00049
00052 virtual int getNumberOfElements() const ;
00053
00056 virtual const std::string & getTypeName() const ;
00057
00060 virtual EVENT::LCObject * getElementAt(int index) const ;
00061
00076 virtual int getFlag() const ;
00077
00078
00082 virtual bool isTransient() const ;
00083
00084
00088 void setTransient(bool val=true) ;
00089
00094 virtual bool isDefault() const ;
00095
00099 void setDefault(bool val=true) ;
00100
00101
00107 virtual bool isSubset() const ;
00108
00115 void setSubset(bool val=true) ;
00116
00117
00120 void setFlag(int flag) ;
00121
00122
00128 virtual void addElement(EVENT::LCObject * obj) ;
00129
00135 virtual void removeElementAt(int i) ;
00136
00139 virtual const EVENT::LCParameters & getParameters() const { return _params ; }
00140
00143 virtual EVENT::LCParameters & parameters() { return _params ; }
00144
00145
00146 protected:
00147 void setReadOnly(bool readOnly) ;
00148
00149 std::string _typeName ;
00150 int _flag ;
00151 LCParametersImpl _params{} ;
00152
00153 };
00154 }
00155 #endif