TDLib
Loading...
Searching...
No Matches
pollTypeQuiz Class Referencefinal

Inherits PollType.

Description

A poll in quiz mode, which has predefined correct answers.

Public Member Functions

 pollTypeQuiz ()
 pollTypeQuiz (array< int32 > &&correct_option_ids_, object_ptr< formattedText > &&explanation_, object_ptr< PollMedia > &&explanation_media_)
void store (TlStorerToString &s, const char *field_name) const final
Public Member Functions inherited from TlObject
TlObject & operator= (const TlObject &)=delete
TlObject & operator= (TlObject &&)=default
virtual void store (TlStorerCalcLength &s) const
virtual void store (TlStorerUnsafe &s) const
 TlObject ()=default
 TlObject (const TlObject &)=delete
 TlObject (TlObject &&)=default
virtual ~TlObject ()=default

Public Attributes

array< int32 > correct_option_ids_
 Increasing list of 0-based identifiers of the correct answer options; empty for a yet unanswered poll.
object_ptr< formattedText > explanation_
 Text that is shown when the user chooses an incorrect answer or taps on the lamp icon; empty for a yet unanswered poll.
object_ptr< PollMedia > explanation_media_
 Media that is shown when the user chooses an incorrect answer or taps on the lamp icon; may be null if none or the poll is unanswered yet. If present, currently, can be only of the types pollMediaAnimation, pollMediaAudio, pollMediaDocument, pollMediaLocation, pollMediaPhoto, pollMediaVenue, or pollMediaVideo.

Static Public Attributes

static const std::int32_t ID = 1815418234
 Identifier uniquely determining a type of the object.

Constructor & Destructor Documentation

◆ pollTypeQuiz() [1/2]

pollTypeQuiz ( )

A poll in quiz mode, which has predefined correct answers.

◆ pollTypeQuiz() [2/2]

pollTypeQuiz ( array< int32 > && correct_option_ids_,
object_ptr< formattedText > && explanation_,
object_ptr< PollMedia > && explanation_media_ )

A poll in quiz mode, which has predefined correct answers.

Parameters
[in]correct_option_ids_Increasing list of 0-based identifiers of the correct answer options; empty for a yet unanswered poll.
[in]explanation_Text that is shown when the user chooses an incorrect answer or taps on the lamp icon; empty for a yet unanswered poll.
[in]explanation_media_Media that is shown when the user chooses an incorrect answer or taps on the lamp icon; may be null if none or the poll is unanswered yet. If present, currently, can be only of the types pollMediaAnimation, pollMediaAudio, pollMediaDocument, pollMediaLocation, pollMediaPhoto, pollMediaVenue, or pollMediaVideo.

Member Function Documentation

◆ store()

void store ( TlStorerToString & s,
const char * field_name ) const
finalvirtual

Helper function for to_string method. Appends string representation of the object to the storer.

Parameters
[in]sStorer to which object string representation will be appended.
[in]field_nameObject field_name if applicable.

Implements TlObject.


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