CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DDStrVector.cc
Go to the documentation of this file.
2 
3 #include <utility>
4 
6 
8  create(name);
9 }
10 
11 DDStrVector::DDStrVector(const DDName& name, std::unique_ptr<std::vector<std::string>> vals) {
12  create(name, std::move(vals));
13 }
14 
15 std::ostream& operator<<(std::ostream& os, const DDStrVector& cons) {
16  os << "DDStrVector name=" << cons.name();
17 
18  if (cons.isDefined().second) {
19  os << " size=" << cons.size() << " vals=( ";
20  for (const auto& it : cons.values()) {
21  os << it << ' ';
22  }
23  os << ')';
24  } else {
25  os << " constant is not yet defined, only declared.";
26  }
27  return os;
28 }
Definition: DDBase.h:10
def_type isDefined() const
Definition: DDBase.h:90
const N & name() const
Definition: DDBase.h:59
DDStrVector()
an uninitialized constant; one can assign an initialized constant to make it valid ...
Definition: DDStrVector.cc:5
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:17
a named constant corresponding to the DDL-XML tag &lt;Constant&gt; and &lt;ConstantsStrVector&gt; ...
Definition: DDStrVector.h:18
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:167
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
size_t size() const
the size of the array of values
Definition: DDStrVector.h:36
def move
Definition: eostools.py:511
const value_type & values() const
the stored values
Definition: DDStrVector.h:39
void create(const DDName &name, std::unique_ptr< std::vector< std::string > >vals)
Definition: DDBase.h:96