CMS 3D CMS Logo

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 }
std::ostream & operator<<(std::ostream &os, const DDStrVector &cons)
output operator for printing ...
Definition: DDStrVector.cc:15
Definition: DDBase.h:10
const value_type & values() const
the stored values
Definition: DDStrVector.h:39
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 <Constant> and <ConstantsStrVector> ...
Definition: DDStrVector.h:18
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
size_t size() const
the size of the array of values
Definition: DDStrVector.h:36
def_type isDefined() const
Definition: DDBase.h:89
def move(src, dest)
Definition: eostools.py:511
void create(const DDName &name, std::unique_ptr< std::vector< std::string > > vals)
Definition: DDBase.h:95