List of all members | Public Fields | Public Instance Methods | Static Public Attributes
pollOption Class Referencefinal

Inherits Object.

Description

Describes one answer option of a poll.

Public Fields

object_ptr< formattedTexttext_
 Option text; 1-100 characters. Only custom emoji entities are allowed.
 
int32 voter_count_
 Number of voters for this option, available only for closed or voted polls.
 
int32 vote_percentage_
 The percentage of votes for this option; 0-100.
 
bool is_chosen_
 True, if the option was chosen by the user.
 
bool is_being_chosen_
 True, if the option is being chosen by a pending setPollAnswer request.
 

Public Instance Methods

 pollOption ()
 
 pollOption (object_ptr< formattedText > &&text_, int32 voter_count_, int32 vote_percentage_, bool is_chosen_, bool is_being_chosen_)
 
void store (TlStorerToString &s, const char *field_name) const final
 
- Public Instance Methods inherited from TlObject
virtual void store (TlStorerUnsafe &s) const
 
virtual void store (TlStorerCalcLength &s) const
 
 TlObject ()=default
 
 TlObject (const TlObject &)=delete
 
TlObjectoperator= (const TlObject &)=delete
 
 TlObject (TlObject &&)=default
 
TlObjectoperator= (TlObject &&)=default
 
virtual ~TlObject ()=default
 

Static Public Attributes

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

Constructor & Destructor Documentation

◆ pollOption() [1/2]

Describes one answer option of a poll.

◆ pollOption() [2/2]

pollOption ( object_ptr< formattedText > &&  text_,
int32  voter_count_,
int32  vote_percentage_,
bool  is_chosen_,
bool  is_being_chosen_ 
)

Describes one answer option of a poll.

Parameters
[in]text_Option text; 1-100 characters. Only custom emoji entities are allowed.
[in]voter_count_Number of voters for this option, available only for closed or voted polls.
[in]vote_percentage_The percentage of votes for this option; 0-100.
[in]is_chosen_True, if the option was chosen by the user.
[in]is_being_chosen_True, if the option is being chosen by a pending setPollAnswer request.

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