1 #ifndef Framework_es_Label_h 2 #define Framework_es_Label_h 34 template<
typename T,
int ILabel>
46 template<
int ILabel,
typename T>
52 Label() : labels_(), default_() {}
53 Label(
const char* iLabel) : labels_(), default_(iLabel) {}
56 labels_(iIndex+1,
def()), default_() {labels_[iIndex] = iString;}
59 if(iIndex==labels_.size()){
60 labels_.push_back(iString);
61 }
else if(iIndex > labels_.size()) {
62 std::vector<std::string>
temp(iIndex+1,
def());
66 if( labels_[iIndex] !=
def() ) {
68 e <<
"The index "<<iIndex<<
" was previously assigned the label \"" 69 <<labels_[iIndex]<<
"\" and then was later assigned \"" 73 labels_[iIndex] = iString;
78 return (*
this)(iString, iIndex);
90 return Label(iString, iIndex);
93 return Label(iString, iIndex);
Label & operator()(const std::string &iString, unsigned int iIndex)
static const std::string & def()
Label label(const std::string &iString, int iIndex)
Label(const char *iLabel)
Label(const std::string &iString)
L< T, ILabel > l(std::shared_ptr< T > &iP)
std::shared_ptr< T > product_
L(std::shared_ptr< T > iP)
Label & operator()(int iIndex, const std::string &iString)
Func copy_all(ForwardSequence &s, Func f)
wrappers for copy
std::vector< std::string > labels_
Label(const std::string &iString, unsigned int iIndex)