35 #ifndef _ArgumentCompletionListElement_H__ 36 #define _ArgumentCompletionListElement_H__ 78 {
return this->normal_; }
81 {
return (this->mode_ & ACL_MODE_COMPARABLE) ? this->comparable_ : this->normal_; }
84 {
return (this->mode_ & ACL_MODE_DISPLAY) ? this->display_ : this->normal_; }
88 {
return (this->mode_ & ACL_MODE_COMPARABLE); }
91 {
return (this->mode_ & ACL_MODE_DISPLAY); }
const int ACL_MODE_NORMAL
A flag, used if there's a normal string.
Definition: ArgumentCompletionListElement.h:45
ArgumentCompletionListElement(const std::string &normalcase, const std::string &lowercase, const std::string &display)
Constructor: Normal, comparable, and display are all different strings.
Definition: ArgumentCompletionListElement.h:74
Shared library macros, enums, constants and forward declarations for the core library ...
::std::string string
Definition: gtest-port.h:756
bool operator<(const ArgumentCompletionListElement &other) const
Overloaded operator for usage in maps and sets.
Definition: ArgumentCompletionListElement.h:94
unsigned char mode_
The flags.
Definition: ArgumentCompletionListElement.h:98
ArgumentCompletionListElement(const std::string &normalcase)
Constructor: Normal, comparable, and display string are all the same.
Definition: ArgumentCompletionListElement.h:70
const std::string & getDisplay() const
Returns the display string which is used in the displayed list of possible arguments.
Definition: ArgumentCompletionListElement.h:83
const std::string & getComparable() const
Returns the comparable string which is used to compare arguments and user input.
Definition: ArgumentCompletionListElement.h:80
std::string display_
The string to display.
Definition: ArgumentCompletionListElement.h:101
const int ACL_MODE_COMPARABLE
A flag, used if there's a different string used to compare.
Definition: ArgumentCompletionListElement.h:46
const int ACL_MODE_DISPLAY
A flag, used if there's a different string used to be displayed.
Definition: ArgumentCompletionListElement.h:47
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
#define _CoreExport
Definition: CorePrereqs.h:61
std::string comparable_
The comparable (usually lowercase) string.
Definition: ArgumentCompletionListElement.h:100
void lowercase(std::string *str)
Replaces each char between A and Z with its lowercase equivalent.
Definition: StringUtils.cc:336
std::list< ArgumentCompletionListElement > ArgumentCompletionList
Definition: ArgumentCompletionListElement.h:49
ArgumentCompletionListElement(const std::string &normalcase, const std::string &lowercase)
Constructor: Normal and display string are the same, a different (usually lowercase) string is used f...
Definition: ArgumentCompletionListElement.h:72
std::string normal_
The normal string.
Definition: ArgumentCompletionListElement.h:99
bool hasDisplay() const
Returns true if there's a different string to display.
Definition: ArgumentCompletionListElement.h:90
bool hasComparable() const
Returns true if there's a different string for comparison.
Definition: ArgumentCompletionListElement.h:87
This class is used in argument completion lists and contains up to three different strings...
Definition: ArgumentCompletionListElement.h:66
const std::string & getString() const
Returns the normal string which is used as the actual argument.
Definition: ArgumentCompletionListElement.h:77