CMS 3D CMS Logo

DDString.h
Go to the documentation of this file.
1 #ifndef DDString_h
2 #define DDString_h
3 
6 #include <string>
7 #include <iostream>
8 #include <memory>
9 
10 class DDString;
11 
12 
14 std::ostream & operator<<(std::ostream & o, const DDString & cons);
15 
17 class DDString : public DDBase<DDName, std::unique_ptr<std::string> >
18 {
19 public:
21  DDString();
22 
24  DDString(const DDName & name);
25 
27  DDString(const DDName & name, std::unique_ptr<std::string> value);
28 
30  const std::string & value() const { return rep(); }
31 
33  operator std::string() const { return rep(); }
34 };
35 
36 #endif
Definition: DDBase.h:10
const std::string & value() const
return the first stored value; does not check boundaries!
Definition: DDString.h:30
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:15
a named constant corresponding to the DDL-XML tag <Constant> and <ConstantsVector> ...
Definition: DDString.h:17
DDString()
an uninitialized constant; one can assign an initialized constant to make it valid ...
Definition: DDString.cc:5
const DDI::rep_traits< DDName, std::unique_ptr< std::string > >::reference rep() const
Definition: DDBase.h:80
Definition: value.py:1
std::ostream & operator<<(std::ostream &o, const DDString &cons)
output operator for printing ...
Definition: DDString.cc:18