|
tdlib-obf API
Reference documentation for the public tdlib-obf API, generated from TDLib schemas and public headers
|
#include <cstddef>#include <cstdint>#include <string>#include <type_traits>#include <utility>Go to the source code of this file.
Classes | |
| class | td::TlObject |
Typedefs | |
| template<class Type > | |
| using | td::tl_object_ptr = tl::unique_ptr< Type > |
Functions | |
| template<class Type , class... Args> | |
| tl_object_ptr< Type > | td::make_tl_object (Args &&...args) |
| template<class ToT , class FromT > | |
| tl_object_ptr< ToT > | td::move_tl_object_as (tl_object_ptr< FromT > &from) |
| template<class ToT , class FromT > | |
| tl_object_ptr< ToT > | td::move_tl_object_as (tl_object_ptr< FromT > &&from) |
Contains the declarations of a base class for all TL-objects and some helper methods
Definition in file TlObject.h.
| using td::tl_object_ptr = typedef tl::unique_ptr<Type> |
A smart wrapper to store a pointer to a TL-object.
Definition at line 184 of file TlObject.h.
| tl_object_ptr< Type > td::make_tl_object | ( | Args &&... | args | ) |
A function to create a dynamically allocated TL-object. Can be treated as an analogue of std::make_unique. Usage example:
| Type | Type of the TL-object to construct. |
| [in] | args | Arguments to pass to the object constructor. |
Definition at line 202 of file TlObject.h.
| tl_object_ptr< ToT > td::move_tl_object_as | ( | tl_object_ptr< FromT > && | from | ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 259 of file TlObject.h.
| tl_object_ptr< ToT > td::move_tl_object_as | ( | tl_object_ptr< FromT > & | from | ) |
A function to downcast a wrapped pointer to a TL-object to a pointer to its subclass. Casting an object to an incorrect type will lead to undefined behaviour. Examples of usage:
| ToT | Type of TL-object to move to. |
| FromT | Type of TL-object to move from, this is auto-deduced. |
| [in] | from | Wrapped pointer to a TL-object. |
Definition at line 251 of file TlObject.h.