Represents a string with both a spoken and written representation.
More...
#include <SpeakableString.hpp>
Represents a string with both a spoken and written representation.
Definition at line 15 of file SpeakableString.hpp.
◆ SpeakableString() [1/3]
inflection::dialog::SpeakableString::SpeakableString |
( |
std::u16string_view |
print | ) |
|
|
explicit |
Constructs a speakable string given the print part.
- Parameters
-
print | - the expected print part for the speakable string |
◆ SpeakableString() [2/3]
inflection::dialog::SpeakableString::SpeakableString |
( |
std::u16string_view |
print, |
|
|
std::u16string_view |
speak |
|
) |
| |
Constructs a speakable string given both the print and speak part.
- Parameters
-
print | - the expected print part for the speakable string |
speak | - the expected speak part for the speakable string |
◆ SpeakableString() [3/3]
inflection::dialog::SpeakableString::SpeakableString |
( |
const SpeakableString & |
print | ) |
|
◆ ~SpeakableString()
inflection::dialog::SpeakableString::~SpeakableString |
( |
| ) |
|
|
override |
◆ contains()
virtual bool inflection::dialog::SpeakableString::contains |
( |
std::u16string_view |
s | ) |
const |
|
virtual |
Checks that the print part contains a given substring.
- Parameters
-
s | - the substring to check for containment. |
- Returns
- boolean
◆ getPrint()
virtual const ::std::u16string & inflection::dialog::SpeakableString::getPrint |
( |
| ) |
const |
|
virtual |
Get the print string of the speakable string.
- Returns
- string
◆ getSpeak()
virtual const ::std::u16string & inflection::dialog::SpeakableString::getSpeak |
( |
| ) |
const |
|
virtual |
Get the speak string of the speakable string.
- Returns
- string
◆ isEmpty()
virtual bool inflection::dialog::SpeakableString::isEmpty |
( |
| ) |
const |
|
virtual |
A speakable string is empty if it's missing both the print and the speak parts.
- Returns
- boolean
◆ operator+()
Create a new speakable string by appened other to this.
- Parameters
-
o | the speakable string to be appened with this. |
- Returns
- the result speakable string object.
◆ operator+=()
Appends a speakable string to this.
- Parameters
-
o | the speakable string to be appended to this. |
- Returns
- the result speakable string object.
◆ operator=()
Assigns a speakable string to this.
- Parameters
-
o | the speakable string to be assigned to this. |
- Returns
- the result speakable string object.
◆ operator==()
Returns true when both objects refer to the speakable string, with the same print and speak string.
- Parameters
-
o | The speakable string object to be compared with this. |
- Returns
- True if the two speakable string are the same, false otherwise.
◆ speakEqualsPrint()
virtual bool inflection::dialog::SpeakableString::speakEqualsPrint |
( |
| ) |
const |
|
virtual |
Checks that the speak string equals the print string.
- Returns
- boolean
◆ toSpeakableString()
SpeakableString * inflection::dialog::SpeakableString::toSpeakableString |
( |
| ) |
const |
|
overridevirtual |
◆ toString()
::std::u16string inflection::dialog::SpeakableString::toString |
( |
| ) |
const |
|
override |
Return a string helpful for debugging purposes.
The documentation for this class was generated from the following file:
- /home/runner/work/inflection/inflection/inflection/build/inflection_headers/inflection/dialog/SpeakableString.hpp