A Description that is stored as a string. More...
#include <basedescription.h>
Public Member Functions | |
virtual Description & | appendText (const QString &text) |
Appends some plain text to the description. | |
virtual Description & | appendDescriptionOf (const SelfDescribing &value) |
Appends the description of a SelfDescribing value to this description. | |
virtual QString | toString () const |
Converts the description into a QString value. | |
![]() | |
template<typename T > | |
Description & | appendValue (const T &value) |
Appends an arbitrary value to the description. | |
Description & | appendValue (short value) |
Description & | appendValue (long value) |
Description & | appendValue (float value) |
Description & | appendValue (double value) |
Description & | appendValue (const char *value) |
Description & | appendValue (const QString &value) |
Description & | appendValue (char value) |
Description & | appendValue (const QChar &value) |
template<typename Iterator > | |
Description & | appendList (const QString &start, const QString &separator, const QString &end, Iterator startIterator, Iterator endIterator) |
Appends a list of SelfDescribing objects to the description. | |
Protected Member Functions | |
virtual void | appendString (const QString &str) |
Append the String str to the description. More... | |
![]() | |
virtual void | append (const QChar &c)=0 |
virtual void | toCppSyntaxString (const QString &unformatted) |
virtual void | toCppSyntax (const QChar &ch) |
Additional Inherited Members | |
![]() | |
static Description & | NONE () |
A Description that is stored as a string.
|
protectedvirtual |
Append the String str to the description.
The default implementation passes every character to append(QChar). Override in subclasses to provide an efficient implementation.
Implements HamcrestQt::Description.
Reimplemented in HamcrestQt::StringDescription.