Inflection
Morphology Inflection
Loading...
Searching...
No Matches
Public Member Functions | List of all members
inflection::dialog::SpeakableString Class Reference

Represents a string with both a spoken and written representation. More...

#include <SpeakableString.hpp>

+ Inheritance diagram for inflection::dialog::SpeakableString:

Public Member Functions

virtual const ::std::u16string & getPrint () const
 
virtual const ::std::u16string & getSpeak () const
 
virtual bool speakEqualsPrint () const
 
::std::u16string toString () const override
 
bool operator== (const ::inflection::dialog::SpeakableString &o) const
 
SpeakableString operator+ (const ::inflection::dialog::SpeakableString &o) const
 
SpeakableStringoperator= (const ::inflection::dialog::SpeakableString &o)
 
SpeakableStringoperator+= (const ::inflection::dialog::SpeakableString &o)
 
virtual bool isEmpty () const
 
SpeakableStringtoSpeakableString () const override
 
virtual bool contains (std::u16string_view s) const
 
 SpeakableString (std::u16string_view print)
 
 SpeakableString (std::u16string_view print, std::u16string_view speak)
 
 SpeakableString (const SpeakableString &print)
 
 ~SpeakableString () override
 
- Public Member Functions inherited from inflection::dialog::SpeakableConcept
 ~SpeakableConcept () override
 
- Public Member Functions inherited from inflection::Object
virtual ::std::u16string toString () const
 
virtual ~Object ()
 

Detailed Description

Represents a string with both a spoken and written representation.

Definition at line 15 of file SpeakableString.hpp.

Constructor & Destructor Documentation

◆ 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)

Copy constructor.

◆ ~SpeakableString()

inflection::dialog::SpeakableString::~SpeakableString ( )
override

Destructor

Member Function Documentation

◆ 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+()

SpeakableString inflection::dialog::SpeakableString::operator+ ( const ::inflection::dialog::SpeakableString o) const

Create a new speakable string by appened other to this.

Parameters
othe speakable string to be appened with this.
Returns
the result speakable string object.

◆ operator+=()

SpeakableString & inflection::dialog::SpeakableString::operator+= ( const ::inflection::dialog::SpeakableString o)

Appends a speakable string to this.

Parameters
othe speakable string to be appended to this.
Returns
the result speakable string object.

◆ operator=()

SpeakableString & inflection::dialog::SpeakableString::operator= ( const ::inflection::dialog::SpeakableString o)

Assigns a speakable string to this.

Parameters
othe speakable string to be assigned to this.
Returns
the result speakable string object.

◆ operator==()

bool inflection::dialog::SpeakableString::operator== ( const ::inflection::dialog::SpeakableString o) const

Returns true when both objects refer to the speakable string, with the same print and speak string.

Parameters
oThe 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

Makes a copy of the speakable string.

Returns
speakable string.

Implements inflection::dialog::SpeakableConcept.

◆ 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: