CMS 3D CMS Logo

DDStrVector.cc
Go to the documentation of this file.
2 
3 #include <utility>
4 
6  : DDBase< DDName, std::unique_ptr<std::vector<std::string>>>()
7 {}
8 
10  : DDBase< DDName, std::unique_ptr<std::vector< std::string >>>()
11 {
12  create( name );
13 }
14 
15 DDStrVector::DDStrVector( const DDName & name, std::unique_ptr<std::vector<std::string>> vals )
16 {
17  create( name, std::move( vals ));
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  for( const auto& it : cons.values()) {
27  os << it << ' ';
28  }
29  os << ')';
30  }
31  else {
32  os << " constant is not yet defined, only declared.";
33  }
34  return os;
35 }
std::ostream & operator<<(std::ostream &os, const DDStrVector &cons)
output operator for printing ...
Definition: DDStrVector.cc:20
Definition: DDBase.h:10
def_type isDefined() const
Definition: DDBase.h:107
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:15
a named constant corresponding to the DDL-XML tag <Constant> and <ConstantsStrVector> ...
Definition: DDStrVector.h:18
size_t size() const
the size of the array of values
Definition: DDStrVector.h:38
const value_type & values() const
the stored values
Definition: DDStrVector.h:41
def move(src, dest)
Definition: eostools.py:511
void create(const DDName &name, std::unique_ptr< std::vector< std::string > > vals)
Definition: DDBase.h:121