/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
CommonTools/Utils/interface/parser/MethodArgumentSetter.h
39 строк
1 KB
Christopher Jones
Fixed additional includes for new header sub-directory
22 июл 2023, 01:44
22 июл 2023, 01:44
fb99540
Код
Авторство
О чём код?
#ifndef CommonTools_Utils_MethodArgumentSetter_h #define CommonTools_Utils_MethodArgumentSetter_h /* \class reco::parser::MethodArgumentSetter * * MethodArgumenteger setter * * \author Luca Lista, INFN * * \version $Revision: 1.1 $ * */ #include "CommonTools/Utils/interface/parser/MethodArgumentStack.h" #include <cassert> namespace reco { namespace parser { struct MethodArgumentSetter { MethodArgumentSetter(MethodArgumentStack &stack) : stack_(stack) {} template <typename T> void operator()(const T &n) const { stack_.push_back(AnyMethodArgument(n)); } void operator()(const char *begin, const char *end) const { assert(begin + 1 <= end - 1); // the quotes are included in [begin,end[ range. //in boost 1.67, the parser appends any extra white space to the // end if (*(end - 1) != *begin) { --end; } stack_.push_back(AnyMethodArgument(std::string(begin + 1, end - 1))); } private: MethodArgumentStack &stack_; }; } // namespace parser } // namespace reco #endif