byteman  1.3 (Build #225)
Bitstream relocation and manipulation tool
Functions
str::iff Namespace Reference

Functions

template<typename ... Rest>
bool charIs (char checkedChar)
 Returns false. End of recursion for template. More...
 
template<typename ... Rest>
bool charIs (char checkedChar, char nextChar, Rest ... restChars)
 Returns true if char checkedChar matches any of chars nextChar or restChars. More...
 
template<typename ... Rest>
bool firstStringWordIs (std::string checkedString, std::string nextString, Rest ... restStrings)
 Returns true if string checkedString's first word matches fully any of strings nextString or restStrings. More...
 
template<typename ... Rest>
bool stringBeginsWith (std::string checkedString)
 Returns false. End of recursion for template. More...
 
template<typename ... Rest>
bool stringBeginsWith (std::string checkedString, std::string nextString, Rest ... restStrings)
 Returns true if string checkedString's first characters match fully any of strings nextString or restStrings. More...
 
template<typename ... Rest>
bool stringContains (std::string checkedString)
 Returns false. End of recursion for template. More...
 
template<typename ... Rest>
bool stringContains (std::string checkedString, std::string nextString, Rest ... restStrings)
 Returns true if string checkedString contains any of strings nextString or restStrings. More...
 
template<typename ... Rest>
bool stringEndsWith (std::string checkedString)
 Returns false. End of recursion for template. More...
 
template<typename ... Rest>
bool stringEndsWith (std::string checkedString, std::string nextString, Rest ... restStrings)
 Returns true if string checkedString's final characters match fully any of strings nextString or restStrings. More...
 
template<typename ... Rest>
bool stringIs (std::string checkedString)
 Returns false. End of recursion for template. More...
 
template<typename ... Rest>
bool stringIs (std::string checkedString, std::string nextString, Rest ... restStrings)
 Returns true if string checkedString matches fully any of strings nextString or restStrings. More...
 
template<typename ... Rest>
bool stringWordIs (std::string checkedString)
 Returns false. End of recursion for template. More...
 
template<typename ... Rest>
bool stringWordIs (std::string checkedString, std::string nextString, Rest ... restStrings)
 Returns true if string checkedString matches fully any of strings nextString or restStrings. More...
 

Function Documentation

◆ charIs() [1/2]

template<typename ... Rest>
bool str::iff::charIs ( char  checkedChar)
inline

Returns false. End of recursion for template.

Definition at line 101 of file iff.h.

102  {
103  return false;
104  }

Referenced by charIs(), XilinxSeries7::initializeResourceStringParameters(), XilinxUltraScale::initializeResourceStringParameters(), and XilinxUltraScalePlus::initializeResourceStringParameters().

Here is the caller graph for this function:

◆ charIs() [2/2]

template<typename ... Rest>
bool str::iff::charIs ( char  checkedChar,
char  nextChar,
Rest ...  restChars 
)
inline

Returns true if char checkedChar matches any of chars nextChar or restChars.

Definition at line 106 of file iff.h.

107  {
108  if(checkedChar == nextChar)
109  return true;
110  return charIs(checkedChar, restChars...);
111  }
bool charIs(char checkedChar, char nextChar, Rest ... restChars)
Returns true if char checkedChar matches any of chars nextChar or restChars.
Definition: iff.h:106

References charIs().

Here is the call graph for this function:

◆ firstStringWordIs()

template<typename ... Rest>
bool str::iff::firstStringWordIs ( std::string  checkedString,
std::string  nextString,
Rest ...  restStrings 
)
inline

Returns true if string checkedString's first word matches fully any of strings nextString or restStrings.

Definition at line 93 of file iff.h.

94  {
95  std::stringstream ss(checkedString);
96  std::string firstWord;
97  ss >> firstWord;
98  return stringWordIs(firstWord, nextString, restStrings...);
99  }
bool stringWordIs(std::string checkedString, std::string nextString, Rest ... restStrings)
Returns true if string checkedString matches fully any of strings nextString or restStrings.
Definition: iff.h:86

References stringWordIs().

Referenced by byteman::parse().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ stringBeginsWith() [1/2]

template<typename ... Rest>
bool str::iff::stringBeginsWith ( std::string  checkedString)
inline

Returns false. End of recursion for template.

Definition at line 69 of file iff.h.

70  {
71  return false;
72  }

Referenced by stringBeginsWith(), and stringWordIs().

Here is the caller graph for this function:

◆ stringBeginsWith() [2/2]

template<typename ... Rest>
bool str::iff::stringBeginsWith ( std::string  checkedString,
std::string  nextString,
Rest ...  restStrings 
)
inline

Returns true if string checkedString's first characters match fully any of strings nextString or restStrings.

Definition at line 74 of file iff.h.

75  {
76  if(0 == checkedString.rfind(nextString, 0))
77  return true;
78  return stringBeginsWith(checkedString, restStrings...);
79  }
bool stringBeginsWith(std::string checkedString, std::string nextString, Rest ... restStrings)
Returns true if string checkedString's first characters match fully any of strings nextString or rest...
Definition: iff.h:74

References stringBeginsWith().

Here is the call graph for this function:

◆ stringContains() [1/2]

template<typename ... Rest>
bool str::iff::stringContains ( std::string  checkedString)
inline

◆ stringContains() [2/2]

template<typename ... Rest>
bool str::iff::stringContains ( std::string  checkedString,
std::string  nextString,
Rest ...  restStrings 
)
inline

Returns true if string checkedString contains any of strings nextString or restStrings.

Definition at line 62 of file iff.h.

63  {
64  if(std::string::npos != checkedString.rfind(nextString))
65  return true;
66  return stringContains(checkedString, restStrings...);
67  }
bool stringContains(std::string checkedString, std::string nextString, Rest ... restStrings)
Returns true if string checkedString contains any of strings nextString or restStrings.
Definition: iff.h:62

References stringContains().

Here is the call graph for this function:

◆ stringEndsWith() [1/2]

template<typename ... Rest>
bool str::iff::stringEndsWith ( std::string  checkedString)
inline

◆ stringEndsWith() [2/2]

template<typename ... Rest>
bool str::iff::stringEndsWith ( std::string  checkedString,
std::string  nextString,
Rest ...  restStrings 
)
inline

Returns true if string checkedString's final characters match fully any of strings nextString or restStrings.

Definition at line 37 of file iff.h.

38  {
39  if(checkedString.length() >= nextString.length())
40  if(0 == checkedString.compare (checkedString.length() - nextString.length(), nextString.length(), nextString))
41  return true;
42  return stringEndsWith(checkedString, restStrings...);
43  }
bool stringEndsWith(std::string checkedString, std::string nextString, Rest ... restStrings)
Returns true if string checkedString's final characters match fully any of strings nextString or rest...
Definition: iff.h:37

References stringEndsWith().

Here is the call graph for this function:

◆ stringIs() [1/2]

template<typename ... Rest>
bool str::iff::stringIs ( std::string  checkedString)
inline

Returns false. End of recursion for template.

Definition at line 45 of file iff.h.

46  {
47  return false;
48  }

Referenced by byteman::help(), and stringIs().

Here is the caller graph for this function:

◆ stringIs() [2/2]

template<typename ... Rest>
bool str::iff::stringIs ( std::string  checkedString,
std::string  nextString,
Rest ...  restStrings 
)
inline

Returns true if string checkedString matches fully any of strings nextString or restStrings.

Definition at line 50 of file iff.h.

51  {
52  if(checkedString == nextString)
53  return true;
54  return stringIs(checkedString, restStrings...);
55  }
bool stringIs(std::string checkedString, std::string nextString, Rest ... restStrings)
Returns true if string checkedString matches fully any of strings nextString or restStrings.
Definition: iff.h:50

References stringIs().

Here is the call graph for this function:

◆ stringWordIs() [1/2]

template<typename ... Rest>
bool str::iff::stringWordIs ( std::string  checkedString)
inline

Returns false. End of recursion for template.

Definition at line 81 of file iff.h.

82  {
83  return false;
84  }

Referenced by firstStringWordIs().

Here is the caller graph for this function:

◆ stringWordIs() [2/2]

template<typename ... Rest>
bool str::iff::stringWordIs ( std::string  checkedString,
std::string  nextString,
Rest ...  restStrings 
)
inline

Returns true if string checkedString matches fully any of strings nextString or restStrings.

Definition at line 86 of file iff.h.

87  {
88  if(checkedString == nextString)
89  return true;
90  return stringBeginsWith(checkedString, restStrings...);
91  }

References stringBeginsWith().

Here is the call graph for this function: