CMS 3D CMS Logo

DDStrVector.h

Go to the documentation of this file.
00001 #ifndef DDStrVector_h
00002 #define DDStrVector_h
00003 
00004 #include "DetectorDescription/Core/interface/DDBase.h"
00005 #include "DetectorDescription/Core/interface/DDName.h"
00006 #include <vector>
00007 #include <iostream>
00008 
00009 class DDStrVector;
00010 
00012 std::ostream & operator<<(std::ostream & o, const DDStrVector & cons);
00013 
00014 //typedef std::vector<double> dd_constant_type;
00015 
00017 class DDStrVector : public DDBase<DDName, std::vector<std::string>* >
00018 {
00019 public:
00020 
00022    typedef std::vector<std::string>::size_type size_t;
00023    
00025    //typedef std::vector<std::string>::const_iterator const_iterator;
00026    
00028    typedef std::vector<std::string> value_type;
00029    
00031    DDStrVector();
00032    
00034    DDStrVector(const DDName & name);
00035    
00037    DDStrVector(const DDName & name, std::vector<std::string>* value);
00038       
00040    size_t size() const { return rep().size(); }
00041    
00043    const value_type & values() const { return rep(); }
00044    
00046    std::string operator[](size_t pos) const { return rep()[pos]; }
00047    
00049    std::string value() const { return rep()[0]; }
00050    
00052    value_type::const_iterator vectorBegin() const { return rep().begin(); }
00053    
00055    value_type::const_iterator vectorEnd() const { return rep().end(); }
00056    
00058    operator std::string() const { return rep()[0]; }
00059    
00061    operator std::vector<std::string>() const { return rep(); }
00062    
00063 };
00064 #endif

Generated on Tue Jun 9 17:32:07 2009 for CMSSW by  doxygen 1.5.4