CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions
DDStrVector Class Reference

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

#include <DDStrVector.h>

Inheritance diagram for DDStrVector:
DDBase< DDName, std::vector< std::string > * >

Public Types

typedef std::vector
< std::string >::size_type 
size_t
 size type for the size of the stored values More...
 
typedef std::vector< std::string > value_type
 value type of the managed object More...
 
- Public Types inherited from DDBase< DDName, std::vector< std::string > * >
typedef std::pair< const
DDName *, bool > 
def_type
 
typedef std::vector
< std::string > * 
pimpl_type
 
typedef DDI::rep_type< DDName,
pimpl_type > * 
prep_type
 
typedef DDI::Singleton
< DDI::Store< DDName,
std::vector< std::string > * > > 
StoreT
 

Public Member Functions

 DDStrVector ()
 an uninitialized constant; one can assign an initialized constant to make it valid More...
 
 DDStrVector (const DDName &name)
 a refenrence to a constant More...
 
 DDStrVector (const DDName &name, std::vector< 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 double More...
 
 operator std::vector< std::string > () const
 convert to a std::vector<double> More...
 
std::string operator[] (size_t pos) const
 returns the value on position pos; does not check boundaries! More...
 
size_t size () const
 the size of the array of values More...
 
std::string value () const
 return the first stored value; does not check boundaries! More...
 
const value_typevalues () const
 the stored values More...
 
value_type::const_iterator vectorBegin () const
 read-only iterator pointing to the begin of the stored values More...
 
value_type::const_iterator vectorEnd () const
 read-only iterator poining one place after the stored values More...
 
- Public Member Functions inherited from DDBase< DDName, std::vector< std::string > * >
 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
 
const DDI::rep_traits< DDName,
std::vector< std::string >
* >::reference 
rep () const
 
DDI::rep_traits< DDName,
std::vector< std::string >
* >::reference 
rep ()
 
std::string toString () const
 
const DDI::rep_traits< DDName,
std::vector< std::string >
* >::reference 
val () const
 
const DDI::rep_traits< DDName,
std::vector< std::string >
* >::reference 
val ()
 
virtual ~DDBase ()
 

Additional Inherited Members

- Static Public Member Functions inherited from DDBase< DDName, std::vector< std::string > * >
static auto begin ()
 
static void clear ()
 
static auto end ()
 
static size_t size ()
 
- Protected Attributes inherited from DDBase< DDName, std::vector< std::string > * >
prep_type prep_
 

Detailed Description

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

Definition at line 17 of file DDStrVector.h.

Member Typedef Documentation

typedef std::vector<std::string>::size_type DDStrVector::size_t

size type for the size of the stored values

Definition at line 22 of file DDStrVector.h.

typedef std::vector<std::string> DDStrVector::value_type

value type of the managed object

Definition at line 25 of file DDStrVector.h.

Constructor & Destructor Documentation

DDStrVector::DDStrVector ( )

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

Definition at line 7 of file DDStrVector.cc.

DDStrVector::DDStrVector ( const DDName name)

a refenrence to a constant

Definition at line 9 of file DDStrVector.cc.

References DDI::Singleton< I >::instance(), and DDBase< DDName, std::vector< std::string > * >::prep_.

10 {
11  prep_ = StoreT::instance().create(name);
12 }
Definition: DDBase.h:10
static value_type & instance()
DDStrVector::DDStrVector ( const DDName name,
std::vector< 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 14 of file DDStrVector.cc.

References DDI::Singleton< I >::instance(), and DDBase< DDName, std::vector< std::string > * >::prep_.

15 {
16  prep_ = StoreT::instance().create(name,vals);
17 }
static value_type & instance()

Member Function Documentation

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

convert to a double

Definition at line 55 of file DDStrVector.h.

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

55 { return rep()[0]; }
const DDI::rep_traits< DDName, std::vector< std::string > * >::reference rep() const
Definition: DDBase.h:84
DDStrVector::operator std::vector< std::string > ( ) const
inline

convert to a std::vector<double>

Definition at line 58 of file DDStrVector.h.

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

58 { return rep(); }
const DDI::rep_traits< DDName, std::vector< std::string > * >::reference rep() const
Definition: DDBase.h:84
std::string DDStrVector::operator[] ( size_t  pos) const
inline

returns the value on position pos; does not check boundaries!

Definition at line 43 of file DDStrVector.h.

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

43 { return rep()[pos]; }
const DDI::rep_traits< DDName, std::vector< std::string > * >::reference rep() const
Definition: DDBase.h:84
size_t DDStrVector::size ( void  ) const
inline

the size of the array of values

Definition at line 37 of file DDStrVector.h.

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

Referenced by ntuple._Collection::__iter__(), ntuple._Collection::__len__(), and operator<<().

37 { return rep().size(); }
const DDI::rep_traits< DDName, std::vector< std::string > * >::reference rep() const
Definition: DDBase.h:84
std::string DDStrVector::value ( ) const
inline
const value_type& DDStrVector::values ( ) const
inline

the stored values

Definition at line 40 of file DDStrVector.h.

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

Referenced by operator<<().

40 { return rep(); }
const DDI::rep_traits< DDName, std::vector< std::string > * >::reference rep() const
Definition: DDBase.h:84
value_type::const_iterator DDStrVector::vectorBegin ( ) const
inline

read-only iterator pointing to the begin of the stored values

Definition at line 49 of file DDStrVector.h.

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

49 { return rep().begin(); }
const DDI::rep_traits< DDName, std::vector< std::string > * >::reference rep() const
Definition: DDBase.h:84
value_type::const_iterator DDStrVector::vectorEnd ( ) const
inline

read-only iterator poining one place after the stored values

Definition at line 52 of file DDStrVector.h.

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

52 { return rep().end(); }
const DDI::rep_traits< DDName, std::vector< std::string > * >::reference rep() const
Definition: DDBase.h:84