CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DDString.cc
Go to the documentation of this file.
2 //#include "DetectorDescription/Base/interface/DDException.h"
3 
4 // Evaluator
5 //#include "DetectorDescription/ExprAlgo/interface/ExprEvalSingleton.h"
6 
7 
8 
9 DDString::DDString() : DDBase<DDName,std::string*>() { }
10 
11 
12 DDString::DDString(const DDName & name) : DDBase<DDName,std::string*>()
13 {
14  prep_ = StoreT::instance().create(name);
15 }
16 
17 DDString::DDString(const DDName & name,std::string* vals)
18 {
19  prep_ = StoreT::instance().create(name,vals);
20 }
21 
22 
23 std::ostream & operator<<(std::ostream & os, const DDString & cons)
24 {
25  os << "DDString name=" << cons.name();
26 
27  if(cons.isDefined().second) {
28  os << " val=" << cons.value();
29  }
30  else {
31  os << " constant is not yet defined, only declared.";
32  }
33  return os;
34 }
35 
36 
Definition: DDBase.h:14
def_type isDefined() const
Definition: DDBase.h:115
const N & name() const
Definition: DDBase.h:82
const std::string & value() const
return the first stored value; does not check boundaries!
Definition: DDString.h:29
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:18
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
a named constant corresponding to the DDL-XML tag &lt;Constant&gt; and &lt;ConstantsVector&gt; ...
Definition: DDString.h:16
DDString()
an uninitialized constant; one can assign an initialized constant to make it valid ...
Definition: DDString.cc:9
static value_type & instance()