CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DDStrVector.cc
Go to the documentation of this file.
1 
3 
4 // Evaluator
5 
6 DDStrVector::DDStrVector() : DDBase<DDName,std::vector<std::string>*>() { }
7 
8 
9 DDStrVector::DDStrVector(const DDName & name) : DDBase<DDName,std::vector<std::string>*>()
10 {
11  prep_ = StoreT::instance().create(name);
12 }
13 
14 DDStrVector::DDStrVector(const DDName & name,std::vector<std::string>* vals)
15 {
16  prep_ = StoreT::instance().create(name,vals);
17 }
18 
19 
20 std::ostream & operator<<(std::ostream & os, const DDStrVector & cons)
21 {
22  os << "DDStrVector name=" << cons.name();
23 
24  if(cons.isDefined().second) {
25  os << " size=" << cons.size() << " vals=( ";
26  DDStrVector::value_type::const_iterator it(cons.values().begin()), ed(cons.values().end());
27  for(; it<ed; ++it) {
28  os << *it << ' ';
29  }
30  os << ')';
31  }
32  else {
33  os << " constant is not yet defined, only declared.";
34  }
35  return os;
36 }
37 
Definition: DDBase.h:14
def_type isDefined() const
Definition: DDBase.h:115
const N & name() const
Definition: DDBase.h:82
DDStrVector()
an uninitialized constant; one can assign an initialized constant to make it valid ...
Definition: DDStrVector.cc:6
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:18
a named constant corresponding to the DDL-XML tag &lt;Constant&gt; and &lt;ConstantsStrVector&gt; ...
Definition: DDStrVector.h:17
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
size_t size() const
the size of the array of values
Definition: DDStrVector.h:40
static value_type & instance()
const value_type & values() const
the stored values
Definition: DDStrVector.h:43