CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Functions
DDString.h File Reference
#include "DetectorDescription/Core/interface/DDBase.h"
#include "DetectorDescription/Core/interface/DDName.h"
#include <string>
#include <iostream>

Go to the source code of this file.

Classes

class  DDString
 a named constant corresponding to the DDL-XML tag <Constant> and <ConstantsVector> More...
 

Functions

std::ostream & operator<< (std::ostream &o, const DDString &cons)
 output operator for printing ... More...
 

Function Documentation

std::ostream& operator<< ( std::ostream &  o,
const DDString cons 
)

output operator for printing ...

Definition at line 23 of file DDString.cc.

References DDBase< N, C >::isDefined(), DDBase< N, C >::name(), and DDString::value().

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 }
def_type isDefined() const
Definition: DDBase.h:110
const N & name() const
Definition: DDBase.h:78
const std::string & value() const
return the first stored value; does not check boundaries!
Definition: DDString.h:29