|
ATLAS Offline Software
|
Go to the documentation of this file.
14 #ifndef TrigInDetAnalysisExample_ChainString_H
15 #define TrigInDetAnalysisExample_ChainString_H
58 std::string
value(
const std::string&
key )
const {
71 const std::vector<std::string>&
keys()
const {
return m_keys; }
73 std::string
pre()
const {
return m_raw.substr( 0,
m_raw.find(
":post") ); }
78 std::string
subs( std::string
s )
const;
83 static std::string
chop(std::string&
s1,
const std::string&
s2) {
84 std::string::size_type
pos =
s1.find_first_of(
s2);
86 if (
pos == std::string::npos ) {
88 s1.erase(0,
s1.size());
100 static std::string
chomp(std::string&
s1,
const std::string&
s2) {
102 std::string::size_type
pos =
s1.find_first_of(
s2);
104 if (
pos == std::string::npos )
return "";
113 static char toupper(
char c ) {
return (
c>=
'a' &&
c<=
'z' ?
c+
'A'-
'a' :
c ); }
116 static std::string
toupper(
const std::string&
s ) {
117 const char*
c =
s.c_str();
125 static char tolower(
char c ) {
return (
c>=
'A' &&
c<=
'Z' ?
c-
'A'+
'a' :
c ); }
128 static std::string
tolower(
const std::string&
s ) {
129 const char*
c =
s.c_str();
140 void parse( std::string
s );
184 #endif // TrigInDetAnalysisExample_ChainString_H
std::string value(const std::string &key) const
can't make this return a reference in case there is no such key - could throw an exception then it wo...
const std::string & post() const
void parse(std::string s)
parse the full specification string
std::string postvalue(const std::string &key) const
same here regarding returning a reference
std::string subs(std::string s) const
static std::string tolower(const std::string &s)
convert to lower case
ChainString(const std::string &s)
std::string extra() const
static std::string chop(std::string &s1, const std::string &s2)
std::vector< std::string > m_values
bool operator==(const ChainString &cs, const ChainString &s)
const std::vector< std::string > & values() const
static std::string chomp(std::string &s1, const std::string &s2)
std::string element() const
std::vector< std::string > m_keys
int findkey(const std::string &key) const
const std::vector< std::string > & keys() const
ChainString & operator=(const ChainString &)=default
static char tolower(char c)
convert to lower case
static std::string toupper(const std::string &s)
convert to upper case
static char toupper(char c)
convert to upper case