TDLib
Loading...
Searching...
No Matches
td::td_api::pollOption Class Referencefinal

Inherits td::td_api::Object.

Public Member Functions

 pollOption ()
 
 pollOption (string const &text_, int32 voter_count_, int32 vote_percentage_, bool is_chosen_, bool is_being_chosen_)
 
std::int32_t get_id () const final
 
void store (TlStorerToString &s, const char *field_name) const final
 
- Public Member Functions inherited from td::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
 

Public Attributes

string text_
 Option text; 1-100 characters.
 
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.
 

Static Public Attributes

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

Detailed Description

Describes one answer option of a poll.

Constructor & Destructor Documentation

◆ pollOption() [1/2]

td::td_api::pollOption::pollOption ( )

Describes one answer option of a poll.

◆ pollOption() [2/2]

td::td_api::pollOption::pollOption ( string const &  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.
[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.

Member Function Documentation

◆ get_id()

std::int32_t td::td_api::pollOption::get_id ( ) const
inlinefinalvirtual

Returns identifier uniquely determining a type of the object.

Returns
this->ID.

Implements td::TlObject.

◆ store()

void td::td_api::pollOption::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 td::TlObject.


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