CMS 3D CMS Logo

DDStrVector Class Reference

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

#include <DetectorDescription/Core/interface/DDStrVector.h>

Inheritance diagram for DDStrVector:

DDBase< DDName, std::vector< std::string > * >

List of all members.

Public Types

typedef std::vector
< std::string >::size_type 
size_t
 size type for the size of the stored values
typedef std::vector< std::string > value_type
 iterator for read-only acces to stored values

Public Member Functions

 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
 DDStrVector (const DDName &name)
 a refenrence to a constant
 DDStrVector ()
 an uninitialized constant; one can assign an initialized constant to make it valid
 operator std::string () const
 convert to a double
 operator std::vector< std::string > () const
 convert to a std::vector<double>
std::string operator[] (size_t pos) const
 returns the value on position pos; does not check boundaries!
size_t size () const
 the size of the array of values
std::string value () const
 return the first stored value; does not check boundaries!
const value_typevalues () const
 the stored values
value_type::const_iterator vectorBegin () const
 read-only iterator pointing to the begin of the stored values
value_type::const_iterator vectorEnd () const
 read-only iterator poining one place after the stored values


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

iterator for read-only acces to stored values

value type of the managed object

Definition at line 28 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 6 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_.

00009                                             : DDBase<DDName,std::vector<std::string>*>() 
00010 {
00011   prep_ = StoreT::instance().create(name);
00012 }

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_.

00015 {
00016   prep_ = StoreT::instance().create(name,vals);
00017 }  


Member Function Documentation

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

convert to a double

Definition at line 58 of file DDStrVector.h.

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

00058 { return rep()[0]; }

DDStrVector::operator std::vector< std::string > (  )  const [inline]

convert to a std::vector<double>

Definition at line 61 of file DDStrVector.h.

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

00061 { return rep(); }

std::string DDStrVector::operator[] ( size_t  pos  )  const [inline]

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

Definition at line 46 of file DDStrVector.h.

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

00046 { return rep()[pos]; }

size_t DDStrVector::size ( void   )  const [inline]

the size of the array of values

Definition at line 40 of file DDStrVector.h.

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

Referenced by operator<<().

00040 { return rep().size(); }

std::string DDStrVector::value (  )  const [inline]

return the first stored value; does not check boundaries!

Definition at line 49 of file DDStrVector.h.

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

00049 { return rep()[0]; }

const value_type& DDStrVector::values (  )  const [inline]

the stored values

Definition at line 43 of file DDStrVector.h.

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

Referenced by operator<<().

00043 { return rep(); }

value_type::const_iterator DDStrVector::vectorBegin (  )  const [inline]

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

Definition at line 52 of file DDStrVector.h.

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

00052 { return rep().begin(); }

value_type::const_iterator DDStrVector::vectorEnd (  )  const [inline]

read-only iterator poining one place after the stored values

Definition at line 55 of file DDStrVector.h.

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

00055 { return rep().end(); }


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:18:16 2009 for CMSSW by  doxygen 1.5.4