CMS 3D CMS Logo

List of all members | Public Member Functions
DDString Class Reference

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

#include <DDString.h>

Inheritance diagram for DDString:
DDBase< DDName, std::unique_ptr< std::string > >

Public Member Functions

 DDString ()
 an uninitialized constant; one can assign an initialized constant to make it valid More...
 
 DDString (const DDName &name)
 a refenrence to a constant More...
 
 DDString (const DDName &name, std::unique_ptr< std::string > value)
 creation of a new named constant; if it already existed with the given name, it's overwritten with new values More...
 
 operator std::string () const
 convert to a std::string More...
 
const std::string & value () const
 return the first stored value; does not check boundaries! More...
 
- Public Member Functions inherited from DDBase< DDName, std::unique_ptr< std::string > >
void create (const DDName &name)
 
void create (const DDName &name, std::unique_ptr< std::string > vals)
 
 DDBase ()
 
const DDNameddname () const
 
def_type isDefined () const
 
bool isValid () const
 true, if the wrapped pointer is valid More...
 
const DDNamename () const
 
 operator bool () const
 
bool operator< (const DDBase &b) const
 
bool operator== (const DDBase &b) const
 
bool operator> (const DDBase &b) const
 
DDI::rep_traits< DDName, std::unique_ptr< std::string > >::reference rep ()
 
const DDI::rep_traits< DDName, std::unique_ptr< std::string > >::reference rep () const
 
std::string toString () const
 
const DDI::rep_traits< DDName, std::unique_ptr< std::string > >::reference val ()
 
const DDI::rep_traits< DDName, std::unique_ptr< std::string > >::reference val () const
 
virtual ~DDBase ()
 

Additional Inherited Members

- Public Types inherited from DDBase< DDName, std::unique_ptr< std::string > >
using def_type = std::pair< const DDName *, bool >
 
using StoreT = DDI::Singleton< DDI::Store< DDName, std::unique_ptr< std::string > > >
 
- Static Public Member Functions inherited from DDBase< DDName, std::unique_ptr< std::string > >
static auto begin ()
 
static auto end ()
 

Detailed Description

a named constant corresponding to the DDL-XML tag <Constant> and <ConstantsVector>

Definition at line 16 of file DDString.h.

Constructor & Destructor Documentation

◆ DDString() [1/3]

DDString::DDString ( )

an uninitialized constant; one can assign an initialized constant to make it valid

Definition at line 5 of file DDString.cc.

◆ DDString() [2/3]

DDString::DDString ( const DDName name)

◆ DDString() [3/3]

DDString::DDString ( const DDName name,
std::unique_ptr< std::string >  value 
)

creation of a new named constant; if it already existed with the given name, it's overwritten with new values

Definition at line 9 of file DDString.cc.

9 { create(name, std::move(vals)); }

References DDBase< DDName, std::unique_ptr< std::string > >::create(), eostools::move(), and DDBase< DDName, std::unique_ptr< std::string > >::name().

Member Function Documentation

◆ operator std::string()

DDString::operator std::string ( ) const
inline

convert to a std::string

Definition at line 31 of file DDString.h.

31 { return rep(); }

References DDBase< DDName, std::unique_ptr< std::string > >::rep().

◆ value()

const std::string& DDString::value ( ) const
inline
DDBase< DDName, std::unique_ptr< std::string > >::name
const DDName & name() const
Definition: DDBase.h:59
DDBase< DDName, std::unique_ptr< std::string > >::rep
const DDI::rep_traits< DDName, std::unique_ptr< std::string > >::reference rep() const
Definition: DDBase.h:65
eostools.move
def move(src, dest)
Definition: eostools.py:511
DDBase< DDName, std::unique_ptr< std::string > >::create
void create(const DDName &name, std::unique_ptr< std::string > vals)
Definition: DDBase.h:96
DDBase
Definition: DDBase.h:10