Orxonox  0.0.5 Codename: Arcturus
Public Member Functions | Private Attributes | List of all members
orxonox::ArgumentCompletionListElement Class Reference

This class is used in argument completion lists and contains up to three different strings, used in different situations. More...

#include </home/jenkins/workspace/orxonox_doxygen_trunk/src/libraries/core/command/ArgumentCompletionListElement.h>

Public Member Functions

 ArgumentCompletionListElement (const std::string &normalcase)
 Constructor: Normal, comparable, and display string are all the same. More...
 
 ArgumentCompletionListElement (const std::string &normalcase, const std::string &lowercase)
 Constructor: Normal and display string are the same, a different (usually lowercase) string is used for comparison. More...
 
 ArgumentCompletionListElement (const std::string &normalcase, const std::string &lowercase, const std::string &display)
 Constructor: Normal, comparable, and display are all different strings. More...
 
const std::string & getComparable () const
 Returns the comparable string which is used to compare arguments and user input. More...
 
const std::string & getDisplay () const
 Returns the display string which is used in the displayed list of possible arguments. More...
 
const std::string & getString () const
 Returns the normal string which is used as the actual argument. More...
 
bool hasComparable () const
 Returns true if there's a different string for comparison. More...
 
bool hasDisplay () const
 Returns true if there's a different string to display. More...
 
bool operator< (const ArgumentCompletionListElement &other) const
 Overloaded operator for usage in maps and sets. More...
 

Private Attributes

std::string comparable_
 The comparable (usually lowercase) string. More...
 
std::string display_
 The string to display. More...
 
unsigned char mode_
 The flags. More...
 
std::string normal_
 The normal string. More...
 

Detailed Description

This class is used in argument completion lists and contains up to three different strings, used in different situations.

A list containing elements of type ArgumentCompletionListElement is returned by an argument completion function. These elements are composed of up to three strings with different usage:

Remarks
An element with an empty ("") 'comparable' string will be ignored by the argument completion algorithms, but it's 'display' string will still be printed in the list. This can be used to add additional information, whitespaces, linebreaks or whatever is needed to format the output.

Constructor & Destructor Documentation

orxonox::ArgumentCompletionListElement::ArgumentCompletionListElement ( const std::string &  normalcase)
inline

Constructor: Normal, comparable, and display string are all the same.

orxonox::ArgumentCompletionListElement::ArgumentCompletionListElement ( const std::string &  normalcase,
const std::string &  lowercase 
)
inline

Constructor: Normal and display string are the same, a different (usually lowercase) string is used for comparison.

orxonox::ArgumentCompletionListElement::ArgumentCompletionListElement ( const std::string &  normalcase,
const std::string &  lowercase,
const std::string &  display 
)
inline

Constructor: Normal, comparable, and display are all different strings.

Member Function Documentation

const std::string& orxonox::ArgumentCompletionListElement::getComparable ( ) const
inline

Returns the comparable string which is used to compare arguments and user input.

const std::string& orxonox::ArgumentCompletionListElement::getDisplay ( ) const
inline

Returns the display string which is used in the displayed list of possible arguments.

const std::string& orxonox::ArgumentCompletionListElement::getString ( ) const
inline

Returns the normal string which is used as the actual argument.

bool orxonox::ArgumentCompletionListElement::hasComparable ( ) const
inline

Returns true if there's a different string for comparison.

bool orxonox::ArgumentCompletionListElement::hasDisplay ( ) const
inline

Returns true if there's a different string to display.

bool orxonox::ArgumentCompletionListElement::operator< ( const ArgumentCompletionListElement other) const
inline

Overloaded operator for usage in maps and sets.

Member Data Documentation

std::string orxonox::ArgumentCompletionListElement::comparable_
private

The comparable (usually lowercase) string.

std::string orxonox::ArgumentCompletionListElement::display_
private

The string to display.

unsigned char orxonox::ArgumentCompletionListElement::mode_
private

The flags.

std::string orxonox::ArgumentCompletionListElement::normal_
private

The normal string.


The documentation for this class was generated from the following file: